:root {
  color-scheme: dark;
  --bg: #080a09;
  --text: #f0f1ed;
  --muted: #929894;
  --soft: #d1d5cf;
  --line: rgba(255, 255, 255, .16);
  --paper: #d8dad5;
  --paper-muted: rgba(8, 10, 9, .61);
  --ink: #080a09;
  --signal: #a9bcae;
  --pad: clamp(1.15rem, 3vw, 2.75rem);
  --header: 72px;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; max-width: 100%; height: auto; }
figure { margin: 0; }
button { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  background: #fff;
  color: #000;
  transform: translateY(-180%);
}

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

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: var(--header);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 9, .88);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; }
.brand-mark { display: block; width: 56px; height: 56px; flex: 0 0 auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  color: var(--muted);
  font-size: .86rem;
}

.site-nav a { transition: color .25s ease; }
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] { color: var(--text); }

.menu-toggle {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.project-hero {
  display: grid;
  min-height: calc(86svh - var(--header));
  align-content: space-between;
  padding: clamp(3.5rem, 7vw, 6.5rem) var(--pad) clamp(2.5rem, 5vw, 4.5rem);
}

.project-index,
.section-label,
.image-caption,
.meta-list dt,
.credits dt {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.project-title {
  margin: clamp(5rem, 10vw, 9rem) 0 0;
  font-size: clamp(4.2rem, 11.1vw, 11rem);
  font-weight: 500;
  line-height: .82;
  letter-spacing: -.073em;
}

.project-title span { display: block; }

.project-title .title-secondary {
  margin-left: 22%;
  color: var(--soft);
  font-size: .72em;
  letter-spacing: -.06em;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: clamp(5rem, 10vw, 9rem);
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

.hero-meta span:nth-child(2) { text-align: center; }
.hero-meta span:last-child { text-align: right; }

.hero-frame {
  padding: clamp(1.5rem, 3vw, 3rem) var(--pad) clamp(3rem, 7vw, 7rem);
  background: #000;
}

.hero-frame img {
  width: min(100%, 100rem);
  margin-inline: auto;
}

.overview {
  display: grid;
  grid-template-columns: minmax(13rem, .72fr) minmax(0, 1.28fr);
  gap: clamp(4rem, 11vw, 13rem);
  padding: clamp(7rem, 12vw, 13rem) var(--pad);
  border-bottom: 1px solid var(--line);
}

.meta-list {
  display: grid;
  align-content: start;
  gap: 1.7rem;
  margin: 0;
}

.meta-list div { padding-top: .85rem; border-top: 1px solid var(--line); }

.meta-list dd {
  margin: .42rem 0 0;
  color: var(--soft);
  font-size: .88rem;
  line-height: 1.5;
}

.overview-copy > p {
  max-width: 24ch;
  margin: 0;
  color: var(--soft);
  font-size: clamp(2rem, 4.4vw, 5rem);
  line-height: .99;
  letter-spacing: -.052em;
}

.overview-detail {
  display: grid;
  max-width: 58rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem clamp(1.5rem, 3vw, 3.5rem);
  margin-top: 3.5rem;
}

.overview-detail p,
.section-copy p,
.result-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(.98rem, 1.25vw, 1.14rem);
  line-height: 1.55;
  letter-spacing: -.015em;
}

.phase {
  padding: clamp(8rem, 14vw, 15rem) var(--pad);
  border-bottom: 1px solid var(--line);
}

.phase-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr);
  gap: clamp(3rem, 9vw, 10rem);
  align-items: end;
  margin-bottom: clamp(4rem, 8vw, 8rem);
}

.phase-head h2,
.result-section h2,
.credits-section h2 {
  max-width: 12ch;
  margin: .8rem 0 0;
  font-size: clamp(3rem, 6.8vw, 7.2rem);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.06em;
}

.section-copy,
.result-copy {
  display: grid;
  gap: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.image-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .72rem;
}

.water-section {
  background: var(--paper);
  color: var(--ink);
}

.water-section .section-label,
.water-section .image-caption,
.water-section .section-copy p { color: var(--paper-muted); }

.water-section .section-copy { border-color: rgba(0, 0, 0, .25); }

.water-lead {
  width: min(80%, 82rem);
  margin: 0 auto clamp(7rem, 12vw, 13rem);
}

.water-pair,
.water-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(4rem, 9vw, 10rem) clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.water-pair figure:first-child { grid-column: 1 / span 7; }
.water-pair figure:last-child { grid-column: 7 / -1; margin-top: clamp(6rem, 11vw, 12rem); }

.water-grid { margin-top: clamp(9rem, 16vw, 18rem); }
.water-grid figure:nth-child(1) { grid-column: 1 / span 6; }
.water-grid figure:nth-child(2) { grid-column: 7 / -1; margin-top: clamp(5rem, 10vw, 11rem); }
.water-grid figure:nth-child(3) { grid-column: 3 / span 8; }

