@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/Source_Sans_3/SourceSans3-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/Source_Serif_4/SourceSerif4-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --paper-soft: #f6f8f5;
  --paper-cool: #f3f7f9;
  --ink: #182022;
  --muted: #58676a;
  --line: #dce4e2;
  --teal: #1e6c75;
  --green: #4f8a58;
  --gold: #b9792b;
  --rose: #b94c5a;
  --blue: #4c6f9f;
  --shadow: 0 16px 48px rgba(24, 32, 34, 0.08);
  --content-max: 1040px;
  --reader-max: 820px;
  --figure-max: 900px;
  --gutter: 48px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

sup {
  font-size: 0.65em;
  line-height: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(var(--content-max), calc(100% - var(--gutter)));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--teal);
  font-weight: 800;
  font-size: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3d494b;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a {
  border-radius: 8px;
  padding: 8px 12px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--paper-cool);
  color: var(--teal);
  outline: none;
}

.container {
  width: min(var(--content-max), calc(100% - var(--gutter)));
  margin: 0 auto;
}

.narrow {
  width: min(var(--reader-max), calc(100% - var(--gutter)));
}

.section {
  padding: 76px 0;
}

.section-band {
  background: var(--paper-soft);
}

.hero {
  padding: 56px 0 48px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: start;
  text-align: center;
}

.hero-copy {
  min-width: 0;
  max-width: 920px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  font-weight: 800;
}

h1 {
  max-width: 900px;
  margin: 0 auto;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 44px;
  line-height: 1.12;
}

h1 span {
  color: var(--teal);
}

h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 34px;
}

h3 {
  font-size: 21px;
}

.hero-lede {
  max-width: 820px;
  margin: 18px 0 20px;
  margin-left: auto;
  margin-right: auto;
  color: #334043;
  font-size: 18px;
  line-height: 1.5;
}

.author-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  max-width: 780px;
  margin: 0 auto;
  color: #263234;
  font-size: 15px;
  font-weight: 650;
}

.author-list a:hover,
.author-list a:focus-visible {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.affiliation,
.note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.action-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: #253033;
  padding: 8px 14px;
  font-weight: 750;
  box-shadow: 0 1px 0 rgba(24, 32, 34, 0.04);
}

.action-button:hover,
.action-button:focus-visible {
  border-color: rgba(30, 108, 117, 0.42);
  color: var(--teal);
  outline: none;
}

.action-button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.action-button.primary:hover,
.action-button.primary:focus-visible {
  background: #185d65;
  color: #ffffff;
}

.action-button.disabled {
  border-color: var(--line);
  color: #778184;
  cursor: default;
}

.action-button.disabled:hover {
  border-color: var(--line);
  color: #778184;
}

.hero-figure,
.figure-panel,
.demo-card {
  margin: 0;
}

.hero-figure {
  width: 100%;
  max-width: 830px;
  margin: 0 auto;
  justify-self: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-figure img {
  border-radius: 6px;
}

.section-heading {
  max-width: var(--content-max);
  margin: 0 auto 28px;
  text-align: left;
}

.section-heading p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.section-heading-spaced {
  margin-top: 50px;
}

.abstract-text {
  color: #273336;
  font-size: 18px;
}

.abstract-text p {
  margin: 0 0 18px;
}

.question-card {
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--paper-cool);
  margin: 24px 0;
  padding: 18px 20px;
}

.question-card span {
  display: block;
  color: var(--teal);
  font-size: 14px;
  font-weight: 850;
  text-transform: uppercase;
}

.question-card p {
  margin: 8px 0 0;
  color: #223033;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.32;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.stat-card {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 18px;
}

.stat-card strong {
  display: block;
  color: var(--teal);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 34px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.35;
}

.method-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto 18px;
}

.method-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 20px;
}

.problem-evidence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  gap: 18px;
  align-items: stretch;
  max-width: var(--figure-max);
  margin: 0 auto;
}

.problem-evidence .figure-panel {
  margin: 0;
}

.problem-figure {
  max-width: 460px;
  justify-self: end;
}

.problem-figure figcaption {
  font-size: 14px;
  line-height: 1.35;
}

.problem-summary-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.problem-summary-card h3 {
  font-size: 22px;
}

.problem-summary-card .method-formula {
  font-size: 14px;
  margin-top: 12px;
  padding: 9px 10px;
}

.method-card > span {
  display: inline-block;
  color: var(--teal);
  font-size: 14px;
  font-weight: 850;
  text-transform: uppercase;
}

.method-card h3 {
  margin-top: 8px;
}

.method-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.method-formula {
  overflow-x: auto;
  border-radius: 8px;
  background: #edf4f3;
  color: #1f4f55 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 750;
  padding: 10px 12px;
  white-space: nowrap;
}

