/* ============================================================
   Youssef — Backend & Platform Engineer
   Cyberpunk · neon sky, an isometric stack tower, glitch type,
   constellations drawn from real tools, a neon sign in the rain.
   ============================================================ */

@property --p     { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --angle { syntax: "<angle>";      inherits: false; initial-value: 0deg; }

:root {
  /* void + nebula */
  --bg:        #050505;
  --bg-2:      #0B0B0B;
  --surface:   rgba(27, 27, 27, 0.55);
  --surface-2: rgba(39, 39, 39, 0.7);
  --border:    rgba(255, 255, 255, 0.08);
  --border-2:  rgba(255, 255, 255, 0.16);

  /* starlight text (all ≥ 4.5:1 on --bg) */
  --text:   #F2F2F2;
  --text-2: #A3A3A3;
  --text-3: #7D7D7D;

  /* aurora */
  --violet: #3DF5A7; /* magenta */
  --cyan:   #3DF5A7;
  --rose:   #1E7A55;
  --gold:   #3DF5A7; /* hazard yellow */
  --accent: #3DF5A7;
  --accent-ink: #04140C;
  --aurora: linear-gradient(100deg, #3DF5A7, #3DF5A7);

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Space Grotesk", system-ui, sans-serif;
  --font-serif:   "Space Grotesk", system-ui, sans-serif; /* accent = colour, not a new face */
  --font-mono:    "Space Mono", ui-monospace, monospace;

  --max: 1180px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(5.5rem, 12vw, 10rem);
  --radius: 3px;
  --cut: 18px; /* chamfer size */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* z scale */
  --z-cosmos: 0; --z-main: 1; --z-wisp: 40; --z-nav: 50; --z-toast: 80; --z-skip: 100;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 80px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
em { font-style: normal; }
::selection { background: rgba(61, 245, 167, 0.4); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: var(--z-skip);
  background: var(--text); color: var(--accent-ink);
  padding: 0.6rem 1rem; border-radius: 10px; font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* serif "incantation" accent used in titles */
.hero__line--spell, .section__title em, .contact__title em {
  font-family: var(--font-serif); font-style: italic; font-weight: 700; text-transform: uppercase;
  letter-spacing: -0.02em;
  filter: drop-shadow(0 0 18px rgba(61, 245, 167, 0.35));
  background: var(--aurora); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 9s ease-in-out infinite alternate;
  padding-right: 0.08em; /* italic overhang */
}
@keyframes shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* ============================================================
   The cosmos (fixed background)
   ============================================================ */
.cosmos { position: fixed; inset: 0; z-index: var(--z-cosmos); pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #0D0D0D 0%, var(--bg) 60%); }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.aurora { position: absolute; inset: -20% -10% auto; height: 90vh; opacity: 0.75; transition: opacity 1.2s var(--ease); }
.aurora__band { position: absolute; border-radius: 50%; mix-blend-mode: screen; will-change: transform; }
.aurora__band--1 {
  width: 70vw; height: 46vh; left: -5vw; top: 6vh;
  background: radial-gradient(closest-side, rgba(61, 245, 167, 0.22), transparent);
  animation: drift-1 22s ease-in-out infinite alternate;
}
.aurora__band--2 {
  width: 64vw; height: 52vh; right: -8vw; top: 0;
  background: radial-gradient(closest-side, rgba(61, 245, 167, 0.28), transparent);
  animation: drift-2 28s ease-in-out infinite alternate;
}
.aurora__band--3 {
  width: 50vw; height: 36vh; left: 28vw; top: 22vh;
  background: radial-gradient(closest-side, rgba(30, 122, 85, 0.16), transparent);
  animation: drift-3 34s ease-in-out infinite alternate;
}
@keyframes drift-1 { to { transform: translate3d(12vw, 6vh, 0) scale(1.15) rotate(8deg); } }
@keyframes drift-2 { to { transform: translate3d(-14vw, 8vh, 0) scale(0.9) rotate(-10deg); } }
@keyframes drift-3 { to { transform: translate3d(-8vw, -6vh, 0) scale(1.3); } }

.grain {
  position: absolute; inset: 0; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wisp { position: fixed; inset: 0; width: 100%; height: 100%; z-index: var(--z-wisp); pointer-events: none; mix-blend-mode: screen; }

body.lumos .aurora { opacity: 1; }
body.lumos .aurora__band { filter: saturate(1.5) brightness(1.4); }

/* ============================================================
   HUD header — corner brand, numbered links, scroll progress
   ============================================================ */
.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; }

.hud { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav); }
.hud::before { /* soft fade for legibility — no box */
  content: ""; position: absolute; inset: 0 0 -28px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(9, 9, 9, 0.92), rgba(9, 9, 9, 0.6) 60%, transparent);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.hud.is-scrolled::before { opacity: 1; }
.hud__progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(255, 255, 255, 0.04); }
.hud__progress span {
  display: block; height: 100%; transform-origin: left; transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, #3DF5A7, #3DF5A7 60%, #3DF5A7);
  box-shadow: 0 0 10px rgba(61, 245, 167, 0.8);
}
.hud__inner {
  position: relative; max-width: calc(var(--max) + 8rem); margin: 0 auto;
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.1rem var(--gutter);
  transition: padding 0.35s var(--ease);
}
.hud.is-scrolled .hud__inner { padding-top: 0.7rem; padding-bottom: 0.7rem; }

/* logo — neon Y with glitch offsets */
.logo { flex: none; overflow: visible; }
.logo__frame { fill: rgba(12, 12, 12, 0.85); stroke: rgba(61, 245, 167, 0.55); stroke-width: 1.2; }
.logo__y { fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: square; stroke-linejoin: miter; }
.logo__y--c { stroke: #3DF5A7; transform: translateX(-1.4px); opacity: 0.9; }
.logo__y--m { stroke: #3DF5A7; transform: translateX(1.4px); opacity: 0.9; }
.hud__brand { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; }
.hud__brand .logo { filter: drop-shadow(0 0 8px rgba(61, 245, 167, 0.45)); transition: filter 0.3s var(--ease); }
.hud__brand:hover .logo { filter: drop-shadow(0 0 14px rgba(61, 245, 167, 0.9)); }
.hud__brand:hover .logo__y--c { animation: y-glitch-c 0.45s steps(2) 2; }
.hud__brand:hover .logo__y--m { animation: y-glitch-m 0.45s steps(2) 2; }
@keyframes y-glitch-c { 50% { transform: translate(-3px, 1px); } }
@keyframes y-glitch-m { 50% { transform: translate(3px, -1px); } }
.hud__id { display: flex; flex-direction: column; line-height: 1.15; }
.hud__name { font-family: var(--font-serif); font-style: italic; font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; }
.hud__status { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.hud__dot { width: 6px; height: 6px; border-radius: 50%; background: #3DF5A7; box-shadow: 0 0 8px #3DF5A7; animation: twinkle 2s ease-in-out infinite; }

.hud__nav { display: flex; gap: 0.3rem; margin-left: auto; }
.hud__nav a {
  position: relative; display: inline-flex; align-items: baseline; gap: 0.45rem; min-height: 44px; align-items: center;
  padding: 0 0.9rem; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2);
  transition: color 0.2s var(--ease);
}
.hud__no { font-size: 0.66rem; color: var(--violet); transition: color 0.2s var(--ease); }
.hud__nav a::before, .hud__nav a::after { /* [ brackets ] slide in on hover/active */
  position: absolute; top: 50%; transform: translateY(-50%); color: var(--cyan); opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.hud__nav a::before { content: "["; left: 0; transform: translate(6px, -50%); }
.hud__nav a::after  { content: "]"; right: 0; transform: translate(-6px, -50%); }
.hud__nav a:hover, .hud__nav a.is-active { color: var(--text); }
.hud__nav a:hover::before, .hud__nav a.is-active::before,
.hud__nav a:hover::after,  .hud__nav a.is-active::after { opacity: 1; transform: translate(0, -50%); }
.hud__nav a.is-active .hud__no { color: var(--gold); }

.hud__cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: #04140C; background: var(--gold);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: filter 0.25s var(--ease);
}
.hud__cta:hover { filter: drop-shadow(0 0 12px rgba(61, 245, 167, 0.7)); }

.hud__toggle {
  display: none; margin-left: auto; min-height: 44px; padding: 0 0.9rem; gap: 0.6rem; align-items: center; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text);
  background: rgba(12, 12, 12, 0.7); border: 1px solid rgba(61, 245, 167, 0.4);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
.hud__toggle-bars { display: grid; gap: 4px; width: 16px; }
.hud__toggle-bars span { height: 1.5px; background: var(--cyan); transition: transform 0.25s var(--ease); }
.hud__toggle-bars span:last-child { width: 60%; justify-self: end; background: var(--violet); }
.hud__toggle[aria-expanded="true"] .hud__toggle-bars span:first-child { transform: translateY(2.75px) rotate(45deg); }
.hud__toggle[aria-expanded="true"] .hud__toggle-bars span:last-child { width: 100%; transform: translateY(-2.75px) rotate(-45deg); }

/* full-screen menu */
.overlay {
  position: fixed; inset: 0; z-index: calc(var(--z-nav) - 1);
  display: flex; flex-direction: column; justify-content: center; gap: 3rem;
  padding: 6rem var(--gutter) 2.5rem;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px),
    radial-gradient(80% 60% at 80% 0%, rgba(61, 245, 167, 0.18), transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(61, 245, 167, 0.14), transparent 60%),
    #050505;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.45s var(--ease), visibility 0s linear 0.45s;
}
.overlay.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.5s var(--ease), visibility 0s; }
.overlay__nav { display: flex; flex-direction: column; }
.overlay__nav a {
  display: flex; align-items: baseline; gap: 1rem; min-height: 64px; padding: 0.3rem 0;
  font-family: var(--font-serif); font-style: italic; font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.6rem, 12vw, 4.5rem); line-height: 1; letter-spacing: -0.01em; color: var(--text);
  border-bottom: 1px solid rgba(61, 245, 167, 0.12);
  opacity: 0; transform: translateX(-24px);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), color 0.2s var(--ease), text-shadow 0.2s var(--ease);
}
.overlay__nav a span { font-family: var(--font-mono); font-style: normal; font-weight: 400; font-size: 0.85rem; letter-spacing: 0.1em; color: var(--violet); }
.overlay.is-open .overlay__nav a { opacity: 1; transform: none; transition-delay: calc(0.15s + var(--i) * 0.07s), calc(0.15s + var(--i) * 0.07s), 0s, 0s; }
.overlay__nav a:hover, .overlay__nav a:focus-visible { color: var(--cyan); text-shadow: 3px 0 0 rgba(61, 245, 167, 0.7), -3px 0 0 rgba(61, 245, 167, 0.5); }
.overlay__foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.overlay__foot a { min-height: 44px; display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.06em; color: var(--text-2); }
.overlay__foot a:first-child { color: var(--gold); }

/* section rail (right edge, desktop) */
.rail {
  position: fixed; right: clamp(0.6rem, 1.5vw, 1.4rem); top: 50%; transform: translateY(-50%); z-index: var(--z-nav);
  display: flex; flex-direction: column; align-items: flex-end;
}
.rail__track { position: absolute; right: 21px; top: 22px; bottom: 22px; width: 1px; background: rgba(61, 245, 167, 0.18); z-index: -1; }
.rail__fill { display: block; width: 100%; height: 100%; transform-origin: top; transform: scaleY(var(--progress, 0)); background: linear-gradient(#3DF5A7, #3DF5A7); box-shadow: 0 0 8px rgba(61, 245, 167, 0.7); }
.rail__tick { position: relative; width: 44px; height: 44px; display: grid; place-items: center; margin: 0.35rem 0; }
.rail__tick::before { /* the marker */
  content: ""; width: 9px; height: 9px; transform: rotate(45deg);
  background: var(--bg); border: 1px solid rgba(61, 245, 167, 0.6);
  transition: background 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.3s var(--spring);
}
.rail__tick::after { /* label */
  content: attr(data-label); position: absolute; right: 44px; top: 50%; transform: translate(6px, -50%);
  white-space: nowrap; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text);
  padding: 0.25rem 0.55rem; background: rgba(12, 12, 12, 0.9); border-right: 2px solid var(--violet);
  opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.rail__tick:hover::after, .rail__tick:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.rail__tick.is-active::before { background: var(--violet); border-color: #fff; box-shadow: 0 0 12px var(--violet); transform: rotate(45deg) scale(1.25); }

@media (max-width: 1100px) { .rail { display: none; } }
@media (max-width: 820px) {
  .hud__nav, .hud__cta { display: none; }
  .hud__toggle { display: inline-flex; }
  .hud__status { display: none; }
}
@media (min-width: 821px) { .overlay { display: none; } }

/* ============================================================
   Layout
   ============================================================ */
main { position: relative; z-index: var(--z-main); }
.section { position: relative; max-width: var(--max); margin: 0 auto; padding: var(--section-y) var(--gutter); }
.section__head { max-width: 760px; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section__eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1.1rem;
}
.section__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.06;
  letter-spacing: -0.025em; color: var(--text);
}
.section__title em { font-size: 0.95em; }
.section__lead { margin-top: 1.2rem; color: var(--text-2); font-size: clamp(1.02rem, 1.6vw, 1.15rem); max-width: 60ch; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  min-height: 100svh;
  display: grid; grid-template-columns: 1.3fr 0.9fr; align-items: center; gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(7rem, 14vw, 9rem) var(--gutter) clamp(4rem, 8vw, 6rem);
}
.eyebrow {
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2);
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.5rem 1rem 0.5rem 0.8rem; border: 1px solid var(--border-2); border-radius: 2px;
  background: rgba(23, 23, 23, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.eyebrow__star {
  width: 10px; height: 10px; flex: none;
  background: var(--gold);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 6px var(--gold));
  animation: twinkle 2.6s ease-in-out infinite;
}
@keyframes twinkle { 50% { transform: scale(0.6) rotate(45deg); opacity: 0.6; } }

.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 4.1rem); line-height: 1.0;
  letter-spacing: -0.035em; margin: clamp(1.5rem, 3vw, 2rem) 0 0;
}
.hero__line { display: block; }
@media (min-width: 981px) { .hero__line:first-child { white-space: nowrap; } }
.hero__line--spell { position: relative; font-size: 0.92em; line-height: 1.02; margin-top: 0.1em; }

/* the conjuring: each line materialises left→right out of light */
.conjure {
  -webkit-mask-image: linear-gradient(100deg, #000 calc(var(--p) - 14%), rgba(0,0,0,0.35) calc(var(--p) - 4%), transparent var(--p));
          mask-image: linear-gradient(100deg, #000 calc(var(--p) - 14%), rgba(0,0,0,0.35) calc(var(--p) - 4%), transparent var(--p));
  animation: conjure 1.7s var(--ease) both;
  animation-delay: calc(var(--cd, 0) * 0.45s + 0.25s);
}
.hero__line--spell.conjure {
  animation: conjure 1.7s var(--ease) both, shimmer 9s ease-in-out infinite alternate;
  animation-delay: calc(var(--cd, 0) * 0.45s + 0.25s), 0s;
}
@keyframes conjure {
  from { --p: 0%;   filter: blur(10px); }
  60%  { filter: blur(0); }
  to   { --p: 130%; filter: blur(0); }
}

.hero__sub {
  margin-top: 1.6rem; max-width: 56ch;
  color: var(--text-2); font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.65;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.3rem; }
.hero__coords {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin-top: 2.6rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--text-3);
}
.hero__coords span::before { content: "◇ "; color: var(--violet); }

.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.6rem; border-radius: 2px;
  font-weight: 600; font-size: 0.98rem; cursor: pointer; touch-action: manipulation;
  transition: transform 0.25s var(--spring), box-shadow 0.3s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--primary { color: var(--accent-ink); background: var(--text); overflow: hidden; }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: conic-gradient(from var(--angle), #3DF5A7, #3DF5A7, #1E7A55, #3DF5A7, #3DF5A7);
  opacity: 0; transition: opacity 0.35s var(--ease);
  animation: spin-angle 4s linear infinite;
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 14px 40px -10px rgba(61, 245, 167, 0.8), 0 0 60px -20px rgba(61, 245, 167, 0.9); }
.btn--primary:hover::before { opacity: 1; }
.btn--ghost { color: var(--text); border: 1px solid var(--border-2); background: rgba(23, 23, 23, 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--violet); background: rgba(61, 245, 167, 0.08); transform: translateY(-2px); }
@keyframes spin-angle { to { --angle: 360deg; } }

/* ---------- the stack tower (isometric) ---------- */
.tower {
  --T: min(300px, 26vw);           /* slab footprint */
  --gap: calc(var(--T) * 0.36);    /* floor spacing */
  --thick: calc(var(--T) * 0.06);
  position: relative; justify-self: center;
  width: calc(var(--T) * 1.7); height: calc(var(--T) * 2.05);
}
.tower:hover { --gap: calc(var(--T) * 0.48); }
.tower__scene {
  position: absolute; left: 50%; top: 74%;
  width: var(--T); height: var(--T); margin: calc(var(--T) / -2) 0 0 calc(var(--T) / -2);
  transform-style: preserve-3d;
  transform: rotateX(calc(58deg + var(--tilt, 0deg))) rotateZ(calc(-45deg + var(--spin, 0deg)));
  transition: transform 0.9s var(--ease);
}
.tower__shadow {
  position: absolute; inset: -18%;
  background: radial-gradient(closest-side, rgba(61, 245, 167, 0.35), rgba(61, 245, 167, 0.12) 55%, transparent);
  transform: translateZ(-30px);
}
.slab {
  --i: 0; --glow: #3DF5A7;
  position: absolute; inset: calc(var(--i) * var(--T) * 0.07);
  transform: translateZ(calc(var(--i) * var(--gap)));
  transform-style: preserve-3d;
  transition: transform 0.7s var(--spring);
  transition-delay: calc(var(--i) * 40ms);
  background:
    linear-gradient(color-mix(in srgb, var(--glow) 22%, transparent) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(90deg, color-mix(in srgb, var(--glow) 22%, transparent) 1px, transparent 1px) 0 0 / 14px 14px,
    rgba(15, 15, 15, 0.88);
  border: 1.5px solid var(--glow);
  box-shadow: 0 0 22px -2px color-mix(in srgb, var(--glow) 70%, transparent), inset 0 0 26px -8px var(--glow);
}
/* side walls give each floor thickness */
.slab::before, .slab::after {
  content: ""; position: absolute;
  background:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--glow) 70%, transparent) 0 3px, transparent 3px 9px),
    color-mix(in srgb, var(--glow) 18%, #07120D);
  border: 1px solid var(--glow);
}
.slab::before { left: 0; right: 0; bottom: 0; height: var(--thick); transform-origin: bottom; transform: rotateX(90deg); }
.slab::after  { top: 0; bottom: 0; right: 0; width: var(--thick); transform-origin: right; transform: rotateY(-90deg);
  background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--glow) 60%, transparent) 0 3px, transparent 3px 9px), color-mix(in srgb, var(--glow) 12%, #07120D); }
.slab__tag {
  position: absolute; left: 8px; top: 6px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; color: var(--glow);
}
.slab__side {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--thick);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; color: #fff; white-space: nowrap;
  transform-origin: bottom; transform: rotateX(90deg) translateZ(1px);
  text-shadow: 0 0 6px var(--glow); z-index: 1;
}
.slab__chips { position: absolute; inset: 18% 12%; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 10%; }
.chip {
  width: 20%; aspect-ratio: 1;
  background: color-mix(in srgb, var(--c) 75%, white);
  -webkit-mask: var(--ico) center / contain no-repeat;
          mask: var(--ico) center / contain no-repeat;
  filter: drop-shadow(0 0 4px var(--c));
}
.packet {
  position: absolute; left: var(--x); top: var(--y); width: 6px; height: 6px; margin: -3px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 8px 2px var(--pc, #3DF5A7), 0 0 18px 4px var(--pc, #3DF5A7);
  animation: packet-rise 3.5s var(--pd, 0s) cubic-bezier(0.45, 0, 0.55, 1) infinite;
  opacity: 0;
}
@keyframes packet-rise {
  0%   { transform: translateZ(0); opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateZ(calc(var(--gap) * 3.4)); opacity: 0; }
}
.scanplane {
  position: absolute; inset: -6%;
  border: 1px solid rgba(61, 245, 167, 0.55);
  background: linear-gradient(135deg, rgba(61, 245, 167, 0.10), rgba(61, 245, 167, 0.06));
  box-shadow: 0 0 24px rgba(61, 245, 167, 0.35);
  animation: scan 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scan {
  0%, 100% { transform: translateZ(-4px); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translateZ(calc(var(--gap) * 3.3)); opacity: 1; }
  60% { opacity: 0; }
}
.beacon { /* light shaft from the roof */
  position: absolute; left: 50%; top: 50%; width: 4px; height: calc(var(--T) * 0.9); margin-left: -2px;
  background: linear-gradient(to top, rgba(61, 245, 167, 0.9), transparent);
  transform-origin: top center;
  transform: translateZ(calc(var(--gap) * 3 + 1px)) rotateX(-90deg);
  filter: blur(1px); opacity: 0.8;
  animation: beacon 2.4s ease-in-out infinite;
}
@keyframes beacon { 50% { opacity: 0.35; } }
.tower__hud {
  position: absolute; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--text-3);
  padding: 0.35rem 0.6rem; border-left: 2px solid var(--cyan); background: rgba(61, 245, 167, 0.05);
}
.tower__hud b { color: var(--cyan); font-weight: 500; }
.tower__hud--a { left: -4%; top: 52%; }
.tower__hud--b { right: 0; bottom: 6%; border-color: var(--violet); }

.scroll-cue { position: absolute; left: 50%; bottom: 1.5rem; width: 44px; height: 56px; margin-left: -22px; display: grid; place-items: center; }
.scroll-cue__line { width: 1px; height: 44px; background: linear-gradient(var(--violet), transparent); position: relative; overflow: hidden; }
.scroll-cue__line::after { content: ""; position: absolute; left: -1px; width: 3px; height: 10px; border-radius: 2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: fall 2.2s var(--ease) infinite; }
@keyframes fall { from { top: -10px; opacity: 0; } 30% { opacity: 1; } to { top: 44px; opacity: 0; } }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 6rem; }
  .tower { --T: min(220px, 50vw); order: -1; margin: -1rem 0 -1.5rem; }
  .tower__hud { display: none; }
  .scroll-cue { display: none; }
}

