:root {
  --ink: #14211d;
  --muted: #61736b;
  --paper: #ffffff;
  --pale: #f4f7f3;
  --line: #dbe4dd;
  --forest: #12312b;
  --forest-2: #1d5a48;
  --moss: #6f8f3a;
  --sky: #dceaf0;
  --sand: #d99a47;
  --signal: #c34935;
  --shadow: 0 14px 34px rgba(18, 49, 43, 0.14);
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

img,
video {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 2000;
  transform: translateY(-140%);
  background: var(--paper);
  color: var(--forest);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: 0.8rem 5vw;
  color: #fff;
  background: rgba(18, 31, 28, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.top-nav.scrolled,
.top-nav.open {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
  box-shadow: 0 12px 24px rgba(18, 49, 43, 0.08);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--moss);
  color: #fff;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
  opacity: 0.9;
}

.nav-links a:hover,
.nav-links a:focus {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.scroll-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: var(--forest);
  color: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero-section {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--forest);
}

.hero-slideshow,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-slideshow {
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 1.1s ease, transform 7s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(9, 20, 18, 0.9), rgba(9, 20, 18, 0.55) 52%, rgba(9, 20, 18, 0.18)),
    linear-gradient(0deg, rgba(9, 20, 18, 0.4), rgba(9, 20, 18, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(980px, 90vw);
  padding: 8rem 0 4rem;
  margin-left: 5vw;
}

.eyebrow,
.section-kicker,
.terrain {
  margin: 0 0 0.8rem;
  color: var(--sand);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  color: #fff;
  font-size: 5rem;
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-title {
  max-width: 900px;
  margin: 1rem 0 0;
  font-size: 1.55rem;
  line-height: 1.25;
  font-weight: 750;
}

.hero-copy {
  max-width: 760px;
  margin: 1.35rem 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
}

.author-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  margin-top: 1.7rem;
  font-weight: 750;
}

.author-line a,
.author-line span {
  color: #fff;
  text-decoration: none;
}

.author-line a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.affiliation {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.7rem;
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  padding: 0.65rem 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.action-button:hover,
.action-button:focus {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.2);
}

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

.action-button.inactive {
  opacity: 0.65;
  cursor: default;
}

.action-button.inactive:hover {
  transform: none;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.stat-item {
  min-height: 112px;
  padding: 1.4rem 2rem;
  border-right: 1px solid var(--line);
}

.stat-item:last-child {
  border-right: 0;
}

.stat-item strong {
  display: block;
  color: var(--forest);
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
}

.stat-item span {
  display: block;
  margin-top: 0.55rem;
  color: var(--muted);
  font-weight: 700;
}

.section-block {
  padding: 5rem 5vw;
  background: var(--paper);
}

.section-block.pale {
  background: var(--pale);
}

.section-block.dark {
  background: var(--forest);
  color: #fff;
}

.section-block.compact {
  padding-top: 4rem;
}

.section-block > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  margin-bottom: 2.2rem;
}

.section-heading h2,
.bibtex-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 2.35rem;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.section-heading.inverse h2,
.dark .section-heading h2 {
  color: #fff;
}

.section-heading.inverse .section-kicker,
.dark .section-kicker {
  color: #f0b45e;
}

.media-frame {
  overflow: hidden;
  border-radius: var(--radius);
  background: #07110f;
  box-shadow: var(--shadow);
}

.media-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 1145 / 493;
  object-fit: cover;
}

.caption,
figcaption {
  max-width: 940px;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.75fr);
  gap: 3rem;
  align-items: start;
}

.prose p {
  margin: 0 0 1.05rem;
  color: #42534c;
  font-size: 1.05rem;
}

.highlight-list {
  display: grid;
  gap: 1rem;
}

.highlight-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.highlight-item i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--sky);
  color: var(--forest-2);
}

.highlight-item h3,
.step-card h3,
.environment-copy h3,
.sensor-band h3,
.pipeline-node h3,
.metric-card h3,
.finding h3,
.quickstart h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 850;
}

.highlight-item p,
.step-card p,
.environment-copy p,
.sensor-band p,
.pipeline-node p,
.metric-card p,
.finding p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.workflow {
  margin: 0 auto 2rem;
}

.workflow img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.step-card {
  min-height: 198px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.step-card span {
  display: inline-flex;
  width: 36px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  border-radius: var(--radius);
  color: #fff;
  background: var(--forest-2);
  font-size: 0.82rem;
  font-weight: 900;
}

.environment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.environment-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.environment-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.environment-copy {
  padding: 1rem;
}

.environment-copy h3 {
  color: #fff;
}

.environment-copy p {
  color: rgba(255, 255, 255, 0.74);
}

.terrain {
  color: #f0b45e !important;
  margin-bottom: 0.35rem;
}

.sensor-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}

