/* ═══════════════════════════════════════════════════════════════
   PORTFOLIO  ·  style.css  (Mobile-First Optimized)
   Syne (display) · Outfit (body) · JetBrains Mono (code)
   Dark-first · Full light-mode support
   ═══════════════════════════════════════════════════════════════
   KEY FIXES:
   - Mobile-first: base styles target phones, breakpoints go up
   - overflow-x: hidden on both html and body
   - Reduced animation complexity on mobile
   - Project section redesigned as responsive card grid
   - All fixed widths replaced with fluid/clamp values
   - Safe-area-inset support for notched phones
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────── 1. DESIGN TOKENS ─────────────────────── */
:root {
  /* Colour palette */
  --ink-0:   #07071a;
  --ink-1:   #0c0c22;
  --ink-2:   #111130;
  --ink-3:   #1a1a40;
  --glass:   rgba(255,255,255,0.04);
  --glass-b: rgba(255,255,255,0.08);

  --p1: #6d28d9;
  --p2: #7c3aed;
  --p3: #8b5cf6;
  --p4: #a78bfa;
  --p-glow: rgba(109,40,217,.4);

  --t1: #f0f0ff;
  --t2: #a0a0c8;
  --t3: #60608a;

  --bd:  rgba(255,255,255,0.07);
  --bd2: rgba(139,92,246,0.4);

  --r-sm:  6px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --nav: 60px;            /* Reduced from 68px for mobile */
  --ease: cubic-bezier(.4,0,.2,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
  --t: .32s;

  /* Section vertical padding — mobile-first, grows with screen */
  --sp: 72px;
}

/* Tablet and up */
@media (min-width: 640px)  { :root { --nav: 64px; --sp: 90px; } }
@media (min-width: 1024px) { :root { --nav: 68px; --sp: 120px; } }

/* Light mode overrides */
[data-theme="light"] {
  --ink-0:   #f0efff;
  --ink-1:   #e8e6ff;
  --ink-2:   #ffffff;
  --ink-3:   #edeaff;
  --glass:   rgba(0,0,0,0.03);
  --glass-b: rgba(0,0,0,0.06);
  --t1: #0e0c28;
  --t2: #3d3b60;
  --t3: #8080aa;
  --bd: rgba(0,0,0,0.07);
  --p-glow: rgba(109,40,217,.18);
}

/* ─────────────────────── 2. RESET ─────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* FIX: overflow-x hidden on html prevents any element from causing horizontal scroll */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;  /* ← CRITICAL: prevents horizontal scroll at root level */
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--ink-0);
  color: var(--t1);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
  cursor: none;
  /* Safe area inset for notched phones */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Restore cursor on touch devices (cursor: none causes issues on mobile) */
@media (pointer: coarse) { body { cursor: auto; } }

a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(139,92,246,.35); color: #fff; }

/* ─────────────────────── 3. GRAIN OVERLAY ─────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: .025;
  pointer-events: none;
  z-index: 9999;
  /* FIX: Reduced animation on mobile — heavier grain animation was causing frame drops */
  animation: grainMove 12s steps(8) infinite;
}

@keyframes grainMove {
  0%,100% { transform: translate(0,0); }
  25%     { transform: translate(-2%,-3%); }
  50%     { transform: translate(3%,2%); }
  75%     { transform: translate(-1%,4%); }
}

/* ─────────────────────── 4. SCROLL PROGRESS BAR ─────────────────────── */
.scroll-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--p2), var(--p4));
  z-index: 10000;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--p3);
  /* GPU-accelerated, no layout impact */
  will-change: width;
}

/* ─────────────────────── 5. CUSTOM CURSOR (desktop only) ─────────────────────── */
.cursor-ring, .cursor-dot2 {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(139,92,246,.65);
  transition: width .25s var(--ease), height .25s var(--ease),
              background .25s var(--ease), border-color .25s;
  mix-blend-mode: exclusion;
  will-change: left, top; /* GPU hint for cursor tracking */
}
.cursor-dot2 {
  width: 6px; height: 6px;
  background: var(--p3);
  transition: transform .08s;
  will-change: left, top;
}
body.cursor-big .cursor-ring {
  width: 60px; height: 60px;
  background: rgba(109,40,217,.12);
  border-color: var(--p3);
}

/* FIX: Hide custom cursor on touch screens entirely */
@media (pointer: coarse) {
  .cursor-ring, .cursor-dot2 { display: none; }
}

/* ─────────────────────── 6. STAR CANVAS ─────────────────────── */
#starCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* FIX: Reduced opacity slightly — helps performance perception */
  opacity: .45;
}

/* ─────────────────────── 7. CONTAINER & UTILITIES ─────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  /* FIX: clamp ensures min 16px on tiny phones, up to 56px on wide screens */
  padding: 0 clamp(16px, 5vw, 56px);
  width: 100%; /* Prevents overflow */
}

