:root {
  --ink: #172138;
  --muted: #5d6c84;
  --line: #d5ddea;
  --line-dark: #aeb9ca;
  --paper: #ffffff;
  --soft: #f6f8fb;
  --blue: #3156a4;
  --blue-dark: #233f80;
  --green: #278143;
  --purple: #6540b5;
  --purple-soft: #f3effb;
  --green-soft: #eff8f1;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.section { padding: 5rem 1.5rem; }
.section-soft { background: var(--soft); border-block: 1px solid var(--line); }

.publication-header {
  position: relative;
  background:
    radial-gradient(circle at 14% 12%, rgba(49, 86, 164, 0.10), transparent 31%),
    radial-gradient(circle at 87% 76%, rgba(39, 129, 67, 0.08), transparent 29%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-bottom: 1px solid var(--line);
}

.publication-header .hero-body { padding: 4rem 1.5rem 3.5rem; }
.paper-logo { width: 96px; height: auto; margin-bottom: 0.45rem; }

.method-name {
  margin-bottom: 0.9rem;
  color: var(--purple);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.publication-title {
  max-width: 1320px;
  margin: 0 auto 1.7rem !important;
  color: var(--ink) !important;
  font-size: clamp(2.05rem, 2.75vw, 2.65rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.042em;
  line-height: 1.12 !important;
}

.title-line {
  display: block;
  white-space: nowrap;
}

.title-line:last-child {
  background: linear-gradient(100deg, var(--blue) 0%, var(--purple) 58%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.publication-authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 1.15rem; }
.publication-authors a { font-weight: 650; text-decoration: none; }
.publication-authors a:hover { color: var(--purple); text-decoration: underline; text-underline-offset: 4px; }
.publication-authors sup, .affiliations sup { color: var(--purple); font-weight: 700; }

.affiliations { margin: 0.75rem auto 1.45rem; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.affiliations p { margin: 0.16rem 0; }

.publication-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; }
.publication-links .button {
  min-width: 106px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(23, 33, 56, 0.96);
  box-shadow: 0 6px 18px rgba(23, 33, 56, 0.16);
  font-weight: 650;
  backdrop-filter: blur(8px);
  transition: transform 160ms ease, background 160ms ease;
}
.publication-links .button:hover { background: var(--blue); transform: translateY(-1px); }
.model-icon { font-size: 1rem; }

.teaser-section { padding-top: 2.75rem; }
.qualitative-section { padding-top: 3.5rem; }

.paper-figure {
  display: block;
  margin: 0 auto;
  background: transparent;
}

.paper-figure img { display: block; width: 100%; height: auto; }
.paper-figure-wide { max-width: 1400px; }
.paper-figure-stategen { max-width: 980px; }
.paper-figure-radar { max-width: 420px; }
.paper-figure-budget { max-width: 760px; }
.paper-figure-objectives { max-width: 820px; }
.qualitative-figure { max-width: 1400px; }

.video-examples-intro {
  max-width: 760px;
  margin: -1.2rem auto 2.2rem;
  color: var(--muted);
  text-align: center;
}

.video-tabs {
  max-width: 1180px;
  margin: 0 auto;
}

.video-tab-list {
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 1.5rem;
}

.video-example-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 2.4rem;
  align-items: start;
  padding: 1.5rem 0;
  border-block: 1px solid var(--line-dark);
}

.video-example-media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1020;
  object-fit: contain;
}

.video-source {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.video-question-label {
  margin: 0 0 0.25rem;
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-example-result h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 750;
  line-height: 1.45;
}

.reference-answer {
  margin: 0.85rem 0 1rem;
  color: #3c4b64;
}

.answer-table-wrap { border-top-color: var(--line-dark); }
.answer-table { font-size: 0.82rem; }
.answer-table th, .answer-table td { padding: 0.47rem 0.6rem; }
.answer-status { margin-left: 0.3rem; color: var(--green); font-size: 0.72rem; font-weight: 750; }

.prefix-tracking-panel { padding-top: 1.5rem; border-top: 1px solid var(--line-dark); }

.lead {
  max-width: 930px;
  margin: 1.6rem auto 0;
  color: #3c4b64;
  font-size: clamp(1.02rem, 1.8vw, 1.28rem);
  font-weight: 500;
}

.section-kicker, .eyebrow {
  margin-bottom: 0.42rem;
  color: var(--purple);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
}
.section-kicker.align-left { text-align: left; }

.title.is-3 {
  margin-bottom: 2.2rem !important;
  color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.abstract-text { max-width: 880px; margin-inline: auto; color: #334158; font-size: 1.07rem; }
.abstract-text p:not(:last-child) { margin-bottom: 1rem; }

.method-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 2.25rem;
  align-items: stretch;
  max-width: 1120px;
  margin: 2.3rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
}

.method-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.method-steps li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.method-steps li:first-child { padding-top: 0; }
.method-steps li:last-child { padding-bottom: 0; border-bottom: 0; }

.method-steps li > span {
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.method-steps h3, .result-block h3, .result-figure-block h3, .analysis-block h3 {
  margin: 0 0 0.28rem;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 750;
}

.method-steps p { margin: 0; color: var(--muted); }

.equation-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 1.25rem 1.35rem;
  border-left: 3px solid var(--purple);
  background: var(--purple-soft);
  color: #34285a;
  text-align: center;
}
.equation-block p { margin-top: 0.35rem; color: #625779; font-size: 0.92rem; }

.section-heading-split { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.8rem; }
.section-heading-split .title { margin-bottom: 0 !important; }
.section-heading-split > p { max-width: 560px; margin-bottom: 0.35rem; color: var(--muted); text-align: right; }
.figure-caption { max-width: 980px; margin: 1rem auto 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; text-align: center; }

.result-block { max-width: 1180px; margin: 0 auto; }
.result-block + .result-block { margin-top: 4.5rem; }
.result-block h3 { margin-bottom: 0.45rem; }
.result-intro, .table-note { color: var(--muted); font-size: 0.88rem; }
.result-intro { margin-bottom: 0.9rem; }
.table-note { margin-top: 0.7rem; }
.result-figure-block { text-align: center; }
.result-tabs, .analysis-tabs { max-width: 1180px; margin: 3rem auto 0; }

.tab-list {
  display: flex;
  justify-content: center;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 2rem;
  border-bottom: 1px solid var(--line-dark);
}

.tab-button {
  margin-bottom: -1px;
  padding: 0.7rem 1.15rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.tab-button:hover { color: var(--ink); }
.tab-button[aria-selected="true"] { color: var(--purple); border-bottom-color: var(--purple); }
.tab-button:focus-visible { outline: 3px solid rgba(101, 64, 181, 0.24); outline-offset: 3px; }
.tab-panel[hidden] { display: none; }

.results-detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(520px, 1.18fr);
  gap: 3rem;
  align-items: start;
}

.results-detail-grid .figure-caption { margin-top: 0.45rem; }

.table-scroll { width: 100%; overflow-x: auto; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.compact-table-wrap { width: min(100%, 760px); margin-inline: auto; }
.transfer-block .compact-table-wrap { margin-inline: auto; }
.transfer-block .table-note { max-width: 760px; margin-inline: auto; padding-top: 0.65rem; }

.paper-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  color: var(--ink);
  font-size: 0.83rem;
  line-height: 1.35;
}

.paper-table th, .paper-table td { padding: 0.6rem 0.72rem; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.paper-table th:first-child, .paper-table td:first-child { text-align: left; }
.paper-table thead th { color: var(--blue-dark); font-weight: 750; }
.paper-table thead tr:first-child th { background: #edf2f9; }
.paper-table thead tr:last-child th { background: #f5f7fb; }
.paper-table tbody tr:last-child td { border-bottom: 0; }
.paper-table .table-group th { padding: 0.55rem 0.72rem; background: #eef1f5; color: #46546b; font-size: 0.78rem; font-style: italic; font-weight: 650; text-align: left; }
.paper-table .human-row { color: #46546b; font-style: italic; }
.paper-table .ours-row { background: var(--green-soft); }
.paper-table .best-row { color: #205f33; }
.compact-table { font-size: 0.9rem; }
.compact-table th, .compact-table td { padding: 0.66rem 0.85rem; }

.analysis-block { max-width: 980px; margin: 0 auto; }
.analysis-block h3 { margin-bottom: 1.4rem; text-align: center; }

.footer { padding: 1.7rem 1.5rem; border-top: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: 0.8rem; }
.footer p { margin: 0; }
.footer a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.scroll-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 24px rgba(24, 34, 56, 0.24);
  cursor: pointer;
}
.scroll-to-top.is-visible { display: grid; place-items: center; }

.more-works-container { position: fixed; top: 1.1rem; right: 1.1rem; z-index: 50; }
.more-works-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.68rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(24, 34, 56, 0.88);
  color: #fff;
  box-shadow: 0 8px 24px rgba(24, 34, 56, 0.20);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.dropdown-arrow { font-size: 0.75rem; transition: transform 180ms ease; }
.more-works-btn[aria-expanded="true"] .dropdown-arrow { transform: rotate(180deg); }

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  width: min(430px, calc(100vw - 2rem));
  max-height: min(76vh, 710px);
  overflow: hidden;
  border: 1px solid rgba(213, 221, 234, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(20, 31, 54, 0.22);
  backdrop-filter: blur(18px);
}
.dropdown-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1rem 0.8rem; border-bottom: 1px solid var(--line); }
.dropdown-header .eyebrow { margin: 0; text-align: left; }
.dropdown-header h2 { margin: 0.1rem 0 0; font-size: 1.22rem; font-weight: 800; }
.close-btn { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--soft); color: var(--muted); cursor: pointer; }
.works-list { max-height: calc(min(76vh, 710px) - 84px); overflow-y: auto; padding: 0.45rem; }
.work-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem; color: var(--ink); text-decoration: none; transition: background 150ms ease; }
.work-item + .work-item { border-top: 1px solid rgba(213, 221, 234, 0.75); }
.work-item:hover { background: rgba(246, 248, 251, 0.92); color: var(--ink); }
.work-item span { min-width: 0; }
.work-item strong, .work-item small, .work-item em { display: block; }
.work-item strong { font-size: 0.92rem; }
.work-item small { margin: 0.06rem 0 0.15rem; color: var(--purple); font-size: 0.71rem; font-weight: 750; }
.work-item em { color: var(--muted); font-size: 0.74rem; font-style: normal; line-height: 1.35; }
.work-item > svg { flex: 0 0 auto; color: #93a0b4; font-size: 0.76rem; }

@media (max-width: 1050px) {
  .title-line { white-space: normal; }
  .publication-title { max-width: 820px; }
}

@media (max-width: 900px) {
  .section { padding: 4rem 1.1rem; }
  .section-heading-split { display: block; }
  .section-heading-split > p { margin-top: 0.6rem; text-align: left; }
  .method-summary, .results-detail-grid { grid-template-columns: 1fr; }
  .video-example-grid { grid-template-columns: 1fr; }
  .video-tab-list { overflow-y: hidden; }
  .method-summary { gap: 1.5rem; }
  .results-detail-grid { gap: 2.5rem; }
  .video-example-grid { gap: 1.25rem; }
  .result-block + .result-block { margin-top: 3.75rem; }
}

@media (max-width: 600px) {
  .publication-header .hero-body { padding: 5.5rem 1rem 3rem; }
  .paper-logo { width: 82px; }
  .method-name { font-size: 0.7rem; }
  .publication-title { font-size: 1.95rem !important; line-height: 1.13 !important; }
  .publication-authors { gap: 0.3rem 0.75rem; font-size: 0.91rem; }
  .affiliations { font-size: 0.77rem; }
  .method-summary { padding-top: 1rem; }
  .method-steps li { grid-template-columns: 36px minmax(0, 1fr); gap: 0.65rem; }
  .equation-block { padding: 1rem 0.75rem; font-size: 0.8rem; }
  .tab-list { width: 100%; }
  .tab-button { flex: 1; padding: 0.65rem 0.6rem; font-size: 0.8rem; }
  .video-tab-list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; }
  .video-tab-list .tab-button { flex: 0 0 auto; }
  .paper-table { font-size: 0.75rem; }
  .paper-table th, .paper-table td { padding: 0.55rem 0.5rem; }
  .more-works-container { right: 0.7rem; top: 0.7rem; }
  .more-works-btn { padding: 0.6rem 0.8rem; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
