:root {
  --ink: #07101a;
  --ink-soft: #0c1724;
  --ink-card: #111f2f;
  --paper: #f5f2e9;
  --paper-bright: #fbfaf6;
  --paper-muted: #e9e5da;
  --text: #eff6ff;
  --text-muted: #aab8c7;
  --paper-text: #17212b;
  --paper-muted-text: #5b6670;
  --blue: #58a6ff;
  --blue-strong: #2388ff;
  --cyan: #5ee7e7;
  --green: #5ad19a;
  --violet: #aa8cff;
  --amber: #f4c86a;
  --red: #ff7d7d;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: rgba(7, 16, 26, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --shell: 1180px;
  --header-height: 76px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

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

button {
  color: inherit;
}

::selection {
  background: var(--cyan);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--paper-bright);
  color: var(--paper-text);
  font-weight: 750;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.shell {
  width: min(calc(100% - 40px), var(--shell));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: rgba(7, 16, 26, 0.86);
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line-dark);
  background: rgba(7, 16, 26, 0.96);
}

.nav-shell {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(94, 231, 231, 0.36);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(88, 166, 255, 0.18), rgba(94, 231, 231, 0.05)),
    var(--ink-card);
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: -0.03em;
}

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

.brand-copy strong {
  font-size: 0.94rem;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
}

.site-nav > a:not(.button) {
  position: relative;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav > a:not(.button)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 2px;
  background: var(--cyan);
  transition: right 160ms ease;
}

.site-nav > a:not(.button):hover {
  color: var(--text);
}

.site-nav > a:not(.button):hover::after {
  right: 0;
}

.menu-toggle {
  width: 48px;
  height: 48px;
  display: none;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 0;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: var(--ink-card);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: var(--text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 780;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

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

.button-primary {
  background: var(--blue-strong);
  color: #fff;
  box-shadow: 0 12px 30px rgba(35, 136, 255, 0.2);
}

.button-primary:hover {
  background: #0f77e8;
}

.button-secondary {
  border-color: var(--line-dark);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.button-secondary:hover {
  border-color: rgba(94, 231, 231, 0.55);
  background: rgba(94, 231, 231, 0.06);
}

.button-small {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.button-full {
  width: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 34px;
  background:
    radial-gradient(circle at 76% 22%, rgba(35, 136, 255, 0.14), transparent 31%),
    radial-gradient(circle at 20% 10%, rgba(94, 231, 231, 0.07), transparent 28%),
    linear-gradient(180deg, #08131f 0%, var(--ink) 76%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
  align-items: center;
  gap: clamp(48px, 7vw, 92px);
}

.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(90, 209, 154, 0.28);
  border-radius: 999px;
  background: rgba(90, 209, 154, 0.08);
  color: #b9f5d7;
  font-size: 0.78rem;
  font-weight: 720;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(90, 209, 154, 0.12);
}

.hero-kicker,
.section-kicker {
  margin: 25px 0 0;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 18px 0 24px;
  font-size: clamp(3.7rem, 7vw, 6.6rem);
  line-height: 0.91;
  letter-spacing: -0.068em;
}

.hero h1 span {
  display: block;
  color: var(--blue);
}

.hero-lead {
  max-width: 665px;
  margin: 0;
  color: #c5d2df;
  font-size: clamp(1.08rem, 1.8vw, 1.3rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 32px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 29px 0 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  list-style: none;
}

.hero-facts li {
  position: relative;
}

.hero-facts li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -14px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #506274;
}

.delivery-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(12, 23, 36, 0.86);
  box-shadow: var(--shadow);
}

.delivery-card::after {
  content: "";
  position: absolute;
  inset: auto -90px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(35, 136, 255, 0.12);
  filter: blur(22px);
}

.delivery-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line-dark);
  color: #d7e4ef;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.delivery-head > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 50%;
  background: #405266;
}

.window-dots i:nth-child(1) { background: var(--red); }
.window-dots i:nth-child(2) { background: var(--amber); }
.window-dots i:nth-child(3) { background: var(--green); }

.delivery-state {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(90, 209, 154, 0.1);
  color: #91e5ba;
}

.delivery-body {
  padding: 28px 30px 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
}

.delivery-body p {
  margin: 0;
  color: #bfd0de;
}

.delivery-body span {
  color: var(--blue);
}

.delivery-flow {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 22px 1fr 22px 1fr 22px 1fr;
  align-items: center;
  padding: 21px 24px 26px;
  border-top: 1px solid var(--line-dark);
}

.delivery-flow div {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
}

.delivery-flow b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(88, 166, 255, 0.4);
  border-radius: 9px;
  background: rgba(88, 166, 255, 0.08);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.67rem;
}

.delivery-flow span {
  color: #aab9c7;
  font-size: 0.67rem;
}

.delivery-flow i {
  height: 1px;
  background: linear-gradient(90deg, rgba(88, 166, 255, 0.25), rgba(94, 231, 231, 0.7));
}

.proof-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 76px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.proof-strip > div {
  min-height: 130px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 20px 27px;
  border-right: 1px solid var(--line-dark);
}

.proof-strip > div:first-child {
  padding-left: 0;
}

.proof-strip > div:last-child {
  border-right: 0;
}

.proof-strip strong {
  color: var(--text);
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  letter-spacing: -0.045em;
}

.proof-strip span {
  max-width: 220px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.section {
  padding: 112px 0;
  background: var(--paper-bright);
  color: var(--paper-text);
}

.section-muted {
  background: var(--paper);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.68fr);
  align-items: end;
  gap: 52px;
  margin-bottom: 54px;
}

.section-heading .section-kicker {
  margin-top: 0;
  color: #126f83;
}

.section-heading h2 {
  max-width: 780px;
  margin: 13px 0 0;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.057em;
}

.section-heading > p {
  margin: 0;
  color: var(--paper-muted-text);
  font-size: 1rem;
  line-height: 1.7;
}

.work-list {
  display: grid;
  gap: 34px;
}

.case-card {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  background: var(--paper-bright);
  box-shadow: 0 17px 48px rgba(7, 16, 26, 0.07);
}

.case-card-featured {
  box-shadow: 0 24px 70px rgba(7, 16, 26, 0.1);
}

.case-visual {
  min-height: 440px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 54px 34px;
  color: var(--text);
  background: var(--ink-soft);
}

.case-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 30px 30px;
}

.case-visual-cyan {
  background:
    radial-gradient(circle at 50% 60%, rgba(94, 231, 231, 0.11), transparent 38%),
    var(--ink-soft);
}

.case-visual-green {
  background:
    radial-gradient(circle at 50% 50%, rgba(90, 209, 154, 0.13), transparent 38%),
    var(--ink-soft);
}

.case-visual-violet {
  background:
    radial-gradient(circle at 50% 50%, rgba(170, 140, 255, 0.14), transparent 38%),
    var(--ink-soft);
}

.visual-label {
  position: absolute;
  top: 24px;
  left: 26px;
  color: #97a9ba;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.architecture-row {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.architecture-row div {
  min-height: 68px;
  display: grid;
  place-items: center;
  padding: 10px 11px;
  border: 1px solid rgba(94, 231, 231, 0.34);
  border-radius: 12px;
  background: rgba(7, 16, 26, 0.75);
  color: #d7f9f9;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-align: center;
}

.architecture-row i {
  width: 16px;
  height: 1px;
  background: var(--cyan);
}

.visual-terminal {
  position: absolute;
  z-index: 2;
  left: 34px;
  right: 34px;
  bottom: 36px;
  display: grid;
  gap: 9px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(4, 9, 15, 0.92);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.visual-terminal .ok {
  color: var(--green);
}

.case-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(35px, 5vw, 68px);
}

.case-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #6d7781;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.project-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 750;
}

.status-client {
  border-color: rgba(13, 126, 87, 0.28);
  background: rgba(13, 126, 87, 0.08);
  color: #096346;
}

.status-lab {
  border-color: rgba(27, 103, 185, 0.26);
  background: rgba(27, 103, 185, 0.08);
  color: #175b9f;
}

.status-open {
  border-color: rgba(107, 75, 180, 0.28);
  background: rgba(107, 75, 180, 0.08);
  color: #6546a9;
}

.case-content h3 {
  margin: 22px 0 14px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.case-content > p {
  margin: 0;
  color: var(--paper-muted-text);
  font-size: 1.03rem;
  line-height: 1.72;
}

.case-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0 0;
}

.case-results div {
  padding: 14px 16px;
  border: 1px solid var(--line-light);
  border-radius: 12px;
  background: var(--paper);
}

.case-results dt {
  color: #707982;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.case-results dd {
  margin: 5px 0 0;
  font-size: 0.8rem;
  font-weight: 720;
  line-height: 1.4;
}

.case-bullets {
  display: grid;
  gap: 9px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.case-bullets li {
  position: relative;
  padding-left: 20px;
  color: #45515d;
  font-size: 0.88rem;
}

.case-bullets li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1c7a86;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 6px 9px;
  border: 1px solid rgba(18, 111, 131, 0.22);
  border-radius: 8px;
  background: rgba(18, 111, 131, 0.055);
  color: #1c6979;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
}

.case-actions,
.about-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 29px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #075f75;
  font-weight: 780;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.text-link:hover {
  color: #063f4d;
}

.text-link-muted {
  color: #69727a;
  font-size: 0.88rem;
}

.orbit-system {
  width: 260px;
  height: 260px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(90, 209, 154, 0.24);
  border-radius: 50%;
}

.orbit-system::before {
  content: "";
  position: absolute;
  inset: 43px;
  border: 1px dashed rgba(90, 209, 154, 0.34);
  border-radius: 50%;
}

.orbit-core,
.orbit-node {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(90, 209, 154, 0.4);
  background: #0b1b20;
  color: #c5f4de;
  font-family: var(--font-mono);
  font-size: 0.69rem;
}

.orbit-core {
  inset: 50%;
  width: 78px;
  height: 78px;
  border-radius: 22px;
  transform: translate(-50%, -50%);
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 800;
}

.orbit-node {
  width: 68px;
  height: 40px;
  border-radius: 10px;
}

.node-one { top: -20px; left: 96px; }
.node-two { right: -30px; top: 112px; }
.node-three { left: -30px; top: 112px; }

.pipeline-visual {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  gap: 13px;
}

.pipeline-visual div {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  border: 1px solid rgba(170, 140, 255, 0.3);
  border-radius: 12px;
  background: rgba(13, 20, 31, 0.82);
  color: #e5dcff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.pipeline-visual span {
  color: var(--violet);
  font-size: 0.67rem;
}

.section-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 40px;
  padding: 28px 30px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.section-cta p {
  margin: 0;
  color: var(--paper-muted-text);
}

.section-cta .button-secondary,
.about-actions .button-primary {
  border-color: transparent;
  background: var(--ink);
  color: var(--text);
  box-shadow: none;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.capability-card {
  min-height: 310px;
  position: relative;
  padding: 33px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--paper-bright);
}

.capability-number {
  display: block;
  color: #137486;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.capability-card h3 {
  margin: 38px 0 13px;
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.capability-card p {
  max-width: 520px;
  margin: 0;
  color: var(--paper-muted-text);
}

.capability-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 35px 0 0;
  padding: 0;
  list-style: none;
}

.capability-card li {
  color: #34424f;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--paper-bright);
}

.service-card-accent {
  border-color: rgba(18, 111, 131, 0.42);
  background:
    linear-gradient(180deg, rgba(94, 231, 231, 0.07), transparent 48%),
    var(--paper-bright);
}

.service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #6a747d;
  font-size: 0.72rem;
}

.service-head span {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.service-head strong {
  color: #086d7b;
  font-size: 0.8rem;
}

.service-card h3 {
  margin: 31px 0 12px;
  font-size: 1.4rem;
  letter-spacing: -0.035em;
}

.service-card p {
  margin: 0;
  color: var(--paper-muted-text);
  font-size: 0.93rem;
}

.service-card ul {
  display: grid;
  gap: 10px;
  margin: 27px 0 30px;
  padding: 0;
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 20px;
  color: #34404b;
  font-size: 0.84rem;
}

.service-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #137a68;
  font-weight: 800;
}

.service-time {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line-light);
  color: #64707a;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.scope-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin-top: 25px;
  padding: 22px 25px;
  border-radius: var(--radius-sm);
  background: var(--paper-muted);
  font-size: 0.79rem;
}

.scope-note strong {
  margin-right: 8px;
}

.scope-note span {
  padding: 5px 9px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  background: var(--paper-bright);
  color: #4c5862;
}

.section-process {
  background:
    radial-gradient(circle at 84% 20%, rgba(88, 166, 255, 0.11), transparent 27%),
    var(--ink-soft);
  color: var(--text);
}

.section-heading-light .section-kicker {
  color: var(--cyan);
}

.section-heading-light > p {
  color: var(--text-muted);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  background: var(--line-dark);
  list-style: none;
}

.process-grid li {
  min-height: 280px;
  padding: 28px;
  background: rgba(7, 16, 26, 0.86);
}

.process-grid span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.73rem;
}

.process-grid h3 {
  margin: 77px 0 14px;
  font-size: 1.35rem;
}

.process-grid p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.87rem;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(58px, 9vw, 120px);
}

.profile-visual {
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 50%, rgba(94, 231, 231, 0.16), transparent 32%),
    linear-gradient(145deg, #0a1722, #101f2d);
  box-shadow: var(--shadow);
}

.profile-visual > span {
  color: var(--text);
  font-size: clamp(4rem, 9vw, 7.5rem);
  font-weight: 860;
  letter-spacing: -0.09em;
}

.profile-visual b {
  position: absolute;
  bottom: 24px;
  left: 24px;
  color: #8ba0b3;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-ring {
  position: absolute;
  border: 1px solid rgba(94, 231, 231, 0.18);
  border-radius: 50%;
}

.ring-one { width: 68%; height: 68%; }
.ring-two { width: 94%; height: 94%; border-style: dashed; }

.about-copy .section-kicker {
  margin-top: 0;
  color: #126f83;
}

.about-copy h2 {
  max-width: 700px;
  margin: 14px 0 24px;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
}

.about-copy > p {
  max-width: 720px;
  color: var(--paper-muted-text);
}

