:root {
  --void: #020507;
  --void-soft: #071014;
  --ink: #0a1114;
  --paper: #e9e7df;
  --paper-soft: #d7d5cd;
  --white: #f3f5f2;
  --muted: #8b9aa0;
  --line: rgba(230, 246, 246, 0.14);
  --line-strong: rgba(230, 246, 246, 0.28);
  --cyan: #65f5e1;
  --cyan-deep: #20c7c7;
  --blue: #44a7ff;
  --amber: #ffb568;
  --danger: #ff6d72;
  --max: 1440px;
  --gutter: clamp(1.25rem, 4vw, 5rem);
  --mx: 0;
  --my: 0;
  --story-p: 0;
  --char-x: 24vw;
  --char-y: 3vh;
  --char-scale: 0.88;
  --char-opacity: 1;
  --world-scale: 1.08;
  --world-y: 0%;
  --intro-fade: 1;
  color-scheme: dark;
  font-synthesis: none;
}

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

html {
  background: var(--void);
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--white);
  background: var(--void);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: 999;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

::selection {
  color: #00100e;
  background: var(--cyan);
}

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

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p,
blockquote,
figure {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 5px;
}

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

.skip-link {
  position: fixed;
  z-index: 1100;
  top: 1rem;
  left: 1rem;
  padding: 0.8rem 1rem;
  color: var(--void);
  background: var(--cyan);
  font-size: 0.8rem;
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform 180ms ease;
}

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

/* Opening title */
.boot {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 55%, rgba(43, 203, 202, 0.12), transparent 27%),
    var(--void);
  transition:
    clip-path 0.72s cubic-bezier(0.77, 0, 0.18, 1),
    visibility 0s linear 0.72s;
  clip-path: inset(0 0 0 0);
}

.boot::before,
.boot::after {
  position: absolute;
  content: "";
}

.boot::before {
  width: min(58vw, 720px);
  aspect-ratio: 1;
  border: 1px solid rgba(101, 245, 225, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 80px rgba(72, 211, 215, 0.08),
    inset 0 0 80px rgba(72, 211, 215, 0.05);
  animation: boot-ring 3s linear infinite;
}

.boot::after {
  inset: 0;
  opacity: 0.24;
  background:
    linear-gradient(rgba(101, 245, 225, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 245, 225, 0.08) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle, #000, transparent 63%);
}

.boot-mark {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: min(78vw, 760px);
  text-align: center;
}

.boot-kicker,
.boot-status {
  color: #8ea3a8;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.62rem, 0.9vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.boot-word {
  margin: -0.1em 0;
  color: transparent;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(5rem, 19vw, 18rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.09em;
  -webkit-text-stroke: 1px rgba(216, 255, 249, 0.88);
  text-shadow: 0 0 70px rgba(75, 236, 222, 0.14);
}

.boot-status i {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-left: 0.3rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 8px 0 var(--cyan), 16px 0 var(--cyan);
  animation: boot-dots 1s steps(3) infinite;
}

.ready .boot {
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
}

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  top: clamp(0.7rem, 2vw, 1.5rem);
  left: var(--gutter);
  display: flex;
  width: calc(100% - (var(--gutter) * 2));
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.55rem 0.65rem 0.55rem 0.75rem;
  border: 1px solid rgba(225, 247, 245, 0.1);
  border-radius: 2px;
  background: rgba(3, 8, 11, 0.48);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(16px) saturate(130%);
  transition:
    background 250ms ease,
    border-color 250ms ease,
    transform 350ms ease;
}

.site-header.scrolled {
  border-color: rgba(225, 247, 245, 0.17);
  background: rgba(3, 8, 11, 0.83);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(101, 245, 225, 0.46);
  color: var(--cyan);
  background: rgba(101, 245, 225, 0.05);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.brand-copy {
  display: grid;
  line-height: 1.25;
}

.brand-copy b {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.brand-copy small {
  margin-top: 0.12rem;
  color: #819196;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.15rem, 2.1vw, 2.35rem);
}

.site-nav > a {
  position: relative;
  color: #aeb9ba;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.site-nav > a:not(.nav-contact)::after {
  position: absolute;
  right: 0;
  bottom: -0.42rem;
  left: 0;
  height: 1px;
  content: "";
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.site-nav > a:hover {
  color: var(--white);
}

.site-nav > a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-nav .nav-contact {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  color: #031110;
  background: var(--cyan);
  font-weight: 700;
}

.nav-contact span {
  font-size: 1rem;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
}

.menu-toggle > span:not(.sr-only) {
  display: block;
  width: 22px;
  height: 1px;
  margin: 6px auto;
  background: var(--white);
  transition: transform 220ms ease;
}

.page-progress {
  position: fixed;
  z-index: 120;
  top: 0;
  right: 0;
  width: 2px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.05);
}

.page-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(var(--cyan), var(--blue));
  box-shadow: 0 0 14px rgba(101, 245, 225, 0.7);
  transform: scaleY(0);
  transform-origin: top;
}

/* Scroll-driven opening */
.story {
  position: relative;
  z-index: 1;
  height: 600svh;
  background: var(--void);
}

.story-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
}

.flow-canvas,
.world,
.story-scenes {
  position: absolute;
  inset: 0;
}

.flow-canvas {
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.8;
  mix-blend-mode: screen;
}

.world {
  z-index: 1;
  overflow: hidden;
  background: #03090d;
}

.world-image {
  position: absolute;
  z-index: 0;
  inset: -7%;
  width: 114%;
  height: 114%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 54%;
  filter: brightness(0.62) saturate(0.83) contrast(1.08);
  transform:
    translate3d(
      calc(var(--mx) * -8px),
      calc(var(--world-y) + (var(--my) * -5px)),
      0
    )
    scale(var(--world-scale));
  will-change: transform;
}

.world-veil {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 5, 7, 0.88) 0%, rgba(2, 5, 7, 0.32) 44%, rgba(2, 5, 7, 0.54) 100%),
    linear-gradient(180deg, rgba(2, 5, 7, 0.74) 0%, transparent 36%, rgba(2, 5, 7, 0.82) 100%),
    radial-gradient(circle at 50% 43%, transparent 0 16%, rgba(2, 5, 7, 0.5) 64%);
}

.world-veil::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 50% 76%, rgba(22, 194, 209, 0.13), transparent 26%);
  opacity: calc(0.25 + var(--story-p) * 0.75);
}

.horizon-glow {
  position: absolute;
  z-index: 2;
  top: 38%;
  left: 50%;
  width: 36vw;
  height: 17vw;
  border-radius: 50%;
  background: rgba(255, 171, 90, 0.11);
  filter: blur(45px);
  transform: translate(-50%, -50%) scale(calc(0.7 + var(--story-p) * 0.8));
  mix-blend-mode: screen;
}

.portal {
  position: absolute;
  z-index: 3;
  top: 43.2%;
  left: 50%;
  width: clamp(90px, 13vw, 220px);
  aspect-ratio: 1;
  opacity: 0.45;
  transform: translate(-50%, -50%) scale(calc(0.65 + var(--story-p) * 0.7));
}

.portal i {
  position: absolute;
  inset: calc(var(--ring, 0) * 12%);
  border: 1px solid rgba(113, 244, 238, calc(0.55 - (var(--ring, 0) * 0.13)));
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(78, 220, 220, 0.16);
  animation: portal-pulse 3.6s ease-in-out infinite;
  animation-delay: calc(var(--ring, 0) * -0.7s);
}

.portal i:nth-child(2) {
  --ring: 1;
}

.portal i:nth-child(3) {
  --ring: 2;
}

.perspective-grid {
  position: absolute;
  z-index: 2;
  right: -20%;
  bottom: -46%;
  left: -20%;
  height: 80%;
  opacity: calc(0.08 + var(--story-p) * 0.22);
  background-image:
    linear-gradient(rgba(101, 245, 225, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 245, 225, 0.22) 1px, transparent 1px);
  background-size: 74px 50px;
  transform: perspective(500px) rotateX(67deg) translateY(calc(var(--story-p) * -80px));
  transform-origin: center top;
  mask-image: linear-gradient(transparent, #000 28%, transparent 90%);
}

.server-field {
  position: absolute;
  z-index: 2;
  inset: 0;
  opacity: clamp(0, calc((var(--story-p) - 0.24) * 5), 0.72);
}

.server-field > i {
  position: absolute;
  bottom: 17%;
  left: var(--x);
  width: clamp(22px, 3.2vw, 56px);
  height: var(--h);
  border: 1px solid rgba(95, 239, 224, calc(0.13 + var(--d) * 0.22));
  background:
    repeating-linear-gradient(180deg, rgba(89, 237, 226, 0.17) 0 2px, transparent 2px 12px),
    linear-gradient(90deg, rgba(6, 27, 31, 0.84), rgba(8, 13, 18, 0.96));
  box-shadow: 0 0 calc(18px * var(--d)) rgba(60, 222, 219, 0.14);
  transform: translateY(calc((1 - var(--story-p)) * 55px)) skewY(-2deg);
}

.architect {
  position: absolute;
  z-index: 6;
  bottom: -13vh;
  left: 50%;
  width: min(47vw, 610px);
  opacity: var(--char-opacity);
  transform:
    translate3d(
      calc(-50% + var(--char-x) + (var(--mx) * 12px)),
      calc(var(--char-y) + (var(--my) * 4px)),
      0
    )
    scale(var(--char-scale));
  transform-origin: center bottom;
  will-change: transform, opacity;
}

.architect img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.72));
}

.architect-aura {
  position: absolute;
  z-index: 0;
  top: 14%;
  left: 34%;
  width: 47%;
  height: 63%;
  border-radius: 50%;
  background: rgba(43, 222, 224, 0.15);
  filter: blur(55px);
}

.architect-ground {
  position: absolute;
  z-index: 1;
  right: 17%;
  bottom: 2%;
  left: 14%;
  height: 6%;
  border: 1px solid rgba(101, 245, 225, 0.34);
  border-radius: 50%;
  background: rgba(101, 245, 225, 0.08);
  box-shadow: 0 0 45px rgba(44, 223, 220, 0.24);
  transform: perspective(120px) rotateX(65deg);
}

.scene-coordinate {
  position: absolute;
  z-index: 5;
  color: rgba(207, 230, 230, 0.42);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
}

.coordinate-a {
  top: 24%;
  right: 5%;
  writing-mode: vertical-rl;
}

.coordinate-b {
  bottom: 19%;
  left: 4%;
}

.scene-index {
  position: absolute;
  z-index: 5;
  right: var(--gutter);
  bottom: 4.5rem;
  color: #788a8f;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
}

.scene-index span {
  color: var(--cyan);
}

.story-scenes {
  z-index: 10;
  pointer-events: none;
}

.scene-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 7rem var(--gutter) 5rem;
  opacity: 0;
  will-change: opacity, transform;
}

.scene-panel:first-child {
  opacity: 1;
}

.scene-copy {
  position: relative;
  width: min(52vw, 820px);
  margin-left: clamp(0rem, 3.6vw, 4rem);
  pointer-events: auto;
}

.scene-right .scene-copy {
  width: min(43vw, 650px);
  margin-right: clamp(1rem, 6vw, 7rem);
  margin-left: auto;
}

.scene-eyebrow,
.chapter-no,
.section-kicker,
.work-world-no {
  display: inline-flex;
  align-items: center;
  color: #9aabad;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.6rem, 0.75vw, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scene-eyebrow i {
  width: 22px;
  height: 1px;
  margin-right: 0.65rem;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.hero-panel h1 {
  max-width: 860px;
  margin: clamp(1.1rem, 2.4vh, 1.8rem) 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.15rem, 6.25vw, 7.2rem);
  font-weight: 500;
  line-height: 0.89;
  letter-spacing: -0.068em;
}

