/* ============================================================
   NEURAL VOID — portfolio theme for Joseph Chijioke Emmanuel
   Palette: void black · bone white · acid chartreuse
   Type:    Clash Display / General Sans / JetBrains Mono
   ============================================================ */

:root {
  --void: #050507;
  --void-2: #0a0a10;
  --void-3: #101018;
  --bone: #f2f0ea;
  --bone-dim: #9b998f;
  --acid: #c6ff00;
  --void-rgb: 5, 5, 7;
  --bone-rgb: 242, 240, 234;
  --acid-rgb: 198, 255, 0;
  --acid-dim: rgba(var(--acid-rgb), 0.12);
  --line: rgba(var(--bone-rgb), 0.08);
  --line-a: 0.08;

  --font-display: "Clash Display", sans-serif;
  --font-body: "General Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.83, 0, 0.17, 1);
}

/* ============ LIGHT MODE — "PAPER LAB" ============
   inverted lab-notebook take on the same brand:
   warm paper, ink text, olive-acid accents          */
:root[data-theme="light"] {
  --void: #f4f2ea;
  --void-2: #eceadf;
  --void-3: #e3e1d4;
  --bone: #131310;
  --bone-dim: #6b6a5e;
  --acid: #5c7c0a;
  --void-rgb: 244, 242, 234;
  --bone-rgb: 19, 19, 16;
  --acid-rgb: 92, 124, 10;
  --line: rgba(var(--bone-rgb), 0.12);
}
:root[data-theme="light"] .grain { opacity: 0.07; }
:root[data-theme="light"] .outline { -webkit-text-stroke-width: 1.8px; }
:root[data-theme="light"] .btn--primary {
  background: var(--bone); color: var(--void); border-color: var(--bone);
}
:root[data-theme="light"] .btn--primary::before { background: var(--acid); }
:root[data-theme="light"] .photo-frame img { filter: grayscale(10%) contrast(1.02); }
body { transition: background 0.45s, color 0.45s; }

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

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--acid); color: var(--void); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--void-3); border: 2px solid var(--void); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--acid); }

.mono { font-family: var(--font-mono); }
.acid { color: var(--acid); }

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

.acid-link {
  color: var(--acid);
  border-bottom: 1px solid var(--acid);
  transition: background 0.25s, color 0.25s;
}
.acid-link:hover { background: var(--acid); color: var(--void); }

/* outlined display text */
.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--bone);
}

/* ============ GRAIN + GRID OVERLAYS ============ */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.7s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

.gridlines {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 75%);
}

/* ============ CINEMATIC INTRO — PARTICLE GENESIS ============ */
@keyframes blink { 50% { opacity: 0; } }
.intro {
  position: fixed; inset: 0;
  z-index: 10000;
  overflow: hidden;
  background: var(--void);
  will-change: opacity, background;
  contain: strict;
  transition: background 0.7s var(--ease-out), opacity 0.6s var(--ease-out);
}
.intro.reveal { background: transparent; }
.intro.reveal .intro__sub,
.intro.reveal .intro__percent,
.intro.reveal .intro__skip { opacity: 0; }
.intro.gone { display: none; }
#intro-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.intro__sub {
  position: absolute;
  top: calc(50% + clamp(46px, 9vw, 110px));
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: clamp(0.55rem, 1.7vw, 0.78rem);
  letter-spacing: 0.32em;
  color: var(--acid);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
.intro__sub.on { opacity: 1; }
.intro__percent {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(0.6rem, 1.6vw, 0.74rem);
  letter-spacing: 0.3em;
  color: var(--bone-dim);
  transition: opacity 0.4s;
}
/* the site warps in as the intro dissolves — transform/opacity only,
   so it stays on the GPU compositor and never janks */
main, .nav {
  transition: transform 1s var(--ease-out), opacity 1s var(--ease-out);
  will-change: transform, opacity;
}
main.warp { transform: scale(1.06); opacity: 0; }
.nav.warp { opacity: 0; transform: translateY(-12px); }
.intro__skip {
  position: absolute;
  bottom: 28px; right: 32px;
  background: none;
  border: 1px solid var(--line);
  color: var(--bone-dim);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  padding: 10px 18px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, opacity 0.35s;
  z-index: 2;
}
.intro__skip:hover { color: var(--acid); border-color: var(--acid); }
.intro__flash {
  position: absolute; inset: 0;
  background: var(--acid);
  opacity: 0;
  pointer-events: none;
}
.intro__flash.zap { animation: zap 0.14s steps(2) 2; }
@keyframes zap { 50% { opacity: 0.1; } }