/* ============================================================
   Cards — holographic tarot
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; perspective: 1200px; }
.card {
  --rx: 0deg; --ry: 0deg;
  position: relative; isolation: isolate;
  background: linear-gradient(165deg, rgba(43, 43, 43, 0.6), rgba(16, 16, 16, 0.55));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), border-color 0.3s var(--ease), box-shadow 0.4s var(--ease);
}
.card.is-tilting { transition: transform 0.08s linear, border-color 0.3s var(--ease), box-shadow 0.4s var(--ease); }
.card::before { /* foil border */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1;
  background: conic-gradient(from var(--angle), transparent 0 55%, #3DF5A7 65%, #3DF5A7 75%, #1E7A55 85%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0.35; transition: opacity 0.4s var(--ease);
  animation: spin-angle 7s linear infinite;
}
.card::after { /* cursor glow */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(61, 245, 167, 0.16), transparent 60%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.card:hover { box-shadow: 0 30px 60px -30px rgba(61, 245, 167, 0.35), 0 0 0 1px rgba(61, 245, 167, 0.15); }
.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 1; }
.card__no {
  position: absolute; top: 1.1rem; right: 1.5rem;
  font-family: var(--font-serif); font-style: italic; font-size: 2.4rem; line-height: 1;
  color: rgba(61, 245, 167, 0.28); transform: translateZ(30px);
}
.card__icon {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  color: var(--cyan);
  background: radial-gradient(circle at 30% 25%, rgba(61, 245, 167, 0.22), rgba(61, 245, 167, 0.04) 70%);
  border: 1px solid rgba(61, 245, 167, 0.3);
  box-shadow: 0 0 24px -6px rgba(61, 245, 167, 0.6);
  margin-bottom: 1.5rem;
  transform: translateZ(40px);
}
.card__icon svg { width: 24px; height: 24px; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; margin-bottom: 0.6rem; transform: translateZ(24px); }
.card__body { color: var(--text-2); font-size: 0.98rem; line-height: 1.65; transform: translateZ(12px); }
.card__tag { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--border); color: var(--text-3); font-size: 0.78rem; font-family: var(--font-mono); letter-spacing: 0.04em; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* ============================================================
   Stack — icon tiles grouped by layer
   ============================================================ */
