/* ================================
   Variables
================================ */
:root {
  --black: #030303;
  --midnight: #0a1128;
  --midnight-2: #111936;
  --neon: #7b2cbf;
  --violet-hot: #b45cff;
  --cyan: #62f6ff;
  --silver: #f5f2ff;
  --muted: rgba(245, 242, 255, 0.68);
  --soft: rgba(245, 242, 255, 0.12);
  --hairline: rgba(245, 242, 255, 0.16);
  --glass: rgba(8, 10, 19, 0.58);
  --glass-strong: rgba(8, 10, 19, 0.82);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-fluid: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 82px;
  --cursor-x: 50vw;
  --cursor-y: 50vh;
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* ================================
   Reset / Core
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
  scroll-behavior: auto;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(10, 17, 40, 0.42), transparent 44%),
    linear-gradient(180deg, var(--black) 0%, #07070b 42%, #020203 100%);
  color: var(--silver);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

body.deep-active {
  overflow: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

::selection {
  background: rgba(123, 44, 191, 0.72);
  color: #fff;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.fluid-canvas,
.rift-canvas,
.grain,
.ambient-field,
.spectral-vignette,
.route-progress,
.route-curtain,
.custom-cursor {
  pointer-events: none;
  position: fixed;
}

.fluid-canvas {
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.84;
}

.rift-canvas {
  inset: 0;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  opacity: 0.82;
  mix-blend-mode: screen;
}

.ambient-field {
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, transparent, rgba(98, 246, 255, 0.035), transparent),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.025) 0 1px,
      transparent 1px 108px
    );
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

.spectral-vignette {
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(
      circle at var(--cursor-x) var(--cursor-y),
      rgba(98, 246, 255, 0.12),
      rgba(123, 44, 191, 0.075) 18%,
      transparent 42%
    ),
    linear-gradient(90deg, rgba(3, 3, 3, 0.86), transparent 18%, transparent 82%, rgba(3, 3, 3, 0.9)),
    linear-gradient(180deg, rgba(3, 3, 3, 0.76), transparent 28%, transparent 68%, rgba(3, 3, 3, 0.92));
  mix-blend-mode: screen;
  opacity: 0.58;
}

.grain {
  inset: -24%;
  z-index: 30;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(circle at 12% 18%, #fff 0 1px, transparent 1.35px),
    radial-gradient(circle at 68% 42%, #fff 0 1px, transparent 1.2px),
    radial-gradient(circle at 38% 78%, #fff 0 1px, transparent 1.4px),
    radial-gradient(circle at 82% 12%, #fff 0 1px, transparent 1.25px);
  background-size: 110px 110px, 150px 150px, 130px 130px, 90px 90px;
  animation: grainDrift 820ms steps(2, end) infinite;
}

.route-progress {
  top: 0;
  left: 0;
  z-index: 45;
  width: 100%;
  height: 2px;
  background: rgba(245, 242, 255, 0.05);
}

.route-progress span {
  display: block;
  width: 33.333%;
  height: 100%;
  background: linear-gradient(90deg, var(--neon), var(--cyan), #fff);
  box-shadow: 0 0 24px rgba(98, 246, 255, 0.72);
  transform-origin: left;
  transition: width 720ms var(--ease-out-expo);
}

.click-burst {
  position: fixed;
  z-index: 79;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(98, 246, 255, 0.88);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  animation: clickBurst 640ms var(--ease-out-expo) forwards;
  mix-blend-mode: screen;
}

.site-shell {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  opacity: 0;
  transform: scale(0.94);
  transform-origin: center;
  transition:
    opacity 1100ms var(--ease-out-expo),
    transform 1400ms var(--ease-out-expo),
    filter 1400ms var(--ease-out-expo);
  filter: blur(16px);
}

body.is-loaded .site-shell {
  opacity: 1;
  transform: none;
  filter: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  width: 100%;
  min-height: var(--header-h);
  padding: 18px clamp(18px, 4vw, 56px);
  color: rgba(245, 242, 255, 0.88);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(3, 3, 3, 0.72), rgba(3, 3, 3, 0));
  backdrop-filter: blur(18px);
  mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 100%);
}

.brand {
  justify-self: start;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.main-nav {
  display: inline-flex;
  gap: 6px;
  justify-self: center;
  padding: 6px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.58);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(22px);
}

.nav-link,
.sound-toggle,
.button {
  min-height: 42px;
  border-radius: 999px;
  transition:
    transform 260ms var(--ease-fluid),
    border-color 260ms ease,
    background 260ms ease,
    color 260ms ease;
}

.nav-link {
  display: inline-grid;
  place-items: center;
  padding: 0 17px;
  color: rgba(245, 242, 255, 0.62);
  font-size: 0.82rem;
  font-weight: 760;
}

.nav-link.active {
  background: rgba(245, 242, 255, 0.11);
  color: #fff;
  box-shadow: inset 0 0 28px rgba(123, 44, 191, 0.18);
}

.sound-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  background: rgba(5, 7, 13, 0.56);
  color: rgba(245, 242, 255, 0.7);
  backdrop-filter: blur(20px);
}

.sound-toggle__glyph {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(245, 242, 255, 0.42);
  box-shadow: 0 0 0 0 rgba(123, 44, 191, 0);
}

.sound-toggle[aria-pressed="true"] .sound-toggle__glyph {
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(98, 246, 255, 0.88);
}

.nav-link:hover,
.sound-toggle:hover,
.button:hover {
  transform: translateY(-2px);
}

.route-stage {
  position: relative;
  min-height: 100vh;
}

.route-view {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  padding: calc(var(--header-h) + 28px) clamp(18px, 5vw, 76px) 54px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.988);
  transition:
    opacity 620ms var(--ease-out-expo),
    transform 780ms var(--ease-out-expo),
    visibility 0ms linear 780ms;
}

.route-view.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 150ms, 150ms, 0ms;
}

/* ================================
   Preloader / Transitions
================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 17, 40, 0.4), rgba(3, 3, 3, 0.94)),
    var(--black);
  transition:
    opacity 720ms var(--ease-out-expo),
    visibility 0ms linear 720ms,
    transform 900ms var(--ease-out-expo);
}

.preloader::before {
  content: "";
  position: absolute;
  inset: 20%;
  border: 1px solid rgba(123, 44, 191, 0.2);
  opacity: 0.42;
  transform: perspective(780px) rotateX(62deg);
  box-shadow: 0 0 90px rgba(123, 44, 191, 0.16);
}

.preloader__terminal {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: min(92vw, 560px);
  padding: 22px 24px;
  border: 1px solid rgba(123, 44, 191, 0.4);
  border-radius: 8px;
  background: rgba(2, 2, 5, 0.8);
  color: #fff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.2rem, 2.1rem, 2.7rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow:
    0 0 80px rgba(123, 44, 191, 0.25),
    inset 0 0 32px rgba(98, 246, 255, 0.04);
}

.preloader__prefix {
  color: rgba(98, 246, 255, 0.72);
  font-size: 0.36em;
  font-weight: 700;
}

.preloader__cursor {
  width: 0.52em;
  height: 1.05em;
  background: var(--violet-hot);
  animation: blink 600ms steps(1, end) infinite;
}

.preloader__scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(98, 246, 255, 0.08) 49%,
    rgba(123, 44, 191, 0.15) 50%,
    transparent 54%
  );
  transform: translateY(-100%);
  animation: scanline 1.9s linear infinite;
}

.preloader.is-flaring .preloader__terminal {
  animation: terminalFlare 680ms var(--ease-out-expo) forwards;
}

.preloader.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: scale(1.08);
}

.route-curtain {
  inset: 0;
  z-index: 40;
  background:
    linear-gradient(90deg, rgba(245, 242, 255, 0.03), rgba(123, 44, 191, 0.26)),
    rgba(7, 8, 15, 0.54);
  backdrop-filter: blur(50px);
  transform: translateX(-110%) skewX(-7deg);
  box-shadow: 32px 0 100px rgba(123, 44, 191, 0.28);
}

.route-curtain.is-sweeping {
  animation: glassCurtain 1080ms var(--ease-out-expo) forwards;
}

/* ================================
   Cursor / Magnetic Text
================================ */
.custom-cursor {
  top: 0;
  left: 0;
  z-index: 80;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  mix-blend-mode: difference;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0) scale(0.7);
  transition:
    opacity 220ms ease,
    width 260ms var(--ease-fluid),
    height 260ms var(--ease-fluid),
    margin 260ms var(--ease-fluid),
    border-color 260ms ease;
}

