/* SplashSplat project page — no framework, no build step. */
:root {
  --bg: #fbfbfa;
  --bg-2: #f2f3f1;
  --ink: #17191c;
  --ink-2: #4b5058;
  --ink-3: #6b717b;          /* 4.6:1 on --bg, AA for body text */
  --line: #e2e4e1;
  --accent: #1f4e8c;        /* the navy of the teaser's SplashSplat banner */
  --accent-2: #e9f0fa;
  --radius: 14px;
  --maxw: 1120px;
  --serif: "Source Serif 4", "Georgia", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: only light;
}
* { box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* links inside running text must not rely on colour alone */
.abstract a, .lead a, .note a, figcaption a, .card a, footer a, .label a { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:focus-visible, .tab[aria-selected="true"]:focus-visible { outline-color: var(--ink); box-shadow: 0 0 0 2px #fff; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--bg-2); padding: 1px 5px; border-radius: 5px; }
pre {
  font-family: var(--mono); font-size: 14px; line-height: 1.5; background: #f4f5f3; color: #222;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 20px; }
.wrap--narrow { max-width: 820px; }

/* ---------- hero ---------- */
.hero { padding-block: 64px 28px; text-align: center; }
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  letter-spacing: -0.01em; line-height: 1.08; margin: 0 auto 26px; max-width: 22em;
}
.hero h1 .name { color: var(--accent); }
.authors { font-size: 1.05rem; margin: 0 0 6px; }
.authors a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.authors a:hover { text-decoration-color: var(--accent); }
.authors sup { font-size: 0.7em; color: var(--ink-3); }
.authors span { white-space: nowrap; }
.affils { color: var(--ink-2); margin: 0 0 4px; font-size: 0.98rem; }
.equal { color: var(--ink-3); margin: 0 0 26px; font-size: 0.88rem; }
.venue { color: var(--ink-3); margin: 0 0 26px; font-size: 0.98rem; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 500; font-size: 0.95rem; line-height: 1;
  border: 1px solid transparent; transition: transform .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); background: #2b2f36; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn--soon { background: var(--bg-2); color: var(--ink-2); border-color: var(--line); cursor: default; }
.btn--soon:hover { transform: none; background: var(--bg-2); }
.hero figcaption { text-align: left; margin-inline: auto; }

/* ---------- figure / video frames ---------- */
figure { margin: 0; }
figcaption { color: var(--ink-2); font-size: 0.95rem; line-height: 1.55; margin-top: 12px; max-width: 62em; }
figcaption b { color: var(--ink); font-weight: 600; }
.frame {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -18px rgba(0,0,0,.25);
}
.frame > img, .frame > video { width: 100%; height: auto; }
.frame > video { cursor: pointer; }
.teaser { margin-top: 8px; }

/* ---------- sections ---------- */
section { padding-block: 44px; }
section + section { border-top: 1px solid var(--line); }
h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.1rem);
  letter-spacing: -0.01em; margin: 0 0 14px; line-height: 1.15;
}
h3 { font-size: 1.15rem; font-weight: 600; margin: 34px 0 10px; }
.lead { color: var(--ink-2); font-size: 1.05rem; max-width: 46em; margin: 0 0 22px; }
p { margin: 0 0 14px; }

/* abstract: one compact looping bullet-time teaser, abstract paragraph as its caption */
.lead-figure { margin: 0; }
.frame--teaser { max-width: 460px; margin: 0 auto; }
.lead-text { margin: 22px 0 0; max-width: 62em; font-size: 1rem; line-height: 1.65; color: var(--ink-2); text-align: left; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* method cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; margin-top: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; }
.card .k { display: inline-block; font-family: var(--serif); font-size: 0.85rem; color: var(--accent); background: var(--accent-2); border-radius: 999px; padding: 2px 10px; margin-bottom: 10px; }
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.tab {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; font: inherit; font-size: 0.92rem; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.tab:hover { border-color: var(--ink-3); color: var(--ink); }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.panel[hidden] { display: none; }
.panel:focus-visible { outline-offset: 6px; }

/* result galleries: column headers + one visible clip + thumbnail switcher */
.gallery { --n: 5; --gap: 0.5%; margin-top: 6px; }
.strip { min-width: 0; }
.cols {
  display: grid; grid-template-columns: repeat(var(--n), 1fr); column-gap: var(--gap);
  margin: 0 0 8px; padding-inline: 1px;
}
.cols span {
  font-family: var(--serif); font-size: clamp(0.8rem, 1.5vw, 1.02rem); color: var(--ink-2);
  text-align: center; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cols .ours { color: var(--accent); font-weight: 600; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 10px; margin: 14px 0 0; }
.thumb {
  padding: 0; border-radius: 10px; overflow: hidden; background: #fff; border: 2px solid var(--line);
  opacity: .72; transition: opacity .12s, border-color .12s, transform .12s;
}
.thumb img { width: 100%; height: auto; display: block; }
.thumb:hover { opacity: 1; border-color: var(--ink-3); }
.thumb[aria-selected="true"] { opacity: 1; border-color: var(--accent); background: #fff; }
.thumb[aria-selected="true"]:focus-visible { outline-color: var(--ink); }
/* five-panel strips: below ~720px keep them readable and let header + clip pan together */
@media (max-width: 720px) {
  .strip { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .strip > .cols, .strip > .panel { width: 720px; }
  .strip .frame > video { max-width: none; }
}
.frame--flat { background: #fff; padding: 10px; }


/* citation */
.bibtex { position: relative; }
#bibtex { white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 72px; }
.copy {
  position: absolute; top: 10px; right: 10px; font: inherit; font-size: 0.8rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; color: var(--ink-2);
}
.copy:hover { color: var(--ink); border-color: var(--ink-3); }

/* global play/pause for the looping clips (WCAG 2.2.2) */
.motion-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 10;
  font: inherit; font-size: 0.85rem; padding: 8px 14px; border-radius: 999px;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line);
  box-shadow: 0 4px 16px -8px rgba(0,0,0,.35); cursor: pointer;
}
.motion-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.motion-toggle.is-paused { background: var(--ink); color: #fff; border-color: var(--ink); }

footer { border-top: 1px solid var(--line); padding: 30px 0 72px; color: var(--ink-3); font-size: 0.9rem; }
footer p { margin: 0 0 8px; }

@media (max-width: 640px) {
  html { font-size: 16px; }
  .hero { padding-top: 44px; }
  section { padding-block: 34px; }
  .btn { padding: 9px 14px; font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .btn, .tab[aria-selected="true"] { background: none !important; color: #000 !important; border-color: #000; }
  .btn--soon, .copy, .tabs, .motion-toggle { display: none; }
  .panel[hidden] { display: block; }
  .frame { box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
}
