:root {
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --text: #1a1c23;
  --text-muted: #5b5f6b;
  --border: #e4e6ec;
  --accent: #3454d1;
  --accent-dark: #223a9e;
  --accent-soft: #eaeeff;
  --code-bg: #1e2029;
  --code-text: #d7dae3;
  --max-width: 980px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header / Hero ---------- */

header.hero {
  padding: 76px 0 48px;
  text-align: center;
  background: linear-gradient(180deg, #f8f9fd 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

h1.title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.18;
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

.authors {
  font-size: 1.08rem;
  margin: 0 auto 10px;
  max-width: 760px;
  color: var(--text);
}

.authors a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.authors sup {
  font-size: 0.68em;
  color: var(--accent);
  font-weight: 700;
}

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

.venue {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 14px 0 34px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  background: #1a1c23;
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 28, 35, 0.18);
}

.btn.btn-outline {
  background: #fff;
  color: var(--text);
}

.btn.btn-outline:hover {
  background: var(--bg-alt);
}

.btn.disabled {
  background: #f0f1f5;
  color: #9a9da8;
  cursor: default;
  pointer-events: none;
  border-color: var(--border);
}

.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- Sections ---------- */

section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

section.alt {
  background: var(--bg-alt);
}

section:last-of-type { border-bottom: none; }

h2.section-title {
  font-size: 1.7rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 30px;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 760px;
  margin: 0 auto 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.02rem;
  color: var(--text);
  text-align: justify;
}

.prose + .prose { margin-top: 18px; }

.figure {
  margin: 0 auto;
  text-align: center;
}

.figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.figure img.diagram {
  border: none;
  background: transparent;
  border-radius: 0;
}

figcaption, .caption {
  max-width: 720px;
  margin: 14px auto 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: left;
  line-height: 1.55;
}

figcaption strong, .caption strong { color: var(--text); }

.figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 8px;
}

@media (max-width: 720px) {
  .figure-row { grid-template-columns: 1fr; }
}

/* ---------- Video grids ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.video-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
}

@media (max-width: 400px) {
  .video-grid, .video-grid.cols-3 { grid-template-columns: 1fr; }
}

.video-card { text-align: center; }

.video-card video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #000;
  display: block;
  margin: 0 auto;
}

.video-card .video-label {
  margin-top: 10px;
  font-size: 0.80rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Contribution list ---------- */

.contrib-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.contrib-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 980px;
}

@media (max-width: 720px) {
  .contrib-grid, .contrib-grid.cols-3 { grid-template-columns: 1fr; }
}

.contrib-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
}

.contrib-card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.contrib-card h3 {
  font-size: 1.02rem;
  margin: 0 0 8px;
  font-weight: 700;
}

.contrib-card p {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Results highlight strip ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 860px;
  margin: 0 auto 40px;
}

@media (max-width: 720px) {
  .stat-row { grid-template-columns: 1fr; }
}

.stat {
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 16px;
}

.stat .num {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
}

.stat .label {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- BibTeX ---------- */

.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
  position: relative;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.copy-btn {
  position: absolute;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.copy-btn:hover { background: var(--bg-alt); }

pre.bibtex {
  max-width: 760px;
  margin: 0 auto;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 22px 24px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.6;
}

/* ---------- Footer ---------- */

footer {
  padding: 34px 0 56px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-muted);
}

footer a { color: var(--text-muted); }

/* ---------- Utility ---------- */

.center { text-align: center; }
.hidden { display: none; }