.custom-cursor__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

body.has-custom-cursor .custom-cursor {
  opacity: 1;
}

.custom-cursor.is-active {
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-color: rgba(98, 246, 255, 0.9);
}

.magnetic-text {
  display: inline-block;
  transform-style: preserve-3d;
  will-change: transform, filter;
}

/* ================================
   Home / Hero
================================ */
.route-view--home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 310px);
  align-items: end;
  gap: clamp(24px, 6vw, 84px);
}

.hero {
  align-self: center;
  width: min(100%, 1120px);
  padding-top: 8vh;
}

.hero__kicker,
.eyebrow {
  margin: 0 0 22px;
  color: rgba(98, 246, 255, 0.74);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__title {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --shadow-x: 10px;
  --shadow-y: 10px;
  position: relative;
  margin: 0;
  max-width: 11ch;
  color: #fff;
  font-size: clamp(4.4rem, 11.8rem, 16.8rem);
  font-weight: 950;
  line-height: 0.78;
  letter-spacing: 0;
  text-transform: uppercase;
  transform:
    perspective(900px)
    rotateX(var(--tilt-x))
    rotateY(var(--tilt-y));
  text-shadow:
    calc(var(--shadow-x) * 0.14) calc(var(--shadow-y) * 0.14) 0 rgba(98, 246, 255, 0.7),
    calc(var(--shadow-x) * 0.28) calc(var(--shadow-y) * 0.28) 0 rgba(123, 44, 191, 0.72),
    calc(var(--shadow-x) * 0.44) calc(var(--shadow-y) * 0.44) 0 rgba(10, 17, 40, 0.88),
    calc(var(--shadow-x) * 0.72) calc(var(--shadow-y) * 0.72) 44px rgba(123, 44, 191, 0.5);
  transform-style: preserve-3d;
  will-change: transform, text-shadow;
}

.hero__title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 242, 255, 0.12);
  transform: translate3d(0.04em, 0.06em, -80px);
  filter: blur(1px);
}

.hero__copy,
.section-copy {
  max-width: 670px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.72;
}

.vault-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 28px;
}

.vault-stats div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(245, 242, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 7, 13, 0.48);
  backdrop-filter: blur(18px);
}

.vault-stats strong {
  display: block;
  color: #fff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1.38rem;
  line-height: 1;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.button {
  display: inline-grid;
  place-items: center;
  padding: 0 22px;
  font-weight: 850;
}

.button--primary {
  background:
    linear-gradient(135deg, rgba(123, 44, 191, 1), rgba(98, 246, 255, 0.22)),
    #7528b8;
  color: #fff;
  box-shadow:
    0 20px 70px rgba(123, 44, 191, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.button--ghost {
  border: 1px solid var(--hairline);
  background: rgba(245, 242, 255, 0.055);
  color: rgba(245, 242, 255, 0.78);
  backdrop-filter: blur(18px);
}

.signal-panel {
  align-self: end;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: rgba(5, 7, 13, 0.56);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px);
}

.signal-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(245, 242, 255, 0.1);
  color: rgba(245, 242, 255, 0.54);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.signal-panel__header strong {
  color: rgba(98, 246, 255, 0.86);
  font-weight: 850;
}

.signal-panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(245, 242, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.signal-panel__row strong {
  color: #fff;
}

.signal-panel__bar {
  height: 4px;
  margin: 11px 0 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(245, 242, 255, 0.1);
}

.signal-panel__bar span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--neon), var(--cyan));
  box-shadow: 0 0 24px rgba(98, 246, 255, 0.42);
}

