:root {
  --text: #1d1d1f;
  --muted: #5f6368;
  --accent: #d9822b;
  --accent-dark: #b4651a;
  --bg-alt: #f6f6f8;
  --border: #e4e4e8;
  --radius: 12px;
}

* { 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: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 920px; }

/* ---------------- Hero ---------------- */
.hero {
  padding: 72px 0 36px;
  text-align: center;
  background:
    radial-gradient(1200px 400px at 50% -120px, rgba(255, 183, 94, 0.22), transparent 70%),
    #fff;
}

.venue {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  border: 1px solid rgba(217, 130, 43, 0.35);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

.title {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 auto 24px;
  max-width: 1080px;
  letter-spacing: -0.01em;
}

.brand {
  font-weight: 800;
  background: linear-gradient(90deg, #f0a03c, #d9822b 40%, #9b5de5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.authors {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  font-size: 1.05rem;
  font-weight: 500;
}
.authors sup, .affiliations sup, .note sup { font-size: 0.7em; color: var(--muted); }

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 22px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #1d1d1f;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #3a3a3c; text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------------- Sections ---------------- */
.section { padding: 56px 0; }
.section.alt { background: var(--bg-alt); }
.section.teaser { padding-top: 12px; }

h2 {
  font-size: 1.85rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}

h3.sub {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 48px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
h2 + h3.sub { margin-top: 8px; }

.lead { color: var(--muted); margin: 0 0 20px; max-width: 900px; }

.abstract { text-align: justify; font-size: 1.04rem; margin: 0; }

figure { margin: 0 0 8px; }
figure.medium { max-width: 820px; margin: 40px auto 0; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: #fff;
}
figcaption {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 14px;
  text-align: justify;
}

.zoomable { cursor: zoom-in; }

/* ---------------- Method cards ---------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
}
.card-num { font-weight: 800; color: var(--accent); font-size: 0.9rem; letter-spacing: 0.08em; }
.card h3 { font-size: 1.05rem; margin: 6px 0 8px; }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------------- Videos ---------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.video-grid video {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: #000;
  display: block;
}

/* ---------------- Tables ---------------- */
.table-block { margin-top: 36px; }
.table-title { font-weight: 600; margin-bottom: 10px; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
table.metrics {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.metrics th, table.metrics td { padding: 7px 10px; text-align: center; }
table.metrics thead th { background: #fafafb; font-weight: 600; border-bottom: 1px solid var(--border); }
table.metrics thead tr:first-child th { border-bottom: 1px solid var(--border); }
table.metrics th.left, table.metrics td.left { text-align: left; }
table.metrics td.group {
  font-weight: 600;
  text-align: left;
  vertical-align: middle;
  border-right: 1px solid var(--border);
  background: #fcfcfd;
}
table.metrics tbody tr.group-start td { border-top: 1px solid var(--border); }
table.metrics tr.ours td { background: rgba(217, 130, 43, 0.07); }
table.metrics td.best { font-weight: 700; }
table.metrics .sep { border-left: 1px solid var(--border); }
.table-note { color: var(--muted); font-size: 0.85rem; margin-top: 8px; }

/* ---------------- BibTeX ---------------- */
.bibtex {
  position: relative;
  background: #1d1d1f;
  border-radius: var(--radius);
  padding: 20px 22px;
}
.bibtex pre {
  margin: 0;
  color: #f5f5f7;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.copy {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid #48484a;
  background: #2c2c2e;
  color: #f5f5f7;
  border-radius: 8px;
  padding: 4px 12px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.copy:hover { background: #3a3a3c; }

/* ---------------- Footer ---------------- */
.footer { padding: 32px 0 48px; text-align: center; color: var(--muted); font-size: 0.85rem; }

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: zoom-out;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-hint {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  color: #aaa;
  font-size: 0.8rem;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 640px) {
  .video-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .section { padding: 40px 0; }
  h2 { font-size: 1.5rem; }
  figcaption, .abstract { text-align: left; }
}
