/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --ink:        #0B0E16;   /* deep blue-black base            */
  --ink-raised: #121826;   /* raised surfaces                 */
  --ink-line:   #1E2636;   /* hairlines / borders             */
  --mist:       #C9D2E6;   /* soft body text                  */
  --mist-dim:   #76819A;   /* muted captions                  */
  --coral:      #FF6B5C;   /* warm accent                     */
  --teal:       #5EE7D4;   /* cool accent                     */
  --violet:     #8B7CFF;   /* tertiary glow                   */

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* default system cursor */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--ink); }

/* blurred, slowly-drifting B&W background image (own layer so it can be filtered) */
html::before {
  content: "";
  position: fixed;
  inset: -3%;                 /* small overscan past the blur margin */
  z-index: -1;
  /* `cover` guarantees full viewport coverage with no transform to misalign,
     and the solid base means any sub-pixel edge reads as theme dark, never a
     black box */
  background: var(--ink) url("../images/kali-background.jpg") center / cover no-repeat;
  filter: grayscale(1) blur(3px) brightness(0.42);
  pointer-events: none;
}

/* Mobile background image — created by web.js, crossfades over the desktop bg */
#bg-mob {
  position: fixed;
  inset: -3%;
  z-index: -1;
  background: var(--ink) url("../images/kali-bg-mob.jpg") center / cover no-repeat;
  filter: grayscale(1) blur(3px) brightness(0.42);
  transform: scale(1.15);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
html.is-mobile #bg-mob { opacity: 1; }

/* big black void behind the top menu bar — sits below the page content and
   the cursor layer, so it darkens only the background (not content) and the
   cursor shows above it */
html::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 190px;
  z-index: 0;            /* above bg image, below cursor + content */
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.96) 0%,
    rgba(0,0,0,0.9)  28%,
    rgba(1,2,6,0.55) 60%,
    transparent 100%
  );
}
@keyframes bgDrift {
  from { transform: scale(1.12) translate(-1.6%, -1.1%); }
  to   { transform: scale(1.2)  translate(1.6%,  1.3%); }
}

/* Mobile: disable animated background and rain to prevent iOS fixed-position jank */
@media (max-width: 768px) {
  html::before {
    animation: none;
    transform: scale(1.15);
  }
  #rain-bg {
    display: none;
  }
  body[data-page="home"]::before {
    animation: none;
  }
}

body {
  font-family: var(--font-body);
  background: transparent;    /* lets the html::before image show through */
  color: var(--mist);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* clip instead of hidden where supported — avoids creating a scroll container
   which breaks position:fixed on iOS Safari */
@supports (overflow-x: clip) {
  body { overflow-x: clip; }
}

/* subtle film grain + vignette over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  background:
    radial-gradient(120% 120% at 50% 0%, transparent 55%, rgba(0,0,0,0.55) 100%);
  mix-blend-mode: multiply;
}

/* dragon corner infection — dark spreading corruption behind the dragon.
   Full-screen layer so the gradient fades out at the viewport edge instead of
   leaving a hard rectangular box mid-screen. */
body[data-page="home"]::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 48;
  background: radial-gradient(
    ellipse 80% 85% at 100% 100%,
    rgba(2,0,0,0.96) 0%,
    rgba(6,0,0,0.78) 12%,
    rgba(5,0,0,0.45) 26%,
    rgba(3,0,0,0.18) 42%,
    transparent 62%
  );
  animation: infect-breathe 6s ease-in-out infinite;
}
@keyframes infect-breathe {
  0%, 100% { opacity: 0.82; }
     50%   { opacity: 1;    }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;  /* mark | centered links | social */
  align-items: center;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  mix-blend-mode: difference;       /* legible over any background */
}
.nav__mark { justify-self: start; }
.nav__links { justify-self: center; }
.nav__social { justify-self: end; }

.nav__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.nav__mark .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 14px var(--coral);
}

.nav__links {
  display: flex;
  gap: clamp(1.4rem, 3.5vw, 3rem);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav__links a {
  color: #fff;
  position: relative;
  padding: 0.2rem 0;
  opacity: 0.7;
  transition: opacity 0.3s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { opacity: 1; }
.nav-ext { font-size: 0.7em; opacity: 0.45; }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

.nav__social {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}
.nav__social a {
  color: #fff;
  opacity: 0.7;
  display: inline-flex;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.nav__social a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ---- mobile burger menu ---- */
.nav__drawer { display: contents; }   /* desktop: links + social act as grid items */
.nav__burger { display: none; }

@media (max-width: 720px) {
  .nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    mix-blend-mode: normal;           /* drawer controls its own colours */
  }

  .nav__burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 9px;
    width: 58px; height: 58px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 60;
    /* centre the burger in the bar */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .nav__burger span {
    display: block;
    width: 40px; height: 3px;
    margin: 0 auto;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
  }
  .nav.is-open .nav__burger span:nth-child(1) { transform: translateY(12px) rotate(45deg); }
  .nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-12px) rotate(-45deg); }

  /* slide-down drawer */
  .nav__drawer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.1rem;
    min-height: 58vh;
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 7rem 1.5rem 3rem;
    background:
      radial-gradient(120% 80% at 50% 0%, rgba(255,91,107,0.08), transparent 60%),
      linear-gradient(180deg, rgba(19,12,23,0.97), rgba(8,9,14,0.97));
    -webkit-backdrop-filter: blur(24px) saturate(165%);
    backdrop-filter: blur(24px) saturate(165%);
    border-bottom: 1px solid rgba(255,91,107,0.16);
    box-shadow: 0 26px 60px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.42s var(--ease), opacity 0.42s var(--ease);
    z-index: 55;
  }
  .nav.is-open .nav__drawer { transform: translateY(0); opacity: 1; }

  .nav__links {
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
    font-size: 1.45rem;
  }
  .nav__links a { opacity: 0.9; }
  .nav__social { gap: 2rem; }

  body.nav-open { overflow: hidden; }
}