.waveform {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 5px;
  height: 58px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(245, 242, 255, 0.1);
}

.waveform span {
  display: block;
  height: var(--h);
  min-height: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(98, 246, 255, 0.86), rgba(123, 44, 191, 0.34));
  box-shadow: 0 0 20px rgba(98, 246, 255, 0.22);
  animation: waveformLift 1.8s ease-in-out infinite alternate;
  animation-delay: calc(var(--h) * -0.018);
}

.hero__telemetry {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 10px;
  width: min(100%, 560px);
  margin-top: 34px;
}

.hero__telemetry div {
  position: relative;
  overflow: hidden;
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(245, 242, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 242, 255, 0.075), rgba(245, 242, 255, 0.018)),
    rgba(5, 7, 13, 0.48);
  backdrop-filter: blur(18px);
}

.hero__telemetry div::after {
  content: "";
  position: absolute;
  inset: auto 12px 10px;
  height: 1px;
  background: linear-gradient(90deg, rgba(98, 246, 255, 0.75), transparent);
  opacity: 0.64;
}

.hero__telemetry span,
.vault-stats span,
.service-tile span {
  color: rgba(98, 246, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 860;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__telemetry strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1.42rem;
}

.home-system {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(24px, 5vw, 68px);
  align-items: start;
  margin-top: clamp(50px, 10vh, 120px);
  padding: clamp(26px, 5vw, 54px) 0 4px;
  border-top: 1px solid rgba(245, 242, 255, 0.1);
}

.home-system__title {
  margin: 0;
  max-width: 540px;
  color: #fff;
  font-size: clamp(2.1rem, 4.1rem, 5.4rem);
  font-weight: 940;
  line-height: 0.96;
  letter-spacing: 0;
}

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

.service-tile {
  position: relative;
  overflow: hidden;
  min-height: 198px;
  padding: 20px;
  border: 1px solid rgba(245, 242, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018)),
    rgba(6, 8, 16, 0.54);
  backdrop-filter: blur(22px);
}

.service-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent, rgba(98, 246, 255, 0.08), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 42px);
  opacity: 0;
  transform: translateX(-20%);
  transition:
    opacity 360ms ease,
    transform 700ms var(--ease-out-expo);
}

.service-tile:hover::before {
  opacity: 1;
  transform: translateX(20%);
}

.service-tile h3 {
  position: relative;
  margin: 26px 0 12px;
  color: #fff;
  font-size: 1.28rem;
  line-height: 1.08;
}

.service-tile p {
  position: relative;
  margin: 0;
  color: rgba(245, 242, 255, 0.62);
  line-height: 1.58;
}

/* ================================
   Vault
================================ */
.route-view--vault {
  min-height: 100vh;
}

.vault-layout {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: clamp(28px, 7vw, 100px);
  align-items: start;
}

.vault-intro {
  position: sticky;
  top: calc(var(--header-h) + 42px);
}

.section-title {
  margin: 0;
  max-width: 720px;
  color: #fff;
  font-size: clamp(2.6rem, 5.8rem, 7.2rem);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: 0;
}

.project-columns {
  display: grid;
  gap: 18px;
  padding-bottom: 16vh;
}

.project-category {
  padding: 22px 0 26px;
  border-top: 1px solid var(--hairline);
}

.project-category__label {
  margin: 0 0 18px;
  color: rgba(98, 246, 255, 0.64);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-link {
  position: relative;
  display: block;
  width: 100%;
  padding: 13px 0 16px;
  background: transparent;
  color: rgba(245, 242, 255, 0.86);
  font-size: clamp(2rem, 4.8rem, 6.5rem);
  font-weight: 920;
  line-height: 0.9;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

.project-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(123, 44, 191, 0.82), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 460ms var(--ease-fluid);
}

.project-link:hover::after,
.project-link:focus-visible::after {
  transform: scaleX(1);
}

.project-preview {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 11;
  width: min(54vw, 760px);
  aspect-ratio: 1.55;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72) rotate(-2deg);
  transition:
    opacity 260ms ease,
    transform 620ms var(--ease-out-expo);
  filter: url("#liquid-shatter") drop-shadow(0 32px 90px rgba(0, 0, 0, 0.62));
}

.project-preview.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

.project-preview canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(245, 242, 255, 0.18);
  border-radius: 8px;
  background: #07080d;
}