.section {
  padding: var(--sp) 0;
  position: relative;
  z-index: 1;
  /* FIX: Clip section decorative overflows (sec-num etc.) */
  overflow: hidden;
}

/* Eyebrow label */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--p3);
  margin-bottom: 12px;
}

/* Section heading */
.sec-h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 5vw, 3rem); /* FIX: clamp prevents overflow on small screens */
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 40px;
  letter-spacing: -.025em;
}

@media (min-width: 768px) { .sec-h2 { margin-bottom: 56px; } }
@media (min-width: 1024px) { .sec-h2 { margin-bottom: 64px; } }

/* Gradient text */
.grad-text {
  background: linear-gradient(135deg, var(--p3) 0%, #c084fc 60%, #f0abfc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Background section number — decorative */
.sec-num {
  position: absolute;
  top: 40px;
  right: clamp(10px, 4vw, 56px); /* FIX: smaller right offset on mobile */
  font-family: 'Syne', sans-serif;
  font-size: clamp(4rem, 14vw, 12rem); /* FIX: clamp prevents overflow */
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px rgba(139,92,246,.07);
  pointer-events: none;
  line-height: 1;
  user-select: none;
  z-index: 0;
}

/* ─────────────────────── 8. SCROLL REVEAL ANIMATIONS ─────────────────────── */
.reveal-up, .reveal-right {
  opacity: 0;
  transition: opacity .7s var(--ease) var(--d, 0s),
              transform .7s var(--ease) var(--d, 0s);
  /* GPU compositing — only transform & opacity, no layout triggers */
}
.reveal-up    { transform: translateY(40px); }    /* FIX: reduced from 50px */
.reveal-right { transform: translateX(50px); }    /* FIX: reduced from 60px */
.reveal-up.vis, .reveal-right.vis { opacity: 1; transform: none; }

/* Hero stagger animation */
.stagger-in {
  opacity: 0;
  transform: translateY(28px);
  animation: staggerReveal .75s var(--spring) forwards;
  animation-delay: calc(var(--i, 0) * .11s + .1s);
}
@keyframes staggerReveal { to { opacity: 1; transform: none; } }

/* ─────────────────────── 9. BUTTONS ─────────────────────── */
.btn-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--p2);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  border-radius: 100px;
  transition: background var(--t), transform var(--t) var(--spring), box-shadow var(--t);
  box-shadow: 0 0 0 0 var(--p-glow);
  cursor: pointer;
  border: none;
  white-space: nowrap; /* FIX: prevent button text wrapping */
}
.btn-main:hover {
  background: var(--p3);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px var(--p-glow);
}
.btn-main svg { transition: transform var(--t) var(--spring); flex-shrink: 0; }
.btn-main:hover svg { transform: translateX(4px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--t2);
  font-size: .88rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid var(--bd);
  transition: border-color var(--t), color var(--t), transform var(--t) var(--spring);
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--p3); color: var(--p4); transform: translateY(-3px); }

/* ─────────────────────── 10. NAVBAR ─────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav);
  z-index: 200;
  transition: background var(--t), box-shadow var(--t);
}
.navbar.solid {
  background: rgba(7,7,26,.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 var(--bd);
}
[data-theme="light"] .navbar.solid {
  background: rgba(240,239,255,.9);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 56px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  display: flex; align-items: center;
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--t1);
  transition: color var(--t);
  flex-shrink: 0;
}
.logo-bracket { color: var(--p3); }
.nav-logo:hover .logo-bracket { color: var(--p4); }

/* Desktop nav links — hidden on mobile */
.nav-links {
  display: none;           /* mobile-first: hidden by default */
  gap: 0;
  align-items: center;
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nl {
  padding: 8px 16px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--t2);
  position: relative;
  transition: color var(--t);
}
.nl em {
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-size: .68rem;
  color: var(--p3);
  margin-right: 4px;
}
.nl::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 16px; right: 16px;
  height: 1.5px;
  background: var(--p3);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}
.nl:hover, .nl.active { color: var(--t1); }
.nl:hover::after, .nl.active::after { transform: scaleX(1); transform-origin: left; }

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

/* Theme toggle button */
.theme-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--glass-b);
  border: 1px solid var(--bd);
  color: var(--t2);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), color var(--t);
  flex-shrink: 0;
}
.ti {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: transform .3s var(--ease), opacity .3s;
}
[data-theme="dark"]  .ti.sun  { opacity: 0; transform: translateY(-20px); }
[data-theme="dark"]  .ti.moon { opacity: 1; transform: none; }
[data-theme="light"] .ti.moon { opacity: 0; transform: translateY(20px); }
[data-theme="light"] .ti.sun  { opacity: 1; transform: none; }
.theme-btn:hover { border-color: var(--p3); color: var(--p3); }

