/* ============================================================
   LATENT SPACE — divijhanda.in
   A research console floating in a model's latent space.
   Display: Unbounded · Body: Instrument Sans · Utility: JetBrains Mono
   ============================================================ */

:root {
    --bg: #060510;              /* the void */
    --ink: #0d0b1a;             /* raised surface tone */
    --surface: rgba(237, 234, 248, 0.028);
    --surface-2: rgba(237, 234, 248, 0.055);
    --border: rgba(237, 234, 248, 0.09);
    --border-strong: rgba(237, 234, 248, 0.18);
    --text: #edeaf8;            /* vapor */
    --muted: #a6a2c0;
    --faint: #7d7899;
    --accent: #8b7cff;          /* ultraviolet — structure, links, focus */
    --accent-soft: rgba(139, 124, 255, 0.13);
    --ember: #ff5c38;           /* reserved: live · now · awards */
    --ember-soft: rgba(255, 92, 56, 0.13);
    --gradient: linear-gradient(120deg, #8b7cff, #c86bff 55%, #ff5c38);
    --code-bg: rgba(237, 234, 248, 0.045);
    --nav-bg: rgba(6, 5, 16, 0.62);

    --font-display: 'Unbounded', 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Instrument Sans', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --maxw: 1200px;
    --pad: clamp(1.2rem, 4vw, 2.4rem);
    --radius: 6px;
    --radius-sm: 4px;
    --shadow: 0 24px 70px -30px rgba(0, 0, 0, 0.8);
    --ease: cubic-bezier(.22, .7, .16, 1);
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    /* no-WebGL fallback atmosphere — the shader paints over this */
    background-image:
        radial-gradient(1200px 700px at 75% -12%, rgba(139, 124, 255, 0.13), transparent 60%),
        radial-gradient(900px 600px at -10% 8%, rgba(90, 60, 200, 0.10), transparent 55%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.1; font-weight: 600; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #0b0817; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(139, 124, 255, 0.22); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 124, 255, 0.4); }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 500;
    background: var(--accent); color: #0b0817; padding: .6rem 1rem;
    font-family: var(--font-mono); font-size: .8rem;
}
.skip-link:focus { left: 0; }

/* scroll locks while the boot overlay or menu is up */
html[data-boot] body, html.menu-open body { overflow: hidden; }

/* ============================================================
   The field — fixed shader canvas + veil + grain
   ============================================================ */
#latent {
    position: fixed; inset: 0; z-index: -2;
    width: 100vw; height: 100vh; height: 100dvh;
    display: block;
}
.veil {
    /* guarantees text contrast over the brightest fog */
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(6, 5, 16, .45), transparent 30%, transparent 72%, rgba(6, 5, 16, .6)),
        radial-gradient(140% 100% at 50% 50%, transparent 40%, rgba(6, 5, 16, .5) 100%);
}
body::after {
    /* film grain — static, cheap */
    content: ''; position: fixed; inset: -50%; z-index: 90; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .045;
    mix-blend-mode: overlay;
}

/* ============================================================
   Boot sequence — first visit each session
   ============================================================ */
#boot {
    position: fixed; inset: 0; z-index: 400; display: none;
    background: #050409; place-items: center;
    transition: opacity .55s ease, visibility .55s;
}
html[data-boot] #boot { display: grid; }
#boot.done { opacity: 0; visibility: hidden; }
/* failsafe: if JS never finishes the sequence, CSS clears the overlay */
html[data-boot] #boot { animation: boot-failsafe 3.2s linear forwards; }
@keyframes boot-failsafe { 0%, 88% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
#boot.done { animation: none; }

.boot-inner { width: min(480px, 84vw); }
.boot-count {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(3.4rem, 10vw, 6.4rem); line-height: 1; color: var(--text);
    font-variant-numeric: tabular-nums;
}
.boot-count::after { content: '%'; font-size: .32em; color: var(--accent); margin-left: .12em; font-weight: 500; }
.boot-bar { height: 1px; background: var(--border); margin: 1.4rem 0 0; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 18px 1px var(--accent); }

/* ============================================================
   Custom cursor — one ring, nothing else
   ============================================================ */
#cur-ring {
    position: fixed; top: 0; left: 0; z-index: 350; pointer-events: none;
    transform: translate(-100px, -100px); will-change: transform;
    display: none;
    width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
    border: 1.5px solid rgba(139, 124, 255, .8);
    place-items: center;
    font-family: var(--font-mono); font-size: .56rem; letter-spacing: .14em;
    text-transform: uppercase; color: var(--text);
    transition: width .28s var(--ease), height .28s var(--ease), margin .28s var(--ease),
                border-color .28s, background-color .28s, opacity .2s;
}
body.has-cursor #cur-ring { display: grid; }
#cur-ring .cur-label { opacity: 0; transition: opacity .2s; }
#cur-ring.on { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: var(--accent); background: rgba(6, 5, 16, .55); backdrop-filter: blur(3px); }
#cur-ring.on .cur-label { opacity: 1; }
#cur-ring.down { width: 20px; height: 20px; margin: -10px 0 0 -10px; }
body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor summary, body.has-cursor label { cursor: none; }
body.has-cursor input, body.has-cursor textarea, body.has-cursor select { cursor: auto; }

@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    transition: background .35s ease, border-color .35s ease, backdrop-filter .35s,
                transform .45s var(--ease);
    border-bottom: 1px solid transparent;
}
.nav.hide { transform: translateY(-102%); }
.nav.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--border);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem var(--pad);
}
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-mono); }
.brand .live-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--ember); flex: none;
    box-shadow: 0 0 0 0 rgba(255, 92, 56, .55); animation: pulse 2.6s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 92, 56, .5); }
    70% { box-shadow: 0 0 0 9px rgba(255, 92, 56, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 92, 56, 0); }
}
.brand-name { font-size: .82rem; letter-spacing: .06em; color: var(--text); }
.brand-role { font-size: .62rem; letter-spacing: .12em; color: var(--faint); text-transform: uppercase; }