.reservoir-section { background: #080b0a; }

.reservoir-development,
.reservoir-final {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}

.reservoir-development figure:last-child { margin-top: clamp(6rem, 11vw, 12rem); }

.reservoir-final {
  width: min(88%, 94rem);
  margin: clamp(10rem, 17vw, 19rem) auto 0;
}

.reservoir-final figure:first-child { margin-top: clamp(5rem, 9vw, 9rem); }

.title-section {
  background: #cfd3cf;
  color: var(--ink);
}

.title-section .section-label,
.title-section .image-caption,
.title-section .section-copy p { color: var(--paper-muted); }

.title-section .section-copy { border-color: rgba(0, 0, 0, .25); }

.title-authored {
  width: min(64%, 68rem);
  margin: 0 0 clamp(3rem, 6vw, 7rem) 4%;
}

.title-context {
  width: min(42rem, 48%);
  margin-bottom: clamp(8rem, 14vw, 15rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, .25);
}

.title-context--left { margin-left: 4%; }
.title-context--right { margin-left: auto; margin-right: 4%; }

.title-context-label {
  margin: 0 0 1.25rem;
  color: var(--paper-muted);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.title-context h3 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.9rem, 3.5vw, 3.4rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.035em;
}

.title-context p:last-child {
  max-width: 34rem;
  margin: 0;
  color: var(--paper-muted);
  font-size: clamp(.92rem, 1.2vw, 1.1rem);
  line-height: 1.6;
}

.title-route-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(5rem, 10vw, 11rem) clamp(1rem, 2vw, 2rem);
  align-items: start;
  margin-bottom: clamp(11rem, 19vw, 21rem);
}

.title-route-grid figure:nth-child(1) { grid-column: 1 / span 7; }
.title-route-grid figure:nth-child(2) { grid-column: 7 / -1; margin-top: clamp(7rem, 13vw, 14rem); }
.title-route-grid figure:nth-child(3) { grid-column: 2 / span 6; }
.title-route-grid figure:nth-child(4) { grid-column: 7 / -1; margin-top: clamp(5rem, 9vw, 10rem); }
.title-route-grid figure:nth-child(5) { grid-column: 1 / span 7; }
.title-route-grid figure:nth-child(6) { grid-column: 7 / -1; margin-top: clamp(7rem, 13vw, 14rem); }

.title-lead {
  width: min(88%, 96rem);
  margin: 0 0 clamp(9rem, 16vw, 18rem) auto;
}

.title-pair {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(4rem, 9vw, 10rem) clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.title-pair figure:first-child { grid-column: 1 / span 7; }
.title-pair figure:last-child { grid-column: 7 / -1; margin-top: clamp(6rem, 12vw, 13rem); }

.title-scale-studies {
  display: grid;
  gap: clamp(8rem, 15vw, 17rem);
  margin-top: clamp(11rem, 20vw, 22rem);
}

.title-scale-studies figure:first-child {
  width: min(94%, 102rem);
  margin-left: auto;
}

.title-scale-studies figure:last-child {
  width: min(70%, 76rem);
  margin-right: auto;
}

.title-final-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 2.25rem);
  width: 100%;
  margin: 0 auto;
}

.convergence-section {
  background: #050807;
}

.convergence-orbit {
  width: min(66%, 72rem);
  margin: 0 auto clamp(9rem, 16vw, 18rem);
}

.convergence-orbit-studies {
  width: min(94%, 110rem);
  margin: 0 auto clamp(9rem, 16vw, 18rem);
}

.convergence-orbit-motion {
  width: min(78%, 88rem);
  margin: 0 auto clamp(10rem, 18vw, 20rem);
}

.convergence-line-directions {
  width: min(94%, 110rem);
  margin: 0 auto clamp(10rem, 18vw, 20rem);
}

.convergence-note {
  width: min(44rem, 48%);
  margin: 0 0 clamp(3.5rem, 7vw, 7rem) 4%;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.convergence-note p {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.55;
}

.convergence-note--right {
  margin-left: auto;
  margin-right: 4%;
}

.convergence-routes {
  width: 100%;
  margin: 0 auto;
}

.convergence-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}

.convergence-pair figure:last-child { margin-top: clamp(6rem, 11vw, 12rem); }

.convergence-measured {
  width: min(82%, 92rem);
  margin: clamp(11rem, 19vw, 21rem) auto 0;
}

.convergence-detail {
  width: min(92%, 104rem);
  margin: clamp(8rem, 14vw, 15rem) auto 0;
}

.optimism-section {
  background: #0b0d0c;
}