/* Hire Me button */
.nav-hire {
  display: none;           /* mobile-first: hidden, shown on tablet+ */
  padding: 7px 18px;
  font-size: .80rem;
  font-weight: 600;
  border: 1px solid var(--p2);
  color: var(--p3);
  border-radius: 100px;
  transition: background var(--t), color var(--t), transform var(--t) var(--spring);
  white-space: nowrap;
}
@media (min-width: 640px) { .nav-hire { display: inline-flex; } }
.nav-hire:hover { background: var(--p2); color: #fff; transform: translateY(-2px); }

/* Hamburger button */
.menu-btn {
  display: flex;           /* mobile-first: always visible */
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
  -webkit-tap-highlight-color: transparent; /* FIX: remove tap flash on mobile */
}
@media (min-width: 768px) { .menu-btn { display: none; } }  /* hide on desktop */

.menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--t2); border-radius: 2px;
  transition: all .3s;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Full-screen mobile overlay menu */
.mob-menu {
  position: fixed;
  inset: 0;
  background: var(--ink-1);
  z-index: 199;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.mob-menu.open { opacity: 1; pointer-events: all; transform: none; }
.mob-links { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 48px; }
.mob-link {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  color: var(--t2);
  transition: color .2s, transform .2s var(--spring);
  position: relative;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}
.mob-link::before {
  content: attr(data-n);
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 500;
  color: var(--p3);
  position: absolute;
  left: -2.2rem;
  top: 50%;
  transform: translateY(-50%);
  letter-spacing: .1em;
}
.mob-link:hover { color: var(--t1); transform: translateX(10px); }
.mob-email {
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  color: var(--t3);
  /* FIX: allow email to wrap on small screens */
  word-break: break-all;
  text-align: center;
  padding: 0 24px;
}

/* ─────────────────────── 11. HERO ─────────────────────── */
.hero {
  min-height: 100dvh;      /* FIX: dvh handles mobile address bar correctly */
  display: flex;
  align-items: center;
  padding-top: var(--nav);
  position: relative;
  overflow: hidden;        /* Contains floating pills and blobs */
}

/* Background blobs */
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hb-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);      /* FIX: reduced blur — expensive on mobile GPUs */
  opacity: .45;
}
.b1 {
  /* FIX: Smaller blob sizes on mobile prevent content overlap */
  width: clamp(300px, 60vw, 700px);
  height: clamp(300px, 60vw, 700px);
  background: radial-gradient(circle, #4c1d95 0%, transparent 65%);
  top: -200px; right: -150px;
  animation: blobDrift 12s ease-in-out infinite;
}
.b2 {
  width: clamp(200px, 45vw, 500px);
  height: clamp(200px, 45vw, 500px);
  background: radial-gradient(circle, #5b21b6 0%, transparent 65%);
  bottom: -150px; left: -100px;
  animation: blobDrift 16s ease-in-out infinite reverse;
}
.b3 {
  width: clamp(150px, 25vw, 300px);
  height: clamp(150px, 25vw, 300px);
  background: radial-gradient(circle, #7c3aed 0%, transparent 65%);
  top: 45%; left: 45%; opacity: .22;
  animation: blobDrift 20s ease-in-out infinite 3s;
}

/* FIX: Reduced blob travel distance from 25px → 15px for smoother mobile rendering */
@keyframes blobDrift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(15px,-12px) scale(1.05); }
  66%     { transform: translate(-12px,10px) scale(.96); }
}

/* Dot grid overlay */
.hb-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(139,92,246,.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

/* Hero layout: stacked on mobile, side-by-side on large screens */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;   /* mobile: single column */
  gap: 40px;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
  padding-top: 48px;
  padding-bottom: 80px;
  justify-items: center;        /* center card below copy on mobile */
  text-align: center;
}

/* On large screens: copy left, card right */
@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr 420px;
    text-align: left;
    justify-items: start;
    gap: 60px;
  }
}

/* Status available pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(109,40,217,.12);
  border: 1px solid rgba(109,40,217,.25);
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  color: var(--p4);
  margin-bottom: 24px;
  width: fit-content;
  /* FIX: ensure pill centres on mobile */
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1024px) {
  .status-pill { margin-left: 0; margin-right: 0; }
}

.sp-dot {
  width: 7px; height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  flex-shrink: 0;
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 6px #22c55e; }
  50%     { box-shadow: 0 0 14px #22c55e; }
}

/* Hero headline */
.hero-h1 {
  display: flex;
  flex-direction: column;
  font-family: 'Syne', sans-serif;
  /* FIX: clamp prevents font from being too large on small screens */
  font-size: clamp(2.2rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}
.hl { overflow: hidden; display: block; }
.hero-h1 .hl em { font-style: italic; color: var(--p4); }

.stroke-word {
  color: transparent;
  -webkit-text-stroke: 2.5px var(--p3);
  position: relative;
  display: inline-block;
}
.stroke-word::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--p2), var(--p4));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: underlineIn 1s 1s var(--spring) forwards;
}
@keyframes underlineIn { to { transform: scaleX(1); } }

