:root {
  --bg: #eef0f3;
  --bg-elevated: #ffffff;
  --ink: #152033;
  --ink-muted: #4a5563;
  --ink-faint: #6b7582;
  --accent: #0f7a66;
  --accent-soft: rgba(15, 122, 102, 0.1);
  --brand: #001850;
  --brand-deep: #001048;
  --brand-lift: #002060;
  --line: rgba(30, 36, 44, 0.1);
  --line-strong: rgba(30, 36, 44, 0.16);
  --btn-primary-bg: #001850;
  --btn-primary-bg-hover: #002060;
  --btn-primary-ink: #f4f7fb;
  --btn-ghost-hover-border: #001850;
  --btn-ghost-hover-bg: rgba(0, 24, 80, 0.06);
  --graph-line: 70, 82, 98;
  --graph-node: 0, 24, 80;
  --page-bg:
    radial-gradient(ellipse 65% 40% at 50% -6%, rgba(255, 255, 255, 0.9), transparent 55%),
    radial-gradient(ellipse 45% 30% at 100% 12%, rgba(0, 24, 80, 0.03), transparent 50%),
    linear-gradient(180deg, #f5f6f8 0%, #eef0f3 50%, #e8eaee 100%);
  --graph-opacity: 0.32;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Sora", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

html[data-theme="dark"] {
  --bg: #0c1210;
  --bg-elevated: #161d1a;
  --ink: #e7efea;
  --ink-muted: #9aada3;
  --ink-faint: #6a7d74;
  --accent: #3fbf9a;
  --accent-soft: rgba(63, 191, 154, 0.14);
  --brand: #9eb6e8;
  --brand-deep: #7f9ad6;
  --brand-lift: #c2d2f4;
  --line: rgba(231, 239, 234, 0.1);
  --line-strong: rgba(231, 239, 234, 0.18);
  --btn-primary-bg: #3fbf9a;
  --btn-primary-bg-hover: #54d0ac;
  --btn-primary-ink: #062019;
  --btn-ghost-hover-border: #3fbf9a;
  --btn-ghost-hover-bg: rgba(63, 191, 154, 0.14);
  --graph-line: 63, 191, 154;
  --graph-node: 231, 239, 234;
  --page-bg:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(63, 191, 154, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 30%, rgba(47, 110, 96, 0.18), transparent 50%),
    #0c1210;
  --graph-opacity: 0.45;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
  background: var(--page-bg);
  overflow-x: hidden;
  transition: color 0.25s ease, background 0.25s ease;
}

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

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

#graph-canvas,
.noise {
  display: none;
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.hero-graph {
  position: relative;
  width: 100%;
  min-height: min(52vh, 28rem);
  height: min(58vh, 32rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  box-shadow: none;
}

.hero-graph canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.site-header,
main {
  position: relative;
  z-index: 1;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--pad);
  width: 100%;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--brand);
  opacity: 0.78;
  transition: opacity 0.2s ease;
}

.header-brand:hover {
  opacity: 1;
}

.header-brand-mark {
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 0.85rem;
  height: 0.85rem;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.nav a:hover {
  color: var(--ink);
}

.nav-cta {
  padding: 0.4rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-primary-bg) !important;
  color: var(--btn-primary-ink) !important;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0, 24, 80, 0.12);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-cta:hover {
  background: var(--btn-primary-bg-hover) !important;
  color: var(--btn-primary-ink) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 24, 80, 0.16);
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.menu-toggle span {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  background: currentColor;
}

.snap-panel {
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding-top: 4.25rem;
  padding-bottom: 3.25rem;
}

.hero.snap-panel {
  display: grid;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow,
.section-label,
.stage-num,
.pillar-index {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 1.75rem;
  animation: rise 0.9s ease both;
}

.hero-name {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--brand);
  background: linear-gradient(
    105deg,
    var(--brand-deep) 0%,
    var(--brand) 45%,
    var(--brand-lift) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  margin: 0.7rem 0 0;
  font-family: var(--sans);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--brand-deep);
}

.hero-support {
  margin: 0;
  max-width: 42rem;
  color: var(--ink-muted);
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  font-weight: 300;
  line-height: 1.65;
  animation: rise 0.9s ease 0.12s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  animation: rise 0.9s ease 0.22s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.05rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  box-shadow: 0 1px 2px rgba(0, 24, 80, 0.12);
}

.btn-primary:hover {
  background: var(--btn-primary-bg-hover);
  box-shadow: 0 4px 12px rgba(0, 24, 80, 0.16);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  border-color: var(--btn-ghost-hover-border);
  background: var(--btn-ghost-hover-bg);
}

.problem,
.pipeline,
.domains {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem var(--pad);
  width: 100%;
}

.problem .section-label {
  margin-bottom: 0.55rem;
}

.problem h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
}

.problem .lead {
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
}

.problem .pillar-grid {
  gap: 0.85rem 1.5rem;
  padding-top: 1.1rem;
}

.problem .pillar {
  padding: 0.25rem 0 0.55rem;
}

.problem .pillar h3 {
  margin: 0.3rem 0 0.35rem;
  font-size: 1.25rem;
}

.problem .pillar p {
  font-size: 0.88rem;
  line-height: 1.45;
}

.pipeline .section-label {
  margin-bottom: 0.65rem;
}

.pipeline h2 {
  margin: 0 0 0.75rem;
  white-space: nowrap;
}

.pipeline .lead {
  margin: 0 0 1.35rem;
}

.pipeline .stage h3 {
  margin: 0.35rem 0 0.4rem;
  font-size: 1.35rem;
}

.pipeline .stage-tags {
  margin: 0.55rem 0 0;
}

.section-label {
  margin-bottom: 1rem;
}

h2 {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--brand);
  background: linear-gradient(
    105deg,
    var(--brand-deep) 0%,
    var(--brand) 45%,
    var(--brand-lift) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  background: none;
}

.lead {
  margin: 0 0 2.75rem;
  max-width: 40rem;
  color: var(--ink-muted);
  font-weight: 300;
  font-size: 1.05rem;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.pillar {
  padding: 0.5rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

.pillar h3,
.stage h3,
.thesis-grid h3 {
  margin: 0.55rem 0 0.65rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--brand);
}

.pillar p,
.stage p,
.thesis-grid p {
  margin: 0;
  color: var(--ink-muted);
  font-weight: 300;
  font-size: 0.95rem;
}

.pipeline-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.stage {
  display: grid;
  grid-template-columns: minmax(10rem, 0.9fr) 1.4fr;
  gap: 0.85rem 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.3s ease;
}

.stage.is-visible {
  opacity: 1;
  transform: none;
}

.stage:last-child {
  border-bottom: 1px solid var(--line);
}

.stage:hover {
  border-color: var(--line-strong);
}

.stage-tags {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.stage-tags li {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding: 0.28rem 0.55rem;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

.thesis blockquote {
  margin: 0 0 2.75rem;
  padding: 0;
  border: 0;
}

.thesis blockquote p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.2;
  max-width: 18ch;
  color: var(--brand);
  background: linear-gradient(
    105deg,
    var(--brand-deep) 0%,
    var(--brand) 45%,
    var(--brand-lift) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.thesis blockquote em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  background: none;
}

.thesis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.domains {
  padding-bottom: 1.25rem;
}

.domains-inner {
  padding: clamp(2rem, 5vw, 3rem) 0 0;
  border-top: 1px solid var(--line);
}

.domain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 2rem;
}

.domain-chips span {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line-strong);
}

.domains.snap-panel {
  justify-content: center;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem var(--pad);
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.85rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-mark {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-mark--dark {
  display: none;
}

html[data-theme="dark"] .footer-mark--light {
  display: none;
}

html[data-theme="dark"] .footer-mark--dark {
  display: block;
  filter: contrast(1.04) brightness(0.94);
}

.site-footer p {
  margin: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 860px) {
  .hero,
  .hero.snap-panel {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-graph {
    min-height: 16rem;
    height: 18rem;
  }

  .nav {
    display: none;
    position: absolute;
    top: 3.75rem;
    right: var(--pad);
    left: var(--pad);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line-strong);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav-cta {
    border: 0;
    margin-top: 0.25rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

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

  .stage {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .stage-tags {
    grid-column: 1;
  }

  .pipeline h2 {
    white-space: normal;
  }
}
