/* Light, paper-like theme matching the report palette. The 3D canvas sits behind the slides. */
@font-face { font-family: "InterVar"; src: url("../assets/fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: block; }
@font-face { font-family: "InterVar"; src: url("../assets/fonts/InterVariable-Italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: block; }

:root {
  --ink: #23313f;
  --muted: #75808c;
  --faint: #c9d0d8;
  --paper: #f6f7f5;
  --card: #ffffff;
  --blue: #446ea8;
  --teal: #199485;
  --amber: #d9843b;
  --sel: #e6661f;
  --fp: #cc1a4d;
  --fn: #1a998f;
  --violet: #6c5bb5;
  --shadow: 0 1px 2px rgba(35, 49, 63, .06), 0 8px 28px rgba(35, 49, 63, .10);
}

html, body { height: 100%; }
html {
  background:
    radial-gradient(1200px 800px at 72% 46%, #ffffff 0%, rgba(255,255,255,0) 70%),
    radial-gradient(900px 700px at 8% 100%, #eef3f6 0%, rgba(238,243,246,0) 70%),
    var(--paper);
}
body {
  margin: 0;
  color: var(--ink);
  font-family: "InterVar", "Inter", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11", "tnum" 0;
  overflow: hidden;
}

#stage {
  position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0;
  transition: opacity .7s ease;
  cursor: grab;
}
#stage:active { cursor: grabbing; }
#stage.stage-hidden { opacity: 0; pointer-events: none; }

.reveal { z-index: 1; font-family: inherit; color: var(--ink); }
/* paper scrim behind the text column, so text stays legible over first-person room views */
.reveal::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(246,247,245,.93) 0%, rgba(246,247,245,.88) 36%, rgba(246,247,245,0) 54%);
}
.reveal .slides { pointer-events: none; text-align: left; }
.reveal-viewport { background: transparent !important; }
.reveal .backgrounds { display: none; }
.reveal .slides section { pointer-events: none; height: 100%; }
.reveal .slides section button, .reveal .slides section a, .reveal .slides section .explore { pointer-events: auto; }
.reveal .controls { color: var(--muted); }
.reveal .progress { height: 3px; color: var(--sel); background: rgba(35,49,63,.06); }
.reveal .slide-number { background: transparent; color: var(--muted); font-size: 14px; right: 28px; bottom: 22px; }

/* ── layout ─────────────────────────────────────────────────────── */
.col { position: absolute; left: 88px; top: 92px; width: 640px; }
.col.wide { width: 1420px; }
.two { display: grid; grid-template-columns: 640px 1fr; gap: 64px; align-items: center; margin-top: 18px; }

/* ── type ───────────────────────────────────────────────────────── */
.eyebrow {
  margin: 0 0 18px; font-size: 15px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--sel);
}
.reveal h1, .reveal h2 { font-family: inherit; color: var(--ink); text-transform: none; text-shadow: none; }
.reveal h1.title { font-size: 76px; line-height: 1.02; font-weight: 680; letter-spacing: -0.035em; margin: 0 0 30px; white-space: nowrap; }
.reveal h2 { font-size: 52px; line-height: 1.08; font-weight: 650; letter-spacing: -0.028em; margin: 0 0 22px; }
.lede { font-size: 25px; line-height: 1.45; color: #46525e; margin: 0 0 20px; }
.lede strong, .lede b { color: var(--ink); font-weight: 620; }
.author { font-size: 22px; font-weight: 560; margin-top: 46px; }
.author .dot { color: var(--sel); margin: 0 6px; }
.hint { position: absolute; top: 700px; font-size: 15px; color: var(--muted); }
.small { font-size: 19px; line-height: 1.5; color: #4d5864; margin: 10px 0; }
.small.block, .block { display: block; }
.small.center { text-align: center; }
.muted { color: var(--muted); font-weight: 400; }
q { quotes: "“" "”"; font-weight: 600; color: var(--ink); }
b { font-weight: 640; }

/* numbered steps that light up as fragments appear */
ol.steps { list-style: none; counter-reset: s; margin: 18px 0 0; padding: 0; }
ol.steps > li {
  counter-increment: s; position: relative; padding: 0 0 0 52px; margin: 0 0 22px;
  font-size: 24px; line-height: 1.45;
}
ol.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 1px; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--faint); color: var(--muted); font-size: 15px; font-weight: 600;
  display: grid; place-items: center; background: var(--card); transition: all .4s ease;
}
ol.steps > li.visible::before { border-color: var(--sel); color: #fff; background: var(--sel); }
ol.steps > li.visible:not(.current-fragment) { color: #5f6b77; }
ol.steps > li.visible:not(.current-fragment)::before { background: #f1c9b0; border-color: #f1c9b0; color: #fff; }

.reveal .fragment { transition: opacity .5s ease, transform .5s ease; transform: translateY(6px); }
.reveal .fragment.visible { transform: none; }

/* math */
.eq { font-size: 27px; margin: 14px 0 6px; }
.eq-inline { display: block; font-size: 24px; margin: 10px 0 4px; }
.katex { font-size: 1.04em; }

/* figures */
.fig { display: block; max-width: 100%; height: auto; margin: 10px 0 6px; }
.fig-block { margin-top: 8px; }

/* result line */
.result { font-size: 26px; margin: 18px 0 4px; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -1px; margin: 0 6px 0 2px; }
.swatch.sel { background: var(--sel); }
.swatch.fp { background: var(--fp); }
.swatch.fn { background: var(--fn); }

/* LLM phrase chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px 8px; margin: 6px 0 12px; }
.chip {
  font-size: 17px; padding: 6px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow);
  color: #34506f; border: 1px solid #e3e8ee; opacity: 0; transform: translateY(6px);
  animation: chipIn .5s ease forwards;
}
.chip.syn { color: var(--blue); }
.chip.desc { color: #5b6672; font-style: italic; }
@keyframes chipIn { to { opacity: 1; transform: none; } }

/* VLM dialogue */
.vlm-card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px 10px; margin-top: 4px; }
.crops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.crops img { width: 100%; height: 112px; object-fit: cover; border-radius: 8px; }
.ask { font-size: 19px; margin: 10px 0 4px; }
.who { display: inline-block; font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); margin-right: 8px; }
.reply { font-size: 22px; font-weight: 700; margin: 0 0 2px; }
.reply.no { color: var(--fp); }
.reply.yes { color: var(--teal); }

/* callout */
.callout { border-left: 4px solid var(--sel); padding: 6px 0 6px 18px; font-size: 24px; line-height: 1.35; }

/* VLM description with bank words highlighted (word-type slide) */
.reveal blockquote.prose {
  width: auto; margin: 14px 0 6px; padding: 16px 20px; background: var(--card); box-shadow: var(--shadow);
  border-radius: 10px; font-size: 21px; line-height: 1.6; color: var(--muted); font-style: normal; text-align: left;
}
.reveal blockquote.prose b { color: var(--teal); font-weight: 650; }
.reveal blockquote.prose::before, .reveal blockquote.prose::after { content: none; }
.caption { font-size: 17px; line-height: 1.4; color: var(--muted); margin: 4px 0 18px; }

/* live numbers from the Gaussian explainer */
.readout { min-height: 30px; margin: 6px 0 0 52px; font-size: 20px; font-variant-numeric: tabular-nums; color: var(--sel); font-weight: 600; }
/* slide 2: once the compositing figure appears, the step list gives it the space */
.col:has(.fig-block.visible) .steps, .col:has(.fig-block.visible) .readout { display: none; }

/* qualitative grid (ScanNet examples): examples as columns, methods as rows */
.reveal h2.tight { margin-bottom: 14px; }
.qgrid { display: grid; grid-template-columns: 130px repeat(5, 210px); gap: 8px 10px; align-items: center; }
.qgrid figure { margin: 0; position: relative; }
.qgrid img { width: 210px; height: 132px; object-fit: cover; border-radius: 8px; display: block; box-shadow: 0 1px 2px rgba(35,49,63,.08); }
.qgrid figcaption { position: absolute; left: 6px; bottom: 6px; font-size: 13px; padding: 2px 8px;
  border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); }
.qgrid figcaption b { color: var(--sel); }
.qgrid figcaption.bad { color: var(--fp); font-weight: 600; }
.qh { font-size: 17px; font-weight: 640; padding-bottom: 2px; }
.ql { font-size: 15px; font-weight: 600; color: var(--muted); line-height: 1.25; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 2px; }
.tag.absent { background: #e7f3f1; color: var(--teal); }
.tag.fail { background: #fbe5ec; color: var(--fp); }

/* image strips (LERF transfer example) */
.two.lerf { grid-template-columns: 700px 1fr; gap: 48px; align-items: start; }
.strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.strip figure { margin: 0; }
.strip img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); display: block; }
.strip figcaption { font-size: 15px; color: var(--muted); margin-top: 6px; }
.strip figcaption b { color: var(--sel); }
ul.plain { list-style: none; padding: 0; margin: 18px 0 0; }
ul.plain li { margin: 0 0 10px; padding-left: 18px; position: relative; }
ul.plain li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--sel); }

