:root {
  color-scheme: dark;
  --bg: #030407;
  --ink: #f7f3e8;
  --muted: #b7b0a2;
  --line: rgba(247, 243, 232, 0.16);
  --panel: rgba(10, 13, 20, 0.62);
  --acid: #c6ff4a;
  --cyan: #42d9ff;
  --hot: #ff4f7a;
  --orange: #ffb347;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

body.detail-open {
  overflow: hidden;
}

body.is-loading {
  overflow: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 60% 35%, rgba(66, 217, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 20% 72%, rgba(255, 79, 122, 0.16), transparent 30rem),
    #030407;
  transition: opacity 650ms ease, visibility 650ms ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  padding: 28px;
  background: rgba(10, 13, 20, 0.78);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.loader-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(198, 255, 74, 0.72);
  color: var(--acid);
  font: 800 15px/1 var(--mono);
}

.loader p {
  margin: 22px 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.loader-bar {
  height: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loader-bar span {
  display: block;
  width: 4%;
  height: 100%;
  background: linear-gradient(90deg, var(--acid), var(--cyan), var(--hot));
  transition: width 180ms ease;
}

.loader small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font: 700 12px/1.4 var(--mono);
  text-transform: uppercase;
}

#stage-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: radial-gradient(circle at 50% 30%, #151927 0%, #030407 64%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.17;
  mix-blend-mode: soft-light;
  background-image:
    linear-gradient(transparent 50%, rgba(255, 255, 255, 0.05) 50%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 1px);
  background-size: 100% 4px, 7px 7px;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(198, 255, 74, 0.12), transparent);
  height: 38vh;
  opacity: 0.2;
  animation: scan 7s linear infinite;
}

.haze {
  position: fixed;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.28;
  filter: blur(36px);
  mix-blend-mode: screen;
  transform: translate3d(0, 0, 0);
}

.haze::before,
.haze::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 38%, rgba(255, 255, 255, 0.14), transparent 34%),
    radial-gradient(ellipse at 68% 58%, rgba(66, 217, 255, 0.12), transparent 30%),
    radial-gradient(ellipse at 48% 18%, rgba(198, 255, 74, 0.09), transparent 26%);
}

.haze-one {
  animation: haze-drift 24s ease-in-out infinite alternate;
}

.haze-two {
  opacity: 0.18;
  transform: rotate(14deg) scale(1.08);
  animation: haze-drift-alt 31s ease-in-out infinite alternate;
}

html[data-quality="low"] .scanline,
html[data-quality="saver"] .scanline,
html[data-quality="saver"] .noise {
  display: none;
}

html[data-quality="low"] .haze {
  opacity: 0.22;
  filter: blur(22px);
}

html[data-quality="saver"] .haze {
  opacity: 0.12;
  filter: blur(16px);
  animation: none;
}

.scroll-progress {
  position: fixed;
  z-index: 6;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--acid), var(--cyan), var(--hot));
  box-shadow: 0 0 24px rgba(198, 255, 74, 0.62);
}

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

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: clamp(16px, 5vw, 72px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.detail-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.detail-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(198, 255, 74, 0.2), transparent 28rem),
    radial-gradient(circle at 78% 70%, rgba(255, 79, 122, 0.18), transparent 30rem),
    rgba(3, 4, 7, 0.74);
  backdrop-filter: blur(16px);
}

.detail-transition {
  position: absolute;
  inset: -40%;
  background:
    conic-gradient(from 120deg, transparent, rgba(66, 217, 255, 0.85), rgba(198, 255, 74, 0.95), rgba(255, 79, 122, 0.72), transparent);
  transform: scale(0) rotate(0deg);
  opacity: 0;
}

.detail-overlay.is-open .detail-transition {
  animation: detail-flash 900ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.detail-panel {
  position: relative;
  width: min(1040px, 100%);
  max-height: min(760px, calc(100vh - 42px));
  overflow: auto;
  border: 1px solid var(--line);
  padding: clamp(24px, 5vw, 62px);
  background:
    linear-gradient(135deg, rgba(10, 13, 20, 0.94), rgba(14, 18, 27, 0.84)),
    rgba(10, 13, 20, 0.92);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  transform: translateY(42px) scale(0.96);
  opacity: 0;
  transition: transform 650ms cubic-bezier(0.2, 0.82, 0.2, 1), opacity 520ms ease;
}

.detail-overlay.is-open .detail-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.detail-close {
  position: sticky;
  top: 0;
  float: right;
  min-height: 42px;
  border: 1px solid var(--line);
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.detail-body {
  display: grid;
  gap: 20px;
  max-width: 920px;
  margin-top: 28px;
}

.detail-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 10px;
}

.detail-media-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.detail-media-grid figure:first-child {
  grid-column: span 2;
}

.detail-media-grid img,
.detail-media-grid video,
.youtube-embed {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.detail-media-grid figure:first-child img,
.detail-media-grid figure:first-child video,
.detail-media-grid figure:first-child .youtube-embed {
  height: 360px;
}

.youtube-embed {
  border: 0;
  aspect-ratio: 16 / 9;
  background: #05070c;
}

.detail-media-grid figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font: 700 12px/1.4 var(--mono);
  text-transform: uppercase;
}

.detail-body p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.7;
}

