:root {
    --green-50: #ecfdf5;
    --green-100: #d1fae5;
    --green-500: #10b981;
    --green-600: #059669;
    --green-700: #047857;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--slate-700);
    line-height: 1.7;
    font-size: 1rem;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--slate-100);
    padding: 12px 24px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--slate-900);
}

.header-logo img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.header-nav a {
    text-decoration: none;
    color: var(--slate-600);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: var(--green-600);
}

.header-nav .nav-cta {
    background: var(--green-600);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.header-nav .nav-cta:hover {
    background: var(--green-700);
    color: var(--white);
}

.header-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.header-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--slate-700);
}

.header-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header-overlay.open {
    display: block;
    opacity: 1;
}

.header-mobile {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 101;
    padding: 24px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.header-mobile.open {
    transform: translateX(0);
}

.header-mobile-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--slate-900);
}

.header-mobile-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.header-mobile-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.header-mobile-close svg {
    width: 24px;
    height: 24px;
    color: var(--slate-500);
}

.header-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-mobile-links a {
    display: block;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--slate-700);
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s;
}

.header-mobile-links a:hover {
    background: var(--slate-50);
}

.header-mobile-links .mobile-cta {
    background: var(--green-600);
    color: var(--white);
    text-align: center;
    margin-top: 16px;
}

.header-mobile-links .mobile-cta:hover {
    background: var(--green-700);
}

.article-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px;
}

.toc {
    position: sticky;
    top: 100px;
    align-self: start;
    background: var(--slate-50);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--slate-100);
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--slate-400);
    padding: 4px;
    transition: transform 0.3s;
}

.toc-toggle svg {
    width: 16px;
    height: 16px;
}

.toc-toggle.collapsed {
    transform: rotate(180deg);
}

.toc-list {
    list-style: none;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.toc-list.collapsed {
    max-height: 0;
}

.toc-item {
    margin-bottom: 8px;
}

.toc-link {
    display: block;
    padding: 8px 12px;
    color: var(--slate-600);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.toc-link:hover {
    color: var(--green-600);
    background: var(--white);
}

.toc-link.active {
    color: var(--green-600);
    background: var(--white);
    border-left-color: var(--green-500);
    font-weight: 500;
}

.article-main {
    min-width: 0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-category {
    background: var(--green-50);
    color: var(--green-700);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.article-date,
.article-read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--slate-500);
    font-size: 0.875rem;
}

.article-date svg,
.article-read-time svg {
    width: 16px;
    height: 16px;
}

.article-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--slate-900);
    margin-bottom: 20px;
}

.article-intro {
    font-size: 1.125rem;
    color: var(--slate-600);
    line-height: 1.8;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--slate-200);
}

.article-content h2 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 48px 0 20px;
    scroll-margin-top: 100px;
}

.article-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--slate-800);
    margin: 32px 0 16px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
    margin: 0 0 24px 24px;
}

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

.article-content a {
    color: var(--green-600);
    text-decoration: underline;
    text-decoration-color: var(--green-200);
    text-underline-offset: 2px;
}

.article-content a:hover {
    text-decoration-color: var(--green-600);
}

.article-content code {
    background: var(--slate-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: 'SF Mono', Monaco, monospace;
}

.article-content pre {
    background: var(--slate-800);
    color: var(--slate-100);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

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

.info-box {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    padding: 20px;
    margin: 28px 0;
}

.info-box.tip {
    background: var(--green-50);
    border-color: var(--green-200);
}

.info-box-title {
    font-weight: 600;
    color: var(--slate-800);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box p {
    margin: 0;
    color: var(--slate-600);
    font-size: 0.9375rem;
}

.cta-box {
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    border-radius: 16px;
    padding: 32px;
    margin: 40px 0;
    text-align: center;
    color: var(--white);
}

.cta-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.cta-box p {
    opacity: 0.9;
    margin-bottom: 20px;
    font-size: 0.9375rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--green-700);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.author-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--slate-50);
    border-radius: 12px;
    margin: 40px 0;
}

.author-avatar {
    width: 56px;
    height: 56px;
    background: var(--slate-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-avatar svg {
    width: 28px;
    height: 28px;
    color: var(--slate-500);
}

.author-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 4px;
}

.author-info p {
    font-size: 0.875rem;
    color: var(--slate-500);
    margin: 0;
}

.related {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--slate-200);
}

.related h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.related-card {
    padding: 20px;
    background: var(--slate-50);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--slate-100);
}

.related-card:hover {
    background: var(--white);
    border-color: var(--green-200);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.related-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate-800);
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-card p {
    font-size: 0.875rem;
    color: var(--slate-500);
    margin: 0;
    line-height: 1.5;
}

.footer {
    background: var(--slate-900);
    color: var(--white);
    padding: 40px 24px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.footer-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

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

.footer-links a {
    color: var(--slate-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--green-400);
}

.footer-copyright {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 24px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--slate-500);
}

.footer-copyright small {
    color: var(--slate-600);
}

@media (max-width: 900px) {
    .article-container {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }

    .toc {
        position: relative;
        top: 0;
    }

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

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .header-toggle {
        display: block;
    }

    .header-mobile {
        display: block;
    }

    .footer-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 12px 16px;
    }

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

    .article-content h2 {
        font-size: 1.25rem;
    }

    .cta-box {
        padding: 24px 20px;
    }

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

/* Blog Listing Page Styles */
.blog-listing {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}

.blog-header {
    text-align: center;
    margin-bottom: 48px;
}

.blog-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 12px;
}

.blog-header p {
    font-size: 1.125rem;
    color: var(--slate-500);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--slate-200);
    transition: all 0.3s ease;
}

.blog-card:hover {
    border-color: var(--green-200);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}



.blog-card-content {
    padding: 24px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.blog-card-category {
    background: var(--green-50);
    color: var(--green-700);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.blog-card-date {
    color: var(--slate-400);
    font-size: 0.8125rem;
}

.blog-card-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.4;
    margin-bottom: 12px;
}

.blog-card:hover .blog-card-title {
    color: var(--green-700);
}

.blog-card-excerpt {
    font-size: 0.9375rem;
    color: var(--slate-500);
    line-height: 1.6;
    margin-bottom: 16px;
}

.blog-card-read {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--green-600);
}

.blog-cta {
    background: var(--slate-50);
    border-radius: 16px;
    padding: 48px;
    text-align: center;
}

.blog-cta-inner h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 8px;
}

.blog-cta-inner p {
    color: var(--slate-500);
    margin-bottom: 20px;
}

.blog-cta-btn {
    display: inline-block;
    background: var(--green-600);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.blog-cta-btn:hover {
    background: var(--green-700);
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .blog-listing {
        padding: 40px 16px;
    }

    .blog-cta {
        padding: 32px 24px;
    }
}

@media (max-width: 600px) {
    .blog-card-title {
        font-size: 1.125rem;
    }

    .blog-card-content {
        padding: 20px;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: #fff;
    padding: 16px 24px;
    z-index: 1000;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-content p {
    font-size: 0.9rem;
    color: #d1d5db;
    margin: 0;
}

.cookie-content a {
    color: #fff;
    text-decoration: underline;
}

.cookie-accept {
    background: #059669;
    color: #fff;
    border: none;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.cookie-accept:hover {
    background: #047857;
}

@media (max-width: 600px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}