.project-preview__meta {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.project-preview__meta span {
  color: rgba(245, 242, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-preview__meta strong {
  max-width: 60%;
  font-size: clamp(1.2rem, 1.9rem, 2.2rem);
  line-height: 0.95;
  text-align: right;
  text-transform: uppercase;
}

/* ================================
   Vault 2.0 / Case Command Room
================================ */
.route-view--vault {
  overflow: visible;
  padding-bottom: 32px;
}

.vault-command {
  position: relative;
  z-index: 2;
}

.vault-command::before {
  content: "";
  position: absolute;
  inset: -6vh -5vw auto;
  height: 44vh;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(123, 44, 191, 0.16), transparent 36%, rgba(98, 246, 255, 0.08)),
    repeating-linear-gradient(90deg, rgba(245, 242, 255, 0.035) 0 1px, transparent 1px 86px);
  mask-image: linear-gradient(180deg, #000, transparent);
}

.vault-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: clamp(24px, 5vw, 68px);
  align-items: end;
  margin-bottom: 26px;
}

.vault-hero .section-title {
  max-width: 980px;
}

.vault-toolbar {
  position: sticky;
  top: calc(var(--header-h) + 10px);
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  margin-bottom: 24px;
  padding: 7px;
  border: 1px solid rgba(245, 242, 255, 0.13);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.62);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(24px);
}

.vault-filter {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 242, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 850;
  transition:
    transform 260ms var(--ease-fluid),
    background 260ms ease,
    color 260ms ease,
    box-shadow 260ms ease;
}

.vault-filter:hover,
.vault-filter.active {
  color: #fff;
  background: rgba(245, 242, 255, 0.1);
  box-shadow:
    inset 0 0 26px rgba(123, 44, 191, 0.2),
    0 0 0 1px rgba(98, 246, 255, 0.08);
}

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

.vault-filter-readout {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-left: 1px solid rgba(245, 242, 255, 0.12);
  color: rgba(98, 246, 255, 0.78);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.vault-showcase {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: start;
}

.project-deck {
  display: grid;
  gap: 10px;
  min-height: 640px;
}

.project-deck .project-link {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 86px;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(245, 242, 255, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(245, 242, 255, 0.07), transparent 50%),
    rgba(5, 7, 13, 0.52);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  text-transform: none;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px);
  transition:
    opacity 360ms ease,
    transform 420ms var(--ease-out-expo),
    border-color 260ms ease,
    background 260ms ease;
}

.project-deck .project-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(98, 246, 255, 0.14), transparent 34%),
    linear-gradient(90deg, rgba(123, 44, 191, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 320ms ease;
}

.project-deck .project-link::after {
  display: none;
}

.project-deck .project-link:hover,
.project-deck .project-link.active {
  transform: translateX(10px);
  border-color: rgba(98, 246, 255, 0.32);
  background:
    linear-gradient(120deg, rgba(98, 246, 255, 0.1), rgba(123, 44, 191, 0.09)),
    rgba(7, 9, 18, 0.72);
}

.project-deck .project-link:hover::before,
.project-deck .project-link.active::before {
  opacity: 1;
}

.project-deck .project-link.is-hidden {
  display: none;
}

.project-link__index {
  position: relative;
  color: rgba(98, 246, 255, 0.72);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  font-weight: 900;
}

.project-link__body {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.project-link__category {
  color: rgba(98, 246, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 880;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-link__body strong {
  color: #fff;
  font-size: clamp(1.34rem, 2.05rem, 2.7rem);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-link__body small {
  color: rgba(245, 242, 255, 0.56);
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.35;
}

.project-link__signal {
  position: relative;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(245, 242, 255, 0.1);
}

.project-link__signal i {
  display: block;
  width: var(--level);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--neon), var(--cyan));
  box-shadow: 0 0 18px rgba(98, 246, 255, 0.5);
}

.vault-case-panel {
  position: sticky;
  top: calc(var(--header-h) + 86px);
  display: grid;
  gap: 14px;
  min-height: 720px;
  isolation: isolate;
}

.vault-case-panel::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  border: 1px solid rgba(245, 242, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(245, 242, 255, 0.055), transparent 32%),
    linear-gradient(120deg, rgba(98, 246, 255, 0.055), transparent 54%),
    rgba(3, 3, 3, 0.28);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.vault-panel-top {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
}

.vault-panel-top > div,
.case-score {
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(245, 242, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(98, 246, 255, 0.075), transparent 54%),
    rgba(5, 7, 13, 0.62);
  backdrop-filter: blur(20px);
}

.vault-panel-top > div:first-child {
  flex: 1;
}

.vault-panel-top span,
.case-score span {
  color: rgba(98, 246, 255, 0.7);
  font-size: 0.7rem;
  font-weight: 880;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.vault-panel-top strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  line-height: 1;
}

.case-score {
  display: grid;
  place-items: center;
  min-width: 96px;
  text-align: center;
}

.case-score strong {
  margin: 0 0 4px;
  color: #fff;
  font-size: 1.76rem;
  font-weight: 950;
  text-shadow: 0 0 22px rgba(98, 246, 255, 0.44);
}

.vault-stage {
  --stage-a: #7b2cbf;
  --stage-b: #62f6ff;
  --stage-c: #101735;
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(245, 242, 255, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 24%, color-mix(in srgb, var(--stage-b) 28%, transparent), transparent 28%),
    radial-gradient(circle at 18% 78%, color-mix(in srgb, var(--stage-a) 32%, transparent), transparent 32%),
    linear-gradient(135deg, var(--stage-c), #030303 64%);
  box-shadow:
    0 44px 140px rgba(0, 0, 0, 0.42),
    inset 0 0 70px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
}

.vault-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vault-stage::before,
.vault-stage::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(245, 242, 255, 0.13);
  transform: rotate(-12deg);
}

.vault-stage::before {
  top: 13%;
  left: 12%;
  width: 54%;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 32px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.vault-stage::after {
  right: 11%;
  bottom: 14%;
  width: 28%;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(98, 246, 255, 0.18), transparent),
    rgba(3, 3, 3, 0.38);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.42);
}

.vault-stage__glass {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
  padding: 18px;
  border: 1px solid rgba(245, 242, 255, 0.14);
  border-radius: 8px;
  background: rgba(3, 3, 3, 0.48);
  backdrop-filter: blur(20px);
}

.vault-stage__glass span,
.vault-case-copy span,
.vault-readouts span {
  color: rgba(98, 246, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 880;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.vault-stage__glass strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: clamp(1.7rem, 2.8rem, 3.6rem);
  font-weight: 950;
  line-height: 0.9;
  text-transform: uppercase;
}

.vault-case-copy,
.vault-readouts {
  border: 1px solid rgba(245, 242, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 7, 13, 0.56);
  backdrop-filter: blur(20px);
}

.vault-case-copy {
  padding: 18px;
}

.vault-case-copy p {
  margin: 12px 0 16px;
  color: rgba(245, 242, 255, 0.74);
  font-size: 1.03rem;
  line-height: 1.62;
}

.vault-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vault-tags span {
  min-height: 30px;
  padding: 8px 10px;
  border: 1px solid rgba(245, 242, 255, 0.12);
  border-radius: 999px;
  background: rgba(245, 242, 255, 0.055);
  color: rgba(245, 242, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 800;
}

.vault-deliverables {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(245, 242, 255, 0.09);
}

.vault-deliverables span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: rgba(245, 242, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

.vault-deliverables i {
  color: rgba(98, 246, 255, 0.72);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-style: normal;
  font-size: 0.68rem;
}

.vault-readouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vault-readouts div {
  min-height: 88px;
  padding: 14px;
  border-right: 1px solid rgba(245, 242, 255, 0.1);
}

.vault-readouts div:last-child {
  border-right: 0;
}

.vault-readouts strong {
  display: block;
  margin-top: 10px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.22;
}

.vault-open-case {
  width: 100%;
  min-height: 54px;
}

.project-preview {
  width: min(58vw, 880px);
  mix-blend-mode: normal;
  pointer-events: none;
}

/* ================================
   Deep Dive
================================ */
.deep-dive {
  --case-a: #7b2cbf;
  --case-b: #62f6ff;
  --case-c: #101735;
  position: fixed;
  inset: 0;
  z-index: 25;
  overflow: hidden;
  visibility: hidden;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--case-a) 24%, transparent), transparent 46%),
    linear-gradient(180deg, color-mix(in srgb, var(--case-c) 82%, #030303), rgba(3, 3, 3, 0.98));
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 650ms var(--ease-out-expo),
    visibility 0ms linear 850ms;
}

.deep-dive.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0ms;
}

.deep-dive::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(245, 242, 255, 0.045) 0 1px,
      transparent 1px 13vw
    );
  opacity: 0.4;
}

.deep-dive::after {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 0;
  background:
    linear-gradient(118deg, transparent 0 18%, color-mix(in srgb, var(--case-b) 14%, transparent) 38%, transparent 58%),
    repeating-linear-gradient(0deg, transparent 0 42px, rgba(245, 242, 255, 0.026) 42px 43px);
  opacity: 0.7;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: deepAtmosphere 9200ms ease-in-out infinite alternate;
}

.deep-dive__close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.68);
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  backdrop-filter: blur(20px);
}

