:root {
  --ink: #141817;
  --muted: #626b68;
  --paper: #f4f5f1;
  --surface: #ffffff;
  --line: #dfe5df;
  --teal: #0c766d;
  --teal-dark: #0c4744;
  --coral: #b84f3d;
  --amber: #b67d25;
  --blue: #315c91;
  --shadow: 0 18px 48px rgba(26, 34, 34, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Aptos", "Calibri", "Segoe UI", "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.62;
}

a {
  color: inherit;
}

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

.site-nav {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  color: #fff;
  background: rgba(11, 18, 18, 0.58);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

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

.site-nav nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
  font-size: 0.94rem;
}

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

.site-nav nav a:hover,
.site-nav nav a.active {
  color: #fff;
}

.hero {
  position: relative;
  min-height: 88svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #111;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/hero_board.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
  filter: saturate(0.98) contrast(1.01);
}

.hero-shade {
  background:
    linear-gradient(180deg, rgba(7, 13, 14, 0.08) 0%, rgba(7, 13, 14, 0.28) 52%, rgba(7, 13, 14, 0.76) 100%),
    linear-gradient(90deg, rgba(8, 51, 50, 0.78) 0%, rgba(8, 51, 50, 0.43) 36%, rgba(8, 51, 50, 0.08) 72%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 118px 0 72px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero .eyebrow {
  color: #ffd8b7;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(4.7rem, 12vw, 10rem);
  line-height: 0.88;
  letter-spacing: 0;
  font-weight: 800;
}

.subtitle {
  max-width: 900px;
  margin-bottom: 20px;
  font-size: clamp(1.18rem, 2.4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.16;
}

.authors,
.affiliation {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
}

.button-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.button-row {
  margin-top: 26px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
}

.button.primary {
  color: #102c2a;
  background: #f9dcc4;
  border-color: #f9dcc4;
}

.tag-row {
  max-width: 860px;
  margin-top: 18px;
}

.tag-row span {
  padding: 7px 11px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.insights article {
  min-height: 170px;
  padding: clamp(24px, 4vw, 44px);
  background: var(--surface);
}

.insights strong {
  display: block;
  margin-bottom: 12px;
  color: var(--teal-dark);
  font-size: clamp(2.1rem, 5vw, 4.1rem);
  line-height: 1;
  letter-spacing: 0;
}

.insights span {
  display: block;
  max-width: 390px;
  color: var(--muted);
  font-weight: 650;
}

.section {
  padding: clamp(64px, 8vw, 112px) clamp(18px, 5vw, 72px);
}

.section-copy,
.section-heading {
  width: min(1120px, 100%);
  margin: 0 auto 30px;
}

.section-copy {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.section-copy h2,
.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 800;
}

.section-copy p:not(.section-kicker) {
  color: #383b3e;
  font-size: 1.03rem;
}

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

.figure-frame,
.wide-figure,
.gallery-figure,
.evidence-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.figure-frame {
  width: min(1120px, 100%);
  margin: 34px auto 0;
}

figcaption {
  padding: 14px 18px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.method-section,
.gallery-section,
.appendix-section {
  background: #fff;
}

.method-grid {
  display: grid;
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.method-grid article {
  min-height: 310px;
  padding: 26px;
  background: #fff;
}

.method-index {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--amber);
  font-size: 0.88rem;
  font-weight: 900;
}

.method-grid h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  line-height: 1.12;
}

.method-grid p {
  color: var(--muted);
  font-size: 0.98rem;
}

.results-section {
  background: #eff5f3;
}

.result-panels {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto 28px;
  grid-template-columns: 1fr;
  gap: 24px;
}

.wide-figure img {
  width: 100%;
  background: #fff;
}

.metrics-table {
  width: min(1180px, 100%);
  margin: 34px auto 0;
  border: 1px solid #cfd9d5;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.metrics-table > div {
  display: grid;
  grid-template-columns: 1.15fr 0.75fr 1fr 1.2fr;
  gap: 1px;
  border-top: 1px solid #e4ebe8;
}

.metrics-table > div:first-child {
  border-top: 0;
}

.metrics-table span {
  padding: 15px 16px;
  min-width: 0;
}

.table-head span {
  color: #fff;
  font-weight: 850;
  background: var(--teal-dark);
}

.metrics-table div:not(.table-head) span:nth-child(2) {
  color: var(--coral);
  font-weight: 900;
}

.evidence-section {
  background: #181b1d;
  color: #fff;
}

.evidence-section .section-copy p:not(.section-kicker) {
  color: rgba(255, 255, 255, 0.74);
}

.evidence-grid {
  display: grid;
  width: min(1180px, 100%);
  margin: 34px auto 0;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.appendix-grid {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.appendix-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.appendix-grid .span-wide {
  grid-column: 1 / -1;
}

.appendix-grid .span-wide img {
  width: 100%;
}

.evidence-grid figure {
  box-shadow: none;
  background: #fff;
}

.gallery-figure {
  width: min(980px, 100%);
  margin: 0 auto;
}

.code-section {
  background: #f2e8db;
}

.code-grid {
  display: grid;
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 20px;
  color: #f4efe7;
  font-size: 0.92rem;
  line-height: 1.5;
  background: #191f23;
  border-radius: 8px;
}

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

.citation-section {
  background: #fff;
}

.bibtex {
  width: min(1120px, 100%);
  margin: 0 auto;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  padding: 28px 18px 38px;
  color: rgba(255, 255, 255, 0.78);
  background: #111416;
}

footer a {
  color: #f9dcc4;
  text-decoration: none;
}

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

  .site-nav nav {
    display: none;
  }

  .hero {
    min-height: 88svh;
  }

  .section-copy,
  .method-grid,
  .evidence-grid,
  .appendix-grid,
  .code-grid,
  .insights {
    grid-template-columns: 1fr;
  }

  .metrics-table > div {
    grid-template-columns: 1fr;
  }

  .table-head {
    display: none !important;
  }

  .metrics-table span {
    padding: 10px 14px;
  }

  .metrics-table div:not(.table-head) {
    padding: 10px 0;
  }
}

@media (max-width: 560px) {
  .hero-content {
    padding-bottom: 46px;
  }

  h1 {
    font-size: clamp(4.1rem, 22vw, 6.5rem);
  }

  .subtitle {
    font-size: 1.25rem;
  }

  .button {
    flex: 1 1 calc(50% - 10px);
  }

  .section {
    padding-left: 16px;
    padding-right: 16px;
  }
}