.nav-links { display: flex; gap: 1.7rem; align-items: center; }
.nav-links a {
    position: relative; font-family: var(--font-mono); font-size: .72rem;
    letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
    padding: .3rem 0; transition: color .2s;
}
.nav-links a .idx { color: var(--faint); font-size: .85em; margin-right: .35em; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover .idx { color: var(--ember); }
.nav-links a::after {
    content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
    background: var(--accent); transition: right .3s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current='page']::after { right: 0; }
.nav-links a[aria-current='page'] { color: var(--text); }
.nav-links a[aria-current='page'] .idx { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: .8rem; }

/* menu button (mobile) */
.hamburger {
    display: none; width: 42px; height: 42px; border: 1px solid var(--border);
    border-radius: var(--radius); background: rgba(6, 5, 16, .5); cursor: pointer;
    flex-direction: column; gap: 5px; align-items: center; justify-content: center;
    transition: border-color .2s;
}
.hamburger:hover { border-color: var(--border-strong); }
.hamburger span { width: 18px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease), opacity .2s; }
.hamburger[aria-expanded='true'] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* fullscreen menu overlay */
#menu {
    position: fixed; inset: 0; z-index: 150;
    background: rgba(5, 4, 10, .92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    display: flex; flex-direction: column; justify-content: center;
    padding: 6rem var(--pad) 3rem;
    clip-path: circle(0% at calc(100% - 3rem) 2.4rem);
    visibility: hidden;
    transition: clip-path .65s var(--ease), visibility 0s .65s;
}
#menu.open { clip-path: circle(160% at calc(100% - 3rem) 2.4rem); visibility: visible; transition: clip-path .65s var(--ease); }
.menu-links { display: flex; flex-direction: column; gap: .4rem; }
.menu-links a {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2rem, 9vw, 3.6rem); line-height: 1.15; color: var(--muted);
    display: flex; align-items: baseline; gap: 1rem;
    transform: translateY(30px); opacity: 0;
    transition: transform .5s var(--ease), opacity .5s, color .25s;
}
#menu.open .menu-links a { transform: none; opacity: 1; }
#menu.open .menu-links a:nth-child(2) { transition-delay: .06s; }
#menu.open .menu-links a:nth-child(3) { transition-delay: .12s; }
#menu.open .menu-links a:nth-child(4) { transition-delay: .18s; }
.menu-links a .idx { font-family: var(--font-mono); font-size: .8rem; font-weight: 400; color: var(--faint); letter-spacing: .1em; }
.menu-links a:hover, .menu-links a[aria-current='page'] { color: var(--text); }
.menu-links a:hover .idx { color: var(--ember); }
.menu-foot { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 1.2rem; font-family: var(--font-mono); font-size: .74rem; color: var(--faint); }
.menu-foot a { color: var(--muted); letter-spacing: .08em; }
.menu-foot a:hover { color: var(--accent); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    font-family: var(--font-mono); font-weight: 500; font-size: .78rem;
    letter-spacing: .12em; text-transform: uppercase;
    padding: .85rem 1.5rem; border-radius: var(--radius); cursor: pointer;
    border: 1px solid var(--border-strong); background: transparent; color: var(--text);
    position: relative; overflow: hidden;
    transition: color .25s, border-color .25s, background-color .25s, transform .25s var(--ease);
}
.btn-sm { padding: .55rem 1rem; font-size: .68rem; }
.btn-primary { background: var(--text); color: #0b0817; border-color: var(--text); }
.btn-primary::before {
    content: ''; position: absolute; inset: 0; background: var(--ember);
    transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); z-index: 0;
}
.btn-primary:hover::before { transform: scaleX(1); }
.btn-primary:hover { color: #fff; border-color: var(--ember); }
.btn-primary > * , .btn-primary { z-index: 0; }
.btn-primary span, .btn-primary { position: relative; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   Layout primitives
   ============================================================ */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vh, 7rem) var(--pad); position: relative; }
.section.tight { padding-top: clamp(2.5rem, 6vh, 4.5rem); padding-bottom: clamp(2.5rem, 6vh, 4.5rem); }

.eyebrow {
    font-family: var(--font-mono); font-size: .7rem; letter-spacing: .26em;
    text-transform: uppercase; color: var(--accent); margin: 0 0 1rem;
    display: inline-flex; align-items: center; gap: .7rem;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent); }

.section-head { margin-bottom: clamp(1.8rem, 4vh, 3rem); }
.section-head h2 {
    font-family: var(--font-display); font-weight: 500;
    font-size: clamp(1.7rem, 3.6vw, 2.7rem); margin: 0; letter-spacing: -.01em;
}
.section-head p { color: var(--muted); margin: 1rem 0 0; max-width: 62ch; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.section-link {
    font-family: var(--font-mono); font-size: .74rem; letter-spacing: .14em;
    text-transform: uppercase; color: var(--muted);
    border-bottom: 1px solid var(--border-strong); padding-bottom: .2rem;
    transition: color .2s, border-color .2s;
}
.section-link:hover { color: var(--accent); border-color: var(--accent); }

.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.1rem; color: var(--muted); }

/* ============================================================
   Cards / chips (shared)
   ============================================================ */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    transition: border-color .3s, background-color .3s, transform .3s var(--ease);
}
.card:hover { border-color: var(--border-strong); background: var(--surface-2); }

.chip {
    display: inline-flex; align-items: center; gap: .35rem;
    font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em; color: var(--muted);
    padding: .28rem .7rem; border-radius: 999px;
    border: 1px solid var(--border); background: rgba(6, 5, 16, .4);
}
.chip.accent { color: var(--accent); border-color: rgba(139, 124, 255, .35); background: var(--accent-soft); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative; min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center; overflow: hidden;
    padding-top: 4rem;
}
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); width: 100%; }

.hero-status {
    display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 2.2rem;
    padding: .5rem .95rem; border: 1px solid var(--border); border-radius: 999px;
    background: rgba(6, 5, 16, .45); backdrop-filter: blur(8px);
}
.hero-status .dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--ember); flex: none;
    box-shadow: 0 0 0 0 rgba(255, 92, 56, .55); animation: pulse 2.6s infinite;
}

.hero-name {
    font-family: var(--font-display); font-weight: 800; margin: 0;
    font-size: clamp(3.2rem, 12.5vw, 10.4rem);
    line-height: .98; letter-spacing: -.015em; text-transform: uppercase;
    color: var(--text);
}
.hero-name .row { display: block; overflow: hidden; padding: .06em 0; margin: -.06em 0; will-change: transform; }
.footer-wordmark { will-change: transform; }
.hero-name .row-in { display: block; transform: translateY(115%); }
/* masked rise: fires on load, or as the loader lifts; a delayed fallback keeps
   the name visible even if the loader's JS never removes the attribute */
html:not([data-boot]) .hero-name .row-in { animation: rise .95s var(--ease) forwards; }
html:not([data-boot]) .hero-name .row:nth-child(2) .row-in { animation-delay: .12s; }
html[data-boot] .hero-name .row-in { animation: rise .95s var(--ease) 3.4s forwards; }
@keyframes rise { to { transform: none; } }
html.noanim .hero-name .row-in, html:not(.js) .hero-name .row-in { animation: none; transform: none; }
.hero-name .row.ghost {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(237, 234, 248, .55);
    transition: -webkit-text-stroke-color .4s, color .4s;
}
.hero-name .row.ghost:hover { -webkit-text-stroke-color: var(--accent); }
@supports not (-webkit-text-stroke: 1px black) {
    .hero-name .row.ghost { color: var(--muted); }
}

.hero-stream {
    font-family: var(--font-mono); font-size: clamp(.92rem, 2vw, 1.2rem);
    margin: 2rem 0 0; color: var(--text); min-height: 1.7em;
}
.hero-stream .prompt { color: var(--muted); }
.hero-stream .cursor {
    display: inline-block; width: .6ch; background: var(--accent); color: transparent;
    animation: blink 1.05s steps(1) infinite; margin-left: 2px;
}
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.14rem); color: var(--muted); max-width: 54ch; margin: 1.3rem 0 2.4rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

