:root {
  --background: #010612;
  --foreground: #eef6ff;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-geist-sans), Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.lab-shell {
  --bg: #010612;
  --bg-deep: #020817;
  --panel: rgba(5, 15, 38, 0.86);
  --panel-strong: rgba(5, 15, 39, 0.96);
  --panel-soft: rgba(11, 26, 58, 0.62);
  --text: #eef6ff;
  --text-soft: #a8b9d6;
  --muted: #7384a4;
  --cyan: #37ddff;
  --cyan-soft: #a1f8ff;
  --blue: #247dff;
  --violet: #8b5cff;
  --green: #35efb6;
  --line: rgba(59, 192, 255, 0.34);
  --surface: var(--panel);
  --surface-strong: var(--panel-strong);
  --surface-soft: var(--panel-soft);
  --line-strong: rgba(67, 219, 255, 0.58);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 18px;
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 36%, rgba(20, 81, 200, 0.2), transparent 32%),
    radial-gradient(circle at 50% 57%, rgba(45, 17, 142, 0.15), transparent 37%),
    linear-gradient(180deg, #01050e 0%, var(--bg) 45%, #020919 100%);
  color: var(--text);
  transition: color 300ms ease, background 300ms ease;
}

.v54-content {
  position: relative;
  z-index: 2;
  padding-top: 36px;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg-deep) 82%, transparent) 8%, var(--bg-deep));
}

.v54-content a {
  color: inherit;
  text-decoration: none;
}