.hero-sub {
  font-size: .98rem;
  color: var(--t2);
  font-style: italic;
  margin-bottom: 28px;
  font-weight: 300;
}

/* Hero buttons row — wrap on tiny screens */
.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  /* FIX: center on mobile, left-align on desktop */
  justify-content: center;
}
@media (min-width: 1024px) { .hero-btns { justify-content: flex-start; } }

/* Author by-line */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--glass-b);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  backdrop-filter: blur(10px);
  /* FIX: constrain width so it doesn't overflow on tiny screens */
  max-width: 100%;
}
.ht-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--p1), var(--p3));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  flex-shrink: 0;
}
.ht-name {
  font-weight: 600;
  font-size: .86rem;
  line-height: 1;
  margin-bottom: 3px;
  white-space: nowrap;
}
.ht-role { font-size: .75rem; color: var(--t3); white-space: nowrap; }
.insta-link { color: var(--p4); }

/* ── Hero Profile Card ── */
.hero-card {
  position: relative;
  width: 100%;
  max-width: 340px;        /* FIX: smaller max-width so it fits phones */
  justify-self: center;
}
@media (min-width: 1024px) {
  .hero-card { max-width: 380px; justify-self: end; }
}

.hc-shadow {
  position: absolute;
  width: 100%; height: 100%;
  border-radius: var(--r-xl);
  background: var(--ink-2);
  border: 1px solid var(--bd);
}
.hc-shadow.s1 { transform: rotate(6deg) translateY(8px); opacity: .6; }
.hc-shadow.s2 { transform: rotate(3deg) translateY(4px); opacity: .8; }

.hc-main {
  position: relative;
  z-index: 2;
  background: linear-gradient(145deg, var(--ink-2), var(--ink-3));
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
  padding: clamp(18px, 4vw, 28px) clamp(16px, 4vw, 26px); /* FIX: fluid padding */
  box-shadow: 0 24px 70px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform var(--t) var(--spring);
}
.hero-card:hover .hc-main { transform: translateY(-6px) rotate(-1deg); }

.hcm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.hcm-avatar { font-size: 2.4rem; line-height: 1; }
.hcm-live {
  display: flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  font-weight: 500;
  color: #22c55e;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 100px;
  padding: 4px 9px;
}
.live-dot {
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
.hcm-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 3px;
}
.hcm-title { font-size: .78rem; color: var(--t3); margin-bottom: 12px; }

.hcm-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.hcm-chips span {
  font-size: .70rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(109,40,217,.15);
  border: 1px solid rgba(109,40,217,.2);
  color: var(--p4);
}

.hcm-stats {
  display: flex;
  align-items: center;
  background: var(--glass);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  padding: 12px 0;
  margin-bottom: 18px;
}
.hs-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hs-val {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--p4);
  line-height: 1;
}
.hs-lbl { font-size: .66rem; color: var(--t3); }
.hs-div { width: 1px; height: 24px; background: var(--bd); flex-shrink: 0; }

/* Mini skill bars */
.hcm-bars { display: flex; flex-direction: column; gap: 9px; }
.hb-row {
  display: flex; align-items: center; gap: 8px;
  font-size: .70rem; color: var(--t3);
}
/* FIX: was fixed 80px — use min-content to prevent overflow in narrow cards */
.hb-row > span { flex-shrink: 0; min-width: 68px; max-width: 80px; }
.hb-track {
  flex: 1; height: 4px;
  background: var(--bd);
  border-radius: 2px;
  overflow: hidden;
  min-width: 0; /* FIX: prevents flex child from overflowing */
}
.hb-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--p2), var(--p4));
  border-radius: 2px;
  transition: width 1.2s var(--ease) .6s;
}
.hero-card.in-view .hb-fill { width: var(--w); }

