:root {
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(0, 0, 0, 0.08);
  --card: #ffffff;
  --soft: #f8fafc;
  --pink: linear-gradient(90deg, #ec4899, #f59e0b);
  --blue: linear-gradient(90deg, #3b82f6, #7c3aed);
  --green: linear-gradient(90deg, #22c55e, #06b6d4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 94px;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar-inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: Georgia, serif;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 0.2px;
  background: linear-gradient(120deg, #38bdf8, #818cf8, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.topnav {
  display: flex;
  gap: 34px;
  align-items: center;
  color: #374151;
  font-size: 14px;
}
.dropdown { position: relative; }
.dropdown button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: default;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 150px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.08);
  padding: 8px;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
}
.dropdown-menu a:hover { background: #f3f4f6; }

.hero {
  position: relative;
  min-height: calc(100vw * 2064 / 4112);
  padding-top: 94px;
  background: #000;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.3), rgba(0,0,0,0.05), rgba(0,0,0,0.3));
  opacity: 0.25;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.48), rgba(0,0,0,0.18)),
    linear-gradient(90deg, rgba(0,0,0,0.28), rgba(0,0,0,0.04), rgba(0,0,0,0.28));
}
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: fill;
  background: #000;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 54px 28px 42px;
  text-align: center;
  color: #fff;
}
.hero h1 {
  margin: 0 auto 16px;
  max-width: 1180px;
  font-family: Georgia, serif;
  font-size: clamp(30px, 3.1vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  text-shadow: 0 0 15px rgba(129,140,248,0.35);
}
.venue-badge {
  display: inline-block;
  margin: 10px 0 18px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(15,23,42,0.34);
  font-family: Georgia, serif;
  font-weight: 900;
}
.authors, .affiliations, .corresponding {
  margin: 0 auto 14px;
  max-width: 1180px;
  color: rgba(255,255,255,0.92);
  font-family: Georgia, serif;
}
.authors { font-size: 18px; line-height: 1.55; }
.affiliations, .corresponding { font-size: 16px; }
.cta-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.btn {
  padding: 14px 22px;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}
.btn.pink { background: var(--pink); }
.btn.blue { background: var(--blue); }
.btn.green { background: var(--green); }

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 28px;
}
.section-head {
  text-align: center;
  margin-bottom: 24px;
}
.section h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 900;
}
.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: Georgia, serif;
}

.viewer-shell {
  width: min(912px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  padding: 14px;
}
.viewer-grid {
  display: grid;
  grid-template-columns: 295px 1fr;
  gap: 17px;
  align-items: stretch;
}
.video-stack {
  display: flex;
  flex-direction: column;
  min-height: 504px;
}
.video-frame {
  position: relative;
  height: 504px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  background: #111827;
}
.demo-video {
  width: 100%;
  height: 100%;
  min-height: 504px;
  background: #000;
  object-fit: fill;
  display: block;
}
.video-label {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 3;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.62);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}
.label-mask { top: 25%; }
.label-point { top: 50%; }
.label-mesh { top: 75%; }
.video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  background: linear-gradient(135deg, #111827, #1f2937);
}
.point-viewer {
  position: relative;
  min-height: 504px;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.loading {
  position: absolute;
  inset: 0 0 56px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(255,255,255,0.75);
  color: #111827;
  font-weight: 600;
  z-index: 2;
}
.spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 4px solid #e5e7eb;
  border-top-color: #60a5fa;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#model-canvas {
  flex: 1;
  width: 100%;
  min-height: 448px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #fff;
  display: block;
}
.controls {
  display: flex;
  justify-content: center;
  padding: 10px 0 0;
}
.controls button {
  border: 1px solid rgba(0,0,0,0.08);
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 18px;
  color: #374151;
}
.scene-description {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  background: #fff;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  color: #334155;
}
.thumbnail-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.thumbnail {
  width: 120px;
  height: 80px;
  border-radius: 8px;
  border: 2px solid rgba(0,0,0,0.06);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumbnail.active {
  border-color: #818cf8;
  box-shadow: 0 4px 16px rgba(102,126,234,0.3);
}
.thumbnail::after {
  content: attr(title);
  position: absolute;
  left: 8px;
  bottom: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.55);
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
}

.muted {
  padding-top: 18px;
}
.muted h2 {
  text-align: center;
}
.reserve-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 70%;
  margin: 0 auto;
}
.reserve-card {
  min-height: 132px;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(168,85,247,0.06));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--muted);
}
.reserve-card span {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}
.media-section {
  padding-top: 12px;
}
.figure-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.figure-card {
  width: 70%;
  margin: 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}
.figure-card img {
  width: 100%;
  display: block;
  background: #f8fafc;
}
.figure-card figcaption {
  margin: 0;
  padding: 18px 22px 20px;
  color: #1f2937;
  font-size: 20px;
  line-height: 1.6;
  font-weight: 400;
  text-align: center;
}
.dataset-table {
  min-width: 980px;
  font-size: 15px;
}
.dataset-table th,
.dataset-table td {
  padding: 12px 14px;
}
.dataset-table thead th {
  background: #ffffff;
  color: #334155;
  font-size: 15px;
}
.dataset-table .method-col {
  min-width: 180px;
}
.dataset-table .ours td {
  background: #eaf2ff;
  font-weight: 800;
  color: #0f172a;
}
.table-note {
  margin: 14px 4px 0;
  color: #64748b;
  font-size: 14px;
}
.comparison-card {
  margin: 28px auto 0;
  width: 70%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.comparison-head {
  padding: 26px 28px 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.comparison-head h3 {
  margin: 0 0 10px;
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}
.comparison-head p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.65;
}
.table-wrap {
  overflow-x: auto;
}
.comparison-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 15px;
}
.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.comparison-table th {
  font-size: 14px;
  font-weight: 800;
  color: #334155;
  background: #fff;
}
.comparison-table .method-col {
  text-align: left;
  min-width: 180px;
}
.comparison-table tbody tr.ours td {
  background: #eaf2ff;
  font-weight: 800;
}
.mark-yes {
  color: #16a34a;
  font-weight: 800;
}
.mark-no {
  color: #dc2626;
  font-weight: 800;
}
.overview-text {
  max-width: 980px;
  margin: 0 auto 24px;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.75;
  text-align: center;
}
.citation {
  max-width: 980px;
  margin: 20px auto 0;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
}
.citation code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
}

@media (max-width: 900px) {
  .topnav { gap: 18px; font-size: 13px; }
  .viewer-grid { grid-template-columns: 1fr; }
  .video-stack { order: 2; }
  .point-viewer { min-height: 360px; }
  .reserve-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .figure-grid { grid-template-columns: 1fr; }
  .figure-card { width: 100%; }
  .comparison-head { padding: 20px 18px 16px; }
  .comparison-card { width: 100%; }
}

@media (max-width: 640px) {
  .topbar-inner { padding: 0 16px; }
  .hero-content { padding-inline: 18px; }
  .authors { font-size: 15px; }
  .section { padding-inline: 18px; }
  .section h2 { font-size: 34px; }
  .thumbnail { width: 96px; height: 64px; }
}
