:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #5f6b7a;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --green: #10b981;
  --purple: #7c3aed;
  --dark: #111827;
  --border: #e5eaf2;
  --shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 34%),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.10), transparent 30%),
    var(--bg);
  line-height: 1.65;
}

/* Top navigation */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(229, 234, 242, 0.9);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dark);
}

nav {
  display: flex;
  gap: 18px;
}

nav a {
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

nav a:hover {
  color: var(--blue);
}

/* Page layout */
.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 66px 34px 54px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at center, rgba(37, 99, 235, 0.08), transparent 60%);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid rgba(37, 99, 235, 0.22);
}

h1 {
  max-width: 980px;
  margin: 0 auto;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -0.045em;
  color: #0f172a;
}

h1 span {
  display: block;
  margin-top: 8px;
  color: #1e3a8a;
}

.hero-subtitle {
  margin: 24px auto 0;
  max-width: 760px;
  font-size: 19px;
  color: var(--muted);
}

.authors {
  margin: 30px auto 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  font-size: 16px;
  font-weight: 650;
}

.authors span:first-child {
  color: var(--blue);
}

.affiliations {
  max-width: 940px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.affiliations p {
  margin: 0;
}

/* Buttons */
.action-buttons {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn {
  min-width: 132px;
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.13);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
  opacity: 0.94;
}

.primary {
  background: var(--blue);
}

.dark {
  background: var(--dark);
}

.green {
  background: var(--green);
}

.purple {
  background: var(--purple);
}

.hero-note {
  margin: 26px auto 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

/* General sections */
.section {
  margin-top: 26px;
  padding: 36px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

.section-header {
  margin-bottom: 16px;
}

.section-kicker {
  margin: 0 0 4px !important;
  color: var(--blue) !important;
  text-transform: uppercase;
  font-size: 13px !important;
  font-weight: 900;
  letter-spacing: 0.08em;
}

h2 {
  margin: 0;
  color: #0f172a;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.section p {
  margin: 0 0 16px;
  font-size: 17px;
  color: #374151;
}

/* Method and dataset figures */
.figure-card {
  margin-top: 24px;
  text-align: center;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 22px;
}

.figure-card img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  margin: 0 auto;
  background: #ffffff;
}

.caption {
  margin: 14px auto 0 !important;
  max-width: 980px;
  color: #64748b !important;
  font-size: 15px !important;
  line-height: 1.6;
  text-align: center;
}

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.video-card {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.11);
}

/* 512×512 videos: display full content without cropping */
.video-card video {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 14px;
  background: #000000;
  display: block;
}

/* Fallback if browser respects width/height attributes differently */
.video-card video[width="512"][height="512"] {
  aspect-ratio: 1 / 1;
}

.video-card p {
  margin: 10px 0 2px;
  font-size: 15px;
  color: #1f2937;
  font-weight: 800;
}

/* BibTeX */
.bibtex {
  margin: 0;
  padding: 22px;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 18px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.6;
}

/* Footer */
.footer {
  margin-top: 34px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.footer p {
  margin: 0;
}

/* Tablet */
@media (max-width: 980px) {
  h1 {
    font-size: 38px;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  nav {
    display: none;
  }
}

/* Mobile */
@media (max-width: 620px) {
  .page {
    padding: 24px 12px 48px;
  }

  .hero {
    padding: 44px 20px 38px;
    border-radius: 24px;
  }

  h1 {
    font-size: 30px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .section {
    padding: 26px 20px;
    border-radius: 22px;
  }

  h2 {
    font-size: 25px;
  }

  .section p {
    font-size: 16px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}