/* ============================================================
   Boot intro (privesc terminal → crash → site)
   ============================================================ */
body.intro-lock { overflow: hidden; }
#intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #04050a;
  padding: clamp(1rem, 4vw, 2.6rem);
  overflow: hidden;
  font-family: var(--font-mono);
}
.intro__screen {
  height: 100%;
  overflow: hidden;
  font-size: clamp(0.72rem, 1.7vw, 0.95rem);
  line-height: 1.65;
  color: #c9d2e6;
  max-width: 980px;
}
.intro__line { white-space: pre-wrap; word-break: break-word; }
.intro__user  { color: #9fef00; }
.intro__root  { color: #ff5b6b; font-weight: 600; }
.intro__path  { color: #5EE7D4; }
.intro__err   { color: #ff7b72; }
.intro__panic { color: #ffd6dd; background: rgba(199,29,58,0.18); }
.intro__caret {
  display: inline-block;
  width: 8px; height: 1.05em;
  margin-left: 1px;
  background: #9fef00;
  vertical-align: text-bottom;
  animation: termBlink 1s steps(1) infinite;
}
.intro__skip {
  position: absolute;
  bottom: clamp(1rem, 4vw, 2.2rem);
  right: clamp(1rem, 4vw, 2.2rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--mist-dim);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
}
.intro__skip:hover { color: #9fef00; border-color: rgba(159,239,0,0.4); }

/* crash glitch then fade away */
#intro.is-crash { animation: introGlitch 0.38s steps(2) 3; }
#intro.is-done {
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
@keyframes introGlitch {
  0%   { transform: translate(0, 0);   filter: none; }
  25%  { transform: translate(-3px, 1px); filter: hue-rotate(40deg) saturate(2); }
  50%  { transform: translate(3px, -2px); filter: invert(0.15); }
  75%  { transform: translate(-2px, 2px); filter: hue-rotate(-30deg); }
  100% { transform: translate(0, 0);   filter: none; }
}

/* ============================================================
   Home / hero
   ============================================================ */
#blob-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;            /* above the header void so the cursor shows over it */
  display: block;
  cursor: default;
}
#dragon {
  display: block;
  position: fixed;
  bottom: -2%;
  right: 3%;
  top: auto;
  left: auto;
  transform: none;
  width: min(140px, 17vw);
  height: min(140px, 17vw);
  z-index: 50;
  pointer-events: auto;
  cursor: pointer;
  background: radial-gradient(circle closest-side at 50% 46%,
    rgba(0,0,0,0.7) 0%,
    rgba(0,0,0,0.35) 50%,
    transparent 100%);
  transition: filter 0.2s ease;
}
#dragon:hover { filter: brightness(1.3); }
@media (max-width: 720px) {
  #dragon { width: min(120px, 25vw); height: min(120px, 25vw); bottom: calc(4% + env(safe-area-inset-bottom, 0px)); right: 2%; }
}

.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.2rem, 4vw, 3rem);
  pointer-events: none;            /* let cursor reach the canvas */
}
.hero__inner { max-width: var(--max); width: 100%; margin: 0 auto; }

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ff0091;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.hero__eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: #ff0091;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: #fff;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(110deg, var(--coral), var(--violet), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* typewriter headline */
.hero__type {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2rem, 6.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  min-height: 1.25em;
}
.hero__word {
  color: #ece9e1;   /* off-white */
}
.hero__caret {
  display: inline-block;
  width: 3px;
  height: 0.95em;
  margin-left: 5px;
  vertical-align: -0.1em;
  background: #8a1328;
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

.hero__sub {
  margin-top: 1.6rem;
  max-width: 38ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--mist-dim);
}

.hero__scroll {
  margin-top: 2.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--mist-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.hero__scroll .line {
  display: inline-block;
  width: 40px; height: 1px;
  background: var(--mist-dim);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scaleX(0.6); transform-origin: left; }
  50%      { opacity: 1;   transform: scaleX(1);   transform-origin: left; }
}

/* ============================================================
   Generic page shell (music / websites / pentesting)
   ============================================================ */
.page {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(7rem, 14vh, 11rem) clamp(1.2rem, 4vw, 3rem) 5rem;
}

.page__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}
.page__eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--coral); }

.page__title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1rem;
}
.page__lead {
  max-width: 52ch;
  color: var(--mist-dim);
  font-size: 1.05rem;
}
.page-caret {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 4px;
  vertical-align: -0.05em;
  background: #8a1328;
  animation: caretBlink 1s steps(1) infinite;
}