.about-copy .about-lead {
  color: var(--paper-text);
  font-size: 1.17rem;
}

.about-details {
  display: grid;
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--line-light);
}

.about-details > div {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line-light);
}

.about-details span,
.about-details small {
  color: #69747d;
  font-size: 0.72rem;
}

.about-details span {
  font-family: var(--font-mono);
}

.about-details strong {
  font-size: 0.9rem;
}

.writing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.writing-card {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--paper-bright);
  color: var(--paper-text);
  text-decoration: none;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.writing-card:hover {
  transform: translateY(-5px);
  border-color: rgba(18, 111, 131, 0.42);
  box-shadow: 0 18px 40px rgba(7, 16, 26, 0.08);
}

.writing-card > span {
  color: #6e7880;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.writing-card h3 {
  margin: 55px 0 15px;
  font-size: 1.4rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.writing-card p {
  margin: 0;
  color: var(--paper-muted-text);
  font-size: 0.9rem;
}

.writing-card strong {
  margin-top: auto;
  padding-top: 30px;
  color: #075f75;
  font-size: 0.84rem;
}

.contact-section {
  background:
    radial-gradient(circle at 5% 92%, rgba(94, 231, 231, 0.09), transparent 25%),
    var(--ink);
  color: var(--text);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  align-items: start;
  gap: clamp(55px, 9vw, 120px);
}

.contact-copy .section-kicker {
  margin-top: 0;
}

.contact-copy h2 {
  margin: 15px 0 22px;
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.94;
  letter-spacing: -0.064em;
}

.contact-copy > p {
  max-width: 540px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.contact-direct {
  display: grid;
  gap: 0;
  margin-top: 37px;
  border-top: 1px solid var(--line-dark);
}

.contact-direct div {
  display: grid;
  gap: 3px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-dark);
}

.contact-direct span {
  color: #7f93a6;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.contact-direct strong,
.contact-direct a {
  width: fit-content;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.copy-email {
  min-height: 44px;
  margin-top: 19px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid #4a6074;
  background: transparent;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.contact-form {
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  background: var(--ink-soft);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 17px;
}

.field label {
  color: #c7d4df;
  font-size: 0.78rem;
  font-weight: 720;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  transition: border-color 150ms ease, background 150ms ease;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field select {
  color-scheme: dark;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  background: rgba(88, 166, 255, 0.055);
  outline: 3px solid rgba(88, 166, 255, 0.22);
  outline-offset: 1px;
}

.form-note {
  margin: 14px 0 0;
  color: #8598aa;
  font-size: 0.7rem;
}

.form-status {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: #a5e7c7;
  font-size: 0.78rem;
}

.site-footer {
  padding: 70px 0 26px;
  border-top: 1px solid var(--line-dark);
  background: #050c13;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(420px, 1.1fr);
  gap: 80px;
}

.footer-brand {
  width: fit-content;
}

.footer-grid > div:first-child > p {
  max-width: 430px;
  margin: 22px 0 0;
  color: #8395a6;
  font-size: 0.88rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}

.footer-links > div {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-links strong {
  margin-bottom: 6px;
  color: #dce6ef;
  font-size: 0.78rem;
}

.footer-links a {
  width: fit-content;
  color: #8496a7;
  font-size: 0.78rem;
  text-decoration: none;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 60px;
  padding-top: 23px;
  border-top: 1px solid var(--line-dark);
  color: #6f8293;
  font-size: 0.72rem;
}

.footer-bottom a {
  color: #a5b5c3;
  text-decoration: none;
}

/* Secondary pages */
.subpage-hero {
  padding: 100px 0 76px;
  background:
    radial-gradient(circle at 80% 20%, rgba(88, 166, 255, 0.12), transparent 27%),
    var(--ink);
}

.subpage-hero .section-kicker {
  margin-top: 0;
}

.subpage-hero h1 {
  max-width: 950px;
  margin: 17px 0 22px;
  font-size: clamp(3.3rem, 8vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.066em;
}

.subpage-hero > .shell > p:not(.section-kicker),
.subpage-hero-copy {
  max-width: 750px;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.13rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: #8195a7;
  font-size: 0.78rem;
}

.breadcrumb a {
  color: #b8c7d4;
}

.page-section {
  padding: 90px 0;
  background: var(--paper-bright);
  color: var(--paper-text);
}

.page-section-alt {
  background: var(--paper);
}

.case-intro-grid,
.article-layout,
.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(45px, 8vw, 100px);
  align-items: start;
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.prose h3 {
  margin: 42px 0 13px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.prose p,
.prose li {
  color: #46525d;
  font-size: 1rem;
}

.prose p {
  margin: 0 0 19px;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.prose pre {
  overflow-x: auto;
  margin: 28px 0;
  padding: 22px;
  border-radius: 14px;
  background: var(--ink);
  color: #d8e4ee;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
}

.prose blockquote {
  margin: 30px 0;
  padding: 22px 25px;
  border-left: 4px solid #14798b;
  background: var(--paper);
  color: #2c3a46;
  font-size: 1.05rem;
}

.fact-card,
.toc-card,
.resume-aside {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  padding: 25px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.fact-card h2,
.toc-card h2,
.resume-aside h2 {
  margin: 0 0 20px;
  font-size: 1rem;
}

.fact-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.fact-list div {
  display: grid;
  gap: 4px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-light);
}

.fact-list div:last-child {
  border-bottom: 0;
}

.fact-list dt {
  color: #6b7580;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.fact-list dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 720;
}

.decision-grid,
.lab-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.decision-card,
.lab-card,
.article-index-card {
  padding: 27px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: var(--paper-bright);
}

.decision-card span,
.lab-card > span,
.article-index-card > span {
  color: #197185;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.decision-card h3,
.lab-card h2,
.article-index-card h2 {
  margin: 34px 0 13px;
  font-size: 1.3rem;
  letter-spacing: -0.035em;
}

.decision-card p,
.lab-card p,
.article-index-card p {
  margin: 0;
  color: var(--paper-muted-text);
  font-size: 0.88rem;
}

.lab-card,
.article-index-card {
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.lab-card .button,
.article-index-card .text-link {
  margin-top: auto;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 20px;
  margin-top: 28px;
  color: #8da0b0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.article-layout {
  grid-template-columns: minmax(0, 1fr) 270px;
}

.toc-card nav {
  display: grid;
  gap: 10px;
}

.toc-card a {
  color: #56636d;
  font-size: 0.8rem;
  text-underline-offset: 4px;
}

.resume-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.resume-section {
  margin-bottom: 44px;
}

.resume-section h2 {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-light);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.resume-item {
  margin-bottom: 25px;
}

.resume-item-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.resume-item h3 {
  margin: 0;
  font-size: 1rem;
}

.resume-item time {
  color: #68747e;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.resume-item p,
.resume-item li {
  color: #4f5b65;
  font-size: 0.87rem;
}

.resume-aside ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  list-style: none;
}

.resume-aside li {
  padding: 6px 8px;
  border: 1px solid var(--line-light);
  border-radius: 7px;
  background: var(--paper-bright);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

@media (max-width: 1050px) {
  .site-nav {
    gap: 18px;
  }

  .site-nav > a:not(.button) {
    font-size: 0.82rem;
  }

  .brand-copy {
    display: grid;
  }

  .hero-grid {
    grid-template-columns: 1fr 420px;
    gap: 45px;
  }

  .proof-strip {
    grid-template-columns: 1fr 1fr;
  }

  .proof-strip > div:nth-child(2) {
    border-right: 0;
  }

  .proof-strip > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line-dark);
  }

  .proof-strip > div:nth-child(3) {
    padding-left: 0;
  }

  .service-grid,
  .writing-grid,
  .decision-grid,
  .lab-grid,
  .article-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 840px) {
  :root {
    --header-height: 68px;
  }

  .shell {
    width: min(calc(100% - 32px), var(--shell));
  }

  .menu-toggle {
    display: grid;
    margin-left: auto;
  }

  .brand-copy {
    display: grid;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    display: none;
    align-content: start;
    align-items: stretch;
    justify-content: start;
    gap: 0;
    padding: 24px 16px 36px;
    overflow-y: auto;
    background: rgba(7, 16, 26, 0.99);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -18px, 0) scale(0.985);
    transform-origin: top center;
    transition:
      opacity 210ms ease,
      visibility 0s linear 360ms,
      transform 520ms cubic-bezier(0.16, 1.32, 0.32, 1);
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
    transition-delay: 0s;
  }

  .site-nav > a:not(.button) {
    min-height: 54px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid var(--line-dark);
    color: var(--text);
    font-size: 1rem;
  }

  .site-nav > a:not(.button)::after {
    display: none;
  }

  .site-nav .button {
    margin-top: 22px;
  }

  .hero {
    padding-top: 67px;
  }

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

  .delivery-card {
    max-width: 620px;
  }

  .section,
  .page-section {
    padding: 82px 0;
  }

  .section-heading,
  .case-card,
  .about-grid,
  .contact-grid,
  .case-intro-grid,
  .article-layout,
  .resume-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 22px;
  }

  .case-visual {
    min-height: 370px;
  }

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

  .profile-visual {
    width: min(100%, 520px);
  }

  .contact-grid {
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .fact-card,
  .toc-card,
  .resume-aside {
    position: static;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(calc(100% - 24px), var(--shell));
  }

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

  .brand-copy small {
    display: none;
  }

  .hero {
    padding-top: 52px;
  }

  .hero h1 {
    font-size: clamp(3.25rem, 16vw, 4.7rem);
  }

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

  .hero-actions .button {
    width: 100%;
  }

  .hero-facts {
    display: grid;
    gap: 8px;
  }

  .hero-facts li::after {
    display: none;
  }

  .delivery-card {
    border-radius: 22px;
  }

  .delivery-head {
    padding-inline: 16px;
  }

  .delivery-body {
    overflow-x: auto;
    padding: 22px 18px;
    font-size: 0.76rem;
  }

  .delivery-flow {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .delivery-flow i {
    display: none;
  }

  .proof-strip {
    grid-template-columns: 1fr;
    margin-top: 50px;
  }

  .proof-strip > div,
  .proof-strip > div:nth-child(3) {
    min-height: 105px;
    padding: 17px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .proof-strip > div:last-child {
    border-bottom: 0;
  }

  .section,
  .page-section {
    padding: 66px 0;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .section-heading h2,
  .about-copy h2 {
    font-size: 2.65rem;
  }

  .case-card {
    border-radius: 20px;
  }

  .case-visual {
    min-height: 320px;
    padding: 52px 18px 105px;
  }

  .architecture-row {
    grid-template-columns: 1fr 1fr;
  }

  .architecture-row i {
    display: none;
  }

  .architecture-row div {
    min-height: 54px;
  }

  .visual-terminal {
    left: 16px;
    right: 16px;
    bottom: 20px;
  }

  .orbit-system {
    width: 220px;
    height: 220px;
  }

  .node-one { left: 76px; }
  .node-two { right: -18px; top: 92px; }
  .node-three { left: -18px; top: 92px; }

  .case-content {
    padding: 29px 21px 32px;
  }

  .case-meta {
    align-items: flex-start;
  }

  .case-results {
    grid-template-columns: 1fr;
  }

  .case-actions,
  .about-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .capability-grid,
  .writing-grid,
  .decision-grid,
  .lab-grid,
  .article-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .capability-card,
  .writing-card {
    min-height: auto;
  }

  .service-card {
    padding: 25px 21px;
  }

  .scope-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .process-grid li {
    min-height: 230px;
  }

  .process-grid h3 {
    margin-top: 50px;
  }

  .about-details > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .profile-visual {
    border-radius: 22px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form {
    padding: 23px 17px;
    border-radius: 20px;
  }

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

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .subpage-hero {
    padding: 70px 0 55px;
  }

  .subpage-hero h1 {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .resume-item-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Spatial portfolio experience */

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

.spatial-hero {
  --story-progress: 0;
  --mobile-portrait-shift: 0px;
  position: relative;
  min-height: 460vh;
  overflow: clip;
  isolation: isolate;
  background:
    radial-gradient(circle at 70% 22%, rgba(61, 106, 255, 0.13), transparent 28%),
    radial-gradient(circle at 48% 58%, rgba(20, 224, 222, 0.08), transparent 31%),
    #030712;
}

.spatial-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 680px;
  overflow: hidden;
  perspective: 1400px;
  touch-action: pan-y pinch-zoom;
}

.spatial-stage::before,
.spatial-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.spatial-stage::before {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 62% 50%, #000 12%, transparent 74%);
}

.spatial-stage::after {
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(180deg, transparent, rgba(3, 7, 18, 0.96));
}

.spatial-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.webgl-ready .spatial-canvas {
  opacity: 1;
}

.spatial-atmosphere {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--pointer-x, 60%) var(--pointer-y, 45%), rgba(65, 219, 255, 0.08), transparent 18%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.93) 0%, rgba(3, 7, 18, 0.54) 42%, transparent 68%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.15), transparent 58%, rgba(3, 7, 18, 0.62));
}

.spatial-layout {
  position: relative;
  z-index: 5;
  height: 100%;
}

.spatial-copy {
  position: absolute;
  top: clamp(116px, 16vh, 165px);
  left: 0;
  width: min(610px, 48vw);
  transform-origin: left center;
  will-change: transform, opacity;
}

.spatial-copy .eyebrow {
  border-color: rgba(83, 226, 169, 0.26);
  background: rgba(45, 190, 132, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.spatial-copy .hero-kicker {
  margin-top: 24px;
  color: #63e8f0;
}

.spatial-copy h1 {
  max-width: 620px;
  margin: 18px 0 24px;
  color: #f7fbff;
  font-size: clamp(3.75rem, 6.35vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: -0.072em;
}

.spatial-copy h1 > span {
  display: block;
}

.spatial-copy h1 em {
  display: block;
  margin-top: 8px;
  background: linear-gradient(96deg, #66e6f1 0%, #61a5ff 45%, #bd8cff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-style: normal;
}

.spatial-copy .hero-lead {
  max-width: 610px;
  color: #bdcadd;
}

.adaptive-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  color: #75869b;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  line-height: 1.45;
}

.adaptive-note span {
  color: #63e8f0;
}

.spatial-controls {
  position: absolute;
  top: 88px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(7, 15, 28, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px) saturate(150%);
  color: #8fa1b6;
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.spatial-controls > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 9px;
}

.spatial-controls > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #54dda7;
  box-shadow: 0 0 13px #54dda7;
}

.ambient-toggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #dce8f4;
  cursor: pointer;
}

.ambient-toggle:hover {
  background: rgba(99, 232, 240, 0.1);
}

.ambient-toggle b {
  color: #63e8f0;
  font-size: 0.9rem;
}

.ambient-toggle[aria-pressed="true"] b {
  animation: ambient-pulse 1.9s ease-in-out infinite;
}

@keyframes ambient-pulse {
  50% {
    color: #bd8cff;
    text-shadow: 0 0 14px #8d6cff;
    transform: scale(1.16);
  }
}

.brain-fallback {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 64%;
  width: 310px;
  height: 390px;
  transform: translate(-50%, -46%);
  opacity: 0.92;
  transition: opacity 420ms ease;
}

.webgl-ready .brain-fallback {
  opacity: 0;
}

.fallback-core {
  position: absolute;
  top: 72px;
  left: 70px;
  width: 170px;
  height: 210px;
  border: 1px solid rgba(112, 146, 192, 0.6);
  border-radius: 45% 45% 40% 40%;
  background:
    radial-gradient(circle at 37% 38%, #71f3ff 0 3px, transparent 4px),
    radial-gradient(circle at 63% 38%, #71f3ff 0 3px, transparent 4px),
    linear-gradient(145deg, rgba(118, 150, 197, 0.18), rgba(8, 15, 28, 0.74));
  box-shadow:
    inset 18px 0 34px rgba(99, 232, 240, 0.09),
    inset -18px 0 34px rgba(171, 108, 255, 0.1),
    0 0 60px rgba(71, 182, 255, 0.12);
}

.fallback-core::before,
.fallback-core::after {
  content: "";
  position: absolute;
  top: 78px;
  width: 34px;
  height: 3px;
  border-radius: 4px;
  background: #62e6f2;
  box-shadow: 0 0 13px #2ccbd9;
}

.fallback-core::before { left: 34px; }
.fallback-core::after { right: 34px; }

.fallback-core i {
  position: absolute;
  inset: 27px 34px 92px;
  border: 1px solid rgba(99, 232, 240, 0.4);
  border-radius: 50%;
  box-shadow: inset 0 0 27px rgba(99, 232, 240, 0.18);
}

.fallback-core b {
  position: absolute;
  right: 41px;
  bottom: 39px;
  left: 41px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px 7px 19px 19px;
}

.fallback-orbit {
  position: absolute;
  border: 1px solid rgba(117, 142, 188, 0.2);
  border-radius: 50%;
}

.fallback-orbit.orbit-a {
  inset: 14px 0 22px;
  transform: rotate(-15deg);
}

.fallback-orbit.orbit-b {
  inset: 48px 35px 60px;
  border-color: rgba(99, 232, 240, 0.2);
  transform: rotate(24deg);
}

.fallback-cable {
  position: absolute;
  top: 147px;
  left: 5px;
  width: 82px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #63e8f0);
  box-shadow: 0 0 9px rgba(99, 232, 240, 0.8);
  transform-origin: right center;
}

.fallback-cable.cable-a { transform: rotate(20deg); }
.fallback-cable.cable-b { top: 196px; transform: rotate(-6deg); }
.fallback-cable.cable-c { top: 238px; transform: rotate(-29deg); }

.spatial-card {
  --glass-x: 50%;
  --glass-y: 50%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: absolute;
  z-index: 7;
  width: min(338px, 28vw);
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(223, 242, 255, 0.17);
  border-radius: 20px;
  background:
    radial-gradient(circle at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.17), transparent 25%),
    linear-gradient(135deg, rgba(152, 216, 255, 0.1), rgba(120, 99, 224, 0.055) 54%, rgba(18, 34, 55, 0.18)),
    rgba(10, 22, 39, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.19),
    inset 16px 0 35px rgba(92, 228, 255, 0.025),
    inset -16px 0 35px rgba(162, 107, 255, 0.035),
    0 5px 12px rgba(0, 0, 0, 0.25),
    0 32px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(24px) saturate(175%) contrast(112%);
  color: #f3f8ff;
  transform:
    perspective(950px)
    rotateX(var(--tilt-x))
    rotateY(var(--tilt-y))
    translate3d(0, 28px, -45px)
    scale(0.94);
  transform-style: preserve-3d;
  opacity: 1;
  will-change: transform, opacity;
}

body.spatial-enhanced .spatial-card {
  opacity: 0;
}

body.spatial-enhanced .spatial-card.is-visible {
  opacity: 1;
  transform:
    perspective(950px)
    rotateX(var(--tilt-x))
    rotateY(var(--tilt-y))
    translate3d(0, 0, 0)
    scale(1);
  transition:
    opacity 500ms ease,
    transform 760ms cubic-bezier(0.16, 1.35, 0.32, 1),
    border-color 250ms ease,
    box-shadow 250ms ease;
}

.spatial-card::before,
.spatial-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.spatial-card::before {
  inset: -1px;
  border-radius: inherit;
  background:
    linear-gradient(112deg, transparent 20%, rgba(255, 255, 255, 0.18) 41%, transparent 61%) 0 0 / 220% 100%,
    conic-gradient(from 180deg at var(--glass-x) var(--glass-y), rgba(93, 229, 255, 0.16), transparent 25%, rgba(171, 108, 255, 0.13), transparent 66%);
  mix-blend-mode: screen;
  opacity: 0.44;
  transform: translateZ(1px);
}

.spatial-card::after {
  top: 10px;
  right: 18px;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.57), transparent);
  filter: blur(0.2px);
  opacity: 0.58;
}

.spatial-card:hover,
.spatial-card:focus-visible {
  border-color: rgba(116, 232, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 12px 24px rgba(0, 0, 0, 0.3),
    0 42px 100px rgba(16, 45, 84, 0.48);
}

.spatial-card-platform {
  top: 17%;
  right: 0;
}

.spatial-card-gitops {
  right: 2.5%;
  bottom: 21%;
}

.spatial-card-reliability {
  bottom: 12%;
  left: 43%;
}

.cable-port {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  border: 2px solid #d9fbff;
  border-radius: 50%;
  background: #4de5ee;
  box-shadow:
    0 0 8px #4de5ee,
    0 0 22px rgba(77, 229, 238, 0.8);
  transform: translateY(-50%);
}

.spatial-card-reliability .cable-port {
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.spatial-card-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-index {
  color: #8da0b7;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.signal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  line-height: 1;
  opacity: 0.82;
}

.signal::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

.signal-cyan { color: #63e8f0; }
.signal-violet { color: #bd9bff; }
.signal-green { color: #5ae0aa; }

.spatial-card h2 {
  position: relative;
  z-index: 2;
  margin: 0 0 17px;
  color: #f8fbff;
  font-size: clamp(1.04rem, 1.45vw, 1.28rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.metric-line {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 13px;
}

.metric-line strong {
  min-width: 54px;
  color: #63e8f0;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-line > span {
  color: #9eb0c4;
  font-size: 0.68rem;
  line-height: 1.45;
}

.mini-chart {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 54px;
  display: block;
  margin-top: 13px;
  opacity: 0.78;
}

.spatial-progress {
  position: absolute;
  z-index: 7;
  top: 50%;
  right: -75px;
  display: grid;
  grid-template-columns: auto 126px 34px;
  align-items: center;
  gap: 11px;
  color: #6f8298;
  font-family: var(--font-mono);
  font-size: 0.61rem;
  transform: rotate(90deg);
}

.spatial-progress i {
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

.spatial-progress i b {
  width: calc(var(--story-progress) * 100%);
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #63e8f0, #a77cff);
  box-shadow: 0 0 9px #63e8f0;
}

.spatial-progress strong {
  color: #c8d5e1;
  font-weight: 600;
}

.spatial-proof {
  position: absolute;
  z-index: 8;
  right: 0;
  bottom: 24px;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 10px;
  pointer-events: none;
}

.spatial-proof > div {
  min-width: 146px;
  display: grid;
  gap: 3px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  background: rgba(8, 17, 30, 0.44);
  backdrop-filter: blur(14px);
}

.spatial-proof span {
  color: #687b90;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.spatial-proof strong {
  color: #cbd8e4;
  font-size: 0.76rem;
}

.magnetic-button {
  --mag-x: 0px;
  --mag-y: 0px;
  transform: translate3d(var(--mag-x), var(--mag-y), 0);
  will-change: transform;
}

.magnetic-button:hover {
  transform: translate3d(var(--mag-x), calc(var(--mag-y) - 2px), 0);
}

.spatial-cursor,
.spatial-cursor-dot,
.cursor-trail-dot {
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  transform: translate3d(-100px, -100px, 0);
}

.spatial-cursor {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(116, 234, 255, 0.76);
  border-radius: 50%;
  box-shadow:
    inset 0 0 11px rgba(99, 232, 240, 0.12),
    0 0 18px rgba(99, 232, 240, 0.14);
  transition:
    width 200ms cubic-bezier(0.16, 1.35, 0.32, 1),
    height 200ms cubic-bezier(0.16, 1.35, 0.32, 1),
    margin 200ms cubic-bezier(0.16, 1.35, 0.32, 1),
    border-color 180ms ease,
    background 180ms ease;
}

.spatial-cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-top: 1px solid transparent;
  border-right: 1px solid transparent;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: border-color 180ms ease, transform 180ms ease;
}

.spatial-cursor.is-interactive {
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-color: rgba(185, 144, 255, 0.84);
  background: rgba(116, 95, 255, 0.07);
}

.spatial-cursor.is-drag::after {
  border-color: #f3f9ff;
  transform: translate(-55%, -50%) rotate(45deg);
}

.spatial-cursor.is-pressed {
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
}

.spatial-cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: #dffeff;
  box-shadow:
    0 0 8px #63e8f0,
    0 0 17px rgba(99, 232, 240, 0.7);
}

.cursor-trail-dot {
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #63e8f0;
  box-shadow: 0 0 8px rgba(99, 232, 240, 0.7);
}

@media (hover: hover) and (pointer: fine) {
  html.has-spatial-cursor,
  html.has-spatial-cursor a,
  html.has-spatial-cursor button,
  html.has-spatial-cursor [data-story-card] {
    cursor: none;
  }

  html.has-spatial-cursor input,
  html.has-spatial-cursor textarea {
    cursor: text;
  }
}

@media (max-width: 1120px) {
  .spatial-copy {
    width: min(560px, 51vw);
  }

  .spatial-copy h1 {
    font-size: clamp(3.6rem, 6vw, 5.25rem);
  }

  .spatial-card {
    width: min(310px, 29vw);
    padding: 17px;
  }

  .spatial-card-platform {
    top: 19%;
  }

  .spatial-card-reliability {
    left: 45%;
  }
}

@media (max-width: 840px) {
  .spatial-hero {
    min-height: 300vh;
  }

  .spatial-stage {
    min-height: 620px;
  }

  .spatial-atmosphere {
    background:
      radial-gradient(circle at 50% 46%, rgba(65, 219, 255, 0.1), transparent 25%),
      linear-gradient(180deg, rgba(3, 7, 18, 0.78) 0%, transparent 50%, rgba(3, 7, 18, 0.82));
  }

  .spatial-copy {
    top: 100px;
    width: min(100%, 610px);
  }

  .spatial-copy h1 {
    max-width: 590px;
    font-size: clamp(3.2rem, 12vw, 5rem);
  }

  .spatial-copy .hero-lead {
    max-width: 580px;
  }

  .spatial-controls {
    top: auto;
    right: auto;
    bottom: 25px;
    left: 0;
  }

  .spatial-controls > span {
    display: none;
  }

  .brain-fallback {
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.88);
  }

  .spatial-card,
  .spatial-card-platform,
  .spatial-card-gitops,
  .spatial-card-reliability {
    top: auto;
    right: 0;
    bottom: 92px;
    left: 0;
    width: min(100%, 520px);
    margin: auto;
  }

  body.spatial-enhanced .spatial-card:not(.is-current) {
    visibility: hidden;
    pointer-events: none;
  }

  .spatial-card-reliability .cable-port {
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
  }

  .spatial-progress {
    top: 53%;
    right: -78px;
  }

  .spatial-proof {
    display: none;
  }
}

@media (max-width: 620px) {
  .spatial-stage {
    min-height: 600px;
  }

  .spatial-layout {
    width: min(calc(100% - 28px), var(--shell));
  }

  .spatial-copy {
    top: 86px;
  }

  .spatial-copy .eyebrow {
    max-width: 100%;
    font-size: 0.67rem;
  }

  .spatial-copy .hero-kicker {
    margin-top: 18px;
    font-size: 0.64rem;
  }

  .spatial-copy h1 {
    margin: 13px 0 18px;
    font-size: clamp(2.85rem, 14.5vw, 4.15rem);
    line-height: 0.91;
  }

  .spatial-copy .hero-lead {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .spatial-copy .hero-actions {
    margin-top: 24px;
  }

  .spatial-copy .hero-facts,
  .adaptive-note {
    display: none;
  }

  .spatial-card {
    bottom: 84px;
    padding: 16px;
    border-radius: 17px;
  }

  .spatial-card h2 {
    margin-bottom: 13px;
    font-size: 1rem;
  }

  .metric-line strong {
    font-size: 1.7rem;
  }

  .mini-chart {
    height: 42px;
    margin-top: 9px;
  }

  .spatial-controls {
    bottom: 25px;
  }

  .spatial-progress {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spatial-hero {
    min-height: auto;
  }

  .spatial-stage {
    position: relative;
    height: auto;
    min-height: 0;
    padding: 110px 0 70px;
    overflow: hidden;
  }

  .spatial-layout {
    height: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .spatial-copy {
    position: relative;
    top: auto;
    left: auto;
    grid-column: 1 / -1;
    width: min(700px, 100%);
    margin-bottom: 320px;
    opacity: 1 !important;
    transform: none !important;
  }

  .spatial-card,
  body.spatial-enhanced .spatial-card,
  body.spatial-enhanced .spatial-card.is-visible,
  .spatial-card-platform,
  .spatial-card-gitops,
  .spatial-card-reliability {
    position: relative;
    inset: auto;
    width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .spatial-card-reliability .cable-port {
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
  }

  .spatial-canvas {
    height: 620px;
    opacity: 0.65;
  }

  .brain-fallback {
    top: 480px;
    left: 50%;
  }

  .spatial-controls,
  .spatial-progress,
  .spatial-proof {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 840px) {
  .spatial-layout {
    grid-template-columns: 1fr;
  }

  .spatial-copy {
    margin-bottom: 300px;
  }
}

/* AI engineering constellation ------------------------------------------------ */

.ai-portrait {
  --portrait-x: 0px;
  --portrait-y: 0px;
  --portrait-tilt-x: 0deg;
  --portrait-tilt-y: 0deg;
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform:
    perspective(960px)
    translate3d(var(--portrait-x), calc(var(--portrait-y) + var(--mobile-portrait-shift)), 0)
    rotateX(var(--portrait-tilt-x))
    rotateY(var(--portrait-tilt-y))
    scale(1.045);
  transform-origin: 64.5% 51%;
  will-change: transform, opacity;
  transition:
    opacity 700ms ease,
    transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.portrait-ready .ai-portrait {
  opacity: var(--mobile-portrait-opacity, 1);
}

.robot-procedural-ready .ai-portrait {
  transform: translate3d(0, var(--mobile-portrait-shift), 0);
  transform-origin: center;
}

.robot-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y pinch-zoom;
}

.spatial-stage.is-robot-touching .ai-socket {
  box-shadow:
    0 0 9px #63e8f0,
    0 0 25px rgba(99, 232, 240, 0.9),
    0 0 46px rgba(87, 115, 255, 0.46);
}

.ai-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.42) 0%, rgba(3, 7, 18, 0.12) 39%, transparent 57%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.08), transparent 67%, rgba(3, 7, 18, 0.48));
}

.ai-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(1.04) contrast(1.03);
}

.portrait-ready .brain-fallback {
  opacity: 0;
}

.spatial-canvas {
  z-index: 3;
}

.wires-ready .spatial-canvas {
  opacity: 1;
}

.spatial-atmosphere {
  z-index: 4;
  background:
    radial-gradient(circle at var(--pointer-x, 60%) var(--pointer-y, 45%), rgba(65, 219, 255, 0.055), transparent 18%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.68) 32%, rgba(3, 7, 18, 0.08) 55%, transparent 72%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.12), transparent 58%, rgba(3, 7, 18, 0.52));
}

.ai-socket {
  position: absolute;
  z-index: 2;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(222, 251, 255, 0.94);
  border-radius: 50%;
  background: #63e8f0;
  box-shadow:
    0 0 7px #63e8f0,
    0 0 18px rgba(99, 232, 240, 0.82),
    0 0 34px rgba(87, 115, 255, 0.38);
  transform: translate(-50%, -50%);
}

.socket-r1 { top: 32%; left: 76.4%; }
.socket-r2 { top: 46.5%; left: 76.2%; }
.socket-r3 { top: 58.5%; left: 75.6%; }
.socket-r4 { top: 69%; left: 73.2%; }
.socket-l1 { top: 32%; left: 48.2%; }
.socket-l2 { top: 46.5%; left: 48.1%; }
.socket-l3 { top: 58.8%; left: 49.6%; }
.socket-l4 { top: 69%; left: 52%; }

.service-constellation {
  display: contents;
}

.service-node {
  --glass-x: 50%;
  --glass-y: 50%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --node-color: #63e8f0;
  position: absolute;
  z-index: 8;
  width: min(210px, 17vw);
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 11px;
  overflow: hidden;
  padding: 11px 12px;
  border: 1px solid rgba(222, 243, 255, 0.18);
  border-radius: 15px;
  outline: 0;
  background:
    radial-gradient(circle at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.18), transparent 27%),
    linear-gradient(135deg, rgba(140, 216, 255, 0.13), rgba(94, 78, 189, 0.075) 58%, rgba(10, 22, 38, 0.28)),
    rgba(8, 17, 31, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.26),
    0 28px 65px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px) saturate(175%) contrast(110%);
  color: #eef8ff;
  transform:
    perspective(850px)
    rotateX(var(--tilt-x))
    rotateY(var(--tilt-y))
    translate3d(0, 22px, -32px)
    scale(0.94);
  transform-style: preserve-3d;
  transition:
    opacity 420ms ease,
    transform 680ms cubic-bezier(0.16, 1.35, 0.32, 1),
    border-color 220ms ease,
    box-shadow 220ms ease;
  will-change: opacity, transform;
}

body.spatial-enhanced .service-node {
  opacity: 0;
}

body.spatial-enhanced .service-node.is-visible {
  opacity: 1;
  transform:
    perspective(850px)
    rotateX(var(--tilt-x))
    rotateY(var(--tilt-y))
    translate3d(0, 0, 0)
    scale(1);
}

@media (min-width: 841px) and (prefers-reduced-motion: no-preference) {
  body.spatial-enhanced .spatial-copy {
    opacity: 0;
    transform: translate3d(0, 34px, 0) scale(0.97);
    pointer-events: none;
  }

  body.spatial-enhanced .service-node:not(.is-current) {
    visibility: hidden;
    pointer-events: none;
  }

  .node-training,
  .node-rag,
  .node-mlops,
  .node-cicd {
    right: auto;
    left: 0.8%;
  }

  .node-ec2,
  .node-s3 {
    right: 0;
  }

  .node-vpc,
  .node-k8s {
    right: 0.8%;
  }

  .spatial-copy h1 {
    font-size: clamp(3.2rem, min(6.35vw, 10.5vh), 6.4rem);
  }

  .spatial-proof {
    --proof-exit: clamp(
      0,
      calc((var(--story-progress) - 0.72) * 7),
      1
    );
    bottom: 5px;
    opacity: calc(1 - var(--proof-exit));
    transform: translate3d(0, calc(var(--proof-exit) * 88px), 0);
    transition:
      opacity 260ms ease,
      transform 440ms cubic-bezier(0.16, 1, 0.3, 1);
  }
}

.service-node::before,
.service-node::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.service-node::before {
  inset: -1px;
  border-radius: inherit;
  background:
    linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.18) 40%, transparent 62%) 0 0 / 220% 100%,
    conic-gradient(from 180deg at var(--glass-x) var(--glass-y), color-mix(in srgb, var(--node-color) 28%, transparent), transparent 28%, rgba(174, 111, 255, 0.12), transparent 68%);
  mix-blend-mode: screen;
  opacity: 0.52;
}

.service-node::after {
  top: 8px;
  right: 14px;
  left: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.56), transparent);
}

.service-node:hover,
.service-node:focus-visible {
  border-color: color-mix(in srgb, var(--node-color) 62%, white 8%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 10px 24px rgba(0, 0, 0, 0.3),
    0 28px 70px color-mix(in srgb, var(--node-color) 16%, transparent);
}

.service-node > * {
  position: relative;
  z-index: 2;
}

.service-code {
  min-width: 44px;
  display: inline-grid;
  place-items: center;
  padding: 6px 7px;
  border: 1px solid color-mix(in srgb, var(--node-color) 45%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--node-color) 10%, transparent);
  color: var(--node-color);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1;
  box-shadow: inset 0 0 15px color-mix(in srgb, var(--node-color) 7%, transparent);
}

.service-node h2 {
  margin: 0 0 3px;
  color: #f7fbff;
  font-size: 0.82rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.service-node p {
  margin: 0;
  color: #8fa2b7;
  font-size: 0.61rem;
  line-height: 1.32;
}

.service-port {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid #e6fcff;
  border-radius: 50%;
  background: var(--node-color);
  box-shadow:
    0 0 7px var(--node-color),
    0 0 18px color-mix(in srgb, var(--node-color) 72%, transparent);
  transform: translateY(-50%);
}

.node-right .service-port { left: -5px; }
.node-left .service-port { right: -5px; }

.node-ec2 { top: 21%; right: 0; }
.node-vpc { top: 35%; right: 0.8%; --node-color: #72a6ff; }
.node-s3 { top: 49%; right: 0; --node-color: #5de1aa; }
.node-k8s { top: 63%; right: 0.8%; --node-color: #9e8cff; }

.node-training { top: 17%; right: 54%; --node-color: #ff75d6; }
.node-rag { top: 34%; right: 55%; --node-color: #b18cff; }
.node-mlops { top: 51%; right: 55%; --node-color: #65e4ac; }
.node-cicd { top: 68%; right: 53%; --node-color: #63e8f0; }

.service-card-ai {
  border-color: rgba(177, 140, 255, 0.24);
  background:
    radial-gradient(circle at 80% 0%, rgba(177, 140, 255, 0.11), transparent 36%),
    var(--surface);
}

@media (hover: hover) and (pointer: fine) {
  html.has-spatial-cursor [data-service-node] {
    cursor: none;
  }
}

@media (max-width: 1120px) {
  .service-node {
    width: min(192px, 18vw);
    padding: 10px;
  }

  .service-node p {
    font-size: 0.57rem;
  }

  .node-training { right: 53%; }
  .node-rag,
  .node-mlops { right: 54%; }
  .node-cicd { right: 52%; }
}

@media (max-width: 840px) {
  .ai-portrait img {
    object-position: 68% 50%;
  }

  .ai-portrait::after {
    background:
      linear-gradient(180deg, rgba(3, 7, 18, 0.55) 0%, rgba(3, 7, 18, 0.1) 43%, rgba(3, 7, 18, 0.66) 100%),
      linear-gradient(90deg, rgba(3, 7, 18, 0.18), transparent 28%, transparent 72%, rgba(3, 7, 18, 0.16));
  }

  .socket-r1 { top: 31%; left: 79%; }
  .socket-r2 { top: 43%; left: 79%; }
  .socket-r3 { top: 54%; left: 78.5%; }
  .socket-r4 { top: 64%; left: 76%; }
  .socket-l1 { top: 31%; left: 28%; }
  .socket-l2 { top: 43%; left: 28%; }
  .socket-l3 { top: 54%; left: 29%; }
  .socket-l4 { top: 64%; left: 32%; }

  .service-node,
  .node-ec2,
  .node-vpc,
  .node-s3,
  .node-k8s,
  .node-training,
  .node-rag,
  .node-mlops,
  .node-cicd {
    top: auto;
    right: 0;
    bottom: 88px;
    left: 0;
    width: min(100%, 480px);
    min-height: 66px;
    margin: auto;
  }

  body.spatial-enhanced .service-node:not(.is-current) {
    visibility: hidden;
    pointer-events: none;
  }

  .node-left .service-port {
    right: auto;
    left: -5px;
  }

  .node-right .service-port {
    right: -5px;
    left: auto;
  }

  .spatial-controls {
    z-index: 10;
  }
}

@media (max-width: 620px) {
  .service-node,
  .node-ec2,
  .node-vpc,
  .node-s3,
  .node-k8s,
  .node-training,
  .node-rag,
  .node-mlops,
  .node-cicd {
    bottom: 80px;
  }

  .service-node {
    width: min(100%, 410px);
  }

  .ai-socket {
    width: 9px;
    height: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-portrait {
    height: 620px;
    opacity: 1;
  }

  .portrait-ready .brain-fallback {
    opacity: 0;
  }

  .service-constellation {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .service-node,
  body.spatial-enhanced .service-node,
  body.spatial-enhanced .service-node.is-visible,
  .node-ec2,
  .node-vpc,
  .node-s3,
  .node-k8s,
  .node-training,
  .node-rag,
  .node-mlops,
  .node-cicd {
    position: relative;
    inset: auto;
    width: auto;
    min-height: 72px;
    margin: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .service-port {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 840px) {
  .service-constellation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-node {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 520px) {
  .service-constellation {
    grid-template-columns: 1fr;
  }
}

@media print {
  .ai-portrait,
  .service-node,
  .spatial-canvas {
    display: none !important;
  }
}

/* Site-wide spatial glass system --------------------------------------------- */

:root {
  --ink: #030712;
  --ink-soft: #07101c;
  --ink-card: #0a1726;
  --paper: #06101b;
  --paper-bright: #081421;
  --paper-muted: #0b1826;
  --paper-text: #edf7ff;
  --paper-muted-text: #91a5b8;
  --line-light: rgba(205, 232, 255, 0.13);
  --line-dark: rgba(205, 232, 255, 0.12);
  --shadow:
    0 26px 75px rgba(0, 0, 0, 0.38),
    0 8px 24px rgba(0, 0, 0, 0.2);
  --glass-surface: rgba(8, 21, 36, 0.68);
  --glass-surface-soft: rgba(10, 25, 41, 0.52);
  --glass-border: rgba(207, 237, 255, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  --header-height: 92px;
}

body {
  min-height: 100%;
  color-scheme: dark;
  background:
    radial-gradient(circle at 86% 6%, rgba(111, 95, 255, 0.13), transparent 27rem),
    radial-gradient(circle at 8% 38%, rgba(54, 220, 242, 0.09), transparent 32rem),
    linear-gradient(155deg, #030711 0%, #06101d 48%, #030812 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  z-index: 999;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(115deg, transparent 0 3px, rgba(255, 255, 255, 0.008) 3px 4px),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.035), transparent 38%);
  opacity: 0.55;
  mix-blend-mode: screen;
}

body::after {
  content: "";
  position: fixed;
  z-index: 90;
  inset: 0;
  pointer-events: none;
  background: rgba(1, 5, 12, 0.56);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 280ms ease;
}

body.menu-open::after {
  opacity: 1;
}

.site-header,
.site-header.is-scrolled {
  min-height: var(--header-height);
  padding: 10px 0;
  border: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.76), transparent);
  backdrop-filter: none;
}

.nav-shell {
  min-height: 70px;
  padding: 7px 9px 7px 14px;
  border: 1px solid rgba(215, 240, 255, 0.13);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 0%, rgba(99, 232, 240, 0.1), transparent 31%),
    linear-gradient(135deg, rgba(18, 37, 59, 0.82), rgba(7, 16, 29, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 18px 0 38px rgba(62, 210, 237, 0.025),
    inset -18px 0 38px rgba(154, 111, 255, 0.035),
    0 16px 42px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(24px) saturate(165%);
  transition:
    border-color 260ms ease,
    background 260ms ease,
    box-shadow 260ms ease,
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.is-scrolled .nav-shell {
  border-color: rgba(129, 226, 255, 0.21);
  background:
    radial-gradient(circle at 10% 0%, rgba(99, 232, 240, 0.12), transparent 31%),
    linear-gradient(135deg, rgba(15, 32, 52, 0.93), rgba(5, 13, 25, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 50px rgba(0, 0, 0, 0.36),
    0 0 45px rgba(78, 178, 255, 0.045);
}

.brand {
  border-radius: 14px;
}

.brand-mark {
  position: relative;
  overflow: hidden;
  border-color: rgba(111, 231, 255, 0.31);
  background:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(145deg, rgba(74, 197, 255, 0.22), rgba(117, 87, 255, 0.14)),
    rgba(8, 22, 37, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 24px rgba(0, 0, 0, 0.26),
    0 0 24px rgba(94, 231, 231, 0.08);
}

.brand-mark [data-site-logo] {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  display: block;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.9);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.26));
  transition:
    opacity 180ms ease,
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brand-mark [data-site-logo].is-loaded {
  opacity: 1;
  transform: scale(1);
}

.brand-mark.site-logo-loaded {
  color: transparent;
}

.brand-copy strong {
  color: #f4fbff;
  letter-spacing: -0.02em;
}

.brand-copy small {
  color: #8196aa;
}

.site-nav {
  gap: 7px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.site-nav > a:not(.button) {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 10px;
  color: #95a7b9;
  font-size: 0.8rem;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 360ms cubic-bezier(0.16, 1.25, 0.32, 1);
}

.site-nav > a:not(.button)::after {
  display: none;
}

.site-nav > a:not(.button):hover,
.site-nav > a:not(.button)[aria-current="page"] {
  color: #f3fbff;
  background:
    radial-gradient(circle at 50% 0%, rgba(112, 228, 255, 0.13), transparent 74%),
    rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.085);
  transform: translateY(-1px);
}

.menu-toggle {
  border-color: rgba(207, 236, 255, 0.16);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(105, 210, 255, 0.1), rgba(117, 87, 255, 0.06)),
    rgba(8, 21, 36, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.button {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 28px rgba(0, 0, 0, 0.19);
  transition:
    transform 420ms cubic-bezier(0.16, 1.35, 0.32, 1),
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.button::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -2px;
  bottom: -2px;
  left: -35%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-18deg);
  transition: left 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.button:hover::before {
  left: 112%;
}

.button:hover {
  transform: translateY(-3px) scale(1.015);
}

.button-primary {
  border-color: rgba(129, 224, 255, 0.21);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(110deg, #177bdc 0%, #296ff1 49%, #7658e9 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 13px 34px rgba(38, 112, 237, 0.25),
    0 0 28px rgba(90, 212, 255, 0.075);
}

.button-primary:hover {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.26), transparent 38%),
    linear-gradient(110deg, #1685ed 0%, #347bf7 49%, #815ff2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.29),
    0 18px 42px rgba(37, 115, 245, 0.31);
}

.button-secondary {
  border-color: rgba(202, 232, 255, 0.15);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.08), transparent 48%),
    rgba(9, 23, 39, 0.6);
  backdrop-filter: blur(18px);
}

.button-secondary:hover {
  border-color: rgba(102, 229, 242, 0.38);
  background: rgba(36, 117, 139, 0.13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 16px 34px rgba(0, 0, 0, 0.25);
}

.section,
.section-muted,
.page-section,
.page-section-alt {
  position: relative;
  border-top: 1px solid rgba(199, 230, 255, 0.06);
  background:
    radial-gradient(circle at 88% 12%, rgba(108, 85, 255, 0.07), transparent 28rem),
    radial-gradient(circle at 8% 86%, rgba(59, 211, 232, 0.045), transparent 32rem),
    rgba(4, 10, 19, 0.91);
  color: var(--paper-text);
}

.section-muted,
.page-section-alt {
  background:
    radial-gradient(circle at 12% 12%, rgba(65, 210, 238, 0.055), transparent 28rem),
    linear-gradient(155deg, rgba(8, 18, 31, 0.97), rgba(4, 10, 19, 0.95));
}

.section::before,
.page-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
}

.section > .shell,
.page-section > .shell {
  position: relative;
  z-index: 1;
}

.section-heading .section-kicker,
.about-copy .section-kicker {
  color: #67e4ee;
}

.section-heading h2,
.case-content h3,
.capability-card h3,
.service-card h3,
.writing-card h3,
.about-copy h2,
.prose h2,
.prose h3,
.lab-card h2,
.article-index-card h2,
.decision-card h3,
.resume-section h2,
.resume-item h3,
.fact-card h2,
.toc-card h2,
.resume-aside h2 {
  color: #f2f8ff;
}

.section-heading > p,
.case-content > p,
.capability-card p,
.service-card p,
.writing-card p,
.about-copy > p,
.prose p,
.prose li,
.lab-card p,
.article-index-card p,
.decision-card p,
.resume-item p,
.resume-item li,
.toc-card a {
  color: #93a7b9;
}

.case-card,
.capability-card,
.service-card,
.writing-card,
.section-cta,
.profile-visual,
.contact-form,
.fact-card,
.toc-card,
.resume-aside,
.decision-card,
.lab-card,
.article-index-card,
.scope-note {
  border-color: var(--glass-border);
  background:
    radial-gradient(circle at 12% 0%, rgba(100, 222, 255, 0.085), transparent 31%),
    radial-gradient(circle at 95% 100%, rgba(141, 98, 255, 0.075), transparent 32%),
    linear-gradient(145deg, rgba(15, 34, 54, 0.72), rgba(6, 16, 29, 0.64));
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 22px 0 45px rgba(58, 216, 240, 0.018),
    inset -22px 0 45px rgba(138, 93, 255, 0.026),
    var(--shadow);
  backdrop-filter: blur(23px) saturate(155%);
}

.capability-card,
.service-card,
.writing-card,
.decision-card,
.lab-card,
.article-index-card {
  transition:
    transform 650ms cubic-bezier(0.16, 1.28, 0.32, 1),
    border-color 240ms ease,
    background 240ms ease,
    box-shadow 240ms ease;
}

.capability-card:hover,
.service-card:hover,
.writing-card:hover,
.decision-card:hover,
.lab-card:hover,
.article-index-card:hover {
  border-color: rgba(112, 228, 255, 0.31);
  background:
    radial-gradient(circle at 12% 0%, rgba(100, 222, 255, 0.13), transparent 34%),
    radial-gradient(circle at 95% 100%, rgba(141, 98, 255, 0.11), transparent 35%),
    linear-gradient(145deg, rgba(17, 39, 62, 0.8), rgba(7, 18, 33, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 30px 76px rgba(0, 0, 0, 0.42),
    0 0 42px rgba(74, 204, 245, 0.055);
  transform: translateY(-7px) scale(1.008);
}

.case-card {
  transition:
    transform 700ms cubic-bezier(0.16, 1.2, 0.32, 1),
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.case-card:hover {
  border-color: rgba(111, 227, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 34px 90px rgba(0, 0, 0, 0.46);
  transform: translateY(-5px);
}

.case-content {
  background:
    radial-gradient(circle at 100% 0%, rgba(113, 84, 255, 0.07), transparent 33%),
    rgba(7, 17, 30, 0.64);
}

.case-results div,
.scope-note span,
.resume-aside li {
  border-color: rgba(203, 233, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.case-meta,
.case-results dt,
.service-head,
.service-time,
.about-details span,
.about-details small,
.resume-item time,
.fact-list dt,
.article-meta {
  color: #7f93a7;
}

.case-results dd,
.case-bullets li,
.capability-card li,
.service-card li,
.scope-note span,
.about-details strong,
.resume-aside li,
.fact-list dd {
  color: #c0cfdb;
}

.project-status {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-client {
  border-color: rgba(72, 224, 168, 0.26);
  background: rgba(50, 205, 150, 0.09);
  color: #8bedc4;
}

.status-lab {
  border-color: rgba(102, 184, 255, 0.27);
  background: rgba(74, 155, 240, 0.1);
  color: #9dceff;
}

.status-open {
  border-color: rgba(180, 139, 255, 0.3);
  background: rgba(145, 95, 236, 0.1);
  color: #cfb4ff;
}

.tag-list li {
  border-color: rgba(99, 225, 239, 0.2);
  background: rgba(60, 201, 219, 0.065);
  color: #89e9ef;
}

.text-link,
.writing-card strong {
  color: #68e2ec;
}

.text-link:hover {
  color: #bd98ff;
}

.capability-number,
.decision-card span,
.lab-card > span,
.article-index-card > span,
.service-head strong {
  color: #6fe2ed;
}

.service-card-accent,
.service-card-ai {
  border-color: rgba(121, 218, 255, 0.26);
}

.service-card li::before {
  color: #68e1ae;
}

.service-time,
.about-details,
.about-details > div,
.resume-section h2,
.fact-list div {
  border-color: rgba(204, 233, 255, 0.1);
}

.section-process {
  background:
    radial-gradient(circle at 82% 16%, rgba(100, 88, 255, 0.14), transparent 28rem),
    radial-gradient(circle at 10% 90%, rgba(49, 207, 231, 0.08), transparent 30rem),
    #040a13;
}

.process-grid {
  border: 1px solid var(--glass-border);
  border-radius: 27px;
  background:
    radial-gradient(circle at 20% 0%, rgba(85, 218, 241, 0.08), transparent 35%),
    linear-gradient(145deg, rgba(12, 29, 48, 0.75), rgba(5, 14, 26, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    var(--shadow);
  backdrop-filter: blur(22px);
}

.process-grid li {
  border-color: rgba(209, 236, 255, 0.1);
}

.profile-visual {
  background:
    radial-gradient(circle at 50% 45%, rgba(94, 231, 231, 0.2), transparent 29%),
    radial-gradient(circle at 70% 70%, rgba(151, 100, 255, 0.14), transparent 35%),
    linear-gradient(145deg, rgba(13, 31, 48, 0.9), rgba(5, 13, 24, 0.92));
}

.about-copy .about-lead {
  color: #dfeaf3;
}

.contact-section {
  background:
    radial-gradient(circle at 4% 90%, rgba(67, 218, 238, 0.11), transparent 28rem),
    radial-gradient(circle at 95% 10%, rgba(132, 92, 255, 0.08), transparent 31rem),
    #030812;
}

.contact-direct,
.contact-direct div {
  border-color: rgba(206, 235, 255, 0.1);
}

.contact-form {
  background:
    radial-gradient(circle at 0 0, rgba(99, 230, 241, 0.09), transparent 31%),
    linear-gradient(145deg, rgba(13, 31, 50, 0.77), rgba(6, 15, 28, 0.74));
}

.field input,
.field select,
.field textarea {
  border-color: rgba(205, 234, 255, 0.14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(111, 225, 255, 0.26);
}

.subpage-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(203, 232, 255, 0.08);
  background:
    radial-gradient(circle at 82% 28%, rgba(92, 121, 255, 0.16), transparent 27rem),
    radial-gradient(circle at 18% 80%, rgba(58, 221, 236, 0.08), transparent 30rem),
    linear-gradient(155deg, #040a14, #071322 58%, #040912);
}

.subpage-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at 70% 44%, #000, transparent 72%);
}

.subpage-hero::after {
  content: "";
  position: absolute;
  right: clamp(-80px, 3vw, 40px);
  bottom: -190px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(101, 224, 242, 0.12);
  border-radius: 50%;
  box-shadow:
    inset 0 0 90px rgba(81, 215, 240, 0.035),
    0 0 90px rgba(110, 86, 255, 0.04);
}

.subpage-hero > .shell {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(205, 233, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
}

.breadcrumb a {
  color: #b9d0df;
}

.prose pre,
.terminal-block {
  border: 1px solid rgba(103, 226, 241, 0.14);
  background:
    radial-gradient(circle at 10% 0%, rgba(90, 220, 239, 0.07), transparent 31%),
    #030914;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    0 18px 40px rgba(0, 0, 0, 0.24);
}

.prose blockquote {
  border-color: #62dee8;
  background: rgba(21, 55, 71, 0.24);
  color: #cad8e4;
}

.site-footer {
  position: relative;
  overflow: hidden;
  border-color: rgba(206, 234, 255, 0.1);
  background:
    radial-gradient(circle at 85% 10%, rgba(114, 87, 255, 0.09), transparent 28rem),
    radial-gradient(circle at 8% 90%, rgba(59, 214, 234, 0.06), transparent 28rem),
    #02070e;
}

.footer-links a,
.footer-grid > div:first-child > p {
  color: #8297aa;
}

.footer-links a:hover {
  color: #69e4ed;
}

.footer-bottom {
  border-color: rgba(208, 235, 255, 0.09);
}

body.motion-ready .reveal-item {
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.985);
}

body.motion-ready .reveal-item.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 620ms ease var(--reveal-delay, 0ms),
    transform 850ms cubic-bezier(0.16, 1.22, 0.32, 1) var(--reveal-delay, 0ms);
}

@media (max-width: 1050px) {
  .site-nav {
    gap: 3px;
  }

  .site-nav > a:not(.button) {
    padding-inline: 8px;
  }
}

@media (max-width: 840px) {
  :root {
    --header-height: 78px;
  }

  .site-header,
  .site-header.is-scrolled {
    min-height: var(--header-height);
    padding: 8px 0;
  }

  .nav-shell {
    min-height: 62px;
    padding: 6px 7px 6px 11px;
    border-radius: 18px;
  }

  .site-nav {
    top: calc(var(--header-height) + 5px);
    right: 12px;
    bottom: auto;
    left: 12px;
    max-height: calc(100svh - var(--header-height) - 18px);
    padding: 13px;
    border: 1px solid rgba(203, 234, 255, 0.16);
    border-radius: 22px;
    background:
      radial-gradient(circle at 10% 0%, rgba(92, 223, 241, 0.12), transparent 32%),
      linear-gradient(150deg, rgba(12, 29, 48, 0.97), rgba(4, 12, 23, 0.96));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.13),
      0 30px 80px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(28px) saturate(170%);
  }

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

  .site-nav > a:not(.button) {
    min-height: 51px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    color: #d6e3ec;
  }

  .site-nav > a:not(.button):hover,
  .site-nav > a:not(.button)[aria-current="page"] {
    background: rgba(112, 221, 242, 0.09);
  }

  .site-nav .button {
    width: 100%;
    margin-top: 8px;
  }

  .process-grid {
    border-radius: 22px;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 72px;
  }

  .site-header,
  .site-header.is-scrolled {
    padding: 6px 0;
  }

  .nav-shell {
    min-height: 60px;
    border-radius: 17px;
  }

  .site-nav {
    top: calc(var(--header-height) + 4px);
  }

  .case-card,
  .profile-visual,
  .contact-form,
  .process-grid {
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.motion-ready .reveal-item,
  body.motion-ready .reveal-item.is-revealed {
    opacity: 1;
    transform: none;
  }

  .button::before {
    display: none;
  }
}

/* Global navigation utilities and color themes ------------------------------- */

.global-site-actions {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.global-home-link,
.theme-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(206, 235, 255, 0.13);
  border-radius: 12px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #a8bacb;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 740;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 360ms cubic-bezier(0.16, 1.25, 0.32, 1);
}

.global-home-link:hover,
.global-home-link[aria-current="page"],
.theme-toggle:hover {
  border-color: rgba(110, 226, 243, 0.27);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.14), transparent 42%),
    rgba(75, 195, 220, 0.075);
  color: #f2fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}

.global-action-icon {
  min-width: 15px;
  color: #6ee4ed;
  line-height: 1;
  text-align: center;
}

.global-action-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle[aria-pressed="true"] .global-action-icon {
  color: #7462d8;
}

.floating-site-actions {
  position: fixed;
  z-index: 1100;
  top: 14px;
  right: 14px;
  padding: 6px;
  border: 1px solid rgba(205, 234, 255, 0.15);
  border-radius: 15px;
  background: rgba(7, 18, 31, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px) saturate(155%);
}

.contact-form,
.contact-form p,
.contact-form label,
.contact-form input,
.contact-form select,
.contact-form textarea {
  color: #eaf5ff;
}

.contact-form .form-note {
  color: #9eb1c3;
}

.contact-form .form-status {
  color: #8ee9c3;
}

.field-optional,
.field-hint {
  color: #8fa5b9;
  font-weight: 560;
}

.field-hint {
  display: block;
  margin-top: 7px;
  font-size: 0.76rem;
  line-height: 1.5;
}

.form-trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.contact-form button[type="submit"]:disabled {
  cursor: wait;
  filter: saturate(0.72);
  opacity: 0.76;
  transform: none !important;
}

.contact-form .form-status.is-success {
  color: #8ee9c3;
}

.contact-form .form-status.is-error {
  color: #ff9cab;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #73889c;
  opacity: 1;
}

.contact-form select option {
  background: #081421;
  color: #edf7ff;
}

html[data-theme="light"] {
  --ink: #e7f0f7;
  --ink-soft: #dce8f1;
  --ink-card: #edf5fa;
  --paper: #edf4f8;
  --paper-bright: #f7fbfd;
  --paper-muted: #e5eef4;
  --paper-text: #142436;
  --paper-muted-text: #52687b;
  --text: #13263a;
  --text-muted: #5d7285;
  --line-dark: rgba(30, 74, 105, 0.16);
  --line-light: rgba(30, 74, 105, 0.14);
  --glass-surface: rgba(248, 252, 255, 0.76);
  --glass-surface-soft: rgba(236, 246, 252, 0.67);
  --glass-border: rgba(44, 100, 139, 0.17);
  --glass-highlight: rgba(255, 255, 255, 0.74);
  --shadow:
    0 26px 68px rgba(62, 91, 113, 0.16),
    0 8px 24px rgba(64, 93, 114, 0.1);
  color-scheme: light;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 88% 5%, rgba(121, 105, 232, 0.13), transparent 29rem),
    radial-gradient(circle at 5% 85%, rgba(53, 181, 209, 0.1), transparent 31rem),
    linear-gradient(150deg, #f7fbfd, #eaf3f8 53%, #f5f9fc);
  color: #142436;
}

html[data-theme="light"] body::before {
  background:
    repeating-linear-gradient(112deg, transparent 0 3px, rgba(21, 65, 94, 0.012) 3px 4px),
    linear-gradient(rgba(21, 65, 94, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 65, 94, 0.018) 1px, transparent 1px);
  background-size: auto, 68px 68px, 68px 68px;
  mix-blend-mode: multiply;
}

html[data-theme="light"] body::after {
  background: rgba(224, 237, 245, 0.62);
}

html[data-theme="light"] .site-header,
html[data-theme="light"] .site-header.is-scrolled {
  background: linear-gradient(180deg, rgba(235, 245, 251, 0.84), transparent);
}

html[data-theme="light"] .nav-shell,
html[data-theme="light"] .site-header.is-scrolled .nav-shell {
  border-color: rgba(48, 102, 140, 0.17);
  background:
    radial-gradient(circle at 9% 0%, rgba(84, 204, 226, 0.17), transparent 31%),
    linear-gradient(135deg, rgba(251, 254, 255, 0.87), rgba(228, 241, 249, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 18px 0 38px rgba(57, 189, 214, 0.035),
    inset -18px 0 38px rgba(133, 100, 225, 0.04),
    0 16px 42px rgba(63, 92, 113, 0.15);
}

html[data-theme="light"] .site-header.is-scrolled .nav-shell {
  border-color: rgba(46, 104, 142, 0.23);
  background:
    radial-gradient(circle at 9% 0%, rgba(84, 204, 226, 0.18), transparent 31%),
    linear-gradient(135deg, rgba(252, 254, 255, 0.96), rgba(228, 241, 248, 0.92));
  box-shadow:
    inset 0 1px 0 #fff,
    0 20px 48px rgba(61, 90, 111, 0.18);
}

html[data-theme="light"] .brand-mark {
  border-color: rgba(38, 145, 175, 0.22);
  background:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.86), transparent 28%),
    linear-gradient(145deg, rgba(89, 195, 220, 0.28), rgba(135, 103, 229, 0.14)),
    rgba(239, 248, 252, 0.92);
  color: #126d82;
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 24px rgba(62, 91, 112, 0.14);
}

html[data-theme="light"] .brand-copy strong {
  color: #15283a;
}

html[data-theme="light"] .brand-copy small {
  color: #607689;
}

html[data-theme="light"] .site-nav {
  border-color: rgba(43, 92, 127, 0.09);
  background: rgba(29, 75, 106, 0.035);
}

html[data-theme="light"] .site-nav > a:not(.button) {
  color: #526a7d;
}

html[data-theme="light"] .site-nav > a:not(.button):hover,
html[data-theme="light"] .site-nav > a:not(.button)[aria-current="page"] {
  color: #14293b;
  background:
    radial-gradient(circle at 50% 0%, rgba(62, 184, 211, 0.17), transparent 72%),
    rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .menu-toggle,
html[data-theme="light"] .global-home-link,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .floating-site-actions {
  border-color: rgba(41, 94, 130, 0.15);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.9), transparent 43%),
    rgba(240, 248, 252, 0.75);
  color: #425d72;
  box-shadow:
    inset 0 1px 0 #fff,
    0 10px 24px rgba(64, 94, 115, 0.12);
}

html[data-theme="light"] .menu-toggle span {
  background: #1a3448;
}

html[data-theme="light"] .global-home-link:hover,
html[data-theme="light"] .global-home-link[aria-current="page"],
html[data-theme="light"] .theme-toggle:hover {
  border-color: rgba(42, 157, 184, 0.27);
  background: rgba(211, 240, 247, 0.82);
  color: #143247;
}

html[data-theme="light"] .global-action-icon {
  color: #168399;
}

html[data-theme="light"] .button-secondary {
  border-color: rgba(44, 94, 130, 0.16);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.95), transparent 48%),
    rgba(237, 246, 251, 0.78);
  color: #183247;
  box-shadow:
    inset 0 1px 0 #fff,
    0 12px 28px rgba(63, 93, 115, 0.12);
}

html[data-theme="light"] .section,
html[data-theme="light"] .section-muted,
html[data-theme="light"] .page-section,
html[data-theme="light"] .page-section-alt {
  border-color: rgba(43, 93, 128, 0.08);
  background:
    radial-gradient(circle at 88% 12%, rgba(127, 102, 225, 0.08), transparent 28rem),
    radial-gradient(circle at 8% 86%, rgba(55, 180, 206, 0.07), transparent 32rem),
    rgba(241, 248, 251, 0.92);
  color: #142436;
}

html[data-theme="light"] .section-muted,
html[data-theme="light"] .page-section-alt {
  background:
    radial-gradient(circle at 12% 12%, rgba(58, 186, 210, 0.09), transparent 28rem),
    linear-gradient(155deg, rgba(231, 242, 248, 0.97), rgba(245, 249, 252, 0.96));
}

html[data-theme="light"] .section::before,
html[data-theme="light"] .page-section::before {
  background-image:
    linear-gradient(rgba(25, 74, 105, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 74, 105, 0.02) 1px, transparent 1px);
}

html[data-theme="light"] .section-heading h2,
html[data-theme="light"] .case-content h3,
html[data-theme="light"] .capability-card h3,
html[data-theme="light"] .service-card h3,
html[data-theme="light"] .writing-card h3,
html[data-theme="light"] .about-copy h2,
html[data-theme="light"] .prose h2,
html[data-theme="light"] .prose h3,
html[data-theme="light"] .lab-card h2,
html[data-theme="light"] .article-index-card h2,
html[data-theme="light"] .decision-card h3,
html[data-theme="light"] .resume-section h2,
html[data-theme="light"] .resume-item h3,
html[data-theme="light"] .fact-card h2,
html[data-theme="light"] .toc-card h2,
html[data-theme="light"] .resume-aside h2 {
  color: #14283a;
}

html[data-theme="light"] .section-heading > p,
html[data-theme="light"] .case-content > p,
html[data-theme="light"] .capability-card p,
html[data-theme="light"] .service-card p,
html[data-theme="light"] .writing-card p,
html[data-theme="light"] .about-copy > p,
html[data-theme="light"] .prose p,
html[data-theme="light"] .prose li,
html[data-theme="light"] .lab-card p,
html[data-theme="light"] .article-index-card p,
html[data-theme="light"] .decision-card p,
html[data-theme="light"] .resume-item p,
html[data-theme="light"] .resume-item li,
html[data-theme="light"] .toc-card a {
  color: #536a7c;
}

html[data-theme="light"] :where(
    .case-card,
    .capability-card,
    .service-card,
    .writing-card,
    .section-cta,
    .profile-visual,
    .contact-form,
    .fact-card,
    .toc-card,
    .resume-aside,
    .decision-card,
    .lab-card,
    .article-index-card,
    .scope-note
  ) {
  border-color: rgba(45, 97, 133, 0.17);
  background:
    radial-gradient(circle at 12% 0%, rgba(71, 189, 215, 0.13), transparent 31%),
    radial-gradient(circle at 95% 100%, rgba(137, 100, 224, 0.1), transparent 32%),
    linear-gradient(145deg, rgba(252, 254, 255, 0.82), rgba(228, 240, 247, 0.73));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 22px 0 45px rgba(57, 187, 212, 0.025),
    inset -22px 0 45px rgba(133, 96, 223, 0.03),
    0 24px 64px rgba(62, 90, 110, 0.14);
}

html[data-theme="light"] :where(
    .capability-card,
    .service-card,
    .writing-card,
    .decision-card,
    .lab-card,
    .article-index-card
  ):hover {
  border-color: rgba(38, 147, 174, 0.3);
  background:
    radial-gradient(circle at 12% 0%, rgba(71, 189, 215, 0.17), transparent 34%),
    radial-gradient(circle at 95% 100%, rgba(137, 100, 224, 0.13), transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(228, 241, 248, 0.84));
  box-shadow:
    inset 0 1px 0 #fff,
    0 30px 70px rgba(60, 89, 110, 0.18);
}

html[data-theme="light"] .case-content {
  background:
    radial-gradient(circle at 100% 0%, rgba(126, 95, 224, 0.09), transparent 33%),
    rgba(244, 249, 252, 0.72);
}

html[data-theme="light"] .case-results div,
html[data-theme="light"] .scope-note span,
html[data-theme="light"] .resume-aside li {
  border-color: rgba(42, 92, 126, 0.13);
  background: rgba(255, 255, 255, 0.55);
}

html[data-theme="light"] .case-results dd,
html[data-theme="light"] .case-bullets li,
html[data-theme="light"] .capability-card li,
html[data-theme="light"] .service-card li,
html[data-theme="light"] .scope-note span,
html[data-theme="light"] .about-details strong,
html[data-theme="light"] .resume-aside li,
html[data-theme="light"] .fact-list dd {
  color: #2b455a;
}

html[data-theme="light"] .section-process {
  background:
    radial-gradient(circle at 82% 16%, rgba(121, 101, 225, 0.12), transparent 28rem),
    radial-gradient(circle at 10% 90%, rgba(56, 183, 208, 0.11), transparent 30rem),
    #eaf3f8;
  color: #142436;
}

html[data-theme="light"] .section-heading-light > p,
html[data-theme="light"] .process-grid p {
  color: #576e80;
}

html[data-theme="light"] .process-grid {
  border-color: rgba(42, 94, 130, 0.16);
  background:
    radial-gradient(circle at 20% 0%, rgba(70, 190, 215, 0.13), transparent 35%),
    linear-gradient(145deg, rgba(251, 254, 255, 0.82), rgba(225, 238, 246, 0.75));
  box-shadow:
    inset 0 1px 0 #fff,
    0 25px 68px rgba(61, 90, 111, 0.15);
}

html[data-theme="light"] .process-grid h3 {
  color: #182e41;
}

html[data-theme="light"] .profile-visual {
  background:
    radial-gradient(circle at 50% 45%, rgba(73, 190, 211, 0.24), transparent 29%),
    radial-gradient(circle at 70% 70%, rgba(139, 101, 225, 0.16), transparent 35%),
    linear-gradient(145deg, rgba(244, 251, 253, 0.92), rgba(220, 235, 244, 0.92));
}

html[data-theme="light"] .profile-visual > span {
  color: #173144;
}

html[data-theme="light"] .about-copy .about-lead {
  color: #243d51;
}

html[data-theme="light"] .contact-section {
  background:
    radial-gradient(circle at 4% 90%, rgba(63, 185, 208, 0.13), transparent 28rem),
    radial-gradient(circle at 95% 10%, rgba(131, 101, 225, 0.1), transparent 31rem),
    #eaf3f8;
  color: #15293b;
}

html[data-theme="light"] .contact-copy h2,
html[data-theme="light"] .contact-direct strong,
html[data-theme="light"] .contact-direct a {
  color: #15293b;
}

html[data-theme="light"] .contact-copy > p,
html[data-theme="light"] .contact-direct span {
  color: #5a7083;
}

html[data-theme="light"] .contact-form,
html[data-theme="light"] .contact-form p,
html[data-theme="light"] .contact-form label,
html[data-theme="light"] .contact-form input,
html[data-theme="light"] .contact-form select,
html[data-theme="light"] .contact-form textarea {
  color: #183247;
}

html[data-theme="light"] .contact-form {
  border-color: rgba(42, 94, 130, 0.17);
  background:
    radial-gradient(circle at 0 0, rgba(68, 188, 212, 0.14), transparent 31%),
    linear-gradient(145deg, rgba(253, 255, 255, 0.87), rgba(226, 239, 247, 0.78));
}

html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea {
  border-color: rgba(42, 93, 128, 0.18);
  background: rgba(255, 255, 255, 0.65);
  color: #173247;
}

html[data-theme="light"] .contact-form input::placeholder,
html[data-theme="light"] .contact-form textarea::placeholder {
  color: #778c9c;
}

html[data-theme="light"] .contact-form select option {
  background: #f5fafc;
  color: #173247;
}

html[data-theme="light"] .contact-form .form-note {
  color: #607689;
}

html[data-theme="light"] .field-optional,
html[data-theme="light"] .field-hint {
  color: #667c8e;
}

html[data-theme="light"] .contact-form .form-status.is-success {
  color: #147954;
}

html[data-theme="light"] .contact-form .form-status.is-error {
  color: #b72e46;
}

html[data-theme="light"] .subpage-hero {
  border-color: rgba(44, 95, 130, 0.1);
  background:
    radial-gradient(circle at 82% 28%, rgba(112, 105, 226, 0.15), transparent 27rem),
    radial-gradient(circle at 18% 80%, rgba(61, 186, 211, 0.12), transparent 30rem),
    linear-gradient(155deg, #f8fcfd, #e8f2f7 58%, #f3f8fb);
}

html[data-theme="light"] .subpage-hero h1 {
  color: #13283a;
}

html[data-theme="light"] .subpage-hero > .shell > p:not(.section-kicker),
html[data-theme="light"] .subpage-hero-copy {
  color: #536a7c;
}

html[data-theme="light"] .subpage-hero::before {
  background-image:
    linear-gradient(rgba(26, 73, 104, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 73, 104, 0.025) 1px, transparent 1px);
}

html[data-theme="light"] .subpage-hero::after {
  border-color: rgba(48, 158, 183, 0.15);
}

html[data-theme="light"] .breadcrumb {
  border-color: rgba(42, 93, 127, 0.13);
  background: rgba(255, 255, 255, 0.48);
  color: #607587;
}

html[data-theme="light"] .breadcrumb a {
  color: #314f65;
}

html[data-theme="light"] .site-footer {
  border-color: rgba(41, 91, 126, 0.12);
  background:
    radial-gradient(circle at 85% 10%, rgba(125, 99, 224, 0.1), transparent 28rem),
    radial-gradient(circle at 8% 90%, rgba(58, 183, 207, 0.09), transparent 28rem),
    #e5eff5;
  color: #193045;
}

html[data-theme="light"] .footer-links strong {
  color: #223c50;
}

html[data-theme="light"] .footer-links a,
html[data-theme="light"] .footer-grid > div:first-child > p,
html[data-theme="light"] .footer-bottom {
  color: #5d7386;
}

html[data-theme="light"] .spatial-hero {
  background:
    radial-gradient(circle at 70% 22%, rgba(87, 112, 225, 0.15), transparent 28%),
    radial-gradient(circle at 48% 58%, rgba(38, 185, 197, 0.1), transparent 31%),
    #dfeaf2;
}

html[data-theme="light"] .spatial-stage::before {
  background-image:
    linear-gradient(rgba(24, 73, 104, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 73, 104, 0.034) 1px, transparent 1px);
}

html[data-theme="light"] .spatial-stage::after {
  background: linear-gradient(180deg, transparent, rgba(226, 238, 245, 0.92));
}

html[data-theme="light"] .spatial-atmosphere {
  background:
    radial-gradient(circle at var(--pointer-x, 60%) var(--pointer-y, 45%), rgba(57, 190, 213, 0.09), transparent 18%),
    linear-gradient(90deg, rgba(245, 250, 252, 0.98) 0%, rgba(235, 244, 249, 0.82) 35%, rgba(231, 241, 247, 0.2) 58%, transparent 72%),
    linear-gradient(180deg, rgba(247, 251, 253, 0.3), transparent 58%, rgba(226, 238, 245, 0.62));
}

html[data-theme="light"] .ai-portrait {
  filter: saturate(0.92) brightness(1.06);
}

html[data-theme="light"] .robot-procedural-ready .ai-portrait,
html[data-theme="light"] .robot-procedural-ready.ai-portrait {
  filter: none;
}

html[data-theme="light"] .ai-portrait::after {
  background:
    linear-gradient(90deg, rgba(241, 248, 251, 0.5) 0%, rgba(236, 246, 250, 0.13) 39%, transparent 57%),
    linear-gradient(180deg, rgba(234, 244, 249, 0.08), transparent 67%, rgba(224, 237, 244, 0.38));
}

html[data-theme="light"] .spatial-copy h1 {
  color: #10283a;
}

html[data-theme="light"] .spatial-copy .hero-lead {
  color: #476175;
}

html[data-theme="light"] .adaptive-note {
  color: #5c7487;
}

html[data-theme="light"] .spatial-controls,
html[data-theme="light"] .spatial-proof > div {
  border-color: rgba(42, 94, 130, 0.16);
  background: rgba(244, 250, 252, 0.72);
  box-shadow:
    inset 0 1px 0 #fff,
    0 16px 40px rgba(62, 91, 112, 0.13);
  color: #536b7e;
}

html[data-theme="light"] .ambient-toggle {
  background: rgba(37, 86, 117, 0.06);
  color: #1b374b;
}

html[data-theme="light"] .spatial-proof span {
  color: #60778a;
}

html[data-theme="light"] .spatial-proof strong,
html[data-theme="light"] .spatial-progress strong {
  color: #1a3549;
}

html[data-theme="light"] .service-node {
  border-color: rgba(42, 94, 130, 0.18);
  background:
    radial-gradient(circle at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.8), transparent 27%),
    linear-gradient(135deg, rgba(207, 238, 248, 0.73), rgba(223, 215, 250, 0.5) 58%, rgba(239, 247, 251, 0.72)),
    rgba(244, 250, 252, 0.68);
  box-shadow:
    inset 0 1px 0 #fff,
    0 10px 24px rgba(58, 87, 108, 0.13),
    0 28px 65px rgba(58, 87, 108, 0.14);
  color: #152d40;
}

html[data-theme="light"] .service-node h2 {
  color: #152c3f;
}

html[data-theme="light"] .service-node p {
  color: #607689;
}

html[data-theme="light"] .error-page {
  background:
    radial-gradient(circle at 82% 12%, rgba(122, 101, 225, 0.12), transparent 28rem),
    #edf5f9 !important;
  color: #14283a;
}

html[data-theme="light"] .error-card {
  border-color: rgba(42, 94, 130, 0.17);
  background: rgba(255, 255, 255, 0.64);
  box-shadow:
    inset 0 1px 0 #fff,
    0 28px 70px rgba(62, 91, 112, 0.15);
}

html[data-theme="light"] .error-card h1 {
  color: #14283a;
}

html[data-theme="light"] .error-card p {
  color: #5a7083;
}

@media (max-width: 1050px) {
  .global-action-label {
    display: none;
  }

  .global-home-link,
  .theme-toggle {
    width: 40px;
    padding-inline: 8px;
  }
}

@media (max-width: 840px) {
  .nav-shell {
    gap: 7px;
  }

  .global-site-actions {
    gap: 5px;
  }

  .global-home-link,
  .theme-toggle {
    width: 38px;
    min-height: 38px;
    border-radius: 11px;
  }

  html[data-theme="light"] .site-nav {
    border-color: rgba(42, 94, 130, 0.18);
    background:
      radial-gradient(circle at 10% 0%, rgba(66, 192, 215, 0.17), transparent 32%),
      linear-gradient(150deg, rgba(250, 253, 255, 0.98), rgba(226, 239, 247, 0.97));
    box-shadow:
      inset 0 1px 0 #fff,
      0 30px 72px rgba(61, 90, 111, 0.22);
  }

  html[data-theme="light"] .site-nav > a:not(.button) {
    color: #29465b;
  }

  html[data-theme="light"] .spatial-atmosphere {
    background:
      linear-gradient(180deg, rgba(241, 248, 251, 0.84) 0%, rgba(231, 242, 247, 0.36) 44%, rgba(229, 240, 246, 0.86) 100%),
      linear-gradient(90deg, rgba(242, 249, 251, 0.22), transparent 28%, transparent 72%, rgba(230, 240, 246, 0.16));
  }
}

@media (max-width: 430px) {
  .global-site-actions {
    gap: 4px;
  }

  .global-home-link,
  .theme-toggle {
    width: 36px;
    min-height: 36px;
  }

  .brand {
    gap: 8px;
  }

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

/* Final navigation alignment and warm off-white light mode ----------------- */

.nav-shell > .brand {
  order: 1;
}

.nav-shell > .site-nav {
  order: 2;
  margin-left: auto;
}

.nav-shell > .menu-toggle {
  order: 3;
}

.nav-shell > .global-site-actions {
  order: 4;
  margin-left: 0;
}

.global-site-actions .theme-toggle {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 8px;
}

.site-nav > .global-site-actions {
  flex: 0 0 auto;
  margin-left: 0;
}

.global-brand-home {
  cursor: pointer;
}

.global-brand-home:focus-visible {
  outline: 3px solid rgba(99, 232, 240, 0.35);
  outline-offset: 5px;
  border-radius: 12px;
}

html[data-theme="light"] {
  --paper: #f4f0e8;
  --paper-bright: #fffdf8;
  --paper-muted: #eee9df;
  --paper-text: #11161b;
  --paper-muted-text: #4d565f;
  --text: #10161c;
  --text-muted: #535d66;
  --glass-surface: rgba(255, 253, 247, 0.76);
  --glass-surface-soft: rgba(246, 241, 232, 0.7);
  --glass-border: rgba(51, 58, 64, 0.14);
  --line-dark: rgba(28, 36, 43, 0.15);
  --line-light: rgba(28, 36, 43, 0.12);
}

html[data-theme="light"] body {
  color: #11161b;
  background:
    radial-gradient(circle at 88% 3%, rgba(128, 102, 223, 0.11), transparent 30rem),
    radial-gradient(circle at 6% 88%, rgba(39, 174, 194, 0.1), transparent 32rem),
    linear-gradient(145deg, #fffdf8 0%, #f3efe7 48%, #faf7f0 100%);
}

html[data-theme="light"] .site-header,
html[data-theme="light"] .site-header.is-scrolled {
  background: linear-gradient(180deg, rgba(248, 244, 236, 0.88), transparent);
}

html[data-theme="light"] .nav-shell,
html[data-theme="light"] .site-header.is-scrolled .nav-shell {
  border-color: rgba(34, 43, 50, 0.15);
  background:
    radial-gradient(circle at 8% 0%, rgba(67, 196, 215, 0.16), transparent 30%),
    radial-gradient(circle at 98% 100%, rgba(133, 105, 226, 0.1), transparent 28%),
    linear-gradient(135deg, rgba(255, 254, 250, 0.88), rgba(241, 236, 227, 0.79));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 18px 0 38px rgba(54, 189, 209, 0.035),
    inset -18px 0 38px rgba(128, 98, 220, 0.035),
    0 18px 48px rgba(52, 57, 61, 0.15);
}

html[data-theme="light"] .brand-copy strong,
html[data-theme="light"] :is(
    .section-heading h2,
    .case-content h3,
    .capability-card h3,
    .service-card h3,
    .writing-card h3,
    .about-copy h2,
    .contact-copy h2,
    .prose h2,
    .prose h3,
    .lab-card h2,
    .article-index-card h2,
    .decision-card h3,
    .resume-section h2,
    .resume-item h3,
    .fact-card h2,
    .toc-card h2,
    .resume-aside h2,
    .subpage-hero h1
  ) {
  color: #11161b;
}

html[data-theme="light"] :is(
    .section-heading > p,
    .case-content > p,
    .capability-card p,
    .service-card p,
    .writing-card p,
    .about-copy > p,
    .contact-copy > p,
    .prose p,
    .prose li,
    .lab-card p,
    .article-index-card p,
    .decision-card p,
    .resume-item p,
    .resume-item li,
    .toc-card a,
    .footer-links a,
    .footer-grid > div:first-child > p,
    .footer-bottom
  ) {
  color: #515a62;
}

html[data-theme="light"] :is(.section, .section-muted, .page-section, .page-section-alt) {
  border-color: rgba(38, 45, 51, 0.08);
  background:
    radial-gradient(circle at 92% 8%, rgba(126, 98, 220, 0.065), transparent 28rem),
    radial-gradient(circle at 6% 92%, rgba(42, 174, 195, 0.065), transparent 30rem),
    rgba(249, 246, 239, 0.94);
}

html[data-theme="light"] :where(
    .case-card,
    .capability-card,
    .service-card,
    .writing-card,
    .section-cta,
    .profile-visual,
    .contact-form,
    .fact-card,
    .toc-card,
    .resume-aside,
    .decision-card,
    .lab-card,
    .article-index-card,
    .scope-note,
    .process-grid
  ) {
  border-color: rgba(37, 45, 52, 0.15);
  background:
    radial-gradient(circle at 10% 0%, rgba(54, 190, 211, 0.115), transparent 31%),
    radial-gradient(circle at 96% 100%, rgba(128, 97, 221, 0.085), transparent 32%),
    linear-gradient(145deg, rgba(255, 254, 250, 0.84), rgba(239, 234, 225, 0.75));
  box-shadow:
    inset 0 1px 0 #fff,
    inset 22px 0 45px rgba(55, 187, 207, 0.025),
    inset -22px 0 45px rgba(126, 96, 219, 0.026),
    0 26px 68px rgba(57, 59, 60, 0.14);
}

html[data-theme="light"] :is(.field input, .field select, .field textarea) {
  border-color: rgba(32, 42, 50, 0.17);
  background: rgba(255, 254, 250, 0.74);
  color: #111820;
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 22px rgba(50, 54, 58, 0.055);
}

html[data-theme="light"] .contact-form,
html[data-theme="light"] .contact-form p,
html[data-theme="light"] .contact-form label,
html[data-theme="light"] .contact-form input,
html[data-theme="light"] .contact-form select,
html[data-theme="light"] .contact-form textarea {
  color: #111820;
}

html[data-theme="light"] :is(.contact-section, .site-footer, .section-process) {
  background:
    radial-gradient(circle at 90% 8%, rgba(127, 99, 222, 0.085), transparent 28rem),
    radial-gradient(circle at 7% 92%, rgba(45, 176, 197, 0.085), transparent 30rem),
    #f0ebe2;
}

html[data-theme="light"] .subpage-hero {
  background:
    radial-gradient(circle at 82% 24%, rgba(126, 100, 222, 0.12), transparent 27rem),
    radial-gradient(circle at 16% 82%, rgba(48, 177, 199, 0.1), transparent 30rem),
    linear-gradient(155deg, #fffdf8, #f0ebe2 58%, #faf7f0);
}

html[data-theme="light"] .spatial-hero {
  background:
    radial-gradient(circle at 73% 22%, rgba(97, 111, 224, 0.14), transparent 29%),
    radial-gradient(circle at 48% 58%, rgba(34, 184, 194, 0.095), transparent 31%),
    #eee9df;
}

html[data-theme="light"] .spatial-atmosphere {
  background:
    radial-gradient(circle at var(--pointer-x, 60%) var(--pointer-y, 45%), rgba(47, 187, 207, 0.085), transparent 18%),
    linear-gradient(90deg, rgba(255, 253, 248, 0.99) 0%, rgba(247, 243, 235, 0.86) 35%, rgba(240, 235, 226, 0.15) 59%, transparent 72%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.2), transparent 58%, rgba(238, 233, 223, 0.58));
}

html[data-theme="light"] .spatial-stage::after {
  background: linear-gradient(180deg, transparent, rgba(240, 235, 226, 0.92));
}

html[data-theme="light"] .spatial-copy h1,
html[data-theme="light"] .spatial-proof strong,
html[data-theme="light"] .spatial-progress strong,
html[data-theme="light"] .service-node h2 {
  color: #0f151a;
}

html[data-theme="light"] .spatial-copy .hero-lead,
html[data-theme="light"] .adaptive-note,
html[data-theme="light"] .service-node p {
  color: #4e5962;
}

html[data-theme="light"] .eyebrow {
  border-color: rgba(18, 117, 80, 0.24);
  background: rgba(30, 151, 104, 0.1);
  color: #135d43;
}

html[data-theme="light"] .eyebrow .status-dot {
  background: #16865d;
  box-shadow: 0 0 0 5px rgba(22, 134, 93, 0.12);
}

html[data-theme="light"] :is(.spatial-controls, .spatial-proof > div, .service-node) {
  border-color: rgba(36, 44, 50, 0.16);
  background:
    radial-gradient(circle at var(--glass-x, 20%) var(--glass-y, 0%), rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(135deg, rgba(255, 253, 247, 0.79), rgba(238, 232, 223, 0.68));
  box-shadow:
    inset 0 1px 0 #fff,
    0 18px 46px rgba(52, 55, 57, 0.13);
}

@media (max-width: 840px) {
  .nav-shell > .menu-toggle {
    margin-left: auto;
  }

  .nav-shell > .global-site-actions {
    flex: 0 0 auto;
  }
}

/* Mobile-first spatial story: robot, copy, then connected services ---------- */

@media (max-width: 840px) and (prefers-reduced-motion: no-preference) {
  .spatial-hero {
    min-height: 420svh;
  }

  .spatial-stage {
    height: 100svh;
    min-height: 620px;
  }

  body.spatial-enhanced .spatial-copy {
    top: clamp(86px, 11svh, 112px);
    width: min(100%, 610px);
    opacity: 0;
    transform: translate3d(0, 46px, 0) scale(0.97);
  }

  .portrait-ready .ai-portrait {
    opacity: var(--mobile-portrait-opacity, 1);
  }

  .ai-portrait img {
    object-position: 63% 50%;
  }

  .spatial-atmosphere {
    background:
      radial-gradient(circle at 50% 40%, rgba(65, 219, 255, 0.075), transparent 26%),
      linear-gradient(180deg, rgba(3, 7, 18, 0.1) 0%, rgba(3, 7, 18, 0.08) 45%, rgba(3, 7, 18, 0.86) 100%);
  }

  .spatial-controls {
    right: 12px;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: auto;
  }

  .service-node,
  .node-ec2,
  .node-vpc,
  .node-s3,
  .node-k8s,
  .node-training,
  .node-rag,
  .node-mlops,
  .node-cicd {
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 68px));
    min-height: 72px;
    border-color: color-mix(in srgb, var(--node-color) 35%, rgba(222, 243, 255, 0.22));
    background:
      radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--node-color) 16%, transparent), transparent 35%),
      linear-gradient(135deg, rgba(20, 39, 60, 0.88), rgba(8, 17, 31, 0.82));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 16px 42px rgba(0, 0, 0, 0.4),
      0 0 30px color-mix(in srgb, var(--node-color) 10%, transparent);
    backdrop-filter: blur(26px) saturate(175%);
  }

  .service-node h2 {
    font-size: 0.86rem;
  }

  .service-node p {
    color: #a9bbca;
    font-size: 0.64rem;
  }

  .service-port {
    width: 12px;
    height: 12px;
    border-width: 2px;
    box-shadow:
      0 0 8px var(--node-color),
      0 0 24px color-mix(in srgb, var(--node-color) 86%, transparent),
      0 0 42px color-mix(in srgb, var(--node-color) 35%, transparent);
  }

  html[data-theme="light"] .spatial-atmosphere {
    background:
      radial-gradient(circle at 50% 40%, rgba(45, 181, 202, 0.075), transparent 26%),
      linear-gradient(180deg, rgba(255, 253, 248, 0.04) 0%, rgba(242, 237, 228, 0.08) 43%, rgba(239, 234, 225, 0.88) 100%);
  }

  html[data-theme="light"] .service-node {
    border-color: color-mix(in srgb, var(--node-color) 33%, rgba(34, 43, 50, 0.16));
    background:
      radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--node-color) 14%, transparent), transparent 35%),
      linear-gradient(135deg, rgba(255, 254, 250, 0.94), rgba(235, 229, 219, 0.9));
    box-shadow:
      inset 0 1px 0 #fff,
      0 16px 42px rgba(52, 56, 59, 0.16),
      0 0 28px color-mix(in srgb, var(--node-color) 9%, transparent);
  }

  html[data-theme="light"] .service-node h2 {
    color: #10161b;
  }

  html[data-theme="light"] .service-node p {
    color: #4f5962;
  }
}

/* Frame-budget safeguards -------------------------------------------------- */

main > section:not(.spatial-hero),
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 820px;
}

.spatial-stage {
  contain: layout paint style;
}

.service-node,
.spatial-card,
.ai-portrait {
  will-change: auto;
}

.service-node.is-current,
.spatial-card.is-current {
  will-change: transform, opacity;
}

body.spatial-in-motion :is(
  .nav-shell,
  .service-node,
  .spatial-card,
  .spatial-proof > div
) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.spatial-in-motion :is(.service-node, .spatial-card) {
  transition-duration: 120ms !important;
}

html[data-performance="lite"] * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-performance="lite"] :is(
  .nav-shell,
  .service-node,
  .spatial-card,
  .spatial-proof > div,
  .glass-panel,
  .project-card,
  .service-card,
  .contact-panel
) {
  background-color: rgba(8, 18, 31, 0.94);
}

html[data-theme="light"][data-performance="lite"] :is(
  .nav-shell,
  .service-node,
  .spatial-card,
  .spatial-proof > div,
  .glass-panel,
  .project-card,
  .service-card,
  .contact-panel
) {
  background-color: rgba(250, 248, 242, 0.96);
}

html[data-performance="lite"] :is(.service-node, .spatial-card) {
  transform-style: flat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 34px rgba(0, 0, 0, 0.28);
}

html[data-performance="lite"] .service-node::before,
html[data-performance="lite"] .spatial-card::before,
html[data-performance="lite"] .cursor-trail-dot {
  display: none;
}

html[data-performance="lite"] .spatial-atmosphere {
  background:
    radial-gradient(circle at 50% 46%, rgba(65, 219, 255, 0.06), transparent 24%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.68) 32%, rgba(3, 7, 18, 0.08) 55%, transparent 72%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.12), transparent 58%, rgba(3, 7, 18, 0.52));
}

html[data-performance="lite"] .ambient-orb {
  animation: none !important;
}

@media (max-width: 840px) {
  .site-header,
  .spatial-stage,
  .spatial-canvas,
  .robot-canvas {
    transform: translateZ(0);
  }

  body.spatial-in-motion :is(.service-node, .spatial-card) {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 8px 24px rgba(0, 0, 0, 0.24);
  }
}

@media (max-width: 620px) and (prefers-reduced-motion: no-preference) {
  .spatial-layout {
    width: min(calc(100% - 24px), var(--shell));
  }

  body.spatial-enhanced .spatial-copy {
    top: clamp(82px, 10.5svh, 98px);
  }

  .spatial-copy .eyebrow {
    font-size: 0.64rem;
  }

  .spatial-copy .hero-kicker {
    max-width: 340px;
    margin-top: 14px;
    font-size: 0.61rem;
    line-height: 1.45;
  }

  .spatial-copy h1 {
    max-width: 510px;
    margin: 11px 0 14px;
    font-size: clamp(2.55rem, 12.5vw, 3.65rem);
    line-height: 0.9;
  }

  .spatial-copy .hero-lead {
    max-width: 510px;
    font-size: 0.92rem;
    line-height: 1.48;
  }

  .spatial-copy .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
  }

  .spatial-copy .hero-actions .button {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    font-size: 0.76rem;
  }

  .service-node {
    width: min(calc(100% - 10px), 410px);
  }
}

@media (max-width: 390px) and (prefers-reduced-motion: no-preference) {
  .spatial-copy h1 {
    font-size: clamp(2.3rem, 12vw, 3rem);
  }

  .spatial-copy .hero-lead {
    font-size: 0.86rem;
  }

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

  .spatial-copy .hero-actions .button {
    min-height: 42px;
  }
}

/* Light-mode contrast contract --------------------------------------------- */

html[data-theme="light"] body,
html[data-theme="light"] main {
  color: #11161b;
}

html[data-theme="light"] main :is(h1, h2, h3, h4, h5, h6, dt, legend, label, strong) {
  color: #11161b;
}

html[data-theme="light"] main :is(p, li, dd, small) {
  color: #4b555e;
}

html[data-theme="light"] :is(.site-nav, .breadcrumb, .footer-links, .footer-bottom) a:not(.button),
html[data-theme="light"] .text-link,
html[data-theme="light"] .copy-email {
  color: #175c70;
}

html[data-theme="light"] :is(.site-nav, .breadcrumb, .footer-links, .footer-bottom) a:not(.button):hover,
html[data-theme="light"] .text-link:hover,
html[data-theme="light"] .copy-email:hover {
  color: #0c3e4d;
}

html[data-theme="light"] :is(.section-kicker, .hero-kicker, .service-code, .visual-label) {
  color: #0e7388;
}

html[data-theme="light"] :is(.button-primary, .button-primary span) {
  color: #fff;
}

html[data-theme="light"] .button-secondary {
  color: #14232d;
}

html[data-theme="light"] :is(.project-status, .status-dot, .service-port, .ai-socket) {
  color: inherit;
}

html[data-theme="light"] .tag-list li {
  border-color: rgba(32, 49, 60, 0.14);
  background: rgba(255, 254, 250, 0.62);
  color: #304653;
}

html[data-theme="light"] :is(.article-meta, .case-meta, .resume-meta, .status-meta) {
  color: #5a646d;
}

html[data-theme="light"] .form-note,
html[data-theme="light"] .field-hint {
  color: #59646d;
}

html[data-theme="light"] :is(.contact-form input, .contact-form select, .contact-form textarea) {
  caret-color: #0f7186;
}

html[data-theme="light"] ::selection {
  background: rgba(42, 169, 193, 0.24);
  color: #10161b;
}

@media (max-width: 840px) and (prefers-reduced-motion: no-preference) {
  html[data-theme="light"] .spatial-copy {
    padding: 15px;
    border: 1px solid rgba(37, 45, 51, 0.13);
    border-radius: 19px;
    background: rgba(255, 253, 248, 0.78);
    box-shadow:
      inset 0 1px 0 #fff,
      0 20px 54px rgba(52, 56, 59, 0.14);
    backdrop-filter: blur(20px) saturate(135%);
  }
}