.socials { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 2rem; }
.social-link {
    display: inline-flex; align-items: center; gap: .45rem;
    font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; color: var(--muted);
    padding: .5rem .85rem; border: 1px solid var(--border); border-radius: 999px;
    background: rgba(6, 5, 16, .4);
    transition: color .2s, border-color .2s, transform .25s var(--ease);
}
.social-link:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.social-link svg { width: 13px; height: 13px; flex: none; color: var(--accent); }

.scroll-cue {
    position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); z-index: 2;
    font-family: var(--font-mono); font-size: .62rem; color: var(--faint); letter-spacing: .3em;
    text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.scroll-cue .line { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); animation: drop 2s ease-in-out infinite; }
@keyframes drop {
    0%, 100% { transform: scaleY(.35); opacity: .4; transform-origin: top; }
    50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

/* ============================================================
   Agent-lifecycle pipeline
   ============================================================ */
.lc { position: relative; }
.lc-rail {
    position: relative; display: grid; grid-template-columns: repeat(4, 1fr);
    gap: .6rem; margin-bottom: .6rem;
}
/* progress beam */
.lc-beam { position: relative; height: 2px; background: var(--border); margin: 0 0 1.6rem; overflow: hidden; border-radius: 2px; }
.lc-beam i {
    position: absolute; inset: 0 auto 0 0; width: calc(25% + 75% * var(--p, 0));
    background: var(--gradient); border-radius: 2px;
    box-shadow: 0 0 16px 0 rgba(139, 124, 255, .5);
    transition: width .5s var(--ease);
}

.lc-node {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .45rem;
    padding: 1.1rem 1.2rem 1rem; text-align: left; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    font-family: var(--font-body); color: var(--muted);
    transition: border-color .3s, background-color .3s, color .3s;
}
.lc-node:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.lc-step { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); }
.lc-label { font-weight: 600; font-size: clamp(.9rem, 1.4vw, 1.05rem); line-height: 1.25; color: inherit; }
.lc-count { font-family: var(--font-mono); font-size: .64rem; color: var(--faint); letter-spacing: .06em; }
.lc-node.done { border-color: rgba(139, 124, 255, .3); }
.lc-node.done .lc-step { color: var(--accent); }
.lc-node.active {
    border-color: var(--accent); background: var(--accent-soft); color: var(--text);
    box-shadow: 0 0 0 1px var(--accent), 0 14px 44px -18px rgba(139, 124, 255, .55);
}
.lc-node.active .lc-step { color: var(--accent); }
.lc-node.active .lc-count { color: var(--text); }
.lc-node.active::after {
    content: ''; position: absolute; top: .9rem; right: .9rem;
    width: 7px; height: 7px; border-radius: 50%; background: var(--ember);
    box-shadow: 0 0 10px 1px rgba(255, 92, 56, .7);
}
.lc-node:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.js .lc-panel:not(.active) { display: none; }
.lc-panel {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: rgba(13, 11, 26, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 1.7rem 1.7rem 1rem; position: relative; overflow: hidden;
}
.lc-panel::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--gradient); }
.lc-panel.active { animation: panelin .4s var(--ease); }
.lc-panel + .lc-panel { margin-top: 1rem; }
@keyframes panelin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.lc-panel-head { margin-bottom: 1rem; }
.lc-panel-title { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; margin: 0 0 .3rem; }
.lc-panel-blurb { color: var(--muted); font-size: .93rem; margin: 0; max-width: 70ch; }

.lc-papers { display: flex; flex-direction: column; }
.lc-paper {
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .3rem 1.6rem;
    padding: .9rem .2rem; border-top: 1px solid var(--border);
    transition: padding-left .3s var(--ease), background-color .25s;
}
.lc-paper:hover { padding-left: .9rem; background: rgba(139, 124, 255, .05); }
.lc-paper:hover .lc-paper-title { color: var(--accent); }
.lc-paper-title { font-size: .95rem; font-weight: 500; line-height: 1.4; color: var(--text); transition: color .2s; }
.lc-paper-venue { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; color: var(--muted); text-align: right; max-width: 11rem; }
.ls-empty { color: var(--muted); font-size: .9rem; padding: .8rem 0; }
@media (max-width: 640px) {
    .lc-paper { grid-template-columns: 1fr; }
    .lc-paper-venue { text-align: left; }
}

@media (max-width: 720px) {
    .lc-rail { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Agent-lifecycle — pinned horizontal chapter (home)
   Base = vertical stack; html.fx upgrades to a scroll-driven
   sideways journey with 3D depth.
   ============================================================ */
.lc-h { position: relative; }
.lc-h-sticky { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 6vh, 4.5rem) var(--pad); }
.lc-h-head { margin-bottom: clamp(1.6rem, 3.5vh, 2.6rem); }
.lc-h-head h2 {
    font-family: var(--font-display); font-weight: 500;
    font-size: clamp(1.7rem, 3.6vw, 2.7rem); margin: 0; letter-spacing: -.01em;
}
.lc-h-track { display: flex; flex-direction: column; gap: 1rem; }
.lc-slide {
    position: relative; overflow: hidden;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: rgba(13, 11, 26, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 1.9rem 2rem 1.4rem;
}
.lc-slide::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--gradient); }
.lc-slide-num {
    position: absolute; top: .4rem; right: 1rem; line-height: 1; user-select: none;
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(5rem, 10vw, 9rem); color: rgba(237, 234, 248, .05);
}
.lc-slide-step {
    font-family: var(--font-mono); font-size: .68rem; letter-spacing: .2em;
    text-transform: uppercase; color: var(--accent); margin: 0 0 .7rem;
}
.lc-slide-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 2.2vw, 1.9rem); margin: 0 0 .6rem; }
.lc-slide-blurb { color: var(--muted); font-size: .95rem; margin: 0 0 1.1rem; max-width: 56ch; }

.lc-h-progress { display: none; height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: clamp(1.6rem, 3.5vh, 2.6rem); }
.lc-h-progress i { display: block; height: 100%; width: calc(100% * var(--p, 0)); background: var(--gradient); box-shadow: 0 0 14px 0 rgba(139, 124, 255, .5); }

/* --- upgraded: pin + sideways travel --- */
html.fx .lc-h { height: 310vh; }
html.fx .lc-h-sticky {
    position: sticky; top: 0; height: 100vh; max-width: none;
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden; padding: 0;
}
html.fx .lc-h-head, html.fx .lc-h-progress {
    width: 100%; max-width: var(--maxw); margin-left: auto; margin-right: auto;
    padding-left: var(--pad); padding-right: var(--pad);
}
html.fx .lc-h-progress { display: block; }
html.fx .lc-h-track {
    flex-direction: row; align-items: stretch; gap: 3vw;
    width: max-content; padding: 0 calc(var(--pad) + 2vw);
    will-change: transform;
    perspective: 1400px;
}
html.fx .lc-slide { width: min(56vw, 700px); flex: none; will-change: transform; }
html.fx .lc-slide .lc-papers { min-height: 8.5rem; }

/* ============================================================
   Publications — editorial index rows
   ============================================================ */
.pub {
    position: relative; display: grid; grid-template-columns: 4.2rem 1fr; gap: 1.4rem;
    padding: 1.7rem .6rem; border-top: 1px solid var(--border);
    transition: background-color .3s;
}
.pub:last-child { border-bottom: 1px solid var(--border); }
.pub::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, var(--accent-soft), transparent 70%);
    transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.pub:hover::before { transform: scaleX(1); }
