:root {
    --paper: #101215;
    --paper-deep: #0b0d0f;
    --card: #181b20;
    --ink: #e1e7ec;
    --ink-soft: #9aa2ac;
    --ink-faint: #66707b;
    --line: #2b3038;
    --line-dark: #515c68;
    --accent: #b89be0;
    --teal: #8fbcab;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
}

::selection {
    background: #d9775733;
    color: var(--ink);
}

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

@keyframes line-draw {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes boil {
    0%, 24.9% { opacity: 1; }
    25%, 100% { opacity: 0; }
}

/* ── Top bar ── */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 1.1rem 2rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.topbar strong { color: var(--ink); font-weight: normal; }
.topbar .topbar-right { color: var(--ink-faint); }

/* ── Hero ── */
.hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem 3.5rem;
}

.hero-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: 'Playfair Display', 'Anthropic Serif', serif;
    font-weight: bold;
    font-size: clamp(2.5rem, 7vw, 4.6rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    max-width: 13em;
}

.hero h1 .highlight  { color: var(--accent); }
.hero h1 .highlight2 { color: var(--teal); font-style: italic; }

.hero-lede {
    font-size: 0.95rem;
    color: var(--ink-soft);
    max-width: 560px;
    margin-top: 1.75rem;
    line-height: 1.85;
}

.hero-lede strong { color: var(--ink); font-weight: normal; border-bottom: 1px solid var(--accent); }

.hero-eyebrow,
.hero h1,
.hero-lede,
.hero-stats {
    opacity: 0;
    animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero h1     { animation-delay: 0.1s; }
.hero-lede   { animation-delay: 0.3s; }
.hero-stats  { animation-delay: 0.4s; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 3.25rem;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line);
}

.stat {
    padding: 1.4rem 1.5rem 1.4rem 0;
    border-left: 1px solid var(--line);
    padding-left: 1.5rem;
}

.stat:first-child { border-left: none; padding-left: 0; }

.stat-num {
    font-family: 'Playfair Display', 'Anthropic Serif', serif;
    font-weight: bold;
    font-size: 2.1rem;
    line-height: 1.1;
    color: var(--ink);
}

.stat-num.accent { color: var(--teal); }

.stat-label {
    font-size: 0.65rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.35rem;
}

/* ── Section scaffolding ── */
.section {
    padding: 4.5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    border-bottom: 1px solid var(--line-dark);
    padding-bottom: 1rem;
    margin-bottom: 2.25rem;
}

.section-no {
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    white-space: nowrap;
}

.section h2 {
    font-family: 'Playfair Display', 'Anthropic Serif', serif;
    font-weight: bold;
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    line-height: 1.15;
}

/* ── Entry cards ── */
.entry-card {
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    background: var(--card);
    border: 1px solid var(--line);
    cursor: pointer;
    transition: border-color 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.entry-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    box-shadow: -4px 0 0 var(--accent);
}

.entry-card h3 {
    font-family: 'Playfair Display', 'Anthropic Serif', serif;
    font-weight: bold;
    font-size: 1.25rem;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.entry-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.7rem;
    color: var(--ink-faint);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entry-meta .model {
    color: var(--accent);
}

.entry-meta .reasoning {
    color: var(--teal);
}

.entry-blurb {
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--ink-soft);
}

.entry-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.7rem;
}

.entry-tag {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    border: 1px solid var(--line);
    padding: 0.2rem 0.55rem;
}

/* ── Detail page ── */
.detail {
    opacity: 0;
    animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.detail .back {
    display: inline-block;
    color: var(--ink-faint);
    cursor: pointer;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.detail .back:hover { color: var(--accent); }

.detail h1 {
    font-family: 'Playfair Display', 'Anthropic Serif', serif;
    font-weight: bold;
    font-size: 2rem;
    line-height: 1.15;
    margin-bottom: 0.5rem;
}

.detail .meta {
    display: flex;
    gap: 1.25rem;
    font-size: 0.72rem;
    color: var(--ink-faint);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail .meta .model { color: var(--accent); }
.detail .meta .reasoning { color: var(--teal); }

.detail .desc {
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--ink-soft);
    margin-bottom: 1.5rem;
}

.detail .highlights {
    margin-bottom: 1.5rem;
}

.detail .highlights h3 {
    font-size: 0.65rem;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.detail .highlights ul {
    list-style: none;
    padding: 0;
}

.detail .highlights li {
    padding: 0.3rem 0 0.3rem 1.2rem;
    position: relative;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.detail .highlights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.detail .actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

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

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

.btn-secondary {
    background: transparent;
    color: var(--ink-soft);
    border-color: var(--line);
}

.btn-secondary:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* ── Empty / loading ── */
.empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--ink-faint);
}

.empty h2 {
    font-family: 'Playfair Display', 'Anthropic Serif', serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--ink-soft);
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--line-dark);
    max-width: 1100px;
    margin: 2rem auto 0;
    padding: 1.5rem 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--ink-faint);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ── Intro overlay ── */
#intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--paper-deep);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#intro-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#intro-overlay .intro-content {
    text-align: center;
    opacity: 0;
    animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#intro-overlay .intro-content h1 {
    font-family: 'Playfair Display', 'Anthropic Serif', serif;
    font-weight: bold;
    font-size: clamp(2.5rem, 7vw, 4.6rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
}

#intro-overlay .intro-content h1 .highlight {
    color: var(--accent);
}

#intro-overlay .intro-content .intro-sub {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-top: 0.75rem;
}

#intro-overlay .intro-content .intro-dots {
    display: inline-block;
    animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

#intro-skip {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    color: var(--ink-faint);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10000;
}

#intro-skip:hover { color: var(--accent); }

#main-content {
    opacity: 0;
    transition: opacity 0.8s ease 0.2s;
}

#main-content.visible {
    opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 760px) {
    .hero-stats { grid-template-columns: 1fr; border-bottom: none; }
    .stat { border-left: none; padding-left: 0; border-bottom: 1px solid var(--line); }
    .stat:last-child { border-bottom: none; }
}

@media (max-width: 640px) {
    .hero { padding: 3.5rem 1.25rem 2.5rem; }
    .section { padding: 3rem 1.25rem; }
    .topbar { padding: 1rem 1.25rem; }
    .footer { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    #intro-overlay .intro-content { opacity: 1; }
}

/* ── Notice Banner ── */
.notice-banner {
    background: #20130e;
    border-top: 1px solid #f97316;
    border-bottom: 1px solid #f97316;
    color: #fdba74;
    padding: 0.8rem 2rem;
    font-size: 0.72rem;
    text-align: center;
    line-height: 1.5;
    letter-spacing: 0.05em;
    font-weight: 500;
}
