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

:root {
  /* Foundation — warmer-tinted dark base, less harsh than pure black */
  --bg: #0b0d14;
  --bg-2: #11141d;
  --bg-3: #161a25;

  /* Surfaces — more visible, clearer layering */
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.085);
  --surface-3: rgba(255, 255, 255, 0.13);

  /* Borders — more defined hairlines */
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Typography — high-contrast for readability (WCAG AA+) */
  --text: #f2f3f8;          /* primary — was #ededf2, brighter */
  --text-dim: #b4b8c5;      /* secondary — was #9a9aa8, much more readable */
  --text-mute: #7d8294;     /* tertiary — was #6b6b78 */

  /* Accents — refined indigo over pure violet for a more professional feel */
  --accent-1: #818cf8;      /* indigo (was #8b5cf6) */
  --accent-1-deep: #6366f1; /* deeper indigo for hover states */
  --accent-2: #22d3ee;      /* cyan (was #06b6d4, brighter) */
  --accent-3: #f472b6;      /* pink (was #ec4899, softer) */

  --grad: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --grad-3: linear-gradient(135deg, var(--accent-3), var(--accent-1), var(--accent-2));

  --radius: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.55),
               0 18px 36px -18px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 20px 40px -16px rgba(129, 140, 248, 0.35);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent-1); color: white; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent-1), var(--accent-2));
  border-radius: 10px;
}

/* ============================================
   Animated background
============================================ */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  z-index: -2;
  pointer-events: none;
}

.bg-blob {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  z-index: -1;
  pointer-events: none;
  animation: float 18s ease-in-out infinite;
}

.bg-blob-1 {
  background: radial-gradient(circle, var(--accent-1), transparent 70%);
  top: -200px; left: -200px;
}
.bg-blob-2 {
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  bottom: -200px; right: -200px;
  animation-delay: -9s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.1); }
  66% { transform: translate(-40px, 60px) scale(0.95); }
}

.cursor-glow {
  position: fixed;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.13), transparent 60%);
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

/* ============================================
   Navigation
============================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2.5rem;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  background: rgba(10, 10, 15, 0.5);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), padding 0.3s var(--ease);
}
.nav.scrolled {
  border-color: var(--border);
  padding: 0.8rem 2.5rem;
  background: rgba(10, 10, 15, 0.75);
}

.nav-logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.logo-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--grad);
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  box-shadow: 0 6px 20px -6px var(--accent-1);
  transition: transform 0.4s var(--ease);
}
.nav-logo:hover .logo-mark { transform: rotate(-10deg) scale(1.05); }
.logo-text { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.01em; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--text-dim);
  font-weight: 500; font-size: 0.92rem;
  position: relative;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1.5px;
  background: var(--grad);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem; font-weight: 500;
  transition: all 0.3s var(--ease);
}
.nav-cta:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.nav-cta .arrow { transition: transform 0.3s var(--ease); display: inline-block; }
.nav-cta:hover .arrow { transform: translateX(4px); }

.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ============================================
   Hero
============================================ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 8rem 2.5rem 4rem;
  padding-left: max(2.5rem, calc((100vw - 1200px) / 2 + 2.5rem));
  position: relative;
  overflow: hidden;
}

/* Photo — sits on the right side of the hero (compact) */
/* Photo — small portrait, top-aligned at 40% of the hero height, no borders */
.hero-photo {
  position: absolute;
  top: 40%;
  right: clamp(2rem, 5vw, 5rem);
  transform: translateY(-50%);
  width: clamp(220px, 40vw, 350px);
  aspect-ratio: 4 / 5;
  background-image: url('ahsan.avif');
  background-size: cover;
  background-position: center 18%;
  background-repeat: no-repeat;
  z-index: 0;
  /* Soft left-edge fade so the photo blends into the page (no hard border) */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.55) 12%, black 35%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.55) 12%, black 35%);
  animation:
    heroPhotoIn 1.2s var(--ease-out) both,
    heroPhotoFloat 8s ease-in-out 1.2s infinite;
}

/* Overlay area (background removed — photo shows through cleanly) */
.hero-overlay {
  position: absolute;
  top: 40%;
  right: clamp(2rem, 5vw, 5rem);
  transform: translateY(-50%);
  width: clamp(220px, 40vw, 350px);
  aspect-ratio: 4 / 5;
  z-index: 1;
  pointer-events: none;
}

