/* ============================================================
   CaptainPepe Portfolio — Framer-grade dark compute 2026
   ============================================================ */

:root {
  --bg-0: #050816;
  --bg-1: #0b1b33;
  --bg-card: rgba(12, 22, 42, 0.62);
  --bg-card-solid: #0c162a;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --cyan: #22d3ee;
  --mint: #19ffe0;
  --violet: #7c3aed;
  --text: #f7f7f8;
  --muted: #9aa3b2;
  --radius: 22px;
  --radius-sm: 14px;
  --nav-h: 68px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --glow-cyan: 0 0 40px rgba(34, 211, 238, 0.28);
  --max: 1100px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background: linear-gradient(165deg, var(--bg-0) 0%, #071226 45%, var(--bg-1) 100%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--bg-0);
  font-weight: 600;
  border-radius: 8px;
}
.skip-link:focus {
  left: 8px;
}

/* ---------- Atmosphere ---------- */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 49;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(5, 8, 22, 0.65) 100%);
}

.aurora {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.34;
  will-change: transform;
  animation: aurora-drift 28s var(--ease) infinite alternate;
}

.aurora__blob--1 {
  width: 55vw;
  height: 55vw;
  max-width: 640px;
  max-height: 640px;
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.5), transparent 70%);
}

.aurora__blob--2 {
  width: 45vw;
  height: 45vw;
  max-width: 520px;
  max-height: 520px;
  top: 28%;
  right: -12%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.45), transparent 70%);
  animation-delay: -9s;
  animation-duration: 34s;
}

.aurora__blob--3 {
  width: 40vw;
  height: 40vw;
  max-width: 440px;
  max-height: 440px;
  bottom: -8%;
  left: 28%;
  background: radial-gradient(circle, rgba(25, 255, 224, 0.28), transparent 70%);
  animation-delay: -16s;
  animation-duration: 32s;
}

@keyframes aurora-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3%, 5%, 0) scale(1.06); }
}

.cursor-glow {
  display: none;
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 40;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 65%);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition: opacity 0.35s;
  opacity: 0;
}

@media (pointer: fine) {
  .cursor-glow { display: block; }
}

/* ---------- Layout ---------- */
.section {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
  padding: 80px 0 20px;
}

.section__head {
  margin-bottom: 36px;
  max-width: 560px;
}

.section__head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.8vw, 2.55rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-top: 10px;
}

.section__desc {
  color: var(--muted);
  margin-top: 10px;
  font-size: 1.02rem;
  line-height: 1.55;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.mono {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Glass ---------- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 48px rgba(0, 0, 0, 0.28);
  transition:
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    transform 0.45s var(--ease);
}

.glass-card:hover {
  border-color: var(--hairline-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(34, 211, 238, 0.12),
    0 28px 64px rgba(0, 0, 0, 0.38),
    var(--glow-cyan);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  background: rgba(5, 8, 22, 0.78);
  border-bottom: 1px solid var(--hairline);
  opacity: 0;
  transform: translateY(-16px);
}

body.is-ready .nav {
  animation: nav-in 0.85s var(--ease-out) 0.05s both;
}

@keyframes nav-in {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav__inner {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.22);
  background: #0a0a0a;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.nav__logo span { color: var(--cyan); }

.nav__links {
  display: none;
  gap: 20px;
  margin-left: auto;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}
.nav__links a {
  position: relative;
  transition: color 0.25s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav__socials {
  display: none;
  gap: 4px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--hairline);
  transform: translateY(-2px) scale(1.04);
}

.lang-toggle {
  display: flex;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.03);
}

.lang-btn {
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 7px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.lang-btn.is-active {
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
}

.nav__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 10px;
}
.nav__burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease);
}
.nav__burger[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}
.nav__burger[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.nav__mobile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 20px;
  background: rgba(5, 8, 22, 0.96);
  border-bottom: 1px solid var(--hairline);
}
.nav__mobile[hidden] { display: none !important; }
.nav__mobile a {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 500;
  color: var(--muted);
}
.nav__mobile a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__socials { display: flex; }
  .nav__burger { display: none; }
  .nav__actions { margin-left: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition:
    box-shadow 0.3s var(--ease),
    background 0.3s,
    border-color 0.3s,
    filter 0.3s;
  will-change: transform;
}

.btn--primary {
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  color: var(--bg-0);
  box-shadow: 0 8px 28px rgba(34, 211, 238, 0.32);
}
.btn--primary:hover {
  box-shadow: 0 14px 40px rgba(34, 211, 238, 0.5);
  filter: brightness(1.05);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--hairline-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.15);
}

