:root {
  --ink: #16181d;
  --muted: #5b6270;
  --line: #e3e6eb;
  --tint: #f5f7fa;
  --accent: #d93025;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; width: 100%; height: auto; }

.wrap { margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 920px; }
.wrap.wide { max-width: 1180px; }

/* ---------- header ---------- */
.masthead { padding: 72px 0 40px; text-align: center; }

.masthead h1 {
  margin: 0 0 24px;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.authors {
  margin: 0 0 6px;
  font-size: 1.12rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px;
}
.authors sup, .affils sup { font-size: .68em; color: var(--muted); }

.affils { margin: 0; color: var(--muted); }
.venue { margin: 6px 0 0; font-weight: 700; }

.links {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600; font-size: .95rem;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.pill svg { width: 17px; height: 17px; }
a.pill:hover { background: #2c313a; transform: translateY(-1px); }
.pill.soon { background: #c9ced6; color: #3d434d; cursor: default; }
.pill small { font-weight: 500; font-size: .78rem; opacity: .8; }

/* ---------- sections ---------- */
.band { padding: 56px 0; }
.band.tint { background: var(--tint); }

h2 {
  margin: 0 0 22px;
  text-align: center;
  font-size: 1.9rem; font-weight: 800; letter-spacing: -0.01em;
}

.prose { margin: 0; text-align: justify; color: #2f343d; hyphens: auto; }

.lead {
  max-width: 820px; margin: 0 auto 32px;
  text-align: center; color: #2f343d; font-size: 1.05rem;
}

.fig { margin: 0 0 44px; }
.fig img { border-radius: var(--radius); }
.fig figcaption, .demo p {
  margin: 10px 0 0;
  font-size: .94rem; color: var(--muted);
}
.fig figcaption b { color: var(--ink); }

/* ---------- demos ---------- */
.demo { margin: 0 0 52px; }
.demo:last-child { margin-bottom: 0; }

.demo h3 {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px;
  font-size: 1.3rem; font-weight: 700;
}
.num {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff;
  font-size: .9rem; font-weight: 700;
}

.demo > video {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}
.demo > video + video { margin-top: 12px; }
.demo p.above { margin: 0 0 16px; }

.strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 14px;
}
.strip figure { margin: 0; }
.strip img, .strip video {
  aspect-ratio: 832 / 480; object-fit: cover; border-radius: 6px;
}
.strip figcaption {
  margin-top: 4px; text-align: center; font-size: .84rem; color: var(--muted);
}
.strip .result video { box-shadow: 0 0 0 3px var(--accent); }
.strip .result figcaption { color: var(--ink); font-weight: 700; }

/* ---------- example switcher ---------- */
.switcher {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-areas: "prev slides next" ". foot .";
  align-items: center;
  column-gap: 14px;
}
.sw-slides { grid-area: slides; min-width: 0; }
.sw-slide { display: none; }
.sw-slide.is-active { display: block; }
.sw-slide .strip { margin-bottom: 0; }
.sw-slide > video { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }

.sw-nav {
  width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff; color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  transition: background .15s ease, transform .15s ease;
}
.sw-nav:hover { background: var(--ink); color: #fff; }
.sw-nav:active { transform: scale(.94); }
.sw-nav svg { width: 20px; height: 20px; }
.sw-prev { grid-area: prev; }
.sw-next { grid-area: next; }

.sw-foot {
  grid-area: foot;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 12px;
}
.sw-label { font-size: .9rem; font-weight: 600; color: var(--ink); white-space: pre; }
.sw-dots { display: flex; gap: 7px; }
.sw-dot {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
  background: #c9ced6; cursor: pointer;
}
.sw-dot.is-active { background: var(--ink); }

/* ---------- bibtex ---------- */
.bib-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bib-head h2 { margin: 0; text-align: left; }

#copy-bib {
  font: inherit; font-size: .9rem; font-weight: 600;
  padding: 7px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer;
}
#copy-bib:hover { background: var(--tint); }

#bib {
  margin: 0; padding: 20px 22px;
  background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: .84rem;
  line-height: 1.55; overflow-x: auto; white-space: pre;
}

@media (max-width: 760px) {
  .switcher { grid-template-columns: 34px minmax(0, 1fr) 34px; column-gap: 6px; }
  .sw-nav { width: 34px; height: 34px; }
  .masthead { padding-top: 48px; }
  .strip { grid-template-columns: repeat(2, 1fr); }
}