.pub-index {
    font-family: var(--font-mono); color: var(--faint); font-size: .72rem;
    letter-spacing: .1em; padding-top: .45rem; transition: color .3s;
}
.pub:hover .pub-index { color: var(--ember); }
.pub-body { min-width: 0; }
.pub h3 { font-size: clamp(1.1rem, 2vw, 1.45rem); margin: 0 0 .5rem; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.pub-title-link { transition: color .25s; }
.pub:hover .pub-title-link { color: var(--accent); }
.pub-title-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.pub-links, .pub-abstract { position: relative; z-index: 2; }
.pub .authors { color: var(--muted); font-size: .9rem; margin: 0 0 .45rem; }
.pub .authors .me { color: var(--text); font-weight: 600; }
.pub .venue { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; color: var(--accent); display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0; }
.pub .venue .kind { color: var(--faint); text-transform: uppercase; font-size: .64rem; letter-spacing: .12em; }
.venue-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    font-family: var(--font-mono); font-size: .68rem; letter-spacing: .05em;
    padding: .24rem .7rem; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(139, 124, 255, .3);
}
.venue-pill .tick { color: var(--accent); }
.venue-pill.preprint { background: transparent; color: var(--faint); border-color: var(--border); }
.badge {
    display: inline-block; font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase;
    letter-spacing: .14em; padding: .18rem .55rem; border-radius: 3px; margin-left: .6rem;
    vertical-align: middle;
    background: var(--ember-soft); color: var(--ember); border: 1px solid rgba(255, 92, 56, .35);
}
.pub-tldr { font-size: .92rem; color: var(--text); margin: .6rem 0 0; line-height: 1.55; max-width: 78ch; }
.pub-tldr .tldr-label {
    font-family: var(--font-mono); font-size: .58rem; font-weight: 500; letter-spacing: .14em;
    color: var(--accent); border: 1px solid rgba(139, 124, 255, .3); background: var(--accent-soft);
    border-radius: 3px; padding: .1rem .4rem; margin-right: .5rem; vertical-align: .12em; text-transform: uppercase;
}
.pub-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; align-items: center; }
.pub-links a, .pub-toggle {
    font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); padding: .32rem .7rem; border: 1px solid var(--border); border-radius: 3px;
    background: rgba(6, 5, 16, .4); cursor: pointer; transition: color .2s, border-color .2s;
}
.pub-links a:hover, .pub-toggle:hover { color: var(--accent); border-color: var(--accent); }
.pub-abstract {
    margin-top: 1rem; padding: 1rem 1.2rem; border-left: 2px solid var(--accent);
    background: var(--code-bg); border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--muted); font-size: .92rem; display: none;
}
.pub-abstract.open { display: block; animation: panelin .3s var(--ease); }
.pub-abstract pre { white-space: pre-wrap; font-family: var(--font-mono); font-size: .74rem; margin: .4rem 0 0; color: var(--text); }

/* ============================================================
   Publications page — year ledger
   ============================================================ */
.filterbar { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 2.4rem; }
.filterbar a {
    font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); padding: .45rem .95rem; border: 1px solid var(--border); border-radius: 999px;
    background: rgba(6, 5, 16, .4); transition: color .2s, border-color .2s, background-color .2s;
}
.filterbar a:hover { color: var(--text); border-color: var(--border-strong); }
.filterbar a.active { color: #0b0817; background: var(--accent); border-color: var(--accent); }

.year-group { display: grid; grid-template-columns: 190px 1fr; gap: 1.5rem; margin-bottom: 3.5rem; align-items: start; }
.year-label {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1; margin: 1.2rem 0 0;
    color: var(--text);
    position: sticky; top: 6rem; user-select: none;
}
.year-rows { min-width: 0; }
@media (max-width: 880px) {
    .year-group { grid-template-columns: 1fr; gap: .4rem; }
    .year-label { position: static; font-size: 1.8rem; }
}

/* ============================================================
   News
   ============================================================ */
.news-list {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: rgba(13, 11, 26, .55); backdrop-filter: blur(8px); padding: .4rem 0; overflow: hidden;
}
.news-item { display: flex; gap: 1.6rem; padding: .85rem 1.5rem; align-items: baseline; }
.news-item + .news-item { border-top: 1px solid var(--border); }
.news-item:hover { background: rgba(139, 124, 255, .05); }
.news-date { font-family: var(--font-mono); font-size: .74rem; color: var(--accent); flex: none; width: 5.5rem; letter-spacing: .04em; }
.news-content { color: var(--text); font-size: .96rem; }
.news-content a { border-bottom: 1px solid rgba(139, 124, 255, .4); transition: color .2s, border-color .2s; }
.news-content a:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   Experience
   ============================================================ */
.timeline { position: relative; }
.exp { padding: 1.7rem .4rem; border-top: 1px solid var(--border); }
.exp:last-child { border-bottom: 1px solid var(--border); }
.exp-head { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.exp-company { font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; color: var(--text); }
.exp-now {
    font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--ember); border: 1px solid rgba(255, 92, 56, .4); background: var(--ember-soft);
    border-radius: 999px; padding: .2rem .6rem;
}
.exp-date { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; color: var(--muted); margin-left: auto; }
.exp-title { color: var(--accent); font-size: .95rem; font-weight: 500; margin: .35rem 0 .55rem; }
.exp-desc { color: var(--muted); font-size: .98rem; margin: 0; max-width: 72ch; }
@media (max-width: 720px) {
    .exp { padding: 1.4rem .2rem; }
    .exp-date { margin-left: 0; width: 100%; }
}

/* ============================================================
   Research areas
   ============================================================ */
.area-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .8rem; }
.area-card { position: relative; overflow: hidden; padding: 1.6rem 1.5rem 1.5rem; }
.area-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: var(--gradient); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.area-card:hover::before { transform: scaleX(1); }
.area-mark { width: 9px; height: 9px; background: var(--accent); display: block; margin-bottom: 1.1rem; transition: background-color .3s, transform .3s var(--ease); }
.area-card:hover .area-mark { background: var(--ember); transform: rotate(45deg); }
.area-card h3 { font-size: 1.12rem; margin: 0 0 .55rem; font-weight: 600; }
.area-card p { color: var(--muted); margin: 0; font-size: .93rem; }

/* ============================================================
   Page header (interior pages)
   ============================================================ */
.page-head { padding: clamp(8rem, 16vh, 11rem) var(--pad) 0; max-width: var(--maxw); margin: 0 auto; }
.page-head h1 {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2.6rem, 7.5vw, 5.4rem); margin: .6rem 0 0;
    letter-spacing: -.01em; line-height: 1.02; text-transform: uppercase;
}
.page-head p { color: var(--muted); margin: 1.4rem 0 0; max-width: 62ch; font-size: 1.05rem; }

/* ============================================================
   Publication detail
   ============================================================ */
