/* ---------- Base ---------- */
:root {
  --primary: #2b4570;
  --accent: #b6465f;
  --accent-soft: #fdeef2;
  --muted: #6e7c87;
  --bg: #ffffff;
  --bg-soft: #f7f8fb;
  --border: #e6e8ee;
  --text: #1a1f2c;
  --baseline: #6e7c87;
  --ours: #2f7a3d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 36px;
  text-align: center;
  background: linear-gradient(180deg, #f7f8fb 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.hero .venue {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hero h1 {
  /* Max size is tuned so the first line stays on a single row at the
     1100px container width; it scales down with the viewport below that. */
  font-size: clamp(1.25rem, 2.8vw, 1.95rem);
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.hero h1 .brand { color: var(--accent); }

.authors {
  font-size: 1.05rem;
  margin: 16px 0 4px;
  line-height: 1.7;
}
.authors sup { color: var(--muted); font-size: 0.75em; }

.affiliations {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 6px;
}

.corresponding {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #1a1f2c;
  color: #fff;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.15s ease, background 0.15s ease;
}
.badge:hover { background: var(--accent); transform: translateY(-1px); text-decoration: none; color: #fff; }
.badge.alt { background: var(--primary); }
.badge.outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.badge.outline:hover { background: var(--primary); color: #fff; }

/* ---------- Sections ---------- */
section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--primary);
}

section p { margin: 0 0 14px; font-size: 1rem; }
section .lead { font-size: 1.05rem; color: #2c3340; }

.figure {
  margin: 24px 0 8px;
  text-align: center;
}
.figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(20, 30, 60, 0.07);
}
.figure .caption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.muted { color: var(--muted); }

/* ---------- Checklist (method bullets) ---------- */
.checklist {
  list-style: none;
  padding-left: 0;
  margin: 12px 0;
}
.checklist li {
  position: relative;
  padding: 6px 0 6px 28px;
  font-size: 0.98rem;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--ours);
  font-weight: 700;
}

/* ---------- Video Comparison ---------- */
/* The clips are ultra-wide (~3.7:1), so they are stacked vertically.
   The section uses the standard 1100px container, consistent with all
   other sections of the page. */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin: 20px 0 8px;
}
.video-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 20px rgba(20, 30, 60, 0.07);
}
.video-card video {
  width: 100%;
  display: block;
  background: #000;
}
.video-label {
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  background: var(--baseline);
  letter-spacing: 0.02em;
}
.video-label.ours { background: var(--ours); }
.video-label.baseline { background: var(--baseline); }

.video-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ---------- Code Block ---------- */
.codeblock {
  background: #1a1f2c;
  color: #f5f7fa;
  padding: 20px 22px;
  border-radius: 8px;
  font-family: "JetBrains Mono", "SF Mono", "Menlo", monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  line-height: 1.55;
  position: relative;
}
.codeblock pre {
  margin: 0;
  white-space: pre;
  color: #f5f7fa;
}

/* ---------- BibTeX ---------- */
.bibtex {
  background: #1a1f2c;
  color: #f5f7fa;
  padding: 20px 22px;
  border-radius: 8px;
  font-family: "JetBrains Mono", "SF Mono", "Menlo", monospace;
  font-size: 0.85rem;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.55;
  position: relative;
}
.copy-btn {
  position: absolute;
  top: 12px; right: 12px;
  background: #2b4570;
  color: #fff;
  border: 0;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
}
.copy-btn:hover { background: var(--accent); }

/* ---------- Footer ---------- */
footer {
  padding: 36px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  background: var(--bg-soft);
}
footer a { color: var(--muted); text-decoration: underline; }

/* ---------- Utility ---------- */
.tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
