:root {
  --ink: #201810;
  --muted: #6a6260;
  --paper: #ffffff;
  --wash: #f8f5f2;
  --forest: #b85316;
  --copper: #8c4018;
  --line: #e0d8d0;
  --soft: #f2ece6;
  --shadow: 0 22px 60px rgba(32, 24, 16, 0.1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #ede8e3;
  --muted: #a8a098;
  --paper: #1e1b18;
  --wash: #131110;
  --forest: #f5873c;
  --copper: #c87040;
  --line: #352e28;
  --soft: #252018;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

:root[data-theme="dark"] .site-header {
  background: rgba(30, 27, 24, 0.97);
}

:root[data-theme="dark"] .site-footer {
  background: #100d0a;
}

:root[data-theme="dark"] .site-footer a {
  color: var(--ink);
}

:root[data-theme="dark"] pre {
  background: #0e0b09;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--wash);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  margin: 0;
}

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

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.9rem 5vw;
  position: sticky;
  top: 0;
  z-index: 20;
}

.theme-toggle {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  gap: 0.45rem;
  line-height: 1.2;
  padding: 0.35rem 0.55rem;
}

.theme-toggle:hover {
  background: var(--soft);
  color: var(--forest);
}

.theme-toggle-icon {
  background: var(--forest);
  border-radius: 999px;
  display: inline-block;
  height: 0.72rem;
  width: 0.72rem;
}

:root[data-theme="dark"] .theme-toggle-icon {
  background: transparent;
  box-shadow: inset -0.22rem -0.18rem 0 0 var(--forest);
}

.site-mark {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

nav a {
  border-radius: 4px;
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 750;
  padding: 0.35rem 0.55rem;
  text-decoration: none;
}

nav a:hover {
  background: var(--soft);
}

.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.hero-inner {
  margin: 0 auto;
  max-width: 1120px;
  padding: 5rem 1.5rem 4.25rem;
}

.eyebrow {
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.14;
  margin: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  font-size: clamp(2.15rem, 5vw, 3.8rem);
  margin: 0 auto 1.15rem;
  max-width: 1040px;
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  color: var(--muted);
  margin: 0;
}

.venue {
  color: var(--forest);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.authors {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  justify-content: center;
  margin: 0 auto 0.55rem;
  max-width: 820px;
}

.authors span,
.authors strong {
  color: var(--ink);
}

.authors strong {
  font-weight: 850;
}

.affiliation {
  margin-bottom: 1.6rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.action-row a,
.resource-grid a,
.site-footer a {
  border: 1px solid var(--forest);
  border-radius: 4px;
  color: var(--forest);
  font-weight: 800;
  line-height: 1.2;
  padding: 0.8rem 1rem;
  text-decoration: none;
}

.action-row a:first-child {
  background: var(--forest);
  color: var(--paper);
}

.action-row a:hover,
.resource-grid a:hover,
.site-footer a:hover {
  background: var(--soft);
}

.action-row a:first-child:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.media-band {
  background: linear-gradient(180deg, var(--paper) 0%, var(--wash) 100%);
  padding: 0 1.5rem 4.5rem;
}

.media-frame {
  margin: 0 auto;
  max-width: 960px;
}

.placeholder-visual {
  align-items: center;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(31, 95, 85, 0.16), rgba(154, 90, 43, 0.14)),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  color: var(--forest);
  display: flex;
  font-weight: 850;
  justify-content: center;
  text-align: center;
}

.content-section,
.citation-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(18rem, 0.75fr) minmax(0, 1.25fr);
  margin: 0 auto;
  max-width: 1120px;
  padding: 4.5rem 1.5rem;
}

.content-section.compact {
  display: block;
}

.section-heading {
  min-width: 0;
}

.section-body {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.section-body p {
  font-size: 1.05rem;
}

.pipeline {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2rem;
}

.pipeline article,
.result-grid article,
.resource-grid a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 0;
  padding: 1.1rem;
}

.pipeline span,
.resource-grid span {
  color: var(--copper);
  display: block;
  font-size: 0.76rem;
  font-weight: 850;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

.pipeline h3,
.result-grid h3,
.resource-grid strong {
  color: var(--ink);
  display: block;
  margin-bottom: 0.55rem;
}

.result-grid,
.resource-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.resource-grid a {
  padding: 1.25rem;
}

pre {
  background: var(--ink);
  border-radius: 6px;
  color: var(--paper);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
  min-width: 0;
  overflow-x: auto;
  padding: 1rem;
  white-space: pre-wrap;
}

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

.site-footer {
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.5rem 5vw;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--paper);
}

.site-footer a:hover {
  background: rgba(255, 255, 255, 0.09);
}

@media (max-width: 900px) {
  .content-section,
  .citation-section {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.85rem 1rem;
    position: static;
  }

  nav {
    justify-content: flex-start;
  }

  nav a {
    padding-left: 0;
  }

  .hero-inner {
    padding: 3.5rem 1rem 3rem;
  }

  .media-band,
  .content-section,
  .citation-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .pipeline,
  .result-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .action-row {
    justify-content: flex-start;
  }

  .action-row a,
  .site-footer a {
    text-align: center;
  }
}