/* === Neon decorative icons floating around the hero === */
.hero-decor {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.neon-icon {
  position: absolute;
  left: var(--x, 10%);
  top: var(--y, 50%);
  color: var(--c, #22d3ee);
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(10, 10, 15, 0.45);
  border: 1.5px solid currentColor;
  box-shadow:
    0 0 8px currentColor,
    0 0 20px currentColor,
    inset 0 0 12px rgba(255, 255, 255, 0.05);
  filter: drop-shadow(0 0 12px currentColor);
  opacity: 0;
  animation:
    neonIn 0.8s var(--ease-out) calc(var(--d, 0s) + 0.4s) forwards,
    neonFloat 6s ease-in-out infinite calc(var(--d, 0s) + 1.2s),
    neonPulse 2.4s ease-in-out infinite calc(var(--d, 0s) + 1.2s);
  backdrop-filter: blur(4px);
}
.neon-icon svg {
  width: 22px; height: 22px;
  filter: drop-shadow(0 0 6px currentColor);
}

/* Sparkle icons are smaller and lighter (no box) */
.neon-spark {
  width: 22px; height: 22px;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  filter: drop-shadow(0 0 10px currentColor) drop-shadow(0 0 4px currentColor);
  animation:
    neonIn 0.8s var(--ease-out) calc(var(--d, 0s) + 0.4s) forwards,
    neonTwinkle 3.2s ease-in-out infinite calc(var(--d, 0s) + 1s),
    neonSpin 12s linear infinite;
}
.neon-spark svg { width: 100%; height: 100%; filter: none; }

/* Icon-specific sizes for visual variety */
.neon-controller { width: 56px; height: 56px; }
.neon-controller svg { width: 28px; height: 28px; }
.neon-image      { width: 48px; height: 48px; }
.neon-mouse      { width: 40px; height: 40px; }
.neon-joystick   { width: 46px; height: 46px; }
.neon-code       { width: 42px; height: 42px; }

/* Animations */
@keyframes neonIn {
  from { opacity: 0; transform: translateY(20px) scale(0.7); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes neonFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(6px, -10px) rotate(3deg); }
  50%      { transform: translate(-3px, -16px) rotate(-2deg); }
  75%      { transform: translate(-6px, -6px) rotate(2deg); }
}
@keyframes neonPulse {
  0%, 100% {
    box-shadow:
      0 0 8px currentColor,
      0 0 20px currentColor,
      inset 0 0 12px rgba(255, 255, 255, 0.05);
  }
  50% {
    box-shadow:
      0 0 14px currentColor,
      0 0 32px currentColor,
      0 0 48px currentColor,
      inset 0 0 18px rgba(255, 255, 255, 0.08);
  }
}
@keyframes neonTwinkle {
  0%, 100% { opacity: 0.95; transform: scale(1); }
  50%      { opacity: 0.5;  transform: scale(0.85); }
}
@keyframes neonSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Hide the heaviest decor on mobile to keep it clean */
@media (max-width: 900px) {
  .hero-photo, .hero-overlay { width: 100%; }
  .neon-icon {
    width: 34px; height: 34px;
    border-width: 1px;
  }
  .neon-controller, .neon-image, .neon-mouse, .neon-joystick, .neon-code {
    width: 32px; height: 32px;
  }
  .neon-icon svg { width: 16px; height: 16px; }
  .neon-spark, .neon-icon.neon-spark { width: 14px; height: 14px; }

  /* Drop some icons on small viewports to reduce clutter */
  .neon-spark-2, .neon-code { display: none; }
  .section-decor .neon-icon:nth-child(n + 4) { display: none; }
}
@media (max-width: 500px) {
  /* On phones, keep only the most prominent decor */
  .section-decor .neon-icon { opacity: 0.6; }
  .section-decor .neon-icon:nth-child(n + 3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .neon-icon { animation: neonIn 0.6s var(--ease-out) forwards; }
}

/* Subtle photo entrance + breathing motion */
@keyframes heroPhotoIn {
  from { opacity: 0; transform: translateY(calc(-50% + 20px)) scale(0.96); }
  to   { opacity: 1; transform: translateY(-50%) scale(1); }
}
@keyframes heroPhotoFloat {
  0%, 100% { transform: translateY(-50%) translate(0, 0); }
  50%      { transform: translateY(-50%) translate(0, -6px); }
}

.hero-inner {
  position: relative;
  z-index: 5;
  /* Photo can now grow up to 40vw on the right — keep text under 50% to avoid overlap */
  max-width: min(620px, 50%);
  width: 100%;
  text-align: left;
}

.badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.45rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.83rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 1.6rem;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line > * { display: inline-block; }

/* Greeting */
.hero-greeting {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.hero-greeting::after {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent-1);
  display: inline-block;
}

/* Big name */
.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 8.5vw, 6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0 0 1.1rem;
}
.hero-name-text {
  background: var(--grad-3);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out infinite;
  display: inline-block;
}

/* Role chip row */
.hero-role-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.6rem;
}
.hero-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.12), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.hero-role-chip svg {
  width: 16px; height: 16px;
  color: var(--accent-1);
}
.hero-role-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
}
.hero-role-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-mute);
}