/* Floating pills */
.float-pill {
  position: absolute;
  padding: 6px 13px;
  background: var(--glass-b);
  backdrop-filter: blur(12px);
  border: 1px solid var(--bd2);
  border-radius: 100px;
  font-size: .70rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: var(--p4);
  white-space: nowrap;
  z-index: 3;
  /* FIX: hidden below 768px — floating pills overflow outside hero bounds on mobile */
  display: none;
}
@media (min-width: 768px) {
  .float-pill { display: block; }
  .fp1 { top: -16px; left: -24px; animation: floatA 4s ease-in-out infinite; }
  .fp2 { bottom: 60px; right: -28px; animation: floatA 4s ease-in-out infinite 1.5s; }
  .fp3 { bottom: -14px; left: 40px; animation: floatA 4s ease-in-out infinite .8s; }
}
@keyframes floatA {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-9px); }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--t3);
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  letter-spacing: .15em;
  opacity: .7;
  transition: opacity var(--t);
  animation: fadeShift 1.2s 1.5s both;
  white-space: nowrap;
}
.scroll-hint:hover { opacity: 1; }
.sh-wheel {
  width: 20px; height: 32px;
  border: 1.5px solid currentColor;
  border-radius: 10px;
  position: relative;
}
.sh-wheel::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 6px;
  background: var(--p3);
  border-radius: 2px;
  animation: wheelScroll 2s ease-in-out infinite;
}
@keyframes wheelScroll {
  0%,100% { top: 5px; opacity: 1; }
  50%     { top: 12px; opacity: .4; }
}
@keyframes fadeShift {
  from { opacity: 0; transform: translateX(-50%) translateY(14px); }
  to   { opacity: .7; transform: translateX(-50%) translateY(0); }
}

/* ─────────────────────── 12. ABOUT ─────────────────────── */
.about { background: var(--ink-1); }

/* FIX: Mobile-first single column, becomes 2-col on large screens */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 72px; }
}

.at-company {
  display: flex; align-items: center; gap: 8px;
  font-size: .86rem; color: var(--t2);
  margin-bottom: 16px;
  flex-wrap: wrap; /* FIX: wrap if badge is long */
}
.fb-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(24,119,242,.12);
  border: 1px solid rgba(24,119,242,.2);
  color: #60a5fa;
  border-radius: 100px;
  padding: 3px 10px;
  font-size: .74rem;
  font-weight: 600;
}
.at-bio {
  font-size: .94rem;
  color: var(--t2);
  line-height: 1.85;
  margin-bottom: 28px;
  font-weight: 300;
}

/* Typewriter */
.tw-wrap { display: inline; }
#tw-el { color: var(--p3); }
.tw-cur {
  display: inline-block;
  color: var(--p3);
  animation: twBlink .8s step-end infinite;
  margin-left: 2px;
}
@keyframes twBlink { 50% { opacity: 0; } }

/* Stats board */
.stats-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 20px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--bd);
}
.sb-item {
  background: var(--ink-2);
  padding: clamp(18px, 4vw, 28px) clamp(14px, 3vw, 24px); /* FIX: fluid padding */
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background var(--t);
}
.sb-item:hover { background: var(--ink-3); }
.sb-val {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem); /* FIX: clamp large numbers */
  font-weight: 800;
  color: var(--p3);
  line-height: 1;
  display: inline-block;
}
.sb-plus {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--p3);
  vertical-align: super;
}
.sb-lbl {
  font-size: .72rem;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 4px;
}

