/* SemanticSlider3D project page — no build step, no external dependencies. */

:root {
  --ink:        #14161a;
  --ink-soft:   #4a5058;
  --ink-faint:  #878e98;
  --bg:         #ffffff;
  --bg-alt:     #f6f7f9;
  --line:       #e3e6ea;
  --accent:     #0e7490;   /* teal  */
  --accent-2:   #1d4ed8;   /* blue  */
  --on-accent:  #ffffff;   /* text on an accent fill */
  --radius:     14px;
  --wrap:       1120px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9ecf1; --ink-soft: #b2bac6; --ink-faint: #79828f;
    --bg: #0f1115; --bg-alt: #161a20; --line: #262c35;
    --accent: #22d3ee; --accent-2: #60a5fa;
    /* the dark-mode accents are light, so text on them must be dark */
    --on-accent: #08131a;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

section { padding: 72px 0; border-top: 1px solid var(--line); }
section.alt { background: var(--bg-alt); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1.1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
code { font-family: var(--mono); font-size: .875em; background: var(--bg-alt); padding: .12em .38em; border-radius: 5px; border: 1px solid var(--line); }
.lead { color: var(--ink-soft); margin-top: -.4em; margin-bottom: 2em; }

/* ---------- hero ---------- */
.hero {
  padding: 84px 0 64px;
  text-align: center;
  background:
    radial-gradient(900px 380px at 50% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--bg);
}
.venue {
  font-size: .78rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1.1em;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 800; margin: 0;
  background: linear-gradient(96deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--ink-soft); margin: .5em 0 1.8em; }

.authors {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: .2em 1.1em; padding: 0; margin: 0 0 .5em; font-size: 1.05rem;
}
.authors sup { color: var(--ink-faint); font-size: .72em; }
.authors a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.authors a:hover { border-bottom-color: var(--accent); }
.affil { color: var(--ink-faint); font-size: .92rem; margin-bottom: 2.2em; }
.affil .note { font-size: .84rem; display: inline-block; margin-top: .5em; }
.authors .dagger { color: var(--ink-faint); }

/* Evaluation: subheads need air, unlike the compact .steps h3 */
#evaluation h3 { margin-top: 1.8em; font-size: 1rem; letter-spacing: 0; }
#evaluation h3:first-of-type { margin-top: .6em; }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .6em 1.15em; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: .93rem; font-weight: 550; text-decoration: none;
  border: 1px solid var(--ink);
  transition: transform .12s ease, opacity .12s ease;
}
.btn:hover { transform: translateY(-1px); opacity: .88; }
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn svg .stroke { fill: none; stroke: currentColor; stroke-width: 1.9; }
/* Not-yet-available links: muted pill with a "coming soon" tooltip on hover.
   Muted via colour rather than opacity — opacity would fade the tooltip too. */
.btn-soon {
  position: relative;
  background: transparent;
  color: var(--ink-faint);
  border-color: var(--line);
  cursor: not-allowed;
}
.btn-soon:hover { transform: none; opacity: 1; }
.btn-soon::after {
  content: attr(data-soon);
  position: absolute; bottom: calc(100% + 9px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: .34em .7em; border-radius: 7px;
  background: var(--ink); color: var(--bg);
  font-size: .74rem; font-weight: 550; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.btn-soon:hover::after, .btn-soon:focus-visible::after {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.btn .emoji { font-size: 16px; line-height: 1; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.btn-primary {
  background: linear-gradient(96deg, var(--accent), var(--accent-2));
  border-color: transparent; color: var(--on-accent);
}

/* ---------- figures & placeholders ---------- */
.teaser-band { padding: 48px 0; border-top: none; background: var(--bg-alt); }
/* The figure sits at the page's standard content width, matching every other
   section. It is ~2.6:1 with fine labels, so the caption links to the PDF for
   anyone who wants to read the alpha values up close. */
/* The figure art is white-on-white, so give it an explicit white card in both
   themes — otherwise in dark mode the surrounding band reads as a transparent
   margin around the figure. */
.teaser-band .figlink {
  display: block;
  background: #fff;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.teaser-band .figlink img { border: 0; border-radius: 4px; background: #fff; }
.figure { margin: 0; }
.figure img {
  /* height:auto is required — the img width/height attributes are presentational
     hints, so without it the height stays pinned at the attribute value while
     width:100% scales the width, distorting the aspect ratio. */
  width: 100%; height: auto; display: block; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg);
}
figcaption { font-size: .92rem; color: var(--ink-soft); margin-top: 1em; }
.teaser-band figcaption { text-align: center; max-width: 760px; margin-inline: auto; }

.media-slot .placeholder { display: none; }
.media-slot.empty img { display: none; }
.media-slot.empty .placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4em;
  aspect-ratio: 16 / 8; border: 2px dashed var(--line); border-radius: var(--radius);
  color: var(--ink-faint); text-align: center; padding: 24px;
}
.video-embed {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line); background: #000;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-alt { font-size: .84rem; color: var(--ink-faint); text-align: center; margin: 1em 0 0; }

.media-slot.empty .placeholder strong { color: var(--ink-soft); font-weight: 600; }
.media-slot.empty .placeholder span { font-size: .88rem; }

/* ---------- slider demo ---------- */
/* Six demo panels. minmax(300px, 1fr) resolves to 3 columns at the 1072px
   content width, so the six sit as 3+3, dropping to 2 then 1 as space runs out.
   A horizontal scroller would keep half of them off-screen. */
.slider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

/* Global rotation control */
.rotation-control {
  display: flex; align-items: center; gap: 14px;
  max-width: 460px; margin: 0 auto 30px;
  padding: 14px 20px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
}
.rotation-control label { font-size: .88rem; font-weight: 550; white-space: nowrap; }
.rotation-control input[type="range"] { flex: 1; }
.rotation-control output {
  font-family: var(--mono); font-size: .82rem; color: var(--ink-soft);
  min-width: 3.4em; text-align: right;
}

.panel-name {
  font-size: .88rem; font-weight: 600; margin: 14px 0 0; text-align: center;
}
.panel-name span { font-weight: 400; color: var(--ink-faint); }
.slider-stage {
  aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
  /* renders are transparent PNGs made against white - keep a white stage in
     both themes so the objects read the same way as in the paper figures */
  background: #fff;
  display: grid; place-items: center;
}
.slider-stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slider-controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.slider-end { font-size: .76rem; color: var(--ink-faint); white-space: nowrap; }

.slider-demo input[type="range"], .rotation-control input[type="range"] {
  -webkit-appearance: none; appearance: none; flex: 1;
  height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  outline-offset: 4px; cursor: grab;
}
.slider-demo input[type="range"]:active, .rotation-control input[type="range"]:active { cursor: grabbing; }
.slider-demo input[type="range"]::-webkit-slider-thumb,
.rotation-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 1px 6px rgba(0,0,0,.22);
}
.slider-demo input[type="range"]::-moz-range-thumb,
.rotation-control input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 1px 6px rgba(0,0,0,.22);
}

.howto { max-width: 620px; margin: 22px auto 0; font-size: .92rem; color: var(--ink-soft); }
.howto summary { cursor: pointer; color: var(--accent); }
.howto pre { margin: .8em 0; }

/* ---------- method steps ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 44px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 26px; }
.steps li { counter-increment: s; position: relative; padding-left: 46px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .82rem; font-weight: 700; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.steps p { font-size: .95rem; color: var(--ink-soft); margin: 0; }

/* ---------- results grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.grid figure { margin: 0; }
.grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.grid figcaption { font-size: .86rem; margin-top: .6em; }

/* ---------- bibtex ---------- */
pre {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px; overflow-x: auto; margin: 0;
}
pre code { background: none; border: none; padding: 0; font-size: .84rem; line-height: 1.6; }
.cite { position: relative; }
.copy {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  font: inherit; font-size: .78rem; padding: .32em .8em; border-radius: 7px;
  background: var(--bg); color: var(--ink-soft);
  border: 1px solid var(--line); cursor: pointer;
}
.copy:hover { color: var(--ink); border-color: var(--ink-faint); }

footer { padding: 40px 0 60px; border-top: 1px solid var(--line); }
footer p { font-size: .86rem; color: var(--ink-faint); text-align: center; margin: 0; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding: 54px 0; }
  .hero { padding: 60px 0 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
