/* ===================== base ===================== */
:root {
  --studio-gray: #e9e8e6;   /* matches the clip background so seams/letterboxing blend */
  --ink: #111;
  --accent: #2a6df0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ===================== teaser / hero ===================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--studio-gray);
}

/* full-bleed background video (the whole reel) */
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* darken behind the (top-anchored) title; fades to near-clear over the lower scene */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.45) 20%,
    rgba(0,0,0,0.22) 40%,
    rgba(0,0,0,0.08) 70%,
    rgba(0,0,0,0.05) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 24px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
}

.hero__title {
  margin: -810px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.authors {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin: 8px 0 0;
  padding: 0;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 500;
}
.authors li { white-space: nowrap; }
.authors a { text-decoration: none; }
.authors a:hover { text-decoration: underline; }

.affiliation {
  margin: 7px 0 0;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

/* nav buttons */
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: none;
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: rgba(40, 40, 46, 0.92);
}

.btn--disabled {
  background: rgba(120, 120, 124, 0.45);
  border-color: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.55);
  cursor: not-allowed;
  pointer-events: none;
}

/* hover-reveal video controls */
.hero__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px 20px;
  pointer-events: auto;
}

.hero__playpause {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease;
}
.hero__playpause:hover { background: rgba(40, 40, 46, 0.8); }

.hero__progress {
  position: relative;
  flex: 1;
  height: 16px;
  cursor: pointer;
  touch-action: none;
}
.hero__progress::before {           /* track */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  height: 3px;
  border-radius: 1.5px;
  background: rgba(255, 255, 255, 0.28);
}
.hero__progress-fill {              /* played portion */
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  height: 3px;
  width: 0;
  border-radius: 1.5px;
  background: #fff;
  pointer-events: none;
}
.hero__progress-fill::after {       /* draggable knob */
  content: "";
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* "simulation demos" marker + CTA on the progress bar */
.hero__sim-marker {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 12px;
  border-radius: 1px;
  background: #fff;
  pointer-events: none;        /* the button below handles clicks */
}
.hero__sim-cta {
  position: absolute;
  bottom: 14px;                /* float just above the tick */
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.45);
  transition: background 0.15s ease, transform 0.15s ease;
}
.hero__sim-cta:hover {
  background: rgba(42, 109, 240, 0.92);   /* accent on hover */
  transform: translateX(-50%) translateY(-2px);
}

/* ===================== shared content width ===================== */
.tldr,
.abstract {
  max-width: 1200px;
  margin: 0 auto;  
}

/* ===================== TL;DR ===================== */
.tldr {
  padding: 20px 20px 0;
  /*居中*/
  text-align: center;
}

.tldr__text {
  margin: 0;
  padding: 10px 12px;
  background: #f5f6f8;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.5;
  color: #1a1a1c;
}
.tldr__tag {
  margin: 0;
  background: #f5f6f8;
  font-size: 1rem;
  line-height: 1.55;
  color: #8a8a8f;
  white-space: nowrap;
}
.tldr__text em {
  font-style: normal;
  font-weight: 600;
  /* color: var(--accent); */
}

/* ===================== abstract (collapsible) ===================== */
.abstract {
  padding: 20px 20px 0;
}

.abstract__details {
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.abstract__summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  /* gap: 8px; */
  padding: 10px 2px;
  font-size: 1.4rem;
  font-weight: 800;
}
.abstract__summary::-webkit-details-marker { display: none; }
.abstract__summary::before {
  content: "\25B8";          /* ▸ */
  font-size: 1.5em;
  line-height: 1;
  color: var(--ink);
  position: relative;
  top: -0.06em;              /* nudge glyph up to align with title baseline */
  transition: transform 0.18s ease;
}
.abstract__details[open] .abstract__summary::before { transform: rotate(90deg); }

.abstract__hint {
  font-size: 1rem;
  /* font-weight: 700; */
  color: #9a9a9f;
  margin-left: 4px;
}
.abstract__details[open] .abstract__hint { display: none; }

.abstract__body {
  padding: 0 2px 10px;
}
.abstract__body p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: justify;
  color: #2a2a2c;
}
.abstract__body p:last-child { margin-bottom: 0; }