/* hacker scramble text */
.ht-scramble {
  color: #00ff41;
  text-shadow: 0 0 8px #00ff41, 0 0 20px rgba(0,255,65,0.4);
  animation: htFlicker 0.06s steps(1) infinite;
}
.ht-locked {
  color: inherit;
  text-shadow: none;
}
@keyframes htFlicker {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ambient gradient orbs that sit behind page content */
.ambient {
  display: none;          /* removed — kept markup so it can be re-enabled later */
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.ambient span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.ambient .a { width: 460px; height: 460px; background: var(--violet); top: -120px; left: -80px; }
.ambient .b { width: 380px; height: 380px; background: var(--coral);  bottom: -120px; right: -60px; }
.ambient .c { width: 320px; height: 320px; background: var(--teal);   top: 40%; right: 30%; opacity: 0.25; }

/* ============================================================
   Terminal audio player
   ============================================================ */
.player-wrap {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  display: flex;
  justify-content: center;
}

/* terminal chrome wrapper */
.term-window {
  width: min(560px, 100%);
  border: 1px solid rgba(255,107,92,0.28);
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255,107,92,0.06),
    0 0 50px rgba(255,107,92,0.08),
    0 20px 60px rgba(0,0,0,0.65);
  overflow: hidden;
  background: rgba(4,2,8,0.92);
}
.term-window--wide { width: min(680px, 100%); }

.term-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  background: rgba(9,4,14,0.98);
  border-bottom: 1px solid rgba(255,107,92,0.14);
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.term-dot--r { background: #ff5f57; }
.term-dot--y { background: #febc2e; }
.term-dot--g { background: #28c840; }
.term-bar__title {
  margin-left: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(255,107,92,0.48);
  letter-spacing: 0.04em;
}

.player {
  width: 100%;
  padding: clamp(1.4rem, 3.5vw, 2rem);
  border-radius: 0;
  position: relative;
  isolation: isolate;
  background: rgba(4,2,8,0.92);
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.player::before { display: none; }

.player__art {
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: 4px;
  margin-bottom: 1.4rem;
  position: relative;
  overflow: hidden;
  background: #020008;
  border: 1px solid rgba(94,231,212,0.12);
  display: grid;
  place-items: center;
}
.player__galaxy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}
/* CRT scanlines overlay */
.player__art-scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.14) 3px,
    rgba(0,0,0,0.14) 4px
  );
}
.player__art-label {
  position: relative;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  text-shadow: 0 0 12px rgba(94,231,212,0.55);
  font-weight: 400;
}

.player__meta { margin-bottom: 1.1rem; }
.player__track {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.08rem;
  color: #fff;
  letter-spacing: 0.01em;
}
.player__track::before {
  content: "> ";
  color: var(--coral);
  font-weight: 400;
}
.player__index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--mist-dim);
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

/* seek bar */
.seek {
  --pct: 0%;
  position: relative;
  height: 6px;
  border-radius: 2px;
  background: rgba(94,231,212,0.1);
  cursor: pointer;
  margin-bottom: 0.5rem;
}
.seek__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pct);
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--coral));
}
.seek__head {
  position: absolute;
  top: 50%;
  left: var(--pct);
  transform: translate(-50%, -50%);
  width: 12px; height: 12px;
  border-radius: 2px;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(94,231,212,0.7);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.seek:hover .seek__head { opacity: 1; }

.player__time {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--mist-dim);
  margin-bottom: 1.3rem;
}

