:root {
  color-scheme: light;
  --ink: #142022;
  --muted: #647173;
  --paper: #fbfcf9;
  --mist: #edf4f2;
  --line: #d5dfdd;
  --teal: #13746f;
  --teal-dark: #083f3d;
  --red: #b55343;
  --gold: #be7b2b;
  --green: #47795f;
  --night: #071819;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(7, 21, 20, 0.14);
  --radius: 8px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: linear-gradient(180deg, rgba(4, 16, 16, 0.76), rgba(4, 16, 16, 0.28));
  backdrop-filter: blur(14px);
}

.brand,
.nav-links,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius);
  color: var(--night);
  background: var(--white);
  font-size: 0.86rem;
}

.nav-links {
  gap: clamp(14px, 2vw, 28px);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--white);
}

.hero {
  position: relative;
  display: flex;
  min-height: 76svh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 112px clamp(18px, 5vw, 72px) 64px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(7, 24, 25, 0.74), rgba(7, 24, 25, 0.34) 50%, rgba(7, 24, 25, 0.78)),
    linear-gradient(180deg, rgba(7, 24, 25, 0.16), rgba(7, 24, 25, 0.58)),
    url("./images/spatialact-hero-generated.png") center / cover no-repeat,
    var(--night);
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 30px;
  width: min(1280px, 100%);
  margin: 0 auto;
  justify-items: center;
}

.hero-content {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kicker,
.section-label,
.metric-tile span {
  margin: 0;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  width: 100%;
  max-width: 1280px;
  font-size: 2.45rem;
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-title-line {
  display: block;
}

.venue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  padding: 8px 14px;
  color: var(--white);
  background: rgba(7, 21, 20, 0.62);
  box-shadow: 0 12px 32px rgba(7, 21, 20, 0.22);
  font-size: 0.98rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.subtitle {
  margin: 18px 0 0;
  font-size: clamp(1.55rem, 4vw, 3rem);
  font-weight: 780;
  line-height: 1.05;
  max-width: 760px;
}

.authors {
  width: 100%;
  max-width: 1280px;
  margin: 24px auto 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  font-weight: 760;
  line-height: 1.35;
  white-space: normal;
}

.affiliations,
.corresponding-note {
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.72);
}

.affiliations {
  display: grid;
  gap: 4px;
  max-width: 1180px;
  font-size: 1.04rem;
}

.affiliation-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  line-height: 1.32;
  width: 100%;
}

.corresponding-note {
  font-size: 1.05rem;
}

.hero-actions {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 17px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  color: var(--white);
  background: var(--teal);
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.button-dark {
  color: var(--white);
  background: var(--teal-dark);
}

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

.button-light {
  color: var(--teal-dark);
  border-color: var(--line);
  background: var(--white);
}

.button-light:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.intro-band {
  border-bottom: 1px solid var(--line);
  background: var(--mist);
}

.intro-layout,
.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.intro-layout {
  max-width: 1060px;
  padding: clamp(34px, 5vw, 54px) 0;
  text-align: center;
}

.intro-layout h2,
.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.intro-layout p:last-child,
.section-heading p {
  color: var(--muted);
  font-size: 1.05rem;
}

.intro-layout p.abstract-copy {
  max-width: 1060px;
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.56;
}

.section {
  padding: clamp(34px, 5vw, 58px) 0;
}

.section-heading {
  margin: 0 auto clamp(16px, 3vw, 28px);
  max-width: 840px;
  text-align: center;
}

.section-heading p {
  margin: 12px auto 0;
}

.benchmark-heading {
  max-width: 1060px;
}

.benchmark-heading p,
.methods-section .section-heading p,
.citation {
  max-width: 1060px;
  font-size: 1.16rem;
  line-height: 1.62;
}

.benchmark-heading p {
  color: var(--ink);
}

.methods-section .section-heading p {
  color: var(--ink);
}

.methods-section > .section-heading > p:not(.section-label) {
  color: var(--ink) !important;
}

.intro-layout > .section-label,
.section-heading > .section-label {
  color: var(--gold);
  font-size: 1.28rem;
  line-height: 1.2;
}

.methods-section .section-heading,
.citation-section .section-heading {
  max-width: 1060px;
}

.metric-grid,
.method-grid {
  display: grid;
  gap: 14px;
}

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

.metric-tile,
.method-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 16px 45px rgba(16, 32, 34, 0.06);
}

