/* CollisionSplatting project page.
   Palette: NYU violet (the lab) + the two colours of every clip: RRT-tree cyan and path orange. */
:root {
  --paper: #ffffff;
  --ink: #1d1830;
  --ink-2: #4e4865;
  --rule: #e4dfec;
  --violet: #57068c;
  --violet-wash: #f4eff9;
  --tree: #1fa7d6;
  --path: #e8811e;
  --measure: 44rem;
  --wide: 68rem;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.62 var(--text);
  font-optical-sizing: auto;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--violet); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--tree); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--measure), 100% - 2.5rem); margin-inline: auto; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 2.25rem 0 0; text-align: center; }
.hero .paper-title { margin-inline: auto; }
.hero .actions { justify-content: center; }
.hero .logos { justify-content: center; }
.logos { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2.75rem; }
.logo-nyu { height: 2.6rem; width: auto; }
.logo-mim { height: 2.1rem; width: auto; }
.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 760;
  font-variation-settings: "wdth" 78, "opsz" 96;
  font-size: clamp(2.9rem, 9.5vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--violet);
}
.paper-title {
  margin: 1rem 0 1.5rem;
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "wdth" 92;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.3;
  max-width: 40rem;
}
.authors { margin: 0 0 0.25rem; font-size: 1.1rem; }
.authors a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.authors a:hover { border-color: var(--violet); }
.affiliations, .venue { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.venue { margin-top: 0.35rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.6rem 0 2.25rem; }
.btn {
  display: inline-block;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font: 600 0.98rem/1.2 var(--display);
  text-decoration: none;
}
.btn:hover { background: #45056f; }
.btn-quiet { background: transparent; color: var(--violet); box-shadow: inset 0 0 0 1.5px var(--violet); }
.btn-quiet:hover { background: var(--violet-wash); }

/* ---------------------------------------------------------------- media */
.media { margin: 1.75rem auto; }
.media.wide { width: min(var(--wide), 100% - 2.5rem); }
.wrap .media.wide { width: min(var(--wide), 100vw - 2.5rem); margin-inline: 0; position: relative; left: 50%; transform: translateX(-50%); }
.media.narrow { width: min(38rem, 100%); }
.media video, .media img { width: 100%; border-radius: 10px; background: #15121f; }
.media.narrow img, .figure-pair img { background: none; }
figcaption {
  margin-top: 0.6rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: var(--measure);
}
.media.wide figcaption { margin-inline: auto; }
.hero-video { margin-top: 0; margin-bottom: 0; text-align: left; }
figure { margin: 0; }

/* ---------------------------------------------------------------- text */
main > section { padding-top: 3.25rem; }
.lede p {
  margin: 0;
  padding: 1.1rem 1.4rem;
  border-radius: 12px;
  background: var(--violet-wash);
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  line-height: 1.45;
  font-weight: 450;
}
h2 {
  margin: 0 0 0.9rem;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "wdth" 88;
  font-size: clamp(1.55rem, 3.4vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
}
p { margin: 0 0 1rem; }
strong { font-weight: 650; }

/* ---------------------------------------------------------------- pipelines */
.pipelines { margin: 1.5rem 0 0.5rem; }
.pipe { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; font: 600 0.95rem/1.2 var(--display); }
.pipe span:not(.arrow) { padding: 0.55rem 0.8rem; border-radius: 8px; }
.pipe-old span:not(.arrow) { background: #eeecf1; color: var(--ink-2); }
.pipe-new span:not(.arrow) { background: var(--violet); color: #fff; }
.pipe-new .ours { background: var(--tree); color: #06222d; }
.arrow { width: 1.4rem; height: 2px; background: currentColor; position: relative; opacity: 0.6; }
.arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid currentColor; border-right: 0; }
.pipe-note { margin: 0.45rem 0 1.1rem; font-size: 0.95rem; color: var(--ink-2); font-style: italic; }

/* ---------------------------------------------------------------- equations */
.equations { display: grid; gap: 0.2rem; margin: 1.25rem 0 1.5rem; }
.equations > div { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0.2rem 0; border-bottom: 1px solid var(--rule); }
.equations .eq-label { display: block; color: var(--ink-2); font-size: 0.92rem; padding-bottom: 0.55rem; text-align: center; }
.equations .katex-display { margin: 0.6rem 0 0.25rem; overflow-x: auto; overflow-y: hidden; }

/* ---------------------------------------------------------------- the explorer (the one interactive moment) */
.explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0 0.5rem;
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--violet-wash);
}
.explorer svg { width: 100%; height: auto; touch-action: none; user-select: none; }
.keepout { fill: rgba(232, 129, 30, 0.2); stroke: var(--path); stroke-width: 0.025; }
.baseline { fill: none; stroke: var(--ink-2); stroke-width: 0.02; stroke-dasharray: 0.07 0.06; }
.sigma-ring { fill: none; stroke: var(--violet); stroke-width: 0.012; opacity: 0.55; }
.robot { fill: rgba(31, 167, 214, 0.35); stroke: var(--tree); stroke-width: 0.03; cursor: grab; transition: fill 120ms; }
.robot.hit { fill: rgba(192, 57, 43, 0.35); stroke: #c0392b; }
.robot:active { cursor: grabbing; }
.robot-center { fill: var(--ink); pointer-events: none; }
.explorer-controls label { display: flex; justify-content: space-between; align-items: baseline; font: 600 1rem/1.3 var(--display); }
.explorer-controls output { font-variant-numeric: tabular-nums; color: var(--violet); font-size: 1.25rem; }
.explorer input[type="range"] { width: 100%; margin: 0.6rem 0 0.9rem; accent-color: var(--violet); }
.readout { font: 500 0.98rem/1.45 var(--display); font-variant-numeric: tabular-nums; min-height: 2.9em; }
.readout b { color: #c0392b; }
.readout .free { color: #1e7d45; }
.hint { font-size: 0.92rem; color: var(--ink-2); margin: 0; }

/* ---------------------------------------------------------------- figure grids */
.figure-pair, .video-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1.75rem auto;
  width: min(var(--wide), 100vw - 2.5rem);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.figure-pair img { border-radius: 6px; }
.video-pair video { width: 100%; border-radius: 10px; background: #15121f; }

/* ---------------------------------------------------------------- code + citation */
pre {
  margin: 0;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  border-radius: 10px;
  background: #1d1830;
  color: #f1edf7;
  font: 0.9rem/1.55 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.bibtex { position: relative; }
.copy {
  display: block;
  margin: 0 0 0.5rem auto;
  padding: 0.35rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--tree);
  color: #06222d;
  font: 600 0.85rem/1.2 var(--display);
  cursor: pointer;
}
.copy:hover { background: #45b9e2; }

footer { padding: 3rem 0 3.5rem; color: var(--ink-2); font-size: 0.92rem; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 760px) {
  body { font-size: 1.05rem; }
  .explorer { grid-template-columns: 1fr; }
  .figure-pair, .video-pair { grid-template-columns: 1fr; }
  .logos { margin-bottom: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .robot { transition: none; }
}
