:root {
  --bg: #ffffff;
  --fg: #1a1a2e;
  --muted: #5a5a72;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --card-bg: #f6f7fb;
  --border: #e3e6ef;
  --banner-bg: #fff4e0;
  --banner-fg: #92560a;
  --banner-border: #f5c97a;
  --max: 860px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Construction banner */
.construction-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--banner-bg);
  color: var(--banner-fg);
  border-bottom: 1px solid var(--banner-border);
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 50;
}
.construction-icon { font-style: normal; }

/* Hero */
.hero {
  padding: 56px 0 36px;
  text-align: center;
  background:
    radial-gradient(1200px 400px at 50% -120px, #eef2ff 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}

.title {
  font-size: clamp(1.5rem, 3.6vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 24px;
}
/* Each part stays on its own line; the long first line won't wrap internally on
   normal screens. On narrow phones we allow natural wrapping to avoid overflow. */
.title-line {
  display: block;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .title-line { white-space: normal; }
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  font-size: 1.08rem;
  margin-bottom: 10px;
}
.author a {
  color: var(--accent);
  text-decoration: none;
}
.author a:hover { text-decoration: underline; }
.author sup { color: var(--muted); font-size: 0.7em; }

.affiliations {
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 8px;
}
.footnote {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

/* Link buttons */
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--fg);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-2px); background: #000; }
.btn-icon { font-style: normal; }
.btn-disabled {
  background: #c9ccda;
  color: #6c6f7e;
  cursor: not-allowed;
  pointer-events: none;
}
.soon { font-weight: 500; opacity: 0.8; font-size: 0.85em; }

/* Single hero video under the abstract */
.hero-video { margin: 8px auto 8px; max-width: 720px; }
.hero-video .video-frame { aspect-ratio: 16 / 9; }

/* Highlights / video reel */
.highlights {
  padding: 44px 0 8px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
}
.section-lead {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: -6px auto 28px;
  font-size: 1.02rem;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.video-card { margin: 0; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(20, 24, 60, 0.06);
}
.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Custom muted-video controls: play/pause + seek only (no volume/unmute) */
.video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: linear-gradient(transparent, rgba(10, 12, 30, 0.55));
}
.vc-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #14142c;
  cursor: pointer;
  transition: background 0.12s ease;
}
.vc-btn:hover { background: #fff; }
.vc-seek {
  flex: 1 1 auto;
  height: 4px;
  margin: 0;
  cursor: pointer;
  accent-color: #ffffff;
}
.video-card figcaption {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}
.task-name {
  display: block;
  color: var(--fg);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}
.tag {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  background: #e7edff;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
}

/* Explainer figure rows */
.explainer h2 { margin-bottom: 28px; }
.figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 36px;
}
.figure-row.reverse .figure-placeholder { order: 2; }
.figure-placeholder {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 16px;
}
.figure-placeholder .construction-icon { font-size: 2rem; }
.figure-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.figure-text p { margin: 0; color: #2a2a3c; }

@media (max-width: 820px) {
  .video-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .figure-row, .figure-row.reverse { grid-template-columns: 1fr; gap: 16px; }
  .figure-row.reverse .figure-placeholder { order: 0; }
}

/* Sections */
main { padding: 48px 0 24px; }
section { margin-bottom: 48px; }
section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  text-align: center;
}
.abstract p {
  color: #2a2a3c;
  font-size: 1.05rem;
  text-align: justify;
}

/* Coming-soon card */
.coming-soon-card {
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.coming-soon-card .construction-icon { font-size: 2.2rem; display: block; margin-bottom: 8px; }
.coming-soon-card p { margin: 0; font-size: 1.02rem; }

/* BibTeX */
.bibtex pre {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.5;
}
.bibtex code {
  font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
  color: #2a2a3c;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