/* ============ PLASMA CURSOR ============ */
#cursor-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}
@media (hover: none), (pointer: coarse) {
  #cursor-canvas { display: none; }
}
/* hide the native cursor once the plasma cursor takes over */
.no-cursor, .no-cursor a, .no-cursor button, .no-cursor [data-hover] { cursor: none; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px);
  transition: transform 0.4s var(--ease-out), background 0.4s, backdrop-filter 0.4s;
}
.nav.is-scrolled {
  background: rgba(var(--void-rgb), 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
}
.nav__links { display: flex; gap: clamp(16px, 2.5vw, 36px); }
.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--bone-dim);
  transition: color 0.25s;
  position: relative;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 1px; background: var(--acid);
  transition: width 0.3s var(--ease-out);
}
.nav__links a:hover { color: var(--bone); }
.nav__links a:hover::after { width: 100%; }
.nav__right { display: flex; align-items: center; gap: 22px; }
.nav__time { font-size: 0.72rem; color: var(--bone-dim); letter-spacing: 0.1em; white-space: nowrap; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  background: none;
  border: 1px solid var(--acid);
  border-radius: 100px;
  color: var(--acid);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  padding: 9px 16px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s var(--ease-out);
  /* breathe a few times after load so visitors discover it */
  animation: toggle-hint 2.4s ease 6s 3;
}
.theme-toggle:hover {
  color: var(--void);
  background: var(--acid);
  transform: scale(1.06);
}
.theme-toggle__icon {
  display: inline-block;
  font-size: 0.9rem;
  line-height: 1;
}
.theme-toggle.flipping .theme-toggle__icon { animation: icon-spin 0.6s var(--ease-snap); }
@keyframes icon-spin {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(180deg) scale(0.4); }
  100% { transform: rotate(360deg) scale(1); }
}
@keyframes toggle-hint {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--acid-rgb), 0.55); }
  50% { box-shadow: 0 0 0 12px rgba(var(--acid-rgb), 0); }
}
.theme-toggle--mobile { font-size: 0.8rem; padding: 13px 26px; }
@media (max-width: 960px) {
  /* compact icon-only pill stays visible next to the burger */
  .nav .theme-toggle { padding: 9px 11px; }
  .nav .theme-toggle .theme-toggle__label { display: none; }
}
.nav__burger {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 36px; height: 28px;
  flex-direction: column; justify-content: center; gap: 8px;
}
.nav__burger span {
  display: block; height: 2px; width: 100%;
  background: var(--bone);
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}
.nav__burger.is-open span:first-child { transform: translateY(5px) rotate(45deg); }
.nav__burger.is-open span:last-child { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0;
  z-index: 990;
  background: rgba(var(--void-rgb), 0.97);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8vh;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__link {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3.4rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.25s;
}
.mobile-menu__link:hover { color: var(--acid); }
.mobile-menu__uptime {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--bone-dim);
  margin-top: -4vh;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  padding: 16px 30px;
  border: 1px solid var(--bone);
  position: relative;
  overflow: hidden;
  transition: color 0.35s var(--ease-out), border-color 0.35s;
  will-change: transform;
  z-index: 1;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: var(--acid);
  transform: translateY(101%);
  transition: transform 0.4s var(--ease-snap);
  z-index: -1;
}
.btn:hover { color: var(--void); border-color: var(--acid); }
.btn:hover::before { transform: translateY(0); }
.btn--primary { background: var(--acid); color: var(--void); border-color: var(--acid); }
.btn--primary::before { background: var(--bone); }
.btn--small { padding: 10px 20px; font-size: 0.68rem; }
.btn__arrow { font-size: 1rem; transition: transform 0.3s var(--ease-out); }
.btn:hover .btn__arrow { transform: translate(3px, -3px); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px clamp(20px, 5vw, 72px) 90px;
  overflow: hidden;
}
#neural-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
}
.hero__content { position: relative; max-width: 1300px; }
.hero__status {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  background: rgba(var(--void-rgb), 0.6);
  backdrop-filter: blur(6px);
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--bone-dim);
  margin-bottom: clamp(24px, 4vh, 44px);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 0 rgba(var(--acid-rgb), 0.6);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--acid-rgb), 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(var(--acid-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--acid-rgb), 0); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 6.8rem);
  line-height: 0.96;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin-bottom: clamp(24px, 4vh, 44px);
}
.hero__line { display: block; overflow: hidden; }
.hero__line-inner {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1s var(--ease-out) forwards;
}
.hero__line:nth-child(1) .hero__line-inner { animation-delay: 0.15s; }
.hero__line:nth-child(2) .hero__line-inner { animation-delay: 0.3s; }
.hero__line:nth-child(3) .hero__line-inner { animation-delay: 0.45s; }
@keyframes rise { to { transform: translateY(0); } }

