@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500&family=Inter:wght@300;400;600&family=STIX+Two+Text:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* ---------- Base ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}

body {
  margin: 0;
  background-color: #fdfaf4;
  color: #131920;
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  padding: 60px 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #131920;
  text-decoration: underline;
  text-decoration-color: #c6bba0;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: #131920;
}

hr {
  border: 0;
  height: 1px;
  background-color: #d9d2bd;
  margin: 36px 0;
}

/* ---------- Layout ---------- */

.main {
  max-width: 900px;
  margin: 0 auto;
}

/* ---------- Hero (centered) ---------- */

header {
  text-align: center;
  margin-bottom: 8px;
}

.hero-title {
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0 0 30px 0;
}

.hero-subtitle {
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  color: #444;
  margin: 0 0 20px 0;
}

.authors {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.affiliation {
  display: block;
  color: #666;
  font-size: 14px;
  margin-top: 4px;
}

.cornell-affiliation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 10px;
  line-height: 1;
}
/* Wordmark cap height matches the 16px author line (wordmark image is 2367x414). */
.cornell-affiliation .cornell-seal { width: 25px; height: auto; display: block; }
.cornell-affiliation .cornell-name { width: 140px; height: auto; display: block; }

.review-note {
  display: block;
  color: #888;
  font-size: 14px;
  font-style: italic;
  margin-top: 6px;
}

/* ---------- Quick links ---------- */

.quick-links {
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  margin: 24px 0 8px 0;
}

.quick-links a {
  margin: 0 11px;
  text-decoration: none;
  color: #131920;
  border-bottom: 1.5px solid #c6bba0;
  padding-bottom: 2px;
}

.quick-links a:hover {
  border-bottom-color: #131920;
}

/* ---------- Author name links + equal-contribution note ---------- */

.authors a {
  color: #131920;
  text-decoration: none;
}

.authors a:hover {
  color: #B31B1B; /* Cornell red */
}

.authors sup {
  font-size: 0.68em;
  color: #888;
  font-weight: 600;
}

.author-note {
  display: block;
  color: #777;
  font-size: 16px;
  margin-top: 2px;
}

.author-note sup {
  color: #888;
}

/* Venue sits under the footnote but is not one — the accent keeps it from
   reading as a third line of fine print after two greyed-out ones. */
.venue {
  display: block;
  margin-top: 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

/* ---------- Resource buttons (paper / arXiv / code) ---------- */

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 18px 0 34px 0;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px 0 15px;
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: #131920;
  text-decoration: none;
  background: #efece4;
  border-radius: 10px;
  transition: transform .16s ease, box-shadow .16s ease, color .16s ease;
}
.hero-link:hover {
  color: #B31B1B;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(40, 32, 16, 0.14);
}
.hero-link .quick-icon-img {
  width: 18px; height: 18px; display: block; flex: 0 0 auto; object-fit: contain;
}
.hero-link:hover .quick-icon-img {
  filter: brightness(0) saturate(100%) invert(16%) sepia(82%) saturate(3356%) hue-rotate(345deg) brightness(88%) contrast(96%);
}
@media (max-width: 700px) {
  .hero-links { gap: 10px; }
  .hero-link { min-height: 38px; padding: 0 16px 0 12px; }
}

/* ---------- BibTeX block ---------- */

