/* ---------- Tokens ---------- */
:root {
  --bg: #fbfaf7;
  --bg-elev: #ffffff;
  --text: #1a2130;
  --text-2: #4d5566;
  --text-3: #7c8494;
  --line: #e6e3dc;
  --accent: #203a64;       /* navy, from the CV */
  --accent-soft: #e7ecf5;
  --warm: #aa690a;         /* ochre, from the CV */
  --warm-soft: #f6ead6;
  --grid: rgba(32, 58, 100, 0.06);
  --shadow: 0 1px 2px rgba(20, 30, 50, .04), 0 8px 24px rgba(20, 30, 50, .06);
  --chart-grid: rgba(90, 100, 118, .28);
  --chart-tick: rgba(90, 100, 118, .55);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 880px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1119;
    --bg-elev: #141a25;
    --text: #e5e8ee;
    --text-2: #a9b0bd;
    --text-3: #7a8291;
    --line: #232b39;
    --accent: #93b4ea;
    --accent-soft: #1a2436;
    --warm: #e3a651;
    --warm-soft: #2b2112;
    --grid: rgba(147, 180, 234, 0.05);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --chart-grid: rgba(190, 200, 218, .30);
    --chart-tick: rgba(190, 200, 218, .60);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1119;
  --bg-elev: #141a25;
  --text: #e5e8ee;
  --text-2: #a9b0bd;
  --text-3: #7a8291;
  --line: #232b39;
  --accent: #93b4ea;
  --accent-soft: #1a2436;
  --warm: #e3a651;
  --warm-soft: #2b2112;
  --grid: rgba(147, 180, 234, 0.05);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --chart-grid: rgba(190, 200, 218, .30);
  --chart-tick: rgba(190, 200, 218, .60);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s, color .2s;
}

a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 2px; border-radius: 4px; }

main, .nav-inner, .footer { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { font-weight: 600; font-size: 15.5px; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--warm); }
.nav-links { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.nav-links a { color: var(--text-2); }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-links a.active { box-shadow: inset 0 -2px 0 var(--warm); }

.theme-toggle {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--text-2);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .theme-toggle { margin-left: auto; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 180px;
  grid-template-areas:
    "text portrait"
    "forecast forecast"
    "bio bio";
  column-gap: 40px;
  padding-top: 64px;
}
.hero-text { grid-area: text; align-self: center; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  line-height: 1.1; letter-spacing: -.025em; font-weight: 700;
  margin: 0 0 14px;
}
.tagline { font-size: 1.12rem; color: var(--text-2); margin: 0 0 20px; max-width: 34em; }

.socials { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; }
.socials a {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--bg-elev);
  color: var(--text-2); transition: color .15s, border-color .15s, transform .15s;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.socials svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.portrait { grid-area: portrait; margin: 0; }
.portrait img {
  width: 180px; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 14px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.forecast {
  grid-area: forecast; margin: 40px 0 8px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px 10px; box-shadow: var(--shadow);
}
.forecast canvas { display: block; width: 100%; height: 150px; }
.forecast figcaption {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-top: 6px;
}
.lg { display: inline-block; width: 16px; height: 0; margin-right: 6px; vertical-align: middle; }
.lg-obs { border-top: 2px solid var(--accent); }
.lg-med { border-top: 2px dashed var(--warm); }
.lg-band { height: 9px; background: var(--warm); opacity: .25; border-radius: 2px; }

.bio { grid-area: bio; margin-top: 28px; }
.bio p { margin: 0 0 1em; color: var(--text); }

@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "portrait" "text" "forecast" "bio";
    padding-top: 36px;
  }
  .portrait img { width: 120px; margin-bottom: 20px; }
}