.hero-panel h1 > span {
  display: block;
}

.hero-panel h1 .accent-line {
  color: var(--cyan);
  text-shadow: 0 0 45px rgba(89, 240, 224, 0.14);
}

.scene-lead {
  max-width: 620px;
  color: #b1bec0;
  font-size: clamp(0.92rem, 1.25vw, 1.15rem);
  line-height: 1.75;
}

.identity-line {
  display: flex;
  max-width: 620px;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.65rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: #819297;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 1.3rem;
  margin-top: 1.6rem;
  color: var(--white);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.text-link span {
  color: var(--cyan);
  font-size: 1rem;
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translateY(4px);
}

.chapter-no {
  color: var(--cyan);
}

.scene-panel h2 {
  max-width: 710px;
  margin: 1.1rem 0 1.3rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.35rem, 4.6vw, 5.5rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.058em;
}

.scene-panel .scene-copy > p:not(.role-pill) {
  max-width: 610px;
  color: #aebbbc;
  font-size: clamp(0.92rem, 1.18vw, 1.1rem);
  line-height: 1.78;
}

.role-pill {
  display: table;
  margin-top: 1.1rem;
  padding: 0.48rem 0.68rem;
  border: 1px solid rgba(101, 245, 225, 0.28);
  color: #d9f8f4;
  background: rgba(101, 245, 225, 0.07);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.scene-panel blockquote {
  max-width: 610px;
  margin-top: 1.35rem;
  padding: 0.65rem 0 0.65rem 1rem;
  border-left: 1px solid var(--cyan);
  color: #d7dfdf;
  font-size: 0.85rem;
}

.scene-tags,
.work-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin-top: 1.4rem;
}

.scene-tags li,
.work-tech li {
  padding: 0.38rem 0.58rem;
  border: 1px solid rgba(222, 244, 242, 0.14);
  color: #9eacad;
  background: rgba(1, 7, 9, 0.2);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.time-code {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.time-code b {
  color: transparent;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4.2rem, 7vw, 7rem);
  font-weight: 600;
  line-height: 0.75;
  letter-spacing: -0.08em;
  -webkit-text-stroke: 1px var(--cyan);
}

.time-code span {
  color: #bcd0d0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.65rem;
  line-height: 1.4;
  letter-spacing: 0.18em;
}

.pipeline {
  display: flex;
  max-width: 670px;
  gap: 0;
  margin-top: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 7, 9, 0.4);
}

.pipeline li {
  position: relative;
  display: grid;
  flex: 1;
  min-width: 0;
  min-height: 76px;
  align-content: center;
  gap: 0.2rem;
  padding: 0.7rem;
  border-right: 1px solid var(--line);
  color: #ced8d8;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.58rem;
}

.pipeline li:last-child {
  border-right: 0;
}

.pipeline li::after {
  position: absolute;
  right: -3px;
  top: 50%;
  z-index: 2;
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.pipeline li:last-child::after {
  display: none;
}

.pipeline span {
  color: #607378;
  font-size: 0.5rem;
}

.platform-orbit {
  position: relative;
  display: flex;
  width: min(100%, 540px);
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  color: #c4d2d2;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.platform-orbit::before {
  position: absolute;
  top: 50%;
  right: 3rem;
  left: 3rem;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.platform-orbit span {
  position: relative;
  z-index: 1;
  padding: 0 0.4rem;
  background: #071014;
}

.ai-signal {
  display: flex;
  height: 34px;
  align-items: end;
  gap: 4px;
  margin-top: 1rem;
}

.ai-signal i {
  display: block;
  width: 3px;
  height: 30%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(101, 245, 225, 0.7);
  animation: ai-bars 1.4s ease-in-out infinite alternate;
}

.ai-signal i:nth-child(2) { height: 70%; animation-delay: -0.7s; }
.ai-signal i:nth-child(3) { height: 100%; animation-delay: -0.25s; }
.ai-signal i:nth-child(4) { height: 58%; animation-delay: -0.9s; }
.ai-signal i:nth-child(5) { height: 38%; animation-delay: -0.4s; }

.scene-statement {
  display: block;
  margin-top: 1.5rem;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 1.55vw, 1.35rem);
  font-weight: 500;
  line-height: 1.4;
}

.story-rail {
  position: absolute;
  z-index: 20;
  top: 50%;
  right: calc(var(--gutter) + 0.35rem);
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  transform: translateY(-50%);
}

.rail-label {
  color: #6c7b7e;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
}

.rail-line {
  position: relative;
  display: block;
  width: 1px;
  height: 140px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.rail-line i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transform: scaleY(0);
  transform-origin: top;
}

.rail-count {
  color: #8c9c9f;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
}

.scroll-cue {
  position: absolute;
  z-index: 15;
  bottom: 2rem;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  opacity: var(--intro-fade);
  transform: translateX(-50%);
}

.scroll-cue span {
  color: #839396;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 38px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
}

.scroll-cue i::after {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 60%;
  content: "";
  background: var(--cyan);
  animation: scroll-line 1.8s ease-in-out infinite;
}

/* Manifesto transition */
.manifesto {
  position: relative;
  z-index: 2;
  min-height: 115svh;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
}

.manifesto-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 2.2vw;
  padding-top: clamp(2rem, 5vw, 5rem);
  color: transparent;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4rem, 10vw, 11rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.07em;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(8, 17, 20, 0.32);
  animation: marquee 30s linear infinite;
}

.manifesto-track i {
  color: var(--cyan-deep);
  font-style: normal;
  -webkit-text-stroke: 0;
}

.manifesto-inner {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max));
  margin: 10vh auto 0;
  padding: 0 0 clamp(5rem, 12vh, 9rem);
}

.manifesto .section-kicker {
  color: #4e6265;
}

.manifesto-inner > p {
  margin-top: 2.5rem;
  color: #617175;
  font-size: 0.9rem;
}

.manifesto-inner h2 {
  max-width: 1210px;
  margin-top: 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.6rem, 6vw, 7rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.process-line {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  margin-top: clamp(3rem, 8vh, 6rem);
  padding-top: 1.2rem;
  border-top: 1px solid rgba(8, 17, 20, 0.24);
  color: #4a5b5d;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.process-line i {
  height: 1px;
  background: linear-gradient(90deg, rgba(8, 17, 20, 0.15), rgba(8, 17, 20, 0.6));
}

/* Personal work worlds */
.work-worlds,
.expertise {
  position: relative;
  z-index: 2;
}

.work-worlds {
  padding: clamp(6rem, 13vw, 11rem) var(--gutter) clamp(5rem, 10vw, 9rem);
  background:
    radial-gradient(circle at 80% 5%, rgba(29, 140, 152, 0.12), transparent 30%),
    #03080b;
}

.section-header {
  display: grid;
  width: min(100%, var(--max));
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.55fr);
  align-items: end;
  gap: clamp(2rem, 7vw, 8rem);
  margin: 0 auto clamp(4rem, 9vw, 8rem);
}

.section-header h2 {
  max-width: 900px;
  margin-top: 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.8rem, 6vw, 6.7rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.064em;
}

.section-header > p {
  padding-bottom: 0.5rem;
  color: #8f9fa2;
  font-size: 0.94rem;
  line-height: 1.75;
}

.work-world {
  position: relative;
  display: grid;
  width: min(100%, var(--max));
  min-height: min(820px, 90svh);
  grid-template-columns: minmax(320px, 0.75fr) minmax(420px, 1.25fr);
  align-items: stretch;
  margin: 0 auto 2rem;
  overflow: hidden;
  border: 1px solid rgba(220, 243, 241, 0.12);
  background: #071014;
  isolation: isolate;
}

.work-world::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(101, 245, 225, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 245, 225, 0.035) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(90deg, transparent 10%, #000 70%);
}

.work-world-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 5.5rem);
  border-right: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(4, 10, 13, 0.98), rgba(4, 10, 13, 0.82));
}

.work-world-no {
  color: var(--cyan);
}

.work-world-copy h3 {
  margin: 1.3rem 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 4.5vw, 5.3rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.work-world-copy h3 em {
  color: var(--cyan);
  font-style: normal;
}

.work-world-copy > p {
  max-width: 580px;
  color: #9dadaf;
  font-size: 0.94rem;
  line-height: 1.8;
}

.work-world-copy .work-world-note {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--cyan);
  color: #c2cdcd;
  font-size: 0.8rem;
}

.work-tech {
  margin-top: 2rem;
}

.infra-visual,
.system-visual,
.device-universe,
.intelligence-map {
  position: relative;
  z-index: 2;
  min-height: 610px;
  overflow: hidden;
}

.infra-visual {
  background:
    radial-gradient(circle at 50% 52%, rgba(39, 216, 212, 0.13), transparent 32%),
    linear-gradient(150deg, #0c171d, #03080b 70%);
}

.infra-horizon {
  position: absolute;
  right: -30%;
  bottom: -32%;
  left: -30%;
  height: 75%;
  border: 1px solid rgba(101, 245, 225, 0.22);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 27px, rgba(101, 245, 225, 0.08) 28px 29px);
  transform: perspective(450px) rotateX(68deg);
}

.infra-rack {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(190px, 26vw, 350px);
  height: clamp(300px, 49vw, 480px);
  align-content: center;
  gap: 0.7rem;
  padding: 2.2rem 1.4rem 1.2rem;
  border: 1px solid rgba(112, 243, 232, 0.34);
  background: linear-gradient(110deg, rgba(12, 29, 35, 0.96), rgba(2, 8, 11, 0.98));
  box-shadow:
    0 50px 100px rgba(0, 0, 0, 0.55),
    0 0 70px rgba(55, 220, 218, 0.08);
  transform: translate(-50%, -50%) perspective(850px) rotateY(-8deg) rotateX(2deg);
}

.rack-head {
  position: absolute;
  top: 0.8rem;
  left: 1.2rem;
  color: #7e9397;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.16em;
}

.infra-rack > i {
  position: relative;
  height: 42px;
  border: 1px solid rgba(213, 244, 241, 0.12);
  background:
    radial-gradient(circle at 12px 50%, var(--cyan) 0 2px, transparent 3px),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(112, 243, 232, 0.08) 13px 14px),
    #081317;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.3);
}

.infra-rack > i::after {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  width: 28%;
  height: 2px;
  content: "";
  background: rgba(101, 245, 225, 0.34);
  box-shadow: 0 0 8px rgba(101, 245, 225, 0.4);
}

.infra-rack small {
  position: absolute;
  right: 1.1rem;
  bottom: 0.65rem;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.42rem;
  letter-spacing: 0.14em;
}

.infra-node {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(101, 245, 225, 0.18);
  color: #b9c8c9;
  background: rgba(3, 10, 13, 0.72);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  animation: node-float 4s ease-in-out infinite;
}

.infra-node i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}

.node-linux { top: 19%; left: 7%; }
.node-docker { top: 16%; right: 6%; animation-delay: -1.1s; }
.node-tail { right: 7%; bottom: 18%; animation-delay: -2.2s; }
.node-ssl { bottom: 16%; left: 8%; animation-delay: -3s; }