/* Secondary filled — equal weight to primary without matching cyan glow */
.btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.38);
  color: var(--text);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(34, 211, 238, 0.12);
}
.btn--secondary img {
  opacity: 0.95;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 14px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--cyan);
  transition: color 0.2s, transform 0.3s var(--ease);
}
.text-link:hover {
  color: var(--mint);
  transform: translateX(3px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: 36px;
  padding-bottom: 40px;
  overflow: visible;
}

.hero__stage {
  position: relative;
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero__stage {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 0;
    min-height: 560px;
  }
  .hero__copy {
    padding-right: 8px;
  }
  .hero__visual {
    margin-left: -48px;
  }
}

.hero__copy {
  position: relative;
  z-index: 3;
  max-width: 520px;
}

.hero__kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--mint);
  margin-bottom: 14px;
}

/* Safari-safe solid white name — NEVER opacity 0 / never background-clip */
.hero__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 5.1rem);
  letter-spacing: -0.048em;
  line-height: 0.94;
  color: #ffffff;
}

.hero__name-text {
  display: inline-block;
  opacity: 1 !important;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  text-shadow: 0 0 64px rgba(34, 211, 238, 0.2);
}

.hero__sub {
  margin-top: 10px;
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--muted);
}

.hero__lead {
  margin-top: 18px;
  max-width: 36ch;
  font-size: 1.05rem;
  color: #c5ccd8;
  line-height: 1.65;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin-top: 26px;
}
.hero__ctas .btn {
  min-height: 46px;
  padding: 12px 20px;
}
.flagship__links .btn {
  min-height: 44px;
}

.hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.hero__pills li {
  padding: 6px 13px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

/* Beer Pepe hero — clean bust, no step/pill composition */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
  z-index: 2;
}

@media (min-width: 960px) {
  .hero__visual {
    justify-content: flex-end;
    min-height: 520px;
    margin-right: -8px;
  }
}

.hero__glow {
  position: absolute;
  width: min(100%, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 40%, rgba(34, 211, 238, 0.32), rgba(124, 58, 237, 0.14) 52%, transparent 72%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero__pepe-wrap {
  position: relative;
  z-index: 2;
  width: min(92%, 380px);
  /* Soft depth only — no white halo */
  filter:
    drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 28px rgba(34, 211, 238, 0.18));
}

@media (min-width: 960px) {
  .hero__pepe-wrap {
    width: min(100%, 440px);
  }
}

.hero__pepe {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
  background: transparent;
}

/* ---------- Hero entrance (Framer-grade stagger) ---------- */
.hero-enter {
  opacity: 1;
  transform: translateY(0);
}

/* Explicit from/to keyframes */
@keyframes hero-enter-kf {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Name: transform + filter ONLY — never opacity 0 (Safari) */
@keyframes hero-name-kf {
  from {
    transform: translateY(28px) scale(0.98);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

/* Safety: if JS never flips is-ready, force visible after 2.8s */
.hero-enter {
  animation: enter-safety 0.01s linear 2.8s forwards;
}
@keyframes enter-safety {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
/* When ready, replace safety with real entrance (name uses transform-only kf) */
body.is-ready .hero-enter {
  animation: hero-enter-kf 0.95s var(--ease-out) both;
}
body.is-ready .hero__name.hero-enter {
  animation: hero-name-kf 1s var(--ease-out) both;
}
body.is-ready .hero-enter[data-enter="1"] { animation-delay: 0.12s; }
body.is-ready .hero-enter[data-enter="2"] { animation-delay: 0.22s; }
body.is-ready .hero-enter[data-enter="3"] { animation-delay: 0.34s; }
body.is-ready .hero-enter[data-enter="4"] { animation-delay: 0.46s; }
body.is-ready .hero-enter[data-enter="5"] { animation-delay: 0.58s; }
body.is-ready .hero-enter[data-enter="6"] { animation-delay: 0.7s; }

/* ---------- Now / hardware ---------- */
.now__grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .now__grid { grid-template-columns: repeat(3, 1fr); }
}

.card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.22);
  color: var(--cyan);
  margin-bottom: 14px;
}
.card__icon i {
  width: 20px;
  height: 20px;
}

.glass-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.spec-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.spec-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  font-size: 0.88rem;
  color: var(--muted);
}
.spec-list strong {
  color: var(--text);
  font-weight: 600;
}

.skills { margin-top: 32px; }
.skills__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 14px;
}
/* Equal rows: 4+4 on desktop, 2+2+2+2 on tablet, 1-col on narrow */
.skills__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 520px) {
  .skills__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .skills__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
  font-weight: 500;
  width: 100%;
  min-width: 0;
  transition: border-color 0.25s, background 0.25s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.skill-chip:hover {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.06);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.skill-chip i {
  width: 18px;
  height: 18px;
  color: var(--cyan);
  flex-shrink: 0;
}
.skill-chip img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.skill-chip__mark {
  border-radius: 4px;
  object-fit: contain;
}

/* ---------- Flagship Cysic ---------- */
.flagship {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

@media (min-width: 860px) {
  .flagship {
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
  }
}

.flagship__media {
  position: relative;
  /* Same card/site surface — no separate navy plate behind the duo */
  background: transparent;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.flagship__portrait-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(124, 58, 237, 0.16);
  transition: transform 0.45s var(--ease), box-shadow 0.45s;
}
.flagship__portrait-wrap:hover {
  transform: scale(1.015);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.55),
    0 0 56px rgba(34, 211, 238, 0.18);
}

/* Duo bust — transparent PNG directly on card bg (no wash / frame / plate) */
.flagship__portrait-wrap--duo {
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.flagship__portrait-wrap--duo:hover {
  transform: none;
  box-shadow: none;
}

.flagship__portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 400px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.flagship__portrait--duo {
  aspect-ratio: 983 / 1026;
  max-height: 440px;
  object-fit: contain;
  object-position: center center;
  background: transparent;
  /* Subtle neutral depth only — no cyan rim / tint filters */
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.45));
}