.deep-dive__hud,
.deep-dive__controls {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.deep-dive__hud {
  top: 24px;
  left: 24px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(245, 242, 255, 0.14);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.64);
  color: rgba(245, 242, 255, 0.68);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  backdrop-filter: blur(20px);
}

.deep-dive__hud span:first-child {
  color: rgba(98, 246, 255, 0.86);
}

.deep-dive__controls {
  right: 86px;
  top: 24px;
}

.deep-dive__controls button {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(245, 242, 255, 0.14);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.64);
  color: rgba(245, 242, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
  backdrop-filter: blur(20px);
  transition:
    transform 220ms var(--ease-fluid),
    color 220ms ease,
    border-color 220ms ease;
}

.deep-dive__controls button:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: rgba(98, 246, 255, 0.36);
}

.deep-dive__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 3px;
  background: rgba(245, 242, 255, 0.08);
}

.deep-dive__progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--neon), var(--cyan), #fff);
  box-shadow: 0 0 26px rgba(98, 246, 255, 0.76);
}

.deep-dive__track {
  position: relative;
  z-index: 1;
  display: flex;
  width: max-content;
  height: 100%;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.deep-panel {
  position: relative;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  padding: clamp(28px, 6vw, 80px);
}

.deep-dive [data-depth] {
  transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0) var(--depth-transform, none);
}

.deep-panel--cover {
  grid-template-columns: minmax(0, 0.98fr) minmax(320px, 0.82fr);
  gap: clamp(24px, 5vw, 78px);
  align-items: center;
  justify-items: stretch;
  place-items: initial;
  overflow: hidden;
}

.deep-cover-copy {
  position: relative;
  z-index: 2;
  align-self: end;
}

.deep-panel--cover h2 {
  max-width: 980px;
  margin: 0;
  color: #fff;
  font-size: clamp(4rem, 10rem, 13rem);
  font-weight: 950;
  line-height: 0.82;
  text-transform: uppercase;
}

.deep-cover-copy > #deepCopy {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(245, 242, 255, 0.7);
  font-size: 1.16rem;
  line-height: 1.7;
}

.deep-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.deep-meta span {
  min-height: 36px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 242, 255, 0.12);
  border-radius: 999px;
  background: rgba(245, 242, 255, 0.055);
  color: rgba(245, 242, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
  backdrop-filter: blur(16px);
}

.deep-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 780px;
  margin-top: 22px;
}

.deep-brief-grid article {
  min-height: 156px;
  padding: 18px;
  border: 1px solid rgba(245, 242, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--case-b) 10%, transparent), transparent 56%),
    rgba(5, 7, 13, 0.58);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}

.deep-brief-grid span {
  color: rgba(98, 246, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 880;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.deep-brief-grid p {
  margin: 18px 0 0;
  color: rgba(245, 242, 255, 0.82);
  font-size: 1rem;
  font-weight: 720;
  line-height: 1.5;
}

.deep-cover-visual {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: min(72vh, 680px);
  perspective: 1200px;
  transform-style: preserve-3d;
}

.deep-cover-visual::before {
  content: "";
  position: absolute;
  inset: 10% -4% 8% 2%;
  border: 1px solid rgba(245, 242, 255, 0.09);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(245, 242, 255, 0.055) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(245, 242, 255, 0.038) 0 1px, transparent 1px 48px);
  opacity: 0.6;
  transform: rotateY(-18deg) rotateX(8deg);
}

.case-hero-frame {
  position: absolute;
  display: grid;
  place-items: end start;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(245, 242, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--case-b) 18%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    color-mix(in srgb, var(--case-c) 78%, #030303);
  box-shadow:
    0 46px 120px rgba(0, 0, 0, 0.46),
    0 0 70px color-mix(in srgb, var(--case-a) 24%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform-style: preserve-3d;
  will-change: transform;
  animation: caseFrameFloat 6200ms ease-in-out infinite alternate;
}

.case-hero-frame::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 6px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--case-a) 30%, transparent), transparent 48%),
    repeating-linear-gradient(0deg, rgba(245, 242, 255, 0.08) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(245, 242, 255, 0.045) 0 1px, transparent 1px 42px);
}