.lab-shell[data-theme="light"] {
  --bg: #edf3ff;
  --bg-deep: #dfe9fb;
  --panel: rgba(247, 251, 255, 0.84);
  --panel-strong: rgba(247, 251, 255, 0.96);
  --panel-soft: rgba(229, 238, 255, 0.76);
  --text: #0b1832;
  --text-soft: #3c5279;
  --muted: #64779a;
  --line: rgba(35, 112, 218, 0.3);
  background:
    radial-gradient(circle at 50% 34%, rgba(50, 158, 255, 0.16), transparent 32%),
    radial-gradient(circle at 50% 64%, rgba(119, 88, 255, 0.11), transparent 38%),
    linear-gradient(180deg, #f8fbff 0%, #edf3ff 48%, #e6efff 100%);
}

.ambient-grid,
.digital-stars,
.noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ambient-grid {
  z-index: -3;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(53, 137, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 137, 255, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 82% at 50% 45%, #000 0, transparent 88%);
}

.digital-stars {
  z-index: -2;
  opacity: 0.44;
  background-image:
    radial-gradient(circle at 12% 16%, rgba(83, 223, 255, 0.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 20%, rgba(112, 92, 255, 0.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 52%, rgba(70, 217, 255, 0.7) 0 1px, transparent 1.4px),
    radial-gradient(circle at 88% 63%, rgba(45, 142, 255, 0.68) 0 1px, transparent 1.5px);
  background-size: 173px 151px, 221px 187px, 127px 143px, 197px 213px;
  animation: starDrift 24s linear infinite;
  mask-image: radial-gradient(ellipse 78% 70% at 50% 40%, #000, transparent 95%);
}

.noise {
  z-index: 20;
  opacity: 0.055;
  background-image: radial-gradient(circle, rgba(184, 239, 255, 0.9) 0 0.6px, transparent 0.75px);
  background-size: 5px 5px;
  mix-blend-mode: screen;
}

.lab-shell[data-theme="light"] .ambient-grid {
  opacity: 0.58;
  mix-blend-mode: multiply;
}

.lab-shell[data-theme="light"] .noise {
  opacity: 0.028;
  mix-blend-mode: multiply;
}

.lab-header {
  position: relative;
  z-index: 30;
  height: 90px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 28px;
  padding: 0 clamp(24px, 3.4vw, 68px);
  border-bottom: 1px solid rgba(67, 139, 255, 0.16);
  background: linear-gradient(180deg, rgba(1, 5, 15, 0.92), rgba(2, 7, 20, 0.58));
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(22px);
}

.lab-shell[data-theme="light"] .lab-header {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.94), rgba(240, 246, 255, 0.72));
  box-shadow: 0 14px 40px rgba(30, 74, 143, 0.08);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-decoration: none;
}

.brand > span:last-child {
  font-size: clamp(20px, 1.7vw, 29px);
  font-weight: 640;
  letter-spacing: -0.055em;
}

.brand strong {
  font-weight: 650;
}

.brand b {
  margin-left: 3px;
  color: var(--violet);
  font-weight: 650;
  text-shadow: 0 0 22px rgba(139, 92, 255, 0.62);
}

.cube-logo {
  position: relative;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  display: block;
  clip-path: polygon(50% 0, 90% 22%, 90% 70%, 50% 94%, 10% 70%, 10% 22%);
  background: linear-gradient(145deg, #62f1ff 4%, #297dff 49%, #9c5cff 100%);
  filter: drop-shadow(0 0 11px rgba(52, 143, 255, 0.72));
}

.cube-logo::before {
  content: "";
  position: absolute;
  inset: 3px;
  clip-path: inherit;
  background: var(--bg);
}

.cube-logo::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22%;
  bottom: 8%;
  width: 1px;
  background: linear-gradient(#69f1ff, #8d65ff);
  box-shadow: 0 0 7px #4ca4ff;
}

.cube-logo i {
  position: absolute;
  z-index: 2;
  top: 47%;
  width: 46%;
  height: 1px;
  background: #63eaff;
  box-shadow: 0 0 6px #3d9dff;
}

.cube-logo i:first-child {
  left: 10%;
  transform: rotate(29deg);
}

.cube-logo i:nth-child(2) {
  right: 10%;
  transform: rotate(-29deg);
}

.cube-logo i:nth-child(3) {
  left: 26%;
  top: 24%;
  width: 48%;
  transform: rotate(90deg);
  opacity: 0.78;
}

.cube-logo--compact {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(23px, 2.7vw, 52px);
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 460;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.main-nav a svg {
  width: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--cyan-soft);
  text-shadow: 0 0 12px rgba(55, 221, 255, 0.5);
  outline: none;
}

.lab-shell[data-theme="light"] .main-nav a:hover,
.lab-shell[data-theme="light"] .main-nav a:focus-visible {
  color: #245ec7;
  text-shadow: none;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

.theme-switch {
  position: relative;
  width: 90px;
  height: 42px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(79, 136, 230, 0.34);
  border-radius: 23px;
  background: rgba(4, 12, 31, 0.72);
  color: #7690bc;
  cursor: pointer;
}

.theme-switch span {
  position: relative;
  z-index: 2;
  font-size: 19px;
  line-height: 1;
}

.theme-switch i {
  position: absolute;
  z-index: 1;
  top: 5px;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3d8aff, #775cff);
  box-shadow: 0 0 18px rgba(47, 123, 255, 0.65);
  transition: transform 260ms ease;
}

.theme-sun {
  justify-self: start;
}

.theme-moon {
  justify-self: end;
  color: #d7e4ff;
}

.lab-shell[data-theme="light"] .theme-switch {
  background: rgba(255, 255, 255, 0.78);
  color: #35517e;
}

.lab-shell[data-theme="light"] .theme-switch i {
  transform: translateX(-46px);
  background: linear-gradient(145deg, #ffcd58, #ff8b45);
  box-shadow: 0 0 18px rgba(255, 173, 70, 0.55);
}

.nav-contact {
  min-width: 232px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 21px;
  border: 1px solid rgba(91, 120, 255, 0.78);
  border-radius: 14px;
  background: linear-gradient(110deg, rgba(106, 49, 222, 0.82), rgba(13, 76, 168, 0.92));
  box-shadow: 0 0 28px rgba(55, 85, 222, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #f2f6ff;
  font-size: 14px;
  text-decoration: none;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.nav-contact:hover,
.nav-contact:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.18);
  box-shadow: 0 0 38px rgba(68, 103, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  outline: none;
}

.nav-contact b {
  font-size: 24px;
  font-weight: 300;
}

.mobile-menu {
  width: 42px;
  height: 42px;
  display: none;
  align-content: center;
  justify-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  cursor: pointer;
}

.mobile-menu i {
  width: 18px;
  height: 1px;
  background: var(--cyan-soft);
}

.system-stage {
  position: relative;
  z-index: 1;
  min-height: calc(100svh - 90px);
  padding: 0 0 28px;
}

.core-scene {
  position: relative;
  width: 100%;
  height: clamp(650px, 70svh, 760px);
  min-height: 650px;
  isolation: isolate;
}

.core-scene::before {
  content: "";
  position: absolute;
  z-index: -2;
  left: 50%;
  bottom: 1%;
  width: min(92vw, 1420px);
  height: 30%;
  transform: translateX(-50%) perspective(420px) rotateX(63deg);
  border: 1px solid rgba(46, 125, 255, 0.17);
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at center, transparent 0 25px, rgba(58, 129, 255, 0.08) 26px 27px),
    radial-gradient(ellipse, rgba(24, 105, 255, 0.1), transparent 70%);
  mask-image: radial-gradient(ellipse, #000, transparent 72%);
}

.connections {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.connections .energy-line {
  fill: none;
  stroke: var(--line-gradient);
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}

.connections .energy-line--glow {
  stroke-width: 18;
  opacity: 0.22;
  filter: url(#energyGlow);
}

.connections .energy-line--core {
  stroke-width: 3.5;
  opacity: 0.92;
  filter: url(#energyGlow);
}

.connections .energy-line--data {
  stroke: rgba(214, 253, 255, 0.88);
  stroke-width: 1.2;
  stroke-dasharray: 2 9;
  opacity: 0.74;
  animation: dataFlow 3.8s linear infinite;
}

.connections .energy-line--pulse {
  stroke: #ffffff;
  stroke-width: 8;
  stroke-dasharray: 3 97;
  stroke-dashoffset: 100;
  filter: url(#energyGlow);
  animation: energyPulse 2.5s linear infinite;
  animation-delay: var(--pulse-delay);
}

.connections .line-active .energy-line--glow {
  stroke-width: 24;
  opacity: 0.38;
}

.connections .line-active .energy-line--core {
  stroke-width: 4.8;
  opacity: 1;
}

.connections .terminal-halo {
  opacity: 0.78;
}

.connections .terminal-ring {
  fill: rgba(4, 18, 45, 0.96);
  stroke: #a5fbff;
  stroke-width: 2.5;
  filter: url(#energyGlow);
  animation: svgPortPulse 2.1s ease-in-out infinite;
}

.connections .pulse-node {
  fill: #ffffff;
  filter: url(#energyGlow);
  animation: nodePulse 2s ease-in-out infinite;
}

.hologram-core {
  position: absolute;
  z-index: 5;
  top: 48%;
  left: 50%;
  width: clamp(510px, 39vw, 690px);
  height: clamp(500px, 45vw, 580px);
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}

.core-anchor {
  position: absolute;
  z-index: 10;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(184, 252, 255, 0.92);
  box-shadow: 0 0 8px #67efff, 0 0 22px rgba(47, 122, 255, 0.9);
  pointer-events: none;
}

.core-anchor--left { left: 35%; }
.core-anchor--right { right: 35%; }
.core-anchor--top { top: 31%; }
.core-anchor--middle { top: 47%; }
.core-anchor--bottom { top: 63%; }

.reactor-glow {
  position: absolute;
  z-index: -4;
  left: 50%;
  top: 44%;
  width: 88%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(30, 153, 255, 0.08) 0 40%, transparent 62%),
    conic-gradient(from 30deg, transparent, rgba(52, 181, 255, 0.19), transparent 18%, rgba(139, 91, 255, 0.16), transparent 45%, rgba(52, 181, 255, 0.18), transparent 74%);
  box-shadow: 0 0 100px rgba(31, 119, 255, 0.24);
  animation: reactorGlow 4s ease-in-out infinite;
}

.reactor-ring {
  position: absolute;
  z-index: -3;
  left: 50%;
  top: 43%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(63, 157, 255, 0.46);
  border-radius: 50%;
  box-shadow: inset 0 0 24px rgba(32, 101, 255, 0.1), 0 0 18px rgba(31, 112, 255, 0.12);
}

.reactor-ring::before,
.reactor-ring::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px dashed rgba(51, 211, 255, 0.17);
}

.reactor-ring::after {
  inset: 12px;
  border-width: 1px;
  border-style: dotted;
  border-color: rgba(152, 93, 255, 0.35);
}

.reactor-ring i {
  position: absolute;
  width: 18px;
  height: 5px;
  border-radius: 5px;
  background: linear-gradient(90deg, transparent, #75f3ff, transparent);
  box-shadow: 0 0 12px #2fbdff;
}

.reactor-ring i:first-child { left: 7%; top: 27%; transform: rotate(-62deg); }
.reactor-ring i:nth-child(2) { right: 4%; top: 42%; transform: rotate(82deg); }
.reactor-ring i:nth-child(3) { left: 31%; bottom: 1%; }
.reactor-ring i:nth-child(4) { right: 21%; top: 6%; transform: rotate(34deg); background: #a26eff; }

.reactor-ring--outer {
  width: 91%;
  animation: reactorSpin 23s linear infinite;
}

.reactor-ring--middle {
  width: 76%;
  border-width: 2px;
  border-color: rgba(94, 104, 255, 0.5);
  animation: reactorSpinReverse 17s linear infinite;
}

.reactor-ring--inner {
  width: 63%;
  border-style: dashed;
  border-color: rgba(66, 225, 255, 0.36);
  animation: reactorSpin 12s linear infinite;
}

.reactor-orbit {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 48%;
  border: 1px solid rgba(73, 213, 255, 0.31);
  border-radius: 50%;
  pointer-events: none;
}

.reactor-orbit::before,
.reactor-orbit::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c8fcff;
  box-shadow: 0 0 14px #3fdfff, 0 0 26px #276cff;
}

.reactor-orbit::before { left: 9%; top: 23%; }
.reactor-orbit::after { right: 11%; bottom: 18%; }

.reactor-orbit--one {
  width: 90%;
  height: 34%;
  animation: orbitTiltOne 14s linear infinite;
}

.reactor-orbit--two {
  width: 70%;
  height: 29%;
  border-style: dashed;
  border-color: rgba(145, 91, 255, 0.35);
  animation: orbitTiltTwo 10s linear infinite;
}

.hologram-webgl {
  position: absolute;
  z-index: 3;
  inset: 0 7% 1%;
  overflow: hidden;
  opacity: 1;
  filter:
    saturate(1.38)
    contrast(1.42)
    brightness(1.2)
    drop-shadow(0 0 15px rgba(61, 218, 255, 0.65))
    drop-shadow(0 0 44px rgba(37, 92, 255, 0.27));
  transition: opacity 400ms ease;
}

.hologram-experience,
.hologram-static {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hologram-static {
  z-index: 3;
  object-fit: contain;
  object-position: center 44%;
  transition: opacity 400ms ease;
  filter: saturate(1.32) contrast(1.28) brightness(1.12) drop-shadow(0 0 18px rgba(61, 218, 255, .58)) drop-shadow(0 0 44px rgba(37, 92, 255, .24));
}

.hologram-experience { pointer-events: none; }
.hologram-experience.is-ready .hologram-static { opacity: 0; }
.hologram-experience.is-poster .hologram-webgl { opacity: 0; }

.hologram-webgl::before {
  content: "";
  position: absolute;
  z-index: 4;
  left: 10%;
  right: 10%;
  top: -13%;
  height: 16%;
  background: linear-gradient(180deg, transparent, rgba(72, 219, 255, 0.12), rgba(157, 240, 255, 0.38), transparent);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: holoSweep 5.4s ease-in-out infinite;
  mask-image: radial-gradient(ellipse 46% 69% at 50% 48%, #000 0 66%, transparent 100%);
}

.hologram-webgl::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 4% 14% 8%;
  background: repeating-linear-gradient(0deg, rgba(128, 246, 255, 0.075) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: scanDrift 6.6s linear infinite;
  mask-image: radial-gradient(ellipse 50% 67% at 50% 44%, #000 0 66%, transparent 98%);
}

.hologram-webgl canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hologram-model-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--cyan);
  font: 600 8px/1 var(--font-geist-mono), monospace;
  letter-spacing: 0.22em;
}

.hologram-model-loading i {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(72, 232, 255, 0.18);
  border-top-color: rgba(111, 247, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(43, 217, 244, 0.22);
  animation: modelLoad 900ms linear infinite;
}

.hologram-fallback {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    saturate(1.12)
    contrast(1.08)
    brightness(0.98)
    drop-shadow(0 0 28px rgba(53, 220, 246, 0.52));
}

.scan-beam {
  position: absolute;
  z-index: 5;
  top: 9%;
  left: 18%;
  right: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(194, 252, 255, 0.96), transparent);
  box-shadow: 0 0 15px rgba(91, 231, 255, 0.94), 0 0 34px rgba(65, 120, 255, 0.54);
  opacity: 0.58;
  animation: beam 5.8s ease-in-out infinite;
  pointer-events: none;
}

.emitter-base {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 0.5%;
  width: 86%;
  height: 92px;
  transform: translateX(-50%);
  pointer-events: none;
}

.emitter-base::before,
.emitter-base::after,
.emitter-base i {
  content: "";
  position: absolute;
  left: 50%;
  border-radius: 50%;
  transform: translateX(-50%) rotateX(72deg);
}

.emitter-base::before {
  bottom: -18px;
  width: 100%;
  height: 105px;
  border: 3px solid rgba(61, 197, 255, 0.72);
  box-shadow: 0 0 16px rgba(52, 201, 255, 0.68), inset 0 0 16px rgba(55, 87, 255, 0.44);
}

.emitter-base::after {
  bottom: -7px;
  width: 75%;
  height: 70px;
  border: 2px solid rgba(150, 83, 255, 0.88);
  box-shadow: 0 0 14px rgba(138, 91, 255, 0.75);
}

.emitter-base i:first-child {
  bottom: 5px;
  width: 49%;
  height: 48px;
  border: 2px solid rgba(127, 244, 255, 0.8);
}

.emitter-base i:nth-child(2) {
  bottom: 18px;
  width: 24%;
  height: 27px;
  background: radial-gradient(ellipse, rgba(189, 252, 255, 0.8), rgba(32, 140, 255, 0.24) 38%, transparent 71%);
  box-shadow: 0 0 30px rgba(56, 184, 255, 0.75);
}

.emitter-base i:nth-child(3) {
  bottom: 1px;
  width: 2px;
  height: 120px;
  border-radius: 0;
  background: linear-gradient(transparent, #a8f8ff 32%, #4ea8ff 70%, transparent);
  box-shadow: 0 0 14px #5ee8ff;
  transform: translateX(-50%);
}

.identity-chip {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 2.5%;
  width: max-content;
  transform: translateX(-50%);
  padding: 9px 18px;
  border: 1px solid rgba(86, 221, 255, 0.68);
  border-radius: 2px;
  background: rgba(3, 12, 31, 0.84);
  box-shadow: 0 0 25px rgba(47, 139, 255, 0.25), inset 0 0 16px rgba(69, 206, 255, 0.08);
  text-align: center;
  backdrop-filter: blur(9px);
}

.identity-chip span,
.identity-chip b {
  display: block;
  font-family: var(--font-geist-mono), monospace;
}

.identity-chip span {
  color: #d5fbff;
  font-size: 10px;
  letter-spacing: 0.26em;
}

.identity-chip b {
  margin-top: 4px;
  color: var(--green);
  font-size: 7px;
  font-weight: 580;
  letter-spacing: 0.22em;
}

.project-grid {
  position: absolute;
  z-index: 7;
  inset: 0;
  pointer-events: none;
}

.project-card {
  position: absolute;
  width: clamp(285px, 22vw, 390px);
  min-height: 176px;
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 20px;
  padding: 25px 29px 54px 25px;
  border: 1px solid rgba(57, 147, 255, 0.72);
  clip-path: polygon(0 16px, 16px 0, 35% 0, calc(35% + 10px) 7px, calc(100% - 19px) 7px, 100% 25px, 100% calc(100% - 17px), calc(100% - 17px) 100%, 19px 100%, 0 calc(100% - 19px));
  background:
    linear-gradient(90deg, rgba(71, 214, 255, 0.5) 0 1px, transparent 1px) 22px 12px / 65px 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(82, 90, 255, 0.12) 45%, transparent) 50% 100% / 80% 1px no-repeat,
    radial-gradient(circle at 15% 50%, rgba(28, 129, 255, 0.17), transparent 38%),
    linear-gradient(120deg, rgba(8, 25, 62, 0.96), rgba(4, 13, 35, 0.88));
  box-shadow:
    0 0 28px rgba(24, 111, 255, 0.18),
    inset 0 0 42px rgba(34, 106, 255, 0.1),
    inset 3px 0 0 rgba(98, 97, 255, 0.18),
    inset 0 1px 0 rgba(151, 244, 255, 0.16);
  color: var(--text);
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
  backdrop-filter: blur(18px);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.project-card__selector {
  position: absolute;
  z-index: 8;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.project-card__selector:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.project-card:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 28px rgba(45, 210, 255, .4), inset 0 0 0 2px var(--cyan);
}

.project-open-link {
  position: absolute;
  z-index: 10;
  right: 25px;
  bottom: 15px;
  padding: 5px 8px;
  border: 1px solid rgba(73, 204, 255, 0.28);
  border-radius: 6px;
  color: var(--cyan);
  min-height: 32px;
  background: rgba(4, 13, 35, .92);
  cursor: pointer;
  font: 650 12px/1.2 var(--font-geist-mono), monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-open-link:hover,
.project-open-link:focus-visible {
  border-color: var(--cyan);
  background: rgba(45, 153, 255, 0.12);
  outline: none;
}

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

.project-card::before {
  inset: 7px;
  border-top: 1px solid rgba(114, 216, 255, 0.22);
  border-bottom: 1px solid rgba(112, 82, 255, 0.18);
  clip-path: polygon(0 0, 31% 0, 35% 100%, 100% 100%, 100% 100%, 0 100%);
}

.project-card::after {
  top: 12px;
  right: 22px;
  width: 55px;
  height: 4px;
  background: repeating-linear-gradient(90deg, #61eaff 0 4px, transparent 4px 9px);
  opacity: 0.56;
  filter: drop-shadow(0 0 5px #2f9cff);
}

.lab-shell[data-theme="light"] .project-card {
  background:
    linear-gradient(90deg, rgba(44, 127, 226, 0.55) 0 1px, transparent 1px) 22px 12px / 65px 1px no-repeat,
    radial-gradient(circle at 15% 50%, rgba(37, 138, 255, 0.14), transparent 38%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(231, 240, 255, 0.82));
  box-shadow: 0 13px 38px rgba(35, 84, 158, 0.14), inset 0 0 32px rgba(45, 114, 255, 0.06);
}

.project-card:hover,
.project-card:focus-visible,
.project-card.is-active {
  transform: none;
  border-color: rgba(115, 236, 255, 0.96);
  box-shadow:
    0 0 34px rgba(30, 143, 255, 0.31),
    0 0 52px rgba(126, 74, 255, 0.11),
    inset 0 0 43px rgba(38, 111, 255, 0.15),
    inset 3px 0 0 rgba(97, 231, 255, 0.28);
  filter: brightness(1.12);
  outline: none;
}

.project-card--left { left: clamp(22px, 4.2vw, 82px); }
.project-card--right { right: clamp(22px, 4.2vw, 82px); }
.project-card--top { top: 8%; }
.project-card--middle { top: 39%; }
.project-card--bottom { top: 70%; }

.project-card__frame {
  position: absolute;
  inset: 4px;
  border-left: 1px solid rgba(160, 102, 255, 0.65);
  border-right: 1px solid rgba(67, 215, 255, 0.4);
  clip-path: inherit;
  pointer-events: none;
}

.project-index {
  position: absolute;
  top: 28px;
  left: 22px;
  color: #4bdcff;
  font: 650 11px/1 var(--font-geist-mono), monospace;
  letter-spacing: 0.08em;
}

.project-icon {
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(64, 203, 255, 0.64);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(48, 101, 255, 0.22), rgba(5, 17, 48, 0.84) 70%);
  box-shadow: 0 0 24px rgba(48, 135, 255, 0.28), inset 0 0 14px rgba(61, 200, 255, 0.13);
}

.project-icon::before,
.project-icon::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(78, 90, 255, 0.35);
  border-radius: 50%;
  border-top-color: rgba(104, 235, 255, 0.8);
  animation: iconOrbit 8s linear infinite;
}

.project-icon::after {
  inset: 7px;
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 5.5s;
}

.project-icon > span {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: #8defff;
  filter: drop-shadow(0 0 7px #3a94ff);
}

.project-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-copy {
  min-width: 0;
  display: block;
}

.project-copy strong,
.project-copy small,
.project-copy em {
  display: block;
}

.project-copy strong {
  color: var(--text);
  font-size: clamp(16px, 1.15vw, 21px);
  font-weight: 610;
  line-height: 1.15;
}

.project-copy small {
  min-height: 34px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.48;
}

.project-copy em {
  margin-top: 10px;
  color: var(--green);
  font: 650 7px/1 var(--font-geist-mono), monospace;
  font-style: normal;
  letter-spacing: 0.14em;
}

.project-copy em i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px var(--green);
}

.project-arrow {
  position: absolute;
  left: 30px;
  bottom: 18px;
  color: #a6dfff;
  font-size: 20px;
  font-weight: 280;
}

.project-wave {
  position: absolute;
  right: 22px;
  bottom: 18px;
  height: 30px;
  display: flex;
  align-items: end;
  gap: 2px;
  opacity: 0.68;
}

.project-wave i {
  width: 2px;
  height: 20%;
  background: #49e5ff;
  box-shadow: 0 0 5px rgba(71, 197, 255, 0.9);
  animation: waveBars 1.25s ease-in-out infinite alternate;
}

.project-wave i:nth-child(2n) { animation-delay: -0.33s; }
.project-wave i:nth-child(3n) { animation-delay: -0.69s; }
.project-wave i:nth-child(4n) { animation-delay: -0.96s; }

.project-port {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid #9ff9ff;
  border-radius: 50%;
  background: #071635;
  box-shadow: 0 0 7px #58deff, 0 0 25px rgba(45, 114, 255, 0.92);
  transform: translateY(-50%);
  animation: portPulse 2s ease-in-out infinite;
}

.project-card--left .project-port { right: -10px; }
.project-card--right .project-port { left: -10px; }

.project-scan {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #83f3ff, transparent);
  opacity: 0.88;
  animation: cardScan 3.6s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 10;
  width: min(920px, calc(100% - 40px));
  margin: -8px auto 0;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #5b8fc4;
  font: 650 8px/1 var(--font-geist-mono), monospace;
  letter-spacing: 0.22em;
}

.hero-eyebrow i {
  width: 62px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), var(--cyan));
  box-shadow: 0 0 8px rgba(74, 174, 255, 0.65);
}

.hero-eyebrow i:last-child {
  transform: scaleX(-1);
}

.hero-copy h1 {
  margin: 12px 0 0;
  color: var(--text);
  font-size: clamp(30px, 3vw, 47px);
  font-weight: 610;
  line-height: 1.08;
  letter-spacing: -0.042em;
  text-shadow: 0 0 30px rgba(52, 138, 255, 0.12);
}

.hero-copy h1 b {
  color: #8f68ff;
  font-weight: 650;
  text-shadow: 0 0 24px rgba(139, 92, 255, 0.34);
}

.hero-copy p {
  max-width: 820px;
  margin: 10px auto 0;
  color: var(--text-soft);
  font-size: clamp(13px, 1.1vw, 17px);
  line-height: 1.52;
}

.v19-ai-console {
  position: relative;
  z-index: 12;
  width: min(1540px, calc(100% - 64px));
  min-height: 102px;
  display: grid;
  grid-template-columns: 285px minmax(360px, 1fr) 275px;
  align-items: stretch;
  gap: 12px;
  margin: 28px auto 0;
  padding: 10px;
  border: 1px solid rgba(68, 119, 217, 0.32);
  border-radius: 17px;
  background: rgba(4, 12, 31, 0.7);
  box-shadow: 0 0 42px rgba(36, 87, 196, 0.13), inset 0 0 26px rgba(53, 121, 255, 0.035);
  backdrop-filter: blur(20px);
}

.lab-shell[data-theme="light"] .v19-ai-console {
  background: rgba(244, 248, 255, 0.74);
  box-shadow: 0 15px 45px rgba(36, 83, 155, 0.12);
}

.core-status-panel,
.mode-panel,
.assistant-panel {
  border: 1px solid rgba(60, 105, 193, 0.26);
  border-radius: 12px;
  background: linear-gradient(125deg, var(--panel-soft), rgba(7, 15, 37, 0.34));
  box-shadow: inset 0 0 25px rgba(42, 107, 255, 0.045);
}

.lab-shell[data-theme="light"] .core-status-panel,
.lab-shell[data-theme="light"] .mode-panel,
.lab-shell[data-theme="light"] .assistant-panel {
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.82), rgba(226, 237, 255, 0.68));
}

.core-status-panel {
  display: flex;
  align-items: center;
  gap: 19px;
  padding: 18px 21px;
}

.core-status-panel > span:last-child {
  display: block;
}

.core-status-panel b,
.core-status-panel small {
  display: block;
}

.core-status-panel b {
  color: var(--text-soft);
  font: 580 9px/1 var(--font-geist-mono), monospace;
  letter-spacing: 0.1em;
}

.core-status-panel b i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 9px var(--cyan);
}

.core-status-panel small {
  margin-top: 10px;
  color: #7b69dc;
  font-size: 12px;
}

.status-wave {
  width: 61px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-left: 1px solid rgba(73, 180, 255, 0.17);
  border-right: 1px solid rgba(73, 180, 255, 0.17);
  background: linear-gradient(180deg, transparent, rgba(49, 126, 255, 0.09), transparent);
}

.status-wave i {
  width: 2px;
  height: 30%;
  background: linear-gradient(#6af0ff, #7558ff);
  box-shadow: 0 0 5px #3a8fff;
  animation: waveBars 1.4s ease-in-out infinite alternate;
}

.status-wave i:nth-child(2n) { animation-delay: -0.6s; }
.status-wave i:nth-child(3n) { animation-delay: -0.9s; }

.assistant-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  padding: 8px;
}

.v19-ai-consent {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 10px 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.v19-ai-consent input {
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--cyan);
}

.v19-ai-consent a { color: var(--cyan); }

.assistant-response {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 0 10px;
  overflow: visible;
}

.assistant-response > div { min-width: 0; flex: 1; }

.assistant-response > span {
  flex: 0 0 auto;
  display: grid;
  width: 22px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(71, 214, 255, 0.32);
  color: var(--cyan);
  font: 650 7px/1 var(--font-geist-mono), monospace;
}

.assistant-response p {
  min-width: 0;
  margin: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 10px;
  white-space: normal;
  line-height: 1.4;
}

.assistant-proof { display: grid; gap: 6px; margin-top: 7px; }
.assistant-proof > small { color: color-mix(in srgb, var(--cyan) 65%, var(--muted)); font: 500 7px/1.35 var(--font-geist-mono), monospace; }
.assistant-next, .assistant-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.assistant-next button, .assistant-next a, .assistant-feedback button { padding: 5px 8px; border: 1px solid rgba(71, 214, 255, .28); border-radius: 6px; color: var(--cyan); background: rgba(37, 114, 255, .06); font-size: 8px; cursor: pointer; }
.assistant-feedback span { color: var(--muted); font-size: 8px; }
.assistant-feedback button[aria-pressed="true"] { border-color: var(--green); color: var(--green); }

.command-bar {
  min-width: 0;
  height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px auto;
  align-items: center;
  border: 1px solid rgba(68, 116, 217, 0.35);
  border-radius: 11px;
  background: rgba(3, 10, 28, 0.72);
  box-shadow: inset 0 0 22px rgba(35, 93, 219, 0.05);
}

.lab-shell[data-theme="light"] .command-bar {
  background: rgba(255, 255, 255, 0.76);
}

.command-bar input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  caret-color: var(--cyan);
  font-size: 13px;
}

.command-bar input::placeholder {
  color: var(--muted);
}

.command-spark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(100, 93, 255, 0.32);
  border-radius: 50%;
  color: #a583ff;
  text-shadow: 0 0 8px #704dff;
}

.command-bar button {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-right: 5px;
  padding: 0 12px 0 22px;
  border: 1px solid rgba(100, 123, 255, 0.8);
  border-radius: 10px;
  background: linear-gradient(115deg, rgba(94, 50, 219, 0.96), rgba(38, 92, 222, 0.96));
  box-shadow: 0 0 20px rgba(74, 74, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #f4f6ff;
  cursor: pointer;
  transition: filter 180ms ease, transform 180ms ease;
}

.command-bar button:hover:not(:disabled),
.command-bar button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.18);
  outline: none;
}

.command-bar button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.command-bar button span {
  font-size: 12px;
}

.command-bar button b {
  font-size: 20px;
  font-weight: 350;
}

.mode-panel {
  display: grid;
  grid-template-columns: 38px 1fr 17px;
  align-items: center;
  gap: 13px;
  padding: 17px 18px;
  color: var(--text);
  text-align: left;
  cursor: default;
}

.mode-indicator {
  width: 9px;
  height: 9px;
  justify-self: center;
  border-radius: 50%;
  background: #f2b95e;
  box-shadow: 0 0 12px rgba(242, 185, 94, 0.7);
}

.mode-indicator--live { background: var(--green); box-shadow: 0 0 12px var(--green); }
.mode-indicator--fallback,
.mode-indicator--error { background: #ff7b7b; box-shadow: 0 0 12px rgba(255, 123, 123, 0.65); }

.mode-panel > span small,
.mode-panel > span b {
  display: block;
}

.mode-panel > span small {
  color: var(--muted);
  font: 600 8px/1 var(--font-geist-mono), monospace;
  letter-spacing: 0.12em;
}

.mode-panel > span b {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
}

.mode-panel > svg {
  width: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.3;
}

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

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

@keyframes starDrift {
  to { transform: translate3d(22px, 13px, 0); }
}

@keyframes dataFlow {
  to { stroke-dashoffset: -120; }
}

@keyframes energyPulse {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

@keyframes nodePulse {
  50% { opacity: 0.42; r: 7px; }
}

@keyframes svgPortPulse {
  50% { stroke-width: 3.8; opacity: 0.72; }
}

@keyframes reactorGlow {
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.035); }
}

@keyframes reactorSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes reactorSpinReverse {
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes orbitTiltOne {
  from { transform: translate(-50%, -50%) rotate(-8deg) rotateX(70deg) rotateZ(0); }
  to { transform: translate(-50%, -50%) rotate(-8deg) rotateX(70deg) rotateZ(360deg); }
}

@keyframes orbitTiltTwo {
  from { transform: translate(-50%, -50%) rotate(52deg) rotateX(72deg) rotateZ(0); }
  to { transform: translate(-50%, -50%) rotate(52deg) rotateX(72deg) rotateZ(-360deg); }
}

@keyframes scanDrift {
  to { transform: translateY(12px); }
}

@keyframes holoSweep {
  0%, 12% { transform: translateY(0); opacity: 0; }
  22% { opacity: 0.8; }
  78% { opacity: 0.65; }
  92%, 100% { transform: translateY(650%); opacity: 0; }
}

@keyframes beam {
  0%, 100% { transform: translateY(0); opacity: 0; }
  15% { opacity: 0.58; }
  78% { opacity: 0.48; }
  90% { transform: translateY(510px); opacity: 0; }
}

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

@keyframes cardScan {
  0%, 100% { transform: translateX(-35%); opacity: 0.18; }
  50% { transform: translateX(35%); opacity: 0.95; }
}

@keyframes waveBars {
  from { height: 18%; opacity: 0.45; }
  to { height: 100%; opacity: 1; }
}

@keyframes portPulse {
  50% { box-shadow: 0 0 12px #c0feff, 0 0 32px rgba(48, 111, 255, 1); }
}

@media (max-width: 1320px) {
  .lab-header {
    grid-template-columns: minmax(190px, 1fr) auto minmax(220px, 1fr);
    gap: 18px;
  }

  .main-nav {
    gap: 22px;
  }

  .main-nav a {
    font-size: 12px;
  }

  .nav-contact {
    min-width: 190px;
  }

  .project-card {
    width: clamp(275px, 21.5vw, 315px);
    grid-template-columns: 68px 1fr;
    gap: 16px;
    min-height: 160px;
    padding: 22px 22px;
  }

  .project-icon {
    width: 64px;
    height: 64px;
  }

  .project-icon > span {
    width: 35px;
    height: 35px;
  }

  .project-index {
    top: 23px;
    left: 17px;
  }

  .project-arrow {
    left: 23px;
    bottom: 13px;
  }

  .project-copy strong {
    font-size: 16px;
  }

  .project-copy small {
    font-size: 10px;
  }

  .hologram-core {
    width: min(540px, 40vw);
    height: 590px;
  }

  .v19-ai-console {
    grid-template-columns: 245px minmax(360px, 1fr) 230px;
  }
}

@media (max-width: 1180px) {
  .lab-header {
    height: 76px;
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    position: absolute;
    top: 76px;
    left: 18px;
    right: 18px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-strong);
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav a {
    justify-content: center;
    padding: 10px 8px;
  }

  .header-actions {
    grid-column: 2;
  }

  .mobile-menu {
    display: grid;
  }

  .system-stage {
    min-height: calc(100svh - 76px);
  }

  .core-scene {
    height: auto;
    min-height: 0;
    padding: 18px 18px 0;
  }

  .core-scene::before {
    top: 300px;
    bottom: auto;
    width: 90%;
    height: 180px;
  }

  .hologram-core {
    position: relative;
    top: auto;
    left: auto;
    width: min(100%, 610px);
    height: 610px;
    margin: 0 auto;
    transform: none;
  }

  .project-grid {
    position: relative;
    inset: auto;
    width: min(900px, 100%);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin: -34px auto 0;
  }

  .project-card,
  .project-card--left,
  .project-card--right,
  .project-card--top,
  .project-card--bottom {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 160px;
  }

  .project-port {
    top: -10px;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%);
  }

  .core-anchor--left,
  .core-anchor--right {
    right: auto;
  }

  .core-anchor--left.core-anchor--top { left: 34%; }
  .core-anchor--left.core-anchor--middle { left: 41%; }
  .core-anchor--left.core-anchor--bottom { left: 48%; }
  .core-anchor--right.core-anchor--top { left: 52%; }
  .core-anchor--right.core-anchor--middle { left: 59%; }
  .core-anchor--right.core-anchor--bottom { left: 66%; }

  .core-anchor--top,
  .core-anchor--middle,
  .core-anchor--bottom {
    top: 79%;
  }

  .hero-copy {
    margin-top: 26px;
  }

  .v19-ai-console {
    grid-template-columns: 1fr 1fr;
  }

  .assistant-panel {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 720px) {
  .lab-header {
    height: 70px;
    gap: 10px;
    padding: 0 15px;
  }

  .brand {
    gap: 8px;
  }

  .brand > span:last-child {
    font-size: 18px;
  }

  .cube-logo {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .main-nav {
    top: 70px;
    grid-template-columns: 1fr;
  }

  .theme-switch {
    width: 73px;
    height: 38px;
  }

  .theme-switch i {
    top: 4px;
  }

  .lab-shell[data-theme="light"] .theme-switch i {
    transform: translateX(-29px);
  }

  .nav-contact {
    min-width: 44px;
    width: 44px;
    height: 42px;
    justify-content: center;
    padding: 0;
  }

  .nav-contact span {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .core-scene {
    padding-inline: 12px;
  }

  .hologram-core {
    height: min(128vw, 540px);
  }

  .connections,
  .project-wave,
  .project-scan {
    display: none;
  }

  .reactor-ring--outer {
    width: 96%;
  }

  .project-grid {
    grid-template-columns: 1fr;
    margin-top: -12px;
  }

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

  .hero-copy {
    width: calc(100% - 28px);
    margin-top: 30px;
  }

  .hero-copy h1 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .hero-copy p {
    font-size: 13px;
  }

  .hero-eyebrow i {
    width: 26px;
  }

  .v19-ai-console {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .assistant-panel,
  .core-status-panel,
  .mode-panel {
    grid-column: 1;
  }

  .assistant-panel {
    grid-row: 1;
  }

  .core-status-panel {
    grid-row: 2;
  }

  .mode-panel {
    grid-row: 3;
  }

  .command-bar button {
    gap: 8px;
    padding-left: 12px;
  }

  .command-bar button span {
    display: none;
  }
}

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

  .hologram-static { filter: saturate(1.12) contrast(1.16) brightness(1.08) drop-shadow(0 0 20px rgba(61, 218, 255, .42)); }
}

/* v5.6 — canonical SmirnovLab identity */
.lab-header .brand-logo {
  width: clamp(220px, 17vw, 285px);
  height: 54px;
  justify-self: start;
}

.lab-shell[data-theme="light"] .brand-logo-image--dark { display: none; }
.lab-shell[data-theme="light"] .brand-logo-image--light { display: block; }
.lab-shell:not([data-theme="light"]) .brand-logo-image--light { display: none; }
.lab-shell:not([data-theme="light"]) .brand-logo-image--dark { display: block; }

.mode-panel .brand-mark {
  width: 40px;
  height: 30px;
  flex: 0 0 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(55, 221, 255, .42));
}

.v54-content .brand-logo {
  width: 238px;
  height: 44px;
}

@media (max-width: 1120px) {
  .lab-header .brand-logo { width: 205px; }
}

@media (max-width: 760px) {
  .lab-header .brand-logo { width: 190px; height: 46px; }
}

@media (max-width: 430px) {
  .lab-header .brand-logo { width: 146px; }
  .theme-switch { width: 62px; }
  .lab-shell[data-theme="light"] .theme-switch i { transform: translateX(-18px); }
  .nav-contact { display: none; }
}

/* v37.3 — stable prerendered Digital Sergey hero + console layout */
.digital-sergey-portrait {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 45.5%;
  width: 80%;
  height: 99%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: visible;
}

.digital-sergey-portrait::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 45%;
  width: 68%;
  aspect-ratio: .78;
  transform: translate(-50%, -50%);
  border-radius: 48%;
  background: radial-gradient(ellipse, rgba(39, 182, 255, .16) 0 32%, rgba(78, 84, 255, .07) 48%, transparent 72%);
  filter: blur(18px);
}

.digital-sergey-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 48%;
  filter:
    saturate(1.08)
    contrast(1.1)
    brightness(.93)
    drop-shadow(0 0 13px rgba(72, 225, 255, .38))
    drop-shadow(0 0 34px rgba(49, 86, 255, .18));
  animation: none;
}

.portrait-scan { display: none; }

.hologram-core .reactor-ring { opacity: .62; }
.hologram-core .reactor-orbit { opacity: .58; }
.hologram-core .reactor-glow { opacity: .74; }
.hologram-core .scan-beam { opacity: .38; }

.v19-ai-console {
  width: min(1180px, calc(100% - 48px));
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 26px;
  padding: 10px;
}

.ai-console-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(0, 1fr) minmax(205px, 255px);
  align-items: stretch;
  gap: 10px;
}

.ai-console-title {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 14px 18px;
  border: 1px solid rgba(60, 105, 193, .2);
  border-radius: 12px;
  background: linear-gradient(125deg, rgba(5, 14, 35, .58), rgba(8, 22, 49, .34));
  text-align: center;
}

.lab-shell[data-theme="light"] .ai-console-title {
  background: linear-gradient(125deg, rgba(255,255,255,.82), rgba(226,237,255,.68));
}

.ai-console-title span {
  color: var(--cyan);
  font: 650 8px/1 var(--font-geist-mono), monospace;
  letter-spacing: .18em;
}

.ai-console-title strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 610;
}

.ai-console-title small {
  max-width: 520px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.core-status-panel,
.mode-panel {
  min-width: 0;
  min-height: 78px;
  padding: 14px 16px;
}

.core-status-panel { gap: 13px; }
.core-status-panel small { margin-top: 7px; font-size: 10px; line-height: 1.25; }
.status-wave { width: 48px; height: 38px; flex: 0 0 48px; }

.mode-panel {
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  gap: 10px;
}

.mode-panel > span b {
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.18;
}

.assistant-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 9px;
  padding: 12px;
}

.assistant-response {
  min-height: 48px;
  gap: 11px;
  padding: 4px 6px 2px;
}

.assistant-response > span {
  width: 28px;
  height: 24px;
  border-radius: 6px;
  font-size: 8px;
}

.assistant-response p {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.assistant-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 6px;
}

.assistant-prompts button {
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(72, 190, 255, .2);
  border-radius: 999px;
  background: rgba(32, 91, 181, .07);
  color: color-mix(in srgb, var(--text-soft) 88%, var(--cyan));
  font-size: 10px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.assistant-prompts button:hover,
.assistant-prompts button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(95, 228, 255, .5);
  background: rgba(43, 124, 225, .13);
  outline: none;
}

.command-bar {
  min-width: 0;
  min-height: 58px;
  height: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
}

.command-spark {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin-left: 3px;
}

.command-bar input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 44px;
  padding: 0 10px;
  font-size: 13px;
}

.command-bar button {
  flex: 0 0 auto;
  min-width: 132px;
  height: 44px;
  gap: 16px;
  margin-right: 0;
  padding: 0 13px 0 18px;
}

.v19-ai-consent {
  padding: 1px 7px 3px;
  font-size: 9px;
  line-height: 1.4;
}

@keyframes portraitFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -4px, 0) scale(1.008); }
}

@keyframes portraitScan {
  0%, 100% { transform: translateY(0); opacity: .12; }
  48% { opacity: .48; }
  50% { transform: translateY(315px); opacity: .6; }
  52% { opacity: .32; }
}

@media (max-width: 1180px) {
  .v19-ai-console {
    width: min(900px, calc(100% - 36px));
  }
  .ai-console-head {
    grid-template-columns: 1fr 1fr;
  }
  .ai-console-title {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 72px;
  }
  .core-status-panel { grid-column: 1; grid-row: 2; }
  .mode-panel { grid-column: 2; grid-row: 2; }
}

@media (max-width: 720px) {
  .digital-sergey-portrait { top: 46%; width: 92%; height: 98%; }
  .hologram-core .reactor-ring { opacity: .46; }
  .hologram-core .reactor-orbit { opacity: .4; }
  .portrait-scan { left: 19%; right: 19%; }

  .v19-ai-console {
    width: calc(100% - 24px);
    padding: 8px;
  }
  .ai-console-head {
    grid-template-columns: 1fr;
  }
  .ai-console-title,
  .core-status-panel,
  .mode-panel {
    grid-column: 1;
    grid-row: auto;
  }
  .ai-console-title { justify-items: start; text-align: left; padding: 13px 14px; }
  .core-status-panel, .mode-panel { min-height: 68px; }
  .assistant-panel { padding: 10px; }
  .assistant-prompts { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; scrollbar-width: none; }
  .assistant-prompts::-webkit-scrollbar { display: none; }
  .assistant-prompts button { flex: 0 0 auto; }
  .command-bar { min-height: 54px; gap: 5px; }
  .command-spark { display: none; }
  .command-bar input { height: 42px; padding-inline: 10px; font-size: 12px; }
  .command-bar button { min-width: 48px; width: 48px; height: 42px; justify-content: center; padding: 0; }
  .command-bar button span { display: none; }
  .command-bar button b { font-size: 20px; }
  .assistant-response p { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .digital-sergey-portrait img,
  .portrait-scan { animation: none !important; }
}

/* Keep the face readable: the old cross-face beam belonged to the WebGL scene. */
.hologram-core .scan-beam { display: none; }

/* Neutralize the former responsive grid placement now that the assistant is full-width. */
.v19-ai-console > .assistant-panel { grid-column: 1; grid-row: auto; }


/* v37.3 RC2 — isolate home AI console from legacy global .ai-console rules. */
.v19-ai-console {
  align-items: start;
  grid-auto-rows: max-content;
}

.v19-ai-console .assistant-panel {
  align-content: start;
  grid-auto-rows: max-content;
  height: auto;
  min-height: 0;
}

.v19-ai-console .command-bar {
  margin: 0;
  padding: 6px;
}

.v19-ai-console .command-bar input {
  width: auto;
  min-width: 0;
  padding: 0 10px;
}

.v19-ai-console .command-bar button,
.v19-ai-console .assistant-prompts button,
.v19-ai-console .assistant-next button,
.v19-ai-console .assistant-feedback button {
  margin: 0;
}

.v19-ai-console .v19-ai-consent {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 2px 7px 3px;
}

.v19-ai-console .v19-ai-consent input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 14px;
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.v19-ai-console .v19-ai-consent > span {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}
