:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --ink: #111111;
  --muted: #5c5c62;
  --line: #e5e7eb;
  --accent: #0f5cc0;
  --accent-dark: #0a4693;
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
  --container: 1120px;
  --narrow: 860px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.container.narrow {
  width: min(calc(100% - 32px), var(--narrow));
}

.hero {
  padding: 56px 0 28px;
}

.hero__inner {
  text-align: center;
}

.hero__menu {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.hero__kicker {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__kicker--menu {
  margin-bottom: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.research-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  min-width: 220px;
  min-height: 56px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  pointer-events: none;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
}

.hero__kicker--menu:hover + .research-dropdown,
.hero__kicker--menu:focus-visible + .research-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.research-dropdown:empty::before {
  content: "";
  display: block;
  height: 28px;
}

h1,
h2,
h3,
p,
pre,
figure {
  margin-top: 0;
}

h1 {
  max-width: 1120px;
  margin: 0 auto 18px;
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-bottom: 10px;
  font-size: 1.05rem;
}

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

.authors a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.authors sup {
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
}

.affiliation,
.meta {
  color: var(--muted);
}

.affiliation {
  margin-bottom: 4px;
  font-size: 1.02rem;
}

.meta {
  margin-bottom: 24px;
  font-size: 0.95rem;
}

p.venue {
  margin-bottom: 18px;
  font-size: 1rem;
  font-weight: 700;
  color: #c81e1e;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button--primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.button--paper {
  background: #fff;
  color: var(--ink);
}

.button--paper:hover {
  background: #fff;
}

.button--disabled {
  color: var(--muted);
  background: var(--surface-soft);
  cursor: default;
}

.button--disabled:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.section {
  padding: 36px 0;
}

.section--teaser {
  padding-top: 28px;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.15;
  text-align: center;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
}

.narrow h2 {
  text-align: center;
}

p {
  margin-bottom: 14px;
  font-size: 1.03rem;
  line-height: 1.78;
  color: #202126;
}

.teaser {
  margin: 0;
}

.teaser img {
  width: 100%;
  background: #fff;
}

.teaser figcaption {
  max-width: 980px;
  margin: 14px auto 0;
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
}

.method-figure {
  margin: 22px 0 0;
}

.method-figure img {
  width: 100%;
  background: #fff;
}

.method-figure figcaption {
  max-width: 1100px;
  margin: 14px auto 0;
  font-size: 0.95rem;
  line-height: 1.68;
  color: var(--muted);
  text-align: center;
}

.results-group + .results-group {
  margin-top: 56px;
}

.results-subtitle {
  margin: 28px 0 14px;
  text-align: center;
}

.results-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.video-column-title {
  margin-top: 0;
}

.result-figure {
  margin: 0;
}

.result-figure img {
  width: 100%;
  background: #fff;
}

.results-carousel {
  display: grid;
  grid-template-columns: 56px minmax(0, 520px) 56px;
  gap: 18px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

.results-carousel--wide {
  grid-template-columns: 56px minmax(0, 860px) 56px;
}

.carousel-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  aspect-ratio: var(--carousel-ratio, 9 / 16);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 360ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.carousel-track.is-instant {
  transition: none;
}

.carousel-video {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  pointer-events: none;
}

.carousel-video.is-active {
  pointer-events: auto;
}

.carousel-control {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(15, 92, 192, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f6fd 100%);
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 92, 192, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.carousel-control:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(15, 92, 192, 0.28);
  box-shadow: 0 14px 28px rgba(15, 92, 192, 0.18);
}

.carousel-control:active {
  transform: translateY(0) scale(0.98);
}

.carousel-control span {
  display: block;
  line-height: 1;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cfd4dc;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}

.carousel-dot:hover {
  transform: scale(1.08);
}

.carousel-dot.is-active {
  background: #111111;
}

pre {
  overflow-x: auto;
  margin: 20px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: #111111;
  font-size: 0.94rem;
  line-height: 1.7;
}

code {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (max-width: 800px) {
  .hero {
    padding-top: 40px;
  }

  .section {
    padding: 28px 0;
  }

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

  .results-carousel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .carousel-stage {
    width: min(100%, 420px);
    margin: 0 auto;
  }

  .carousel-control {
    width: 48px;
    height: 48px;
    justify-self: center;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }
}
