:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --text: #1c1e21;
  --muted: #5f6670;
  --border: #e3e6ea;
  --accent: #1e90ff;
  --accent-soft: #e6f2ff;
  --btn-bg: #1c1e21;
  --btn-text: #ffffff;
  --code-bg: #f0f1f4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --bg-alt: #1a1c20;
    --text: #e8eaed;
    --muted: #9aa0a8;
    --border: #2c2f35;
    --accent: #4aa8ff;
    --accent-soft: #12263d;
    --btn-bg: #e8eaed;
    --btn-text: #121316;
    --code-bg: #22252a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 860px; }
.container.wide { max-width: 1240px; }

/* Hero */
.hero { padding: 64px 0 40px; text-align: center; }

.title {
  margin: 0 0 20px;
  font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.title .name { color: var(--accent); }

.authors { font-size: 19px; font-weight: 500; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 20px; }
.author { white-space: nowrap; }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 22px; }
sup { font-size: 0.7em; line-height: 0; }
.affiliations { color: var(--muted); font-size: 16px; margin-top: 4px; }
.venue-line { color: var(--muted); font-size: 15px; margin: 14px 0 0; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.btn .soon {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
}

/* Sections */
.section { padding: 48px 0; }
.section.alt { background: var(--bg-alt); }

h2 {
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
}

.abstract { text-align: justify; hyphens: auto; margin: 0; }

.lead { max-width: 860px; margin: 0 auto 28px; text-align: center; color: var(--muted); }
.hint { display: block; margin-top: 4px; font-weight: 500; color: var(--text); }

/* Figure */
.figure { margin: 0; }
.figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  border: 1px solid var(--border);
}
.figure figcaption {
  max-width: 980px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 15px;
  text-align: justify;
}

/* Videos */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.video-card { margin: 0; }
.video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 1250 / 512;
  border-radius: 8px;
  background: #0d0e11;
}
.video-card figcaption {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}
.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}
.credit { margin: 20px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* BibTeX */
.bibtex { position: relative; }
.bibtex pre {
  margin: 0;
  padding: 20px;
  background: var(--code-bg);
  border-radius: 8px;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.55;
}
.copy-btn {
  position: absolute;
  top: 10px; right: 10px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.footer { padding: 28px 0 40px; text-align: center; color: var(--muted); font-size: 14px; }
.footer p { margin: 0; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: 44px 0 28px; }
  .br-wide { display: none; }
  .video-grid { grid-template-columns: 1fr; }
  .figure img { padding: 6px; }
  .abstract, .figure figcaption { text-align: left; }
}
