﻿:root {
  --bg: #f6f7f9;
  --bg-soft: #eef1f5;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #111926;
  --text-soft: #4c5d70;
  --line: #d7dee7;
  --line-strong: #c5cfd9;
  --chip-bg: #eef3f7;
  --chip-text: #3f5265;
  --accent: #2e4558;
  --accent-2: #5f6c87;
  --shadow-sm: 0 10px 24px rgba(15, 25, 36, 0.08);
  --shadow-md: 0 18px 36px rgba(15, 25, 36, 0.12);
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 11px;
  --hero-stick-top: 70px;
  --overview-frame-h: 215px;
  --compare-frame-h: 236px;
  --gallery-frame-h: 162px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #edf1f5 0%, var(--bg) 16%, var(--bg) 100%);
  line-height: 1.62;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

.shell {
  width: min(1240px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 62px 0;
}

#overview.section {
  padding-top: 12px;
  margin-top: -160px;
  scroll-margin-top: 84px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(194, 204, 216, 0.7);
  background: rgba(246, 247, 249, 0.82);
  backdrop-filter: blur(14px);
}

.nav-row {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  text-decoration: none;
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 700;
  border-bottom: 1px solid transparent;
  padding: 0.2rem 0;
}

.nav-links a:hover {
  color: var(--text);
  border-bottom-color: var(--line-strong);
}

h2 {
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: clamp(1.72rem, 2.4vw, 2.42rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: 1.02rem;
  line-height: 1.38;
}

p {
  color: var(--text-soft);
}

.section-head {
  margin-bottom: 22px;
}

.section-kicker {
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 800;
  font-size: 0.76rem;
  color: #66798d;
}

.hero {
  --hero-progress: 0;
  --hero-lock: 0;
  --hero-info-shift: 0px;
  --hero-group-shift: 0px;
  --hero-media-visible-h: 100svh;
  --hero-info-overlap: 104px;
  position: relative;
  height: 220svh;
  margin-bottom: 2px;
}

.hero-stage-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: block;
  overflow: visible;
  transform: translateY(var(--hero-group-shift));
  transition: filter 220ms ease;
}

.hero-media-wrap {
  position: relative;
  height: 100svh;
  background: #dde4eb;
}

.hero-media {
  margin: 0;
  border: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  background: transparent;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.hero-fade {
  position: absolute;
  inset: 0;
  opacity: calc(0.76 + (var(--hero-lock) * 0.22));
  background: linear-gradient(
    180deg,
    rgba(10, 16, 22, 0.06) 0%,
    rgba(10, 16, 22, 0) 26%,
    rgba(246, 247, 249, 0.18) 68%,
    rgba(246, 247, 249, 0.9) 87%,
    var(--bg) 100%
  );
  pointer-events: none;
}

.hero-info {
  position: absolute;
  left: 50%;
  top: calc(var(--hero-media-visible-h) - var(--hero-info-overlap));
  width: min(1240px, 92vw);
  margin: 0;
  transform: translate(-50%, var(--hero-info-shift));
  pointer-events: none;
  z-index: 3;
}

.hero-card {
  width: min(820px, 100%);
  background: rgba(247, 250, 253, 0.68);
  border: 1px solid rgba(211, 221, 231, 0.96);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: clamp(16px, 2.2vw, 24px);
  box-shadow: 0 14px 34px rgba(14, 23, 34, 0.13);
  pointer-events: auto;
}

.hero-kicker {
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(176, 191, 205, 0.86);
  background: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 800;
  color: #3f5366;
}

.hero-title {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.hero-wordmark {
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  background: linear-gradient(90deg, #2d4458 0%, #49617d 46%, #6d86a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  line-height: 1.35;
  color: #344759;
  font-weight: 700;
}

.hero-authors {
  color: #344656;
  font-weight: 600;
}

.hero-authors a {
  color: #22394c;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.hero-authors a:hover {
  border-bottom-color: rgba(34, 57, 76, 0.34);
}

.hero-authors sup,
.hero-affiliations sup {
  font-size: 0.72em;
}

.hero-affiliations {
  margin-top: 4px;
  color: #566a7e;
  font-size: 0.92rem;
}

.hero-tldr {
  margin-top: 10px;
  max-width: 74ch;
}

.hero-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
}

.btn-primary {
  color: #f4f8fc;
  background: #2d4458;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(172, 188, 204, 0.95);
  color: #2a3e51;
}

.btn-ghost[aria-disabled='true'] {
  pointer-events: none;
  opacity: 0.9;
}

.btn span {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(235, 241, 247, 0.9);
  border: 1px solid rgba(176, 190, 204, 0.74);
}

.case-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #c9d5e0;
  background: #f4f8fb;
  color: #415669;
  font-size: 0.74rem;
  font-weight: 700;
}

.tldr-main {
  max-width: 86ch;
  margin-bottom: 12px;
}

.tldr-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 8px;
  max-width: 92ch;
}

.tldr-list li {
  color: var(--text-soft);
}

.tldr-list strong {
  color: var(--text);
}

.overview-compare {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.overview-top {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe, #f3f7fb);
}

.overview-meta {
  margin-bottom: 9px;
}

.overview-prompt {
  color: #2f4051;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.overview-col {
  border-right: 1px solid var(--line);
  background: #f5f9fc;
}

.overview-col:last-child {
  border-right: 0;
}

.overview-col-head {
  min-height: 76px;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfe;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
}

.overview-col-head strong {
  color: #2b4053;
  font-size: 0.82rem;
}

.runtime-chip {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #cad8e5;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.72rem;
  font-weight: 700;
}

.zoomable {
  margin: 0;
  border: 0;
  padding: 0;
  width: 100%;
  display: block;
  cursor: zoom-in;
  background: transparent;
}

.media-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: var(--case-ratio, 16 / 10);
  background: #edf2f7;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-frame-overview {
  aspect-ratio: auto;
  height: var(--overview-frame-h);
  overflow: hidden;
}

.media-frame-overview img {
  object-fit: cover;
  object-position: center;
}

.media-frame-compare {
  aspect-ratio: auto;
  height: var(--compare-frame-h);
  overflow: hidden;
}

.media-frame-compare img {
  object-fit: cover;
  object-position: center;
}

.media-frame-gallery {
  aspect-ratio: auto;
  height: var(--gallery-frame-h);
  overflow: hidden;
}

.media-frame-gallery img {
  object-fit: cover;
  object-position: center;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.why-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.why-card p {
  margin-top: 8px;
}

.how-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.how-block {
  border-left: 3px solid #bccbd9;
  padding-left: 12px;
}

.how-block p {
  margin-top: 6px;
  max-width: 100ch;
}

.method-full {
  margin: 0;
  border: 1px solid #ffffff;
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: clamp(20px, 2.5vw, 34px);
  box-shadow: var(--shadow-sm);
}

.method-full img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  background: #ffffff;
}

.results-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.result-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.result-figure h3 {
  padding: 12px 14px 4px;
}

.result-note {
  padding: 0 14px 10px;
  font-size: 0.88rem;
}

.result-figure .zoomable .media-frame,
.result-figure .zoomable img {
  height: 420px;
}

.result-figure .zoomable img {
  object-fit: contain;
  background: #fff;
}

.metrics-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.metrics-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.metrics-tab {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: #3a4c5f;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.metrics-tab.active {
  background: #2d4357;
  border-color: #2d4357;
  color: #f3f8fc;
}

.metric-hint {
  font-size: 0.82rem;
  color: #64788b;
  margin-bottom: 10px;
}

.metric-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 12px;
}