.optimism-development {
  width: min(86%, 92rem);
  margin: 0 auto clamp(10rem, 17vw, 19rem);
}

.optimism-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}

.optimism-pair figure:first-child {
  width: 86%;
  justify-self: center;
}

.optimism-pair figure:last-child { margin-top: clamp(7rem, 13vw, 14rem); }

.optimism-live {
  width: min(74%, 78rem);
  margin: clamp(11rem, 19vw, 21rem) auto 0;
}

.result-section,
.credits-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr);
  gap: clamp(3rem, 9vw, 10rem);
  padding: clamp(8rem, 14vw, 15rem) var(--pad);
}

.result-section {
  background: var(--signal);
  color: var(--ink);
}

.result-section .section-label,
.result-copy p { color: rgba(8, 10, 9, .66); }
.result-copy { border-color: rgba(0, 0, 0, .28); }

.credits-section { border-bottom: 1px solid var(--line); }

.credits {
  display: grid;
  align-content: start;
  gap: 0;
  margin: 0;
}

.credits div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.credits dd {
  margin: 0;
  color: var(--soft);
  font-size: .95rem;
  line-height: 1.5;
}

.project-return {
  display: flex;
  min-height: 44svh;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(3rem, 7vw, 7rem) var(--pad);
  border-bottom: 1px solid var(--line);
}

.project-return span {
  color: var(--muted);
  font-size: .76rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.project-return strong {
  font-size: clamp(3rem, 9vw, 9rem);
  font-weight: 500;
  line-height: .88;
  letter-spacing: -.065em;
  transition: color .25s ease;
}

.project-return:hover strong,
.project-return:focus-visible strong { color: var(--signal); }

.site-footer {
  display: flex;
  min-height: 190px;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 3rem var(--pad);
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.5;
}

.site-footer span:last-child { max-width: 38rem; text-align: right; }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, 1, .36, 1);
}

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

@media (max-width: 760px) {
  .site-header { min-height: 64px; }
  .brand-mark { width: 48px; height: 48px; }
  .menu-toggle { display: block; }

  .site-nav {
    position: fixed;
    inset: 64px 0 auto;
    display: none;
    min-height: calc(100svh - 64px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 2rem var(--pad);
    background: rgba(8, 10, 9, .98);
  }

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

  .site-nav a {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.15rem;
  }

  .project-hero { min-height: calc(78svh - 64px); }

  .project-title {
    margin-top: 4rem;
    font-size: clamp(3.7rem, 20vw, 6rem);
    line-height: .84;
  }

  .project-title .title-secondary { margin-left: 0; font-size: .66em; }

  .hero-meta { grid-template-columns: 1fr; gap: .45rem; margin-top: 4rem; }
  .hero-meta span:nth-child(2),
  .hero-meta span:last-child { text-align: left; }

  .overview,
  .phase-head,
  .result-section,
  .credits-section {
    grid-template-columns: 1fr;
  }

  .overview { gap: 4rem; }
  .overview-detail { grid-template-columns: 1fr; }

  .phase-head h2,
  .result-section h2,
  .credits-section h2 { font-size: clamp(3rem, 15vw, 5rem); }

  .water-pair,
  .water-grid,
  .reservoir-development,
  .reservoir-final,
  .title-route-grid,
  .title-pair,
  .title-final-pair,
  .convergence-pair,
  .optimism-pair {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 4rem;
    margin-inline: 0;
  }

  .water-pair figure:first-child,
  .water-pair figure:last-child,
  .water-grid figure:nth-child(n),
  .title-route-grid figure:nth-child(n),
  .title-pair figure:first-child,
  .title-pair figure:last-child {
    grid-column: auto;
    margin-top: 0;
  }

  .reservoir-development figure:last-child,
  .reservoir-final figure:first-child,
  .title-pair figure:last-child,
  .convergence-pair figure:last-child,
  .optimism-pair figure:last-child { margin-top: 0; }

  .water-lead,
  .title-authored,
  .title-lead,
  .title-scale-studies figure:first-child,
  .title-scale-studies figure:last-child,
  .title-final-pair,
  .convergence-orbit,
  .convergence-orbit-studies,
  .convergence-orbit-motion,
  .convergence-line-directions,
  .convergence-routes,
  .convergence-measured,
  .convergence-detail,
  .optimism-development,
  .optimism-live {
    width: 100%;
    margin-inline: 0;
  }

  .water-grid,
  .reservoir-final,
  .title-route-grid,
  .title-scale-studies,
  .title-final-pair,
  .optimism-live { margin-top: 7rem; }

  .title-context {
    width: 100%;
    margin-inline: 0;
  }

  .convergence-note {
    width: 100%;
    margin-inline: 0;
  }

  .site-footer { min-height: 150px; flex-direction: column; align-items: flex-start; }
  .site-footer span:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