.flagship__portrait-wrap--duo .flagship__banner-cap {
  border-radius: 0;
  /* Soft label only — no dark plate gradient under the duo */
  background: transparent;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
  padding: 8px 4px 0;
}

/* Duo: no shine overlay (soft-light recolors Pepe green) */
.flagship__portrait-wrap--duo .flagship__portrait-shine {
  display: none;
}

.flagship__portrait-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 35%,
    transparent 65%,
    rgba(34, 211, 238, 0.08) 100%
  );
  mix-blend-mode: soft-light;
}

.flagship__banner-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #e8eef8;
  background: linear-gradient(transparent, rgba(5, 8, 22, 0.92));
}

.flagship__og-pill {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(5, 8, 22, 0.78);
  border: 1px solid rgba(34, 211, 238, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.flagship__og-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(25, 255, 224, 0.8);
  animation: og-pulse 2.4s ease-in-out infinite;
}
@keyframes og-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.flagship__body {
  padding: 28px 30px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.badge {
  padding: 5px 11px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}
.badge--accent {
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.flagship__text {
  font-size: 1.05rem;
  color: #c8d0dc;
  line-height: 1.7;
  max-width: 48ch;
}

.flagship__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.flagship__links .text-link {
  margin-top: 0;
  padding-top: 0;
}

/* ---------- Projects — typography-first cards ---------- */
.projects__grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .projects__grid { grid-template-columns: repeat(4, 1fr); }
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px 22px 22px;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.project-card:hover::before {
  opacity: 1;
}

.project-card__index {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: rgba(34, 211, 238, 0.55);
  margin-bottom: 14px;
}

.project-card h3 {
  font-size: 1.22rem;
  margin-bottom: 2px;
}

.project-card__aka {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 12px;
  font-weight: 500;
}

.project-card > p:not(.project-card__aka):not(.project-card__index) {
  color: #b4bdc9;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 14px;
  flex-grow: 1;
}

.project-card .badge-row {
  margin-bottom: 0;
}

.project-card .text-link {
  margin-top: 16px;
  padding-top: 0;
}

/* ---------- Team / Node runners — full-bleed band ---------- */
.team-bleed {
  position: relative;
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 56px;
  margin-bottom: 0;
  padding: 80px 0 72px;
  /* Full viewport-width rectangle — clearly distinct band */
  background:
    radial-gradient(ellipse 55% 90% at 10% 40%, rgba(124, 58, 237, 0.28), transparent 58%),
    radial-gradient(ellipse 50% 80% at 92% 55%, rgba(34, 211, 238, 0.16), transparent 55%),
    linear-gradient(180deg, #070d1c 0%, #0a1228 55%, #08101f 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(34, 211, 238, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(34, 211, 238, 0.08);
  overflow: hidden;
}

.team-bleed::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    90deg,
    transparent,
    rgba(34, 211, 238, 0.04) 40%,
    rgba(124, 58, 237, 0.05) 60%,
    transparent
  );
}

.team-bleed__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.team__card {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  width: 100%;
  max-width: none;
  padding: 28px 32px;
  box-sizing: border-box;
}

@media (min-width: 720px) {
  .team__card {
    padding: 32px 40px;
    gap: 32px;
  }
  .team__card p {
    max-width: 62ch;
  }
}

/* Hardware / node ops strip — break out of .section max-width to full viewport */
.nodes-bleed {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 36px 0 40px;
  background:
    radial-gradient(ellipse 45% 140% at 15% 50%, rgba(34, 211, 238, 0.14), transparent 62%),
    radial-gradient(ellipse 40% 120% at 85% 50%, rgba(124, 58, 237, 0.12), transparent 60%),
    linear-gradient(180deg, #060b18 0%, #0a1426 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(34, 211, 238, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(0, 0, 0, 0.25);
}

.nodes-bleed__inner {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.team__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #c4b5fd;
}
.team__icon i {
  width: 24px;
  height: 24px;
}

.team__card h3 { margin-bottom: 8px; }
.team__card p { color: #b8c0ce; font-size: 0.98rem; }

.team__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.team__tags li {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #c4b5fd;
}

/* ---------- Contact ---------- */
.contact__strip {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 34px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(124, 58, 237, 0.1));
}

@media (min-width: 800px) {
  .contact__strip {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.contact__strip h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  letter-spacing: -0.03em;
  margin: 8px 0 10px;
}

.contact__strip p:last-of-type { color: var(--muted); }

.contact__btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  flex-shrink: 0;
}

.contact__btns .btn {
  width: 100%;
  justify-content: center;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 56px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--hairline);
}

.footer__inner {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 0.92rem;
}
.footer__brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  background: #0a0a0a;
  border: 1px solid var(--hairline);
}

.footer__copy {
  color: var(--muted);
  font-size: 0.84rem;
}

/* ---------- Section transitions (between sections) ---------- */
.section-motion {
  --section-progress: 0;
  position: relative;
  opacity: 0;
  transform: translate3d(0, 84px, 0) scale(0.965);
  filter: blur(10px);
  /* Safari-safe: opacity + transform + filter (no mandatory clip-path) */
  transition:
    opacity 1.05s var(--ease-out),
    transform 1.1s var(--ease-out),
    filter 0.95s var(--ease-out);
  will-change: opacity, transform, filter;
  animation: section-safety 0.01s linear 3.2s forwards;
}

/* Soft divider glow between sections */
.section-motion::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate3d(-50%, 0, 0) scaleX(0.35);
  width: min(72%, 640px);
  height: 1px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(34, 211, 238, 0.55) 35%,
    rgba(124, 58, 237, 0.5) 65%,
    transparent
  );
  box-shadow:
    0 0 18px 2px rgba(34, 211, 238, 0.22),
    0 0 40px 6px rgba(124, 58, 237, 0.12);
  transition:
    opacity 0.9s var(--ease-out) 0.12s,
    transform 1.15s var(--ease-out) 0.08s;
}