.metric-card ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.metric-card li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed #d5dde6;
  padding-bottom: 3px;
}

.metric-card span {
  color: #5d7184;
  font-size: 0.85rem;
}

.metric-card strong {
  color: #1f3245;
  font-size: 0.95rem;
}

.comparison-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.comp-tab {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: #374859;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.comp-tab.active {
  background: #2d4357;
  border-color: #2d4357;
  color: #f4f9fd;
}

.comparison-panel {
  margin-top: 12px;
}

.comp-context {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface);
  margin-bottom: 10px;
}

.comp-context .case-tag {
  margin-top: 7px;
}

.comp-context .prompt-line {
  margin-top: 9px;
  color: #314252;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.method-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.method-label {
  min-height: 76px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfd;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
}

.method-label strong {
  font-size: 0.8rem;
  color: #314355;
}

.gallery-marquee {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  overflow: hidden;
}

.gallery-rail {
  display: flex;
  width: max-content;
  animation: gallery-scroll 78s linear infinite;
}

.gallery-marquee:hover .gallery-rail,
.gallery-marquee:focus-within .gallery-rail,
.gallery-marquee.is-paused .gallery-rail {
  animation-play-state: paused;
}

.gallery-lane {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-flow: column;
  grid-auto-columns: minmax(330px, 356px);
  gap: 12px;
  padding-right: 12px;
}