/* Tagline below the name */
.hero-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 1.2rem;
}
.hero-tagline em {
  font-style: italic;
  font-weight: 500;
}

.gradient-text {
  background: var(--grad-3);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--text-dim);
  max-width: 580px;
  margin: 0 0 2.5rem;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-cta {
  display: flex; gap: 0.9rem;
  justify-content: flex-start; flex-wrap: wrap;
  margin-bottom: 4rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; }

.btn-primary {
  background: var(--grad);
  color: white;
  box-shadow: 0 10px 30px -10px var(--accent-1);
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-1));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: -1;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -10px var(--accent-1);
}
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.btn-arrow { transition: transform 0.4s var(--ease); display: inline-block; }
.btn:hover .btn-arrow { transform: translateX(5px); }

/* Hero stats */
.hero-stats {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stat-num::after { content: "+"; color: var(--accent-2); }
.stat-label {
  font-size: 0.85rem;
  color: var(--text-mute);
  margin-top: 0.15rem;
}
.stat-sep { width: 1px; height: 30px; background: var(--border); }

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-mute);
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(var(--text-mute), transparent);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ""; position: absolute; top: 0; left: 0;
  width: 100%; height: 50%;
  background: var(--accent-2);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

/* ============================================
   Marquee
============================================ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin: 4rem 0;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex; gap: 2.5rem;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-dim);
}
.marquee-track span:nth-child(even) { color: var(--accent-2); }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   Sections
============================================ */
.section {
  position: relative;
  padding: 6rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Section-level neon decorations — same .neon-icon system, lower opacity */
.section-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.section-decor .neon-icon { opacity: 0.85; }
/* Make sure section content stays above the decor */
.section > :not(.section-decor) { position: relative; z-index: 1; }

.section-head {
  text-align: center;
  margin-bottom: 4rem;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 1rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.section-head h2,
.about-text h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
}
.section-head p {
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto;
}

/* ============================================
   Category tabs
============================================ */
.cat-tabs {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 auto 3rem;
  padding: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  position: relative;
}
.cat-tab {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: all 0.4s var(--ease);
  position: relative;
  white-space: nowrap;
}
.cat-tab:hover { color: var(--text); }
.cat-tab.active {
  background: var(--grad);
  color: white;
  box-shadow: 0 8px 24px -8px var(--accent-1);
}
.cat-icon {
  display: inline-flex;
  align-items: center;
  transition: transform 0.5s var(--ease);
}
.cat-icon svg { width: 18px; height: 18px; }
.cat-tab:hover .cat-icon { transform: rotate(-8deg) scale(1.1); }
.cat-count {
  font-size: 0.72rem;
  padding: 0.12rem 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cat-tab:not(.active) .cat-count {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-mute);
}

/* ============================================
   Category panels
============================================ */
.cat-panel {
  display: none;
  animation: panelFade 0.6s var(--ease-out);
}
.cat-panel.active { display: block; }

@keyframes panelFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cat-hint {
  text-align: center;
  color: var(--text-mute);
  font-size: 0.85rem;
  margin-top: 2rem;
}

.cat-empty {
  text-align: center;
  padding: 4rem 1rem;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.cat-empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto 0.9rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.18), rgba(34, 211, 238, 0.14));
  border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
}
.cat-empty-icon svg { width: 28px; height: 28px; }
.cat-empty h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.cat-empty p {
  color: var(--text-dim);
  max-width: 420px;
  margin: 0 auto;
}