.metric-tile {
  padding: 20px;
}

.metric-tile strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.15;
}

.metric-tile p,
.method-card p,
.indicator-panel p,
.citation {
  margin: 10px 0 0;
  color: var(--muted);
}

.content-figure {
  width: min(900px, 100%);
  margin: clamp(16px, 3vw, 26px) auto 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.content-figure img {
  width: 100%;
  background: transparent;
  border-radius: var(--radius);
}

.content-figure figcaption {
  padding: 10px 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.paper-callout {
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(18px, 3.5vw, 34px);
  align-items: center;
  margin-top: clamp(18px, 3vw, 30px);
}

.paper-callout-reverse .paper-figure {
  order: 2;
}

.methods-callout {
  grid-template-columns: minmax(250px, 0.62fr) minmax(520px, 1.38fr);
}

.paper-figure {
  width: 100%;
  margin: 0;
}

.paper-copy h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.2;
}

.paper-copy p {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.58;
}

.pipeline-panel {
  margin-top: clamp(20px, 3vw, 34px);
}

.pipeline-figure {
  width: min(900px, 100%);
}

.pipeline-copy {
  max-width: 1060px;
  margin: 18px auto 0;
  text-align: center;
}

.pipeline-copy h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.2;
}

.pipeline-copy p {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.58;
}

.indicator-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1.3fr);
  gap: clamp(12px, 2.4vw, 24px);
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(10px, 1.8vw, 14px);
  background: linear-gradient(135deg, #ffffff 0%, #eef1eb 100%);
}

.indicator-panel .section-label {
  font-size: 0.92rem;
}

.indicator-panel h3 {
  margin: 4px 0 0;
  font-size: 1.05rem;
  line-height: 1.12;
}

.indicator-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
}

.indicator-list span {
  border: 1px solid #d1d9d4;
  border-radius: var(--radius);
  padding: 4px 7px;
  color: var(--teal-dark);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 800;
}

.indicator-list span.level-1 {
  background: #e8f5f4;
}

.indicator-list span.level-2 {
  background: #eef4e8;
}

.indicator-list span.level-3 {
  background: #f4e8ee;
}

.indicator-list .indicator-row-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
  border: 0;
  padding: 0;
}

.methods-section {
  width: 100%;
  max-width: none;
  border-block: 1px solid var(--line);
  padding-inline: max(18px, calc((100% - 1180px) / 2));
  background: #eef1eb;
}

.methods-section .section-heading,
.methods-section .method-grid {
  width: min(1180px, 100%);
}

.method-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
}

.method-card {
  min-height: 250px;
  padding: 26px;
}

.method-index {
  color: var(--red);
  font-size: 0.86rem;
  font-weight: 900;
}

.method-card h3 {
  margin: 18px 0 0;
  font-size: 1.32rem;
  line-height: 1.15;
}

.method-mini-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.metric-explain-panel {
  display: grid;
  gap: clamp(16px, 3vw, 24px);
  margin-top: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 26px);
  background: var(--white);
  box-shadow: 0 16px 45px rgba(16, 32, 34, 0.06);
}

.metric-explain-heading {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.metric-explain-heading h3 {
  margin: 8px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.58rem);
  line-height: 1.2;
}

.metric-explain-heading p:last-child {
  margin: 10px auto 0;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.56;
}

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

.method-mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(16, 32, 34, 0.05);
}

.method-mini-card h4 {
  margin: 6px 0 0;
  font-size: 0.94rem;
  line-height: 1.2;
}

.method-mini-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.38;
}

.poster-section,
.case-section {
  border-top: 1px solid var(--line);
}