/* takeaways */
.take { display: grid; grid-template-columns: 110px 1fr; align-items: baseline; font-size: 26px; padding: 14px 0; border-bottom: 1px solid #e4e8ec; }
.take .k { font-size: 15px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sel); }
.take b { white-space: nowrap; }

/* explore controls */
.explore { margin-top: 34px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.btns button {
  font: inherit; font-size: 16px; padding: 8px 14px; border-radius: 999px; border: 1px solid #dfe4ea;
  background: var(--card); color: var(--ink); cursor: pointer; transition: all .2s ease;
}
.btns button:hover { border-color: var(--sel); }
.btns button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* chapter rail */
#chapters {
  position: fixed; left: 88px; bottom: 30px; z-index: 2; display: flex; gap: 22px;
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #a4adb7; font-weight: 600;
  transition: opacity .5s ease;
}
#chapters span { position: relative; transition: color .4s ease; }
#chapters span.on { color: var(--ink); }
#chapters span.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; background: var(--sel); border-radius: 2px; }
#chapters.off { opacity: 0; }
#byline { position: fixed; right: 30px; top: 26px; z-index: 2; font-size: 13px; color: var(--muted); letter-spacing: .04em; }

#loading {
  position: fixed; right: 30%; top: 48%; z-index: 3; display: flex; gap: 12px; align-items: center;
  color: var(--muted); font-size: 15px; transition: opacity .5s;
}
#loading.done { opacity: 0; pointer-events: none; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--faint); border-top-color: var(--sel); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* speaker view / print: keep figures legible */
@media print { #stage, #chapters, #byline, #loading { display: none; } }