.infra-visual svg,
.intelligence-map svg {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.infra-visual path,
.intelligence-map path {
  fill: none;
  stroke: rgba(101, 245, 225, 0.45);
  stroke-width: 1;
  stroke-dasharray: 4 10;
  animation: line-flow 8s linear infinite;
}

.system-visual {
  background:
    radial-gradient(circle at 20% 20%, rgba(88, 105, 255, 0.12), transparent 28%),
    linear-gradient(150deg, #0a101d, #05090d 72%);
}

.system-window {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(78%, 720px);
  aspect-ratio: 1.45;
  overflow: hidden;
  border: 1px solid rgba(218, 235, 242, 0.22);
  background: rgba(8, 14, 22, 0.91);
  box-shadow: 0 45px 120px rgba(0, 0, 0, 0.55);
  transform:
    translate(calc(-50% + (var(--mx) * 8px)), calc(-50% + (var(--my) * 5px)))
    perspective(1000px)
    rotateY(-5deg)
    rotateX(2deg);
}

.system-bar {
  display: flex;
  height: 44px;
  align-items: center;
  gap: 6px;
  padding: 0 0.9rem;
  border-bottom: 1px solid rgba(218, 235, 242, 0.11);
  background: #0c151d;
}

.system-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34444c;
}

.system-bar i:first-child {
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(101, 245, 225, 0.65);
}

.system-bar span {
  margin-left: auto;
  color: #65777e;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.14em;
}

.system-sidebar {
  position: absolute;
  top: 44px;
  bottom: 0;
  left: 0;
  display: grid;
  width: 17%;
  align-content: start;
  gap: 1rem;
  padding: 1.3rem 1rem;
  border-right: 1px solid rgba(218, 235, 242, 0.09);
}

.system-sidebar i {
  height: 5px;
  border-radius: 10px;
  background: #1d2a32;
}

.system-sidebar i:first-child {
  width: 70%;
  background: rgba(101, 245, 225, 0.55);
}

.system-canvas {
  position: absolute;
  top: 44px;
  right: 0;
  bottom: 0;
  left: 17%;
  padding: 1.7rem;
}

.system-title {
  display: block;
  width: 42%;
  height: 9px;
  margin-bottom: clamp(2rem, 5vw, 4.5rem);
  border-radius: 10px;
  background: #26343c;
}

.system-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.system-flow b {
  display: grid;
  width: clamp(42px, 7vw, 86px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(101, 245, 225, 0.28);
  border-radius: 50%;
  color: #a5b8bb;
  background: rgba(101, 245, 225, 0.05);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.35rem, 0.55vw, 0.54rem);
  letter-spacing: 0.08em;
}

.system-flow i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(101, 245, 225, 0.13), var(--cyan));
}

.system-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-top: clamp(2rem, 5vw, 4.5rem);
}

.system-panels span {
  height: clamp(60px, 8vw, 105px);
  border: 1px solid rgba(218, 235, 242, 0.08);
  background:
    linear-gradient(135deg, rgba(101, 245, 225, 0.06), transparent),
    #0a131a;
}

.system-code {
  position: absolute;
  z-index: 3;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(101, 245, 225, 0.2);
  color: var(--cyan);
  background: rgba(3, 8, 11, 0.88);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
}

.code-a { top: 13%; right: 6%; }
.code-b { bottom: 12%; left: 6%; }

.device-universe {
  background:
    radial-gradient(circle at 52% 48%, rgba(108, 63, 233, 0.2), transparent 28%),
    linear-gradient(145deg, #0c0a18, #04080c 72%);
}

.universe-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(144, 115, 255, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);
}

.orbit-a {
  width: 78%;
  height: 43%;
}

.orbit-b {
  width: 46%;
  height: 77%;
  border-color: rgba(101, 245, 225, 0.15);
  transform: translate(-50%, -50%) rotate(35deg);
}

.abstract-desktop,
.abstract-browser,
.abstract-phone {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(218, 236, 243, 0.23);
  background:
    linear-gradient(135deg, rgba(104, 77, 230, 0.12), rgba(15, 26, 35, 0.9)),
    #071016;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.abstract-desktop {
  top: 18%;
  left: 11%;
  width: 55%;
  height: 45%;
  transform: perspective(900px) rotateY(9deg) rotateX(2deg);
}

.abstract-browser {
  right: 8%;
  bottom: 15%;
  width: 51%;
  height: 37%;
  transform: perspective(900px) rotateY(-8deg) rotateX(-2deg);
}

.abstract-phone {
  z-index: 3;
  top: 23%;
  right: 15%;
  width: 19%;
  height: 50%;
  border-radius: 1.2rem;
  background: linear-gradient(180deg, #121a2c, #070b12);
  transform: translate(calc(var(--mx) * 7px), calc(var(--my) * 5px)) rotate(4deg);
}

.device-label {
  position: absolute;
  top: 0.7rem;
  left: 0.8rem;
  color: #6f838a;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.46rem;
  letter-spacing: 0.14em;
}

.abstract-desktop i,
.abstract-browser i,
.abstract-phone i {
  position: absolute;
  border: 1px solid rgba(101, 245, 225, 0.12);
  background: rgba(101, 245, 225, 0.04);
}

.abstract-desktop i:nth-child(2) { top: 24%; left: 7%; width: 24%; height: 62%; }
.abstract-desktop i:nth-child(3) { top: 24%; right: 7%; width: 58%; height: 28%; }
.abstract-desktop i:nth-child(4) { right: 7%; bottom: 14%; width: 58%; height: 25%; }
.abstract-browser i:nth-child(2) { top: 27%; left: 8%; width: 84%; height: 13%; }
.abstract-browser i:nth-child(3) { right: 8%; bottom: 15%; left: 8%; height: 34%; }
.abstract-phone i:nth-child(2) { top: 18%; right: 12%; left: 12%; height: 30%; }
.abstract-phone i:nth-child(3) { right: 12%; bottom: 30%; left: 12%; height: 8%; }
.abstract-phone i:nth-child(4) { right: 12%; bottom: 15%; left: 12%; height: 8%; }

.universe-core {
  position: absolute;
  z-index: 5;
  top: 52%;
  left: 51%;
  display: grid;
  width: 88px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(101, 245, 225, 0.4);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(3, 9, 12, 0.83);
  box-shadow: 0 0 40px rgba(101, 245, 225, 0.16);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.55rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-align: center;
  transform: translate(-50%, -50%);
}

.ai-world {
  background: #070c0c;
}

.intelligence-map {
  background:
    radial-gradient(circle at 50% 50%, rgba(72, 225, 195, 0.14), transparent 33%),
    radial-gradient(circle at 15% 80%, rgba(255, 181, 104, 0.08), transparent 24%),
    #030909;
}

.intelligence-map::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.22;
  background-image: radial-gradient(rgba(101, 245, 225, 0.7) 0.7px, transparent 0.7px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle, #000, transparent 70%);
}

.intelligence-core {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(150px, 18vw, 230px);
  aspect-ratio: 1;
  place-content: center;
  border: 1px solid rgba(101, 245, 225, 0.48);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(2, 10, 10, 0.88);
  box-shadow:
    0 0 0 28px rgba(101, 245, 225, 0.025),
    0 0 0 58px rgba(101, 245, 225, 0.018),
    0 0 90px rgba(67, 232, 215, 0.16);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 5vw, 5.8rem);
  line-height: 0.8;
  letter-spacing: -0.07em;
  text-align: center;
  transform: translate(-50%, -50%);
}

.intelligence-core i {
  position: absolute;
  inset: 12%;
  border: 1px dashed rgba(101, 245, 225, 0.23);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.intelligence-core small {
  margin-top: 0.7rem;
  color: #799092;
  font-size: 0.45rem;
  letter-spacing: 0.16em;
}

.intelligence-node {
  position: absolute;
  z-index: 5;
  padding: 0.55rem 0.72rem;
  border: 1px solid rgba(101, 245, 225, 0.2);
  color: #a9babb;
  background: rgba(3, 10, 11, 0.78);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
}

.ai-node-a { top: 16%; left: 7%; }
.ai-node-b { top: 13%; right: 6%; }
.ai-node-c { bottom: 15%; left: 8%; }
.ai-node-d { right: 5%; bottom: 13%; }

/* Expertise */
.expertise {
  padding: clamp(6rem, 13vw, 11rem) var(--gutter);
  color: var(--ink);
  background: var(--paper);
}

.expertise .section-kicker {
  color: #526568;
}

.expertise .section-header > p {
  color: #58696c;
}

.expertise-list {
  width: min(100%, var(--max));
  margin: 0 auto;
  border-top: 1px solid rgba(8, 17, 20, 0.24);
}

.expertise-row {
  position: relative;
  display: grid;
  min-height: 180px;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 2rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(8, 17, 20, 0.24);
}

.expertise-row::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.expertise-row > * {
  position: relative;
  z-index: 1;
}

.expertise-row:hover::before {
  transform: scaleY(1);
}

.expertise-row:hover {
  color: var(--paper);
}

.expertise-no {
  color: #7b8b8d;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

.expertise-row h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3.7vw, 4.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.expertise-row p {
  max-width: 690px;
  margin-top: 0.65rem;
  color: #667578;
  font-size: 0.82rem;
  transition: color 180ms ease;
}

.expertise-row:hover p {
  color: #9eacac;
}

.expertise-glyph {
  min-width: 80px;
  color: #718184;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.25rem, 3vw, 3rem);
  text-align: center;
  transition:
    color 180ms ease,
    transform 300ms ease;
}

.expertise-row:hover .expertise-glyph {
  color: var(--cyan);
  transform: rotate(-8deg) scale(1.08);
}

/* Contact */
.contact {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.78fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 9rem);
  overflow: hidden;
  padding: clamp(7rem, 12vw, 12rem) var(--gutter);
  background:
    radial-gradient(circle at 13% 65%, rgba(32, 199, 199, 0.13), transparent 31%),
    #03080a;
}

.contact::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.16;
  background:
    linear-gradient(rgba(101, 245, 225, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 245, 225, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000, transparent 68%);
}

.contact-intro,
.contact-form {
  position: relative;
  z-index: 2;
}

.contact-intro {
  max-width: 820px;
}

.contact-intro h2 {
  margin: 1.2rem 0 1.8rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.4rem, 7.2vw, 8.2rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.contact-intro > p {
  max-width: 620px;
  color: #99a9ab;
  font-size: 1rem;
  line-height: 1.8;
}

.direct-links {
  max-width: 670px;
  margin-top: 3rem;
  border-top: 1px solid var(--line);
}

.direct-links a {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.7rem;
  transition: padding 200ms ease, color 200ms ease;
}

.direct-links a:hover {
  padding: 0 0.7rem;
  color: var(--cyan);
}

.direct-links span {
  color: #728488;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.direct-links b {
  font-weight: 500;
}

.contact-form {
  padding: clamp(1.5rem, 3.5vw, 3.5rem);
  border: 1px solid rgba(215, 242, 239, 0.15);
  background: rgba(7, 15, 18, 0.72);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.form-label {
  margin-bottom: 1.8rem;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
}

.contact-form label:not(.hidden-field label) {
  display: grid;
  margin-bottom: 1.2rem;
}

.contact-form label > span {
  margin-bottom: 0.45rem;
  color: #849397;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(215, 242, 239, 0.15);
  border-radius: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  font-size: 0.9rem;
  transition: border-color 180ms ease;
}

.contact-form input,
.contact-form select {
  min-height: 50px;
}

.contact-form textarea {
  min-height: 105px;
  padding: 0.8rem 0;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--cyan);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #55666b;
}

.contact-form select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #738589 50%),
    linear-gradient(135deg, #738589 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.contact-form option {
  color: var(--white);
  background: #071014;
}

.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.submit-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.8rem;
  padding: 0 1.2rem;
  border: 0;
  color: #03100f;
  background: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 180ms ease, transform 180ms ease;
}

.submit-button:hover {
  background: #a1fff2;
  transform: translateY(-2px);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.submit-button i {
  font-size: 1rem;
  font-style: normal;
}

.form-status {
  min-height: 1.4em;
  margin-top: 0.8rem;
  color: #9eadaf;
  font-size: 0.72rem;
}

.form-status.success {
  color: var(--cyan);
}

.form-status.error {
  color: var(--danger);
}

.contact-orb {
  position: absolute;
  z-index: 1;
  right: 39%;
  bottom: -17vw;
  width: 42vw;
  aspect-ratio: 1;
  border: 1px solid rgba(101, 245, 225, 0.12);
  border-radius: 50%;
  opacity: 0.45;
}

.contact-orb i {
  position: absolute;
  inset: calc(var(--i, 1) * 14%);
  border: 1px dashed rgba(101, 245, 225, 0.14);
  border-radius: 50%;
}

.contact-orb i:nth-child(1) { --i: 1; }
.contact-orb i:nth-child(2) { --i: 2; }
.contact-orb i:nth-child(3) { --i: 3; background: rgba(101, 245, 225, 0.06); }

/* Footer */
.site-footer {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 320px;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 4rem;
  padding: 5rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
  background: #020507;
}

.footer-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.5rem, 8vw, 9rem);
  font-weight: 600;
  line-height: 0.72;
  letter-spacing: -0.08em;
}