.bibtex-code {
  position: relative;
  background: #efece4;
  color: #131920;
  border: 0;
  border-radius: 12px;
  padding: 20px 110px 20px 22px;
  margin: 20px auto 0;
  font-size: 14px;
  box-sizing: border-box;
}
.bibtex-code pre {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  margin: 0;
}
.bibtex-code code {
  font-family: 'Roboto Mono', 'Courier New', Courier, monospace;
  line-height: 1.65;
  color: #131920;
}
.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: #131920;
  background: #fdfaf4;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, color .16s ease;
}
.copy-btn:hover {
  color: #B31B1B;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(40, 32, 16, 0.14);
}
.copy-btn.copied { color: #4f9d5d; }
@media (max-width: 700px) {
  .bibtex-code { padding: 56px 16px 18px; }
}

/* ---------- Section headers (no underline bar) ---------- */

.tagline {
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #000;
  text-align: center;
  margin: 48px 0 12px 0;
}

.subheader {
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  font-size: 20px;
  margin: 34px 0 10px 0;
}

.stat-line {
  font-size: 16px;
  margin: 6px 0 14px 0;
}

/* ---------- Body text ---------- */

.section p {
  margin: 14px 0;
  text-align: left;
}

/* The abstract is a single narrow column of running prose — the one block on
   the page where justification reads as typeset rather than as ragged gaps. */
#abstract p {
  text-align: justify;
  hyphens: auto;
}

.section ul {
  margin: 14px 0;
  padding-left: 22px;
}

.section li {
  margin: 8px 0;
}

.section em {
  font-style: italic;
}

.section strong {
  font-weight: 600;
}

/* ---------- Figures ---------- */

.figure {
  margin: 28px 0 12px 0;
}

.figure img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.figure-caption {
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #555;
  margin: 10px 0 0 0;
  text-align: left;
}

.teaser-caption {
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  text-align: left;
  margin: 16px 0 0 0;
}

/* ---------- Math ---------- */

/* Single-letter variables are italic; multi-letter subscripts
   (base, ref, task, PPS) and operators stay upright, matching
   standard math typesetting.
   STIX Two Text is the web-friendly serif companion of STIX Two Math —
   visually the closest free webfont to LaTeX's Computer Modern /
   Latin Modern Math, with proper italic Greek letters and serif Latin
   italics. Falls back to LaTeX-installed Latin Modern → Cambria Math →
   Georgia → Times. */
.math {
  font-family: 'STIX Two Text', 'Latin Modern Math', 'Cambria Math', Georgia, 'Times New Roman', serif;
}

.math .var,
.equation .var {
  font-style: italic;
}

.math sub,
.equation sub {
  font-style: normal;
}

/* Display equation: set like a paper equation on the page background, no
   callout box, so it does not compete with the rounded cards of the method
   figure above it. */
.equation {
  font-family: 'STIX Two Text', 'Latin Modern Math', 'Cambria Math', Georgia, 'Times New Roman', serif;
  font-size: 20px;
  text-align: center;
  margin: 26px 0 22px;
  padding: 0 10px;
  overflow-x: auto;
}

/* ---------- Analysis figure grid (2 × 2, equal height) ---------- */

.figure-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 32px;
  align-items: stretch;
  margin: 22px 0 12px 0;
}
@media (max-width: 640px) { .figure-row { grid-template-columns: 1fr; } }

.figure-row > figure {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.figure-row .analysis-fig {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
}

.figure-row .figure-caption {
  text-align: left;
}

/* ---------- Results video grid (N x 2) ---------- */

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 22px 0 12px 0;
}

.result-item {
  margin: 0;
  display: block;
}

.result-video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #1b1b1b;
  display: block;
  border-radius: 10px;
}

.result-caption {
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  text-align: left;
  color: #555;
  margin: 8px 0 0 0;
}

@media (max-width: 700px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Hero video custom controls (no native panel) ---------- */

.hero-video {
  /* Sizing context for .hero-captions, so cue text scales with the video. */
  container-type: inline-size;
  position: relative;
  display: block;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}

.hero-video > video {
  width: 100%;
  display: block;
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 12px 14px;
  /* No background panel — buttons + bar carry their own contrast. */
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  z-index: 3;
}

.hero-video:hover .hero-controls {
  opacity: 1;
  pointer-events: auto;
}

/* Keyboard focus reveals the bar too, but deliberately NOT :focus-within:
   clicking a control leaves it focused, which kept the bar up after the
   pointer left until you clicked elsewhere. A mouse click sets :focus but
   not :focus-visible, so this matches Tab navigation only. Kept as its own
   rule so a browser that cannot parse :has() still gets the :hover rule. */
.hero-video:has(:focus-visible) .hero-controls {
  opacity: 1;
  pointer-events: auto;
}

.hero-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(27, 27, 27, 0.78);
  color: #fdfaf4;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
}