/* ---- cyber glitch: RGB-split slices fire periodically ---- */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  -webkit-text-stroke: inherit;
}
.glitch::before {
  color: var(--acid);
  animation: glitch-a 5.2s steps(1) infinite;
}
.glitch::after {
  color: #ff2bd1;
  animation: glitch-b 5.2s steps(1) infinite;
}
.glitch--alt::before { animation-delay: 1.7s; }
.glitch--alt::after { animation-delay: 1.7s; }
@keyframes glitch-a {
  0%, 91%, 100% { opacity: 0; transform: none; clip-path: none; }
  92% { opacity: 0.85; transform: translate(-7px, 2px); clip-path: inset(12% 0 60% 0); }
  94% { opacity: 0.85; transform: translate(5px, -3px); clip-path: inset(55% 0 18% 0); }
  96% { opacity: 0.85; transform: translate(-4px, 1px); clip-path: inset(78% 0 4% 0); }
  98% { opacity: 0; }
}
@keyframes glitch-b {
  0%, 91%, 100% { opacity: 0; transform: none; clip-path: none; }
  93% { opacity: 0.7; transform: translate(6px, -2px); clip-path: inset(35% 0 40% 0); }
  95% { opacity: 0.7; transform: translate(-6px, 3px); clip-path: inset(2% 0 85% 0); }
  97% { opacity: 0; }
}

.hero__sub { max-width: 620px; }
.hero__role {
  color: var(--acid);
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  letter-spacing: 0.14em;
  margin-bottom: 18px;
  min-height: 1.6em;
}
.caret { animation: blink 0.9s steps(1) infinite; }
.hero__pitch {
  color: var(--bone-dim);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  margin-bottom: clamp(28px, 4vh, 44px);
}
.hero__pitch strong { color: var(--bone); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: clamp(36px, 6vh, 64px); }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--bone-dim);
}
.hero__meta-divider { color: var(--acid); }

.hero__scroll {
  position: absolute;
  bottom: 36px; right: clamp(20px, 5vw, 72px);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 0.6rem; letter-spacing: 0.3em;
  color: var(--bone-dim);
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px; height: 64px;
  background: var(--line);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; top: -50%; left: 0;
  width: 100%; height: 50%;
  background: var(--acid);
  animation: scroll-drip 1.8s var(--ease-snap) infinite;
}
@keyframes scroll-drip {
  to { top: 110%; }
}

/* ============ MARQUEE ============ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--void-2);
  overflow: hidden;
  padding: 18px 0;
  transform: rotate(-1deg) scale(1.02);
}
.marquee__track {
  display: flex; width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--bone-dim);
  padding-right: 12px;
}
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }
html.is-paused .marquee__track,
html.is-paused .grain,
html.is-paused .pulse-dot,
html.is-paused .project--current .project__index {
  animation-play-state: paused;
}
html.mobile-lite .marquee__track { animation-duration: 36s; }

/* ============ SECTIONS (shared) ============ */
.section {
  position: relative;
  padding: clamp(90px, 14vh, 160px) clamp(20px, 5vw, 72px);
  max-width: 1500px;
  margin: 0 auto;
}
.section__head { margin-bottom: clamp(48px, 8vh, 88px); position: relative; }
.section__num {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--acid);
  display: inline-block;
  border: 1px solid var(--acid-dim);
  background: var(--acid-dim);
  padding: 6px 14px;
  margin-bottom: 22px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