.section-motion.is-inview::after {
  opacity: 1;
  transform: translate3d(-50%, 0, 0) scaleX(1);
}

@keyframes section-safety {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.section-motion.is-inview {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  animation: none;
}


/* Full-bleed bands already have borders — skip divider glow */
.team-bleed.section-motion::after,
.nodes-bleed.section-motion::after {
  display: none;
}
/* Exit when leaving upward (class toggled by JS) */
.section-motion.is-exiting {
  opacity: 0.35;
  transform: translate3d(0, -36px, 0) scale(0.985);
  filter: blur(4px);
}

/* Optional clip-path when supported (not Safari-critical) */
@supports (clip-path: inset(0)) {
  .section-motion:not(.is-inview) {
    clip-path: inset(12% 0 10% 0);
  }
  .section-motion.is-inview {
    /* Negative inset: section box stays for layout, but nothing gets clipped —
       hover tilt/lift and full-bleed bands can extend past section bounds */
    clip-path: inset(-120px -50vw);
    transition:
      opacity 1.05s var(--ease-out),
      transform 1.1s var(--ease-out),
      filter 0.95s var(--ease-out),
      clip-path 1.2s var(--ease-out);
  }
}

/* Parallax layer hook (JS sets --parallax-y on head) */
.section-motion .section__head {
  --parallax-y: 0;
  transform: translate3d(0, calc(var(--parallax-y) * 1px), 0);
  transition: transform 0.35s linear;
}

/* Staggered children as section enters */
.section-motion .reveal,
.section-motion .reveal-stagger > * {
  --stagger-i: 0;
}

.section-motion.is-inview > .reveal:nth-child(1),
.section-motion.is-inview .section__head.reveal,
.section-motion.is-inview .team-bleed__inner > .section__head.reveal {
  transition-delay: 0.05s;
}
.section-motion.is-inview > .reveal:nth-child(2),
.section-motion.is-inview .flagship.reveal,
.section-motion.is-inview .team__card.reveal,
.section-motion.is-inview .contact__strip.reveal {
  transition-delay: 0.16s;
}
.section-motion.is-inview .reveal-stagger .reveal:nth-child(1) { transition-delay: 0.12s; }
.section-motion.is-inview .reveal-stagger .reveal:nth-child(2) { transition-delay: 0.24s; }
.section-motion.is-inview .reveal-stagger .reveal:nth-child(3) { transition-delay: 0.36s; }
.section-motion.is-inview .reveal-stagger .reveal:nth-child(4) { transition-delay: 0.48s; }
.section-motion.is-inview .reveal-stagger .reveal:nth-child(5) { transition-delay: 0.6s; }
.section-motion.is-inview .reveal-stagger .reveal:nth-child(6) { transition-delay: 0.72s; }

/* ---------- Scroll reveal (blur → sharp + rise) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(48px) scale(0.98);
  filter: blur(12px);
  transition:
    opacity 0.95s var(--ease-out),
    transform 1s var(--ease-out),
    filter 0.9s var(--ease-out);
  /* Safari / no-JS safety */
  animation: reveal-safety 0.01s linear 2.8s forwards;
}

