/* ===== CSS Reset & Base Styles ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.84);
    background-color: #fff;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

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

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ===== Container ===== */
.container {
    max-width: 1192px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #fff;
    border-bottom: 1px solid #f2f2f2;
}

.navbar-container {
    max-width: 1192px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 65px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #242424;
}

.logo svg {
    color: #242424;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #6b6b6b;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #242424;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-search {
    background: none;
    border: none;
    padding: 8px;
    color: #6b6b6b;
    transition: color 0.2s ease;
}

.btn-search:hover {
    color: #242424;
}

.btn-write {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6b6b6b;
    transition: color 0.2s ease;
}

.btn-write:hover {
    color: #242424;
}

/* ===== Hero Section ===== */
.hero {
    padding: 80px 24px;
    text-align: center;
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
    border-bottom: 1px solid #f2f2f2;
}

.hero-content {
    max-width: 680px;
    margin: 0 auto;
}

.hero h1 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 64px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #242424;
    margin-bottom: 16px;
}

.hero p {
    font-size: 20px;
    color: #6b6b6b;
    line-height: 1.5;
}

/* ===== Featured Section ===== */
.featured-section {
    padding: 60px 0;
    border-bottom: 1px solid #f2f2f2;
}

.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 4px;
}

.featured-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a8917;
    margin-bottom: 16px;
}

.featured-content h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 16px;
}

.featured-content h2 a {
    color: #242424;
    transition: color 0.2s ease;
}

.featured-content h2 a:hover {
    color: #1a8917;
}

.featured-excerpt {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 18px;
    line-height: 1.6;
    color: #6b6b6b;
    margin-bottom: 24px;
}

/* ===== Post Meta ===== */
.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar.small {
    width: 32px;
    height: 32px;
}

.meta-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 14px;
    font-weight: 500;
    color: #242424;
}

.author-name:hover {
    text-decoration: underline;
}

.meta-details {
    font-size: 13px;
    color: #6b6b6b;
}

/* ===== Posts Section ===== */
.posts-section {
    padding: 60px 0 80px;
}

.section-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f2f2f2;
}

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

/* ===== Post Card ===== */
.post-card {
    display: flex;
    flex-direction: column;
}

.post-card-image {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 16px;
}

.post-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card-image:hover img {
    transform: scale(1.02);
}

.post-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #242424;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.post-card-title:hover {
    color: #1a8917;
}

.post-card-excerpt {
    font-size: 15px;
    line-height: 1.5;
    color: #6b6b6b;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Load More ===== */
.load-more {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.btn-load-more {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #242424;
    background: transparent;
    border: 1px solid #242424;
    border-radius: 99em;
    transition: all 0.2s ease;
}

.btn-load-more:hover {
    background: #242424;
    color: #fff;
}

/* ===== Newsletter Section ===== */
.newsletter-section {
    padding: 80px 0;
    background: #f9f9f9;
}

.newsletter-content {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.newsletter-content p {
    font-size: 16px;
    color: #6b6b6b;
    margin-bottom: 24px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease;
}

.newsletter-form input:focus {
    border-color: #242424;
}

.newsletter-form button {
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #1a8917;
    border: none;
    border-radius: 99em;
    transition: background 0.2s ease;
}

.newsletter-form button:hover {
    background: #156d12;
}

.newsletter-form button:disabled {
    background: #999;
    cursor: not-allowed;
}

.newsletter-form input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.subscribe-success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: #e8f5e9;
    color: #1a8917;
    border-radius: 99em;
    font-weight: 500;
}

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #1a8917;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
}

.subscribe-error {
    width: 100%;
    margin-top: 8px;
    padding: 8px 16px;
    color: #d32f2f;
    font-size: 14px;
    text-align: center;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0 32px;
    background: #fff;
    border-top: 1px solid #f2f2f2;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 14px;
    color: #6b6b6b;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-column h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #242424;
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    font-size: 14px;
    color: #6b6b6b;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #242424;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #f2f2f2;
}

.footer-bottom p {
    font-size: 13px;
    color: #6b6b6b;
}

/* ===== Article Page Styles ===== */
.article-header {
    padding: 48px 0 32px;
}

.article-header .container {
    max-width: 680px;
}

.article-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #242424;
    background: #f2f2f2;
    border-radius: 99em;
    margin-bottom: 24px;
}

