:root {
    --bg: #fcfcfc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #4f46e5;
    --border: #e2e8f0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.animate-fade-in { animation: fadeIn 0.8s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out forwards; }

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

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

.blog-header {
    max-width: 800px;
    margin: 60px auto 40px;
    padding: 0 24px;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.brand {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.back-link:hover {
    transform: translateX(-4px);
}

.blog-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-main);
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.category {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.dot {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
    opacity: 0.5;
}

.blog-content {
    max-width: 800px;
    margin: 0 auto 100px;
    padding: 0 24px;
}

.image-wrapper {
    margin: 40px 0 60px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px -12px rgba(0,0,0,0.1);
}

.cover-image {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.article-body {
    font-size: 1.125rem;
    color: #334155;
}

.lead {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 32px;
}

.article-body h2 {
    margin: 48px 0 20px;
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.article-body h3 {
    margin: 32px 0 16px;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

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

.highlight-box {
    background: #f1f5f9;
    padding: 32px;
    border-radius: 20px;
    margin: 40px 0;
}

.highlight-box h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

.highlight-box ul {
    list-style: none;
    margin-top: 16px;
}

.highlight-box li {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.highlight-box li::before {
    content: "✓";
    color: var(--accent);
    font-weight: 900;
    margin-top: 2px;
}

/* Code blocks */
.code-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
    overflow-x: auto;
}

.code-block pre {
    font-family: 'Courier New', Monaco, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1e293b;
    margin: 0;
}

/* Comparison table */
.comparison-table {
    margin: 40px 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.comparison-table th,
.comparison-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.comparison-table th {
    background: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background: #f8fafc;
}

.comparison-table td {
    font-size: 1rem;
}

/* Further reading section */
.further-reading {
    background: #e8f4f8;
    padding: 32px;
    border-radius: 20px;
    margin: 48px 0 0;
    border-left: 4px solid #0ea5e9;
}

.further-reading h2 {
    margin-top: 0;
    font-size: 1.25rem;
    color: var(--text-main);
}

.further-reading ul {
    margin-top: 16px;
}

.further-reading li {
    margin-bottom: 12px;
    color: #334155;
    font-size: 1rem;
}

.conclusion {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-main);
    font-style: italic;
}

.blog-footer {
    text-align: center;
    padding: 80px 24px;
    background: #0f172a;
    color: #94a3b8;
}

.blog-footer p {
    font-weight: 700;
    color: white;
}

.footer-sub {
    font-size: 0.875rem;
    margin-top: 4px;
    font-weight: 400 !important;
    opacity: 0.6;
}

@media (max-width: 640px) {
    .blog-header h1 {
        font-size: 2.5rem;
    }
    .lead {
        font-size: 1.25rem;
    }
    .article-body h2 {
        font-size: 1.5rem;
    }
    .article-body h3 {
        font-size: 1.25rem;
    }
    .highlight-box,
    .code-block,
    .further-reading {
        padding: 24px;
    }
    .comparison-table {
        font-size: 0.9rem;
    }
    .comparison-table th,
    .comparison-table td {
        padding: 12px 16px;
    }
}