:root {
  --accent: #8b0000;
  --accent-hover: #ff8c00;
  --ink: #363636;
  --muted: #6b6b6b;
  --alt-bg: #f7f7f8;
  --card-bg: #000;
}

body {
  font-family: 'Noto Sans', sans-serif;
  color: var(--ink);
  background: #fff;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.publication-title,
.title { font-family: 'Google Sans', sans-serif; }

.publication-title {
  font-size: 2.6rem !important;
  line-height: 1.2;
  margin-bottom: 1.2rem !important;
}

.fluidgen {
  background: linear-gradient(90deg, #d9480f, #8b0000 55%, #4b2c83);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.publication-venue {
  font-family: 'Google Sans', sans-serif;
  margin-bottom: .6rem;
}

.publication-authors { font-family: 'Google Sans', sans-serif; }
.publication-authors a { color: hsl(204, 86%, 53%) !important; }
.publication-authors a:hover { text-decoration: underline; }
.author-block { display: inline-block; margin: 0 .15rem; }
.equal-contrib { color: var(--muted); margin-top: .2rem; }

.publication-links { margin-top: 1.2rem; }
.link-block { display: inline-block; margin: .25rem .15rem; }
.link-block a { color: #fff !important; }
.button.is-soon { opacity: .55; cursor: default; }

/* ---------- teaser ---------- */
.hero.teaser .hero-body { padding-top: 0; padding-bottom: 2.5rem; }
.teaser-container { max-width: 1152px !important; }

.teaser-video-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}
.teaser-video-wrap video { display: block; width: 100%; height: auto; }

.teaser-caption {
  margin-top: 1.4rem !important;
  font-size: 1.15rem !important;
}

/* ---------- sections ---------- */
.section { padding: 3.5rem 1.5rem; }
.section-alt { background: var(--alt-bg); }

.section-lead {
  max-width: 820px;
  margin: 0 auto 1.8rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- videos ---------- */
.video-card {
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}
.video-card video { display: block; width: 100%; height: auto; }
.video-label {
  background: #fff;
  color: var(--ink);
  font: 600 .92rem 'Google Sans', sans-serif;
  text-align: center;
  padding: .55rem .75rem;
}
.lazy-video { aspect-ratio: 832 / 480; background: #111; }
.lazy-video.pair { aspect-ratio: 1664 / 480; }

.pair-labels,
.tri-labels {
  display: grid;
  background: #fff;
  font: 600 .9rem 'Google Sans', sans-serif;
  text-align: center;
  color: var(--ink);
  padding: .5rem 0;
}
.pair-labels { grid-template-columns: 1fr 1fr; }
.tri-labels { grid-template-columns: 1fr 1fr 1fr; }
.pair-labels .ours { color: var(--accent); }

/* shape transitions: one card per clip, stream tabs on top */
.shape-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.shape-card {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}
.shape-card video {
  display: block;
  width: 100%;
  aspect-ratio: 832 / 480;
  background: #111;
}
.stream-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: #f1f1f3;
}
.stream-tabs button {
  flex: 1;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: 600 .82rem 'Google Sans', sans-serif;
  padding: .4rem .3rem;
  cursor: pointer;
  white-space: nowrap;
}
.stream-tabs button:hover { color: var(--ink); }
.stream-tabs button.is-active { background: var(--accent); color: #fff; }

/* before / after DPO: main player + thumbnail selector */
.tri-labels .ours { color: var(--accent); }
.compare-card video { aspect-ratio: 1728 / 332; background: #111; }

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.thumb {
  position: relative;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  aspect-ratio: 16 / 10;
  opacity: .6;
  transition: opacity .15s, border-color .15s, transform .15s;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb:hover { opacity: .9; transform: translateY(-1px); }
.thumb.is-active { opacity: 1; border-color: var(--accent); }

/* gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-grid video { object-fit: contain; } /* a few clips are portrait crops */

/* ---------- figures ---------- */
.paper-figure { margin: 1rem 0 0; }
.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.paper-figure figcaption {
  margin-top: .75rem;
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

/* ---------- method ---------- */
.method-cols { margin-top: 1.5rem; }
.method-step {
  height: 100%;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1.4rem 1.3rem 1.2rem;
  line-height: 1.6;
  font-size: .95rem;
}
.method-step p + p { margin-top: .6rem; }
.method-step .title { margin-bottom: .7rem !important; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font: 700 .95rem 'Google Sans', sans-serif;
  margin-bottom: .7rem;
}
.eq { overflow-x: auto; }

/* ---------- applications ---------- */
.app-row { margin-bottom: 2.8rem; }
.app-row:last-child { margin-bottom: 0; }
.app-row p { line-height: 1.65; }
.app-text { margin-bottom: 1rem; }

/* ---------- bibtex ---------- */
.bibtex-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.bibtex-head .title { margin-bottom: 0 !important; }
#bibtex { border-radius: 8px; font-size: .85rem; }

.footer { padding: 2rem 1.5rem; }

/* ---------- responsive ---------- */
@media screen and (max-width: 1023px) {
  .shape-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width: 768px) {
  .publication-title { font-size: 1.8rem !important; }
  .gallery-grid { grid-template-columns: 1fr; }
  .thumb-strip { grid-template-columns: repeat(4, 1fr); }
  .pair-labels, .tri-labels { font-size: .75rem; }
  .section { padding: 2.5rem 1rem; }
}