/* ============================================
   Games grid (small icon tiles)
============================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.game-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.5s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.game-tile:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(129, 140, 248, 0.25);
  z-index: 2;
}

/* Static gradient thumbnail (fallback when no video) */
.game-thumb {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.game-tile[data-color="violet"] .game-thumb {
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), transparent 50%),
    linear-gradient(135deg, #6366f1, #a855f7);
}
.game-tile[data-color="teal"] .game-thumb {
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), transparent 50%),
    linear-gradient(135deg, #0891b2, #06b6d4);
}
.game-tile[data-color="amber"] .game-thumb {
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), transparent 50%),
    linear-gradient(135deg, #b45309, #be123c);
}
.game-tile[data-color="rose"] .game-thumb {
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), transparent 50%),
    linear-gradient(135deg, #be123c, #6366f1);
}
.game-tile:hover .game-thumb { transform: scale(1.05); }

/* Tiles with a real image (local file or YouTube thumbnail) override the gradient */
.game-tile.has-thumb .game-thumb {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.game-tile.has-thumb .game-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 15, 0.55));
  pointer-events: none;
}

/* External-link badge (↗) for tiles that go to an external URL */
.game-link-badge {
  position: absolute;
  top: 0.7rem; left: 0.7rem;
  z-index: 3;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  color: white;
  opacity: 0.85;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.game-tile:hover .game-link-badge {
  transform: translate(2px, -2px);
  background: rgba(129, 140, 248, 0.85);
}

/* ============================================
   Game detail hover popup
============================================ */
.yt-popup {
  position: fixed;
  z-index: 1000;
  width: 440px;
  max-width: 92vw;
  background: #ffffff;
  color: #0a0a0f;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 50px 100px -20px rgba(0, 0, 0, 0.6),
    0 25px 50px -20px rgba(129, 140, 248, 0.3),
    0 0 0 1px rgba(0, 0, 0, 0.04) inset;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transform-origin: center top;
  transition: opacity 0.25s var(--ease), transform 0.4s var(--ease);
}
.yt-popup.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Animated gradient border via ::before */
.yt-popup::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-3);
  background-size: 200% 200%;
  animation: shimmer 6s ease-in-out infinite;
  z-index: 4;
}

/* === Thumbnail header === */
.yt-popup-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #1a1a26;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.yt-popup-thumb.hidden { display: none; }
.yt-popup-thumb-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.0) 40%, rgba(255, 255, 255, 0.0) 100%),
    linear-gradient(135deg, rgba(129, 140, 248, 0.18), transparent 60%, rgba(34, 211, 238, 0.18));
}
.yt-popup-play-orb {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex; align-items: center; justify-content: center;
  color: #ff0033;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s var(--ease), background 0.3s;
  animation: orbPulse 2.4s ease-in-out infinite;
}
.yt-popup-play-orb svg { width: 22px; height: 22px; margin-left: 3px; }
.yt-popup:hover .yt-popup-play-orb {
  transform: translate(-50%, -50%) scale(1.08);
}
@keyframes orbPulse {
  0%, 100% { box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(255, 255, 255, 0.5); }
  50%      { box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.45), 0 0 0 14px rgba(255, 255, 255, 0); }
}
.yt-popup-category {
  position: absolute;
  top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.32rem 0.7rem;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  z-index: 2;
}
.yt-popup-category .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.yt-popup-body {
  padding: 1.3rem 1.6rem 1.5rem;
}
.yt-popup-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
  line-height: 1.15;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.yt-popup-desc {
  color: #2a2a36;
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 1rem;
  font-weight: 400;
}

/* Tech tag chips */
.yt-popup-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 0 0 1.2rem;
}
.yt-popup-tags:empty { margin: 0; }
.yt-popup-tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.32rem 0.7rem;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.08), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(129, 140, 248, 0.18);
  border-radius: 7px;
  color: #4a4a5a;
  letter-spacing: 0.01em;
}

