/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
.header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    color: var(--text-light);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Section Styles */
section {
    padding: 60px 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-color);
}

/* Featured Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.post-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-card a {
    display: block;
    padding: 25px;
}

.post-card.featured {
    grid-column: 1;
    grid-row: 1 / 3;
}

.post-card.featured a {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card.featured h3 {
    font-size: 1.5rem;
}

.post-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.post-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.4;
}

.post-card p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.post-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.post-item a {
    display: flex;
    padding: 25px;
}

.post-item .post-content {
    flex: 1;
}

.post-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.post-item p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 12px;
    line-height: 1.6;
}

.load-more {
    text-align: center;
    margin-top: 40px;
}

/* Button */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: var(--primary-dark);
}

/* Categories Section */
.categories-section {
    background: var(--bg-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.category-card {
    background: var(--bg-color);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 15px;
}

.post-count {
    font-size: 0.8125rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.newsletter h2 {
    font-size: 1.75rem;
    margin-bottom: 10px;
}

.newsletter p {
    opacity: 0.9;
    margin-bottom: 25px;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

.newsletter-form .btn {
    background: var(--text-color);
}

.newsletter-form .btn:hover {
    background: #111827;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.footer-section p {
    color: #9ca3af;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #9ca3af;
    font-size: 0.9375rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 30px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Article Page Styles */
.article-header {
    padding: 60px 0 40px;
    text-align: center;
    background: var(--bg-light);
}

.article-header .post-category {
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-light);
    font-size: 0.9375rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 40px 0 20px;
    color: var(--text-color);
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 30px 0 15px;
    color: var(--text-color);
}

.article-content p {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.0625rem;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px 30px;
    margin: 30px 0;
    background: var(--bg-light);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content blockquote p {
    margin: 0;
    font-style: italic;
    color: var(--text-light);
}

.article-content strong {
    font-weight: 600;
    color: var(--text-color);
}

/* Info Pages (About, Contact, Privacy, Terms) */
.page-header {
    background: var(--bg-light);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.0625rem;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.page-content h2 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 35px 0 15px;
    color: var(--text-color);
}

.page-content p {
    margin-bottom: 18px;
    line-height: 1.8;
    color: var(--text-color);
}

.page-content ul {
    margin: 15px 0 25px;
    padding-left: 25px;
}

.page-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Category Page */
.category-header {
    background: var(--bg-light);
    padding: 50px 0;
}

.category-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.category-header p {
    color: var(--text-light);
    font-size: 1.0625rem;
}

/* Related Posts */
.related-posts {
    background: var(--bg-light);
    padding: 60px 0;
    margin-top: 60px;
}

.related-posts h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Author Info */
.author-box {
    display: flex;
    gap: 20px;
    padding: 30px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-top: 40px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.author-info p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-card.featured {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        display: none;
    }

    .nav.active {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    .nav li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav a {
        display: block;
        padding: 15px 0;
    }

    .hero h1 {
        font-size: 1.875rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .author-avatar {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 40px 0;
    }

    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .post-card a,
    .post-item a {
        padding: 20px;
    }
}
