:root {
  --bg: #f5efe2;
  --bg-accent: #efe3c8;
  --surface: rgba(255, 252, 246, 0.9);
  --surface-strong: #fffaf1;
  --surface-dark: #19352d;
  --text: #18211d;
  --muted: #55615d;
  --line: rgba(24, 33, 29, 0.12);
  --accent: #b35c2e;
  --accent-dark: #8f461f;
  --accent-soft: rgba(179, 92, 46, 0.12);
  --shadow: 0 20px 60px rgba(31, 28, 18, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --content-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(179, 92, 46, 0.16), transparent 24rem),
    radial-gradient(circle at top right, rgba(27, 78, 64, 0.18), transparent 26rem),
    linear-gradient(180deg, #fbf7ef 0%, var(--bg) 44%, #f7f0e5 100%);
}

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

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

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

.page-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding-bottom: 56px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(31, 28, 18, 0.08);
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-weight: 600;
}

.site-nav a:hover,
.text-link:hover {
  color: var(--accent-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 36px;
  align-items: center;
  padding: 72px 0 44px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.95;
}

.hero h1 span {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.6rem, 2.7vw, 2.45rem);
  line-height: 1.05;
  color: #34413b;
}

.hero-subtitle,
.hero-meta,
.abstract-card p,
.feature-card p,
.method-copy p,
.metric-note,
.result-panel p,
.resource-card p,
.callout-note {
  color: var(--muted);
  line-height: 1.62;
  font-size: 1.03rem;
}

.hero-subtitle {
  max-width: 42rem;
  margin: 22px 0 14px;
  font-size: 1.14rem;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 600;
  flex-wrap: wrap;
  line-height: 1.5;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(24, 33, 29, 0.28);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button .icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  fill: currentColor;
  flex-shrink: 0;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--surface-dark);
  color: #fbf7ef;
}

.button.primary:hover {
  background: #0e241e;
}

.button.secondary {
  border-color: rgba(24, 33, 29, 0.16);
  background: var(--surface-strong);
  color: var(--text);
}

.button.secondary:hover {
  border-color: rgba(24, 33, 29, 0.3);
  background: #fffdf8;
}

.button.ghost {
  border-color: rgba(24, 33, 29, 0.1);
  background: rgba(255, 255, 255, 0.36);
  color: #43504a;
}

.static-label {
  cursor: default;
}

.static-label:hover {
  transform: none;
}

.hero-stats,
.feature-grid,
.metrics-grid,
.resource-grid {
  display: grid;
  gap: 16px;
}

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

.stat-card,
.feature-card,
.metric-card,
.resource-card,
.abstract-card,
.table-card,
.callout-card,
.citation-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-md);
}

.stat-value {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.9rem;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-weight: 600;
}

.hero-visual,
.result-panel,
.method-callout {
  min-width: 0;
}

.figure-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(24, 33, 29, 0.08);
  padding: 18px;
  box-shadow: var(--shadow);
}

.figure-frame.warm {
  background:
    linear-gradient(135deg, rgba(179, 92, 46, 0.12), rgba(255, 255, 255, 0.6)),
    #fffaf2;
}

.figure-frame.cool {
  background:
    linear-gradient(145deg, rgba(25, 53, 45, 0.1), rgba(255, 255, 255, 0.72)),
    #fffaf2;
}

.figure-caption {
  margin: 14px 10px 0;
  color: var(--muted);
  line-height: 1.55;
}

.section {
  padding: 34px 0;
}

.section-heading {
  max-width: 54rem;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(2rem, 3.3vw, 3.1rem);
  line-height: 1.02;
}

.abstract-card {
  padding: 28px;
  border-radius: var(--radius-lg);
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 26px;
}

.feature-card {
  padding: 24px;
  border-radius: var(--radius-md);
}

.feature-card h3,
.result-panel h3,
.resource-card h3,
.table-card h3,
.citation-head h3,
.method-copy h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.method-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.method-copy {
  padding: 8px 6px 0 0;
}

.callout-card {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.callout-title {
  margin: 0 0 14px;
  font-weight: 700;
  color: var(--text);
}

.formula-block + .formula-block {
  margin-top: 14px;
}

.formula-block p {
  margin: 0 0 8px;
}

.formula-block code {
  display: block;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(25, 53, 45, 0.06);
  color: #153029;
  line-height: 1.5;
  white-space: pre-wrap;
}

.accent-section {
  position: relative;
}

.accent-section::before {
  content: "";
  position: absolute;
  inset: 40px -28px 0;
  z-index: -1;
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(239, 227, 200, 0.78), rgba(255, 250, 241, 0.5)),
    var(--bg-accent);
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.metric-card {
  padding: 22px;
  border-radius: var(--radius-md);
}

.metric-value {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.6rem;
  font-weight: 700;
}

.metric-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.result-panel {
  margin: 0;
}

.result-panel figcaption {
  padding: 16px 8px 0;
}

.table-card,
.citation-card {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(24, 33, 29, 0.1);
  text-align: left;
}

thead th {
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.resource-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.resource-card {
  padding: 24px;
  border-radius: var(--radius-md);
}

.text-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent-dark);
  font-weight: 700;
}

.text-muted {
  color: var(--muted);
  font-weight: 600;
}

.citation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.citation-card pre {
  margin: 16px 0 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: rgba(24, 33, 29, 0.05);
  line-height: 1.6;
}

.site-footer {
  padding-top: 24px;
  color: var(--muted);
  text-align: center;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero,
  .method-layout,
  .metrics-grid,
  .feature-grid,
  .resource-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 44px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--content-width));
  }

  .site-header {
    position: static;
    border-radius: 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 12px;
  }

  .hero {
    gap: 24px;
  }

  .button {
    width: 100%;
  }

  .citation-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .accent-section::before {
    inset: 24px -10px 0;
    border-radius: 24px;
  }
}