.case-hero-frame::after {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, 0.24), transparent 58%);
  transform: translateX(-42%) rotate(8deg);
  animation: frameSheen 5200ms ease-in-out infinite;
}

.case-hero-frame span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 880;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 24px color-mix(in srgb, var(--case-b) 52%, transparent);
}

.case-hero-frame--main {
  top: 20%;
  left: 0;
  width: min(78%, 720px);
  aspect-ratio: 16 / 10;
  --depth-transform: rotateY(-13deg) rotateX(4deg) rotateZ(-3deg);
}

.case-hero-frame--tall {
  top: 6%;
  right: 0;
  width: min(31%, 230px);
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  --depth-transform: translateZ(100px) rotateY(-22deg) rotateZ(5deg);
  animation-delay: -1600ms;
}

.case-hero-frame--wide {
  left: 18%;
  bottom: 7%;
  width: min(64%, 520px);
  aspect-ratio: 16 / 7;
  --depth-transform: translateZ(60px) rotateY(-9deg) rotateZ(4deg);
  animation-delay: -2800ms;
}

.deep-panel--visual {
  overflow: hidden;
}

.deep-device {
  position: absolute;
  display: grid;
  place-items: end start;
  padding: 18px;
  border: 1px solid rgba(245, 242, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03)),
    rgba(7, 8, 16, 0.72);
  box-shadow:
    0 46px 130px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px);
  will-change: transform;
}

.deep-device::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 6px;
  background:
    linear-gradient(120deg, rgba(98, 246, 255, 0.16), transparent 48%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.075) 0 1px, transparent 1px 32px);
  opacity: 0.78;
}

.deep-device span {
  position: relative;
  z-index: 1;
  color: rgba(245, 242, 255, 0.76);
  font-size: 0.78rem;
  font-weight: 880;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.deep-device--browser {
  top: 16%;
  left: 10%;
  width: min(62vw, 720px);
  aspect-ratio: 16 / 10;
}

.deep-device--phone {
  top: 26%;
  right: 17%;
  width: min(26vw, 280px);
  aspect-ratio: 9 / 16;
  border-radius: 22px;
}

.deep-device--poster {
  right: 36%;
  bottom: 10%;
  width: min(38vw, 430px);
  aspect-ratio: 4 / 5;
  --depth-transform: rotate(-7deg);
}

.deep-panel--story {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
  align-items: center;
}

.story-beat {
  position: relative;
  min-height: 46vh;
  padding: 24px;
  border: 1px solid rgba(245, 242, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(98, 246, 255, 0.09), transparent 42%),
    rgba(6, 8, 16, 0.64);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(24px);
}

.story-beat::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(123, 44, 191, 0.8), transparent);
}

.story-beat span {
  color: rgba(98, 246, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-beat p {
  margin: 32px 0 0;
  color: #fff;
  font-size: 1.34rem;
  font-weight: 760;
  line-height: 1.38;
}

.floating-card,
.metric-block {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 242, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03)),
    rgba(7, 8, 16, 0.72);
  box-shadow:
    0 42px 120px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px);
  will-change: transform;
}

.floating-card span,
.metric-block span {
  color: rgba(245, 242, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.floating-card--screen {
  top: 16%;
  left: 16%;
  width: min(56vw, 560px);
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(120deg, rgba(98, 246, 255, 0.14), transparent 46%),
    repeating-linear-gradient(
      0deg,
      rgba(245, 242, 255, 0.08) 0 1px,
      transparent 1px 34px
    ),
    rgba(7, 8, 16, 0.84);
}

.floating-card--logo {
  top: 50%;
  right: 18%;
  width: min(34vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
}

.floating-card--video {
  right: 34%;
  bottom: 12%;
  width: min(42vw, 430px);
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(90deg, rgba(123, 44, 191, 0.32), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent),
    rgba(7, 8, 16, 0.84);
}

.deep-panel--metrics {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 24px;
}

.metric-block {
  position: relative;
  min-height: 44vh;
  width: min(26vw, 340px);
}

.metric-block strong {
  color: #fff;
  font-size: clamp(3.2rem, 6rem, 8rem);
  font-weight: 950;
  line-height: 0.9;
}

.deep-panel--end {
  gap: 28px;
}

.deep-panel--end p {
  margin: 0;
  color: #fff;
  font-size: clamp(2.8rem, 6.2rem, 8.5rem);
  font-weight: 950;
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
}

.deep-end-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: min(100%, 520px);
}

.deep-end-actions .button {
  flex: 1 1 220px;
}

/* ================================
   Terminal
================================ */
.route-view--terminal {
  display: grid;
  align-items: center;
}

.terminal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(24px, 6vw, 80px);
  align-items: center;
}

.terminal-window {
  overflow: hidden;
  min-height: min(64vh, 680px);
  border: 1px solid rgba(98, 246, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(245, 242, 255, 0.08), transparent 18%),
    rgba(1, 2, 5, 0.78);
  box-shadow:
    0 40px 130px rgba(0, 0, 0, 0.48),
    0 0 90px rgba(123, 44, 191, 0.14);
  backdrop-filter: blur(24px);
}

.terminal-window__top {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid rgba(245, 242, 255, 0.11);
  background: rgba(255, 255, 255, 0.04);
}

.terminal-window__top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(245, 242, 255, 0.32);
}