@keyframes reveal-safety {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  animation: none;
}

.reveal-stagger .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger .reveal:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger .reveal:nth-child(3) { transition-delay: 0.24s; }
.reveal-stagger .reveal:nth-child(4) { transition-delay: 0.36s; }
.reveal-stagger .reveal:nth-child(5) { transition-delay: 0.48s; }
.reveal-stagger .reveal:nth-child(6) { transition-delay: 0.6s; }

[data-tilt] {
  transform-style: preserve-3d;
}

/* Magnetic soft scale on hover (JS adds translate; CSS adds glow lift) */
.magnetic {
  transition:
    box-shadow 0.3s var(--ease),
    background 0.3s,
    border-color 0.3s,
    filter 0.3s,
    transform 0.15s linear;
}

/* ---------- Reduced motion — hard kill-switch ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .aurora__blob,
  .nav,
  body.is-ready .nav,
  .hero-enter,
  body.is-ready .hero-enter,
  body.is-ready .hero__name.hero-enter,
  .flagship__og-pill-dot {
    animation: none !important;
  }

  .cursor-glow { display: none !important; }

  .nav,
  body.is-ready .nav {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__name-text,
  .hero-enter,
  body.is-ready .hero-enter {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
  }

  .hero__name-text {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  .reveal,
  .section-motion,
  .section-motion.is-inview,
  .section-motion.is-exiting {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
    clip-path: none !important;
  }

  .section-motion::after,
  .section-motion.is-inview::after {
    opacity: 0 !important;
    transition: none !important;
    transform: none !important;
  }

  .section-motion .section__head {
    transform: none !important;
  }

  .hero__pepe-wrap,
  .flagship__portrait--duo {
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.45)) !important;
  }

  .magnetic { transform: none !important; }
  .flagship__portrait-wrap:hover { transform: none; }
  .skill-chip:hover { transform: none; }
  .text-link:hover { transform: none; }
  .glass-card:hover { transform: none; }

}

@media (min-width: 1440px) {
  :root { --max: 1180px; }
  .section { padding-top: 96px; }
}

/* ============================================================
   Polish — mono accents, spotlight, progress, scroll-spy
   ============================================================ */

/* Technical monospace accents (text unchanged, typeface only) */
.eyebrow,
.mono,
.hero__kicker,
.badge,
.project-card__index,
.flagship__og-pill,
.hero__pills li,
.team__tags li,
.lang-btn,
.footer__copy {
  font-family: var(--font-mono);
}
.eyebrow { letter-spacing: 0.16em; }
.project-card__index { letter-spacing: 0.2em; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: scaleX(var(--sp, 0));
  background: linear-gradient(90deg, var(--cyan), var(--mint) 45%, var(--violet));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
}