.hero-btn:hover {
  background: rgba(27, 27, 27, 0.95);
}

.hero-btn:active {
  transform: scale(0.94);
}

.hero-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
}

/* Play/pause icon swap — driven by .is-playing on the parent control bar. */
.hero-play .icon-pause { display: none; }
.hero-play .icon-play  { display: block; }
.hero-controls.is-playing .hero-play .icon-pause { display: block; }
.hero-controls.is-playing .hero-play .icon-play  { display: none; }

/* Mute icon mirrors the cross-modality speaker toggle — slash when muted,
   sound-waves when on. */
.hero-mute .speaker-waves { display: none; }
.hero-mute .speaker-slash { display: block; }
.hero-mute.is-on .speaker-waves { display: block; }
.hero-mute.is-on .speaker-slash { display: none; }

/* CC toggle: dimmed when captions are off, full contrast when on — the CC
   glyph has no natural "off" form the way the speaker has its slash. */
.hero-cc { opacity: 0.55; }
.hero-cc.is-on { opacity: 1; }
.hero-cc:hover { opacity: 1; }

/* Captions are rendered into .hero-captions by the player script, not by the
   browser's own cue layer: ::cue accepts only a handful of properties, and the
   OS caption settings (macOS Accessibility > Captions) can impose a text-edge
   shadow that page CSS cannot override. Drawing them ourselves guarantees
   plain white text with no box and no shadow. */
.hero-captions {
  position: absolute;
  left: 4%;
  right: 4%;
  /* Cue lines counted up from the bottom, matching the VTT's line:-N. */
  bottom: calc(var(--cap-line, 2) * 1.3em);
  z-index: 2;
  margin: 0;
  text-align: center;
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;             /* fallback where container queries are missing */
  font-size: 1.8cqw;           /* scales with the video, like a native cue */
  line-height: 1.3;
  color: #fff;
  background: none;
  /* Contrast comes from a soft glow: the video runs from near-white slides to
     a dark lab, so plain white text disappears over half of it. Sized in em so
     the glow scales with the caption instead of coarsening on a large hero.
     (The rounded box that used to sit behind the text was the browser's own
     cue background, not this shadow; drawing captions ourselves removed it.) */
  text-shadow: 0 0.08em 0.15em rgba(0, 0, 0, 0.95),
               0 0 0.53em rgba(0, 0, 0, 0.75);
  white-space: pre-line;
  pointer-events: none;
}

.hero-captions:empty {
  display: none;
}

.hero-progress {
  flex: 1 1 auto;
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: rgba(27, 27, 27, 0.78);  /* same dark pill as the buttons */
  cursor: pointer;
  overflow: hidden;
}

.hero-progress:focus-visible {
  outline: 2px solid #fdfaf4;
  outline-offset: 2px;
}

.hero-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: #fdfaf4;
  border-radius: 999px;
  pointer-events: none;
}

.hero-time {
  flex: 0 0 auto;
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #fdfaf4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .hero-controls {
    padding: 0 10px 10px 10px;
    gap: 9px;
  }
  .hero-btn {
    width: 32px;
    height: 32px;
  }
  .hero-time {
    font-size: 14px;
  }
}

/* ---------- Recovery behaviors 2x2 video grid ---------- */

.recovery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0 12px 0;
  align-items: start;
}