.terminal-window__top span:nth-child(2) {
  background: rgba(123, 44, 191, 0.76);
}

.terminal-window__top span:nth-child(3) {
  background: rgba(98, 246, 255, 0.76);
}

.terminal-window__body {
  padding: clamp(18px, 4vw, 42px);
  color: rgba(245, 242, 255, 0.78);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1.02rem;
  line-height: 1.9;
}

.terminal-brief-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(98, 246, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(98, 246, 255, 0.08), transparent),
    rgba(245, 242, 255, 0.035);
}

.terminal-brief-status span {
  color: rgba(245, 242, 255, 0.72);
}

.terminal-brief-status strong {
  color: rgba(98, 246, 255, 0.9);
}

#terminalLog {
  min-height: 360px;
  max-height: 48vh;
  overflow: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(98, 246, 255, 0.32) transparent;
}

.terminal-window__body p {
  margin: 0 0 12px;
}

.terminal-prompt {
  color: var(--cyan);
}

.terminal-live {
  color: #fff;
}

.terminal-live span::after {
  content: "_";
  color: var(--violet-hot);
  animation: blink 600ms steps(1, end) infinite;
}

.terminal-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid rgba(98, 246, 255, 0.18);
  border-radius: 8px;
  background: rgba(245, 242, 255, 0.045);
}

.terminal-input label {
  color: rgba(98, 246, 255, 0.86);
  font-weight: 850;
}

.terminal-input label::after {
  content: ">";
  margin-left: 8px;
  color: rgba(245, 242, 255, 0.46);
}

.terminal-input input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
}

.terminal-input input::placeholder {
  color: rgba(245, 242, 255, 0.34);
}

.terminal-output {
  color: rgba(245, 242, 255, 0.62);
}

.terminal-output.is-system {
  color: rgba(98, 246, 255, 0.78);
}

.terminal-output.is-result {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(123, 44, 191, 0.26);
  border-radius: 8px;
  background: rgba(123, 44, 191, 0.08);
  color: rgba(245, 242, 255, 0.74);
}

.terminal-output strong {
  color: #fff;
}

.capability-stack {
  display: grid;
  gap: 14px;
}

.brief-summary,
.capability-stack div {
  padding: 20px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: rgba(5, 7, 13, 0.54);
  backdrop-filter: blur(20px);
}

.brief-summary {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(98, 246, 255, 0.12), transparent 35%),
    linear-gradient(320deg, rgba(123, 44, 191, 0.2), transparent 42%),
    rgba(5, 7, 13, 0.66);
}

.brief-summary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(245, 242, 255, 0.035) 0 1px,
    transparent 1px 30px
  );
  opacity: 0.45;
  pointer-events: none;
}

.capability-stack .brief-panel {
  background:
    linear-gradient(140deg, rgba(123, 44, 191, 0.2), transparent 42%),
    rgba(5, 7, 13, 0.58);
}

.brief-summary > * {
  position: relative;
  z-index: 1;
}

.brief-summary span,
.capability-stack span {
  color: rgba(98, 246, 255, 0.68);
  font-size: 0.74rem;
  font-weight: 900;
}

.brief-summary strong,
.capability-stack strong {
  display: block;
  margin-top: 10px;
  color: #fff;
  font-size: 1.02rem;
}

.brief-summary p,
.capability-stack p {
  margin: 8px 0 0;
  color: rgba(245, 242, 255, 0.62);
  line-height: 1.55;
}

.brief-summary b {
  color: #fff;
  font-weight: 850;
}

.brief-readout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.brief-readout div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(245, 242, 255, 0.1);
  border-radius: 8px;
  background: rgba(245, 242, 255, 0.045);
}

.brief-readout dt {
  margin: 0 0 8px;
  color: rgba(98, 246, 255, 0.62);
  font-size: 0.68rem;
  font-weight: 880;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brief-readout dd {
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.25;
}

.brief-summary .button {
  width: 100%;
}

.brief-panel .button {
  width: 100%;
  margin-top: 16px;
}

/* ================================
   Animations
================================ */
@keyframes grainDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  20% {
    transform: translate3d(-4%, 2%, 0);
  }
  40% {
    transform: translate3d(3%, -5%, 0);
  }
  60% {
    transform: translate3d(6%, 4%, 0);
  }
  80% {
    transform: translate3d(-2%, 6%, 0);
  }
  100% {
    transform: translate3d(4%, -2%, 0);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes clickBurst {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.35);
    box-shadow: 0 0 0 0 rgba(98, 246, 255, 0.45);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(8.2);
    box-shadow: 0 0 42px 8px rgba(123, 44, 191, 0.08);
  }
}