/* Card spotlight — soft glow follows the cursor inside glass cards */
.glass-card { position: relative; }
.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 50%),
    rgba(34, 211, 238, 0.09),
    transparent 62%
  );
}
.glass-card:hover::after { opacity: 1; }

/* Primary button sheen sweep */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -70%;
  width: 45%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s var(--ease);
}
.btn--primary:hover::before { left: 130%; }

/* Skill chip micro-sheen */
.skill-chip { position: relative; overflow: hidden; }
.skill-chip::after {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -80%;
  width: 50%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease);
}
.skill-chip:hover::after { left: 140%; }

/* Scroll-spy active nav link */
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after { transform: scaleX(1); }

/* Hero breathing life */
@media (min-width: 960px) {
  .hero__pepe-wrap { animation: pepe-float 7s ease-in-out infinite; }
}
@keyframes pepe-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero__glow { animation: glow-breathe 6.5s ease-in-out infinite; }
@keyframes glow-breathe {
  0%, 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.09); }
}

/* Scrollbar + selection */
html { scrollbar-width: thin; scrollbar-color: rgba(34, 211, 238, 0.4) #050816; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #050816; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.55), rgba(124, 58, 237, 0.55));
  border-radius: 999px;
  border: 2px solid #050816;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.8), rgba(124, 58, 237, 0.8));
}
::selection { background: rgba(34, 211, 238, 0.32); color: #ffffff; }

/* Reduced motion — polish kill-switch */
@media (prefers-reduced-motion: reduce) {
  .hero__pepe-wrap,
  .hero__glow { animation: none !important; }
  .btn--primary::before,
  .skill-chip::after,
  .glass-card::after { display: none; }
}

/* ============================================================
   Wave 2 — background shimmer + hero Pepe FX
   ============================================================ */

/* Aurora hue shimmer — slow color cross-fade */
.aurora__blob--1 { animation: aurora-drift 28s var(--ease) infinite alternate, aurora-hue 18s ease-in-out infinite alternate; }
.aurora__blob--2 { animation: aurora-drift 34s var(--ease) infinite alternate, aurora-hue 22s ease-in-out infinite alternate-reverse; }
.aurora__blob--3 { animation: aurora-drift 32s var(--ease) infinite alternate, aurora-hue 26s ease-in-out infinite alternate; }
@keyframes aurora-hue {
  0%   { filter: blur(100px) hue-rotate(0deg);   opacity: 0.30; }
  50%  { filter: blur(110px) hue-rotate(28deg);  opacity: 0.42; }
  100% { filter: blur(100px) hue-rotate(-18deg); opacity: 0.32; }
}

/* Rotating orbit ring behind hero Pepe */
.hero__pepe-wrap::before {
  content: "";
  position: absolute;
  inset: -6%;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(34, 211, 238, 0.55) 40deg,
    transparent 90deg,
    transparent 180deg,
    rgba(124, 58, 237, 0.5) 220deg,
    transparent 270deg
  );
  -webkit-mask: radial-gradient(circle, transparent 61%, #000 62.5%, #000 65%, transparent 66.5%);
  mask: radial-gradient(circle, transparent 61%, #000 62.5%, #000 65%, transparent 66.5%);
  animation: orbit-spin 14s linear infinite;
  opacity: 0.9;
}
@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

/* Second counter-ring, opposite direction, thinner */
.hero__pepe-wrap::after {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: -2;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    transparent 0deg,
    rgba(25, 255, 224, 0.35) 30deg,
    transparent 70deg,
    transparent 250deg,
    rgba(124, 58, 237, 0.3) 290deg,
    transparent 330deg
  );
  -webkit-mask: radial-gradient(circle, transparent 70%, #000 71%, #000 72%, transparent 73%);
  mask: radial-gradient(circle, transparent 70%, #000 71%, #000 72%, transparent 73%);
  animation: orbit-spin 22s linear infinite reverse;
  opacity: 0.7;
}

/* Pepe hover — chromatic split + glow surge */
.hero__pepe-wrap { transition: filter 0.5s var(--ease); }
@media (hover: hover) {
  .hero__pepe-wrap:hover {
    filter:
      drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55))
      drop-shadow(4px 0 0 rgba(34, 211, 238, 0.35))
      drop-shadow(-4px 0 0 rgba(244, 63, 94, 0.28))
      drop-shadow(0 0 46px rgba(34, 211, 238, 0.4));
  }
}

/* Section titles — slow gradient shimmer */
.section__head h2 {
  background-image: linear-gradient(
    100deg,
    var(--text) 0%,
    var(--text) 38%,
    #7deeff 47%,
    #b388ff 53%,
    var(--text) 62%,
    var(--text) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text);
  animation: title-shimmer 9s var(--ease) infinite;
}
@keyframes title-shimmer {
  0%, 55% { background-position: 120% 0; }
  85%, 100% { background-position: -60% 0; }
}

/* Reduced motion — wave 2 kill-switch */
@media (prefers-reduced-motion: reduce) {
  .aurora__blob--1,
  .aurora__blob--2,
  .aurora__blob--3 { animation: none !important; }
  .hero__pepe-wrap::before,
  .hero__pepe-wrap::after { display: none; }
  .section__head h2 { animation: none !important; background-image: none !important; -webkit-text-fill-color: currentColor; }
}

/* ============================================================
   Wave 3 — starfield, nav scroll state, border beam, ripple
   ============================================================ */

/* Starfield canvas */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
}