/* scroll reveal base */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ ABOUT ============ */
.about__grid {
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}
.photo-frame {
  position: relative;
  border: 1px solid var(--line);
  background: var(--void-2);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  transition: border-color 0.4s;
}
.photo-frame:hover { border-color: var(--acid); }
.photo-frame::before {
  content: ""; position: absolute; top: 14px; left: 14px;
  width: 22px; height: 22px;
  border-top: 2px solid var(--acid); border-left: 2px solid var(--acid);
  z-index: 2;
}
.photo-frame::after {
  content: ""; position: absolute; bottom: 14px; right: 14px;
  width: 22px; height: 22px;
  border-bottom: 2px solid var(--acid); border-right: 2px solid var(--acid);
  z-index: 2;
}
.photo-frame img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(35%) contrast(1.06);
  transition: filter 0.5s, transform 0.6s var(--ease-out);
}
.photo-frame:hover img { filter: grayscale(0%); transform: scale(1.04); }
.photo-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  color: var(--bone-dim);
  font-size: 0.78rem; letter-spacing: 0.16em;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(var(--acid-rgb), 0.025) 18px 36px);
}
.photo-placeholder__hint { font-size: 0.6rem; opacity: 0.6; line-height: 1.8; }
.photo-frame__tag {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 16px;
  font-size: 0.6rem; letter-spacing: 0.2em;
  color: var(--acid);
  background: rgba(var(--void-rgb), 0.85);
  border-top: 1px solid var(--line);
  z-index: 2;
}

.about__lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.35;
  margin-bottom: 26px;
}
.about__text p:not(.about__lead) {
  color: var(--bone-dim);
  margin-bottom: 20px;
  max-width: 60ch;
}
.about__areas { margin-top: 36px; }
.about__areas-label {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  margin-bottom: 16px;
}
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 100px;
  color: var(--bone-dim);
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s var(--ease-out);
}
.chip:hover {
  color: var(--void);
  background: var(--acid);
  border-color: var(--acid);
  transform: translateY(-3px);
}
.about__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 44px;
}
.stat {
  background: var(--void);
  padding: 26px 20px;
  transition: background 0.3s;
}
.stat:hover { background: var(--void-2); }
.stat__num, .stat__plus {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1;
}
.stat__label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--bone-dim);
  margin-top: 10px;
}

/* ============ SKILLS ============ */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.skill-card {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--void-2), var(--void));
  padding: 30px 26px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s var(--ease-out);
}
.skill-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--acid-rgb), 0.07), transparent 45%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.skill-card:hover { border-color: rgba(var(--acid-rgb), 0.4); transform: translateY(-6px); }
.skill-card:hover::before { opacity: 1; }
.skill-card__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px;
}
.skill-card__icon { color: var(--acid); font-size: 1.5rem; }
.skill-card__index { font-size: 0.62rem; letter-spacing: 0.2em; color: var(--bone-dim); }
.skill-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.skill-card ul { list-style: none; }
.skill-card li {
  font-size: 0.74rem;
  color: var(--bone-dim);
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  letter-spacing: 0.04em;
  transition: color 0.25s, padding-left 0.25s var(--ease-out);
}
.skill-card li:last-child { border-bottom: none; }
.skill-card li::before { content: "▸ "; color: var(--acid); }
.skill-card li:hover { color: var(--bone); padding-left: 6px; }

.skills__dossier {
  margin-top: 56px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--void-2), var(--void));
  padding: clamp(28px, 4vw, 40px);
}
.dossier__head { margin-bottom: clamp(24px, 4vw, 36px); }
.dossier__head .acid {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  margin-bottom: 12px;
}
.dossier__lede {
  max-width: 62ch;
  color: var(--bone-dim);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.65;
}
.dossier__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.dossier__item {
  border: 1px solid var(--line);
  background: rgba(var(--void-rgb), 0.45);
  padding: 18px 20px;
  transition: border-color 0.35s, transform 0.35s var(--ease-out);
}
.dossier__item:hover {
  border-color: rgba(var(--acid-rgb), 0.35);
  transform: translateY(-3px);
}
.dossier__key {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--acid);
  margin-bottom: 10px;
}
.dossier__item p {
  color: var(--bone-dim);
  font-size: 0.88rem;
  line-height: 1.6;
}
.dossier__item strong { color: var(--bone); font-weight: 600; }
.dossier__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dossier__chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--bone-dim);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.dossier__chip:hover {
  border-color: rgba(var(--acid-rgb), 0.45);
  color: var(--bone);
}
.dossier__chip--primary {
  border-color: rgba(var(--acid-rgb), 0.55);
  background: rgba(var(--acid-rgb), 0.1);
  color: var(--acid);
}
.dossier__chip--primary:hover {
  background: var(--acid);
  color: var(--void);
}