/* Code snippet */
.code-snippet {
  background: var(--ink-0);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  overflow: hidden;         /* FIX: clip code block */
  box-shadow: 0 16px 50px rgba(0,0,0,.22);
}
.cs-bar {
  height: 32px;
  background: var(--ink-2);
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px;
}
.cs-bar span { width: 10px; height: 10px; border-radius: 50%; }
.cs-bar span:nth-child(1) { background: #ff5f57; }
.cs-bar span:nth-child(2) { background: #ffbd2e; }
.cs-bar span:nth-child(3) { background: #28ca41; }
.cs-body {
  padding: 18px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(.68rem, 2vw, .8rem); /* FIX: smaller on mobile */
  line-height: 1.75;
  color: var(--t2);
  white-space: pre;
  overflow-x: auto;    /* FIX: horizontal scroll within the block, not the page */
  -webkit-overflow-scrolling: touch;
}
.k  { color: #c792ea; }
.v  { color: #82aaff; }
.s  { color: #c3e88d; }
.n  { color: #f78c6c; }
.cm { color: var(--t3); font-style: italic; }

/* ─────────────────────── 13. MARQUEE ─────────────────────── */
.marquee-band {
  overflow: hidden;
  border-top: 1px solid var(--bd);
  border-bottom: 1px solid var(--bd);
  background: var(--ink-1);
  padding: 14px 0;
  position: relative;
  z-index: 1;
}
.marquee-band::before, .marquee-band::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.marquee-band::before {
  left: 0;
  background: linear-gradient(to right, var(--ink-1), transparent);
}
.marquee-band::after {
  right: 0;
  background: linear-gradient(to left, var(--ink-1), transparent);
}
.mb-track {
  display: flex;
  white-space: nowrap;
  /* FIX: use transform for animation (GPU-accelerated, no reflow) */
  animation: marqueeRoll 24s linear infinite;
  width: max-content;
}
.mb-track span {
  padding: 0 18px;
  font-family: 'Syne', sans-serif;
  font-size: .84rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .07em;
  transition: color .2s;
}
.mb-track span.dot { color: var(--p3); padding: 0 4px; font-size: .55rem; vertical-align: middle; }
.mb-track:hover { animation-play-state: paused; }
.mb-track span:not(.dot):hover { color: var(--t1); }
@keyframes marqueeRoll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─────────────────────── 14. EXPERIENCE (TIMELINE) ─────────────────────── */
.experience { background: var(--ink-0); }

.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Vertical timeline line — left-aligned on all screen sizes for consistency */
.timeline::before {
  content: '';
  position: absolute;
  /* FIX: was 134px fixed — now matches the mobile card padding-left */
  left: 16px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--p2) 10%, var(--p2) 90%, transparent);
  opacity: .3;
}

/* Timeline card — mobile-first single column */
.tl-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 0 28px 52px; /* FIX: left padding clears the timeline line */
  border-bottom: 1px solid var(--bd);
  position: relative;
  transition: background var(--t);
}

/* Timeline dot */
.tl-card::before {
  content: '';
  position: absolute;
  left: 9px;       /* FIX: aligns with the ::before line at left: 16px */
  top: 36px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink-0);
  border: 2px solid var(--p2);
  z-index: 1;
  transition: background var(--t), box-shadow var(--t);
}
.tl-card:hover::before {
  background: var(--p2);
  box-shadow: 0 0 14px var(--p-glow);
}

/* On tablet+: restore two-column layout */
@media (min-width: 768px) {
  .timeline::before { left: 130px; }
  .tl-card {
    display: grid;
    grid-template-columns: 114px 1fr;
    gap: 40px;
    padding: 36px 0;
  }
  .tl-card::before { left: 123px; top: 50%; transform: translateY(-50%); }
}

.tlc-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (min-width: 768px) {
  .tlc-left {
    flex-direction: column;
    align-items: flex-end;
    padding-right: 36px;
    padding-top: 4px;
    gap: 12px;
  }
}

.tlc-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  color: var(--t3);
  letter-spacing: .07em;
  white-space: nowrap;
}
.tlc-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--glass-b);
  border: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: center;
  color: var(--p3);
  flex-shrink: 0;
  transition: box-shadow var(--t);
}

.tlc-body { padding-left: 0; } /* FIX: remove extra padding (handled by tl-card padding) */
@media (min-width: 768px) { .tlc-body { padding-left: 36px; } }

.tlc-hd {
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tlc-hd h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--t1);
}
.tlc-co { font-size: .78rem; color: var(--p3); font-weight: 500; }
.tlc-body p {
  font-size: .87rem;
  color: var(--t2);
  line-height: 1.75;
  margin-bottom: 14px;
  font-weight: 300;
}
.tlc-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.tlc-chips span {
  font-family: 'JetBrains Mono', monospace;
  font-size: .67rem;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(109,40,217,.1);
  border: 1px solid rgba(109,40,217,.15);
  color: var(--p4);
}

/* ─────────────────────── 15. PROJECTS (CARD GRID) ─────────────────────── */
/*
  REDESIGNED: replaced 2-column proj-row layout with responsive card grid.
  Mobile  → 1 column
  Tablet  → 2 columns (≥640px)
  Desktop → 3 columns (≥1024px)
*/
.projects { background: var(--ink-1); }

.proj-grid {
  display: grid;
  grid-template-columns: 1fr;                 /* default: 1 column (mobile) */
  gap: 24px;
}
@media (min-width: 640px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }  /* tablet: 2 cols */
}
@media (min-width: 1024px) {
  .proj-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }  /* desktop: 3 cols */
}

/* Individual project card */
.proj-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--ink-2);
  border: 1px solid var(--bd);
  overflow: hidden;
  /* Lightweight hover — only transform + box-shadow, GPU-composited */
  transition: transform .35s var(--spring), box-shadow .35s var(--ease),
              border-color .35s;
}
.proj-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  border-color: var(--bd2);
}

/* ── Card image mockup area ── */
.pc-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Badge label top-right corner */
.pc-tag {
  position: absolute;
  top: 12px; right: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--p4);
  background: rgba(109,40,217,.18);
  border: 1px solid rgba(109,40,217,.25);
  border-radius: 100px;
  padding: 3px 10px;
}

