:root {
  --navy: #16233d;
  --navy-light: #1f3358;
  --accent-blue: #e2ebfb;
  --accent-blue-border: #b9cdef;
  --text: #1b1f27;
  --text-muted: #4d5566;
  --rule: #e2e5eb;
  --page-bg: #ffffff;
  --max-w: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.topbar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16233d;
  flex-shrink: 0;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 32px;
  text-align: center;
}

.badge {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: 30px;
  line-height: 1.3;
  margin: 0 0 18px;
  font-weight: 700;
  color: var(--navy);
}

.authors {
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--text);
}
.authors sup { font-size: 11px; }
.authors .star { color: var(--text-muted); }

.affiliations {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.contact {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 24px;
}
.contact a { color: var(--text-muted); text-decoration: underline; }

.hero-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.pill-btn {
  display: inline-block;
  padding: 8px 22px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.pill-btn:hover { background: var(--navy); color: #fff; }

/* ---------- Sections ---------- */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px;
}
.section + .section { border-top: 1px solid var(--rule); }

.section h2 {
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
  color: var(--navy);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--navy);
  display: inline-block;
}

.section p {
  font-size: 15.5px;
  color: var(--text);
  margin: 0 0 14px;
}

/* TL;DR box */
.tldr-box {
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  padding: 20px 22px;
  font-size: 15px;
  color: var(--text);
  background: #fafbfd;
}
.tldr-box p { margin: 0; }

/* Equation / info boxes */
.eq-box {
  background: var(--accent-blue);
  border: 1px solid var(--accent-blue-border);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 18px 0;
  font-size: 15px;
  overflow-x: auto;
}
.eq-box .katex-display { margin: 6px 0; }

/* Two-column comparison */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0;
}
.two-col .col h3 {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--navy);
}
.two-col .col ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14.5px;
}
.two-col .col li { margin-bottom: 4px; }

@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; }
}

/* Figures */
figure {
  margin: 22px 0;
  text-align: center;
}
figure img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--rule);
}
figcaption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: left;
}

/* Video placeholder */
.video-slot {
  background: #f8f9fc;        /* light gray/blue */
  border: 1px solid var(--rule);
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14.5px;
  font-weight: 600;
  padding: 24px;
  margin: 20px 0;
}

.video-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* or cover */
}
.video-slot span { max-width: 320px; opacity: 0.9; }
.video-slot.small-note {
  font-weight: 400;
  font-size: 12.5px;
  opacity: 0.8;
  margin-top: 10px;
}

/* Bibtex box */
.bibtex-box {
  position: relative;
  background: var(--accent-blue);
  border: 1px solid var(--accent-blue-border);
  border-radius: 10px;
  padding: 20px 22px;
}
.bibtex-box pre {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #fff;
  border: 1px solid var(--accent-blue-border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--navy);
}
.copy-btn:hover { background: var(--navy); color: #fff; }

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  padding: 26px 24px 40px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Focus visibility */
a:focus-visible, .pill-btn:focus-visible, .copy-btn:focus-visible {
  outline: 2px solid var(--navy-light);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