/* URL caption below the button */
.yt-popup-url {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: #6b6b78;
  text-decoration: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 0.85rem;
  width: 100%;
  font-family: 'Inter', monospace;
  transition: color 0.3s;
}
.yt-popup-url svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.7; }
.yt-popup-url:hover { color: #8b5cf6; }
.yt-popup-url:hover svg { opacity: 1; }
.yt-popup-url.hidden { display: none; }

/* Actions */
.yt-popup-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.yt-popup-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
  background: linear-gradient(135deg, #ff0033, #cc0028);
  box-shadow: 0 8px 22px -8px rgba(255, 0, 51, 0.55);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, filter 0.3s;
}
.yt-popup-link.hidden { display: none; }
.yt-popup-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 12px 28px -8px rgba(255, 0, 51, 0.7);
}
.yt-popup-link .yt-icon { width: 18px; height: 18px; }
.yt-popup-link .arrow-icon {
  width: 14px; height: 14px;
  transition: transform 0.3s var(--ease);
}
.yt-popup-link:hover .arrow-icon { transform: translate(2px, -2px); }

/* Neutral style when the link is not a YouTube link (e.g. external project site) */
.yt-popup-link.is-external {
  background: #0a0a0f;
  color: #ffffff;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.4);
  border: 1px solid transparent;
}
.yt-popup-link.is-external:hover {
  background: #1a1a26;
}
.yt-popup-link.is-external .yt-icon { display: none; }

@media (max-width: 520px) {
  .yt-popup { width: 92vw; }
}
@media (hover: none) {
  /* Hide popup on touch devices */
  .yt-popup { display: none !important; }
}

/* Info panel on each tile */
.game-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 0.85rem 1rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(10, 10, 15, 0.92));
  transform: translateY(20%);
  transition: transform 0.5s var(--ease);
}
.game-tile:hover .game-info { transform: translateY(0); }
.game-info h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.game-info span {
  font-size: 0.74rem;
  color: var(--text-dim);
  display: block;
  opacity: 0;
  transition: opacity 0.4s var(--ease) 0.1s;
}
.game-tile:hover .game-info span { opacity: 1; }

/* Play icon — only shows when a video is loaded */
.game-play {
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  z-index: 3;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center; justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.game-play svg { width: 12px; height: 12px; margin-left: 1px; }
.game-link-badge svg { width: 13px; height: 13px; }
.game-tile[data-yt] .game-play { display: flex; }
.game-tile:hover .game-play {
  opacity: 1;
  transform: scale(1.1);
}

/* ============================================
   (legacy work-grid kept off the page now)
============================================ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.work-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.6s var(--ease), border-color 0.4s, box-shadow 0.4s;
  transition-delay: calc(var(--i) * 0.05s);
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.work-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.work-media[data-color="violet"] {
  background: linear-gradient(135deg, #6366f1, #a855f7);
}
.work-media[data-color="teal"] {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
}
.work-media[data-color="amber"] {
  background: linear-gradient(135deg, #b45309, #be123c);
}
.work-media[data-color="rose"] {
  background: linear-gradient(135deg, #be123c, #6366f1);
}
.work-media::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,0.25), transparent 50%);
  z-index: 1;
  pointer-events: none;
}
.work-shape {
  position: absolute;
  width: 60%; height: 60%;
  top: 20%; left: 20%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  transition: transform 0.8s var(--ease);
}
.work-card:hover .work-shape {
  transform: scale(1.08) rotate(-3deg);
}

.work-body { padding: 1.6rem 1.8rem 1.8rem; }
.work-meta {
  display: flex; gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-mute);
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}
.work-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  letter-spacing: -0.015em;
}
.work-body p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.work-link {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  display: inline-flex; gap: 0.3rem;
}
.work-link .arrow { transition: transform 0.3s var(--ease); }
.work-card:hover .work-link .arrow { transform: translateX(5px); }

/* ============================================
   About
============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-text p {
  color: var(--text-dim);
  margin-bottom: 1.1rem;
  max-width: 520px;
}
.about-text .btn { margin-top: 1rem; }

.tilt-card {
  perspective: 1000px;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-width: 420px;
  margin-left: auto;
}
.tilt-inner {
  position: relative;
  width: 100%; height: 100%;
  background-image: url('ahsan.avif');
  background-size: cover;
  background-position: center 20%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
  box-shadow: var(--shadow-lg);
}
/* Soft gradient at the bottom for the info panel legibility */
.tilt-inner::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(10, 10, 15, 0.55) 65%, rgba(10, 10, 15, 0.95) 100%);
  pointer-events: none;
}
/* Subtle brand tint */
.tilt-inner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.12), transparent 55%, rgba(34, 211, 238, 0.1));
  pointer-events: none;
  mix-blend-mode: overlay;
}