.page-head h1.pub-title { text-transform: none; font-size: clamp(1.9rem, 4.6vw, 3.4rem); font-weight: 500; line-height: 1.12; }
.pub-detail-authors { color: var(--muted); font-size: 1rem; margin: 1.2rem 0 0; max-width: 72ch; }
.pub-detail-authors .me { color: var(--text); font-weight: 600; }
.pub-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.2rem; }
.detail-h { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; margin: 0 0 1rem; }
.detail-h .pub-toggle { font-size: .6rem; vertical-align: middle; margin-left: .6rem; }
.bibtex-block {
    font-family: var(--font-mono); font-size: .76rem; color: var(--text);
    background: var(--code-bg); border: 1px solid var(--border); border-left: 2px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0; padding: 1.1rem 1.2rem; overflow-x: auto; white-space: pre;
}
.detail-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2.2rem; }
.detail-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2.4rem; }
.pub-figure { border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 2.4rem; }

.prose { max-width: 72ch; color: var(--muted); font-size: 1.02rem; line-height: 1.85; }
.prose p { margin: 0 0 1.1rem; }

/* ---- long-form paper pages (Publication.body) ---- */
.pub-longform { margin-top: 2.8rem; }
.pub-longform h2 {
    font-family: var(--font-display); font-weight: 500; font-size: 1.45rem;
    margin: 3rem 0 1rem; letter-spacing: -.01em;
}
.pub-longform h2::before { content: ''; display: block; width: 26px; height: 2px;
    background: var(--gradient); margin-bottom: .8rem; }
.pub-longform h3 { font-size: 1.05rem; font-weight: 600; margin: 1.8rem 0 .6rem; color: var(--text); }
.pub-longform p { max-width: 76ch; color: var(--muted); font-size: 1rem; line-height: 1.8; margin: 0 0 1.1rem; }
.pub-longform p strong { color: var(--text); }
.pub-longform ul { max-width: 76ch; color: var(--muted); line-height: 1.75; padding-left: 1.2rem; margin: 0 0 1.2rem; }
.pub-longform li { margin-bottom: .5rem; }
.pub-longform li::marker { color: var(--accent); }
.pub-longform a { color: var(--accent); border-bottom: 1px solid rgba(139, 124, 255, .35); }
.pub-longform a:hover { border-color: var(--accent); }
.pub-longform code {
    font-family: var(--font-mono); font-size: .84em; color: var(--text);
    background: var(--code-bg); border: 1px solid var(--border);
    border-radius: 4px; padding: .08em .35em; white-space: nowrap;
}

.pub-longform .stats { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 .6rem; }
.pub-longform .stat {
    flex: 1 1 190px; min-width: 170px; padding: 1rem 1.2rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: rgba(13, 11, 26, .55); backdrop-filter: blur(6px);
}
.pub-longform .stat b {
    display: block; font-family: var(--font-display); font-weight: 500;
    font-size: 1.5rem; color: var(--accent); letter-spacing: -.01em;
}
.pub-longform .stat.ember b { color: var(--ember); }
.pub-longform .stat span {
    font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em;
    text-transform: uppercase; color: var(--faint); line-height: 1.5; display: block; margin-top: .3rem;
}

.pub-longform figure {
    margin: 1.8rem 0; padding: 1.4rem; border: 1px solid var(--border);
    border-radius: var(--radius); background: rgba(13, 11, 26, .55);
    backdrop-filter: blur(6px); overflow-x: auto;
}
.pub-longform figure svg { display: block; width: 100%; height: auto; min-width: 620px; }
.pub-longform figcaption {
    font-family: var(--font-mono); font-size: .72rem; color: var(--faint);
    letter-spacing: .04em; margin-top: 1rem; line-height: 1.6; max-width: none;
}

.pub-longform .tablewrap { overflow-x: auto; border: 1px solid var(--border);
    border-radius: var(--radius); background: rgba(13, 11, 26, .55); margin: 1.6rem 0; }
.pub-longform table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.pub-longform th, .pub-longform td { padding: .65rem .95rem; text-align: left;
    border-bottom: 1px solid var(--border); white-space: nowrap; }
.pub-longform thead th { font-family: var(--font-mono); font-size: .62rem; text-transform: uppercase;
    letter-spacing: .12em; color: var(--accent); background: rgba(6, 5, 16, .6); }
.pub-longform tbody tr:last-child td { border-bottom: none; }
.pub-longform td:first-child { color: var(--text); font-weight: 500; }
.pub-longform tr.hl td { background: var(--accent-soft); color: var(--text); }
.pub-longform td.up { color: #34d399; }
.pub-longform td.down { color: var(--ember); }
.pub-longform .pub-note { font-family: var(--font-mono); font-size: .74rem; color: var(--faint);
    border-left: 2px solid var(--ember); padding: .3rem 0 .3rem .9rem; margin-top: 2rem; }
.pub-longform .pub-dim { color: var(--faint); }
.pub-longform .hf-link {
    display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.1rem;
    font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; color: var(--text);
    background: rgba(255, 210, 30, .07); border: 1px solid rgba(255, 210, 30, .3);
    border-radius: 6px; padding: .55rem 1rem;
    transition: border-color .2s, background-color .2s;
}
.pub-longform .hf-link:hover { border-color: rgba(255, 210, 30, .7); background: rgba(255, 210, 30, .12); }
.pub-longform .lead-note { color: var(--faint); font-size: .82rem; font-family: var(--font-mono); margin-top: .8rem; }
.pub-longform td.rank { color: var(--faint); font-family: var(--font-mono); width: 2rem; }
.pub-longform td.avg { color: var(--accent); font-weight: 600; }

/* ============================================================
   Contact
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); }
.contact-row { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; color: var(--muted); font-family: var(--font-mono); font-size: .85rem; }
.contact-row svg { color: var(--accent); flex: none; width: 16px; height: 16px; }
.contact-row a:hover { color: var(--accent); }

.field {
    width: 100%; padding: 1rem 0; margin-bottom: 1.4rem;
    border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0;
    background: transparent; color: var(--text);
    font-family: var(--font-body); font-size: 1.05rem;
    transition: border-color .25s;
}
.field::placeholder { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.field:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
textarea.field { min-height: 140px; resize: vertical; }

.form-note {
    padding: .9rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.4rem; font-size: .92rem;
    border: 1px solid rgba(139, 124, 255, .3); background: var(--accent-soft); color: var(--text);
    font-family: var(--font-mono); font-size: .8rem;
}
.form-note.success { border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .1); }
.field-error { color: var(--ember); font-size: .74rem; font-family: var(--font-mono); margin: -1rem 0 1.2rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================
   ElectionBench (private) — restyled on the same console system
   ============================================================ */
.eb-gate { max-width: 460px; margin: 3.5rem auto; }
.eb-lock { text-align: center; padding: 2.6rem 2rem; }
.eb-lock-icon { font-size: 1.8rem; line-height: 1; }
.eb-lock h1 { font-size: 1.4rem; margin: .8rem 0 .3rem; font-family: var(--font-display); font-weight: 500; }
.eb-lock > p { color: var(--muted); margin: 0 0 1.4rem; }
.eb-lock form { display: flex; flex-direction: column; gap: 1rem; }
.eb-lock .field-error { margin: -.4rem 0 .2rem; }
.eb-lock .field { text-align: center; }

.eb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.2rem; }
.eb-updated { font-family: var(--font-mono); font-size: .72rem; color: var(--faint); letter-spacing: .04em; }