.tech { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.tech__group:nth-child(4) { grid-column: 2; grid-row: 1 / span 3; }
.tech__group {
  display: flex; flex-direction: column; gap: 1.1rem;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(61, 245, 167, 0.14);
  background: linear-gradient(160deg, rgba(27, 27, 27, 0.55), rgba(11, 11, 11, 0.6));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  clip-path: var(--chamfer);
}
.tech__head { display: grid; grid-template-columns: auto 1fr auto; column-gap: 0.8rem; align-items: baseline; }
.tech__idx { font-family: var(--font-mono); font-size: 0.8rem; color: var(--violet); letter-spacing: 0.1em; }
.tech__cat { font-family: var(--font-serif); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: 1.35rem; letter-spacing: 0.02em; color: var(--text); line-height: 1.1; }
.tech__blurb { grid-column: 2 / -1; grid-row: 2; margin-top: 0.25rem; color: var(--text-2); font-size: 0.9rem; line-height: 1.5; }
.tech__count { grid-column: 3; grid-row: 1; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }
.tech__count::before { content: "▮ "; color: var(--gold); }
.tech__count { white-space: nowrap; }

.tech__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.tech__group:nth-child(4) .tech__grid { flex: 1; grid-auto-rows: 1fr; }
.tile {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem;
  min-height: 118px; padding: 1rem 0.6rem;
  background: rgba(8, 8, 8, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.3s var(--spring);
}
.tile::before { /* brand-colored aura behind the logo */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 55% at 50% 38%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%);
  opacity: 0.7; transition: opacity 0.3s var(--ease);
}
.tile::after { /* neon underline on hover */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: color-mix(in srgb, var(--c) 70%, white);
  box-shadow: 0 0 12px var(--c);
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.tile__ico {
  width: 42px; height: 42px;
  background: color-mix(in srgb, var(--c) 65%, white);
  -webkit-mask: var(--ico) center / contain no-repeat;
          mask: var(--ico) center / contain no-repeat;
  filter: drop-shadow(0 0 0 transparent);
  transition: transform 0.35s var(--spring);
}
.tile__name { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--text); text-align: center; line-height: 1.3; }
.tile:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); background: rgba(15, 15, 15, 0.9); transform: translateY(-3px); }
.tile:hover::before { opacity: 1; }
.tile:hover::after { transform: scaleX(1); }
.tile:hover .tile__ico { transform: scale(1.12); }

