/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0c0c0c;
    --bg-nav: #0a0a0a;
    --bg-code: #131313;
    --bg-inline-code: #1a1a18;
    --text: #b8b4a8;
    --text-muted: #807c70;
    --text-dim: #504d44;
    --accent: #8b3a3a;
    --accent-hover: #a84a4a;
    --heading: #d2cec2;
    --link: #a84a4a;
    --link-hover: #c86868;
    --border: #1e1e1c;
    --border-code: #252522;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.75;
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: #3a2020;
    color: #d4cfc2;
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid rgba(168, 74, 74, 0.3);
    transition: color 0.3s ease, border-color 0.3s ease;
}

a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

/* ===== TOP NAV BAR ===== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-nav);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.06em;
    border: none;
    text-transform: lowercase;
}

.site-name:hover {
    color: var(--heading);
}

.topbar nav {
    display: flex;
    gap: 28px;
}

.topbar nav a {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 0.05em;
    border: none;
    transition: color 0.3s ease;
}

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

/* ===== HERO ===== */
.hero {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    filter: grayscale(30%) contrast(1.1);
    opacity: 0.6;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(12, 12, 12, 0.2) 0%,
        rgba(12, 12, 12, 0) 30%,
        rgba(12, 12, 12, 0.4) 70%,
        rgba(12, 12, 12, 0.95) 100%
    );
}

.hero-text {
    position: absolute;
    bottom: 36px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 24px;
}

.hero-text blockquote p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 2;
    max-width: 520px;
    margin: 0 auto;
    font-weight: 400;
}

.hero-text blockquote cite {
    display: block;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 12px;
    font-style: normal;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ===== LAYOUT ===== */
.page-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

/* ===== PAGE TITLE ===== */
.page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 400;
    font-style: italic;
    color: var(--accent);
    margin-bottom: 40px;
    letter-spacing: -0.01em;
}

/* ===== POST ENTRIES ===== */
.post {
    margin-bottom: 44px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.post:last-child {
    border-bottom: none;
}

.post-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.35;
    margin-bottom: 6px;
}

.post-title a {
    color: var(--heading);
    text-decoration: none;
    border: none;
}

.post-title a:hover {
    color: var(--accent-hover);
}

.post-date {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: block;
    text-transform: uppercase;
}

.post > p,
.post-info > p {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
}

.post p strong {
    color: var(--heading);
    font-weight: 600;
}

.post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tag {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    border: 1px solid var(--border);
    padding: 2px 10px;
    border-radius: 2px;
    text-transform: lowercase;
}

/* ===== ABOUT PAGE ===== */
.about-content {
    max-width: 600px;
}

.about-section {
    margin-bottom: 34px;
}

.about-section h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 12px;
}

.about-section p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.75;
}

.about-section ul {
    list-style: none;
    padding: 0;
}

.about-section ul li {
    padding-left: 18px;
    margin-bottom: 6px;
    position: relative;
    font-size: 0.95rem;
}

.about-section ul li::before {
    content: '\2014';
    position: absolute;
    left: 0;
    color: var(--text-dim);
}

/* ===== WIDE IMAGE ===== */
.wide-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 1px solid var(--border);
    filter: grayscale(20%) contrast(1.05);
    opacity: 0.7;
    margin-bottom: 10px;
}

.figure {
    margin: 28px 0;
}

.figure figcaption {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7rem;
    color: var(--text-dim);
    font-style: normal;
    margin-top: 8px;
    letter-spacing: 0.03em;
}

/* ===== EPIGRAPH ===== */
.epigraph {
    border-left: 2px solid var(--accent);
    padding: 8px 0 8px 20px;
    margin: 28px 0;
}

.epigraph p {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.epigraph cite {
    display: block;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 8px;
    font-style: normal;
    letter-spacing: 0.08em;
}

/* ===== FULL POST PAGE ===== */
.post-full {
    max-width: 720px;
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.post-full-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading);
    line-height: 1.3;
    margin-bottom: 8px;
}

.post-header .post-date {
    margin-bottom: 10px;
}

/* ===== POST BODY — MARKDOWN RENDERED ===== */
.post-body {
    font-size: 0.95rem;
    line-height: 1.8;
}

.post-body p {
    margin-bottom: 18px;
}

.post-body h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--heading);
    margin: 48px 0 16px;
}

.post-body h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--heading);
    margin: 44px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.post-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--heading);
    margin: 32px 0 12px;
}

.post-body h4 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 28px 0 10px;
}

.post-body strong {
    color: var(--heading);
    font-weight: 700;
}

.post-body em {
    font-style: italic;
    color: var(--text);
}

.post-body blockquote {
    border-left: 2px solid var(--accent);
    padding: 4px 0 4px 20px;
    margin: 24px 0;
}

.post-body blockquote p {
    color: var(--text-muted);
    font-style: italic;
}

.post-body ul,
.post-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 6px;
}

.post-body hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 40px 0;
}

/* ===== CODE — INLINE ===== */
.post-body code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.82rem;
    background: var(--bg-inline-code);
    color: #c9c1a5;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--border);
}

/* ===== CODE — BLOCKS ===== */
.post-body pre {
    background: var(--bg-code);
    border: 1px solid var(--border-code);
    border-radius: 4px;
    padding: 20px 24px;
    margin: 24px 0;
    overflow-x: auto;
    line-height: 1.55;
}

.post-body pre code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.78rem;
    background: none;
    color: #a8a290;
    padding: 0;
    border: none;
    border-radius: 0;
}

/* ===== POST NAV (back link) ===== */
.post-nav {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.post-nav a {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    border: none;
}

.post-nav a:hover {
    color: var(--text);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 28px 24px 36px;
    border-top: 1px solid var(--border);
    max-width: 720px;
    margin: 0 auto;
}

.footer p {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

.footer .footer-quote {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    margin-top: 6px;
    font-size: 0.8rem;
    opacity: 0.5;
    letter-spacing: normal;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        gap: 10px;
        padding: 14px 20px;
    }

    .topbar nav {
        gap: 20px;
    }

    .page-body {
        padding: 36px 18px 60px;
    }

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

    .post-title {
        font-size: 1.2rem;
    }

    .post-full-title {
        font-size: 1.5rem;
    }

    .hero {
        height: 300px;
    }

    .hero-text blockquote p {
        font-size: 1rem;
    }

    .post-body pre {
        padding: 16px;
    }

    .post-body pre code {
        font-size: 0.72rem;
    }

    .wide-image {
        height: auto;
    }
}

@media (max-width: 480px) {
    .topbar nav {
        gap: 14px;
    }

    .topbar nav a {
        font-size: 0.75rem;
    }

    .page-title {
        font-size: 1.3rem;
    }
}
