:root {
  --ink: #0d1b3a;
  --muted: #596987;
  --line: #dfe6f2;
  --paper: #ffffff;
  --canvas: #f5f7fb;
  --blue: #2764e7;
  --blue-soft: #eaf1ff;
  --orange: #ed7b16;
  --orange-soft: #fff1df;
  --green: #27a142;
  --green-soft: #e9f7e8;
  --navy: #08152f;
  --shadow: 0 18px 55px rgba(26, 51, 99, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
a { color: var(--blue); }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: .7rem 1rem;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 1rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.project-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #d9dee8;
}
.nav-inner {
  width: min(1120px, calc(100% - 2.5rem));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  line-height: 1;
}
.brand:hover { color: var(--ink); }
.brand-title {
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -.018em;
}
.brand-rule {
  width: 1px;
  height: 20px;
  background: #cbd1dc;
}
.brand-meta {
  color: #747f92;
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.nav-links a {
  position: relative;
  padding: .25rem 0;
  color: #4c5669;
  font-size: .79rem;
  font-weight: 650;
  letter-spacing: .015em;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -.1rem;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }
.nav-toggle {
  display: none;
  border: 0;
  border-bottom: 1px solid #aeb6c4;
  border-radius: 0;
  background: transparent;
  color: #475166;
  padding: .3rem 0 .22rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 740px;
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 14% 18%, rgba(58, 124, 255, .14), transparent 27%),
    radial-gradient(circle at 86% 30%, rgba(85, 205, 255, .13), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #f3f7ff 100%);
  border-bottom: 1px solid #dce6f8;
}
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: linear-gradient(rgba(56, 91, 155, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(56, 91, 155, .09) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.hero-orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; }
.hero-orb-one { width: 360px; height: 360px; left: -220px; bottom: -110px; background: #99bafd; }
.hero-orb-two { width: 280px; height: 280px; right: -150px; top: 45px; background: #b5f0d5; }
.hero-content { position: relative; z-index: 2; padding: 6.5rem 1.5rem 5.5rem; text-align: center; }
.eyebrow, .section-kicker {
  margin: 0 0 .75rem;
  color: var(--blue);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-section h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(3.2rem, 8vw, 6.7rem);
  font-weight: 850;
  line-height: .98;
  letter-spacing: -.075em;
}
.hero-section h1 span { color: var(--blue); }
.hero-question {
  max-width: 940px;
  margin: 1.4rem auto .9rem;
  color: #31415f;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -.035em;
}
.hero-summary { max-width: 760px; margin: 0 auto 1.8rem; color: var(--muted); font-size: 1.08rem; }
.authors { max-width: 1040px; margin: 0 auto .55rem; display: flex; justify-content: center; flex-wrap: wrap; gap: .12rem .85rem; color: #233658; font-weight: 650; }
.authors sup, .affiliations sup, .contribution-note sup { color: var(--blue); }
.affiliations { max-width: 980px; margin: .2rem auto; color: var(--muted); font-size: .87rem; }
.contribution-note { margin: .1rem auto 1.4rem; color: #7b879d; font-size: .8rem; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .65rem; }
.project-button {
  min-width: 150px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  border: 1px solid #ccd8ec;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #263754;
  padding: .68rem 1rem;
  font-size: .88rem;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(39, 66, 116, .07);
}
.project-button small { color: #8995a9; font-size: .67rem; font-weight: 700; }
.hero-stats {
  max-width: 890px;
  margin: 2.25rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(193, 210, 239, .92);
  border-radius: 18px;
  background: rgba(255,255,255,.7);
  box-shadow: 0 18px 50px rgba(50, 78, 132, .08);
  overflow: hidden;
}
.hero-stats div { padding: 1rem .75rem; border-right: 1px solid #dce5f5; }
.hero-stats div:last-child { border-right: none; }
.hero-stats strong { display: block; color: var(--ink); font-size: 1.6rem; line-height: 1.2; }
.hero-stats span { display: block; color: var(--muted); font-size: .78rem; }

.section { padding: 6.2rem 1.5rem; }
.section-heading { max-width: 760px; margin-bottom: 2.4rem; }
.section-heading.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-heading h2 {
  margin: 0 0 .8rem;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.section-heading > p:last-child { margin: 0; color: var(--muted); font-size: 1.03rem; }
.figure-shell { margin: 0; border: 1px solid var(--line); border-radius: 22px; background: white; overflow: hidden; box-shadow: var(--shadow); }
.figure-shell img { width: 100%; }
.figure-shell figcaption { padding: .8rem 1rem 1rem; color: #738099; font-size: .78rem; text-align: center; }
.teaser-section { background: #fff; }
.hero-figure { padding: .65rem; }
.hero-figure img { border-radius: 16px; }

.paper-section { background: var(--canvas); }
.abstract-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .72fr); gap: 2rem; align-items: start; }
.abstract-copy { color: #42516d; font-size: 1.02rem; }
.abstract-copy p { margin-top: 0; margin-bottom: 1rem; }
.abstract-copy .lead { color: var(--ink); font-size: 1.25rem; line-height: 1.52; font-weight: 650; }
.takeaway-card { position: sticky; top: 95px; border: 1px solid #c7d7fa; border-radius: 20px; background: linear-gradient(150deg, #f9fbff, #eaf1ff); padding: 1.65rem; box-shadow: 0 16px 40px rgba(39, 100, 231, .09); }
.takeaway-label { display: block; margin-bottom: .65rem; color: var(--blue); font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.takeaway-card p { margin: 0; color: #203352; font-size: 1.16rem; line-height: 1.5; }
.overview-banner { margin-top: 3.5rem; }
.overview-banner img { max-height: 770px; object-fit: cover; object-position: top; }
.track-grid { margin-top: 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.track-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; background: white; box-shadow: 0 12px 35px rgba(31, 52, 93, .06); }
.track-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; }
.gen-card::before { background: var(--blue); }
.fix-card::before { background: var(--orange); }
.opt-card::before { background: var(--green); }
.track-index { position: absolute; right: 1.2rem; top: .8rem; color: #dce4f2; font-size: 2.8rem; font-weight: 850; letter-spacing: -.08em; }
.track-label { margin: 0 0 .3rem; color: var(--blue); font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.fix-card .track-label { color: var(--orange); }
.opt-card .track-label { color: var(--green); }
.track-card h3 { position: relative; margin: 0 0 .75rem; color: var(--ink); font-size: 1.35rem; line-height: 1.25; }
.track-card > p:not(.track-label) { color: var(--muted); font-size: .92rem; }
.track-card ul { margin: 1rem 0 0 1.1rem; color: #41506a; font-size: .88rem; }
.track-card li { margin-bottom: .4rem; }

.leaderboard-section { background: var(--navy); color: white; }
.light-heading h2 { color: white; }
.light-heading > p:last-child { color: #aab8d2; }
.leaderboard-panel { overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 22px; background: #101f3f; box-shadow: 0 28px 80px rgba(0,0,0,.25); }
.leaderboard-tabs { display: flex; gap: .45rem; padding: 1rem 1rem .8rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.leaderboard-tab { border: 1px solid rgba(255,255,255,.14); border-radius: 999px; background: rgba(255,255,255,.05); color: #b8c5dc; padding: .62rem 1.2rem; font-weight: 800; cursor: pointer; }
.leaderboard-tab:hover, .leaderboard-tab:focus-visible { border-color: #78a3ff; color: white; }
.leaderboard-tab.is-active { border-color: #5f90ff; background: var(--blue); color: white; box-shadow: 0 8px 22px rgba(39,100,231,.32); }
.table-note { padding: .8rem 1.15rem; color: #9cafcf; font-size: .78rem; }
.table-wrap { overflow-x: auto; }
.results-table { width: 100%; min-width: 850px; border-collapse: collapse; color: #dfe7f6; font-size: .83rem; }
.results-table th, .results-table td { padding: .72rem .8rem; border-top: 1px solid rgba(255,255,255,.075); text-align: right; white-space: nowrap; }
.results-table th { position: sticky; top: 0; color: #91a4c7; background: #101f3f; font-size: .69rem; letter-spacing: .08em; text-transform: uppercase; }
.results-table th:nth-child(2), .results-table td:nth-child(2) { text-align: left; }
.results-table tbody tr:hover { background: rgba(255,255,255,.045); }
.results-table tbody tr:first-child { background: rgba(39,100,231,.13); }
.results-table td:first-child { color: #8da2c7; text-align: center; font-weight: 800; }
.results-table tbody tr:nth-child(1) td:first-child { color: #ffca4f; }
.results-table tbody tr:nth-child(2) td:first-child { color: #d4dded; }
.results-table tbody tr:nth-child(3) td:first-child { color: #d8935d; }
.results-table .overall { color: white; font-weight: 850; }

.findings-section { background: linear-gradient(180deg, #fff 0%, #f6f8fc 100%); }
.finding-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.finding-card { border: 1px solid var(--line); border-radius: 20px; padding: 1.6rem; background: linear-gradient(180deg, white, #fafcff); }
.finding-number { display: block; margin-bottom: .7rem; color: var(--blue); font-size: 2.6rem; font-weight: 850; letter-spacing: -.06em; line-height: 1; }
.finding-card:nth-child(2) .finding-number { color: var(--orange); }
.finding-card:nth-child(3) .finding-number { color: var(--green); }
.finding-card h3 { margin: 0 0 .55rem; color: var(--ink); font-size: 1.18rem; }
.finding-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.lifecycle-figure { margin-top: 3.5rem; display: grid; grid-template-columns: .72fr 1.8fr; gap: 2rem; align-items: center; }
.evidence-intro { padding: 1.5rem; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 14px 42px rgba(31, 52, 93, .07); }
.lifecycle-copy h3 { margin: 0 0 .65rem; color: var(--ink); font-size: 1.65rem; line-height: 1.2; }
.lifecycle-copy > p:last-child { color: var(--muted); }
.image-button { width: 100%; margin: 0; padding: 0; border: none; border-radius: 14px; background: transparent; cursor: zoom-in; overflow: hidden; }
.image-button img { width: 100%; transition: transform .28s ease; }
.image-button:hover img { transform: scale(1.012); }

.finding-stories { margin-top: 4.5rem; display: grid; gap: 2rem; }
.finding-story { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: 0 18px 55px rgba(31, 52, 93, .08); }
.finding-story::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; }
.story-gen::before { background: var(--blue); }
.story-fix::before { background: var(--orange); }
.story-opt::before { background: var(--green); }
.story-header { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 2rem; align-items: center; padding: 2rem 2rem 1.5rem; }
.story-track, .evidence-label { display: block; margin-bottom: .45rem; color: var(--blue); font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.story-fix .story-track, .story-fix .evidence-label { color: var(--orange); }
.story-opt .story-track, .story-opt .evidence-label { color: var(--green); }
.story-header h3 { margin: 0 0 .65rem; color: var(--ink); font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -.035em; }
.story-header p { max-width: 770px; margin: 0; color: var(--muted); }
.story-stat { border-left: 1px solid var(--line); padding-left: 1.5rem; }
.story-stat strong { display: block; color: var(--blue); font-size: 2.2rem; letter-spacing: -.055em; line-height: 1; }
.story-fix .story-stat strong { color: var(--orange); }
.story-opt .story-stat strong { color: var(--green); }
.story-stat span { display: block; margin-top: .45rem; color: #7a879c; font-size: .72rem; line-height: 1.35; }
.evidence-feature { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .7fr); gap: 1.5rem; align-items: center; margin: 0 1.5rem 1.5rem; padding: 1rem; border-radius: 18px; background: #f5f8fe; }
.story-fix .evidence-feature { background: #fff8ef; }
.story-opt .evidence-feature { background: #f2faef; }
.evidence-feature.reverse .evidence-image { order: 2; }
.evidence-image { min-height: 310px; display: flex; align-items: center; background: white; }
.evidence-image img { max-height: 410px; object-fit: contain; }
.evidence-copy { padding: 1rem; }
.evidence-copy h4 { margin: 0 0 .65rem; color: var(--ink); font-size: 1.35rem; line-height: 1.25; }
.evidence-copy p { margin: 0; color: var(--muted); font-size: .9rem; }
.evidence-pair, .evidence-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 0 1.5rem 1.5rem; }
.evidence-pair { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.evidence-card { overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 16px; background: white; }
.evidence-card .image-button { min-height: 225px; display: flex; align-items: center; border-radius: 0; background: #f8faff; }
.evidence-card img { max-height: 330px; object-fit: contain; }
.evidence-large .image-button { min-height: 320px; }
.evidence-large img { max-height: 420px; }
.evidence-card figcaption { padding: 1rem 1.1rem 1.15rem; color: var(--muted); font-size: .82rem; }
.evidence-card figcaption strong { color: var(--ink); }
.evidence-split.compact .evidence-card .image-button { min-height: 250px; }

.citation-section { background: var(--navy); }
.bibtex-card { position: relative; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: #0f2042; overflow: hidden; box-shadow: 0 22px 60px rgba(0,0,0,.25); }
.bibtex-card pre { margin: 0; padding: 1.6rem; overflow-x: auto; background: transparent; color: #dfe8f8; font-size: .8rem; line-height: 1.7; white-space: pre-wrap; }
.copy-button { position: absolute; right: .8rem; top: .8rem; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; background: #1d386a; color: white; padding: .48rem .75rem; font-size: .73rem; font-weight: 800; cursor: pointer; }
.copy-button:hover { background: var(--blue); }

.site-footer { padding: 2.2rem 1.5rem; background: #050e21; color: #8ea0c0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; font-size: .8rem; }
.footer-inner strong { color: white; }
.footer-inner p { margin: .25rem 0 0; max-width: 520px; }
.footer-inner a { color: #a9c5ff; }
.scroll-top { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 35; width: 43px; height: 43px; border: 1px solid #ccd8eb; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--ink); font-size: 1.2rem; font-weight: 800; box-shadow: 0 10px 28px rgba(24,50,95,.16); cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .22s ease; }
.scroll-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.image-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 4rem 2rem 2rem; background: rgba(3, 10, 25, .9); backdrop-filter: blur(10px); }
.image-modal[hidden] { display: none; }
.image-modal img { max-width: min(1500px, 96vw); max-height: 88vh; border-radius: 10px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.45); }
.modal-close { position: fixed; right: 1.4rem; top: 1rem; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(255,255,255,.1); color: white; font-size: 1.8rem; line-height: 1; cursor: pointer; }

@media (max-width: 900px) {
  .track-grid, .finding-grid { grid-template-columns: 1fr; }
  .abstract-grid { grid-template-columns: 1fr; }
  .takeaway-card { position: static; }
  .lifecycle-figure { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats div:nth-child(2) { border-right: none; }
  .hero-stats div:nth-child(-n+2) { border-bottom: 1px solid #dce5f5; }
  .story-header { grid-template-columns: 1fr; gap: 1.2rem; }
  .story-stat { border-left: none; border-top: 1px solid var(--line); padding: 1rem 0 0; }
  .evidence-feature { grid-template-columns: 1fr; }
  .evidence-feature.reverse .evidence-image { order: 0; }
  .evidence-pair { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  html { scroll-padding-top: 68px; }
  .section { padding: 4.6rem 1rem; }
  .hero-content { padding: 4.6rem 1rem 4rem; }
  .hero-section { min-height: auto; }
  .hero-section h1 { font-size: clamp(3rem, 17vw, 4.6rem); }
  .hero-question { font-size: 1.5rem; }
  .hero-summary { font-size: .98rem; }
  .nav-toggle { display: inline-flex; }
  .nav-inner { width: min(100% - 2rem, 1120px); }
  .brand-meta, .brand-rule { display: none; }
  .nav-links { position: absolute; top: 63px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid #d9dee8; background: white; padding: .55rem 1rem .75rem; box-shadow: 0 12px 24px rgba(13, 27, 58, .08); }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: .68rem 0; border-bottom: 1px solid #edf0f5; }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a::after { display: none; }
  .hero-actions { align-items: stretch; }
  .project-button { min-width: 135px; }
  .hero-stats strong { font-size: 1.3rem; }
  .hero-stats span { font-size: .7rem; }
  .overview-banner img { max-height: none; }
  .leaderboard-tabs { overflow-x: auto; }
  .evidence-intro { padding: 1rem; }
  .finding-stories { margin-top: 3rem; }
  .story-header { padding: 1.5rem 1.25rem 1rem; }
  .evidence-feature { margin: 0 1rem 1rem; padding: .65rem; }
  .evidence-image { min-height: 190px; }
  .evidence-pair, .evidence-split { grid-template-columns: 1fr; padding: 0 1rem 1rem; }
  .evidence-card .image-button, .evidence-large .image-button, .evidence-split.compact .evidence-card .image-button { min-height: 180px; }
  .footer-inner { flex-direction: column; }
  .bibtex-card pre { padding: 3.5rem 1rem 1.2rem; font-size: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
