:root {
  --bg: #fff;
  --soft: #f6f7f9;
  --text: #1e2430;
  --muted: #666f7d;
  --line: #e2e6eb;
  --accent: #3867d6;
  --accent2: #6f42c1;
  --dark: #11151c;
  --dark-card: #1c222d;
  --max: 1120px;
  --narrow: 860px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { display: block; width: 100%; height: auto; }

.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.container.narrow { max-width: var(--narrow); }
.center { text-align: center; }

.hero { padding: 64px 0 28px; }
.venue {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--accent);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .03em;
  margin-bottom: 16px;
}

h1, h2, h3 { line-height: 1.25; margin-top: 0; }
h1 {
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  letter-spacing: -.035em;
  margin: 0 auto 18px;
  max-width: 720px;
  font-weight: 800;
}
h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  letter-spacing: -.025em;
  margin-bottom: 14px;
}
h3 { font-size: 1.05rem; margin-bottom: 8px; }

.brand {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.authors { font-size: 1.02rem; margin-bottom: 5px; }
.affiliations {
  color: var(--muted);
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}
.equal-contribution { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }

.link-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 18px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 700;
}
.button:hover { text-decoration: none; border-color: #b6bfcb; }
.button.primary { color: #fff; background: var(--dark); border-color: var(--dark); }

.tagline {
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(.82rem, 1.15vw, .98rem);
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
}

.section { padding: 58px 0; }
.section.soft { background: var(--soft); }

.figure { margin: 0; }
.figure img, .figure video {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}
.figure figcaption {
  max-width: 900px;
  margin: 12px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
}
.hero-figure img { border-radius: 20px; }

.contribution-grid,
.result-grid,
.gallery,
.demo-grid { display: grid; gap: 18px; }
.contribution-grid { grid-template-columns: repeat(3, 1fr); margin-top: 34px; }
.mini-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.mini-card p { margin: 0; color: var(--muted); font-size: .94rem; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}
.section-heading > p { max-width: 440px; margin: 0; color: var(--muted); }
.method-heading { align-items: flex-end; flex-wrap: nowrap; gap: 16px; }
.method-heading .method-tagline {
  white-space: nowrap;
  max-width: none;
  flex-shrink: 0;
  font-size: clamp(.82rem, 1.2vw, .98rem);
}

.method-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.method-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.pipeline-panel { margin: 0; }
.pipeline-video {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .78rem;
  margin-bottom: 7px;
}
.step {
  padding: 16px 0 0;
  border-top: 2px solid var(--line);
}
.step-index { color: var(--accent); font-weight: 800; margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; }

.dark { background: var(--dark); color: #fff; }
.inverse .eyebrow { color: #9cb7ff; }
.inverse h2 { color: #fff; }
.result-grid { grid-template-columns: repeat(3, 1fr); }
.result-card {
  padding: 24px;
  border-radius: 16px;
  background: var(--dark-card);
  border: 1px solid #2c3441;
}
.result-value {
  font-size: clamp(1.9rem, 3vw, 3rem);
  font-weight: 800;
  letter-spacing: -.04em;
  color: #dce6ff;
  margin-bottom: 6px;
}
.result-card p { color: #bbc4d1; margin-bottom: 0; }
.result-note {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 3px solid #8ba8ff;
  background: #171d27;
  color: #cbd3df;
}

.gallery, .demo-grid { grid-template-columns: repeat(3, 1fr); }
.demo-video {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
.demo-panel figcaption { margin-top: 10px; }
.video-placeholder {
  min-height: 190px;
  border: 1px dashed #aab2bd;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56,103,214,.08), rgba(111,66,193,.06)), #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.video-placeholder span { color: var(--text); font-weight: 800; font-size: 1.05rem; }

.citation-box {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8f9fb;
  overflow: hidden;
}
.citation-box pre {
  overflow-x: auto;
  padding: 24px;
  margin: 0;
  font-size: .9rem;
  line-height: 1.55;
}
.copy-button {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 11px;
  font-weight: 700;
  cursor: pointer;
}

footer {
  padding: 34px 0 50px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .section { padding: 44px 0; }
  .contribution-grid,
  .result-grid,
  .gallery,
  .demo-grid { grid-template-columns: 1fr; }
  .method-stages { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .method-heading { flex-wrap: wrap; }
  .method-heading .method-tagline { white-space: normal; }
  .tagline {
    white-space: normal;
    font-size: .95rem;
  }
  h1 { max-width: 100%; }
}