/* transport controls */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}
.ctrl {
  background: none;
  border: none;
  color: var(--mist-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 4px;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.ctrl:hover { color: #fff; transform: scale(1.08); }
.ctrl:active { transform: scale(0.94); }
.ctrl svg { width: 22px; height: 22px; fill: currentColor; }

.ctrl--play {
  width: 56px; height: 56px;
  background: rgba(4,2,8,0.95);
  color: var(--teal);
  border: 1px solid rgba(94,231,212,0.5);
  border-radius: 6px;
  box-shadow: 0 0 18px rgba(94,231,212,0.18), inset 0 0 10px rgba(94,231,212,0.04);
}
.ctrl--play:hover {
  color: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 28px rgba(94,231,212,0.32);
  transform: scale(1.04);
}
.ctrl--play svg { width: 26px; height: 26px; }

.ctrl--random {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  border: 1px solid rgba(255,107,92,0.38);
  color: var(--coral);
  width: auto; height: auto;
}
.ctrl--random:hover {
  background: rgba(255,107,92,0.12);
  border-color: var(--coral);
  color: #fff;
  transform: scale(1);
}
.ctrl--random svg { width: 15px; height: 15px; }

/* volume */
.volume {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.volume svg { width: 18px; height: 18px; fill: var(--mist-dim); flex-shrink: 0; }
.volume input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(94,231,212,0.1);
  outline: none;
  cursor: pointer;
}
.volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 2px;
  background: var(--teal);
  box-shadow: 0 0 6px rgba(94,231,212,0.5);
}
.volume input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px;
  border: none;
  border-radius: 2px;
  background: var(--teal);
}

.player__hint {
  margin-top: 1.4rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--mist-dim);
  letter-spacing: 0.04em;
  opacity: 0.6;
}
.player__hint code {
  color: var(--teal);
  background: rgba(94,231,212,0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

/* ============================================================
   Engineering — before/after comparisons (terminal shell)
   ============================================================ */
.eng__list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.eng-item {
  position: relative;
  overflow: hidden;
  padding: 0.9rem 1rem;
  border-radius: 4px;
  background: rgba(4,2,8,0.55);
  border: 1px solid rgba(255,107,92,0.14);
}
.eng-item__galaxy {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}
.eng-item__head,
.eng-item__seek,
.eng-item .eng-ab { position: relative; z-index: 1; }
.eng-item__head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}
.eng-item__play {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  border: 1px solid rgba(94,231,212,0.4);
  cursor: pointer;
  color: var(--teal);
  background: rgba(4,2,8,0.85);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.eng-item__play:hover { transform: scale(1.06); box-shadow: 0 0 14px rgba(94,231,212,0.28); }
.eng-item__play svg { width: 17px; height: 17px; fill: currentColor; }
.eng-item__name {
  flex: 1;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.9rem;
  color: #fff;
}
.eng-item__tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist-dim);
}
.eng-item__seek {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: rgba(94,231,212,0.1);
  cursor: pointer;
  margin-bottom: 0.85rem;
  overflow: hidden;
}
.eng-item__fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--coral));
}
.eng-ab {
  display: inline-flex;
  padding: 2px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.eng-ab__btn {
  border: none;
  cursor: pointer;
  background: none;
  color: var(--mist-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.32rem 0.8rem;
  border-radius: 3px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.eng-ab__btn.is-active {
  color: var(--teal);
  background: rgba(94,231,212,0.12);
}

/* ============================================================
   Placeholder content (websites / pentesting)
   ============================================================ */
.soon {
  margin-top: 3rem;
  padding: 2.4rem;
  border: 1px dashed var(--ink-line);
  border-radius: 18px;
  background: rgba(255,255,255,0.02);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--mist-dim);
}
.soon b { color: var(--teal); font-weight: 500; }

/* ============================================================
   Beat pack signup
   ============================================================ */
.beatpack {
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  max-width: 560px;
  text-align: center;
  padding: clamp(1.4rem, 3.5vw, 2rem);
  border-radius: 6px;
  background: rgba(4,2,8,0.88);
  border: 1px solid rgba(255,107,92,0.22);
  box-shadow: 0 0 0 1px rgba(255,107,92,0.05), 0 0 40px rgba(255,107,92,0.06);
}
.beatpack__title {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--coral);
}
.beatpack__title::before { content: "// "; opacity: 0.55; }
.beatpack__sub {
  margin-top: 0.5rem;
  color: var(--mist-dim);
  font-size: 0.88rem;
  font-family: var(--font-mono);
}
.beatpack__form {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.55rem;
}
.beatpack__input {
  flex: 1;
  min-width: 0;
  padding: 0.72rem 0.9rem;
  border-radius: 4px;
  border: 1px solid rgba(94,231,212,0.2);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
  caret-color: var(--teal);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.beatpack__input::placeholder { color: rgba(94,231,212,0.28); }
.beatpack__input:focus { border-color: rgba(94,231,212,0.55); box-shadow: 0 0 0 1px rgba(94,231,212,0.1); }
.beatpack__btn {
  padding: 0.72rem 1.1rem;
  border-radius: 4px;
  border: 1px solid rgba(255,107,92,0.5);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--coral);
  background: rgba(255,107,92,0.08);
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.beatpack__btn:hover { background: rgba(255,107,92,0.18); box-shadow: 0 0 16px rgba(255,107,92,0.2); color: #fff; }
.beatpack__btn:active { transform: translateY(0); }
.beatpack__msg {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  min-height: 1.1em;
}
.beatpack__msg.is-ok  { color: var(--teal); }
.beatpack__msg.is-err { color: #ff7b72; }
@media (max-width: 480px) {
  .beatpack__form { flex-direction: column; }
}

/* ============================================================
   Inquiry form
   ============================================================ */
.inquire {
  margin: clamp(2.8rem, 7vw, 4.5rem) auto 0;
  max-width: 620px;
  padding: clamp(1.4rem, 3.5vw, 2.2rem);
  border-radius: 6px;
  background: rgba(4,2,8,0.88);
  border: 1px solid rgba(255,107,92,0.22);
  box-shadow: 0 0 0 1px rgba(255,107,92,0.05), 0 0 40px rgba(255,107,92,0.06);
}
.inquire__title {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--coral);
}
.inquire__title::before { content: "// "; opacity: 0.55; }
.inquire__sub {
  margin-top: 0.5rem;
  color: var(--mist-dim);
  font-size: 0.88rem;
  font-family: var(--font-mono);
}
.inquire__form {
  margin-top: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.inquire__row {
  display: flex;
  gap: 0.65rem;
}
.inquire__input {
  width: 100%;
  min-width: 0;
  padding: 0.72rem 0.9rem;
  border-radius: 4px;
  border: 1px solid rgba(94,231,212,0.18);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
  caret-color: var(--teal);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.inquire__input::placeholder { color: rgba(94,231,212,0.25); }
.inquire__input:focus { border-color: rgba(94,231,212,0.55); box-shadow: 0 0 0 1px rgba(94,231,212,0.08); }
.inquire__textarea { resize: vertical; min-height: 100px; }

/* file upload */
.inquire__file {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.9rem;
  border-radius: 4px;
  border: 1px dashed rgba(94,231,212,0.2);
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.inquire__file:hover { border-color: rgba(94,231,212,0.5); background: rgba(94,231,212,0.04); }
.inquire__file input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
}
.inquire__file-icon {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 4px;
  background: rgba(94,231,212,0.1);
  color: var(--teal);
  font-size: 0.85rem;
  border: 1px solid rgba(94,231,212,0.25);
}
.inquire__file-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--mist-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inquire__file.has-file { border-style: solid; border-color: rgba(94,231,212,0.4); }
.inquire__file.has-file .inquire__file-label { color: var(--mist); }
.inquire__btn {
  align-self: flex-start;
  margin-top: 0.3rem;
  padding: 0.72rem 1.3rem;
  border-radius: 4px;
  border: 1px solid rgba(255,107,92,0.5);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--coral);
  background: rgba(255,107,92,0.08);
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}
.inquire__btn:hover { background: rgba(255,107,92,0.18); box-shadow: 0 0 16px rgba(255,107,92,0.2); color: #fff; }
.inquire__btn:active { transform: translateY(0); }
/* mix & master submit — inherits terminal style */
#mix-form .inquire__btn { }
.inquire__msg {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  min-height: 1.1em;
}
.inquire__msg.is-ok  { color: var(--teal); }
.inquire__msg.is-err { color: #ff7b72; }
@media (max-width: 480px) {
  .inquire__row { flex-direction: column; }
}

/* ============================================================
   Website cards — glass panels, slideshow + key points
   ============================================================ */
/* ---- carousel shell ---- */
.site-carousel {
  position: relative;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  overflow: visible;
  /* fade neighbour cards at the edges — body overflow-x:hidden handles scrollbar */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0,0,0,0.7) 6%,
    black 14%,
    black 86%,
    rgba(0,0,0,0.7) 94%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0,0,0,0.7) 6%,
    black 14%,
    black 86%,
    rgba(0,0,0,0.7) 94%,
    transparent 100%
  );
}
.carousel__viewport {
  overflow: visible;
  padding: 2.4rem 0;          /* room for card shadows + float */
}
.site-cards {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 4vw, 3rem);
  transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
  user-select: none;
  touch-action: pan-y;
  cursor: grab;
}
.site-cards.is-dragging { transition: none; cursor: grabbing; }
.site-cards img { -webkit-user-drag: none; user-select: none; }

/* nav arrows */
.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(12,10,16,0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s var(--ease), opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.carousel__arrow:hover { background: rgba(138,19,40,0.55); }
.carousel__arrow:active { transform: translateY(-50%) scale(0.92); }
.carousel__arrow:disabled { opacity: 0.25; cursor: default; }
.carousel__arrow--prev { left: clamp(0.2rem, 2vw, 1rem); }
.carousel__arrow--next { right: clamp(0.2rem, 2vw, 1rem); }

/* dots */
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 1.2rem;
}
.carousel__dot {
  width: 8px; height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.carousel__dot:hover { background: rgba(255,255,255,0.6); }
.carousel__dot.is-active { background: #c43a52; transform: scale(1.35); }

.site-card {
  flex: 0 0 auto;
  width: min(540px, 88vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: default;
  padding: 0;
  border-radius: 24px;
  position: relative;
  isolation: isolate;
  opacity: 0.52;
  transform: scale(0.86);
  filter: blur(0.5px);
  transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
              filter 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);

  background: rgba(6, 0, 2, 0.88);
  border: 1px solid rgba(255, 107, 92, 0.18);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(138, 19, 40, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.site-card__void {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
  pointer-events: none;
}

/* ---- browser-window chrome: frames each card as a live site ---- */
.site-card__chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.1rem 0.55rem;
  pointer-events: none;
}
.site-card__lights {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.site-card__lights i {
  display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 0 2px rgba(0,0,0,0.35);
}
.site-card__lights i:nth-child(1) { background: #ff5f57; }
.site-card__lights i:nth-child(2) { background: #febc2e; }
.site-card__lights i:nth-child(3) { background: #28c840; }
.site-card__url {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  max-width: 58%;
  padding: 0.3rem 0.72rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(8, 5, 7, 0.55);
  border: 1px solid rgba(255, 107, 92, 0.16);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.site-card__url::before {
  content: "";
  flex-shrink: 0;
  width: 9px; height: 9px;
  background: var(--coral);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm3 8H9V6a3 3 0 0 1 6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm3 8H9V6a3 3 0 0 1 6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.site-card__url--pending {
  color: var(--mist-dim);
}
.site-card__url--pending::before { background: var(--mist-dim); }
.site-card.is-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0px);
  animation: cardFloat 4.5s ease-in-out infinite;
  box-shadow:
    0 45px 70px rgba(0,0,0,0.100),
    inset 0 1px 0 rgba(255,255,255,0.22);
}
@keyframes cardFloat {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1) translateY(-12px); }
}

/* "coming soon" card */
.site-card--soon .site-card__slide {
  filter: blur(7px) brightness(0.5) grayscale(0.3);
  transform: scale(1.08);
}
.site-card__soon {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.site-card__soon span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.6rem 1.3rem;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  background: rgba(8,7,12,0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.site-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,0.5), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

/* ---- image — bottom of card, swipeable ---- */
.site-card__slides {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 220px;
  z-index: 1;
  background: rgba(0,0,0,0.4);
  border-radius: 0 0 24px 24px;
  touch-action: pan-y;
  /* fade image edges into the void */
  -webkit-mask-image: radial-gradient(ellipse 88% 82% at 50% 55%, black 52%, transparent 100%);
          mask-image: radial-gradient(ellipse 88% 82% at 50% 55%, black 52%, transparent 100%);
}
/* glow ring around the image area */
.site-card__slides::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 40px rgba(168, 24, 54, 0.35), inset 0 0 8px rgba(255, 90, 110, 0.2);
  pointer-events: none;
  z-index: 4;
}
.site-card__slide {
  position: absolute;
  top: 3rem;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100% - 3rem);
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.site-card__slide.is-active { opacity: 1; }

/* swipe arrows inside the image area */
.site-card__prev,
.site-card__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  padding: 0;
}
.site-card__prev { left: 10px; }
.site-card__next { right: 10px; }
.site-card__slides:hover .site-card__prev,
.site-card__slides:hover .site-card__next { opacity: 1; }

.site-card__dots {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 7px;
}
.site-card__dot {
  width: 7px; height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.site-card__dot:hover { background: rgba(255,255,255,0.75); }
.site-card__dot.is-active { background: #fff; transform: scale(1.3); }

/* ---- front caption (built by JS), sits over the image ---- */
.site-card__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 2.6rem 1.1rem 1rem;
  background: linear-gradient(to top, rgba(6,5,10,0.88), transparent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: #fff;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.site-card__caption .hint {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff8a95;
  white-space: nowrap;
}
.site-card.is-open .site-card__caption { opacity: 0; }

/* ---- "Want a website?" CTA button ---- */
.site-card__cta {
  position: absolute;
  top: clamp(0.9rem, 2vw, 1.2rem);
  right: clamp(0.9rem, 2vw, 1.2rem);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  border: 1px solid rgba(255, 107, 92, 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  z-index: 4;
}
.site-card__cta:hover {
  background: rgba(255, 107, 92, 0.12);
  border-color: var(--coral);
  color: #fff;
}

/* ---- info — always visible at top of card ---- */
.site-card__info {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: clamp(1.2rem, 4vw, 1.6rem);
  overflow: visible;
  pointer-events: auto;
  opacity: 1;
  transform: none;
}
.site-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: #fff;
  margin-bottom: 1rem;
}
.fact { margin-bottom: 0.95rem; }
.fact:last-child { margin-bottom: 0; }
.fact__label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist-dim);
  margin-bottom: 0.28rem;
}
.fact__value {
  color: var(--mist);
  font-size: 0.95rem;
  line-height: 1.5;
}
.fact__value a {
  color: var(--coral);
  border-bottom: 1px solid rgba(255,107,92,0.4);
  transition: border-color 0.3s var(--ease);
}
.fact__value a:hover { border-color: var(--coral); }

@media (max-width: 720px) {
  .site-card { width: min(420px, 88vw); }
  .site-card__slides { min-height: 240px; }
  .site-card__info { padding: 1.2rem 1.2rem 1rem; }
  .site-card__name { font-size: 1.25rem; margin-bottom: 0.7rem; }
  .fact { margin-bottom: 0.65rem; }
  .carousel__arrow { width: 38px; height: 38px; font-size: 1.25rem; }
  .carousel__arrow--prev { left: 0; }
  .carousel__arrow--next { right: 0; }
}

/* desktop: same carousel as mobile, bigger cards */
@media (min-width: 721px) {
  .site-card {
    width: min(860px, 78vw);
    min-height: 680px;
  }
  .site-card__slides { min-height: 380px; }
  .site-card__caption { display: none; }
  .site-card__info { padding: clamp(1.5rem, 3vw, 2rem); }
}

/* ============================================================
   HackTheBox profile card
   ============================================================ */
.htb-card {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(1.3rem, 3vw, 1.9rem);
  border-radius: 22px;
  position: relative;
  isolation: isolate;
  background: linear-gradient(160deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.22);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
}
.htb-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.htb-card__id { display: flex; align-items: center; gap: 0.8rem; }
.htb-card__cube {
  font-size: 1.8rem;
  color: #9fef00;                 /* HTB green */
  text-shadow: 0 0 16px rgba(159,239,0,0.5);
  line-height: 1;
}
.htb-card__user {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: #fff;
}
.htb-card__name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--mist-dim);
}
.htb-card__link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #9fef00;
  border: 1px solid rgba(159,239,0,0.35);
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.htb-card__link:hover {
  background: rgba(159,239,0,0.10);
  border-color: rgba(159,239,0,0.7);
}
.htb-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
}
.htb-stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 0.6rem;
  border-radius: 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}
.htb-stat__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: #fff;
}
.htb-stat__label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist-dim);
}
.htb-card__note {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--mist-dim);
}
@media (max-width: 620px) {
  .htb-stats { grid-template-columns: repeat(2, 1fr); }
}