.tilt-inner > * {
  position: relative;
  z-index: 1;
  padding-left: 1.6rem;
  padding-right: 1.6rem;
}

.about-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.7rem; font-weight: 700;
  letter-spacing: -0.015em;
  transform: translateZ(30px);
  padding-top: 0.2rem;
}
.about-role {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0.25rem 0 1rem;
  transform: translateZ(20px);
}
.about-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  transform: translateZ(25px);
  padding-bottom: 1.6rem;
}
.about-tags span {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: var(--text);
  backdrop-filter: blur(8px);
}

/* ============================================
   Skills
============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.skill-card {
  position: relative;
  padding: 2rem 1.6rem 1.6rem;
  background: linear-gradient(180deg, var(--surface), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s, box-shadow 0.4s;
  transition-delay: calc(var(--i) * 0.04s);
  overflow: hidden;
  isolation: isolate;
}
/* Animated gradient top accent */
.skill-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}
/* Soft radial wash that brightens on hover */
.skill-card::after {
  content: "";
  position: absolute;
  top: -40%; left: -20%;
  width: 140%; height: 140%;
  background: radial-gradient(ellipse at center, rgba(129, 140, 248, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
  z-index: -1;
}
.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(129, 140, 248, 0.35);
  background: linear-gradient(180deg, var(--surface-2), rgba(255, 255, 255, 0.02));
  box-shadow: 0 25px 50px -20px rgba(129, 140, 248, 0.35);
}
.skill-card:hover::before { transform: scaleX(1); }
.skill-card:hover::after { opacity: 1; }

/* Big watermark number */
.skill-num {
  position: absolute;
  top: 1rem; right: 1.2rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
  transition: background 0.4s;
}
.skill-card:hover .skill-num {
  background: linear-gradient(180deg, rgba(129, 140, 248, 0.35), rgba(34, 211, 238, 0.08));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Icon block */
.skill-icon {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.18), rgba(34, 211, 238, 0.14));
  border: 1px solid var(--border-strong);
  color: var(--text);
  margin-bottom: 1.3rem;
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s;
}
.skill-icon svg { width: 26px; height: 26px; position: relative; z-index: 1; }
.skill-icon-glow {
  position: absolute;
  inset: -8px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.45), transparent 60%);
  filter: blur(14px);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  z-index: -1;
}
.skill-card:hover .skill-icon {
  transform: rotate(-6deg) scale(1.05);
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.32), rgba(34, 211, 238, 0.24));
  border-color: rgba(129, 140, 248, 0.55);
}
.skill-card:hover .skill-icon-glow { opacity: 1; }

.skill-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 0.55rem;
  color: var(--text);
}
.grad-word {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.skill-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.1rem;
}

/* Tech tag chips inside skill cards */
.skill-tags {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}
.skill-tags span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  transition: all 0.3s var(--ease);
}
.skill-card:hover .skill-tags span {
  border-color: rgba(129, 140, 248, 0.25);
  color: var(--text);
}

/* Make cards stretch so tags align to bottom */
.skill-card {
  display: flex;
  flex-direction: column;
}

/* ============================================
   Contact
============================================ */
.contact {
  text-align: center;
  padding: 8rem 2.5rem;
}
.contact-inner { max-width: 720px; margin: 0 auto; }
.contact-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 1rem 0 1rem;
}
.contact p { color: var(--text-dim); margin-bottom: 2.5rem; }

.socials {
  display: flex; gap: 1.6rem;
  justify-content: center;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.socials a {
  color: var(--text-dim);
  font-size: 0.92rem;
  position: relative;
  transition: color 0.3s;
}
.socials a::after {
  content: ""; position: absolute; bottom: -4px; left: 0;
  width: 100%; height: 1px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.socials a:hover { color: var(--text); }
.socials a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ============================================
   Footer
============================================ */
.footer {
  position: relative;
  padding: 4rem 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
  background:
    radial-gradient(ellipse at top, rgba(129, 140, 248, 0.06), transparent 70%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.25));
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(680px, 80%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-1), var(--accent-2), transparent);
  opacity: 0.45;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 3.5rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

/* Brand column */
.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700;
  width: fit-content;
}
.footer-tagline {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 360px;
  margin: 0;
}
.footer-mail {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  transition: all 0.3s var(--ease);
}
.footer-mail svg { width: 16px; height: 16px; color: var(--accent-1); }
.footer-mail:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* Link columns */
.footer-col {
  display: flex; flex-direction: column; gap: 0.75rem;
}
.footer-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 0.4rem;
}
.footer-col a {
  color: var(--text-dim);
  font-size: 0.92rem;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
  width: fit-content;
}
.footer-col a:not(.footer-social):hover {
  color: var(--text);
  transform: translateX(3px);
}