/* ===================== interactive demo (static) ===================== */
.demo {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 0px;
}
.demo__head { margin-bottom: 14px; }
.demo__title {
  margin: -10px 0 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.demo__sub {
  margin: 6px 0 0;
  font-size: 1rem;
  /* line-height: 1.45; */
  /* color: #5a5a5f; */
}
/* .demo__sub strong { color: var(--accent); } */

/* divider between the two interactive comparisons (matches the abstract rule) */
.demo-sep {
  max-width: 1160px;            /* aligns with the abstract line & demo content box */
  margin: 20px auto 0;          /* 20px above; the next .demo's 20px padding gives the gap below */
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

/* ===================== bibtex ===================== */
.bibtex {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px 40px;
}

/* ===================== footer / copyright ===================== */
.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 10px 12px;
  text-align: center;
}
.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: #8a8a8f;
}
.bibtex__title {           /* aligned with .abstract__summary */
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
}
.bibtex__lead {            /* aligned with .abstract__body p */
  margin: 6px 0 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #2a2a2c;
}
.bibtex__box { position: relative; }
.bibtex__code {                /* box aligned with .tldr__text (font family aside) */
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  background: #f5f6f8;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  /* line-height: 1.5; */
  color: #1a1a1c;
}
.bibtex__copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #333;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.bibtex__copy:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* --- case selector: horizontally scrollable strip of RGB|mask thumbnails --- */
.demo__cases {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                 /* native bar hidden; custom rail below */
}
.demo__cases::-webkit-scrollbar { display: none; }

/* custom horizontal scroll rail (affordance: "scroll for more cases") */
.cases-scroll {
  position: relative;
  height: 4px;
  max-width: 1200px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  cursor: pointer;
  touch-action: none;
}
.cases-scroll__thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  min-width: 32px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.5;
  transition: opacity 0.15s ease;
}
.cases-scroll:hover .cases-scroll__thumb { opacity: 0.78; }
.case-thumb {
  flex: 0 0 auto;
  display: flex;                 /* RGB | mask side by side */
  height: 116px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #f0f0f2;
  cursor: pointer;
  overflow: hidden;
  scroll-snap-align: start;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.case-thumb img {
  height: 100%;
  width: 116px;                  /* each panel square -> thumb is 2:1 */
  object-fit: cover;
  display: block;
}
.case-thumb img + img { border-left: 2px solid #fff; }
.case-thumb:hover { transform: translateY(-2px); }
.case-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(42,109,240,0.22);
}

/* --- 3x3 viewer grid: Ours = top-left 2x2, baselines fill b0..b4 --- */
.surround__frame {
  display: grid;
  max-width: 1200px;
  margin: 0 auto;
  aspect-ratio: 1.4 / 1;           /* square grid -> square cells */
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-template-areas:
    "ours ours b0"
    "ours ours b1"
    "b2   b3   b4";
  gap: 12px;
}

.tile {
  position: relative;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  overflow: hidden;
  background: var(--studio-gray);
  min-height: 0;                 /* allow grid cell to control height */
}
.tile .mv { width: 100%; height: 100%; --poster-color: transparent; }
.tile__label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(20,20,22,0.74);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
/* "live simulation" badge — dynamic section, Ours window only (top-left) */
.tile__live {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.74);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.tile__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5a5a;
  box-shadow: 0 0 0 0 rgba(255, 90, 90, 0.55);
  animation: livePulse 1.4s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 90, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0); }
}
@media (prefers-reduced-motion: reduce) { .tile__live-dot { animation: none; } }

.tile--ours {
  grid-area: ours;
}
/* ===================== responsive ===================== */
@media (max-width: 760px) {
  .surround__frame {
    aspect-ratio: auto;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    grid-auto-rows: 1fr;
    grid-template-areas:
      "ours ours"
      "b0   b1"
      "b2   b3"
      "b4   b4";
  }
  .surround__frame .tile { aspect-ratio: 1 / 1; }
  .surround__frame .tile--ours { aspect-ratio: 16 / 11; }
  .case-thumb { height: 92px; }
  .case-thumb img { width: 92px; }
}

@media (max-width: 720px) {
  .sims__grid { grid-template-columns: 1fr; }
  .authors { gap: 4px 12px; font-size: 0.98rem; }
}