/* ---------- Chips / tags / badges ---------- */
.chips, .tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.chips li {
  font-size: 13px; padding: 4px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.tags { margin-top: 10px; }
.tags li {
  font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 5px;
  border: 1px solid var(--line); color: var(--text-3);
}
.badge {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  padding: 2px 9px; border-radius: 5px; letter-spacing: .02em;
}
.badge-strong { background: var(--accent); color: var(--bg); }
.badge-accent { background: var(--warm-soft); color: var(--warm); }

/* ---------- Sections ---------- */
section { padding-top: 64px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head .section-title { margin: 0; }
.section-title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-weight: 500; font-size: 1.15rem;
  letter-spacing: -.01em; margin: 0 0 22px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-head .section-title { flex: 1; }
/* Small sparkline glyph as section marker */
.st-mark {
  width: 22px; height: 14px; flex: none;
  background: var(--warm);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14'%3E%3Cpath d='M1 11 5 7l3 3 5-7 3 4 5-5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14'%3E%3Cpath d='M1 11 5 7l3 3 5-7 3 4 5-5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- News ---------- */
.news { list-style: none; padding: 0; margin: 0; }
.news li {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.news li:last-child { border-bottom: 0; }
.news time { font-family: var(--mono); font-size: 13px; color: var(--text-3); padding-top: 2px; }
.news p { margin: 0; }
.hl { background: var(--warm-soft); color: var(--warm); padding: 0 5px; border-radius: 4px; font-weight: 600; }
@media (max-width: 520px) { .news li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Publications ---------- */
.pub {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden;
}
.pub-media { background: var(--bg); padding: 20px 22px; border-bottom: 1px solid var(--line); }

/* Feature comparison (TiRex / Chronos-2 / TiRex-2) */
.cmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cmp-col { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg-elev); }
.cmp-hl { border-color: color-mix(in srgb, var(--c-future) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-future) 9%, transparent); }
.cmp-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; margin-bottom: 8px; }
.cmp-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.cmp-params { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.cmp ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.cmp li { display: flex; align-items: center; gap: 9px; padding: 6px 9px; font-size: 13.5px; border-radius: 7px; border: 1px solid transparent; }
.cmp-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.cmp-label { flex: 1; }
.cmp-mark { width: 15px; height: 15px; flex: none; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cmp li.yes {
  color: var(--text);
  background: color-mix(in srgb, var(--c-future) 11%, var(--bg-elev));
  border-color: color-mix(in srgb, var(--c-future) 26%, transparent);
}
.cmp li.yes .cmp-mark { stroke: var(--c-future); }
.cmp li.no {
  color: var(--text-3);
  background: color-mix(in srgb, var(--c-block) 9%, var(--bg-elev));
  border-color: color-mix(in srgb, var(--c-block) 20%, transparent);
}
.cmp li.no .cmp-mark { stroke: var(--c-block); opacity: .9; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .cmp { grid-template-columns: 1fr; } }
.pub-body { padding: 20px 22px 22px; }
.pub-venue { display: flex; gap: 6px; margin-bottom: 10px; }
.pub-title { font-size: 1.12rem; line-height: 1.4; font-weight: 600; margin: 0 0 6px; letter-spacing: -.01em; }
.pub-emoji { display: inline-block; width: 22px; height: 22px; vertical-align: -4px; margin-right: 4px; }
.pub-authors { font-size: 14px; color: var(--text-2); margin: 0 0 10px; }
.pub-authors .me { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--warm); text-underline-offset: 3px; }
.pub-summary { font-size: 15px; margin: 0 0 14px; }
.pub-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .03em;
  display: inline-flex; align-items: center;
  padding: 5px 11px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  transition: color .15s, border-color .15s, background .15s;
}
.btn:hover, .btn[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.btn[aria-expanded="true"] { background: var(--accent-soft); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-size: 13.5px; padding: 9px 16px; }
.btn-primary:hover { color: var(--bg); opacity: .9; }

.pub-panel {
  position: relative; margin-top: 14px; padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; color: var(--text-2);
}
.pub-panel p { margin: 0; }
.pub-panel pre {
  margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.55;
  overflow-x: auto; color: var(--text);
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--text-2); cursor: pointer;
}
.copy-btn:hover { color: var(--accent); }
.footnote { font-size: 13px; color: var(--text-3); margin: 14px 2px 0; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--line);
}
.timeline > li { position: relative; padding: 0 0 26px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: -22px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline > li:first-child::before { background: var(--warm); border-color: var(--warm); box-shadow: 0 0 0 4px var(--warm-soft); }
.tl-date { font-family: var(--mono); font-size: 12px; color: var(--text-3); letter-spacing: .03em; text-transform: uppercase; }
.tl-role { font-size: 1.02rem; font-weight: 600; margin: 2px 0 0; }
.tl-org { font-size: 14px; color: var(--accent); margin: 0; }
.tl-org .sep { color: var(--text-3); margin: 0 3px; }
.tl-desc { font-size: 14.5px; color: var(--text-2); margin: 6px 0 0; max-width: 44em; }

#exp-list > .extra { display: none; }
#exp-list.show-all > .extra { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--text-3); user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 32px; height: 18px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-elev); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--warm); outline-offset: 2px; }

/* ---------- Contact / footer ---------- */
.contact-text { margin: 0 0 16px; color: var(--text-2); max-width: 36em; }
.footer {
  margin-top: 80px; padding-top: 22px; padding-bottom: 36px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-3);
}
.footer p { margin: 0 0 4px; }

/* ---------- Variate-type colors (match the paper's figures) ---------- */
:root {
  --c-target: #b0357f;
  --c-past: #b07a12;
  --c-future: #2f8a45;
  --c-block: #c83a3a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --c-target: #e77bbd; --c-past: #e2b04e; --c-future: #6fce86; --c-block: #f07171; }
}
:root[data-theme="dark"] { --c-target: #e77bbd; --c-past: #e2b04e; --c-future: #6fce86; --c-block: #f07171; }

/* ---------- Blog tiles ---------- */
.posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .posts { grid-template-columns: 1fr; } }
.post-card {
  display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; color: var(--text);
  transition: transform .18s ease, border-color .18s ease;
}
.post-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent); }
.post-thumb { border-bottom: 1px solid var(--line); background: var(--bg); aspect-ratio: 16 / 7; }
.post-thumb svg { display: block; width: 100%; height: 100%; }
.post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); letter-spacing: .02em; margin-bottom: 6px; }
.post-title { font-size: 1.05rem; line-height: 1.35; font-weight: 600; margin: 0 0 8px; letter-spacing: -.01em; }
.post-card:hover .post-title { color: var(--accent); }
.post-excerpt { font-size: 14px; color: var(--text-2); margin: 0; flex: 1; }
.post-more { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: 12px; }
.post-more::after { content: " →"; transition: margin .15s; }
.post-card:hover .post-more::after { margin-left: 4px; }