/* Social icons — each gets its brand color on hover */
.footer-socials {
  display: flex; gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.footer-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.footer-social svg { width: 17px; height: 17px; }
.footer-social::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--brand, currentColor);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.footer-social:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -8px var(--brand, var(--accent-1));
}
.footer-social:hover::before { opacity: 1; }
.footer-social svg { position: relative; z-index: 1; }

/* Brand-specific hover colors */
.footer-social[data-net="linkedin"] { --brand: #0a66c2; }
.footer-social[data-net="github"]   { --brand: #ffffff; }
.footer-social[data-net="github"]:hover { color: #0a0a0f; }
.footer-social[data-net="youtube"]  { --brand: #ff0033; }
.footer-social[data-net="itch"]     { --brand: #fa5c5c; }
.footer-social[data-net="portfolio"]{ --brand: linear-gradient(135deg, var(--accent-1), var(--accent-2)); }
.footer-social[data-net="portfolio"]::before {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}

/* Availability chip */
.footer-availability {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin: 0.8rem 0 0;
  padding: 0.4rem 0.85rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  width: fit-content;
}
.footer-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse 2s infinite;
}

/* Bottom row */
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 0.83rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap; gap: 0.6rem;
}
.footer-built {
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.footer-heart {
  width: 14px; height: 14px;
  color: #ef4444;
  animation: heartBeat 1.4s ease-in-out infinite;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.18); }
  20% { transform: scale(0.95); }
}

@media (max-width: 900px) {
  .footer { padding: 3rem 1.25rem 1.25rem; }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-bottom { flex-direction: column; text-align: center; gap: 0.8rem; }
}

/* ============================================
   Reveal animations
============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger hero lines */
.hero-title .line {
  opacity: 0;
  transform: translateY(110%);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.hero-title.in .line { opacity: 1; transform: translateY(0); }
.hero-title.in .line:nth-child(1) { transition-delay: 0.05s; }
.hero-title.in .line:nth-child(2) { transition-delay: 0.18s; }
.hero-title.in .line:nth-child(3) { transition-delay: 0.32s; }

/* ============================================
   Responsive
============================================ */
@media (max-width: 900px) {
  .nav { padding: 1rem 1.25rem; }
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    transform: translateY(-110%);
    transition: transform 0.4s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }

  .hero {
    padding: 7rem 1.25rem 4rem;
    padding-left: 1.25rem;
    text-align: left;
  }
  /* On mobile, photo goes full-bleed behind text with stronger overlay */
  /* Mobile: photo becomes a soft full-bleed wash behind the text */
  .hero-photo, .hero-overlay {
    top: 0; right: 0;
    transform: none;
    width: 100%;
    aspect-ratio: auto;
    height: 100%;
    animation: none;
    opacity: 0.35;
  }
  .hero-photo {
    background-position: center top;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .hero-overlay {
    opacity: 1;
    background:
      linear-gradient(180deg, rgba(10, 10, 15, 0.75) 0%, rgba(10, 10, 15, 0.55) 40%, rgba(10, 10, 15, 0.9) 100%),
      linear-gradient(135deg, rgba(129, 140, 248, 0.2), transparent 50%, rgba(34, 211, 238, 0.15));
    -webkit-mask-image: none;
            mask-image: none;
  }
  .hero-inner { max-width: 100%; }

  .section { padding: 4rem 1.25rem; }

  .work-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .tilt-card { margin: 0 auto; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 1.4rem; }
  .stat-sep { display: none; }
  .footer { padding: 1.5rem 1.25rem; }
}

@media (max-width: 500px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.4rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01s !important; transition-duration: 0.01s !important; }
  .reveal { opacity: 1; transform: none; }
}