.detail-body ul {
  display: grid;
  gap: 12px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.detail-body li {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.55;
}

.detail-body li strong {
  color: var(--acid);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(3, 4, 7, 0.78);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(198, 255, 74, 0.7);
  background: rgba(198, 255, 74, 0.08);
  color: var(--acid);
  font: 700 14px/1 var(--mono);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font: 600 11px/1 var(--mono);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(980px, 72vw);
}

.nav-links a,
.nav-links button {
  padding: 11px 13px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links button:hover,
.nav-links button:focus-visible {
  color: var(--ink);
}

.nav-links button {
  border: 1px solid rgba(247, 243, 232, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.nav-links button:hover,
.nav-links button:focus-visible {
  border-color: rgba(198, 255, 74, 0.42);
  background: rgba(198, 255, 74, 0.08);
}

.menu-button {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.panel {
  min-height: 100vh;
  padding: 120px clamp(18px, 5vw, 72px) 72px;
}

.mobile-scene-break {
  display: none;
}

@media (min-width: 721px) {
  .mobile-scene-break {
    position: relative;
    display: block;
    height: clamp(260px, 36vh, 430px);
    margin: clamp(-42px, -3vw, -18px) 0 clamp(-20px, -1vw, -8px);
    pointer-events: none;
  }

  .mobile-scene-break::before {
    content: "";
    position: absolute;
    inset: 18% clamp(72px, 14vw, 220px);
    border-top: 1px solid rgba(143, 220, 255, 0.2);
    border-bottom: 1px solid rgba(198, 255, 74, 0.09);
    background:
      radial-gradient(ellipse at 48% 40%, rgba(143, 220, 255, 0.15), transparent 44%),
      radial-gradient(ellipse at 56% 64%, rgba(255, 255, 255, 0.06), transparent 38%),
      linear-gradient(90deg, transparent, rgba(143, 220, 255, 0.05), transparent);
    opacity: 0.72;
    filter: blur(0.2px);
    transform: skewY(-1.5deg);
  }

  .exploration-break {
    height: clamp(220px, 30vh, 360px);
    margin: clamp(-28px, -2vw, -14px) 0;
  }

  .page-copy p:not(.kicker) + p:not(.kicker),
  .hero-copy > p:not(.kicker) + p:not(.kicker),
  .contact-copy p + p {
    margin-top: clamp(20px, 2.2vw, 34px);
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  align-items: end;
  gap: clamp(32px, 6vw, 110px);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 980px;
  text-shadow: 0 4px 34px rgba(0, 0, 0, 0.92);
}

.page-section {
  display: grid;
  align-items: center;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1fr);
  align-items: center;
  gap: clamp(30px, 6vw, 92px);
}

.page-copy {
  position: relative;
  z-index: 2;
}

.page-copy .kicker,
.page-copy > p:not(.kicker),
.contact-copy p {
  width: fit-content;
  max-width: 100%;
  padding: 0.2em 0.38em;
  border: 0;
  border-radius: 10px;
  background: rgba(28, 30, 34, 0.32);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  backdrop-filter: blur(18px);
  box-shadow:
    0 0 38px rgba(28, 30, 34, 0.42),
    0 0 82px rgba(3, 4, 7, 0.2),
    0 18px 62px rgba(0, 0, 0, 0.14);
}

.page-copy .kicker {
  background: rgba(28, 30, 34, 0.22);
}

.page-copy p:not(.kicker) {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.72;
}

.media-grid {
  position: relative;
  z-index: 2;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.video-feature {
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(3, 4, 7, 0.72);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.media-grid img,
.media-grid video,
.media-grid iframe {
  display: block;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  background: rgba(3, 4, 7, 0.72);
  object-fit: cover;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.media-grid img,
.media-grid video,
.media-grid iframe {
  height: 260px;
}

img[src*="IMG_0869-768x949"] {
  object-fit: contain;
  background:
    radial-gradient(ellipse at center, rgba(143, 220, 255, 0.1), transparent 58%),
    rgba(3, 4, 7, 0.72);
}

.media-grid img[src*="IMG_0869-768x949"] {
  width: min(100%, 320px);
  height: 340px;
  margin: 0 auto;
}

.video-feature video {
  border: 0;
  box-shadow: none;
}

.video-feature figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font: 700 12px/1.4 var(--mono);
  text-transform: uppercase;
}

.media-grid > :first-child {
  grid-column: span 2;
  height: 360px;
}

.kicker {
  margin: 0 0 18px;
  color: var(--acid);
  font: 700 12px/1.4 var(--mono);
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
li {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(58px, 9.4vw, 132px);
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
}

.code-title {
  max-width: none;
  font-size: clamp(28px, 6.4vw, 88px);
  line-height: 0.96;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  text-transform: none;
}

h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(38px, 6vw, 86px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy h2 {
  margin-top: 34px;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1;
}

.exploration-card {
  --explore-parallax: 0px;
  --explore-tilt: 0deg;
  --explore-glow: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
  width: min(100%, 1060px);
  margin: clamp(34px, 5vw, 62px) auto;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid rgba(238, 243, 242, 0.18);
  background:
    linear-gradient(135deg, rgba(198, 255, 74, 0.09), transparent 34%),
    rgba(3, 4, 7, 0.62);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
  transform: translate3d(0, var(--explore-parallax), 0) rotateX(var(--explore-tilt));
  transform-style: preserve-3d;
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

.exploration-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border: 1px solid rgba(143, 220, 255, calc(0.16 + var(--explore-glow) * 0.34));
  background:
    radial-gradient(circle at calc(30% + var(--explore-glow) * 28%) 18%, rgba(143, 220, 255, calc(var(--explore-glow) * 0.18)), transparent 34%),
    linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, calc(var(--explore-glow) * 0.16)) 48%, transparent 58% 100%);
  opacity: calc(0.42 + var(--explore-glow) * 0.58);
  pointer-events: none;
}

.exploration-card figure {
  position: relative;
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(238, 243, 242, 0.16);
}

.exploration-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  filter: saturate(calc(1.04 + var(--explore-glow) * 0.18)) brightness(calc(1 + var(--explore-glow) * 0.16));
  transform: translate3d(0, calc(var(--explore-parallax) * -0.32), 34px) scale(calc(1.01 + var(--explore-glow) * 0.025));
  transition: filter 220ms ease;
}

.exploration-card figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(238, 243, 242, 0.2);
  background: rgba(3, 4, 7, 0.76);
  color: rgba(247, 243, 232, 0.92);
  font: 800 11px/1.45 var(--mono);
  text-transform: uppercase;
  text-wrap: balance;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.exploration-copy {
  align-self: center;
  padding: clamp(6px, 1vw, 12px);
  transform: translate3d(0, calc(var(--explore-parallax) * -0.18), 42px);
}

.exploration-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.7vw, 66px);
}

.exploration-copy p:not(.kicker) {
  max-width: 650px;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.68;
}

h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
}

.hero-copy > p:not(.kicker),
.contact-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.72;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--acid);
  color: #091006;
}

.button.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.control-card,
.system-grid article,
.project-card,
.lab-console,
.contact-form {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.control-card {
  padding: 22px;
}

.readout {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
}

.readout span {
  color: var(--cyan);
  font-size: 12px;
}

.readout strong {
  color: var(--ink);
  font-size: 12px;
  text-align: right;
}

.meter {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.meter span {
  display: block;
  height: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--cyan) var(--level), rgba(255, 255, 255, 0.08) 0);
}

.control-card p,
.system-grid p,
.project-card span,
.lab-console li {
  color: var(--muted);
  line-height: 1.6;
}

.section-title {
  margin-bottom: 34px;
}

.section-title > p:not(.kicker) {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.systems {
  display: grid;
  align-content: center;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.system-grid article {
  min-height: 330px;
  padding: 24px;
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.system-grid article:hover,
.system-grid article:focus-visible,
.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(198, 255, 74, 0.5);
  outline: none;
}

.system-grid span {
  display: inline-block;
  margin-bottom: 72px;
  color: var(--hot);
  font: 700 13px/1 var(--mono);
}

.projects {
  display: grid;
  align-content: center;
}

.project-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 16px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  padding: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.project-card img {
  width: calc(100% + 48px);
  height: 230px;
  margin: -24px -24px 28px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  filter: saturate(1.08) contrast(1.04);
}

.project-card:nth-child(2) img,
.project-card:nth-child(3) img {
  object-position: center top;
}

.project-card::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background:
    radial-gradient(circle, transparent 38%, rgba(198, 255, 74, 0.75) 40%, transparent 43%),
    conic-gradient(from 90deg, rgba(66, 217, 255, 0.7), rgba(255, 79, 122, 0.75), rgba(255, 179, 71, 0.65), rgba(66, 217, 255, 0.7));
  animation: spin 14s linear infinite;
}

.project-card p {
  color: var(--orange);
  font: 700 12px/1.4 var(--mono);
  text-transform: uppercase;
}

.project-card span {
  display: block;
  margin-top: 12px;
}

.lab {
  display: grid;
  place-items: center start;
}

.lab-console {
  width: min(860px, 100%);
  padding: clamp(22px, 4vw, 42px);
}

.lab-video {
  display: block;
  width: 100%;
  max-height: 360px;
  margin-top: 28px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.lab-grid video {
  width: 100%;
  height: 220px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.lab-console ul {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.lab-console li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.contact-status {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(143, 220, 255, 0.26);
  background: rgba(143, 220, 255, 0.08);
  color: var(--ink);
  font: 800 12px/1.45 var(--mono);
  text-transform: uppercase;
}

.contact-status.is-visible {
  display: block;
}

.contact-status.is-error {
  border-color: rgba(255, 79, 122, 0.32);
  background: rgba(255, 79, 122, 0.09);
}

.form-trap {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(198, 255, 74, 0.42);
  border-color: var(--acid);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(3, 4, 7, 0.7);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(44px) scale(0.985);
  transition: opacity 760ms ease, transform 760ms cubic-bezier(0.18, 0.86, 0.22, 1);
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes scan {
  from {
    transform: translateY(-45vh);
  }

  to {
    transform: translateY(115vh);
  }
}

@keyframes haze-drift {
  from {
    transform: translate3d(-7%, -3%, 0) rotate(-4deg) scale(1);
  }

  to {
    transform: translate3d(6%, 5%, 0) rotate(5deg) scale(1.12);
  }
}

@keyframes haze-drift-alt {
  from {
    transform: translate3d(5%, 4%, 0) rotate(10deg) scale(1.1);
  }

  to {
    transform: translate3d(-6%, -4%, 0) rotate(20deg) scale(1.2);
  }
}

@keyframes detail-flash {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }

  42% {
    opacity: 0.62;
  }

  100% {
    opacity: 0;
    transform: scale(1.8) rotate(38deg);
  }
}

@media (max-width: 980px) {
  .hero,
  .contact,
  .page-layout {
    grid-template-columns: 1fr;
  }

  .control-card {
    max-width: 460px;
  }

  .system-grid,
  .project-track,
  .lab-grid,
  .media-grid,
  .detail-media-grid {
    grid-template-columns: 1fr 1fr;
  }

  .media-grid > :first-child {
    grid-column: span 2;
  }

  .project-card {
    min-height: 320px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .site-header {
    padding: 12px 16px;
  }

  .menu-button {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 72px 12px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    max-width: none;
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    background: rgba(3, 4, 7, 0.96);
    backdrop-filter: blur(18px);
  }

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

  .nav-links a,
  .nav-links button {
    width: 100%;
    text-align: left;
    padding: 16px;
  }

  .nav-links button {
    border-radius: 0;
  }

  .panel {
    min-height: 118vh;
    padding: 118px 18px 96px;
  }

  .mobile-scene-break {
    position: relative;
    display: block;
    height: 72vh;
    min-height: 460px;
    margin: -24px 0;
    pointer-events: none;
  }

  .mobile-scene-break::before {
    content: "";
    position: absolute;
    inset: 12vh 18px;
    border-top: 1px solid rgba(143, 220, 255, 0.22);
    border-bottom: 1px solid rgba(198, 255, 74, 0.12);
    background:
      radial-gradient(ellipse at 50% 34%, rgba(143, 220, 255, 0.18), transparent 42%),
      linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.035), transparent);
    opacity: 0.78;
  }

  .exploration-break {
    height: 58vh;
    min-height: 360px;
    margin: -8px 0 4px;
  }

  .exploration-break::before {
    inset: 10vh 22px;
    background:
      radial-gradient(ellipse at 50% 38%, rgba(143, 220, 255, 0.24), transparent 48%),
      radial-gradient(ellipse at 50% 62%, rgba(255, 255, 255, 0.08), transparent 38%),
      linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.045), transparent);
    opacity: 0.88;
  }

  .projects,
  .systems,
  .lab {
    align-content: start;
  }

  .section-title {
    margin-bottom: 26px;
  }

  .system-grid,
  .project-track,
  .lab-grid,
  .media-grid,
  .detail-media-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .media-grid > :first-child {
    grid-column: auto;
  }

  .media-grid img,
  .media-grid video,
  .media-grid iframe {
    height: 230px;
  }

  .page-gallery {
    display: none;
  }

  .mobile-inline-media {
    display: block;
    width: 100%;
    margin: 18px 0 30px;
    border: 1px solid rgba(143, 220, 255, 0.22);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
  }

  img.mobile-inline-media,
  .mobile-inline-media img,
  .mobile-inline-media video,
  .mobile-inline-media iframe {
    width: 100%;
    height: auto;
    min-height: 220px;
    max-height: 360px;
    object-fit: cover;
  }

  img.mobile-inline-media[src*="IMG_0869-768x949"] {
    width: min(78%, 300px);
    min-height: 0;
    max-height: none;
    height: auto;
    margin: 18px auto 30px;
    object-fit: contain;
  }

  .mobile-inline-media.video-feature,
  .detail-inline-media figure {
    margin: 18px 0 30px;
    overflow: hidden;
    border: 1px solid rgba(143, 220, 255, 0.22);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
  }

  .mobile-inline-media figcaption,
  .detail-inline-media figcaption {
    padding: 10px 12px;
    color: var(--muted);
    font: 700 11px/1.35 var(--mono);
    text-transform: uppercase;
  }

  .detail-inline-media img,
  .detail-inline-media video,
  .detail-inline-media iframe {
    width: 100%;
    height: auto;
    min-height: 220px;
    max-height: 360px;
    object-fit: cover;
  }

  .detail-inline-media img[src*="IMG_0869-768x949"] {
    width: min(78%, 300px);
    min-height: 0;
    max-height: none;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
  }

  .page-copy p:not(.kicker) {
    font-size: 18px;
    line-height: 1.78;
  }

  .page-copy .kicker,
  .page-copy > p:not(.kicker),
  .contact-copy p {
    width: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }

  .detail-media-grid img,
  .detail-media-grid video,
  .youtube-embed {
    height: 210px;
  }

  .detail-media-grid figure:first-child {
    grid-column: auto;
  }

  .detail-media-grid figure:first-child img,
  .detail-media-grid figure:first-child video,
  .detail-media-grid figure:first-child .youtube-embed {
    height: 240px;
  }

  .hero {
    min-height: 132vh;
    align-items: center;
    padding-top: 132px;
    padding-bottom: 130px;
  }

  .hero-copy {
    max-width: 560px;
  }

  .exploration-card {
    grid-template-columns: 1fr;
    margin: 30px auto;
  }

  .exploration-card img {
    min-height: 240px;
    aspect-ratio: 4 / 3;
  }

  .hero-copy > p:not(.kicker),
  .section-title > p:not(.kicker),
  .contact-copy p {
    font-size: 18px;
    line-height: 1.72;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(48px, 15vw, 76px);
    line-height: 0.88;
  }

  .code-title {
    max-width: 100%;
    font-size: clamp(24px, 7.2vw, 38px);
    line-height: 1;
  }

  h2 {
    font-size: clamp(34px, 10.8vw, 54px);
    line-height: 1;
  }

  h3 {
    font-size: clamp(25px, 8vw, 36px);
    line-height: 1.05;
  }

  .button {
    width: 100%;
  }

  .control-card {
    display: none;
  }

  .system-grid article,
  .project-card {
    min-height: 300px;
    padding: 26px;
    transform: translateZ(0);
  }

  .project-card img {
    width: calc(100% + 52px);
    height: 220px;
    margin: -26px -26px 30px;
  }

  .system-grid span {
    margin-bottom: 54px;
  }

  .project-card::after {
    width: 58px;
    height: 58px;
  }

  .detail-overlay {
    padding: 0;
  }

  .detail-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border-left: 0;
    border-right: 0;
    padding: 92px 18px 48px;
  }

  .detail-body {
    gap: 24px;
  }

  .detail-body p {
    font-size: 18px;
    line-height: 1.78;
  }

  .detail-close {
    position: fixed;
    top: 18px;
    right: 18px;
  }

  .haze {
    opacity: 0.38;
    filter: blur(26px);
  }

  footer {
    flex-direction: column;
    padding: 26px 16px;
  }
}