/* ============ WORK ============ */
.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.project { perspective: 1200px; }
.project__link {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.35s var(--ease-out);
}
.project--offset { transform: translateY(60px); }
.project--offset.is-visible { transform: translateY(60px); }
.project--current .project__index { animation: pulse-text 2.4s ease-in-out infinite; }
@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.project__link { display: block; }
.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background: var(--void-2);
  overflow: hidden;
  margin-bottom: 22px;
  transition: border-color 0.4s;
}
.project:hover .project-thumb { border-color: var(--acid); }
.project-thumb img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform 0.7s var(--ease-out), filter 0.5s;
  filter: grayscale(25%);
}
.project:hover .project-thumb img { transform: scale(1.06); filter: grayscale(0%); }
.project__overlay { z-index: 2; }
/* flagship: compact horizontal card spanning both columns */
.project--feature { grid-column: 1 / -1; }
.project--feature .project__link {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: center;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--void-2), var(--void));
  padding: clamp(16px, 2.4vw, 30px);
  transition: border-color 0.4s;
}
.project--feature:hover .project__link { border-color: rgba(var(--acid-rgb), 0.45); }
.project--feature .project-thumb { margin-bottom: 0; aspect-ratio: 16 / 10; }
.project--feature .project__name { font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
.thumb-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--bone-dim);
  font-size: 0.72rem; letter-spacing: 0.18em;
  background:
    linear-gradient(135deg, var(--void-3) 0%, var(--void-2) 100%);
  background-image:
    repeating-linear-gradient(-45deg, transparent 0 24px, rgba(var(--bone-rgb), 0.02) 24px 48px);
}
.project__overlay {
  position: absolute; inset: 0;
  background: rgba(var(--acid-rgb), 0.92);
  color: var(--void);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; letter-spacing: 0.22em; font-weight: 700;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.45s var(--ease-snap);
}
.project:hover .project__overlay { clip-path: inset(0 0 0 0); }
.project__index { font-size: 0.64rem; letter-spacing: 0.26em; }
.project__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  letter-spacing: 0.02em;
  margin: 8px 0 10px;
  transition: color 0.3s;
}
.project:hover .project__name { color: var(--acid); }
.project__desc { color: var(--bone-dim); font-size: 0.92rem; max-width: 48ch; margin-bottom: 16px; }
.project__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project__tags span {
  font-size: 0.58rem; letter-spacing: 0.18em;
  border: 1px solid var(--line);
  padding: 5px 12px;
  color: var(--bone-dim);
  border-radius: 100px;
  transition: border-color 0.3s, color 0.3s;
}
.project:hover .project__tags span { border-color: rgba(var(--acid-rgb), 0.35); color: var(--bone); }
.work__more { margin-top: clamp(70px, 10vh, 120px); text-align: center; }

/* ============ JOURNEY ============ */
.journey__grid {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 360px);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.journey__photo { position: sticky; top: 110px; }
.timeline { border-left: 1px solid var(--line); margin-left: 8px; }
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: clamp(20px, 4vw, 56px);
  padding: 34px 0 34px clamp(24px, 4vw, 56px);
  border-bottom: 1px dashed var(--line);
  transition: background 0.3s;
}
.timeline__item:hover { background: linear-gradient(90deg, var(--acid-dim), transparent 60%); }
.timeline__item::before {
  content: "";
  position: absolute; left: -5px; top: 46px;
  width: 9px; height: 9px;
  background: var(--void);
  border: 2px solid var(--acid);
  border-radius: 50%;
  transition: background 0.3s, box-shadow 0.3s;
}
.timeline__item:hover::before { background: var(--acid); box-shadow: 0 0 14px var(--acid); }
.timeline__date { font-size: 0.74rem; letter-spacing: 0.22em; padding-top: 6px; }
.timeline__body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  margin-bottom: 8px;
}
.timeline__body p { color: var(--bone-dim); font-size: 0.94rem; max-width: 64ch; }

