:root {
  --ink: #15202b;
  --ink-soft: #465666;
  --muted: #71808e;
  --teal: #0f766e;
  --teal-dark: #0b5f59;
  --teal-soft: #e8f5f2;
  --blue: #2563a6;
  --purple: #6f5aa6;
  --orange: #c46b16;
  --paper: #ffffff;
  --tint: #f6f9f8;
  --line: #dfe7e5;
  --shadow: 0 18px 50px rgba(21, 32, 43, 0.08);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

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.7;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--teal-dark);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.8rem;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.project-container {
  width: min(1120px, calc(100% - 3rem));
  max-width: none !important;
}

.text-container {
  width: min(850px, calc(100% - 3rem));
  max-width: none !important;
}

.site-nav {
  position: sticky;
  z-index: 100;
  top: 0;
  height: 66px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(223, 231, 229, 0.9);
  backdrop-filter: blur(15px);
}

.nav-inner {
  width: min(1180px, calc(100% - 2.5rem));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 10px;
  font-size: 0.72rem;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.55rem;
  margin-left: auto;
}

.nav-links a,
.nav-github {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

.nav-links a:hover,
.nav-github:hover {
  color: var(--teal);
}

.nav-github {
  padding: 0.42rem 0.76rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.project-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 15%, rgba(15, 118, 110, 0.11), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(111, 90, 166, 0.09), transparent 30%),
    linear-gradient(180deg, #fbfefd 0%, #fff 86%);
}

.project-hero::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -165px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(15, 118, 110, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(15, 118, 110, 0.025), 0 0 0 92px rgba(15, 118, 110, 0.018);
  pointer-events: none;
}

.project-hero .hero-body {
  position: relative;
  z-index: 1;
  padding: 6.25rem 1.5rem 4.1rem;
}

.paper-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
  padding: 0.38rem 0.76rem;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-title.title {
  max-width: 1000px;
  margin: 0 auto 0.65rem;
  color: var(--ink);
  font-size: clamp(3.2rem, 7.6vw, 6.35rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.publication-subtitle {
  max-width: 850px;
  margin: 0 auto 2rem;
  color: var(--ink-soft);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.35rem, 2.55vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
}

.publication-authors {
  max-width: 930px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 1.05rem;
  row-gap: 0.22rem;
  color: var(--teal);
  font-size: 0.94rem;
  font-weight: 600;
}

.publication-authors span:not(:last-child)::after {
  content: "·";
  margin-left: 1.05rem;
  color: #a9b8b5;
}

.publication-institutions {
  max-width: 870px;
  margin: 0.8rem auto 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 2rem;
}

.project-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 118px;
  padding: 0.68rem 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d9e2e0;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(21, 32, 43, 0.045);
  font-size: 0.9rem;
  font-weight: 650;
  justify-content: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.project-button:hover {
  color: var(--teal-dark);
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 10px 24px rgba(21, 32, 43, 0.09);
  transform: translateY(-2px);
}

.button-icon {
  min-width: 1.45rem;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 800;
}

.arxiv-icon {
  color: #b31b1b;
}

.section {
  padding: 6rem 1.5rem;
}

.section-tint {
  background: var(--tint);
  border-top: 1px solid rgba(223, 231, 229, 0.65);
  border-bottom: 1px solid rgba(223, 231, 229, 0.65);
}

.teaser-section {
  padding-top: 1rem;
  padding-bottom: 5.8rem;
}

.section-eyebrow {
  margin: 0 0 0.55rem;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-title {
  margin: 0 0 1.3rem;
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-lead {
  max-width: 780px;
  margin: 0 auto 3rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: center;
}

.abstract-copy {
  color: var(--ink-soft);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.14rem;
  line-height: 1.88;
}

.abstract-copy p:not(:last-child) {
  margin-bottom: 1.1rem;
}

.abstract-copy strong {
  color: var(--ink);
  font-weight: 600;
}

.figure-card {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.figure-card img {
  display: block;
  width: 100%;
  height: auto;
}

.figure-card figcaption {
  padding: 1rem 1.25rem 1.1rem;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.hero-figure {
  box-shadow: 0 24px 60px rgba(21, 32, 43, 0.1);
}

.hero-figure.architecture-figure {
  max-width: 1120px;
}

.hero-figure figcaption {
  padding-top: 0.72rem;
  padding-bottom: 0.78rem;
}

.contribution-section {
  padding-top: 6.3rem;
  padding-bottom: 6.3rem;
}

.contribution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.8rem;
}

.contribution-card {
  position: relative;
  min-height: 245px;
  padding: 2rem 1.75rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contribution-card:hover {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 16px 35px rgba(21, 32, 43, 0.07);
  transform: translateY(-3px);
}

.card-number {
  display: block;
  margin-bottom: 2rem;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.contribution-card h3 {
  margin: 0 0 0.65rem;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 700;
}

.contribution-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.7;
}

.architecture-figure {
  max-width: 1040px;
  margin: 0 auto;
}

.architecture-crop {
  position: relative;
  aspect-ratio: 2.05 / 1;
  overflow: hidden;
  background: #fff;
}

.architecture-crop img {
  position: absolute;
  top: -38%;
  left: -12.5%;
  width: 125%;
  max-width: none;
  height: auto;
}

.benchmark-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.75fr);
  align-items: center;
  gap: 1rem;
}

.benchmark-figure {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0.4rem;
}

.benchmark-figure img {
  width: 100%;
  max-height: none;
  object-fit: contain;
}

.track-stack {
  display: grid;
  gap: 0.9rem;
}

.track-card {
  position: relative;
  padding: 1.15rem 1.3rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.track-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--teal);
}

.track-catalog::before {
  background: var(--purple);
}

.track-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.track-label {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.track-heading strong {
  color: var(--teal);
  font-size: 0.84rem;
}

.track-catalog .track-heading strong {
  color: var(--purple);
}

.track-card > p {
  margin: 0 0 0.8rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
}

.track-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.track-stats div {
  padding-right: 0.8rem;
}

.track-stats div:not(:first-child) {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.track-stats dt {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.track-stats dd {
  margin: 0.2rem 0 0;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
}

.result-main-figure {
  margin-bottom: 1.5rem;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 1.5rem;
  align-items: stretch;
}

.finding-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 460px;
  padding: 2.4rem;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.12), transparent 35%),
    var(--teal-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.finding-label {
  margin: 0 0 0.8rem;
  color: #9de0d8;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.finding-panel h3 {
  margin: 0 0 1rem;
  color: #fff;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  font-weight: 600;
  line-height: 1.15;
}

.finding-panel > p:not(.finding-label) {
  margin: 0;
  color: rgba(255, 255, 255, 0.83);
  font-size: 0.96rem;
  line-height: 1.75;
}

.finding-panel > p strong {
  color: #fff;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.metric-row div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.metric-row strong {
  color: #fff;
  font-size: 1.32rem;
  letter-spacing: -0.03em;
}

.metric-row span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.68rem;
  line-height: 1.35;
}

.heatmap-figure {
  display: flex;
  flex-direction: column;
  min-height: 460px;
}

.heatmap-figure img {
  min-height: 0;
  flex: 1;
  object-fit: contain;
  padding: 1rem 1.2rem 0.5rem;
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.text-link {
  flex: none;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
}

.code-shell {
  overflow: hidden;
  background: #111b24;
  border: 1px solid #26333d;
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(17, 27, 36, 0.16);
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem 0.65rem 1.15rem;
  color: #8da0ad;
  background: #18242e;
  border-bottom: 1px solid #2b3943;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.copy-button {
  padding: 0.34rem 0.65rem;
  color: #c5d4dc;
  background: transparent;
  border: 1px solid #3b4a55;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-size: 0.66rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.copy-button:hover {
  color: #fff;
  border-color: #6e848f;
}

.code-shell pre {
  margin: 0;
  padding: 1.45rem;
  overflow-x: auto;
  color: #d9e4e9;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.83rem;
  line-height: 1.75;
  white-space: pre;
}

.citation-shell pre {
  font-size: 0.76rem;
}

.site-footer {
  padding: 3.5rem 1.5rem 2rem;
  color: #aab6be;
  background: #111b24;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner strong {
  color: #fff;
  font-size: 1.05rem;
}

.footer-inner p {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 1.3rem;
}

.footer-links a {
  color: #cbd5da;
  font-size: 0.82rem;
  font-weight: 600;
}

.footer-links a:hover,
.template-credit a:hover {
  color: #fff;
}

.template-credit {
  max-width: 850px;
  margin: 1.5rem auto 0;
  color: #788995;
  font-size: 0.68rem;
  line-height: 1.6;
  text-align: center;
}

.template-credit a {
  color: #9ab0ba;
  text-decoration: underline;
  text-decoration-color: rgba(154, 176, 186, 0.45);
  text-underline-offset: 2px;
}

.scroll-top {
  position: fixed;
  z-index: 90;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--teal);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.3);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.scroll-top:hover {
  background: var(--teal-dark);
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-github {
    margin-left: auto;
  }

  .project-hero .hero-body {
    padding-top: 4.8rem;
  }

  .contribution-grid,
  .benchmark-layout,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .contribution-card {
    min-height: auto;
  }

  .benchmark-figure img {
    max-height: 430px;
  }

  .finding-panel {
    min-height: auto;
  }

  .heatmap-figure {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .project-container,
  .text-container {
    width: min(100% - 2rem, 1120px);
  }

  .nav-inner {
    width: calc(100% - 1.5rem);
  }

  .site-nav {
    height: 58px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .project-hero .hero-body {
    padding: 4rem 1rem 3rem;
  }

  .publication-title.title {
    font-size: clamp(2.7rem, 14vw, 4.2rem);
  }

  .publication-subtitle {
    font-size: 1.22rem;
  }

  .publication-authors {
    column-gap: 0.7rem;
    font-size: 0.82rem;
  }

  .publication-authors span:not(:last-child)::after {
    margin-left: 0.7rem;
  }

  .publication-institutions {
    font-size: 0.74rem;
  }

  .project-button {
    min-width: calc(50% - 0.4rem);
  }

  .section {
    padding: 4.4rem 1rem;
  }

  .teaser-section {
    padding-top: 0;
    padding-bottom: 4.2rem;
  }

  .figure-card,
  .contribution-card,
  .track-card,
  .finding-panel,
  .code-shell {
    border-radius: 13px;
  }

  .architecture-crop {
    aspect-ratio: 2.05 / 1;
  }

  .track-heading,
  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .track-stats {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .track-stats div,
  .track-stats div:not(:first-child) {
    padding: 0;
    border-left: 0;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .metric-row div {
    display: grid;
    grid-template-columns: 95px 1fr;
    align-items: baseline;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .citation-shell pre {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-nav,
  .scroll-top,
  .copy-button {
    display: none !important;
  }

  .section,
  .project-hero .hero-body {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .figure-card,
  .contribution-card,
  .finding-panel,
  .code-shell {
    box-shadow: none;
    break-inside: avoid;
  }
}