@media (max-width: 980px) {
  .tech { grid-template-columns: 1fr; }
  .tech__group:nth-child(4) { grid-column: auto; grid-row: auto; }
  .tech__group:nth-child(4) .tech__grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
}
@media (max-width: 480px) {
  .tech__grid, .tech__group:nth-child(4) .tech__grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .tech__count { display: none; }
  .tile { min-height: 96px; gap: 0.55rem; padding: 0.8rem 0.3rem; }
  .tile__ico { width: 34px; height: 34px; }
  .tile__name { font-size: 0.7rem; }
}

/* ============================================================
   Contact — neon sign in the rain
   ============================================================ */
.section--contact { padding-top: calc(var(--section-y) * 1.1); padding-bottom: calc(var(--section-y) * 1.1); }
.rain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='47' height='130'%3E%3Cline x1='8' y1='0' x2='4' y2='34' stroke='%2300F0FF' stroke-opacity='.35' stroke-width='1'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='83' height='210'%3E%3Cline x1='40' y1='60' x2='34' y2='110' stroke='%23FF2BD6' stroke-opacity='.25' stroke-width='1'/%3E%3C/svg%3E");
  animation: rain 0.7s linear infinite;
  -webkit-mask: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 75%);
          mask: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 75%);
}
@keyframes rain { to { background-position: -36px 130px, -40px 210px; } }

