/* =====================================================================
   Alex Mercer — Portfolio
   Hand-written CSS. No framework, no build step.
   Sections: tokens · base · background · buttons · nav · hero ·
   sections · about · bento · chart · marquee · projects · footer ·
   reveal/anim · responsive · reduced-motion
   ===================================================================== */

/* ---------- design tokens ---------- */
:root {
  --bg:        #07080d;
  --bg-2:      #0a0c13;
  --surface:   rgba(255, 255, 255, .025);
  --surface-2: rgba(255, 255, 255, .045);

  --ink:       #f4f6fb;
  --ink-soft:  #c3c8d6;
  --ink-mut:   #8a90a3;

  --line:      rgba(255, 255, 255, .09);
  --line-2:    rgba(255, 255, 255, .16);

  --blue:    #4f7cff;
  --violet:  #8b5cf6;
  --magenta: #c026d3;
  --accent:  #6e7bff;

  --grad-brand: linear-gradient(100deg, #4f7cff 0%, #8b5cf6 48%, #c026d3 100%);
  --grad-text:  linear-gradient(100deg, #84a6ff 0%, #b79bff 52%, #e58bff 100%);

  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --pill: 999px;

  --shadow-card: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 60px -28px rgba(0,0,0,.85);
  --shadow-pop:  0 30px 70px -24px rgba(79,124,255,.45);

  --ease:  cubic-bezier(.22,.61,.36,1);
  --ease-2: cubic-bezier(.34,1.2,.4,1);

  --maxw:  1180px;
  --nav-h: 70px;

  --pad: clamp(20px, 5vw, 40px);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 28px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }

::selection { background: rgba(139, 92, 246, .35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(72px, 11vw, 150px); }

.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: fixed;
  top: 10px; left: 50%;
  transform: translate(-50%, -150%);
  z-index: 200;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  padding: 10px 18px;
  border-radius: var(--pill);
  transition: transform .25s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}
.progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(139, 92, 246, .8);
}

/* ---------- ambient background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, #0e1020 0%, var(--bg) 55%);
}
.bg__grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(110% 70% at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(110% 70% at 50% 0%, #000 30%, transparent 78%);
}
.bg__blob {
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 820px;
  max-height: 820px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .5;
  will-change: transform;
}
.bg__blob--1 {
  top: -16vw; left: -8vw;
  background: radial-gradient(circle at 50% 50%, rgba(79,124,255,.55), transparent 62%);
  animation: drift1 26s var(--ease) infinite alternate;
}
.bg__blob--2 {
  top: -6vw; right: -12vw;
  background: radial-gradient(circle at 50% 50%, rgba(192,38,211,.42), transparent 62%);
  animation: drift2 32s var(--ease) infinite alternate;
}
.bg__blob--3 {
  top: 44vh; left: 38%;
  width: 48vw; height: 48vw;
  background: radial-gradient(circle at 50% 50%, rgba(139,92,246,.38), transparent 64%);
  animation: drift3 30s var(--ease) infinite alternate;
}
.bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 90% at 50% 30%, transparent 55%, rgba(3,4,8,.7) 100%);
}
@keyframes drift1 { to { transform: translate3d(8vw, 6vh, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-6vw, 8vh, 0) scale(1.08); } }
@keyframes drift3 { to { transform: translate3d(-8vw, -6vh, 0) scale(1.15); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 14px 22px;
  min-height: 48px;
  border-radius: var(--pill);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease);
}
.btn svg { transition: transform .3s var(--ease); }
.btn--primary {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 10px 30px -12px rgba(124, 58, 237, .8);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}
.btn--primary:hover svg { transform: translateX(4px); }
.btn--ghost {
  color: var(--ink);
  border: 1px solid var(--line-2);
  background: var(--surface);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.32);
  background: var(--surface-2);
}
.btn--lg { padding: 17px 30px; min-height: 56px; font-size: 1.05rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 14px; left: 0; right: 0;
  z-index: 100;
  padding-inline: var(--pad);
}
.nav__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 12px 0 18px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(10, 12, 20, .55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav.scrolled .nav__inner {
  background: rgba(9, 11, 18, .82);
  border-color: var(--line-2);
  box-shadow: 0 16px 40px -24px rgba(0,0,0,.9);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.brand__mark { display: grid; place-items: center; }
.brand__dot { color: var(--violet); }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative;
  padding: 9px 14px;
  border-radius: var(--pill);
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 500;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__link.active { color: var(--ink); }
.nav__link.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
}
.nav__cta { padding: 10px 18px; min-height: 44px; }
.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  place-items: center;
  color: var(--ink);
}
.nav__icon--close { display: none; }

.mobile-menu {
  max-width: var(--maxw);
  margin: 10px auto 0;
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(9, 11, 18, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: menuIn .3s var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  padding: 14px 16px;
  border-radius: var(--r);
  color: var(--ink-soft);
  font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.mobile-menu a:hover { background: var(--surface-2); color: var(--ink); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- shared section bits ---------- */
.eyebrow, .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "JetBrains Mono", monospace;
  font-size: .8rem;
  letter-spacing: .02em;
  color: var(--ink-soft);
  text-transform: none;
}
.section-eyebrow { color: #b9a8ff; }
.tick {
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--grad-brand);
  box-shadow: 0 0 10px rgba(139,92,246,.9);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22d39a;
  box-shadow: 0 0 0 0 rgba(34, 211, 154, .55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,211,154,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(34,211,154,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,154,0); }
}

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-title {
  font-size: clamp(1.85rem, 3.6vw, 2.9rem);
  margin: 16px 0 0;
}
.section-sub {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  max-width: 60ch;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 80px;
}
.hero__inner { position: relative; z-index: 2; }