.eb-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(13, 11, 26, .6); backdrop-filter: blur(8px); }
.eb-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.eb-table th, .eb-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.eb-table thead th {
    font-family: var(--font-mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .12em;
    color: var(--accent); background: rgba(6, 5, 16, .6); position: sticky; top: 0;
}
.eb-table tbody tr:last-child td { border-bottom: none; }
.eb-table tbody tr:hover { background: var(--accent-soft); }
.eb-table td:first-child { font-weight: 600; color: var(--text); }
.eb-note { color: var(--muted); font-size: .88rem; margin: .8rem 0 0; }
.eb-hint { font-family: var(--font-mono); font-size: .68rem; color: var(--faint); letter-spacing: .04em; }

.eb-th-sort { cursor: pointer; user-select: none; transition: color .15s; }
.eb-th-sort:hover { color: var(--text); }
.eb-table th[data-dir]::after { content: ' ▲'; font-size: .7em; opacity: .8; }
.eb-table th[data-dir='desc']::after { content: ' ▼'; }

.eb-picker { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin: 1rem 0 1.4rem; }
.eb-select {
    width: auto; min-width: 200px; margin: 0; cursor: pointer;
    border: 1px solid var(--border-strong); border-radius: var(--radius);
    padding: .7rem .9rem; background-color: var(--bg); color: var(--text);
    font-family: var(--font-mono); font-size: .8rem;
}
.eb-select option { background-color: var(--bg); color: var(--text); }
.eb-vs { font-family: var(--font-mono); color: var(--faint); }
.eb-h2h-summary {
    display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.2rem;
    border: 1px solid var(--border); border-left: 2px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0; background: var(--code-bg);
}
.eb-score { font-size: 1.15rem; }
.eb-h2h-meta { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
.eb-games .eb-game-row { cursor: pointer; }
.eb-games .eb-game-row:hover { background: var(--accent-soft); }
.eb-open { color: var(--accent); font-family: var(--font-mono); font-size: .72rem; white-space: nowrap; }
.eb-transcript-wrap { margin-top: 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.eb-transcript-head {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .7rem 1rem; background: rgba(6, 5, 16, .6); border-bottom: 1px solid var(--border);
    font-family: var(--font-mono); font-size: .76rem; color: var(--accent);
}
.eb-transcript { margin: 0; padding: 1.1rem; max-height: 560px; overflow: auto; white-space: pre-wrap;
    font-family: var(--font-mono); font-size: .76rem; line-height: 1.6; color: var(--text); background: var(--bg); }

.eb-game-title { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin: .5rem 0 0; letter-spacing: -.01em; font-family: var(--font-display); font-weight: 500; }
.eb-game-title .eb-vs { color: var(--faint); font-family: var(--font-mono); font-size: .5em; margin: 0 .4rem; }
.eb-setup {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .1rem 1.6rem;
    margin: 1.6rem 0 .5rem; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.1rem 1.3rem; background: rgba(13, 11, 26, .55); backdrop-filter: blur(8px);
}
.eb-setup > div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.eb-setup .k { font-family: var(--font-mono); font-size: .64rem; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; }
.eb-setup .v { font-size: .86rem; color: var(--text); text-align: right; }

.eb-timeline { margin-top: 1rem; border-left: 2px solid var(--border); padding-left: 1.2rem; }
.eb-tl-day { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); letter-spacing: .16em; margin: 2rem 0 .7rem; text-transform: uppercase; }
.eb-tl-action { font-size: .9rem; color: var(--text); margin: .3rem 0; line-height: 1.55; }
.eb-tl-env { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); margin: .5rem 0; padding: .4rem .7rem; background: var(--code-bg); border-radius: var(--radius-sm); }

.eb-call { margin: .5rem 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.eb-call.cand { border-color: rgba(139, 124, 255, .35); background: var(--accent-soft); }
.eb-call > summary { cursor: pointer; padding: .6rem .9rem; font-family: var(--font-mono); font-size: .76rem; display: flex; align-items: center; gap: .5rem; list-style: none; }
.eb-call > summary::-webkit-details-marker { display: none; }
.eb-call > summary::before { content: '▸'; color: var(--accent); transition: transform .15s; }
.eb-call[open] > summary::before { transform: rotate(90deg); }
.eb-call-kind { color: var(--accent); font-weight: 600; }
.eb-tag { font-size: .62rem; padding: .06rem .5rem; border-radius: 3px; border: 1px solid var(--border); color: var(--muted); background: var(--bg); font-family: var(--font-mono); letter-spacing: .06em; }
.eb-call-body { padding: 0 .9rem .9rem; }
.eb-io-label { font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin: .7rem 0 .3rem; }
.eb-io { margin: 0; padding: .75rem .9rem; white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto;
    font-family: var(--font-mono); font-size: .74rem; line-height: 1.55; color: var(--text);
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.eb-io.resp { border-left: 2px solid var(--accent); }

/* ---- ElectionBench game page: chat-style campaign view ---- */
.ebc-page { max-width: min(1760px, 100%); }
.ebc-topbar { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 2.2rem; }
.ebc-title {
    font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em;
    font-size: clamp(1.7rem, 4vw, 2.8rem); margin: 0; line-height: 1.15;
}
.ebc-cand-a { color: var(--accent); }
.ebc-cand-b { color: var(--ember); }
.ebc-vs { font-family: var(--font-mono); font-size: .45em; color: var(--faint); margin: 0 .5rem; text-transform: uppercase; letter-spacing: .2em; }
.ebc-sub { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin: .6rem 0 0; letter-spacing: .04em; }
.ebc-dim { color: var(--faint); font-weight: 400; }
.ebc-result { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 0; }
.eb-setup .ebc-span { grid-column: 1 / -1; }

.ebc-systems { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.ebc-sys { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.ebc-sys > summary { display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: .55rem .9rem;
    font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted); list-style: none; user-select: none; transition: background-color .2s, color .2s; }
.ebc-sys > summary::-webkit-details-marker { display: none; }
.ebc-sys > summary::before { content: '▸'; display: inline-block; flex: none; font-size: 1.05rem;
    line-height: 1; color: var(--accent); transition: transform .2s var(--ease); }
.ebc-sys[open] > summary::before { transform: rotate(90deg); }
.ebc-sys.b > summary::before { color: var(--ember); }
.ebc-sys > summary:hover { background: rgba(139, 124, 255, .08); color: var(--text); }
.ebc-sys pre { margin: 0; padding: .8rem .9rem; white-space: pre-wrap; word-break: break-word;
    font-family: var(--font-mono); font-size: .74rem; line-height: 1.55; color: var(--muted);
    border-top: 1px solid var(--border); }

/* day sections */
.ebc-day { margin-top: clamp(2.6rem, 6vh, 4rem); }
.ebc-day-head { position: relative; display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.4rem;
    border-bottom: 1px solid var(--border); padding-bottom: .7rem; }
.ebc-day-num {
    font-family: var(--font-display); font-weight: 800; line-height: 1; user-select: none;
    font-size: clamp(2.2rem, 5vw, 3.4rem); color: rgba(237, 234, 248, .08);
}
.ebc-day-head h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 1.9rem); margin: 0; }

/* parallel columns — the two candidates act side by side within a day */
.ebc-mid { display: flex; flex-direction: column; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.ebc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: start; }
.ebc-col { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.ebc-col-head {
    display: flex; align-items: baseline; gap: .7rem; padding: .45rem .2rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono); font-size: .74rem; letter-spacing: .04em;
    position: sticky; top: 3.6rem; background: rgba(6, 5, 16, .82);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 5;
}
.ebc-col-head .ebc-name { font-weight: 600; }
.col-a .ebc-col-head .ebc-name { color: var(--accent); }
.col-b .ebc-col-head .ebc-name { color: var(--ember); }
.ebc-col .ebc-bubble, .ebc-col .ebc-event { max-width: 100%; width: 100%; }
.col-a > .ebc-bubble { border-left: 3px solid var(--accent); border-top-left-radius: 4px;
    background: linear-gradient(90deg, rgba(139, 124, 255, .07), rgba(13, 11, 26, .7) 45%); }
.col-b > .ebc-bubble { border-left: 3px solid var(--ember); border-top-left-radius: 4px;
    background: linear-gradient(90deg, rgba(255, 92, 56, .07), rgba(13, 11, 26, .7) 45%); }
.col-a > .ebc-event { border-left: 2px solid rgba(139, 124, 255, .5); }
.col-b > .ebc-event { border-left: 2px solid rgba(255, 92, 56, .5); }
.col-b .ebc-action::before { color: var(--ember); }
.col-b .ebc-name { color: var(--ember); }

/* the chat flow (final debate) */
.ebc-chat { display: flex; flex-direction: column; gap: .9rem; }
.ebc-msg { display: flex; }
.ebc-msg.side-a { justify-content: flex-start; }
.ebc-msg.side-b { justify-content: flex-end; }
.ebc-msg.side-mid { justify-content: center; }

.ebc-bubble {
    max-width: min(72ch, 92%);
    background: rgba(13, 11, 26, .7); border: 1px solid var(--border); border-radius: 12px;
    padding: 1rem 1.2rem;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.side-a .ebc-bubble { border-left: 3px solid var(--accent); border-top-left-radius: 4px;
    background: linear-gradient(90deg, rgba(139, 124, 255, .07), rgba(13, 11, 26, .7) 45%); }
.side-b .ebc-bubble { border-right: 3px solid var(--ember); border-top-right-radius: 4px;
    background: linear-gradient(270deg, rgba(255, 92, 56, .07), rgba(13, 11, 26, .7) 45%); }

.ebc-who { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .6rem;
    font-family: var(--font-mono); font-size: .76rem; letter-spacing: .04em; }
.ebc-name { font-weight: 600; }
.side-a .ebc-name { color: var(--accent); }
.side-b .ebc-name { color: var(--ember); }
.ebc-slot { color: var(--faint); font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; }

.ebc-prose { font-size: 1rem; line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }
.ebc-prose + .ebc-action, .ebc-prose + .ebc-tool { margin-top: .85rem; }

.ebc-action { position: relative; margin: 0; padding: .9rem 1rem .8rem; white-space: pre-wrap; word-break: break-word;
    font-family: var(--font-mono); font-size: .8rem; line-height: 1.55; color: var(--text);
    background: rgba(6, 5, 16, .55); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ebc-action::before { content: 'action'; display: block; font-size: .6rem; letter-spacing: .2em;
    text-transform: uppercase; color: var(--accent); margin-bottom: .45rem; }
.side-b .ebc-action::before { color: var(--ember); }

/* tool calls — the model's chosen function, rendered as a card */
.ebc-tool { margin-top: .6rem; padding: .75rem .95rem; background: rgba(6, 5, 16, .55);
    border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ebc-tool + .ebc-tool { margin-top: .5rem; }
.ebc-tool-name { display: block; font-family: var(--font-mono); font-size: .82rem; font-weight: 600;
    letter-spacing: .04em; color: var(--accent); }
.col-b .ebc-tool-name, .side-b .ebc-tool-name { color: var(--ember); }
.ebc-tool pre { margin: .4rem 0 0; white-space: pre-wrap; word-break: break-word;
    font-family: var(--font-mono); font-size: .8rem; line-height: 1.6; color: var(--text); }

/* collapsible boxes (prompt / thinking) — unmistakable click targets */
.ebc-think, .ebc-prompt {
    margin: 0 0 .7rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: rgba(6, 5, 16, .35); overflow: hidden;
}
.ebc-think { border-left: 2px solid rgba(139, 124, 255, .5); }
.col-b .ebc-think, .side-b .ebc-think { border-left-color: rgba(255, 92, 56, .5); }
.ebc-think > summary, .ebc-prompt > summary {
    display: flex; align-items: center; gap: .6rem; padding: .55rem .85rem;
    cursor: pointer; list-style: none; user-select: none;
    font-family: var(--font-mono); font-size: .7rem;
    letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
    transition: background-color .2s, color .2s;
}
.ebc-think > summary::-webkit-details-marker, .ebc-prompt > summary::-webkit-details-marker { display: none; }
.ebc-think > summary::before, .ebc-prompt > summary::before {
    content: '▸'; display: inline-block; flex: none;
    font-size: 1.05rem; line-height: 1; color: var(--accent);
    transition: transform .2s var(--ease);
}
.col-b .ebc-think > summary::before, .col-b .ebc-prompt > summary::before,
.side-b .ebc-think > summary::before, .side-b .ebc-prompt > summary::before { color: var(--ember); }
.ebc-think[open] > summary::before, .ebc-prompt[open] > summary::before { transform: rotate(90deg); }
.ebc-think > summary:hover, .ebc-prompt > summary:hover { background: rgba(139, 124, 255, .08); color: var(--text); }
.ebc-think pre, .ebc-prompt pre { margin: 0; padding: .8rem .95rem; white-space: pre-wrap; word-break: break-word;
    max-height: 340px; overflow: auto; font-family: var(--font-mono); font-size: .78rem; line-height: 1.55;
    color: var(--muted); background: rgba(6, 5, 16, .3); border-top: 1px solid var(--border); }

/* environment-confirmed events */
.ebc-event { max-width: min(62ch, 88%); padding: .6rem .95rem; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: rgba(6, 5, 16, .4); font-size: .92rem; color: var(--muted); }
.side-a .ebc-event { border-left: 2px solid rgba(139, 124, 255, .5); }
.side-b .ebc-event { border-right: 2px solid rgba(255, 92, 56, .5); text-align: right; }
.side-mid .ebc-event { text-align: center; }
.ebc-event-kind { display: block; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .18em;
    text-transform: uppercase; color: var(--faint); margin-bottom: .25rem; }
.ebc-event-text { overflow-wrap: anywhere; }
.ebc-event details > summary { cursor: pointer; list-style: none; user-select: none; }
.ebc-event details > summary::-webkit-details-marker { display: none; }
.ebc-event details > summary::before { content: '▸'; display: inline-block; margin-right: .5rem;
    font-size: 1rem; line-height: 1; color: var(--accent); }
.side-b .ebc-event details > summary::before, .col-b .ebc-event details > summary::before { color: var(--ember); }
.ebc-event details > summary:hover { color: var(--text); }
.ebc-event details[open] > summary { display: none; }
.ebc-other { max-width: min(62ch, 88%); border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); padding: .5rem .9rem; font-family: var(--font-mono); font-size: .74rem; color: var(--muted); }
.ebc-other > summary { display: flex; align-items: center; gap: .55rem; cursor: pointer; list-style: none; user-select: none; }
.ebc-other > summary::-webkit-details-marker { display: none; }
.ebc-other > summary::before { content: '▸'; display: inline-block; flex: none; font-size: 1rem;
    line-height: 1; color: var(--accent); transition: transform .2s var(--ease); }
.ebc-other[open] > summary::before { transform: rotate(90deg); }
.ebc-other > summary:hover { color: var(--text); }

/* final debate */
.ebc-debate { margin-top: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius);
    background: rgba(13, 11, 26, .45); padding: 1.4rem 1.4rem 1.6rem; position: relative; overflow: hidden; }
.ebc-debate::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--gradient); }
.ebc-debate-head { margin-bottom: 1.2rem; }
.ebc-debate-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; margin: 0 0 .2rem; }
.ebc-debate-head p { margin: 0; font-size: .84rem; }