.sensor-band > div {
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.sensor-band h3 {
  color: #fff;
}

.sensor-band p {
  color: rgba(255, 255, 255, 0.74);
}

.pipeline {
  display: grid;
  grid-template-columns: 1fr 64px 1fr 64px 1fr;
  align-items: center;
  gap: 1rem;
}

.pipeline-node {
  min-height: 220px;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(18, 49, 43, 0.06);
}

.pipeline-node i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1.2rem;
  border-radius: var(--radius);
  background: var(--pale);
  color: var(--forest-2);
  font-size: 1.25rem;
}

.pipeline-line {
  height: 2px;
  background: var(--moss);
}

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

.metric-card {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--pale);
}

.metric-card h3 {
  color: var(--forest-2);
  font-size: 1.35rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.results-table {
  width: 100%;
  min-width: 740px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.results-table th,
.results-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.results-table th {
  color: var(--forest);
  background: #ecf2ee;
  font-weight: 900;
}

.results-table tr:last-child td {
  border-bottom: 0;
}

.results-table td:nth-child(n+3),
.results-table th:nth-child(n+3) {
  text-align: right;
}

.best-row {
  background: #fff8ec;
  font-weight: 800;
}

.finding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.finding {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 1.4rem;
  align-items: start;
}

.quickstart,
.resource-links a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.quickstart {
  padding: 1.25rem;
}

pre {
  margin: 1rem 0 0;
  overflow-x: auto;
  border: 1px solid #d4ded7;
  border-radius: var(--radius);
  background: #10221e;
  color: #eaf3ed;
  padding: 1rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

code {
  color: inherit;
  background: transparent;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.resource-links {
  display: grid;
  gap: 0.9rem;
}

.resource-links-grid {
  grid-template-columns: repeat(3, 1fr);
}

.resource-links a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.resource-links-grid a {
  align-items: start;
  min-height: 150px;
}

.resource-links a:hover,
.resource-links a:focus {
  transform: translateY(-2px);
  border-color: var(--forest-2);
  box-shadow: 0 10px 24px rgba(18, 49, 43, 0.08);
}

.resource-links i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--sky);
  color: var(--forest-2);
}

.resource-links strong {
  display: block;
  color: var(--ink);
}

.resource-links small {
  display: block;
  color: var(--muted);
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

.bibtex-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  padding: 0.65rem 0.95rem;
  color: #fff;
  background: var(--forest);
  font-weight: 850;
  cursor: pointer;
}

.copy-bibtex-btn.copied {
  background: var(--forest-2);
}

.footer {
  padding: 2.2rem 5vw;
  background: #0e1b18;
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.footer p {
  margin: 0.25rem 0;
}

.footer a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media screen and (max-width: 1100px) {
  .environment-grid,
  .step-grid,
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(2) {
    border-right: 0;
  }

  .sensor-band,
  .finding-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 860px) {
  .top-nav {
    min-height: 62px;
    padding: 0.65rem 1rem;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.6rem 1rem 1rem;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .top-nav.open .nav-links {
    display: grid;
  }

  .nav-links a {
    padding: 0.85rem 0;
  }

  .hero-section {
    min-height: 88vh;
  }

  .hero-slideshow {
    display: block;
  }

  .hero-content {
    width: auto;
    margin: 0 1rem;
    padding: 7rem 0 3rem;
  }

  .hero-content h1 {
    font-size: 3.25rem;
  }

  .hero-title {
    font-size: 1.25rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .two-column,
  .resource-layout {
    grid-template-columns: 1fr;
  }

  .resource-links-grid {
    grid-template-columns: 1fr;
  }

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

  .pipeline-line {
    width: 2px;
    height: 36px;
    justify-self: center;
  }

  .pipeline-node {
    min-height: 0;
  }

  .section-block {
    padding: 4rem 1rem;
  }

  .section-heading h2,
  .bibtex-header h2 {
    font-size: 1.9rem;
  }
}

@media screen and (max-width: 560px) {
  .hero-section {
    min-height: 90vh;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(9, 20, 18, 0.92), rgba(9, 20, 18, 0.42));
  }

  .hero-content h1 {
    font-size: 2.65rem;
  }

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

  .action-button {
    justify-content: center;
    width: 100%;
  }

  .stat-strip,
  .environment-grid,
  .step-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .stat-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat-item:last-child {
    border-bottom: 0;
  }

  .bibtex-header {
    align-items: start;
    flex-direction: column;
  }

  .scroll-to-top {
    right: 1rem;
    bottom: 1rem;
  }
}