@keyframes waveformLift {
  0% {
    transform: scaleY(0.45);
    opacity: 0.5;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes scanline {
  100% {
    transform: translateY(100%);
  }
}

@keyframes terminalFlare {
  0% {
    box-shadow:
      0 0 80px rgba(123, 44, 191, 0.25),
      inset 0 0 32px rgba(98, 246, 255, 0.04);
    transform: scale(1);
  }
  46% {
    box-shadow:
      0 0 24px rgba(255, 255, 255, 0.9),
      0 0 130px rgba(123, 44, 191, 0.82),
      0 0 240px rgba(98, 246, 255, 0.34);
    transform: scale(1.03);
  }
  100% {
    box-shadow:
      0 0 220px rgba(123, 44, 191, 0.02),
      inset 0 0 32px rgba(98, 246, 255, 0);
    transform: scale(0.92);
  }
}

@keyframes glassCurtain {
  0% {
    transform: translateX(-112%) skewX(-8deg);
  }
  46% {
    transform: translateX(0%) skewX(-4deg);
  }
  54% {
    transform: translateX(0%) skewX(-4deg);
  }
  100% {
    transform: translateX(112%) skewX(-8deg);
  }
}

@keyframes deepAtmosphere {
  0% {
    transform: translate3d(-3%, 0, 0) skewX(-2deg);
    opacity: 0.45;
  }
  100% {
    transform: translate3d(3%, -2%, 0) skewX(2deg);
    opacity: 0.78;
  }
}

@keyframes caseFrameFloat {
  0% {
    translate: 0 0;
  }
  100% {
    translate: 0 -14px;
  }
}

@keyframes frameSheen {
  0%,
  54% {
    transform: translateX(-48%) rotate(8deg);
    opacity: 0;
  }
  70% {
    opacity: 0.42;
  }
  100% {
    transform: translateX(48%) rotate(8deg);
    opacity: 0;
  }
}

/* ================================
   Responsive / Reduced Motion
================================ */
@media (max-width: 980px) {
  :root {
    --header-h: 74px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .brand {
    display: none;
  }

  .main-nav {
    justify-self: start;
  }

  .sound-toggle {
    justify-self: end;
  }

  .route-view--home,
  .vault-layout,
  .terminal-grid,
  .home-system {
    grid-template-columns: 1fr;
  }

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

  .vault-toolbar,
  .vault-case-panel {
    position: relative;
    top: auto;
  }

  .vault-case-panel {
    min-height: auto;
  }

  .project-deck {
    min-height: auto;
  }

  .signal-panel,
  .vault-intro {
    position: relative;
    top: auto;
  }

  .project-preview {
    width: min(84vw, 680px);
  }

  .deep-dive__controls {
    right: 82px;
  }

  .deep-panel--cover {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 22px;
  }

  .deep-cover-copy {
    align-self: center;
  }

  .deep-cover-visual {
    min-height: 38vh;
    width: min(100%, 680px);
    justify-self: center;
  }

  .case-hero-frame--main {
    top: 8%;
    width: 72%;
  }

  .case-hero-frame--tall {
    width: 24%;
  }

  .case-hero-frame--wide {
    bottom: 2%;
    width: 58%;
  }

  .deep-panel--metrics {
    grid-template-columns: 1fr;
  }

  .deep-panel--story {
    grid-template-columns: 1fr;
  }

  .metric-block {
    min-height: 22vh;
    width: min(74vw, 520px);
  }

  .story-beat {
    min-height: 24vh;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-inline: 12px;
  }

  .main-nav {
    gap: 2px;
    width: min(100%, 280px);
  }

  .nav-link {
    flex: 1;
    padding: 0 10px;
    font-size: 0.76rem;
  }

  .sound-toggle {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .sound-toggle span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .route-view {
    padding-inline: 16px;
  }

  .hero {
    padding-top: 4vh;
  }

  .hero__title {
    font-size: clamp(4rem, 5.2rem, 7rem);
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__telemetry,
  .service-matrix,
  .vault-stats {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .project-link {
    font-size: clamp(2.15rem, 3.2rem, 5rem);
    overflow-wrap: anywhere;
  }

  .project-preview {
    top: 70%;
    width: calc(100vw - 28px);
  }

  .vault-toolbar {
    width: 100%;
    border-radius: 8px;
  }

  .vault-filter-readout {
    flex: 1 1 100%;
    border-top: 1px solid rgba(245, 242, 255, 0.1);
    border-left: 0;
  }

  .vault-filter {
    flex: 1 1 44%;
  }

  .project-deck .project-link {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 128px;
  }

  .project-link__signal {
    grid-column: 1 / -1;
  }

  .vault-stage {
    min-height: 360px;
  }

  .vault-readouts {
    grid-template-columns: 1fr;
  }

  .vault-readouts div {
    border-right: 0;
    border-bottom: 1px solid rgba(245, 242, 255, 0.1);
  }

  .vault-readouts div:last-child {
    border-bottom: 0;
  }

  .project-preview__meta {
    align-items: start;
    flex-direction: column;
  }

  .project-preview__meta strong {
    max-width: 100%;
    text-align: left;
  }

  .deep-panel--cover h2,
  .deep-panel--end p {
    font-size: clamp(3.2rem, 4.6rem, 6rem);
  }

  .deep-panel {
    padding: 112px 16px 34px;
  }

  .deep-panel--cover {
    align-content: start;
    overflow-y: auto;
  }

  .deep-cover-copy > #deepCopy {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .deep-meta {
    gap: 7px;
    margin-top: 14px;
  }

  .deep-meta span {
    min-height: 30px;
    padding: 8px 10px;
    font-size: 0.68rem;
  }

  .deep-brief-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
  }

  .deep-brief-grid article {
    min-height: auto;
    padding: 14px;
  }

  .deep-brief-grid p {
    margin-top: 10px;
    font-size: 0.9rem;
  }

  .deep-cover-visual {
    min-height: 30vh;
  }

  .case-hero-frame {
    padding: 12px;
  }

  .case-hero-frame span {
    font-size: 0.64rem;
  }

  .deep-dive__hud {
    right: 78px;
    left: 12px;
    overflow: hidden;
  }

  .deep-dive__hud span:last-child {
    display: none;
  }

  .deep-dive__controls {
    top: 78px;
    right: 12px;
    left: 12px;
  }

  .deep-dive__controls button {
    flex: 1;
  }

  .floating-card--screen,
  .floating-card--video,
  .deep-device--browser,
  .deep-device--poster {
    width: 76vw;
  }

  .floating-card--logo,
  .deep-device--phone {
    width: 48vw;
  }

  .terminal-input {
    grid-template-columns: 1fr;
  }

  .brief-readout {
    grid-template-columns: 1fr;
  }
}

@media (pointer: coarse) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button {
    cursor: auto;
  }

  .custom-cursor {
    display: none;
  }
}

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

  .fluid-canvas {
    opacity: 0.38;
  }

  .rift-canvas,
  .spectral-vignette {
    opacity: 0.28;
  }
}