.article-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #242424;
    margin-bottom: 16px;
}

.article-subtitle {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 22px;
    line-height: 1.4;
    color: #6b6b6b;
    margin-bottom: 32px;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-top: 1px solid #f2f2f2;
    border-bottom: 1px solid #f2f2f2;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.article-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.article-author-name {
    font-size: 15px;
    font-weight: 500;
    color: #242424;
}

.article-author-name:hover {
    text-decoration: underline;
}

.article-date {
    font-size: 14px;
    color: #6b6b6b;
}

.article-actions {
    display: flex;
    gap: 16px;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: none;
    border: none;
    color: #6b6b6b;
    transition: color 0.2s ease;
}

.btn-action:hover {
    color: #242424;
}

.btn-action span {
    font-size: 13px;
}

/* ===== Article Content ===== */
.article-content {
    padding: 48px 0 64px;
}

.article-content .container {
    max-width: 680px;
}

.article-featured-image {
    margin-bottom: 48px;
}

.article-featured-image img {
    width: 100%;
    border-radius: 4px;
}

.article-featured-image figcaption {
    margin-top: 12px;
    font-size: 14px;
    color: #6b6b6b;
    text-align: center;
}

.article-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 20px;
    line-height: 1.7;
    letter-spacing: -0.003em;
}

.article-body p {
    margin-bottom: 28px;
}

.article-body h2 {
    font-size: 28px;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.article-body h3 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.article-body strong {
    font-weight: 700;
}

.article-body a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.article-body a:hover {
    text-decoration-color: rgba(0, 0, 0, 0.8);
}

.article-body mark {
    background: rgba(255, 230, 0, 0.4);
    padding: 2px 4px;
    border-radius: 2px;
}

.article-body blockquote {
    margin: 32px 0;
    padding-left: 24px;
    border-left: 3px solid #242424;
    font-style: italic;
    color: #6b6b6b;
}

.article-body ul,
.article-body ol {
    margin-bottom: 28px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
    list-style: disc;
}

.article-body ol li {
    list-style: decimal;
}

/* ===== Article Footer ===== */
.article-footer {
    padding: 48px 0;
    border-top: 1px solid #f2f2f2;
}

.article-footer .container {
    max-width: 680px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.article-tags a {
    padding: 8px 16px;
    font-size: 13px;
    color: #6b6b6b;
    background: #f2f2f2;
    border-radius: 99em;
    transition: all 0.2s ease;
}

.article-tags a:hover {
    color: #242424;
    background: #e5e5e5;
}

.article-engagement {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-top: 1px solid #f2f2f2;
    border-bottom: 1px solid #f2f2f2;
}

.engagement-left {
    display: flex;
    gap: 24px;
}

.engagement-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #6b6b6b;
    font-size: 14px;
    transition: color 0.2s ease;
}

.engagement-btn:hover {
    color: #242424;
}

.engagement-right {
    display: flex;
    gap: 12px;
}

/* ===== Author Bio ===== */
.author-bio {
    display: flex;
    gap: 20px;
    padding: 32px 0;
}

.author-bio-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-bio-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.author-bio-content p {
    font-size: 15px;
    color: #6b6b6b;
    line-height: 1.5;
    margin-bottom: 12px;
}

.btn-follow {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: #1a8917;
    border: none;
    border-radius: 99em;
    transition: background 0.2s ease;
}

.btn-follow:hover {
    background: #156d12;
}

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 42px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .featured-post {
        grid-template-columns: 1fr;
    }
    
    .featured-image img {
        height: 280px;
    }
    
    .featured-content h2 {
        font-size: 28px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .post-card-image img {
        height: 240px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links {
        gap: 48px;
    }
    
    /* Article responsive */
    .article-title {
        font-size: 32px;
    }
    
    .article-subtitle {
        font-size: 18px;
    }
    
    .article-body {
        font-size: 18px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 16px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 48px 16px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .btn-write span {
        display: none;
    }
    
    .article-engagement {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}