.contact-grid { position: relative; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }

.neon {
  position: relative; cursor: default; -webkit-tap-highlight-color: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1.4rem, 4vw, 2.4rem) clamp(2rem, 4vw, 2.8rem);
  background:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px) 0 0 / 100% 22px,
    linear-gradient(160deg, #141414, #080808);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), 0 40px 80px -40px rgba(61, 245, 167, 0.5);
  -webkit-box-reflect: below 14px linear-gradient(transparent 60%, rgba(0, 0, 0, 0.28));
  transform: rotate(-2deg);
}
.neon__bolt { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #8a8aa0, #2a2a38); box-shadow: 0 1px 1px #000; }
.neon__bolt--tl { left: 10px; top: 10px; } .neon__bolt--tr { right: 10px; top: 10px; }
.neon__bolt--bl { left: 10px; bottom: 10px; } .neon__bolt--br { right: 10px; bottom: 10px; }
.neon__small { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.22em; color: var(--text-3); }

/* tubes are "off" (dim glass) until the sign powers on */
.neon__word { display: flex; gap: 0.04em; font-family: var(--font-serif); font-weight: 700; font-style: italic; font-size: clamp(4.2rem, 10vw, 8rem); line-height: 0.95; letter-spacing: 0.04em; }
.neon__word span, .neon__sub { color: #0E2A1E; text-shadow: none; transition: color 0.1s, text-shadow 0.1s; }
.neon__sub { font-family: var(--font-mono); font-weight: 500; font-size: clamp(1rem, 2.4vw, 1.4rem); letter-spacing: 0.5em; margin-right: -0.5em; color: #1C1C1C; }
.neon__arrow { width: 60%; height: 3px; margin-top: 0.8rem; border-radius: 2px; background: #103325; position: relative; }
.neon__arrow::after { content: ""; position: absolute; right: -2px; top: -6px; width: 12px; height: 12px; border-top: 3px solid; border-right: 3px solid; color: #103325; transform: rotate(45deg); }

.neon.is-on .neon__word span { animation: tube-on 1.1s steps(1) both; animation-delay: calc(var(--i) * 0.18s); }
.neon.is-on .neon__word .neon__bad { animation: tube-on 1.1s steps(1) both calc(var(--i) * 0.18s), tube-bad 6s steps(1) infinite 2.5s; }
.neon.is-on .neon__sub { animation: tube-on-cyan 1s steps(1) both 0.9s; }
.neon.is-on .neon__arrow { animation: tube-on-yellow 0.8s steps(1) both 1.4s; }
.neon.is-on .neon__arrow::after { animation: tube-on-yellow-c 0.8s steps(1) both 1.4s; }

@keyframes tube-on {
  0%, 12%, 30%, 44% { color: #0E2A1E; text-shadow: none; }
  8%, 20%, 38%, 100% { color: #E9FFF5; text-shadow: 0 0 3px #fff, 0 0 10px #3DF5A7, 0 0 22px #3DF5A7, 0 0 46px #3DF5A7, 0 0 90px rgba(61, 245, 167, 0.7); }
}
@keyframes tube-bad {
  0%, 100% { color: #E9FFF5; text-shadow: 0 0 3px #fff, 0 0 10px #3DF5A7, 0 0 22px #3DF5A7, 0 0 46px #3DF5A7, 0 0 90px rgba(61, 245, 167, 0.7); }
  70%, 73%, 76% { color: #1D4A36; text-shadow: 0 0 6px rgba(61, 245, 167, 0.3); }
  71.5%, 74.5% { color: #E9FFF5; text-shadow: 0 0 3px #fff, 0 0 10px #3DF5A7, 0 0 22px #3DF5A7; }
}
@keyframes tube-on-cyan {
  0%, 20% { color: #1C1C1C; text-shadow: none; }
  10%, 40%, 100% { color: #F2F2F2; text-shadow: 0 0 3px #fff, 0 0 8px #3DF5A7, 0 0 18px #3DF5A7, 0 0 40px #3DF5A7; }
}
@keyframes tube-on-yellow   { 0%, 25% { background: #103325; box-shadow: none; } 12%, 50%, 100% { background: #CFFFE9; box-shadow: 0 0 8px #3DF5A7, 0 0 20px #3DF5A7; } }
@keyframes tube-on-yellow-c { 0%, 25% { color: #103325; filter: none; } 12%, 50%, 100% { color: #CFFFE9; filter: drop-shadow(0 0 6px #3DF5A7); } }

.contact { position: relative; }
.contact__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.1rem, 4.8vw, 3.4rem); line-height: 1.04; letter-spacing: -0.03em; margin: 0.4rem 0 1.1rem; }
.contact__title em { font-size: 0.95em; white-space: nowrap; }
.contact__sub { color: var(--text-2); font-size: 1.08rem; margin: 0 0 1.4rem; max-width: 48ch; }
.contact__open { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.contact__open li {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text);
  padding: 0.4rem 0.75rem 0.4rem 0.6rem; border: 1px solid rgba(61, 245, 167, 0.25); background: rgba(61, 245, 167, 0.05);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.contact__open li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3DF5A7; box-shadow: 0 0 8px #3DF5A7; animation: twinkle 2s ease-in-out infinite; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: stretch; }
.contact__mail {
  position: relative; display: inline-flex; align-items: center; min-height: 56px;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem); color: var(--text);
  padding: 0 1.3rem;
  border: 1px solid var(--border-2);
  background: rgba(17, 17, 17, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: filter 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--spring);
}
.contact__mail:hover { transform: translateY(-2px); }
.contact__copy {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 56px; min-width: 56px; padding: 0 1.1rem; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #04140C; background: var(--gold); border: 0;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: filter 0.2s var(--ease), transform 0.2s var(--spring), background 0.2s var(--ease);
  touch-action: manipulation;
}
.contact__copy:hover { filter: drop-shadow(0 0 12px rgba(61, 245, 167, 0.7)); transform: translateY(-2px); }
.contact__copy:active { transform: scale(0.96); }
.contact__copy.is-done { background: #3DF5A7; }
.contact__links { display: flex; gap: 0.4rem; margin: 1.4rem 0 0 -1rem; }
.contact__links a { gap: 0.3em; color: var(--text-2); font-size: 0.92rem; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; padding: 0 1rem; transition: color 0.2s var(--ease), background 0.2s var(--ease); }
.contact__links a:hover { color: var(--cyan); background: rgba(61, 245, 167, 0.06); }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .neon { max-width: 420px; width: 100%; justify-self: center; margin-bottom: 5rem; }
}

/* ============================================================
   Footer + toast
   ============================================================ */
.footer {
  position: relative; z-index: var(--z-main);
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding: 2rem var(--gutter) 3rem; border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-3);
}
.footer__sep { color: var(--violet); margin: 0 0.4rem; }
.footer a { gap: 0.3em; min-height: 44px; display: inline-flex; align-items: center; transition: color 0.2s var(--ease); }
.footer a:hover { color: var(--text); }
.hint-touch { display: none; }
@media (hover: none) { .hint-key { display: none; } .hint-touch { display: inline; } }
@media (max-width: 420px) { .eyebrow { font-size: 0.66rem; letter-spacing: 0.08em; } }
kbd { font-family: var(--font-mono); font-size: 0.78rem; padding: 0.1rem 0.4rem; border: 1px solid var(--border-2); border-radius: 6px; color: var(--text-2); background: rgba(255,255,255,0.03); }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: var(--z-toast);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  font-family: var(--font-serif); font-style: italic; font-size: 1.25rem; color: var(--text);
  padding: 0.6rem 1.4rem; border-radius: 2px;
  background: rgba(17, 17, 17, 0.85); border: 1px solid var(--border-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 40px -8px rgba(61, 245, 167, 0.6);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--spring);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   Reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }
.no-js .reveal { opacity: 1; transform: none; filter: none; }
.card.reveal.is-visible, .no-js .card.reveal { transform: rotateX(var(--rx)) rotateY(var(--ry)); }

/* ============================================================
   Reduced motion: the sky holds still
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .conjure { -webkit-mask-image: none; mask-image: none; }
}


/* ============================================================
   CYBERPUNK LAYER — neon, chamfers, scanlines, glitch, grid floor
   ============================================================ */
:root { --chamfer: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); }

/* scanlines + vignette over the sky */
.cosmos::after {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.035) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,0.65));
  mix-blend-mode: overlay;
}

/* synthwave grid floor */
.cosmos::before {
  content: ""; position: absolute; left: -50%; right: -50%; bottom: 0; height: 60vh; z-index: 1;
  background:
    repeating-linear-gradient(90deg, rgba(61, 245, 167, 0.7) 0 2px, transparent 2px 80px),
    repeating-linear-gradient(0deg,  rgba(61, 245, 167, 0.55) 0 2px, transparent 2px 80px);
  transform: perspective(420px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask: linear-gradient(to top, #000 10%, transparent 95%);
          mask: linear-gradient(to top, #000 10%, transparent 95%);
  animation: grid-run 3.2s linear infinite;
  opacity: 0.32;
}
@keyframes grid-run { to { background-position: 0 0, 0 80px; } }

/* hero headline: neon + RGB-split glitch */
.hero__line:first-child { text-shadow: 0 0 22px rgba(61, 245, 167, 0.25); }
.hero__line--spell::before, .hero__line--spell::after {
  content: attr(data-text); position: absolute; inset: 0;
  -webkit-text-fill-color: currentColor; background: none;
  pointer-events: none; opacity: 0;
}
.hero__line--spell::before { color: #3DF5A7; animation: glitch-a 4.2s steps(1) infinite 2.4s; }
.hero__line--spell::after  { color: #3DF5A7; animation: glitch-b 4.2s steps(1) infinite 2.4s; }
@keyframes glitch-a {
  0%, 88%, 100% { opacity: 0; transform: none; clip-path: none; }
  89% { opacity: .85; transform: translate(-4px, 1px); clip-path: inset(10% 0 55% 0); }
  91% { opacity: .85; transform: translate(3px, -2px); clip-path: inset(60% 0 8% 0); }
  93% { opacity: .85; transform: translate(-2px, 0); clip-path: inset(35% 0 40% 0); }
  95% { opacity: 0; }
}
@keyframes glitch-b {
  0%, 88%, 100% { opacity: 0; transform: none; clip-path: none; }
  89% { opacity: .85; transform: translate(4px, -1px); clip-path: inset(50% 0 20% 0); }
  92% { opacity: .85; transform: translate(-3px, 2px); clip-path: inset(5% 0 70% 0); }
  94% { opacity: .85; transform: translate(2px, 0); clip-path: inset(75% 0 5% 0); }
  96% { opacity: 0; }
}

/* eyebrow / labels: HUD chips */
.eyebrow { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); border-color: rgba(61, 245, 167, 0.35); background: rgba(61, 245, 167, 0.05); color: var(--cyan); }
.section__eyebrow { color: var(--gold); text-shadow: 0 0 12px rgba(61, 245, 167, 0.45); }
.hero__coords span::before { content: "▮ "; color: var(--violet); }

/* buttons: chamfered, hazard-yellow primary */
.btn, .contact__mail { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
.btn { text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); font-size: 0.85rem; }
.btn--primary { background: var(--gold); color: #04140C; }
.btn--primary::before { background: conic-gradient(from var(--angle), #3DF5A7, #3DF5A7, #3DF5A7, #3DF5A7); }
.btn--primary:hover { box-shadow: none; filter: drop-shadow(0 0 14px rgba(61, 245, 167, 0.6)); }
.btn--ghost { border-color: rgba(61, 245, 167, 0.5); color: var(--cyan); }
.btn--ghost:hover { background: rgba(61, 245, 167, 0.08); border-color: var(--cyan); }


/* cards: chamfer + HUD corner brackets */
.card { clip-path: var(--chamfer); border-color: rgba(61, 245, 167, 0.18);
  background:
    linear-gradient(var(--cyan), var(--cyan)) left top / 18px 1.5px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) left top / 1.5px 18px no-repeat,
    linear-gradient(var(--violet), var(--violet)) right bottom / 18px 1.5px no-repeat,
    linear-gradient(var(--violet), var(--violet)) right bottom / 1.5px 18px no-repeat,
    linear-gradient(165deg, rgba(37, 37, 37, 0.6), rgba(11, 11, 11, 0.7));
}
.card__no { font-style: normal; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; color: var(--violet); top: 1.4rem; right: 2rem; text-transform: uppercase; }
.card__no::before { content: "MOD_0"; }
.card__icon { border-radius: 2px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.card__title { text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.2rem; }

/* stack — see tile rules above */

/* contact */
.contact__mail { border-color: rgba(61, 245, 167, 0.5); font-family: var(--font-mono); font-weight: 500; letter-spacing: 0; }
.contact__mail:hover { border-color: var(--gold); box-shadow: none; filter: drop-shadow(0 0 18px rgba(61, 245, 167, 0.45)); }
.contact__links a { font-family: var(--font-mono); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.08em; }
.toast { font-style: normal; font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); border-color: rgba(61, 245, 167, 0.4); }

body.lumos .cosmos::before { opacity: 0.7; animation-duration: 0.9s; }
body.lumos .hero__line--spell::before, body.lumos .hero__line--spell::after { animation-duration: 1.2s; }

@media (prefers-reduced-motion: reduce) {
  .hero__line--spell::before, .hero__line--spell::after { display: none; }
  .packet, .scanplane, .rain { display: none; }
  .neon .neon__word span, .neon .neon__word .neon__bad { color: #E9FFF5; text-shadow: 0 0 3px #fff, 0 0 10px #3DF5A7, 0 0 22px #3DF5A7, 0 0 46px #3DF5A7; animation: none !important; }
  .neon .neon__sub { color: #F2F2F2; text-shadow: 0 0 3px #fff, 0 0 8px #3DF5A7, 0 0 18px #3DF5A7; animation: none !important; }
}


/* ============================================================
   MINT THEME — refined cyber: black, one mint accent, Space type,
   crop marks, dot matrix. Overrides the neon layer above.
   ============================================================ */
:root { --accent: #3DF5A7; --accent-ink: #04140C; --mint-dim: rgba(61, 245, 167, 0.14); }
body { font-size: 17px; letter-spacing: -0.01em; }

/* type: accent is colour only — upright, sentence case, same face */
.hero__line--spell, .section__title em, .contact__title em {
  font-style: normal; font-weight: inherit; text-transform: none; letter-spacing: inherit;
  background: none; -webkit-text-fill-color: var(--accent); color: var(--accent);
  filter: none; animation: none; padding-right: 0;
}
.hero__line--spell.conjure { animation: conjure 1.7s var(--ease) both; animation-delay: calc(var(--cd, 0) * 0.45s + 0.25s); }
.hero__line--spell { font-size: 1em; margin-top: 0; }
.hero__line--spell::before, .hero__line--spell::after { display: none; }
.hero__title { font-weight: 500; letter-spacing: -0.04em; line-height: 1.02; }
.hero__line:first-child { text-shadow: none; }
.section__title, .contact__title { font-weight: 500; letter-spacing: -0.035em; }
.section__title em, .contact__title em { font-size: 1em; }
.card__title, .tech__cat, .hud__name { font-family: var(--font-display); font-style: normal; text-transform: none; letter-spacing: -0.01em; }
.card__title { font-weight: 600; font-size: 1.25rem; }
.tech__cat { font-weight: 600; font-size: 1.2rem; }
.hud__name { font-weight: 600; font-size: 1.05rem; letter-spacing: 0; }
.section__eyebrow { color: var(--accent); text-shadow: none; letter-spacing: 0.16em; font-size: 0.72rem; }
.section__eyebrow > span[aria-hidden] { display: none; }
.section__eyebrow::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 0.6rem; background: var(--accent); vertical-align: 1px; }

/* surfaces */
.cosmos { background: #050505; }
.aurora { opacity: 0.5; }
.aurora__band--1 { background: radial-gradient(closest-side, rgba(61, 245, 167, 0.10), transparent); }
.aurora__band--2 { background: radial-gradient(closest-side, rgba(61, 245, 167, 0.14), transparent); left: auto; }
.aurora__band--3 { display: none; }
.cosmos::before { display: none; }            /* no synthwave floor */
.cosmos::after { background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,0.7)); mix-blend-mode: normal; }
.grain { opacity: 0.035; }

/* buttons — solid mint, mono caps, ▸ */
.btn { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; gap: 0.9rem; border-radius: 0; min-height: 50px; }
.btn--primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn--primary::before { display: none; }
.btn--primary:hover { filter: none; box-shadow: 0 0 0 1px var(--accent), 0 10px 30px -10px rgba(61, 245, 167, 0.6); background: #5CFFBB; }
.btn__arrow { font-size: 0.7rem; transition: transform 0.25s var(--ease); }
.btn--primary:hover .btn__arrow { transform: translateX(3px); }
.btn--ghost { color: var(--text); border-color: rgba(255, 255, 255, 0.18); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.hud__cta, .contact__copy { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.hud__cta:hover, .contact__copy:hover { filter: none; background: #5CFFBB; }

/* crop marks (from the reference) */
.hero::before, .tech::before {
  content: ""; position: absolute; pointer-events: none; inset: 5.5rem calc(var(--gutter) - 1rem) 1.5rem;
  --cm: rgba(255, 255, 255, 0.35);
  background:
    linear-gradient(var(--cm), var(--cm)) left top / 14px 1px no-repeat,
    linear-gradient(var(--cm), var(--cm)) left top / 1px 14px no-repeat,
    linear-gradient(var(--cm), var(--cm)) right top / 14px 1px no-repeat,
    linear-gradient(var(--cm), var(--cm)) right top / 1px 14px no-repeat,
    linear-gradient(var(--cm), var(--cm)) left bottom / 14px 1px no-repeat,
    linear-gradient(var(--cm), var(--cm)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--cm), var(--cm)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--cm), var(--cm)) right bottom / 1px 14px no-repeat;
}
.tech { position: relative; }
.tech::before { inset: -0.9rem; }

/* hero stats (feature cards) */
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin-top: 2.8rem; max-width: 560px; }
.hero__stats li {
  position: relative; display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.9rem 1rem; background: linear-gradient(160deg, #1A1A1A, #0E0E0E); border: 1px solid rgba(255, 255, 255, 0.06);
}
.hero__stats li:first-child::before { content: ""; position: absolute; left: -1px; top: -1px; width: 40%; height: 2px; background: var(--accent); }
.hero__stats strong { font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.hero__stats span { font-size: 0.8rem; color: var(--text-2); line-height: 1.35; }

/* statement band */
.statement { position: relative; z-index: var(--z-main); max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--gutter); display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 4vw, 3rem); }
.statement__mark { font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 9vw, 7rem); line-height: 0.8; color: var(--accent); }
.statement__text { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3.6vw, 2.7rem); line-height: 1.2; letter-spacing: -0.03em; color: var(--text); max-width: 30ch; }
.statement__accent { color: var(--accent); }
@media (max-width: 560px) { .statement { grid-template-columns: 1fr; gap: 0.5rem; } .hero__stats { grid-template-columns: 1fr 1fr 1fr; } .hero__stats strong { font-size: 1.3rem; } .hero__stats span { font-size: 0.7rem; } }

/* cards — dark graphite like the reference, mint top accent */
.card { background: linear-gradient(165deg, #1C1C1C, #0E0E0E); border-color: rgba(255, 255, 255, 0.07); clip-path: none; border-radius: 0; }
.card::before { display: none; }
.card .card__accent, .card:first-child { box-shadow: inset 0 2px 0 0 transparent; }
.card::after { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(61, 245, 167, 0.08), transparent 60%); }
.card:hover { box-shadow: inset 0 2px 0 0 var(--accent), 0 30px 60px -30px rgba(0, 0, 0, 0.8); border-color: rgba(255, 255, 255, 0.12); }
.card__no { color: var(--text-3); }
.card__no::before { content: "0"; }
.card__icon { color: var(--accent); background: transparent; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: none; clip-path: none; border-radius: 0; }
.card__tag { color: var(--text-3); }

/* stack panels */
.tech__group { background: linear-gradient(160deg, #161616, #0B0B0B); border-color: rgba(255, 255, 255, 0.07); clip-path: none; }
.tech__idx { color: var(--accent); }
.tech__count { color: var(--text-3); }
.tech__count::before { color: var(--accent); }
.tile { background: #0C0C0C; border-color: rgba(255, 255, 255, 0.06); clip-path: none; }
.tile:hover { background: #121212; }

/* HUD */
.hud::before { background: linear-gradient(to bottom, rgba(5, 5, 5, 0.95), rgba(5, 5, 5, 0.7) 60%, transparent); }
.hud__progress span { background: var(--accent); box-shadow: 0 0 10px rgba(61, 245, 167, 0.6); }
.logo__frame { fill: #0A0A0A; stroke: rgba(255, 255, 255, 0.25); }
.logo__y { stroke: var(--accent); }
.hud__brand .logo { filter: none; }
.hud__brand:hover .logo { filter: drop-shadow(0 0 8px rgba(61, 245, 167, 0.6)); }
.hud__nav a { color: var(--text-2); font-size: 0.76rem; }
.hud__no { color: var(--text-3); }
.hud__nav a.is-active .hud__no { color: var(--accent); }
.hud__nav a::before, .hud__nav a::after { color: var(--accent); }
.rail__fill { background: var(--accent); box-shadow: none; }
.rail__tick::before { border-color: rgba(255, 255, 255, 0.35); }
.rail__tick.is-active::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px rgba(61, 245, 167, 0.6); }
.rail__tick::after { border-right-color: var(--accent); background: #111; }
.overlay { background: radial-gradient(70% 50% at 100% 0%, rgba(61, 245, 167, 0.10), transparent 60%), #050505; }
.overlay__nav a { font-style: normal; text-transform: none; font-weight: 500; letter-spacing: -0.03em; }
.overlay__nav a span { color: var(--accent); }
.overlay__nav a:hover, .overlay__nav a:focus-visible { color: var(--accent); text-shadow: none; }

/* tower — monochrome mint */
.tower__shadow { background: radial-gradient(closest-side, rgba(61, 245, 167, 0.22), rgba(61, 245, 167, 0.05) 55%, transparent); }
.slab { background:
    linear-gradient(color-mix(in srgb, var(--glow) 16%, transparent) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(90deg, color-mix(in srgb, var(--glow) 16%, transparent) 1px, transparent 1px) 0 0 / 14px 14px,
    rgba(8, 10, 9, 0.9); }
.chip { background: color-mix(in srgb, var(--c) 55%, white); }
.scanplane { border-color: rgba(61, 245, 167, 0.5); background: rgba(61, 245, 167, 0.06); box-shadow: 0 0 24px rgba(61, 245, 167, 0.25); }
.beacon { background: linear-gradient(to top, rgba(61, 245, 167, 0.9), transparent); }
.tower__hud { border-left-color: var(--accent); background: rgba(255, 255, 255, 0.03); }
.tower__hud--b { border-color: rgba(255, 255, 255, 0.3); }
.tower__hud b { color: var(--accent); }

/* contact */
.rain { opacity: 0.35; }
.neon { background: linear-gradient(160deg, #141414, #080808); }
.contact__open li { border-color: rgba(255, 255, 255, 0.1); background: #0E0E0E; }
.contact__mail { border-color: rgba(255, 255, 255, 0.18); background: #0C0C0C; }
.contact__mail:hover { border-color: var(--accent); filter: none; }
.toast { color: var(--accent); border-color: rgba(61, 245, 167, 0.4); background: rgba(10, 10, 10, 0.92); box-shadow: 0 0 30px -10px rgba(61, 245, 167, 0.5); }
.footer__sep { color: var(--accent); }
.eyebrow { color: var(--text-2); border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.03); clip-path: none; }
.eyebrow__star { background: var(--accent); filter: none; clip-path: none; width: 7px; height: 7px; animation: none; }
:focus-visible { outline-color: var(--accent); }
::selection { background: rgba(61, 245, 167, 0.35); }
.neon__word { font-style: normal; letter-spacing: 0.02em; }

/* tower: lower floors are partly covered by the floor above —
   pack their logos into the front (visible) corner; roof stays centred */
.slab .slab__chips { inset: 30% 5% 6% 28%; align-content: flex-end; justify-content: flex-end; gap: 7%; }
.slab .chip { width: 22%; }
.slab:last-of-type .slab__chips { inset: 18% 12%; align-content: center; justify-content: center; gap: 10%; }
.slab:last-of-type .chip { width: 20%; }