/* Card 1 — Spotify: purple gradient background */
.pc-img-1 {
  background: linear-gradient(135deg, #1a0840 0%, #2d1060 50%, #0f0520 100%);
  gap: 10px;
}

/* Spotify mockup elements */
.pci-sidebar {
  width: 36px;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 4px 0;
  flex-shrink: 0;
}
.pci-logo {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--p2), #c084fc);
  margin-bottom: 4px;
}
.pci-nav { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.pci-ni { height: 4px; border-radius: 3px; background: rgba(255,255,255,.15); }
.pci-ni.active { background: var(--p3); }

.pci-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pci-h  { height: 7px; width: 55%; background: rgba(255,255,255,.3); border-radius: 4px; }
.pci-sh { height: 5px; width: 35%; background: rgba(255,255,255,.12); border-radius: 3px; }
.pci-cards-row { display: flex; gap: 6px; }
.pci-tile {
  flex: 1; height: 44px; border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.08);
}
.t1 { background: linear-gradient(135deg, rgba(109,40,217,.5), rgba(109,40,217,.15)); }
.t2 { background: linear-gradient(135deg, rgba(168,85,247,.4), rgba(168,85,247,.1)); }
.t3 { background: linear-gradient(135deg, rgba(192,132,252,.3), rgba(192,132,252,.08)); }
.pci-wave { flex: 1; min-height: 0; height: 36px; }

/* Card 2 — Quiz Web: orange */
.my-img {
  width: 100%;
  display: block;  /* removes small gaps */
}
.pc-img-2 {

  flex-direction: column;
  justify-content: space-around;
  padding: 16px 20px;
}
.pci2-hd { display: flex; justify-content: space-between; align-items: center; }
.pci2-title { height: 6px; width: 40%; background: rgba(255,255,255,.25); border-radius: 3px; }
.pci2-btn   { height: 18px; width: 52px; background: var(--p2); border-radius: 9px; opacity: .65; }
.pci2-chart { display: flex; align-items: flex-end; gap: 6px; height: 80px; padding: 6px 0; }
.pci2-bar {
  flex: 1;
  height: var(--bh, 50%);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--p1), var(--p4));
  opacity: .75;
  /* Animated fill looks great without JS */
  animation: barRise .8s var(--ease) both;
}
@keyframes barRise {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}
.pci2-rows { display: flex; flex-direction: column; gap: 6px; }
.pci2-row { height: 5px; background: rgba(255,255,255,.08); border-radius: 3px; }
.pci2-row:first-child { width: 80%; }

/* Card 3 — Flutter App: green/teal */
.pc-img-3 {
  background: linear-gradient(135deg, #042218 0%, #063825 50%, #020f10 100%);
}
.pci3-phone {
  width: 90px; height: 156px;
  background: #0a1a12;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,.12);
  padding: 8px 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.pci3-screen {
  height: 100%;
  display: flex; flex-direction: column; gap: 6px;
  padding: 4px 2px;
}
.pci3-status { height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; width: 60%; align-self: center; margin-bottom: 4px; }
.pci3-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #22c55e, #10b981); align-self: center; }
.pci3-lines { display: flex; flex-direction: column; gap: 4px; }
.pci3-line { height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; }
.pci3-line.w70 { width: 70%; align-self: center; }
.pci3-line.w50 { width: 50%; align-self: center; }
.pci3-chips { display: flex; gap: 4px; justify-content: center; }
.pci3-chip { height: 12px; flex: 1; border-radius: 6px; background: rgba(34,197,94,.2); border: 1px solid rgba(34,197,94,.3); }
.pci3-btn { height: 14px; border-radius: 7px; background: #22c55e; opacity: .8; margin-top: auto; }

/* ── Card body (text content) ── */
.pc-body {
  padding: clamp(16px, 3vw, 22px);
  display: flex;
  flex-direction: column;
  flex: 1;          /* Makes all cards in a row equal height */
}

.pc-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 10px;
  color: var(--t1);
}

.pc-desc {
  font-size: .86rem;
  color: var(--t2);
  line-height: 1.72;
  font-weight: 300;
  margin-bottom: 16px;
  flex: 1; /* Pushes buttons to bottom of card */
}

/* Tech stack chips */
.pc-stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.pc-stack span {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: var(--p4);
  padding: 4px 10px;
  border: 1px solid rgba(109,40,217,.2);
  border-radius: 4px;
  background: rgba(109,40,217,.07);
}

/* Card action buttons */
.pc-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap; /* FIX: wrap on very small screens */
}

/* Reused project buttons */
.pr-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  font-size: .80rem;
  font-weight: 600;
  border-radius: 8px;
  background: var(--glass-b);
  border: 1px solid var(--bd);
  color: var(--t2);
  transition: border-color var(--t), color var(--t), transform var(--t) var(--spring);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.pr-btn:hover { border-color: var(--bd2); color: var(--t1); transform: translateY(-2px); }
.pr-btn svg { flex-shrink: 0; }

.pr-btn-primary {
  background: var(--p2);
  color: #fff;
  border-color: transparent;
}
.pr-btn-primary:hover {
  background: var(--p3);
  color: #fff;
  box-shadow: 0 8px 24px var(--p-glow);
}

/* ─────────────────────── 16. CONTACT ─────────────────────── */
.contact {
  background: var(--ink-0);
  text-align: center;
  overflow: hidden;
}
.contact-glow {
  position: absolute;
  width: clamp(280px, 60vw, 600px);
  height: clamp(280px, 60vw, 600px);
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(109,40,217,.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.contact-body { position: relative; z-index: 1; }

.contact-h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 7vw, 4.5rem); /* FIX: clamp prevents overflow on tiny screens */
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}

.contact-sub {
  max-width: 480px;
  margin: 0 auto 36px;
  font-size: .96rem;
  color: var(--t2);
  font-weight: 300;
  line-height: 1.8;
  /* FIX: padding on small screens so text doesn't touch edges */
  padding: 0 8px;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: clamp(.80rem, 2.5vw, 1.35rem); /* FIX: email overflowed on mobile */
  font-weight: 700;
  color: var(--t1);
  padding: clamp(14px, 3vw, 18px) clamp(18px, 4vw, 32px); /* FIX: fluid padding */
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), color var(--t), transform var(--t) var(--spring);
  margin-bottom: 40px;
  /* FIX: prevent overflow on narrow screens */
  max-width: calc(100vw - 48px);
  word-break: break-all;
}
.email-link::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  opacity: 0;
  transition: opacity var(--t);
}
.email-link span, .email-link svg { position: relative; z-index: 1; }
.email-link svg { flex-shrink: 0; }
.email-link:hover { border-color: var(--p2); color: #fff; transform: translateY(-4px); box-shadow: 0 16px 48px var(--p-glow); }
.email-link:hover::before { opacity: 1; }
.email-link svg { transition: transform var(--t) var(--spring); }
.email-link:hover svg { transform: translateX(4px) translateY(-4px); }

.ct-social { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ct-social a {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--glass-b);
  border: 1px solid var(--bd);
  color: var(--t3);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t) var(--spring);
  -webkit-tap-highlight-color: transparent;
}
.ct-social a:hover {
  border-color: var(--p3);
  color: var(--p3);
  transform: translateY(-5px);
  box-shadow: 0 10px 28px var(--p-glow);
}