/* 3D Spline background — hero only. Injected by JS; the aurora is the fallback. */
.hero__bg-3d {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  pointer-events: none;
}
.hero__bg-3d.is-ready { opacity: 1; }
.hero__bg-3d spline-viewer {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.hero__bg-3d-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(0, 0, 0, .8), transparent 30%, transparent 70%, rgba(0, 0, 0, .8)),
    linear-gradient(to bottom, transparent 45%, rgba(7, 8, 13, .55) 75%, var(--bg));
}
/* Cursor-interactive on mouse devices only. The scene receives pointer moves
   while hero links/buttons stay clickable; on touch we leave pointer-events off
   so the page still scrolls normally over the hero. */
@media (hover: hover) and (pointer: fine) {
  .hero__bg-3d { pointer-events: auto; }
  .hero__inner { pointer-events: none; }
  .hero__inner a,
  .hero__inner button { pointer-events: auto; }
  .scroll-hint { pointer-events: none; }
}
.hero .eyebrow {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  backdrop-filter: blur(6px);
}
.hero__title {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  max-width: 600px;
  margin: 26px 0 0;
  letter-spacing: -0.03em;
}
.hero__lead {
  margin-top: 26px;
  max-width: 44ch;
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  color: var(--ink-soft);
}
.hero__cta {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero__stats {
  margin-top: 60px;
  max-width: 600px;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 6vw, 72px);
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.hero__stats dt {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.hero__stats dd {
  margin-top: 4px;
  color: var(--ink-mut);
  font-size: .95rem;
}
.scroll-hint {
  position: absolute;
  bottom: 26px; left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink-mut);
  font-family: "JetBrains Mono", monospace;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.scroll-hint svg { animation: nudge 2s var(--ease) infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- about ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.about__intro { position: sticky; top: calc(var(--nav-h) + 36px); }
.about__body > p { color: var(--ink-soft); font-size: 1.1rem; }
.about__body > p + p { margin-top: 18px; }
.principles { margin-top: 34px; display: grid; gap: 14px; }
.principles li {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--ease);
}
.principles li:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
  transform: translateY(-3px);
}
.principles__icon {
  flex: none;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #c9bbff;
  background: rgba(139, 92, 246, .14);
  border: 1px solid rgba(139, 92, 246, .25);
}
.principles__icon svg { width: 22px; height: 22px; }
.principles h3 { font-size: 1.08rem; margin-bottom: 4px; }
.principles p { color: var(--ink-mut); font-size: .96rem; line-height: 1.55; }

/* ---------- bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 1.6vw, 20px);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.4vw, 30px);
  min-height: 220px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  box-shadow: var(--shadow-card);
  overflow: hidden;
  isolation: isolate;
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.card--marquee { grid-column: 1 / -1; }

/* gradient ring + mouse-follow spotlight */
.card__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity .4s var(--ease);
  background:
    radial-gradient(360px 360px at var(--mx, 50%) var(--my, 0%),
      rgba(124, 92, 255, .22), transparent 60%);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(130deg, rgba(124,150,255,.6), rgba(192,38,211,.35) 60%, transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: transparent; }
.card:hover .card__glow { opacity: 1; }
.card:hover::after { opacity: 1; }

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.card__icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #cdd6ff;
  background: linear-gradient(160deg, rgba(79,124,255,.2), rgba(192,38,211,.12));
  border: 1px solid rgba(124, 150, 255, .25);
}
.card__icon svg { width: 24px; height: 24px; }
.card__kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--ink-mut);
}
.card__title { font-size: clamp(1.2rem, 1.7vw, 1.5rem); }
.card__text {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: .98rem;
  line-height: 1.55;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 18px; }