/* end-of-day stats */
.ebc-env { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem 1.4rem;
    margin-top: 1.3rem; padding: .7rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.ebc-env-label { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.ebc-stat { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-mono); font-size: .74rem; color: var(--muted); }
.ebc-stat i { width: 8px; height: 8px; border-radius: 2px; }
.ebc-stat i.a { background: var(--accent); }
.ebc-stat i.b { background: var(--ember); }

@media (max-width: 900px) {
    .ebc-cols { grid-template-columns: 1fr; }
    .ebc-col-head { position: static; }
}
@media (max-width: 720px) {
    .ebc-bubble, .ebc-event { max-width: 100%; }
    .ebc-topbar { flex-direction: column; gap: .5rem; }
}

/* ============================================================
   Empty states
   ============================================================ */
.empty-state {
    text-align: center; padding: 4rem 1rem; color: var(--faint);
    border: 1px dashed var(--border-strong); border-radius: var(--radius);
    font-family: var(--font-mono); font-size: .84rem;
}

/* ============================================================
   Footer
   ============================================================ */
.footer { position: relative; z-index: 2; margin-top: clamp(4rem, 10vh, 8rem); border-top: 1px solid var(--border);
    background: linear-gradient(rgba(6, 5, 16, .2), rgba(6, 5, 16, .85)); overflow: hidden; }
.footer-cta { max-width: var(--maxw); margin: 0 auto; padding: clamp(3.5rem, 9vh, 6.5rem) var(--pad) 1rem; }
.footer-cta .eyebrow { display: flex; color: var(--muted); }
.footer-cta .eyebrow::before { background: var(--ember); }
.cta-link {
    display: inline-block; font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2.4rem, 7.5vw, 5.6rem); line-height: 1.05; letter-spacing: -.01em;
    text-transform: uppercase; color: var(--text); transition: color .3s;
}
.cta-link .arrow { display: inline-block; transition: transform .35s var(--ease); color: var(--ember); }
.cta-link:hover { color: var(--accent); }
.cta-link:hover .arrow { transform: translate(.12em, -.12em); }