/* Nav — solidifies after scroll */
.nav {
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(5, 8, 22, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: rgba(34, 211, 238, 0.16);
  box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(34, 211, 238, 0.08);
}

/* Flagship — animated border beam (needs @property; degrades silently) */
@property --beam-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
.flagship { position: relative; }
.flagship::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  z-index: 5;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 0deg 200deg,
    rgba(34, 211, 238, 0.9) 260deg,
    rgba(124, 58, 237, 0.9) 300deg,
    transparent 340deg 360deg
  );
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: beam-rotate 7s linear infinite;
}
@keyframes beam-rotate {
  to { --beam-angle: 360deg; }
}

/* Button ripple */
.btn { position: relative; overflow: hidden; }
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: scale(0);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.12) 60%, transparent 70%);
  animation: ripple-kf 0.65s var(--ease) forwards;
}
.btn--ghost .ripple,
.btn--secondary .ripple {
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), rgba(34, 211, 238, 0.1) 60%, transparent 70%);
}
@keyframes ripple-kf {
  to { transform: scale(2.6); opacity: 0; }
}

/* Footer — glowing seam line */
.footer { position: relative; }
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.5), rgba(124, 58, 237, 0.5), transparent);
  background-size: 200% 100%;
  animation: seam-slide 8s linear infinite;
}
@keyframes seam-slide {
  to { background-position: -200% 0; }
}

/* Icon buttons — playful lift */
.icon-btn { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease); }
.icon-btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 22px -8px rgba(34, 211, 238, 0.5);
}

/* Reduced motion — wave 3 kill-switch */
@media (prefers-reduced-motion: reduce) {
  #starfield { display: none; }
  .flagship::before { display: none; }
  .footer::before { animation: none; }
  .btn .ripple { display: none; }
}

/* ============================================================
   Wave 4 — MAX WOW: fx canvas, pepe wow, rainbow mode,
   hero parallax, breathing cards, floating chips, beam buttons
   ============================================================ */

/* Particle FX canvas */
.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}

/* Hero mouse parallax (translate prop — independent of entrance transform) */
.hero__visual {
  translate: calc(var(--mx, 0) * 16px) calc(var(--my, 0) * 12px);
  transition: translate 0.35s ease-out;
}
.hero__glow {
  transform: translate(-50%, calc(-50% + var(--sy, 0px)));
}

/* Pepe click — jump + glitch + chromatic shake */
.hero__pepe-wrap { cursor: pointer; }
.hero__pepe-wrap.is-wow .hero__pepe {
  animation: pepe-wow 0.95s var(--ease);
}
@keyframes pepe-wow {
  0%   { transform: translateY(0) scale(1); filter: none; }
  15%  { transform: translateY(-26px) scale(1.07, 0.92); filter: hue-rotate(80deg) saturate(1.8); }
  30%  { transform: translateY(4px) scale(0.94, 1.08) translateX(7px); filter: hue-rotate(-130deg) brightness(1.35); }
  45%  { transform: translateY(-14px) translateX(-7px); filter: hue-rotate(190deg) saturate(2.2); }
  60%  { transform: translateY(2px) translateX(4px) scale(1.03, 0.97); filter: hue-rotate(-60deg); }
  75%  { transform: translateY(-6px) translateX(-2px); filter: brightness(1.2); }
  100% { transform: translateY(0) scale(1); filter: none; }
}