.poster-preview,
.results-board {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.poster-preview {
  margin: 0;
}

.poster-preview img {
  width: 100%;
  max-height: 820px;
  object-fit: contain;
  background: var(--white);
}

.poster-preview figcaption {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 14px;
  background: var(--white);
}

.case-preview {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.case-video {
  display: block;
  width: 100%;
  max-height: 760px;
  background: var(--night);
}

.case-preview figcaption {
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  color: var(--muted);
  background: var(--white);
  font-size: 0.95rem;
  line-height: 1.48;
  text-align: center;
}

.figures-section {
  border-top: 1px solid var(--line);
  background: var(--mist);
}

.results-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 14px;
  background: var(--white);
}

.results-tab {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--teal-dark);
  background: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
}

.results-tab[aria-selected="true"] {
  border-color: var(--teal);
  color: var(--white);
  background: var(--teal);
}

.results-list {
  display: grid;
  gap: 0;
}

.result-module {
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  padding: clamp(18px, 3vw, 30px);
  background: var(--white);
}

.result-module + .result-module {
  border-top: 1px solid var(--line);
}

.result-module-copy {
  max-width: 1040px;
}

.result-module-copy h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.58rem);
  line-height: 1.2;
}

.result-module-copy p:last-child {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.56;
}

.result-figure-grid {
  display: grid;
  gap: clamp(16px, 3vw, 26px);
}

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

.result-module-errors-finetuning .result-figure-grid-multiple {
  align-items: center;
}

.result-figure {
  margin: 0;
}

.result-figure-media {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.result-image-link {
  display: grid;
  place-items: center;
  padding: clamp(8px, 2vw, 16px);
  background: transparent;
}

.result-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 640px;
  object-fit: contain;
}

.result-figure-smallest .result-figure-media {
  max-width: 75%;
}

.result-figure-smaller .result-figure-media {
  max-width: 80%;
}

.result-figure-medium .result-figure-media {
  max-width: 86%;
}

.result-figure-medium img {
  max-height: 500px;
}

.result-figure-compact .result-figure-media {
  max-width: 66%;
}

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

.result-figure figcaption {
  padding: 8px 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.gallery-empty {
  border-top: 1px solid var(--line);
  padding: 16px;
  color: var(--muted);
}

.gallery-empty code {
  border-radius: 5px;
  padding: 2px 5px;
  background: var(--mist);
}

.citation-section {
  border-top: 1px solid var(--line);
  padding-bottom: clamp(38px, 5vw, 62px);
}

.citation {
  max-width: 1060px;
  margin-top: 18px;
}

.bibtex-panel {
  position: relative;
}

.citation-copy {
  position: absolute;
  top: 30px;
  right: 12px;
  z-index: 1;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.86rem;
}

.bibtex {
  max-width: 100%;
  margin: 18px 0 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 56px 18px 18px;
  color: #dcefed;
  background: var(--night);
  font-size: 0.9rem;
  line-height: 1.45;
}

.bibtex code {
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 106px;
  }

  .intro-layout,
  .indicator-panel,
  .paper-callout {
    grid-template-columns: 1fr;
  }

  .paper-callout-reverse .paper-figure {
    order: 0;
  }

  .methods-callout {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .method-grid,
  .metric-explain-grid,
  .result-figure-grid-multiple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .hero-title {
    font-size: 1.55rem;
  }

  .metric-grid,
  .method-grid,
  .metric-explain-grid,
  .result-figure-grid-multiple {
    grid-template-columns: 1fr;
  }

  .result-figure-compact .result-figure-media,
  .result-figure-medium .result-figure-media {
    max-width: 100%;
  }

  .button {
    width: 100%;
  }

  .citation-copy {
    width: fit-content;
  }

  .authors {
    white-space: normal;
    font-size: 0.98rem;
  }

  .affiliations {
    font-size: 0.88rem;
  }

  .hero-actions {
    align-items: stretch;
  }

  .indicator-list .indicator-row-break {
    display: none;
  }
}

.methods-copy {
  max-width: 1060px;
  margin: 12px auto 0;
  text-align: center;
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.62;
}

.methods-section .section-heading .methods-copy {
  color: var(--ink) !important;
}

.methods-section .section-heading > .section-label {
  color: var(--gold) !important;
}
