:root {
    --primary: #1a1a2e;
    --accent: #d4af37;
    --accent-light: #e8c55d;
    --text: #333;
    --text-light: #666;
    --bg: #fafafa;
    --bg-secondary: #f4f1ea;
    --border: #e0ddd1;
}

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

body {
    font-family: 'Crimson Pro', serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

.mono {
    font-family: 'DM Mono', monospace;
    font-size: 0.9em;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1rem;
}

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

/* Page Container */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 3rem 4rem;
    min-height: 100vh;
}

.page {
    display: none;
    animation: fadeIn 0.6s ease;
}

.page.active {
    display: block;
}

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

/* Home Page */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    align-items: center;
    min-height: 70vh;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--primary);
    letter-spacing: -0.03em;
}

.hero-content .subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-content .description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    max-width: 600px;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--bg);
}

.hero-visual {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--border) 100%);
    border-radius: 8px;
    overflow: hidden;
}

.visual-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 1px;
    background: rgba(26, 26, 46, 0.05);
}

.grid-cell {
    background: var(--bg);
    animation: pulse 3s ease-in-out infinite;
}

.grid-cell:nth-child(3),
.grid-cell:nth-child(7),
.grid-cell:nth-child(11) {
    background: var(--accent);
    opacity: 0.3;
    animation-delay: 0.5s;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* About Page */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 6rem;
    margin-top: 4rem;
}

.about-sidebar {
    position: sticky;
    top: 150px;
    align-self: start;
}

.profile-section {
    margin-bottom: 3rem;
}

.profile-section h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 500;
}

.profile-section p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.about-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary);
}

.timeline {
    border-left: 2px solid var(--border);
    padding-left: 3rem;
}

.timeline-item {
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3.5rem;
    top: 0.5rem;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg);
}

.timeline-year {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.timeline-item h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.timeline-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.timeline-item p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.timeline-highlight {
    background: var(--bg-secondary);
    padding: 1.5rem;
    margin-top: 1rem;
    border-left: 3px solid var(--accent);
}

.timeline-highlight strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

/* Page Header */
.page-header {
    margin-bottom: 4rem;
}

.page-header h1 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

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

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
}

.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.blog-card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--border) 100%);
    position: relative;
}

.blog-card-content {
    padding: 2rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.blog-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.read-more:hover {
    color: var(--accent-light);
}

/* Articles List */
.articles-list {
    max-width: 900px;
}

.article-item {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}

.article-item:first-child {
    padding-top: 0;
}

.article-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--accent);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 3px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-item h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.article-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.article-item p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.article-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.article-link:hover {
    color: var(--accent-light);
}

/* Resources Page */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.resource-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.resource-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--accent);
}

.resource-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.resource-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.resource-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.resource-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-download {
    background: var(--accent);
    color: var(--primary);
}

.btn-download:hover {
    background: var(--accent-light);
}

.btn-view {
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-view:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Footer */
footer {
    margin-top: 8rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 1.5rem;
    }

    .nav-links {
        gap: 1.2rem;
        font-size: 0.9rem;
    }

    .page-container {
        padding: 6rem 1.5rem 2rem;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-visual {
        height: 300px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-sidebar {
        position: static;
    }

    .blog-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .cta-buttons {
        flex-direction: column;
    }
}

/* ---- Server-rendered additions ---- */
.card-link { color: inherit; text-decoration: none; }
.card-link:hover h3 { color: var(--accent); }
.resource-card h3 a, .blog-card h3 a, .article-item h3 a { color: inherit; text-decoration: none; }
.resource-card h3 a:hover, .blog-card h3 a:hover, .article-item h3 a:hover { color: var(--accent); }
.item-links { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem; font-family: 'DM Mono', monospace; font-size: 0.85rem; }
.item-links a { color: var(--accent); text-decoration: none; font-weight: 500; }
.item-links a:hover { text-decoration: underline; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 4px; margin: 1rem 0; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.post { max-width: 760px; margin: 0 auto; }
.breadcrumb { font-family: 'DM Mono', monospace; font-size: 0.8rem; color: var(--text-light); margin-bottom: 2rem; }
.breadcrumb a { color: var(--text-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.post-header { border-bottom: 1px solid var(--border); padding-bottom: 2rem; margin-bottom: 2.5rem; }
.post-header h1 { font-size: 3rem; line-height: 1.15; color: var(--primary); letter-spacing: -0.02em; margin-bottom: 1rem; }
.post-meta { font-family: 'DM Mono', monospace; font-size: 0.85rem; color: var(--text-light); display: flex; gap: 1.5rem; flex-wrap: wrap; }
.post-meta .cat { color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.post-lede { font-size: 1.3rem; color: var(--text-light); margin-top: 1rem; }
.post-body { font-size: 1.2rem; line-height: 1.8; }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 { font-size: 1.9rem; color: var(--primary); margin-top: 2.2em; line-height: 1.25; }
.post-body h3 { font-size: 1.45rem; color: var(--primary); margin-top: 1.8em; }
.post-body h4 { font-size: 1.2rem; color: var(--primary); margin-top: 1.5em; }
.post-body a { color: #9a7a14; }
.post-body ul, .post-body ol { padding-left: 1.5em; }
.post-body li + li { margin-top: 0.35em; }
.post-body figure { margin: 2em 0; }
.post-body img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 4px; display: block; }
.post-body figcaption { font-size: 0.95rem; color: var(--text-light); margin-top: 0.5em; }
.post-body code { font-family: 'DM Mono', monospace; font-size: 0.85em; background: var(--bg-secondary); padding: 0.1em 0.3em; border-radius: 3px; }
.post-body pre { background: var(--primary); color: #eee; padding: 1.2em; border-radius: 4px; overflow-x: auto; font-size: 0.9rem; line-height: 1.5; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 0.4em 0.7em; text-align: left; }
.post-body th { background: var(--bg-secondary); }
.post-body .small { font-size: 0.9rem; color: var(--text-light); }
.post-body blockquote { border-left: 3px solid var(--accent); padding-left: 1.2em; color: var(--text-light); font-style: italic; }
.source-box { margin-top: 3rem; padding: 1.5rem; background: var(--bg-secondary); border-left: 3px solid var(--accent); border-radius: 4px; display: flex; gap: 1.5rem; align-items: flex-start; }
.source-box img { width: 120px; height: auto; border: 1px solid var(--border); flex-shrink: 0; }
.source-box h2 { font-size: 1.1rem; font-family: 'DM Mono', monospace; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); margin-bottom: 0.5rem; }
.source-box a { color: #9a7a14; font-weight: 600; }
.post-nav { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); font-family: 'DM Mono', monospace; font-size: 0.9rem; }
.post-nav a { color: var(--accent); text-decoration: none; }

@media (max-width: 768px) {
    nav { position: static; }
    .page-container { padding-top: 2rem; }
    .nav-container { flex-wrap: wrap; gap: 0.75rem; }
    .nav-links { flex-wrap: wrap; gap: 0.6rem 1rem; }
    .post-header h1 { font-size: 2.2rem; }
    .post-body { font-size: 1.1rem; }
    .source-box { flex-direction: column; }
}

/* Author box & byline */
.post-meta a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--text-light); }
.post-meta a:hover { color: var(--accent); }
.author-box { margin-top: 2.5rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: 4px; background: white; }
.author-box h2 { font-family: 'DM Mono', monospace; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin-bottom: 0.6rem; }
.author-box p { font-size: 1.05rem; }
.author-box a strong { color: var(--primary); }
.timeline a, .about-content a { color: #9a7a14; }