/* Emoji pop burst around Pepe */
.emoji-pop {
  position: absolute;
  left: 50%;
  top: 42%;
  font-size: 1.7rem;
  pointer-events: none;
  z-index: 12;
  opacity: 0;
  animation: emoji-fly 1.15s var(--ease-out) forwards;
}
@keyframes emoji-fly {
  0%   { opacity: 1; translate: -50% -50%; scale: 0.5; }
  20%  { opacity: 1; scale: 1.25; }
  100% { opacity: 0; translate: calc(-50% + var(--dx, 0px)) calc(-50% + var(--dy, -120px)); scale: 1.15; rotate: var(--rot, 30deg); }
}

/* Rainbow mode (5 clicks on Pepe / Konami code) */
body.rainbow .aurora { animation: rainbow-hue 1.4s linear infinite; }
@keyframes rainbow-hue { to { filter: hue-rotate(360deg); } }
body.rainbow .nav.is-scrolled,
body.rainbow .nav {
  border-bottom-color: rgba(255, 0, 128, 0.4);
  box-shadow: 0 6px 34px -10px rgba(255, 0, 200, 0.45);
}
body.rainbow .scroll-progress {
  background: linear-gradient(90deg, #ff0080, #ff8c00, #ffee00, #00ff88, #00cfff, #8800ff, #ff0080);
  background-size: 400% 100%;
  animation: rainbow-bar 1.2s linear infinite;
}
@keyframes rainbow-bar { to { background-position: 400% 0; } }

/* Project cards — breathing glow wave */
.project-card { animation: card-breathe 7.5s ease-in-out infinite; }
.project-card:nth-of-type(2) { animation-delay: -2s; }
.project-card:nth-of-type(3) { animation-delay: -4s; }
.project-card:nth-of-type(4) { animation-delay: -6s; }
@keyframes card-breathe {
  0%, 100% { box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.6); }
  50%      { box-shadow: 0 12px 50px -14px rgba(34, 211, 238, 0.3), 0 0 0 1px rgba(34, 211, 238, 0.12); }
}

/* Skill chips — ambient float */
.skill-chip { animation: chip-float 5.5s ease-in-out infinite; }
.skill-chip:nth-child(odd)  { animation-delay: -2.7s; }
.skill-chip:nth-child(3n)   { animation-delay: -1.3s; }
.skill-chip:nth-child(5n)   { animation-delay: -4.1s; }
@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3.5px); }
}

/* Primary buttons — orbiting border beam */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: conic-gradient(
    from var(--beam-angle, 0deg),
    transparent 0deg 200deg,
    rgba(255, 255, 255, 0.95) 265deg,
    rgba(124, 58, 237, 0.9) 305deg,
    transparent 340deg 360deg
  );
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: beam-rotate 3.6s linear infinite;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.5s;
  pointer-events: none;
}
.scroll-hint__mouse {
  width: 20px;
  height: 32px;
  border: 1.5px solid rgba(34, 211, 238, 0.5);
  border-radius: 11px;
  position: relative;
}
.scroll-hint__mouse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--cyan);
  animation: wheel-drop 1.6s var(--ease) infinite;
}
@keyframes wheel-drop {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(11px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
.scroll-hint.is-hidden { opacity: 0; }

/* Reduced motion — wave 4 kill-switch */
@media (prefers-reduced-motion: reduce) {
  .fx-canvas { display: none; }
  .hero__visual { translate: none; }
  .hero__pepe-wrap.is-wow .hero__pepe { animation: none; }
  .emoji-pop { display: none; }
  .project-card,
  .skill-chip { animation: none !important; }
  .btn--primary::after { display: none; }
  .scroll-hint__mouse::after { animation: none; }
}

/* ============================================================
   Wave 5 — cursor aura, scramble titles, Ken Burns, finale
   ============================================================ */

/* Cursor aura (native cursor stays) */
.cursor-dot,
.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.35s;
  border-radius: 50%;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.9);
}
.cursor-ring {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1.5px solid rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.18), inset 0 0 14px rgba(34, 211, 238, 0.1);
}
.cursor-dot.is-on,
.cursor-ring.is-on { opacity: 1; }

/* Ken Burns breathing on flagship portrait */
.flagship__portrait-wrap--duo .flagship__portrait {
  animation: kenburns 16s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.045) translateY(-6px); }
}

/* Scramble titles — monospace-ish flicker handled in JS; keep layout stable */
.section__head h2 { min-height: 1.1em; }

/* Reduced motion — wave 5 kill-switch */
@media (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none; }
  .flagship__portrait-wrap--duo .flagship__portrait { animation: none !important; }
}