.recovery-col-header {
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #131920;
  text-align: center;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

/* Top-left tag overlaid on each Robust Execution clip — mirrors the
   .ppsc-tag style from the baseline-comparison carousel. */
.recovery-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  z-index: 2;
  pointer-events: none;
}
.recovery-tag.pps  { background: #4f9d5d; }
.recovery-tag.lora { background: #4f86c6; }

.recovery-cell {
  position: relative;
  width: 100%;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0; /* kill descender gap under the video */
}

.recovery-video {
  width: 100%;
  display: block;
  background: #1b1b1b;
  border-radius: 8px;
}

.recovery-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #fff;
  background: rgba(27, 27, 27, 0.7);
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: 0;
  pointer-events: none;
}

@media (max-width: 700px) {
  .recovery-col-header {
    font-size: 14px;
  }
  .recovery-grid {
    gap: 8px 10px;
  }
}

/* ---------- Cross-modality 2x2 video grid ---------- */

.crossmod-grid {
  display: grid;
  /* Videos are 16:9; charts are ~0.82:1 (608×756). Sizing the chart column
     at 0.82/1.78 ≈ 0.46 of a video column makes the chart exactly as tall as
     the videos with no leftover space in the row. */
  grid-template-columns: 1fr 1fr 0.5fr;
  gap: 12px 14px;
  margin: 28px 0 12px 0;
  align-items: stretch;
}

/* Per-task success-rate chart (third column): scaled to the row height, which
   is set by the videos. */
.crossmod-chart { position: relative; min-width: 0; line-height: 0; }
.crossmod-chart img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; }

/* Shared legend under the grid, centred. */
.crossmod-legend { text-align: center; margin: 6px 0 4px; line-height: 0; }
.crossmod-legend img { display: inline-block; width: min(100%, 300px); height: auto; }

/* Column header above each video column — matches the section subheaders
   (e.g. "Visualize the steering effect"): 15px, weight 600. */
.crossmod-col-header {
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #131920;
  text-align: center;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.crossmod-video {
  width: 100%;
  display: block;
  background: #ffffff;  /* matches the white padding inside the pointcloud_mod cell */
  border-radius: 8px;
}

.crossmod-cell {
  position: relative;
  width: 100%;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0; /* kill descender gap under the video */
}

/* Modality label overlay (e.g. "point cloud", "audio") — top-left corner. */
.crossmod-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #fff;
  background: rgba(27, 27, 27, 0.7);
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: 0;
  pointer-events: none;
  z-index: 4;
}

/* Top-left role tags overlaid on cross-mod cells — mirror the
   .recovery-tag / .ppsc-tag pill style. Blue for the "Additional Modality"
   input column, green for the "Steered Policy Rollout" output column. */
.crossmod-role-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', -apple-system, 'system-ui', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  z-index: 3;
  pointer-events: none;
}
.crossmod-role-tag.mod  { background: #407CB6; }
.crossmod-role-tag.roll { background: #4f9d5d; }

.crossmod-audio-toggle {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(27, 27, 27, 0.72);
  color: #fdfaf4;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
}

.crossmod-audio-toggle:hover {
  background: rgba(27, 27, 27, 0.92);
}

.crossmod-audio-toggle:active {
  transform: scale(0.94);
}

.crossmod-audio-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: currentColor;
}

/* Default state (video is muted): show slash, hide waves. */
.crossmod-audio-toggle .speaker-waves { display: none; }
.crossmod-audio-toggle .speaker-slash { display: block; }

/* Sound-on state (video is un-muted): show waves, hide slash. */
.crossmod-audio-toggle.is-on .speaker-waves { display: block; }
.crossmod-audio-toggle.is-on .speaker-slash { display: none; }

@media (max-width: 700px) {
  .crossmod-col-header {
    font-size: 14px;
  }
  .crossmod-grid {
    gap: 8px 10px;
  }
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid #d9d2bd;
  text-align: center;
  font-size: 14px;
  color: #777;
}

.footer a {
  color: #555;
}

/* ---------- Mobile tweaks ---------- */

@media (max-width: 700px) {
  body {
    padding: 30px 20px;
    font-size: 16px;
  }
}