.footer-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 2.6rem var(--pad) 1.5rem;
    display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: flex-start; justify-content: space-between;
}
.footer-brand { display: flex; flex-direction: column; gap: .2rem; }
.footer-brand .brand-name { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .06em; }
.footer-tag { font-family: var(--font-mono); font-size: .68rem; color: var(--faint); letter-spacing: .08em; }
.footer-socials { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; max-width: 560px; }
.footer-socials a {
    display: inline-flex; align-items: center; gap: .45rem;
    font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); transition: color .2s; padding: .3rem 0;
}
.footer-socials a svg { width: 12px; height: 12px; flex: none; color: var(--accent); }
.footer-socials a:hover { color: var(--accent); }
.footer-note {
    max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) 1rem;
    font-family: var(--font-mono); font-size: .64rem; letter-spacing: .1em; color: var(--faint);
}
.footer-wordmark {
    display: block; text-align: center; user-select: none; pointer-events: none;
    font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
    font-size: min(10vw, 11.5rem); line-height: .8; letter-spacing: -.01em;
    white-space: nowrap; margin: 1.6rem 0 -.16em;
    color: transparent; -webkit-text-stroke: 1.5px rgba(139, 124, 255, .18);
}
@supports not (-webkit-text-stroke: 1px black) { .footer-wordmark { color: rgba(139, 124, 255, .08); } }

/* ============================================================
   404
   ============================================================ */
.notfound {
    min-height: 82vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 1.1rem; padding: 6rem 1.5rem 3rem; position: relative; z-index: 2;
}
.notfound .code {
    font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 22vw, 14rem);
    line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(139, 124, 255, .5);
}
@supports not (-webkit-text-stroke: 1px black) { .notfound .code { color: var(--accent); } }
.notfound h1 { font-family: var(--font-mono); font-weight: 500; font-size: clamp(.95rem, 2.4vw, 1.25rem); letter-spacing: .1em; margin: 0; }
.notfound .lead { font-size: .95rem; max-width: 46ch; margin: 0 0 1rem; }

/* ============================================================
   Reveal system
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.noanim .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
/* ============================================================
   Title morph — letters fly between headings while scrolling.
   The heading itself stays as a hollow outline (the "border")
   that the arriving letters fill back to solid.
   ============================================================ */
.m-ghost, .m-ghost * {
    color: transparent !important;
    -webkit-text-stroke: 1.2px rgba(237, 234, 248, .5) !important;
}
.hero-name.m-ghost, .hero-name.m-ghost * { -webkit-text-stroke-width: 1.5px !important; }
@supports not (-webkit-text-stroke: 1px black) {
    .m-ghost, .m-ghost * { color: rgba(237, 234, 248, .25) !important; }
}
#morph { position: fixed; inset: 0; z-index: 140; pointer-events: none; display: none; }
#morph span {
    position: absolute; left: 0; top: 0; display: inline-block;
    font-family: var(--font-display); line-height: normal; white-space: pre;
    transform-origin: 50% 50%; will-change: transform, opacity;
}

.reveal[data-delay='1'] { transition-delay: .07s; }
.reveal[data-delay='2'] { transition-delay: .14s; }
.reveal[data-delay='3'] { transition-delay: .21s; }
.reveal[data-delay='4'] { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .hero-name .row-in { animation: none !important; transform: none !important; }
    #boot { display: none !important; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .brand-role { display: none; }
    .pub { grid-template-columns: 1fr; gap: .4rem; padding: 1.4rem .3rem; }
    .pub-index { padding-top: 0; }
    .footer-wordmark { -webkit-text-stroke-width: 1px; }
    .scroll-cue { display: none; }
    .hero { padding-top: 5.5rem; }
}
