:root {
  --accent: #2f6db3;
  --accent-dark: #1f4e85;
  --text: #1c2330;
  --text-soft: #55606f;
  --bg: #ffffff;
  --border: #e3e8ef;
  --radius: 6px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
#topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-title { font-weight: 700; color: var(--accent-dark); letter-spacing: 0.3px; }
.nav-links a {
  color: var(--text-soft); text-decoration: none; margin-left: 20px; font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  padding: 52px 0 34px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.venue-badge {
  display: inline-block;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: 999px;
  margin: 0 0 18px;
  letter-spacing: 0.2px;
}
.hero h1 {
  font-size: 2.15rem;
  line-height: 1.3;
  margin: 0 0 18px;
}
.authors { font-size: 1.15rem; margin: 6px 0 2px; }
.authors a { color: var(--accent-dark); text-decoration: none; border-bottom: 1px dotted var(--accent-dark); }
.authors a:hover { color: var(--accent); }
.affiliations { color: var(--text-soft); font-size: 0.92rem; margin: 6px 0 24px; }

.link-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-dark) !important;
  border: 1px solid var(--accent);
  background: #fff;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 0.97rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--accent-dark); color: #fff !important; }
.btn svg { width: 17px; height: 17px; fill: currentColor; }

/* ---------- sections ---------- */
section { padding: 40px 0; }
section + section { border-top: 1px solid var(--border); }

h2 {
  font-size: 1.6rem;
  color: var(--accent-dark);
  margin: 0 0 16px;
}
.section-lead { color: var(--text-soft); max-width: 920px; }

.teaser { padding-top: 30px; border-top: 0; }

figure { margin: 24px 0; }
figure img {
  width: 100%; height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
  background: #fff;
}
figcaption {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-top: 10px;
  max-width: 980px;
}
.wide-figure img { width: 100%; }

.figure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: start;
}

.result-title {
  font-size: 1.12rem;
  margin: 32px 0 4px;
}

/* ---------- video ---------- */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  margin-top: 18px;
}
.video-wrapper iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-fallback { font-size: 0.9rem; color: var(--text-soft); }
.video-fallback a { color: var(--accent); }

/* ---------- method columns (plain text, no boxes) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 28px 0 10px;
}
.card h3 { margin: 0 0 8px; font-size: 1.04rem; color: var(--accent-dark); }
.card p { margin: 0; font-size: 0.95rem; color: var(--text-soft); }

/* ---------- metrics (flat stat row) ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 20px 0 4px;
  padding: 6px 0 2px;
}
.metric { text-align: center; }
.metric + .metric { border-left: 1px solid var(--border); }
.metric-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: 0.3px;
}
.metric-label { display: block; font-size: 0.82rem; color: var(--text-soft); margin-top: 4px; line-height: 1.45; }

/* ---------- table ---------- */
.table-card {
  align-self: center;
}
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
caption { text-align: left; font-weight: 600; color: var(--accent-dark); margin-bottom: 10px; font-size: 0.95rem; }
th, td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--border); }
th { color: var(--text); border-bottom: 2px solid #c9d4e2; }
td:first-child, th:first-child { text-align: left; }
.table-note { font-size: 0.82rem; color: var(--text-soft); margin: 10px 0 0; }

/* ---------- bibtex ---------- */
.bibtex-box { position: relative; }
.bibtex-box pre {
  background: #0f2540;
  color: #d9e6f7;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
}
#copy-btn {
  position: absolute; top: 10px; right: 10px;
  background: transparent;
  border: 1px solid #7ea4d0;
  color: #d9e6f7;
  padding: 5px 14px; border-radius: 6px;
  cursor: pointer; font-size: 0.85rem;
}
#copy-btn:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  padding: 32px 0 28px;
  font-size: 0.92rem;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-links { margin: 10px 0; }
.ack { font-size: 0.82rem; color: #8a94a3; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric + .metric { border-left: 0; }
  .figure-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.55rem; }
  .hero h1 br { display: none; }
  .nav-links { display: none; }
}