/* ============ CONTACT ============ */
.contact {
  text-align: center;
  border-top: 1px solid var(--line);
  max-width: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(var(--acid-rgb), 0.06), transparent);
}
.contact__inner { max-width: 1100px; margin: 0 auto; }
.contact__portrait {
  position: relative;
  width: clamp(120px, 16vw, 180px);
  margin: 0 auto 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--acid);
  box-shadow: 0 0 44px rgba(var(--acid-rgb), 0.25);
  aspect-ratio: 1;
}
.contact__portrait img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.contact__portrait:hover img { transform: scale(1.08); }
.contact__portrait-tag {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: 0.5rem; letter-spacing: 0.18em;
  color: var(--acid);
  background: rgba(var(--void-rgb), 0.8);
  padding: 5px 0;
}
.contact__pre {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.66rem; letter-spacing: 0.24em;
  color: var(--bone-dim);
  margin-bottom: 30px;
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 7.5rem);
  line-height: 1.16;
  text-transform: uppercase;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.contact__email {
  display: inline-flex; align-items: baseline; gap: 14px;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 3.2vw, 2rem);
  letter-spacing: 0.02em;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  transition: border-color 0.35s;
  position: relative;
}
.contact__email:hover { border-color: var(--acid); }
.contact__email-text { position: relative; display: inline-block; }
.contact__email-text::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: var(--acid);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s var(--ease-snap);
  white-space: nowrap;
}
.contact__email:hover .contact__email-text::after { clip-path: inset(0 0 0 0); }
.contact__email-arrow { font-size: 1.4em; transition: transform 0.3s var(--ease-out); }
.contact__email:hover .contact__email-arrow { transform: translate(6px, -6px); }
.contact__socials {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  margin-top: clamp(44px, 7vh, 72px);
}
.social-pill {
  font-size: 0.68rem; letter-spacing: 0.18em;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 13px 26px;
  color: var(--bone-dim);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
  will-change: transform;
}
.social-pill:hover {
  color: var(--void);
  background: var(--acid);
  border-color: var(--acid);
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 44px clamp(20px, 5vw, 72px) 30px;
}
.footer__top {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px; margin-bottom: 34px;
}
.footer__logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.3rem; letter-spacing: 0.1em;
}
.footer__coords { font-size: 0.62rem; letter-spacing: 0.2em; color: var(--bone-dim); }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px;
  font-size: 0.62rem; letter-spacing: 0.16em;
  color: var(--bone-dim);
  border-top: 1px dashed var(--line);
  padding-top: 24px;
}
.footer__up { transition: color 0.25s; }
.footer__up:hover { color: var(--acid); }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__time { display: inline; font-size: 0.58rem; letter-spacing: 0.08em; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
  .nav__burger { display: flex; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 420px; }
  .work__grid { grid-template-columns: 1fr; }
  .project--offset, .project--offset.is-visible { transform: none; }
  .project--feature .project__link { grid-template-columns: 1fr; gap: 18px; }
  .journey__grid { grid-template-columns: 1fr; }
  .journey__photo { position: static; max-width: 420px; }
  #neural-canvas { opacity: 0.55; }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 90% 70% at 75% 35%, rgba(var(--acid-rgb), 0.1), transparent 65%),
      radial-gradient(ellipse 60% 50% at 20% 80%, rgba(var(--acid-rgb), 0.04), transparent);
    pointer-events: none;
    z-index: -1;
  }
  .grain { animation: none; opacity: 0.035; }
  .glitch::before, .glitch::after { content: none; animation: none; }
  .nav.is-scrolled { backdrop-filter: none; background: rgba(var(--void-rgb), 0.94); }
  .hero__status { backdrop-filter: none; }
  html.mobile-lite .hero__line-inner { animation-duration: 0.9s; }
  .project__link { will-change: auto; }
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
  .hero__scroll { display: none; }
}
@media (max-width: 560px) {
  .nav__right .btn { display: none; }
  .nav__time { max-width: 36vw; font-size: 0.52rem; }
  .hero { padding-top: 104px; padding-bottom: 70px; }
  .hero__cta { gap: 12px; }
  .hero__cta .btn { padding: 14px 22px; font-size: 0.7rem; }
  .about__stats { grid-template-columns: 1fr 1fr; }
  .section { padding-left: 18px; padding-right: 18px; }
  .chip { font-size: 0.56rem; padding: 8px 13px; }
  .intro__skip { bottom: 18px; right: 18px; }
  .contact__email { font-size: clamp(0.82rem, 4.4vw, 1.1rem); }
  .footer__bottom { flex-direction: column; align-items: center; text-align: center; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero__line-inner { transform: none; }
  #neural-canvas { display: none; }
}