.gallery-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
}

.gallery-head {
  min-height: 40px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
  display: flex;
  align-items: center;
}

.gallery-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-cell {
  border-right: 1px solid var(--line);
}

.gallery-cell:last-child {
  border-right: 0;
}

.gallery-label {
  display: block;
  padding: 6px 8px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  color: #4c6074;
  background: #f7fbff;
}

.gallery-prompt {
  padding: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: #506477;
}

.bibtex {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface);
  overflow-x: auto;
}

.bibtex code {
  font-size: 0.86rem;
  color: #243749;
}

.footer {
  padding: 12px 0 36px;
  border-top: 1px solid rgba(196, 206, 217, 0.8);
}

.footer p {
  font-size: 0.88rem;
}

.lightbox {
  width: min(1120px, 95vw);
  border: 0;
  border-radius: 16px;
  padding: 18px 18px 14px;
  background: rgba(14, 22, 31, 0.96);
  color: #eef5fb;
}

.lightbox::backdrop {
  background: rgba(7, 12, 18, 0.78);
}

.lightbox figure {
  margin: 0;
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.lightbox figcaption {
  margin-top: 10px;
  color: #d4e0ec;
  font-size: 0.88rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 1px solid rgba(214, 223, 233, 0.48);
  border-radius: 999px;
  background: rgba(16, 24, 31, 0.78);
  color: #f0f6fb;
  padding: 6px 10px;
  font-size: 0.82rem;
  cursor: pointer;
}

.lightbox-close {
  top: 14px;
  right: 14px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav.prev {
  left: 10px;
}

.lightbox-nav.next {
  right: 10px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 360ms ease, transform 360ms ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

.hero.hero-locked .hero-stage-sticky {
  filter: saturate(0.98) contrast(0.99);
}

@keyframes gallery-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1200px) {
  .section {
    padding: 52px 0;
  }

  #overview.section {
    padding-top: 10px;
    margin-top: -140px;
  }

  :root {
    --overview-frame-h: 195px;
    --compare-frame-h: 218px;
    --gallery-frame-h: 154px;
  }

  .hero {
    height: 210svh;
  }

  .result-figure .zoomable .media-frame,
  .result-figure .zoomable img {
    height: 360px;
  }
}

@media (max-width: 980px) {
  :root {
    --hero-stick-top: 64px;
    --overview-frame-h: 185px;
    --compare-frame-h: 204px;
    --gallery-frame-h: 144px;
  }

  #overview.section {
    padding-top: 8px;
    margin-top: -116px;
    scroll-margin-top: 78px;
  }

  .nav-row {
    min-height: auto;
    align-items: flex-start;
    padding: 10px 0 8px;
    gap: 8px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
  }

  .hero {
    height: 196svh;
    --hero-info-overlap: 82px;
  }

  .hero-card {
    width: min(95vw, 760px);
  }

  .why-grid,
  .metric-groups,
  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .gallery-lane {
    grid-template-rows: repeat(3, minmax(0, 1fr));
    grid-auto-columns: minmax(302px, 326px);
  }
}

@media (max-width: 680px) {
  .section {
    padding: 40px 0;
  }

  :root {
    --overview-frame-h: 193px;
    --compare-frame-h: 224px;
    --gallery-frame-h: 154px;
  }

  #overview.section {
    padding-top: 6px;
    margin-top: -86px;
    scroll-margin-top: 72px;
  }

  .hero {
    height: 182svh;
    --hero-info-overlap: 64px;
  }

  .hero-card {
    border-radius: 14px;
    padding: 14px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-authors,
  .hero-affiliations,
  .hero-tldr {
    font-size: 0.88rem;
  }

  .why-grid,
  .metric-groups,
  .method-grid {
    grid-template-columns: 1fr;
  }

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

  .overview-col,
  .method-card,
  .gallery-card {
    border-right: 0;
  }

  .overview-col {
    border-bottom: 1px solid var(--line);
  }

  .overview-grid .overview-col:last-child {
    border-bottom: 0;
  }

  .result-figure .zoomable .media-frame,
  .result-figure .zoomable img {
    height: 300px;
  }

  .gallery-lane {
    grid-auto-columns: minmax(274px, 292px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .gallery-rail {
    transform: none !important;
  }
}
