:root {
  --bg: #f5f2eb;
  --bg-alt: #ece7dd;
  --surface: #fffcf6;
  --ink: #1c1917;
  --muted: #5c574f;
  --faint: #8a847a;
  --line: #ddd6c8;
  --accent: #0f6b66;
  --accent-hover: #0a524e;
  --accent-soft: #dceceb;
  --shadow: 0 18px 40px -28px rgba(28, 25, 23, 0.45);
  --radius: 18px;
  --wrap: 1080px;
  --wrap-text: 720px;
  --header-h: 58px;
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

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

a:hover {
  color: var(--accent-hover);
}

button {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

img,
video {
  max-width: 100%;
  display: block;
}

figure {
  margin: 0;
}

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

.wrap-text {
  width: min(var(--wrap-text), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(245, 242, 235, 0.84);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.wordmark:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-nav a:hover {
  color: var(--ink);
}

.page-hero {
  padding: 4.2rem 0 3.2rem;
  text-align: center;
}

#abstract,
#demonstrations,
#results,
#dataset,
#method {
  scroll-margin-top: 76px;
}

.venue-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 1.25rem;
  padding: 0.28rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-brand {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 650;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.paper-title {
  margin: 0 auto 1.75rem;
  max-width: 820px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 400;
  line-height: 1.45;
}

.author-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.author-list li {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
}

.author-list li:not(:last-child)::after {
  content: ",";
  margin-right: 0.55rem;
}

.author-list a {
  color: var(--ink);
}

.author-list a:hover {
  color: var(--accent);
}

.author-list sup {
  color: var(--faint);
  font-size: 0.7em;
  font-weight: 600;
}

.affiliations {
  margin: 0.85rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.affiliations span + span::before {
  content: "·";
  margin: 0 0.55rem;
  color: var(--faint);
}

.credits {
  margin: 0.35rem 0 1.6rem;
  color: var(--faint);
  font-size: 0.82rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #f8f5ef;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn .icon {
  display: inline-flex;
  width: 1em;
  height: 1em;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: #f8f5ef;
}

.band {
  padding: 4rem 0;
}

.band-flush {
  padding-top: 0;
}

.section-head {
  margin-bottom: 1.6rem;
  text-align: center;
}

.kicker {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.media-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.media-frame video,
.media-frame img {
  width: 100%;
  height: auto;
}

.teaser-video video {
  background: #161412;
}

.caption {
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
}

.caption strong {
  color: var(--ink);
  font-weight: 650;
}

.abstract-text {
  margin: 0;
  color: #3f3b36;
  font-size: 1.02rem;
  line-height: 1.75;
  text-align: justify;
  text-wrap: pretty;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: var(--wrap-text);
  margin: 2rem auto 0;
}

.stat {
  padding: 1rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.stat-label {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.video-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-carousel {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #161412;
  box-shadow: var(--shadow);
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.video-carousel.dragging {
  cursor: grabbing;
}

.video-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-slide video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: none;
  object-fit: contain;
  background: #161412;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(28, 25, 23, 0.45);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-arrow:hover {
  background: rgba(28, 25, 23, 0.78);
}

.carousel-arrow.left {
  left: 14px;
}

.carousel-arrow.right {
  right: 14px;
}

.indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cfc8bb;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.dot.active {
  width: 22px;
  background: var(--accent);
}

.figure-block {
  margin: 0;
}

.figure-block img {
  width: 100%;
  height: auto;
  display: block;
}

.figure-caption {
  margin: 1rem auto 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  text-align: justify;
}

.figure-caption p {
  margin: 0;
}

.figure-caption strong {
  color: var(--ink);
  font-weight: 650;
}

.site-footer {
  padding: 2.4rem 0 2.8rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.82rem;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  :root {
    --header-h: auto;
  }

  body {
    font-size: 16px;
  }

  .site-header {
    height: auto;
  }

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0 12px;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 8px 14px;
  }

  .page-hero {
    padding: 2.4rem 0 2rem;
  }

  #abstract,
  #demonstrations,
  #results,
  #dataset,
  #method {
    scroll-margin-top: 92px;
  }

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

  .carousel-arrow {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .carousel-arrow.left {
    left: 8px;
  }

  .carousel-arrow.right {
    right: 8px;
  }

  .abstract-text,
  .figure-caption,
  .caption {
    text-align: left;
  }

  .caption {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .carousel-arrow,
  .dot {
    transition: none;
  }
}