.design-notes {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  max-width: var(--figure-max);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbf6 100%);
  margin: 18px auto 24px;
  padding: 22px;
}

.design-notes h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
}

.design-notes p {
  margin: 12px 0 0;
  color: var(--muted);
}

.variant-list {
  display: grid;
  gap: 12px;
}

.variant-list div {
  border-left: 3px solid var(--gold);
  padding-left: 14px;
}

.variant-list strong {
  color: #263234;
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: var(--figure-max);
  margin: 0 auto 18px;
}

.variant-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 20px;
}

.variant-card.emphasized {
  border-color: rgba(30, 108, 117, 0.35);
  background: #f2f8f7;
}

.variant-card span {
  display: inline-block;
  color: var(--gold);
  font-size: 14px;
  font-weight: 850;
  text-transform: uppercase;
}

.variant-card.emphasized span {
  color: var(--teal);
}

.variant-card h3 {
  margin-top: 8px;
}

.variant-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto 24px;
}

.principle-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 20px;
}

.principle-card span {
  display: inline-block;
  color: var(--gold);
  font-size: 14px;
  font-weight: 850;
}

.principle-card h3 {
  margin-top: 8px;
}

.principle-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.figure-panel {
  max-width: var(--figure-max);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(24, 32, 34, 0.06);
}

.figure-panel img {
  width: 100%;
  background: #ffffff;
}

.figure-panel figcaption {
  border-top: 1px solid var(--line);
  color: #4b595c;
  font-size: 15px;
  font-weight: 650;
  padding: 12px 16px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.figure-panel.wide {
  margin: 18px auto 0;
}

.core-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  max-width: var(--figure-max);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #162123;
  color: #eef7f4;
  margin: 18px auto 0;
  padding: 24px;
}

.core-panel h2 {
  color: #ffffff;
}

.core-panel p {
  margin: 0;
  color: #d8e7e3;
  font-size: 19px;
}

.core-panel .eyebrow {
  color: #79c2b4;
  margin-bottom: 12px;
}

.experiment-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  gap: 18px;
  align-items: start;
  max-width: 940px;
  margin: 0 auto;
}

.experiment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
  box-shadow: 0 10px 34px rgba(24, 32, 34, 0.05);
}

.experiment-card h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
}

.experiment-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.experiment-card .eyebrow {
  margin-bottom: 10px;
}

.metric-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 18px 0;
}

.metric-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 15px;
  text-align: center;
}

.metric-table th,
.metric-table td {
  border-right: 1px solid var(--line);
  padding: 10px 12px;
  white-space: nowrap;
}

.metric-table th:last-child,
.metric-table td:last-child {
  border-right: 0;
}

.metric-table th {
  background: #edf4f3;
  color: #23494f;
  font-weight: 850;
}

.metric-table td {
  color: #263234;
  font-weight: 800;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

.demo-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
}

.demo-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #edf2f2;
}

.demo-card figcaption {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  color: #273336;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

.bibtex {
  margin: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #162123;
  color: #eef7f4;
  padding: 20px;
  font-size: 14px;
  line-height: 1.55;
}

.bibtex code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-cool);
  color: var(--muted);
}

.footer-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
}

.footer-inner a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--teal);
}

@media (max-width: 1040px) {
  .hero-layout,
  .result-grid,
  .experiment-grid,
  .core-panel {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    width: min(var(--content-max), calc(100% - var(--gutter)));
    gap: 28px;
  }

  .hero-figure {
    max-width: 100%;
    margin-top: 0;
    justify-self: center;
  }

  .principle-grid,
  .method-flow,
  .problem-evidence,
  .design-notes,
  .variant-grid,
  .stat-grid,
  .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .design-notes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 28px;
  }

  body {
    font-size: 16px;
  }

  .nav-shell,
  .container,
  .narrow {
    width: min(calc(100% - var(--gutter)), var(--content-max));
  }

  .nav-shell {
    min-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .section {
    padding: 58px 0;
  }

  .hero {
    padding: 42px 0 40px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 28px;
  }

  .hero-lede,
  .section-heading p:not(.eyebrow),
  .abstract-text {
    font-size: 17px;
  }

  .question-card p {
    font-size: 20px;
  }

  .author-list {
    font-size: 15px;
  }

  .stat-grid,
  .principle-grid,
  .method-flow,
  .problem-evidence,
  .design-notes,
  .variant-grid,
  .experiment-grid,
  .core-panel,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 96px;
  }

  .hero-figure,
  .figure-panel,
  .problem-evidence,
  .problem-figure,
  .design-notes,
  .variant-grid,
  .core-panel,
  .experiment-grid,
  .demo-grid {
    max-width: 100%;
  }
}