/* Thumbnail strokes */
.th-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.th-tok { stroke-width: 1.5; }
.hero-links { display: flex; gap: 8px; margin-top: 14px; }

/* ---------- Easter eggs ---------- */
.forecast { position: relative; }
.egg-dino { position: absolute; left: 0; top: 0; width: 38px; height: auto; pointer-events: none; z-index: 2; will-change: transform; }
.forecast { user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.pub-emoji { cursor: pointer; transform-origin: 50% 100%; }
.pub-emoji.jump { animation: dino-jump .6s cubic-bezier(.3, .7, .4, 1); }
@keyframes dino-jump {
  0%   { transform: translateY(0) scale(1, 1); }
  15%  { transform: translateY(0) scale(1.15, .85); }
  45%  { transform: translateY(-16px) scale(.95, 1.08) rotate(-8deg); }
  75%  { transform: translateY(0) scale(1.1, .9); }
  100% { transform: translateY(0) scale(1, 1); }
}
@media (prefers-reduced-motion: reduce) { .pub-emoji.jump { animation: none; } }
.egg-runner { position: fixed; z-index: 50; height: auto; pointer-events: none; will-change: transform; }
.footer a { color: var(--text-3); text-decoration: underline; text-underline-offset: 2px; }
.footer a:hover { color: var(--accent); }

/* ---------- Mobile menu ---------- */
.menu-toggle {
  display: none; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--text-2); cursor: pointer;
}
.menu-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (max-width: 640px) {
  .menu-toggle { display: grid; margin-left: auto; }
  .theme-toggle { margin-left: 0; }
  .nav-links {
    display: none; position: absolute; top: 56px; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 6px 20px 12px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 11px 0; font-size: 15.5px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.active { box-shadow: none; color: var(--accent); }
}

/* ---------- Comparison: compact matrix on phones ---------- */
.cmp-matrix { display: none; width: calc(100% + 8px); table-layout: fixed; border-collapse: separate; border-spacing: 4px; margin: -4px; }
.cmp-matrix thead th:first-child { width: 36%; }
.cmp-matrix th { font-weight: 400; text-align: left; font-size: 13px; color: var(--text); padding: 0 2px; }
.cmp-matrix thead th { text-align: center; vertical-align: bottom; padding-bottom: 4px; }
.cmp-matrix thead .cmp-name { display: block; font-size: 12.5px; font-weight: 700; white-space: nowrap; letter-spacing: -.01em; }
.cmp-matrix thead .cmp-params { display: block; font-size: 9.5px; }
.cmp-matrix thead th.cmp-hl-col .cmp-name { color: var(--c-future); }
.cmp-matrix td { text-align: center; height: 32px; border-radius: 7px; border: 1px solid transparent; }
.cmp-matrix td svg { width: 15px; height: 15px; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.cmp-matrix td.yes { background: color-mix(in srgb, var(--c-future) 11%, var(--bg-elev)); border-color: color-mix(in srgb, var(--c-future) 26%, transparent); }
.cmp-matrix td.yes svg { stroke: var(--c-future); }
.cmp-matrix td.no { background: color-mix(in srgb, var(--c-block) 9%, var(--bg-elev)); border-color: color-mix(in srgb, var(--c-block) 20%, transparent); }
.cmp-matrix td.no svg { stroke: var(--c-block); opacity: .9; }
@media (max-width: 640px) {
  .cmp { display: none; }
  .cmp-matrix { display: table; }
  .pub-media { padding: 14px 12px; }
}

/* Publications: stacked cards (driven by scroll position in main.js) */
.cmp-stack .cmp-col { position: relative; will-change: transform; transform-origin: center center; box-shadow: 0 4px 16px rgba(0,0,0,.10); }
.cmp-stack .cmp-col:nth-child(1) { z-index: 3; }
.cmp-stack .cmp-col:nth-child(2) { z-index: 2; }
.cmp-stack .cmp-col:nth-child(3) { z-index: 1; }

/* Hero: NeurIPS oral badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: -6px 0 18px;
  padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 13px; color: var(--text-2);
  background: var(--warm-soft); border: 1px solid color-mix(in srgb, var(--warm) 35%, transparent);
  transition: border-color .15s, transform .15s;
}
.hero-badge:hover { text-decoration: none; border-color: var(--warm); transform: translateY(-1px); }
.hero-badge strong { color: var(--warm); font-weight: 650; }
.hero-badge svg { width: 15px; height: 15px; flex: none; fill: var(--warm); }
@media (max-width: 900px) { .hero-badge .hb-more { display: none; } }

/* ---------- Timelines: scroll-driven progress (classes set in main.js) ---------- */
.timeline.tl-anim::after {
  content: ""; position: absolute; left: 4px; top: 8px; width: 1px;
  height: calc((100% - 16px) * var(--tl-progress, 0));
  background: var(--warm); box-shadow: 0 0 6px color-mix(in srgb, var(--warm) 60%, transparent);
}
.timeline.tl-anim > li::before,
.timeline.tl-anim > li:first-child::before {
  background: var(--bg); border-color: var(--accent); box-shadow: none;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
  z-index: 1;
}
.timeline.tl-anim > li.reached::before {
  background: var(--warm); border-color: var(--warm);
  box-shadow: 0 0 0 3px var(--warm-soft);
}
.timeline.tl-anim > li.current::before {
  transform: scale(1.25);
  box-shadow: 0 0 0 4px var(--warm-soft), 0 0 12px color-mix(in srgb, var(--warm) 70%, transparent);
}
.timeline.tl-anim > li .tl-desc,
.timeline.tl-anim > li .tags {
  max-height: 0; margin-top: 0; overflow: hidden; opacity: 0; transform: translateY(4px);
  transition: max-height .5s ease, margin-top .5s ease, opacity .4s ease .1s, transform .4s ease .1s;
}
.timeline.tl-anim > li.reached .tl-desc { max-height: 16em; margin-top: 6px; opacity: 1; transform: none; }
.timeline.tl-anim > li.reached .tags { max-height: 6em; margin-top: 10px; opacity: 1; transform: none; }
.timeline.tl-anim > li { padding-bottom: 20px; transition: padding-bottom .5s ease; }
.timeline.tl-anim > li.reached { padding-bottom: 26px; }
.timeline.tl-anim > li:last-child { padding-bottom: 0; }
.timeline.tl-anim > li .tl-role { transition: color .25s ease; }
.timeline.tl-anim > li.current .tl-role { color: var(--text); }
