:root {
    --bg: #152116;
    --fg: #fafeb2;
    --muted: rgba(250, 254, 178, 0.72);
    --soft: rgba(250, 254, 178, 0.12);
    --softer: rgba(250, 254, 178, 0.07);
    --line: rgba(250, 254, 178, 0.22);
    --shadow: rgba(0, 0, 0, 0.28);
    --max: 1120px;
    --narrow: 740px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.6;
}

a {
    color: var(--fg);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-thickness: 0.14em;
}

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

code {
    padding: 0.1rem 0.28rem;
    border: 1px solid var(--line);
    border-radius: 0.3rem;
    background: var(--softer);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em;
}

.container {
    width: min(calc(100% - 2rem), var(--max));
    margin-inline: auto;
}

.narrow {
    max-width: var(--narrow);
}

.section {
    padding: 4rem 0;
}

.section-muted {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--softer);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: rgba(21, 33, 22, 0.92);
    backdrop-filter: blur(12px);
}

.site-header-inner,
.site-footer-inner {
    width: min(calc(100% - 2rem), var(--max));
    margin-inline: auto;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 78px;
}

.site-mark {
    display: grid;
    gap: 0.08rem;
    text-decoration: none;
}

.site-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.site-tagline {
    color: var(--muted);
    font-size: 0.86rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.9rem;
}

.site-nav a {
    padding: 0.42rem 0.62rem;
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a.is-active {
    border-color: var(--line);
    background: var(--soft);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--fg);
    padding: 0.45rem 0.75rem;
}

.hero {
    padding: 5rem 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 2rem;
    align-items: end;
}

h1,
h2,
h3 {
    margin: 0 0 0.75rem;
    line-height: 1.08;
}

h1 {
    max-width: 900px;
    font-size: clamp(2.7rem, 7vw, 6rem);
    letter-spacing: -0.055em;
}

h2 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    letter-spacing: -0.035em;
}

h3 {
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

p {
    margin: 0 0 1rem;
}

.eyebrow,
.section-kicker {
    margin-bottom: 0.65rem;
    color: var(--muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-dek,
.page-dek,
.article-dek,
.lede {
    color: var(--muted);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.45;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.text-link {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.95rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.card {
    min-height: 100%;
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: var(--softer);
    box-shadow: 0 18px 45px var(--shadow);
}

.card h3 a {
    text-decoration: none;
}

.card h3 a:hover {
    text-decoration: underline;
}

.card p {
    color: var(--muted);
}

.featured-card {
    background: rgba(250, 254, 178, 0.1);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    color: var(--muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.85rem;
}

.meta-row span + span::before {
    content: "•";
    margin-right: 0.75rem;
    color: var(--line);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0;
    margin: 1rem 0 0;
    list-style: none;
}

.tag-list li {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.18rem 0.5rem;
    color: var(--muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.75rem;
}

.article-page {
    padding-bottom: 4rem;
}

.article-hero {
    padding: 4.5rem 0 2.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--softer);
}

.article-hero h1 {
    font-size: clamp(2.4rem, 6vw, 5.6rem);
}

.article-meta {
    margin-top: 1.25rem;
}

.article-body {
    max-width: var(--narrow);
    padding-top: 3rem;
    font-size: 1.08rem;
    line-height: 1.78;
}

.article-body h2 {
    margin-top: 2.5rem;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.article-body p,
.article-body ul,
.article-body ol {
    margin-bottom: 1.25rem;
}

.article-body blockquote {
    margin: 2rem 0;
    padding: 0.5rem 0 0.5rem 1.25rem;
    border-left: 4px solid var(--fg);
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1.5;
}

.article-figure {
    margin: 2rem 0;
}

.article-figure.wide {
    width: min(calc(100vw - 2rem), 980px);
    margin-left: 50%;
    transform: translateX(-50%);
}

.figure-placeholder {
    display: grid;
    min-height: 260px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background:
        linear-gradient(135deg, rgba(250, 254, 178, 0.16), rgba(250, 254, 178, 0.035));
    color: var(--muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

figcaption {
    margin-top: 0.65rem;
    color: var(--muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.88rem;
    line-height: 1.45;
}

.footnotes {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.92rem;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.archive-list {
    display: grid;
    gap: 1.2rem;
    margin-top: 2rem;
}

.archive-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 1rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.archive-date {
    color: var(--muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.88rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 2rem 0;
    color: var(--muted);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.9rem;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 850px) {
    .hero-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        align-items: start;
        flex-direction: column;
    }

    h1 {
        font-size: clamp(2.45rem, 14vw, 4.2rem);
    }
}

@media (max-width: 700px) {
    .site-header-inner {
        align-items: start;
        flex-direction: column;
        padding: 1rem 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .js .site-nav {
        display: none;
    }

    .js .site-nav.is-open {
        display: flex;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .archive-item {
        grid-template-columns: 1fr;
    }
}

.empty-state {
    padding: 1.25rem;
    border: 1px dashed var(--line);
    border-radius: 1.1rem;
    background: var(--softer);
    color: var(--muted);
}

.empty-state h2 {
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.empty-state p {
    margin-bottom: 0;
}