.chips li {
  font-family: "JetBrains Mono", monospace;
  font-size: .76rem;
  padding: 6px 11px;
  border-radius: var(--pill);
  color: var(--ink-soft);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
}
.chips--sm li { font-size: .72rem; padding: 5px 9px; }

/* code window inside full-stack card */
.codewin {
  margin-top: 22px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(3, 4, 9, .6);
  overflow: hidden;
}
.codewin__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.codewin__bar span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.codewin__bar span:nth-child(1) { background: #ff5f57; }
.codewin__bar span:nth-child(2) { background: #febc2e; }
.codewin__bar span:nth-child(3) { background: #28c840; }
.codewin__bar em {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-style: normal;
  font-size: .74rem;
  color: var(--ink-mut);
}
.codewin__body {
  margin: 0;
  padding: 16px 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: .82rem;
  line-height: 1.7;
  color: #d6dbe8;
  overflow-x: auto;
}
.tok-com { color: #6b7280; }
.tok-key { color: #c084fc; }
.tok-fn  { color: #60a5fa; }
.tok-str { color: #34d399; }
.tok-num { color: #fbbf24; }

/* let the terminal fill the tall left card, with a live cursor */
.card--lg .codewin { display: flex; flex-direction: column; flex: 1; }
.card--lg .codewin__body { flex: 1; }
.cursor {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  vertical-align: -2px;
  margin-top: 4px;
  border-radius: 1px;
  background: var(--violet);
  box-shadow: 0 0 8px rgba(139, 92, 246, .8);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* chart card */
.chart {
  margin-top: 18px;
  flex: 1;
  min-height: 130px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(3, 4, 9, .45);
  padding: 10px;
  position: relative;
}
.chart svg { width: 100%; height: 100%; min-height: 120px; }
.chart__line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 4px 10px rgba(124, 92, 255, .5));
}
.chart__fills { transform-origin: 50% 100%; transform: scaleY(.001); opacity: 0; }
.card.in .chart__line { transition: stroke-dashoffset 1.5s var(--ease) .15s; stroke-dashoffset: 0; }
.card.in .chart__fills { transition: transform 1.1s var(--ease) .1s, opacity .8s var(--ease) .1s; transform: scaleY(1); opacity: 1; }

/* marquee */
.card--marquee { gap: 18px; }
.marquee {
  position: relative;
  overflow: hidden;
  margin-top: auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__group {
  display: flex;
  width: max-content;
  animation: scroll-x 38s linear infinite;
}
.marquee:hover .marquee__group { animation-play-state: paused; }
.marquee__track {
  display: flex;
  gap: 12px;
  padding-right: 12px;
}
.marquee__track li {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  font-family: "JetBrains Mono", monospace;
  font-size: .85rem;
  color: var(--ink-soft);
}
.marquee__track li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--grad-brand);
}
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- self-hosted services ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(26px, 3vw, 38px);
}
.filter {
  padding: 11px 17px;
  min-height: 44px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: .88rem;
  font-weight: 500;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.filter:hover { color: var(--ink); border-color: var(--line-2); }
.filter.is-active {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: 0 8px 22px -12px rgba(124, 58, 237, .85);
}

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.8vw, 20px);
}
.svc {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  transition: transform .35s var(--ease), border-color .35s var(--ease), background-color .35s var(--ease);
}
.svc:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.svc[hidden] { display: none; }
.svc__icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 16px;
  color: #cdd6ff;
  background: linear-gradient(160deg, rgba(79,124,255,.18), rgba(192,38,211,.12));
  border: 1px solid rgba(124, 150, 255, .22);
}
.brand__icon img {
    width: 26px;
    height: 26px;
    display: block;
}
.svc__icon svg,
.svc__icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}
.svc h3 { font-size: 1.1rem; }
.svc p {
  margin-top: 7px;
  color: var(--ink-mut);
  font-size: .93rem;
  line-height: 1.55;
}
.svc__tag {
  margin-top: auto;
  padding-top: 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: .72rem;
  color: #b9a8ff;
}

/* ---------- backups (3-2-1) ---------- */
.backup {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.8vw, 20px);
}
.bignum {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.8rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.backup__note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: .96rem;
}
.backup__note svg { width: 22px; height: 22px; flex: none; color: #c9bbff; }

/* ---------- footer ---------- */
.footer {
  position: relative;
  margin-top: clamp(40px, 8vw, 90px);
  padding-block: clamp(64px, 9vw, 120px) 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(124, 92, 255, .06));
}
.footer__cta { max-width: 720px; }
.footer__title { font-size: clamp(2rem, 4.4vw, 3.4rem); margin: 16px 0 0; }
.footer__lead { margin: 18px 0 30px; color: var(--ink-soft); font-size: 1.12rem; max-width: 52ch; }
.footer__meta { margin-top: 54px; }
.socials { display: flex; gap: 12px; flex-wrap: wrap; }
.social {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  transition: transform .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}
.social svg { width: 21px; height: 21px; }
.social:hover {
  transform: translateY(-3px);
  color: #fff;
  border-color: var(--line-2);
  background: var(--surface-2);
}
.footer__bottom {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-mut);
  font-size: .9rem;
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.to-top:hover { color: #fff; gap: 10px; }

/* ---------- live status link (Uptime Kuma status page) ---------- */
.btn--status {
  color: var(--ink);
  border: 1px solid var(--line-2);
  background: var(--surface);
  backdrop-filter: blur(6px);
}
.btn--status:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .32);
  background: var(--surface-2);
}
.btn--status .status-dot { width: 8px; height: 8px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: "JetBrains Mono", monospace;
  font-size: .8rem;
  color: var(--ink-soft);
  transition: color .2s var(--ease), border-color .2s var(--ease),
              background-color .2s var(--ease), transform .2s var(--ease);
}
.status-badge:hover {
  color: #fff;
  border-color: var(--line-2);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.status-badge svg { width: 15px; height: 15px; opacity: .7; }
.status-badge__dot {
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: #22d39a;
  box-shadow: 0 0 9px rgba(34, 211, 154, .85);
}
.card__statuslink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: .76rem;
  color: var(--ink-soft);
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.card__statuslink:hover { color: #fff; gap: 11px; }
.card__statuslink svg { width: 14px; height: 14px; opacity: .7; }
.footer__status { margin-top: 24px; }

/* ---------- reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); }
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
/* stagger within groups */
.principles li:nth-child(2).in { transition-delay: .08s; }
.principles li:nth-child(3).in { transition-delay: .16s; }
.principles li:nth-child(4).in { transition-delay: .24s; }
.bento .card:nth-child(2).in { transition-delay: .06s; }
.bento .card:nth-child(3).in { transition-delay: .12s; }
.bento .card:nth-child(4).in { transition-delay: .18s; }
.bento .card:nth-child(5).in { transition-delay: .24s; }
.services .svc:nth-child(3n+2).in { transition-delay: .07s; }
.services .svc:nth-child(3n+3).in { transition-delay: .14s; }
.backup .card:nth-child(2).in { transition-delay: .1s; }
.backup .card:nth-child(3).in { transition-delay: .2s; }
.hero__inner .reveal:nth-child(2).in { transition-delay: .07s; }
.hero__inner .reveal:nth-child(3).in { transition-delay: .14s; }
.hero__inner .reveal:nth-child(4).in { transition-delay: .21s; }
.hero__inner .reveal:nth-child(5).in { transition-delay: .28s; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__intro { position: static; }
  .services { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: grid; }
  .nav.open .nav__icon--open { display: none; }
  .nav.open .nav__icon--close { display: block; }
  .backup { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 70px); }
  .br { display: none; }
  .footer__bottom { justify-content: flex-start; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .chart__fills { transform: scaleY(1); opacity: 1; }
  .chart__line { stroke-dashoffset: 0; }
  .marquee__group { animation: none; transform: none; }
  .cursor { animation: none; }
  .bg__blob { animation: none; }
}