.footer-role,
.footer-meta {
  display: grid;
  gap: 0.5rem;
  color: #718185;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.footer-meta {
  text-align: right;
}

.footer-meta a {
  color: var(--cyan);
}

/* Reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(44px);
  transition:
    opacity 900ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Motion */
@keyframes boot-ring {
  to { transform: rotate(360deg); }
}

@keyframes boot-dots {
  0% { opacity: 0.15; }
  50% { opacity: 1; }
  100% { opacity: 0.15; }
}

@keyframes portal-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.92); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes scroll-line {
  0% { transform: translateY(0); }
  100% { transform: translateY(280%); }
}

@keyframes ai-bars {
  to { transform: scaleY(0.3); opacity: 0.35; }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes node-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes line-flow {
  to { stroke-dashoffset: -140; }
}

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

@media (max-width: 1180px) {
  .site-nav {
    gap: 1rem;
  }

  .site-nav > a {
    font-size: 0.62rem;
  }

  .scene-copy {
    width: 59vw;
    margin-left: 0;
  }

  .scene-right .scene-copy {
    width: 49vw;
    margin-right: 3rem;
  }

  .architect {
    width: min(53vw, 560px);
  }

  .work-world {
    grid-template-columns: minmax(300px, 0.78fr) minmax(380px, 1.22fr);
  }

  .work-world-copy {
    padding: 3rem;
  }
}

@media (max-width: 900px) {
  :root {
    --gutter: clamp(1.1rem, 4vw, 2.2rem);
  }

  .site-header {
    min-height: 54px;
  }

  .brand-copy {
    display: none;
  }

  .menu-toggle {
    position: relative;
    z-index: 3;
    display: block;
  }

  .menu-open .menu-toggle > span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-open .menu-toggle > span:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    z-index: 2;
    inset: 0;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    padding: 6rem var(--gutter);
    opacity: 0;
    background:
      radial-gradient(circle at 80% 20%, rgba(40, 199, 199, 0.15), transparent 28%),
      rgba(2, 6, 8, 0.98);
    transform: translateY(-12px);
    transition:
      opacity 250ms ease,
      transform 250ms ease,
      visibility 0s linear 250ms;
  }

  .menu-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .site-nav > a {
    font-size: clamp(1.6rem, 7vw, 3.5rem);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.03em;
    text-transform: none;
  }

  .site-nav .nav-contact {
    width: 100%;
    min-height: 56px;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 0 1rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .scene-panel {
    align-items: flex-end;
    padding-top: 6.5rem;
    padding-bottom: 5.8rem;
  }

  .scene-copy,
  .scene-right .scene-copy {
    width: min(100%, 680px);
    margin-right: 3.5rem;
    margin-left: 0;
  }

  .hero-panel {
    align-items: center;
  }

  .hero-panel .scene-copy {
    margin-right: 0;
  }

  .hero-panel h1 {
    max-width: 78vw;
    font-size: clamp(3.4rem, 10vw, 6.7rem);
  }

  .scene-panel h2 {
    font-size: clamp(2.4rem, 7vw, 4.8rem);
  }

  .architect {
    bottom: -9vh;
    width: min(65vw, 510px);
    opacity: calc(var(--char-opacity) * 0.74);
  }

  .world-veil {
    background:
      linear-gradient(180deg, rgba(2, 5, 7, 0.7) 0%, rgba(2, 5, 7, 0.18) 36%, rgba(2, 5, 7, 0.93) 77%),
      radial-gradient(circle at 50% 45%, transparent, rgba(2, 5, 7, 0.6) 72%);
  }

  .story-rail {
    right: var(--gutter);
  }

  .manifesto {
    min-height: auto;
  }

  .process-line {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .process-line span {
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(8, 17, 20, 0.16);
  }

  .process-line i {
    display: none;
  }

  .section-header {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.5rem;
  }

  .work-world {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .work-world-copy {
    min-height: 540px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .infra-visual,
  .system-visual,
  .device-universe,
  .intelligence-map {
    min-height: 570px;
  }

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

  .contact-form {
    width: min(100%, 680px);
  }

  .contact-orb {
    right: auto;
    bottom: 30%;
    left: -20vw;
    width: 70vw;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .footer-name {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 4.5rem;
  }

  body::before {
    opacity: 0.1;
  }

  .site-header {
    top: 0.65rem;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .story {
    height: 525svh;
  }

  .story-stage {
    min-height: 560px;
  }

  .world-image {
    inset: -4% -38%;
    width: 176%;
    height: 108%;
    object-position: 53% 50%;
  }

  .server-field {
    display: none;
  }

  .architect {
    bottom: -5vh;
    width: min(89vw, 500px);
    filter: brightness(0.82);
  }

  .coordinate-a,
  .coordinate-b,
  .scene-index {
    display: none;
  }

  .scene-panel {
    padding: 5.2rem var(--gutter) 4.8rem;
  }

  .scene-copy,
  .scene-right .scene-copy {
    width: 100%;
    margin: 0 2.4rem 0 0;
    padding: 1rem 0;
  }

  .hero-panel {
    align-items: flex-start;
    padding-top: 7.8rem;
  }

  .hero-panel .scene-copy {
    margin: 0;
  }

  .hero-panel h1 {
    max-width: none;
    margin-top: 1rem;
    font-size: clamp(2.9rem, 12.2vw, 4.8rem);
  }

  .hero-panel h1 > span:last-child {
    font-size: 0.84em;
  }

  .scene-lead {
    max-width: 89%;
    font-size: 0.83rem;
    line-height: 1.65;
  }

  .identity-line {
    display: grid;
    justify-content: start;
    font-size: 0.52rem;
  }

  .scene-panel h2 {
    margin: 0.85rem 0 1rem;
    font-size: clamp(2.15rem, 10.4vw, 3.7rem);
  }

  .scene-panel .scene-copy > p:not(.role-pill) {
    font-size: 0.82rem;
    line-height: 1.63;
  }

  .scene-panel blockquote {
    display: none;
  }

  .scene-tags {
    margin-top: 0.9rem;
  }

  .scene-tags li {
    padding: 0.28rem 0.42rem;
    font-size: 0.49rem;
  }

  .time-code {
    margin-top: 0.65rem;
  }

  .time-code b {
    font-size: 3.8rem;
  }

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

  .pipeline li {
    min-height: 50px;
    padding: 0.45rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.49rem;
  }

  .pipeline li:nth-child(3) {
    border-right: 0;
  }

  .pipeline li::after {
    display: none;
  }

  .platform-orbit {
    margin-top: 1rem;
    padding: 0.65rem;
    font-size: 0.5rem;
  }

  .story-rail {
    top: auto;
    right: var(--gutter);
    bottom: 1.5rem;
    left: var(--gutter);
    display: flex;
    align-items: center;
    transform: none;
  }

  .rail-label {
    display: none;
  }

  .rail-line {
    flex: 1;
    width: auto;
    height: 1px;
  }

  .rail-line i {
    transform: scaleX(0);
    transform-origin: left;
  }

  .rail-count {
    writing-mode: initial;
  }

  .scroll-cue {
    display: none;
  }

  .manifesto-track {
    padding-top: 3rem;
    font-size: 4rem;
  }

  .manifesto-inner {
    margin-top: 5rem;
  }

  .manifesto-inner h2,
  .section-header h2 {
    font-size: clamp(2.45rem, 11vw, 4.1rem);
  }

  .work-worlds,
  .expertise,
  .contact {
    padding-right: var(--gutter);
    padding-left: var(--gutter);
  }

  .section-header {
    margin-bottom: 3.5rem;
  }

  .work-world-copy {
    min-height: auto;
    padding: 3.2rem 1.35rem;
  }

  .work-world-copy h3 {
    font-size: clamp(2.35rem, 11vw, 3.9rem);
  }

  .work-world-copy > p {
    font-size: 0.83rem;
  }

  .infra-visual,
  .system-visual,
  .device-universe,
  .intelligence-map {
    min-height: 440px;
  }

  .infra-rack {
    width: 210px;
    height: 320px;
  }

  .infra-node {
    font-size: 0.46rem;
  }

  .system-window {
    width: 90%;
  }

  .system-canvas {
    padding: 1rem;
  }

  .system-flow b {
    width: 42px;
  }

  .abstract-desktop {
    left: 5%;
    width: 67%;
  }

  .abstract-browser {
    right: 3%;
    width: 60%;
  }

  .abstract-phone {
    right: 8%;
    width: 25%;
  }

  .intelligence-core {
    width: 140px;
  }

  .intelligence-node {
    font-size: 0.42rem;
  }

  .expertise-row {
    min-height: 150px;
    grid-template-columns: 36px 1fr 32px;
    gap: 0.7rem;
  }

  .expertise-row h3 {
    font-size: 1.8rem;
  }

  .expertise-row p {
    font-size: 0.72rem;
    line-height: 1.55;
  }

  .expertise-glyph {
    min-width: 0;
    font-size: 1rem;
  }

  .contact {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .contact-intro h2 {
    font-size: clamp(3.15rem, 14.5vw, 5.4rem);
  }

  .direct-links b {
    max-width: 67%;
    overflow: hidden;
    font-size: 0.62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .contact-form {
    padding: 1.25rem;
  }

  .site-footer {
    min-height: 360px;
    grid-template-columns: 1fr;
    align-content: end;
    gap: 1.8rem;
  }

  .footer-name {
    grid-column: auto;
    font-size: 4.4rem;
  }

  .footer-meta {
    text-align: left;
  }
}

/* Cinematic cutscene v2 — fixed lead, moving camera */
:root {
  --pose-intro: 1;
  --pose-walk: 0;
  --pose-operate: 0;
  --pose-final: 0;
  --walk-bob: 0;
  --walk-tilt: 0;
  --gate-open: 0;
  --holo-opacity: 0;
  --flare-opacity: 0;
  --server-opacity: 0;
  --cinema-bars: 1;
}

.site-header,
.site-header.scrolled {
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  min-height: 84px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0 var(--gutter);
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(2, 5, 7, 0.82), rgba(2, 5, 7, 0));
  box-shadow: none;
  backdrop-filter: none;
}

.site-header::after {
  position: absolute;
  right: var(--gutter);
  bottom: 0;
  left: var(--gutter);
  height: 1px;
  content: "";
  background: rgba(219, 242, 240, 0.13);
}

.hud-brand {
  position: relative;
  z-index: 104;
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.85rem;
  font-family: "Space Grotesk", sans-serif;
}

.hud-brand span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(101, 245, 225, 0.5);
  color: var(--cyan);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hud-brand b {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.hud-scene {
  position: relative;
  z-index: 104;
  display: flex;
  min-width: 220px;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.54rem;
  letter-spacing: 0.16em;
}

.hud-scene span {
  color: var(--cyan);
}

.hud-scene i {
  display: block;
  width: 32px;
  height: 1px;
  background: rgba(217, 240, 238, 0.25);
}

.hud-scene b {
  min-width: 86px;
  color: #a7b6b7;
  font-weight: 500;
}

.site-header .menu-toggle {
  position: relative;
  z-index: 104;
  display: inline-flex;
  width: auto;
  height: 44px;
  align-items: center;
  justify-self: end;
  gap: 0.75rem;
  padding: 0;
  border: 0;
  color: #dce5e4;
  background: transparent;
}

.site-header .menu-toggle > span:not(.sr-only) {
  display: initial;
  width: auto;
  height: auto;
  margin: 0;
  background: none;
  transform: none;
}

.menu-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.17em;
}

.site-header .menu-toggle .menu-dot {
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(101, 245, 225, 0.35);
  transition:
    background 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.menu-open .site-header .menu-toggle .menu-dot {
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(101, 245, 225, 0.65);
  transform: scale(1.35);
}

.hud-page-progress {
  position: absolute;
  z-index: 105;
  right: var(--gutter);
  bottom: 0;
  left: var(--gutter);
  height: 1px;
  overflow: hidden;
}

.hud-page-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 0 10px rgba(101, 245, 225, 0.8);
  transform: scaleX(0);
  transform-origin: left;
}

.site-header .site-nav {
  position: fixed;
  z-index: 102;
  inset: 0;
  display: grid;
  visibility: hidden;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 0;
  padding: clamp(7rem, 14vh, 10rem) max(var(--gutter), calc((100vw - 1180px) / 2));
  opacity: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(49, 202, 200, 0.14), transparent 28%),
    linear-gradient(110deg, rgba(3, 8, 11, 0.99), rgba(1, 4, 6, 0.995));
  transform: none;
  transition:
    opacity 430ms cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 430ms;
}

.site-header .site-nav::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.15;
  background:
    linear-gradient(rgba(101, 245, 225, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 245, 225, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 75% 30%, #000, transparent 58%);
}

.menu-open {
  overflow: hidden;
}

.menu-open .site-header .site-nav {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.menu-heading,
.menu-contact,
.site-header .site-nav > a {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.menu-heading {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(218, 240, 238, 0.18);
  color: #708184;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.17em;
}

.site-header .site-nav > a,
.site-header .site-nav > a:not(.nav-contact) {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: clamp(0.65rem, 1.7vh, 1.2rem) 0;
  border-bottom: 1px solid rgba(218, 240, 238, 0.12);
  color: var(--white);
  font-family: "Space Grotesk", sans-serif;
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.site-header .site-nav > a::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: rgba(101, 245, 225, 0.05);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 260ms ease;
}

.site-header .site-nav > a:hover::before {
  transform: scaleY(1);
}

.site-header .site-nav > a::after {
  display: none;
}

.site-header .site-nav > a span {
  color: var(--cyan);
  font-size: 0.54rem;
  letter-spacing: 0.14em;
}

.site-header .site-nav > a b {
  font-size: clamp(2rem, 5.3vh, 4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.site-header .site-nav > a i {
  color: #718285;
  font-size: 0.56rem;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.menu-contact {
  display: flex;
  justify-content: space-between;
  padding-top: 1.1rem;
  color: #78898c;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.09em;
}

.menu-contact a {
  color: var(--cyan);
}

/* Stable character keyline. The camera moves; the lead does not ping-pong. */
.world-image {
  filter:
    brightness(calc(0.53 + var(--story-p) * 0.09))
    saturate(calc(0.76 + var(--story-p) * 0.18))
    contrast(1.1);
  transform: translate3d(0, var(--world-y), 0) scale(var(--world-scale));
}

.character-stage {
  position: absolute;
  z-index: 7;
  bottom: -11vh;
  left: 66%;
  width: min(46vw, 650px);
  aspect-ratio: 2 / 3;
  opacity: var(--char-opacity);
  transform:
    translate3d(-50%, var(--char-y), 0)
    scale(var(--char-scale));
  transform-origin: center bottom;
  will-change: transform, opacity;
}

.character-pose {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 32px 48px rgba(0, 0, 0, 0.76));
  transform-origin: center bottom;
  will-change: opacity, transform;
}

.pose-intro {
  opacity: var(--pose-intro);
  transform: translateY(calc((1 - var(--pose-intro)) * 10px));
}

.pose-walk {
  opacity: var(--pose-walk);
  transform:
    translateY(calc(var(--walk-bob) * 1px))
    rotate(calc(var(--walk-tilt) * 1deg));
}

.pose-operate {
  opacity: var(--pose-operate);
  transform: translateY(calc((1 - var(--pose-operate)) * 8px));
}

.pose-final {
  opacity: var(--pose-final);
  transform:
    translateY(calc((1 - var(--pose-final)) * 15px))
    scale(calc(0.985 + var(--pose-final) * 0.015));
}

.character-aura {
  position: absolute;
  z-index: 0;
  top: 11%;
  left: 28%;
  width: 56%;
  height: 72%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, rgba(101, 245, 225, 0.17), rgba(51, 132, 255, 0.06) 44%, transparent 72%);
  filter: blur(42px);
  opacity: calc(0.55 + var(--story-p) * 0.35);
}

.character-ground {
  position: absolute;
  z-index: 1;
  right: 13%;
  bottom: 1.5%;
  left: 14%;
  height: 5%;
  border: 1px solid rgba(101, 245, 225, 0.25);
  border-radius: 50%;
  background: rgba(101, 245, 225, 0.045);
  box-shadow: 0 0 45px rgba(44, 223, 220, 0.18);
  transform: perspective(120px) rotateX(68deg);
}

.cinematic-gates {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}

.cinematic-gates > span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 21vw;
  min-width: 150px;
  overflow: hidden;
  border-color: rgba(101, 245, 225, 0.13);
  background:
    repeating-linear-gradient(180deg, rgba(101, 245, 225, 0.08) 0 1px, transparent 1px 14vh),
    linear-gradient(90deg, rgba(1, 5, 7, 0.99), rgba(4, 15, 19, 0.92));
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.55);
  will-change: transform;
}

.gate-left {
  left: 0;
  border-right: 1px solid;
  transform: translateX(calc(var(--gate-open) * -72%));
}

.gate-right {
  right: 0;
  border-left: 1px solid;
  transform: translateX(calc(var(--gate-open) * 72%));
}

.cinematic-gates i {
  position: absolute;
  right: 12%;
  left: 12%;
  height: 1px;
  background: rgba(101, 245, 225, 0.2);
}

.cinematic-gates i:nth-child(1) { top: 22%; }
.cinematic-gates i:nth-child(2) { top: 50%; }
.cinematic-gates i:nth-child(3) { top: 78%; }

.holo-interface {
  position: absolute;
  z-index: 6;
  top: 16%;
  right: 2%;
  width: min(38vw, 590px);
  height: 62%;
  opacity: var(--holo-opacity);
  filter: blur(calc((1 - var(--holo-opacity)) * 8px));
  transform:
    perspective(900px)
    rotateY(-13deg)
    translateZ(0)
    scale(calc(0.9 + var(--holo-opacity) * 0.1));
  transform-origin: right center;
  pointer-events: none;
}

.holo-ring {
  position: absolute;
  top: 50%;
  left: 52%;
  border: 1px solid rgba(101, 245, 225, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 34px rgba(101, 245, 225, 0.08);
  transform: translate(-50%, -50%);
}

.ring-one {
  width: min(32vw, 430px);
  aspect-ratio: 1;
}

.ring-two {
  width: min(21vw, 280px);
  aspect-ratio: 1;
  border-style: dashed;
  animation: spin 18s linear infinite;
}

.holo-panel {
  position: absolute;
  display: grid;
  width: 155px;
  min-height: 68px;
  align-content: center;
  gap: 0.45rem;
  padding: 0.7rem;
  border: 1px solid rgba(101, 245, 225, 0.25);
  color: #a8c2c1;
  background: rgba(3, 13, 16, 0.48);
  box-shadow: inset 0 0 22px rgba(101, 245, 225, 0.03);
  font-family: "Space Grotesk", sans-serif;
  backdrop-filter: blur(8px);
}

.holo-panel b {
  color: var(--cyan);
  font-size: 0.48rem;
  font-weight: 500;
  letter-spacing: 0.13em;
}

.holo-panel i {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(101, 245, 225, 0.7), transparent);
}

.holo-panel i:last-child {
  width: 64%;
  opacity: 0.45;
}

.holo-a { top: 5%; right: 7%; }
.holo-b { top: 48%; left: 0; }
.holo-c { right: 0; bottom: 3%; }

.cutscene-flare {
  position: absolute;
  z-index: 12;
  inset: -20%;
  opacity: var(--flare-opacity);
  background:
    linear-gradient(90deg, transparent 28%, rgba(174, 255, 248, 0.8) 50%, transparent 72%),
    radial-gradient(circle at 63% 50%, rgba(101, 245, 225, 0.7), transparent 30%);
  filter: blur(12px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.cinema-bars {
  position: absolute;
  z-index: 18;
  inset: 0;
  pointer-events: none;
}

.cinema-bars i {
  position: absolute;
  right: 0;
  left: 0;
  height: calc(var(--cinema-bars) * 2.3vh);
  background: #010304;
}

.cinema-bars i:first-child { top: 0; }
.cinema-bars i:last-child { bottom: 0; }

.server-field {
  opacity: var(--server-opacity);
}

.scene-copy,
.scene-right .scene-copy {
  width: min(48vw, 760px);
  margin-right: auto;
  margin-left: clamp(0rem, 3.6vw, 4rem);
}

.scene-panel {
  align-items: center;
}

.scene-panel .scene-copy {
  transform-origin: left center;
}

@media (max-width: 900px) {
  .site-header,
  .site-header.scrolled {
    min-height: 68px;
  }

  .hud-scene {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr 1fr;
  }

  .site-header .site-nav {
    padding-right: var(--gutter);
    padding-left: var(--gutter);
  }

  .site-header .site-nav > a,
  .site-header .site-nav > a:not(.nav-contact) {
    grid-template-columns: 42px 1fr auto;
  }

  .character-stage {
    left: 64%;
    width: min(62vw, 560px);
  }

  .scene-copy,
  .scene-right .scene-copy {
    width: min(59vw, 680px);
    margin-right: 0;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-header.scrolled {
    padding-right: var(--gutter);
    padding-left: var(--gutter);
    background: linear-gradient(180deg, rgba(2, 5, 7, 0.9), rgba(2, 5, 7, 0));
  }

  .hud-brand b {
    display: none;
  }

  .hud-brand span {
    width: 34px;
    height: 34px;
  }

  .site-header .site-nav > a,
  .site-header .site-nav > a:not(.nav-contact) {
    grid-template-columns: 30px 1fr;
    padding: 0.9rem 0;
  }

  .site-header .site-nav > a b {
    font-size: clamp(2.1rem, 11vw, 3.3rem);
  }

  .site-header .site-nav > a i {
    display: none;
  }

  .menu-heading small,
  .menu-contact span {
    display: none;
  }

  .character-stage {
    bottom: -3vh;
    left: 50%;
    width: min(98vw, 510px);
    opacity: calc(var(--char-opacity) * 0.76);
  }

  .scene-panel,
  .hero-panel {
    align-items: flex-end;
    padding-top: 6.8rem;
    padding-bottom: 5.1rem;
  }

  .hero-panel {
    align-items: flex-start;
    padding-top: 7.6rem;
  }

  .scene-copy,
  .scene-right .scene-copy {
    width: calc(100% - 2rem);
    margin: 0 2rem 0 0;
  }

  .hero-panel .scene-copy {
    width: 100%;
    margin: 0;
  }

  .world-veil {
    background:
      linear-gradient(180deg, rgba(2, 5, 7, 0.67) 0%, rgba(2, 5, 7, 0.18) 38%, rgba(2, 5, 7, 0.96) 76%),
      radial-gradient(circle at 50% 45%, transparent, rgba(2, 5, 7, 0.66) 72%);
  }

  .cinematic-gates > span {
    width: 29vw;
    min-width: 100px;
  }

  .holo-interface {
    top: 18%;
    right: -17%;
    width: 68vw;
    opacity: calc(var(--holo-opacity) * 0.58);
  }

  .holo-panel {
    display: none;
  }

  .ring-one { width: 60vw; }
  .ring-two { width: 38vw; }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .boot {
    display: none;
  }

  .story {
    height: auto;
  }

  .story-stage {
    position: relative;
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  .world {
    position: sticky;
    top: 0;
    height: 100svh;
  }

  .flow-canvas,
  .story-rail,
  .scroll-cue,
  .architect {
    display: none;
  }

  .story-scenes {
    position: relative;
    z-index: 10;
  }

  .scene-panel,
  .scene-panel:first-child {
    position: relative;
    min-height: 100svh;
    opacity: 1 !important;
    transform: none !important;
  }

  .manifesto-track {
    transform: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

.no-js .boot,
.no-js .flow-canvas,
.no-js .story-rail,
.no-js .scroll-cue {
  display: none;
}

.no-js .story {
  height: auto;
}

.no-js .story-stage {
  position: relative;
  height: auto;
  overflow: visible;
}

.no-js .world {
  position: fixed;
  height: 100vh;
}

.no-js .story-scenes {
  position: relative;
}

.no-js .scene-panel,
.no-js .scene-panel:first-child {
  position: relative;
  min-height: 100vh;
  opacity: 1;
}

@media print {
  .boot,
  .site-header,
  .page-progress,
  .flow-canvas,
  .story-rail,
  .scroll-cue {
    display: none !important;
  }

  body,
  .manifesto,
  .work-worlds,
  .expertise,
  .contact {
    color: #111 !important;
    background: #fff !important;
  }

  .story {
    height: auto;
  }

  .story-stage {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .world {
    display: none;
  }

  .story-scenes {
    position: relative;
  }

  .scene-panel {
    position: relative;
    min-height: auto;
    padding: 2rem 0;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Three.js exploded server cutscene */
.hud-brand img {
  display: block;
  width: clamp(138px, 12vw, 176px);
  height: auto;
  backface-visibility: hidden;
  filter: drop-shadow(0 0 18px rgba(101, 245, 225, 0.08));
  transform: translate3d(0, 0, 0);
}

.hud-brand {
  justify-self: start;
  transform: none;
}

.story {
  height: 650svh;
  background: #020507;
}

.server-viewport {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 44%, rgba(21, 67, 74, 0.31), transparent 30%),
    radial-gradient(circle at 52% 105%, rgba(23, 51, 70, 0.3), transparent 42%),
    linear-gradient(145deg, #010304 0%, #040a0e 44%, #020507 100%);
}

.server-canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
  outline: 0;
}

.server-fallback {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 68%;
  width: min(43vw, 610px);
  aspect-ratio: 1.42;
  border: 1px solid rgba(136, 186, 187, 0.14);
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(101, 245, 225, 0.06) 7% 7.4%, transparent 7.4% 92.6%, rgba(101, 245, 225, 0.06) 92.6% 93%, transparent 93%),
    repeating-linear-gradient(0deg, rgba(101, 245, 225, 0.06) 0 1px, transparent 1px 23px),
    linear-gradient(145deg, rgba(14, 26, 31, 0.62), rgba(4, 9, 12, 0.22));
  box-shadow: 0 0 80px rgba(36, 207, 199, 0.05);
  opacity: 0.55;
  transform: translate(-50%, -50%) perspective(900px) rotateY(-14deg) rotateX(5deg);
  transition: opacity 700ms ease;
}

.server-fallback > i {
  position: absolute;
  border: 1px solid rgba(111, 212, 205, 0.13);
  background: rgba(2, 7, 9, 0.52);
}

.server-fallback > i:nth-child(1) { inset: 7% 5%; }
.server-fallback > i:nth-child(2) { top: 18%; right: 13%; bottom: 18%; width: 38%; }
.server-fallback > i:nth-child(3) { top: 20%; bottom: 20%; left: 12%; width: 26%; }
.server-fallback > i:nth-child(4) {
  top: 50%;
  right: 19%;
  width: 20%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateY(-50%);
}

.server-viewport.is-rendering .server-fallback,
.server-viewport.is-ready .server-fallback {
  opacity: 0;
}

.server-shade,
.server-vignette,
.server-grain {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.server-shade {
  background:
    linear-gradient(90deg, rgba(1, 4, 6, 0.9) 0%, rgba(1, 4, 6, 0.62) 28%, transparent 53%, rgba(1, 4, 6, 0.04) 80%, rgba(1, 4, 6, 0.22) 100%),
    linear-gradient(180deg, rgba(1, 3, 5, 0.5), transparent 25%, transparent 72%, rgba(1, 3, 5, 0.62));
}

.server-vignette {
  background: radial-gradient(ellipse at 62% 48%, transparent 24%, rgba(0, 2, 3, 0.38) 100%);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.28);
}

.server-grain {
  opacity: 0.018;
  background-image:
    repeating-radial-gradient(circle at 17% 31%, rgba(255, 255, 255, 0.38) 0 0.45px, transparent 0.55px 3px);
  background-size: 7px 7px;
  mix-blend-mode: soft-light;
}

.model-loader {
  position: absolute;
  z-index: 16;
  right: var(--gutter);
  bottom: 5.2rem;
  display: grid;
  width: min(240px, 31vw);
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.8rem;
  color: #829397;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 500ms ease, transform 500ms ease;
}

.model-loader > span,
.model-loader > b {
  grid-column: 1 / -1;
}

.model-loader > span {
  color: #5a6e72;
}

.model-loader > b {
  color: #bdcacb;
  font-size: 0.57rem;
  font-weight: 500;
}

.model-loader > i {
  position: relative;
  align-self: center;
  height: 1px;
  overflow: hidden;
  background: rgba(194, 231, 228, 0.14);
}

.model-loader > i em {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 0 12px rgba(101, 245, 225, 0.7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.model-loader > small {
  color: var(--cyan);
  font-size: 0.52rem;
}

.server-viewport.is-ready .model-loader {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.server-viewport.has-board .model-loader {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.server-viewport.has-error .model-loader > b {
  color: #e9a886;
}

.component-readout {
  position: absolute;
  z-index: 8;
  top: 7.3rem;
  right: var(--gutter);
  display: grid;
  justify-items: end;
  color: #8da0a3;
  font-family: "Space Grotesk", sans-serif;
  text-align: right;
  text-transform: uppercase;
  transition: opacity 260ms ease;
}

.component-readout::after {
  width: 72px;
  height: 1px;
  margin-top: 0.75rem;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(101, 245, 225, 0.7));
}

.component-readout span {
  color: var(--cyan);
  font-size: 0.49rem;
  letter-spacing: 0.18em;
}

.component-readout b {
  margin-top: 0.35rem;
  color: #d7e2e1;
  font-size: clamp(0.72rem, 0.9vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.component-readout small {
  margin-top: 0.2rem;
  color: #627579;
  font-size: 0.48rem;
  letter-spacing: 0.13em;
}

.server-reticle {
  position: absolute;
  z-index: 5;
  top: var(--reticle-y, 50%);
  left: var(--reticle-x, 67%);
  width: clamp(74px, 8vw, 116px);
  aspect-ratio: 1;
  border: 1px solid rgba(101, 245, 225, 0.11);
  border-radius: 50%;
  opacity: var(--reticle-opacity, 0.35);
  transform: translate(-50%, -50%) scale(var(--reticle-scale, 1));
  transition: opacity 300ms ease;
}

.server-reticle i,
.server-reticle span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  background: rgba(101, 245, 225, 0.28);
  transform: translate(-50%, -50%);
}

.server-reticle i:first-child { width: 142%; height: 1px; }
.server-reticle i:nth-child(2) { width: 1px; height: 142%; }
.server-reticle span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(101, 245, 225, 0.75);
}

.server-coordinate {
  position: absolute;
  z-index: 7;
  color: rgba(175, 202, 202, 0.28);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.18em;
}

.server-coordinate.coordinate-a {
  top: 26%;
  right: 1.6rem;
  writing-mode: vertical-rl;
}

.server-coordinate.coordinate-b {
  bottom: 3.7rem;
  left: var(--gutter);
}

.scene-panel .scene-copy {
  z-index: 12;
  text-shadow: 0 2px 25px rgba(0, 0, 0, 0.72);
}

.scene-panel.scene-right .scene-copy {
  width: min(42vw, 630px);
  margin-right: auto;
  margin-left: clamp(0rem, 3.6vw, 4rem);
}

.model-credits {
  grid-column: 1 / -1;
  max-width: 900px;
  color: #65777a;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
}

.model-credits summary {
  width: max-content;
  cursor: pointer;
  color: #829699;
  text-transform: uppercase;
}

.model-credits p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.4rem;
  margin-top: 0.8rem;
}

.model-credits a {
  color: #71878a;
}

.model-credits a:hover {
  color: var(--cyan);
}

@media (max-width: 900px) {
  .server-shade {
    background:
      linear-gradient(180deg, rgba(1, 4, 6, 0.48) 0%, rgba(1, 4, 6, 0.08) 36%, rgba(1, 4, 6, 0.88) 70%, #010405 100%),
      linear-gradient(90deg, rgba(1, 4, 6, 0.45), transparent 24%, transparent 76%, rgba(1, 4, 6, 0.35));
  }

  .server-vignette {
    background: radial-gradient(ellipse at 50% 34%, transparent 18%, rgba(0, 2, 3, 0.72) 100%);
  }

  .server-fallback {
    top: 37%;
    left: 50%;
    width: min(76vw, 560px);
  }

  .component-readout {
    top: 6.6rem;
    right: var(--gutter);
  }

  .server-reticle {
    top: var(--reticle-y-mobile, 37%);
    left: var(--reticle-x-mobile, 50%);
  }

  .scene-panel,
  .scene-panel:first-child {
    align-items: flex-end;
    padding-top: 7rem;
    padding-bottom: clamp(5.5rem, 10vh, 7.5rem);
  }

  .scene-copy,
  .scene-right .scene-copy,
  .scene-panel.scene-right .scene-copy {
    width: min(100%, 680px);
    margin: 0;
  }

  .hero-panel .scene-copy {
    width: min(100%, 720px);
  }

  .model-loader {
    right: auto;
    bottom: auto;
    top: 6.8rem;
    left: var(--gutter);
    width: 190px;
  }
}

@media (max-width: 640px) {
  .hud-brand img {
    width: 122px;
  }

  .story {
    height: 600svh;
  }

  .server-coordinate {
    display: none;
  }

  .component-readout {
    top: 6.4rem;
  }

  .component-readout b {
    max-width: 150px;
  }

  .model-loader {
    top: 6.5rem;
    width: 145px;
  }

  .model-loader > span,
  .model-loader > b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .model-loader > b {
    font-size: 0.49rem;
  }

  .server-grain {
    opacity: 0.012;
  }

  .server-viewport .cinema-bars i {
    height: 1.3vh;
  }

  .model-credits p {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .server-viewport {
    position: fixed;
    height: 100svh;
  }

  .server-canvas,
  .server-fallback,
  .model-loader,
  .server-reticle {
    transition: none;
  }

  .component-readout,
  .server-coordinate,
  .scene-index {
    display: none;
  }
}

.no-js .server-viewport {
  position: fixed;
  height: 100vh;
}

.no-js .server-fallback {
  opacity: 0.7;
}

@media print {
  .server-viewport,
  .model-credits {
    display: none !important;
  }
}

/* Scroll-driven editor cutscene */
.code-cinema {
  --editor-opacity: 0;
  --editor-scale: 0.72;
  --editor-x: 8vw;
  --editor-y: 8vh;
  --editor-rotate-x: 7deg;
  --editor-rotate-y: -22deg;
  --editor-glow: 0;
  --grid-opacity: 0;
  --code-pan: 0px;
  --code-zoom: 1;
  --focus-opacity: 0;
  --focus-y: 0px;
  --scan-y: 0%;
  --flow-opacity: 0;
  --flow-progress: 0;
  position: absolute;
  z-index: 6;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  font-family: "Space Grotesk", "Inter", sans-serif;
  perspective: 1600px;
}

.code-cinema::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: calc(var(--editor-opacity) * 0.94);
  background:
    radial-gradient(circle at 76% 45%, rgba(38, 198, 190, 0.13), transparent 26%),
    radial-gradient(circle at 72% 60%, rgba(32, 90, 205, 0.11), transparent 38%),
    linear-gradient(90deg, rgba(1, 4, 6, 0) 30%, rgba(1, 6, 9, 0.62) 53%, rgba(1, 5, 7, 0.92) 100%);
}

.code-cinema-grid {
  position: absolute;
  right: -12vw;
  bottom: -29vh;
  width: 82vw;
  height: 74vh;
  opacity: var(--grid-opacity);
  background-image:
    linear-gradient(rgba(84, 236, 220, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 236, 220, 0.15) 1px, transparent 1px);
  background-size: 54px 42px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 70%, transparent);
  transform: perspective(620px) rotateX(66deg) translate3d(0, calc(var(--flow-progress) * -80px), 0);
  transform-origin: center top;
}

.editor-rig {
  position: absolute;
  z-index: 2;
  top: 13vh;
  left: 45.5vw;
  width: min(53vw, 930px);
  height: min(67vh, 690px);
  opacity: var(--editor-opacity);
  transform:
    translate3d(var(--editor-x), var(--editor-y), 0)
    rotateX(var(--editor-rotate-x))
    rotateY(var(--editor-rotate-y))
    scale(var(--editor-scale));
  transform-origin: 74% 48%;
  transform-style: preserve-3d;
  will-change: opacity, transform;
}

.editor-aura {
  position: absolute;
  z-index: -1;
  inset: 7% -8% -8%;
  opacity: calc(0.15 + var(--editor-glow) * 0.8);
  border-radius: 18%;
  background: rgba(41, 221, 207, 0.16);
  filter: blur(65px);
  transform: translateZ(-30px);
}

.editor-window {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr) 76px 23px;
  overflow: hidden;
  border: 1px solid rgba(169, 227, 222, 0.22);
  border-radius: 8px;
  color: #b9c7ca;
  background: rgba(5, 10, 14, 0.965);
  box-shadow:
    0 46px 100px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 0 calc(25px + var(--editor-glow) * 55px) rgba(55, 227, 211, calc(var(--editor-glow) * 0.16)),
    inset 0 1px rgba(255, 255, 255, 0.035);
  transform-style: preserve-3d;
}

.editor-window::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.045), transparent 18%, transparent 72%, rgba(88, 241, 225, 0.025)),
    repeating-linear-gradient(180deg, transparent 0 3px, rgba(255, 255, 255, 0.007) 3px 4px);
  mix-blend-mode: screen;
}

.editor-titlebar {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  min-width: 0;
  padding: 0 0.8rem;
  border-bottom: 1px solid rgba(180, 221, 222, 0.1);
  color: #73858a;
  background: #0c1217;
  font-size: 0.58rem;
  letter-spacing: 0.025em;
}

.window-controls {
  display: flex;
  gap: 7px;
}

.window-controls i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35434a;
}

.window-controls i:first-child { background: #e56c64; }
.window-controls i:nth-child(2) { background: #d9b45d; }
.window-controls i:last-child { background: #5ab987; }

.editor-path {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-path b {
  color: #b7c6c8;
  font-weight: 500;
}

.editor-connection {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #78aaa5;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.editor-connection i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ef0d9;
  box-shadow: 0 0 10px rgba(94, 240, 217, 0.8);
}

.editor-workspace {
  display: grid;
  grid-template-columns: clamp(128px, 13vw, 176px) minmax(0, 1fr);
  min-height: 0;
}

.editor-explorer {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.75rem 0.42rem;
  border-right: 1px solid rgba(180, 221, 222, 0.085);
  color: #7e8d91;
  background: #080e12;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.49rem, 0.63vw, 0.63rem);
}

.explorer-title {
  margin: 0 0.46rem 0.55rem;
  color: #89999c;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.16em;
}

.editor-explorer b,
.editor-explorer > span:not(.explorer-title) {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.42rem;
  padding: 0.28rem 0.45rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-explorer b {
  color: #aebabc;
  font-size: 0.57rem;
  font-weight: 600;
}

.editor-explorer > span:not(.explorer-title) {
  padding-left: 1.16rem;
}

.editor-explorer > span.active {
  color: #d4dfdf;
  background: rgba(91, 222, 211, 0.075);
  box-shadow: inset 2px 0 #56dfd0;
}

.editor-explorer i {
  min-width: 1.1rem;
  color: #5edccb;
  font-size: 0.48rem;
  font-style: normal;
}

.editor-main {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 33px 27px minmax(0, 1fr);
  background: #070c10;
}

.editor-tabs {
  display: flex;
  min-width: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(180, 221, 222, 0.08);
  background: #080d11;
}

.editor-tabs span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.43rem;
  padding: 0 0.75rem;
  border-right: 1px solid rgba(180, 221, 222, 0.075);
  color: #78898d;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.48rem, 0.62vw, 0.62rem);
  white-space: nowrap;
}

.editor-tabs span.active {
  position: relative;
  color: #c6d2d3;
  background: #070c10;
}

.editor-tabs span.active::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  content: "";
  background: #5ee9d8;
  box-shadow: 0 0 9px rgba(94, 233, 216, 0.7);
}

.editor-tabs i {
  color: #4fbeca;
  font-size: 0.47rem;
  font-style: normal;
}

.editor-tabs b {
  color: #59696e;
  font-weight: 400;
}

.editor-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0 0.78rem;
  overflow: hidden;
  color: #647579;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.46rem, 0.57vw, 0.57rem);
  white-space: nowrap;
}

.editor-breadcrumbs i { color: #38474c; font-style: normal; }
.editor-breadcrumbs b { color: #92a2a5; font-weight: 500; }

.editor-code-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 18%, rgba(41, 127, 157, 0.055), transparent 33%),
    #070c10;
}

.cinema-code-lines {
  position: absolute;
  top: 0.85rem;
  right: 0;
  left: 0;
  margin: 0;
  padding: 0 4.2rem 2.8rem 3.8rem;
  counter-reset: code-line;
  transform: translate3d(0, var(--code-pan), 0) scale(var(--code-zoom));
  transform-origin: 60% 38%;
  will-change: transform;
}

.cinema-code-lines li {
  position: relative;
  min-height: 20px;
  color: #b7c7c8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.54rem, 0.76vw, 0.75rem);
  line-height: 20px;
  list-style: none;
  white-space: pre;
}

.cinema-code-lines li::before {
  position: absolute;
  right: calc(100% + 1rem);
  width: 2.1rem;
  content: attr(data-line);
  color: #3f5055;
  text-align: right;
}

.cinema-code-lines li.is-typing .code-source::after {
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 2px;
  content: "";
  vertical-align: -0.12em;
  background: #8df8e9;
  box-shadow: 0 0 8px rgba(90, 245, 225, 0.82);
  animation: editor-caret 700ms steps(1, end) infinite;
}

.cinema-code-lines li.is-focus::after {
  position: absolute;
  top: 1px;
  right: -2.6rem;
  width: 2px;
  height: 18px;
  content: "";
  background: #58ead8;
  box-shadow: 0 0 12px rgba(88, 234, 216, 0.8);
}

.tok-key { color: #c990f4; }
.tok-fn { color: #61d7ef; }
.tok-type { color: #5fe1ba; }
.tok-string { color: #e7be78; }
.tok-num { color: #9ed77a; }
.tok-prop { color: #7fb5ff; }
.tok-const { color: #82d2ff; }
.tok-comment { color: #526a62; font-style: italic; }
.tok-op { color: #91a2a7; }

.code-focus-line {
  position: absolute;
  z-index: 2;
  top: var(--focus-y);
  right: 1.2rem;
  left: 0;
  height: 22px;
  opacity: var(--focus-opacity);
  border-left: 2px solid #59ead9;
  background: linear-gradient(90deg, rgba(67, 226, 209, 0.12), rgba(67, 226, 209, 0.025) 76%, transparent);
  box-shadow: inset 0 0 25px rgba(67, 226, 209, 0.035);
  transform: translateY(var(--code-pan));
}

.code-focus-line > i {
  position: absolute;
  top: 50%;
  right: 0;
  width: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(85, 237, 220, 0.75));
  box-shadow: 0 0 8px rgba(85, 237, 220, 0.35);
}

.code-focus-line > span {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.25rem);
  color: #6de8da;
  font-size: 0.44rem;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.editor-minimap {
  position: absolute;
  z-index: 3;
  top: 0.65rem;
  right: 0.45rem;
  width: 2.55rem;
  height: calc(100% - 1.3rem);
  overflow: hidden;
  opacity: 0.42;
  border-left: 1px solid rgba(151, 201, 202, 0.07);
}

.editor-minimap i {
  display: block;
  width: var(--mini-w, 72%);
  height: 2px;
  margin: 4px 0 0 0.42rem;
  background: #45646a;
}

.editor-minimap i:nth-child(2n) { --mini-w: 46%; background: #735d87; }
.editor-minimap i:nth-child(3n) { --mini-w: 84%; background: #4d8d81; }

.editor-panel {
  display: grid;
  min-height: 0;
  grid-template-rows: 29px 1fr;
  padding: 0 0.8rem;
  border-top: 1px solid rgba(180, 221, 222, 0.1);
  background: #080d11;
}

.panel-tabs {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: #617176;
  font-size: 0.48rem;
  letter-spacing: 0.11em;
}

.panel-tabs b {
  height: 100%;
  padding-top: 0.62rem;
  border-bottom: 1px solid #5cebd9;
  color: #b2c1c3;
  font-weight: 500;
}

.terminal-line {
  display: flex;
  align-items: flex-start;
  gap: 0.52rem;
  color: #839498;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.51rem, 0.67vw, 0.66rem);
}

.terminal-line > span { color: #5de9d7; }
.terminal-line > b { color: #b9c8c9; font-weight: 400; }

.terminal-caret {
  width: 5px;
  height: 1em;
  background: #5ce7d6;
  animation: editor-caret 700ms steps(1, end) infinite;
}

.editor-statusbar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 0.65rem;
  color: #092724;
  background: #4bd3c1;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.44rem, 0.55vw, 0.54rem);
}

.status-spacer { flex: 1; }
.editor-statusbar b { font-weight: 700; }

.editor-scan {
  position: absolute;
  z-index: 8;
  right: 0;
  left: 0;
  top: var(--scan-y);
  height: 1px;
  opacity: calc(var(--editor-glow) * 0.55);
  background: linear-gradient(90deg, transparent 10%, #75f8e8 52%, transparent 94%);
  box-shadow: 0 0 12px rgba(96, 243, 226, 0.5);
}

.runtime-card {
  position: absolute;
  z-index: 5;
  display: grid;
  width: clamp(128px, 12vw, 174px);
  gap: 0.28rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(101, 236, 220, 0.22);
  color: #73898c;
  background: rgba(5, 14, 18, 0.88);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36), inset 0 0 20px rgba(78, 226, 210, 0.025);
  font-size: 0.45rem;
  letter-spacing: 0.13em;
  opacity: var(--flow-opacity);
  transform: translateZ(32px);
}

.runtime-card-a {
  top: 18%;
  right: -7%;
}

.runtime-card-b {
  right: -4%;
  bottom: 13%;
}

.runtime-card b {
  color: #d5e4e3;
  font-size: clamp(0.78rem, 1.1vw, 1.05rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.runtime-card-a b { color: #75eeda; }
.runtime-card-b b { font-size: clamp(0.6rem, 0.82vw, 0.78rem); letter-spacing: 0.07em; }
.runtime-card small { color: #60777a; font-size: 0.46rem; }

.runtime-card > i {
  position: relative;
  height: 14px;
  overflow: hidden;
  background:
    linear-gradient(135deg, transparent 0 10%, rgba(94, 231, 214, 0.48) 11% 13%, transparent 14% 28%, rgba(94, 231, 214, 0.65) 29% 31%, transparent 32% 43%, rgba(94, 231, 214, 0.38) 44% 46%, transparent 47% 63%, rgba(94, 231, 214, 0.72) 64% 66%, transparent 67%);
}

.runtime-card > i::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: rgba(94, 231, 214, 0.22);
}

.deploy-flow {
  position: absolute;
  z-index: 4;
  right: 3.8vw;
  bottom: 5.4vh;
  display: grid;
  width: min(53vw, 930px);
  grid-template-columns: repeat(4, 1fr);
  opacity: var(--flow-opacity);
  transform: translate3d(0, calc((1 - var(--flow-opacity)) * 24px), 0);
  will-change: opacity, transform;
}

.deploy-line {
  position: absolute;
  top: 11px;
  right: 10%;
  left: 10%;
  height: 1px;
  overflow: hidden;
  background: rgba(116, 174, 176, 0.18);
}

.deploy-line i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #56edda, #548eff);
  box-shadow: 0 0 9px rgba(78, 229, 215, 0.75);
  transform: scaleX(var(--flow-progress));
  transform-origin: left;
}

.deploy-node {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  color: #56696d;
  text-align: center;
  transition: color 180ms ease;
}

.deploy-node > i {
  position: relative;
  z-index: 1;
  display: block;
  width: 22px;
  height: 22px;
  margin-bottom: 0.42rem;
  border: 1px solid #33454a;
  border-radius: 50%;
  background: #071014;
  box-shadow: 0 0 0 5px rgba(3, 8, 11, 0.82);
}

.deploy-node > i::before {
  position: absolute;
  inset: 7px;
  content: "";
  border-radius: inherit;
  background: #44565a;
}

.deploy-node > span {
  color: #425357;
  font-size: 0.42rem;
  letter-spacing: 0.12em;
}

.deploy-node > b {
  font-size: clamp(0.48rem, 0.65vw, 0.62rem);
  font-weight: 500;
  letter-spacing: 0.11em;
}

.deploy-node > small {
  font-family: "Inter", sans-serif;
  font-size: clamp(0.43rem, 0.55vw, 0.54rem);
}

.deploy-node.is-live { color: #b9cece; }
.deploy-node.is-live > span { color: #5fdccb; }
.deploy-node.is-live > i { border-color: #61ebd9; box-shadow: 0 0 0 5px rgba(3, 8, 11, 0.82), 0 0 18px rgba(78, 230, 213, 0.32); }
.deploy-node.is-live > i::before { background: #67f0de; box-shadow: 0 0 9px rgba(103, 240, 222, 0.9); }

.code-sequence-label {
  position: absolute;
  z-index: 3;
  top: 12vh;
  right: 3.8vw;
  display: grid;
  justify-items: end;
  gap: 0.25rem;
  opacity: var(--flow-opacity);
  text-align: right;
  transform: translateY(calc((1 - var(--flow-opacity)) * -10px));
}

.code-sequence-label span {
  color: #55e4d3;
  font-size: 0.46rem;
  letter-spacing: 0.18em;
}

.code-sequence-label b {
  color: #829597;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.server-viewport.code-active .component-readout {
  opacity: 0;
}

.server-viewport.code-active .model-loader {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.server-viewport.code-active .server-canvas {
  opacity: var(--hardware-opacity, 0.18);
  filter: saturate(0.7) brightness(0.62);
}

.server-canvas {
  transition: opacity 220ms linear, filter 220ms linear;
}

.scene-panel[data-scene="2"] .scene-copy,
.scene-panel[data-scene="3"] .scene-copy {
  width: min(35vw, 510px);
}

.scene-panel[data-scene="2"] h2,
.scene-panel[data-scene="3"] h2 {
  font-size: clamp(2.15rem, 3.8vw, 4.7rem);
}

@keyframes editor-caret {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@media (max-width: 1100px) and (min-width: 901px) {
  .editor-rig {
    left: 43vw;
    width: 56vw;
  }

  .deploy-flow {
    width: 56vw;
  }

  .scene-panel[data-scene="2"] .scene-copy,
  .scene-panel[data-scene="3"] .scene-copy {
    width: 38vw;
  }
}

@media (max-width: 900px) {
  .code-cinema::before {
    background:
      radial-gradient(circle at 50% 28%, rgba(38, 198, 190, 0.12), transparent 32%),
      linear-gradient(180deg, rgba(1, 4, 6, 0.52), rgba(1, 5, 7, 0.84) 55%, transparent 72%);
  }

  .code-cinema-grid {
    right: -20%;
    bottom: 24%;
    left: -20%;
    width: auto;
    height: 42%;
  }

  .editor-rig {
    top: 10.5vh;
    left: 4vw;
    width: 92vw;
    height: min(39vh, 390px);
    transform:
      translate3d(0, calc(var(--editor-y) * 0.35), 0)
      rotateX(calc(var(--editor-rotate-x) * 0.28))
      rotateY(calc(var(--editor-rotate-y) * 0.18))
      scale(calc(0.86 + var(--editor-scale) * 0.14));
    transform-origin: 50% 34%;
  }

  .editor-window {
    grid-template-rows: 30px minmax(0, 1fr) 52px 18px;
    border-radius: 5px;
  }

  .editor-titlebar {
    grid-template-columns: 58px 1fr auto;
    padding: 0 0.55rem;
    font-size: 0.46rem;
  }

  .window-controls { gap: 5px; }
  .window-controls i { width: 6px; height: 6px; }
  .editor-connection { font-size: 0; }

  .editor-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-explorer {
    display: none;
  }

  .editor-main {
    grid-template-rows: 26px 21px minmax(0, 1fr);
  }

  .editor-tabs span {
    padding: 0 0.55rem;
    font-size: 0.43rem;
  }

  .editor-breadcrumbs {
    padding: 0 0.6rem;
    font-size: 0.42rem;
  }

  .cinema-code-lines {
    top: 0.42rem;
    padding: 0 2.3rem 1.5rem 2.7rem;
  }

  .cinema-code-lines li {
    min-height: 13px;
    font-size: clamp(0.38rem, 1.65vw, 0.5rem);
    line-height: 13px;
  }

  .cinema-code-lines li::before {
    right: calc(100% + 0.55rem);
    width: 1.55rem;
  }

  .editor-minimap {
    display: none;
  }

  .code-focus-line {
    height: 15px;
  }

  .code-focus-line > span {
    display: none;
  }

  .editor-panel {
    grid-template-rows: 21px 1fr;
    padding: 0 0.55rem;
  }

  .panel-tabs {
    gap: 0.75rem;
    font-size: 0.39rem;
  }

  .panel-tabs b { padding-top: 0.4rem; }

  .terminal-line {
    gap: 0.35rem;
    font-size: 0.44rem;
  }

  .editor-statusbar {
    gap: 0.42rem;
    padding: 0 0.42rem;
    font-size: 0.38rem;
  }

  .runtime-card {
    display: none;
  }

  .deploy-flow {
    top: 51.2vh;
    right: 4vw;
    bottom: auto;
    width: 92vw;
  }

  .deploy-node > i {
    width: 15px;
    height: 15px;
    margin-bottom: 0.28rem;
    box-shadow: 0 0 0 3px rgba(3, 8, 11, 0.82);
  }

  .deploy-node > i::before { inset: 5px; }
  .deploy-line { top: 7px; }
  .deploy-node > span,
  .deploy-node > small { display: none; }
  .deploy-node > b { font-size: 0.39rem; }

  .code-sequence-label {
    top: 8.8vh;
    right: 4vw;
  }

  .code-sequence-label b { display: none; }

  .scene-panel[data-scene="2"] .scene-copy,
  .scene-panel[data-scene="3"] .scene-copy {
    width: min(100%, 680px);
  }

  .scene-panel[data-scene="2"] h2,
  .scene-panel[data-scene="3"] h2 {
    font-size: clamp(2rem, 9.7vw, 4rem);
  }
}

@media (max-width: 640px) {
  .editor-rig {
    top: 9.2vh;
    height: min(36vh, 330px);
  }

  .editor-titlebar {
    grid-template-columns: 48px 1fr 12px;
  }

  .editor-path {
    text-align: left;
  }

  .editor-tabs span:nth-child(2) {
    display: none;
  }

  .editor-statusbar span:nth-child(2),
  .editor-statusbar span:nth-last-child(2) {
    display: none;
  }

  .deploy-flow {
    top: 47vh;
  }

  .scene-panel[data-scene="2"] .pipeline {
    display: none;
  }

  .scene-panel[data-scene="3"] .platform-orbit {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .code-cinema {
    display: none;
  }

  .story {
    height: auto;
    min-height: 0;
  }

  .story-stage {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .story-scenes {
    position: relative;
  }

  .scene-panel,
  .scene-panel:first-child {
    position: relative;
    min-height: 100svh;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .cinema-code-lines li.is-typing .code-source::after,
  .terminal-caret {
    animation: none;
  }

  .server-viewport.code-active .server-canvas {
    opacity: 1;
    filter: none;
  }
}

@media print {
  .code-cinema {
    display: none !important;
  }
}