/* ─────────────────────── 17. FOOTER ─────────────────────── */
.footer {
  background: var(--ink-1);
  border-top: 1px solid var(--bd);
  padding: 20px 0;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;          /* FIX: wrap on small screens instead of overflow */
}
@media (max-width: 480px) {
  .footer-row { flex-direction: column; text-align: center; gap: 8px; }
}

.f-logo {
  font-family: 'Syne', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--t1);
  transition: transform var(--t) var(--spring);
}
.f-logo .logo-bracket { color: var(--p3); }
.f-logo:hover { transform: rotate(-5deg) scale(1.08); }
.f-copy { font-size: .80rem; color: var(--t3); }
.f-copy span { color: var(--p3); }
.f-year { font-family: 'JetBrains Mono', monospace; font-size: .70rem; color: var(--t3); }

/* ─────────────────────── 18. SCROLLBAR ─────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--ink-0); }
::-webkit-scrollbar-thumb { background: var(--p1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--p3); }

/* ─────────────────────── 19. SIDE ELEMENTS (desktop only) ─────────────────────── */
.side-left, .side-right {
  position: fixed;
  bottom: 0;
  width: 40px;
  z-index: 10;
  display: none;  /* hidden by default, shown only on very wide screens */
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
@media (min-width: 1280px) {
  .side-left  { display: flex; left: 32px; }
  .side-right { display: flex; right: 32px; }
}
.side-email {
  writing-mode: vertical-rl;
  font-family: 'JetBrains Mono', monospace;
  font-size: .70rem;
  letter-spacing: .14em;
  color: var(--t3);
  transition: color var(--t);
}
.side-email:hover { color: var(--p3); }
.side-rule { width: 1px; height: 80px; background: var(--t3); opacity: .4; }
.side-icon { color: var(--t3); transition: color var(--t), transform var(--t) var(--spring); }
.side-icon:hover { color: var(--p3); transform: translateY(-4px); }

/* ─────────────────────── 20. REDUCED MOTION ─────────────────────── */
/*
  FIX: Respect user's OS preference for reduced motion.
  Disables all decorative animations for users who prefer them off.
  This is an accessibility best practice and also helps on low-end devices.
*/
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .hb-blob { animation: none; }
  .mb-track { animation: none; }
  .sp-dot, .live-dot { animation: none; }
  .float-pill { animation: none; }
  .scroll-hint { animation: none; opacity: .7; }
}

/* ─────────────────────── 21. PRINT STYLES ─────────────────────── */
@media print {
  .grain, #starCanvas, .cursor-ring, .cursor-dot2,
  .scroll-bar, .navbar, .mob-menu { display: none !important; }
  body { background: #fff; color: #000; }
}