/* TryHackMe variant — red accents instead of HTB green */
.htb-card--thm .htb-card__cube { color: #ff5b6b; text-shadow: 0 0 16px rgba(255,91,107,0.45); }
.htb-card--thm .htb-card__link { color: #ff5b6b; border-color: rgba(255,91,107,0.35); }
.htb-card--thm .htb-card__link:hover { background: rgba(255,91,107,0.10); border-color: rgba(255,91,107,0.7); }
.htb-stat--feature {
  background: linear-gradient(160deg, rgba(255,91,107,0.18), rgba(255,91,107,0.05));
  border-color: rgba(255,91,107,0.35);
}
.htb-stat--feature .htb-stat__num { color: #ff8a95; }

/* HackTheBox AU-rank highlight (green) */
.htb-stat--au {
  background: linear-gradient(160deg, rgba(159,239,0,0.18), rgba(159,239,0,0.05));
  border-color: rgba(159,239,0,0.4);
}
.htb-stat--au .htb-stat__num { color: #b6f24a; }

/* ============================================================
   Writeups terminal
   ============================================================ */
.section-title {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: #fff;
}
.section-desc {
  margin-top: 0.5rem;
  max-width: 60ch;
  color: var(--mist-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

.terminal {
  margin-top: clamp(1.6rem, 4vw, 2.6rem);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(8,10,14,0.92);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  font-family: var(--font-mono);
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.terminal__dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal__dot--r { background: #ff5f56; }
.terminal__dot--y { background: #ffbd2e; }
.terminal__dot--g { background: #27c93f; }
.terminal__title {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--mist-dim);
}
.terminal__body { padding: 1rem clamp(0.8rem, 2vw, 1.2rem) 1.2rem; }
.terminal__line {
  font-size: 0.82rem;
  color: var(--mist);
  margin-bottom: 0.4rem;
}
.terminal__prompt { color: #9fef00; }
.terminal__path { color: #5EE7D4; }
.terminal__cursor {
  display: inline-block;
  width: 8px; height: 1.05em;
  background: #9fef00;
  vertical-align: text-bottom;
  animation: termBlink 1.05s steps(1) infinite;
}
@keyframes termBlink { 50% { opacity: 0; } }

/* total line above a listing */
.terminal__total { color: var(--mist-dim); font-size: 0.82rem; margin-bottom: 0.4rem; }

/* ls -la styled rows */
.term-item {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  color: var(--mist-dim);
  font-size: 0.82rem;
  white-space: nowrap;
  transition: background 0.18s var(--ease);
}
.term-item:hover { background: rgba(159,239,0,0.08); }
.term-item__perm { color: #5EE7D4; }
.term-item__meta,
.term-item__size,
.term-item__date { color: var(--mist-dim); }
.term-item__size { min-width: 3.2em; text-align: right; }
.term-item__name {
  color: #6ea8ff;             /* directory blue, like real ls */
  font-weight: 700;
  margin-left: 0.15rem;
}
.term-item:hover .term-item__name { text-decoration: underline; }
.term-item__diff {
  margin-left: auto;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
}
.term-item__diff--easy   { color: #9fef00; background: rgba(159,239,0,0.12); }
.term-item__diff--medium { color: #ffbd2e; background: rgba(255,189,46,0.12); }
.term-item__diff--hard   { color: #ff7b72; background: rgba(255,123,114,0.12); }
.term-item__diff--insane { color: #d2a8ff; background: rgba(210,168,255,0.14); }

/* smaller, scrollable on small screens, like a real terminal */
@media (max-width: 620px) {
  .terminal__body { overflow-x: auto; padding: 0.8rem 0.7rem 1rem; }
  .terminal__title { font-size: 0.62rem; }
  .terminal__line,
  .terminal__total { font-size: 0.66rem; }
  .term-item { font-size: 0.66rem; gap: 0.55rem; padding: 0.16rem 0.35rem; }
  .term-item__diff { font-size: 0.56rem; padding: 0.1rem 0.4rem; }
}
@media (max-width: 400px) {
  .term-item__meta { display: none; }
}

/* ============================================================
   Writeup article pages
   ============================================================ */
.wu-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.6rem;
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--mist);
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.wu-back:hover {
  color: #9fef00;
  background: rgba(159,239,0,0.08);
  border-color: rgba(159,239,0,0.4);
  transform: translateX(-3px);
}

.wu-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.2rem 0 2.2rem;
}
.wu-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 82%);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--mist);
}
.wu-badge--platform { color: #ff0030de; border-color: rgb(255 0 45 / 50%); }
.wu-badge--link { color: #9fef00; border-color: rgba(159,239,0,0.4); }
.wu-badge--link:hover { background: rgba(159,239,0,0.1); }
.wu-badge.wu-diff--easy   { color: #9fef00; border-color: rgba(159,239,0,0.4); }
.wu-badge.wu-diff--medium { color: #ffbd2e; border-color: rgba(255,189,46,0.4); }
.wu-badge.wu-diff--hard   { color: #ff7b72; border-color: rgba(255,123,114,0.4); }
.wu-badge.wu-diff--insane { color: #d2a8ff; border-color: rgba(210,168,255,0.4); }

.writeup {
  max-width: 820px;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.18);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
}
.writeup > * + * { margin-top: 1.1rem; }
.writeup > :first-child { margin-top: 0; }
.writeup h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: #fff;
  margin-top: 2.4rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.writeup h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  margin-top: 1.6rem;
}
.writeup p { color: var(--mist); line-height: 1.7; }
.writeup ul { margin-left: 1.2rem; color: var(--mist); line-height: 1.7; }
.writeup li { margin-top: 0.35rem; }
.writeup a { color: #9fef00; border-bottom: 1px solid rgba(159,239,0,0.35); }
.writeup strong { color: #fff; }

/* inline + block code, terminal flavoured */
.writeup code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255,255,255,0.08);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  color: #ffd6dd;
}
.writeup pre {
  background: rgba(8,10,14,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  position: relative;
}
.writeup pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: #c9d2e6;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre;
  display: block;
}

/* ============================================================
   Footer
   ============================================================ */
.foot {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem clamp(1.2rem, 4vw, 3rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--mist-dim);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ink-line);
}
.foot__socials {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.foot__social {
  display: flex;
  align-items: center;
  color: var(--mist-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.foot__social svg { width: 17px; height: 17px; display: block; }
.foot__social:hover { color: var(--teal); }

/* ============================================================
   Accessibility / motion
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

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

@media (max-width: 600px) {
  .foot { flex-direction: column; gap: 0.6rem; }
}

/* ============================================================
   Cursor cat
   ============================================================ */
.cat {
  display: none;          /* disabled for now — re-add js/cat.js include + remove this to re-enable */
  position: fixed;
  left: 0; top: 0;
  z-index: 5;
  margin-left: -29px;     /* line the cat's feet up near the cursor */
  margin-top: -40px;
  pointer-events: none;
  will-change: transform;
}
.cat__flip { transition: transform 0.25s var(--ease); }
.cat--left .cat__flip { transform: scaleX(-1); }

.cat__svg { display: block; filter: drop-shadow(0 6px 6px rgba(0,0,0,0.4)); }
.cat__eye { filter: drop-shadow(0 0 2px #ff8a95); }

/* parts pivot from where they attach to the body */
.cat__leg, .cat__tail, .cat__body-group { transform-box: fill-box; }
.cat__leg { transform-origin: 50% 0; }
.cat__tail { transform-origin: 100% 100%; animation: catTail 1.6s ease-in-out infinite; }
@keyframes catTail { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }

/* walking: legs swing in two alternating pairs, body gently bobs */
.cat--walking .cat__leg--1,
.cat--walking .cat__leg--3 { animation: catLegA 0.45s linear infinite; }
.cat--walking .cat__leg--2,
.cat--walking .cat__leg--4 { animation: catLegB 0.45s linear infinite; }
@keyframes catLegA { 0%, 100% { transform: rotate(16deg); } 50% { transform: rotate(-16deg); } }
@keyframes catLegB { 0%, 100% { transform: rotate(-16deg); } 50% { transform: rotate(16deg); } }
.cat--walking .cat__body-group { animation: catBob 0.45s ease-in-out infinite; }
@keyframes catBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }

@media (prefers-reduced-motion: reduce) {
  .cat__tail { animation: none; }
}

/* ============================================================
   Glitchy cursor
   ============================================================ */
.gcursor {
  position: fixed;
  top: 0; left: 0;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
}
.gcursor span {
  position: absolute;
  inset: 0;
  border: 1.5px solid;
  border-radius: 2px;
  transition: transform 0.05s linear;
}
.gcursor__r    { border-color: #ff2e63; }
.gcursor__c    { border-color: #2ee6e6; }
.gcursor__core { border-color: rgba(255,255,255,0.85); }
.gcursor.is-glitch .gcursor__r { transform: translate(2.5px, -1.5px) scaleX(1.1); }
.gcursor.is-glitch .gcursor__c { transform: translate(-2.5px, 1.5px) scaleY(1.1); }
.gcursor.is-down { transform: scale(0.7); }
.gcursor.is-down .gcursor__core { border-color: #ff2e63; }

/* ============================================================
   Page transitions
   ============================================================ */

/* black fade-in on every page load (no flash — defined in <head> CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  pointer-events: none;
  animation: pageFadeIn 0.6s ease forwards;
}
@keyframes pageFadeIn {
  from { opacity: 1; }
  to   { opacity: 0; visibility: hidden; }
}

/* CRT "switch-off" when leaving the home page */
@keyframes tvOff {
  0%   { transform: scale(1, 1);     filter: brightness(1);  }
  48%  { transform: scale(1, 0.012); filter: brightness(7);  }
  60%  { transform: scale(1, 0.012); filter: brightness(9);  }
  100% { transform: scale(0.0008, 0.012); filter: brightness(22); opacity: 0; }
}
html.is-leaving { background: #000; }
html.is-leaving body {
  transform-origin: center center;
  overflow: hidden;
  animation: tvOff 0.55s cubic-bezier(0.6, 0, 0.4, 1) forwards;
}
/* collapse the background image layer along with the page */
html.is-leaving::before {
  transform-origin: center center;
  animation: tvOff 0.55s cubic-bezier(0.6, 0, 0.4, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation-duration: 0.01s; }
  html.is-leaving body { animation: none; opacity: 0; }
  html.is-leaving::before { animation: none; opacity: 0; }
}

/* ============================================================
   page-enter.js overlay — terminal "close/open script" transition
   ============================================================ */
#page-enter,
#page-exit {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #050d05;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.38s ease;
}
#page-enter.pe--done { opacity: 0; pointer-events: none; }

.pet__errors { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 0.3rem; }
.pet__err-line {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(0.72rem, 1.5vw, 0.9rem);
  color: rgba(255, 91, 107, 0.8);
  animation: petFadeIn 0.12s ease forwards;
}
@keyframes petFadeIn { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }

.pe__box {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(0.82rem, 1.8vw, 1.05rem);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 1rem;
}
.pe__box--exit {
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.pe__box--exit::-webkit-scrollbar { display: none; }
.pe__ctrl {
  color: #ff5b6b;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255,91,107,0.5);
}
.pe__killed {
  color: rgba(0, 200, 50, 0.45);
  font-size: 0.82em;
  margin-bottom: 0.3rem;
}
.pe__cmd { color: #00ff41; }
.pe__prompt { color: #00cc33; }
.pe__path { color: #6ea8ff; }
.pe__opening { color: rgba(0,255,65,0.5); font-size: 0.88em; margin-top: 0.15rem; }
.pe__caret {
  display: inline-block;
  animation: peCaretBlink 0.55s steps(1) infinite;
  color: #00ff41;
  text-shadow: 0 0 8px #00ff41;
}
@keyframes peCaretBlink { 50% { opacity: 0; } }

/* everything lowercase */
*:not(input):not(textarea):not([contenteditable]) {
  text-transform: lowercase !important;
}

/* ============================================================
   Rain background video
   ============================================================ */
#rain-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
  opacity: 0.05;
  transition: opacity 0.2s, filter 0.05s, transform 0.05s;
}
