/* ═══════════════════════════════════════════════════════════════
   MANAV PARIKH — PORTFOLIO v2.0
   Theme: Miles Morales · Stealth Tech · High Impact
   Fonts: Bebas Neue (display) · Rajdhani (UI) · DM Sans (body)
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Rajdhani:wght@400;500;600;700&family=DM+Sans:wght@300;400;500&family=DM+Mono:wght@400;500&display=swap');

/* ─── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  --bg: #0a0a0a;
  --bg-2: #0e0e12;
  --bg-card: rgba(255, 255, 255, 0.028);
  --bg-nav: rgba(10, 10, 10, 0.85);
  --border: rgba(255, 255, 255, 0.06);
  --border-hi: rgba(255, 255, 255, 0.12);

  --ink: #F2F2F8;
  --ink-2: #8C8CA8;
  --ink-3: #47475E;

  --accent: #ff1a1a;
  /* Miles Morales red — stealth precision */
  --accent-dim: rgba(255, 26, 26, 0.10);
  --accent-glow: rgba(255, 26, 26, 0.22);
  --accent-2: #ff4444;
  /* bright red — secondary accent */

  --btn-solid-bg: var(--ink);
  --btn-solid-text: #0a0a0a;

  --nav-h: 80px;
  --max-w: 1280px;
  --radius: 6px;

  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* ── Enhanced Glow & Effects ── */
  --glow-sm: 0 0 15px rgba(255, 26, 26, 0.25);
  --glow-md: 0 0 30px rgba(255, 26, 26, 0.35);
  --glow-lg: 0 4px 60px rgba(255, 26, 26, 0.2);
  --glow-text: 0 0 40px rgba(255, 26, 26, 0.3);

  /* ── Glassmorphism ── */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* ── Gradients ── */
  --grad-accent: linear-gradient(135deg, var(--accent), #cc0000);
  --grad-shine: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);

  /* ── Accent alternate for Three.js background ── */
  --accent-alt: #ff1a1a;

  /* ── Spider-Man Blue (web-shooter / secondary accent) ── */
  --spidey-blue: #1862B3;
  --spidey-blue-dim: rgba(24, 98, 179, 0.12);
  --spidey-blue-glow: rgba(24, 98, 179, 0.25);
}

/* LIGHT THEME */
[data-theme="light"] {
  --bg: #F6F6F2;
  --bg-2: #EEEEEA;
  --bg-card: rgba(0, 0, 0, 0.03);
  --bg-nav: rgba(246, 246, 242, 0.88);
  --border: rgba(0, 0, 0, 0.07);
  --border-hi: rgba(0, 0, 0, 0.14);
  --ink: #10100E;
  --ink-2: #5C5C58;
  --ink-3: #9C9C98;
  --btn-solid-bg: #10100E;
  --btn-solid-text: #F6F6F2;
  --glow-sm: 0 0 15px rgba(255, 26, 26, 0.15);
  --glow-md: 0 0 30px rgba(255, 26, 26, 0.2);
  --glow-lg: 0 4px 60px rgba(255, 26, 26, 0.12);
  --glow-text: 0 0 40px rgba(255, 26, 26, 0.15);
  --glass-bg: rgba(0, 0, 0, 0.02);
  --glass-border: rgba(0, 0, 0, 0.06);
  --accent-alt: #cc0000;
}

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

html {
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}

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

img,
video {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
}

/* ─── CUSTOM CURSOR ──────────────────────────────────────────── */
#cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%) rotate(45deg); /* Diamond shape */
  transition: width 0.15s, height 0.15s, background 0.15s, transform 0.15s;
  box-shadow: 0 0 10px rgba(255, 26, 26, 0.8), 0 0 20px rgba(255, 26, 26, 0.4);
}

#cursor-ring {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 26, 26, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out-expo), height 0.25s var(--ease-out-expo), border-color 0.25s, transform 0.1s linear;
}

/* Tech Reticle Crosshairs */
#cursor-ring::before, #cursor-ring::after {
  content: '';
  position: absolute;
  background: rgba(255, 26, 26, 0.6);
  transition: all 0.2s ease;
}

#cursor-ring::before {
  top: 50%; left: -4px; right: -4px; height: 1px;
  transform: translateY(-50%);
  mask-image: linear-gradient(90deg, black 15%, transparent 15%, transparent 85%, black 85%);
  -webkit-mask-image: linear-gradient(90deg, black 15%, transparent 15%, transparent 85%, black 85%);
}

#cursor-ring::after {
  left: 50%; top: -4px; bottom: -4px; width: 1px;
  transform: translateX(-50%);
  mask-image: linear-gradient(180deg, black 15%, transparent 15%, transparent 85%, black 85%);
  -webkit-mask-image: linear-gradient(180deg, black 15%, transparent 15%, transparent 85%, black 85%);
}

body.cursor-hover #cursor-dot {
  width: 10px;
  height: 10px;
  background: #fff;
  transform: translate(-50%, -50%) rotate(90deg) scale(0.6); /* compresses */
  box-shadow: 0 0 14px #fff, 0 0 28px var(--accent);
}

body.cursor-hover #cursor-ring {
  width: 50px;
  height: 50px;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(255, 26, 26, 0.3), inset 0 0 15px rgba(255, 26, 26, 0.1);
  background: rgba(255, 26, 26, 0.05);
}

body.cursor-hover #cursor-ring::before, body.cursor-hover #cursor-ring::after {
  background: var(--accent);
}


/* ─── PAGE TRANSITION (dual-layer red flash) ───────────────── */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  overflow: hidden;
}

.page-transition::before,
.page-transition::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.38s var(--ease-in-out);
}

.page-transition::before {
  background: var(--accent);
  z-index: 1;
}

.page-transition::after {
  background: var(--bg);
  z-index: 2;
  transition-delay: 0.05s;
}

.page-transition.out::before,
.page-transition.out::after {
  transform: scaleY(1);
}

.page-transition.in {
  display: none;
}

/* ─── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.5rem;
  z-index: 200;
  transition: background 0.4s, border-color 0.4s;
}

/* Subtle red accent line at very top of nav */
.navbar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, rgba(255,26,26,0.4) 70%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.navbar.scrolled::after {
  opacity: 1;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.97);
  border-color: var(--border-hi);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(246, 246, 242, 0.97);
}

.n-brand {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.n-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.n-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.n-nav {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.n-nav>li {
  position: relative;
}

.n-nav a {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}

/* Animated underline */
.n-nav > li > a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out-expo), left 0.3s var(--ease-out-expo);
}

.n-nav > li > a:hover::after,
.n-nav > li > a.active::after {
  width: 60%;
  left: 20%;
}

.n-nav a:hover,
.n-nav a.active {
  color: var(--ink);
  background: var(--bg-card);
}

.n-nav a.active {
  color: var(--accent);
}

/* Dropdown */
.has-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: var(--bg-2);
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  padding: 0.6rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: all 0.2s var(--ease-out-expo);
  backdrop-filter: blur(20px);
}

.has-dropdown:hover .dropdown-panel,
.has-dropdown.open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.dropdown-link:hover,
.dropdown-link.active {
  color: var(--ink);
  background: var(--bg-card);
}

.dl-emoji {
  font-size: 1rem;
}

.dd-arrow {
  transition: transform 0.2s;
}

.has-dropdown:hover .dd-arrow,
.has-dropdown.open .dd-arrow {
  transform: rotate(180deg);
}

/* Nav actions */
.n-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-btn {
  background: none;
  color: var(--ink-3);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.theme-btn:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.theme-btn svg {
  width: 16px;
  height: 16px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  color: var(--ink);
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
}

/* ─── MAIN LAYOUT ────────────────────────────────────────────── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--nav-h);
}

main.full-bleed {
  padding: 0;
  max-width: 100%;
  align-items: stretch;
}

.page {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 3.5rem 5rem;
}

/* ─── PAGE HEADER ────────────────────────────────────────────── */
.p-eyebrow {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.p-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.p-title em {
  font-style: normal;
  color: var(--accent);
}

.p-lead {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-2);
  max-width: 600px;
  line-height: 1.75;
  margin-bottom: 3rem;
}

/* Section divider */
.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 3rem 0;
}

.section-divider.accent-line {
  background: linear-gradient(90deg, var(--accent), transparent);
  height: 1px;
}

/* ─── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); /* Snappy Spidey Spring */
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.07);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out-expo);
}

.btn:hover::after {
  transform: scaleX(1);
}

.btn-solid {
  background: var(--btn-solid-bg);
  color: var(--btn-solid-text);
  animation: btn-subtle-pulse 3s ease-in-out infinite;
}

@keyframes btn-subtle-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 26, 26, 0); }
  50% { box-shadow: 0 0 20px rgba(255, 26, 26, 0.08); }
}

.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), var(--glow-sm);
  animation: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--border-hi);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink-3);
  box-shadow: 0 0 20px rgba(255, 26, 26, 0.06);
  transform: translateY(-2px);
}

/* Button active/click feedback — satisfying click */
.btn:active {
  transform: scale(0.96) translateY(0) !important;
  transition-duration: 0.08s !important;
  box-shadow: 0 0 8px var(--accent-glow) !important;
}

.btn-accent {
  background: var(--accent);
  color: #0a0a0a;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── HERO (CINEMATIC) ───────────────────────────────────────── */
.cinematic-hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.4;
  filter: saturate(0.3) brightness(0.7);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 70% at 50% 80%, rgba(255, 26, 26, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.1) 0%, rgba(10, 10, 10, 0.4) 50%, rgba(10, 10, 10, 0.95) 100%);
}

/* Animated grid overlay — spider-web inspired pattern */
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    /* Radial web lines */
    conic-gradient(from 0deg at 50% 50%, rgba(255, 26, 26, 0.035) 0deg, transparent 8deg, transparent 82deg, rgba(255, 26, 26, 0.035) 90deg, transparent 98deg, transparent 172deg, rgba(255, 26, 26, 0.035) 180deg, transparent 188deg, transparent 262deg, rgba(255, 26, 26, 0.035) 270deg, transparent 278deg, transparent 352deg, rgba(255, 26, 26, 0.035) 360deg),
    /* Concentric web rings */
    radial-gradient(circle at 50% 50%, transparent 10%, rgba(255, 26, 26, 0.025) 10.5%, transparent 11%, transparent 25%, rgba(255, 26, 26, 0.025) 25.5%, transparent 26%, transparent 42%, rgba(255, 26, 26, 0.025) 42.5%, transparent 43%, transparent 62%, rgba(255, 26, 26, 0.018) 62.5%, transparent 63%),
    /* Subtle grid baseline */
    linear-gradient(rgba(255, 26, 26, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 26, 26, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  animation: grid-drift 20s linear infinite;
}

/* Corner Cobwebs (Top-Left & Bottom-Right) */
.hero-grid-overlay::before,
.hero-grid-overlay::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0,0 L100,0 M0,0 L0,100 M0,0 L80,30 M0,0 L30,80 M0,0 L60,60" stroke="%23ff1a1a" stroke-width="0.3" fill="none" opacity="0.6"/><path d="M 0 20 Q 15 15 20 0 M 0 40 Q 30 30 40 0 M 0 60 Q 45 45 60 0 M 0 80 Q 60 60 80 0 M 0 100 Q 80 80 100 0" stroke="%23ff1a1a" stroke-width="0.4" fill="none" opacity="0.6"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
  animation: web-pulse 6s infinite ease-in-out;
}

.hero-grid-overlay::before { top: 0; left: 0; }
.hero-grid-overlay::after { bottom: 0; right: 0; transform: rotate(180deg); }

@keyframes web-pulse {
  0%, 100% { opacity: 0.3; filter: drop-shadow(0 0 2px rgba(255, 26, 26, 0.2)); }
  50% { opacity: 0.6; filter: drop-shadow(0 0 12px rgba(255, 26, 26, 0.5)); }
}

@keyframes grid-drift {
  to {
    background-position: 60px 60px;
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 2rem;
  max-width: 1000px;
  width: 100%;
}

.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(24px);
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 16vw, 15rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 0.5rem;
  opacity: 0;
  text-shadow: 0 0 100px rgba(255, 26, 26, 0.08);
}

.hero-title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
  text-shadow: 0 0 80px rgba(255, 26, 26, 0.18);
}

.hero-title .accent-word {
  color: var(--accent);
}

.hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 300;
  color: var(--ink-2);
  max-width: 560px;
  margin: 1.5rem auto 3rem;
  line-height: 1.75;
  opacity: 0;
  transform: translateY(24px);
}

.hero-cta {
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 5rem;
  opacity: 0;
}

.hs-div {
  width: 1px;
  height: 36px;
  background: var(--border-hi);
}

.hs-item {
  text-align: center;
}

.hs-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--ink);
  display: block;
}

.hs-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.25rem;
  display: block;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
}

.hero-scroll span {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--ink-3), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scroll-drop 2s 2s ease-in-out infinite;
}

@keyframes scroll-drop {
  0% {
    top: -100%;
  }

  50% {
    top: 100%;
  }

  100% {
    top: 100%;
  }
}

/* ─── MARQUEE ────────────────────────────────────────────────── */
.marquee-section {
  width: 100%;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}

/* Fading edge masks */
.marquee-section::before,
.marquee-section::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.marquee-section::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-2), transparent);
}

.marquee-section::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-2), transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: marquee-scroll 28s linear infinite;
}

.marquee-track.reverse {
  animation-direction: reverse;
}

.marquee-content {
  display: flex;
  align-items: center;
  padding-right: 0;
  white-space: nowrap;
}

.mq-item {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 2.5rem;
  transition: color 0.2s;
}

.mq-item:hover {
  color: var(--accent);
}

.mq-sep {
  color: var(--accent);
  font-size: 0.7rem;
  padding: 0;
}

@keyframes marquee-scroll {
  to {
    transform: translateX(-50%);
  }
}

/* ─── SPLIT SECTIONS (HOME PROJECTS) ─────────────────────────── */
.split-section {
  display: flex;
  align-items: stretch;
  min-height: 90vh;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.6s ease;
}

/* Spider web corner accent — top-right of each split section */
.split-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 180px;
  background-image:
    conic-gradient(from -90deg at 100% 0%, rgba(255,26,26,0.05) 0deg, transparent 5deg,
      transparent 85deg, rgba(255,26,26,0.05) 90deg, transparent 95deg,
      transparent 175deg, rgba(255,26,26,0.05) 180deg),
    radial-gradient(circle at 100% 0%,
      transparent 20%, rgba(255,26,26,0.04) 20.5%, transparent 21%,
      transparent 38%, rgba(255,26,26,0.04) 38.5%, transparent 39%,
      transparent 58%, rgba(255,26,26,0.03) 58.5%, transparent 59%);
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.split-section:hover::before {
  opacity: 1;
}

.split-section:hover {
  box-shadow: inset 0 0 120px rgba(255, 26, 26, 0.025);
}

.split-section.bg-alt {
  background: var(--bg-2);
}

.split-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 5rem 6rem 6rem;
  z-index: 2;
}

.split-section:nth-child(even) .split-content {
  padding: 6rem 6rem 6rem 5rem;
}

.hl-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 1.5rem;
}

.pe-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.pe-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.98rem;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1.75;
  max-width: 440px;
  margin-bottom: 2.5rem;
}

.split-media {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  min-height: 520px;
}

.split-media img,
.split-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo);
}

.split-section:hover .split-media img,
.split-section:hover .split-media video {
  transform: scale(1.04);
}

/* Video placeholder */
.media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.media-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 26, 26, 0.03) 100%);
}

.mp-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.mp-icon svg {
  width: 20px;
  height: 20px;
  margin-left: 4px;
  fill: currentColor;
}

.mp-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}

.mp-path {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--accent);
  opacity: 0.6;
  text-align: center;
}

/* Scan-line effect on media */
.split-media::after,
.project-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent 0px,
      transparent 2px,
      rgba(0, 0, 0, 0.05) 2px,
      rgba(0, 0, 0, 0.05) 4px);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s;
}

.split-section:hover .split-media::after {
  opacity: 1;
}

/* Section number watermark */
.split-num {
  position: absolute;
  right: -0.05em;
  bottom: -0.1em;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.02);
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

/* ─── STATS ROW ──────────────────────────────────────────────── */
.stats-bar {
  width: 100%;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Subtle red sweep line behind stats */
.stats-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,26,26,0.025), transparent);
  animation: stats-sweep 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes stats-sweep {
  0%   { left: -60%; }
  50%  { left: 120%; }
  100% { left: 120%; }
}

.stats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 3.5rem;
}

.stat-item {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border);
  text-align: center;
  transition: background 0.3s ease;
  position: relative;
}

.stat-item:hover {
  background: rgba(255, 26, 26, 0.025);
}

.stat-item:hover .stat-n {
  text-shadow: var(--glow-text);
}

.stat-item:last-child {
  border-right: none;
}

.stat-n {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--ink);
  display: block;
  margin-bottom: 0.35rem;
}

.stat-n.accent {
  color: var(--accent);
}

.stat-l {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ─── PROJECTS PAGE ──────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 3rem;
}

.project-card {
  background: var(--bg);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: stretch;
  transition: background 0.3s, box-shadow 0.4s;
  position: relative;
  perspective: 1000px;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 26, 26, 0.04) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out-expo);
  z-index: 2;
}

.project-card:hover::after {
  transform: scaleX(1);
}

.project-card:hover {
  background: var(--bg-2);
  box-shadow: var(--glow-lg);
}

.project-card:nth-child(even) {
  grid-template-columns: 1.1fr 1fr;
  direction: rtl;
}

.project-card:nth-child(even)>* {
  direction: ltr;
}

.pc-info {
  padding: 4rem 4rem 4rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pc-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pc-num::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-hi);
  max-width: 40px;
}

.pc-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.pc-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.25rem;
}

.pc-body {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 400px;
}

/* Tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
}

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(255, 26, 26, 0.2);
  border-radius: 3px;
  transition: all 0.25s ease;
  cursor: default;
}

.tag:hover {
  background: rgba(255, 26, 26, 0.18);
  border-color: rgba(255, 26, 26, 0.4);
  box-shadow: 0 0 12px rgba(255, 26, 26, 0.2), 0 0 24px rgba(24, 98, 179, 0.1);
  transform: translateY(-2px) scale(1.03);
  color: var(--ink);
}

.tag.neutral {
  background: var(--bg-card);
  color: var(--ink-3);
  border-color: var(--border);
}

.pc-media {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  background: var(--bg-2);
}

.pc-media img,
.pc-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo), filter 0.4s;
}

.project-card:hover .pc-media img,
.project-card:hover .pc-media video {
  transform: scale(1.06);
}

/* ─── SYSTEM DETAIL PAGE ──────────────────────────────────────── */
.sys-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 3.5rem;
}

.sys-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 3rem;
  transition: color 0.2s;
}

.sys-back:hover {
  color: var(--accent);
}

.sys-back svg {
  width: 14px;
  height: 14px;
}

.sys-hero-media {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  margin: 2.5rem 0 3rem;
  position: relative;
}

.sys-hero-media video,
.sys-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sys-section {
  margin-bottom: 3rem;
}

.sys-section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sys-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.sys-section p {
  font-size: 0.98rem;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1.8;
}

/* Architecture diagram */
.sys-diagram {
  background: #060610;
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  padding: 2rem;
  margin: 1.25rem 0;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  line-height: 2;
  white-space: pre;
  overflow-x: auto;
  position: relative;
}

.sys-diagram::before {
  content: 'SYSTEM ARCHITECTURE';
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}

/* Image gallery in sys pages */
.sys-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.sys-gallery-item {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  position: relative;
}

.sys-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.sys-gallery-item:hover img {
  transform: scale(1.05);
}

.sys-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(10, 10, 10, 0.9));
  padding: 2rem 0.75rem 0.6rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

/* ─── SKILLS PAGE ─────────────────────────────────────────────── */
.skills-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 3rem;
}

.skill-group {
  background: var(--bg);
  padding: 2.5rem;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}

/* Shimmer sweep on hover */
.skill-group::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 26, 26, 0.04), transparent);
  pointer-events: none;
}

.skill-group:hover::after {
  animation: shimmer-sweep 0.8s ease forwards;
}

@keyframes shimmer-sweep {
  to { left: 150%; }
}

.skill-group:hover {
  background: var(--bg-2);
}

.sg-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 26, 26, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1.25rem;
  transition: all 0.3s var(--ease-out-expo);
}

.skill-group:hover .sg-icon {
  background: var(--accent);
  color: #0a0a0a;
  box-shadow: var(--glow-sm);
  transform: scale(1.1);
}

.sg-icon svg {
  width: 18px;
  height: 18px;
}

.sg-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.sg-list {
  list-style: none;
}

.sg-list li {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink-2);
  padding: 0.55rem 0;
  padding-left: 0;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.15s, padding-left 0.2s, border-color 0.2s;
}

.sg-list li:last-child {
  border-bottom: none;
}

.sg-list li:hover {
  color: var(--ink);
  padding-left: 0.3rem;
  border-left-color: var(--accent);
}

.sg-list li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.sg-list li:hover::before {
  transform: scale(1.8);
  opacity: 1;
  box-shadow: 0 0 8px var(--accent);
}

/* ─── ABOUT PAGE ──────────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 5rem;
  align-items: start;
}

.about-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.profile-img-wrap {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  margin: 0 auto 1.5rem;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-placeholder {
  font-size: 3rem;
  color: var(--ink-3);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.1em;
}

.profile-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.profile-role {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.profile-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  background: var(--bg-card);
  color: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: 3px;
}

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 3rem;
}

.ic {
  background: var(--bg);
  padding: 1.75rem;
  transition: background 0.2s;
}

.ic:hover {
  background: var(--bg-2);
}

.ic.full {
  grid-column: 1 / -1;
}

.ic-l {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.6rem;
}

.ic-v {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.ic-big {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--ink);
}

.ic-s {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--ink-3);
  margin-top: 0.25rem;
}

.prose p {
  font-size: 0.98rem;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  font-weight: 500;
  color: var(--ink);
}

/* ─── ACHIEVEMENTS ───────────────────────────────────────────── */
.stats {
  display: flex;
  gap: 3rem;
  margin: 2rem 0 3rem;
}

.stat {
  text-align: left;
}

.stat-n {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--ink);
  display: block;
}

.stat-l {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ach-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ach-entry {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 2rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.ach-entry:last-child {
  border-bottom: none;
}

.ach-icon {
  font-size: 2.5rem;
  line-height: 1;
  padding-top: 0.25rem;
}

.ach-year {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.6rem;
}

.ach-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.ach-desc {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.ach-desc:last-of-type {
  margin-bottom: 1.25rem;
}

/* ─── GALLERY PAGE ───────────────────────────────────────────── */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.gf-btn {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  background: transparent;
  color: var(--ink-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.gf-btn:hover {
  color: var(--ink);
  border-color: var(--border-hi);
}

.gf-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(255, 26, 26, 0.3);
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

/* Feature certain gallery cards larger for visual hierarchy */
.gallery-masonry .gallery-card:nth-child(5n + 1) {
  grid-row: span 2;
}

.gallery-masonry .gallery-card:nth-child(7n + 3) {
  grid-column: span 2;
}

.gallery-card {
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.3s var(--ease-out-expo);
}

.gallery-card:hover {
  border-color: rgba(255, 26, 26, 0.2);
  transform: translateY(-4px);
  box-shadow: var(--glow-sm);
}

.gallery-card.hidden {
  display: none;
}

.gallery-card-inner {
  position: relative;
  overflow: hidden;
}

/* Animated corner brackets on hover */
.gallery-card-inner::before,
.gallery-card-inner::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  opacity: 0;
  transition: all 0.35s var(--ease-out-expo);
  z-index: 5;
  pointer-events: none;
}

.gallery-card-inner::before {
  top: 12px;
  left: 12px;
  border-right: none;
  border-bottom: none;
  transform: translate(-8px, -8px);
}

.gallery-card-inner::after {
  bottom: 12px;
  right: 12px;
  border-left: none;
  border-top: none;
  transform: translate(8px, 8px);
}

.gallery-card:hover .gallery-card-inner::before,
.gallery-card:hover .gallery-card-inner::after {
  opacity: 1;
  transform: translate(0, 0);
}

.gallery-card-inner img,
.gallery-card-inner video {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease-out-expo), filter 0.3s;
}

.gallery-card:hover .gallery-card-inner img {
  transform: scale(1.04);
  filter: brightness(1.1) contrast(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(10, 10, 10, 0.92));
  padding: 2.5rem 0.85rem 0.75rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery-card:hover .gallery-caption {
  opacity: 1;
}

.gallery-caption span {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lb-content {
  max-width: 90vw;
  max-height: 90vh;
}

.lb-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 4px;
}

.lb-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  color: var(--ink-2);
  background: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.lb-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
}

.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.06);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.lb-prev {
  left: 1.5rem;
}

.lb-next {
  right: 1.5rem;
}

.lb-prev:hover,
.lb-next:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
}

/* ─── CONTACT PAGE ───────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 2rem 0;
}

.contact-icon-card {
  background: var(--bg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.contact-icon-card:hover {
  background: var(--bg-2);
}

.cic-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 26, 26, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: background 0.2s, transform 0.2s;
}

.contact-icon-card:hover .cic-icon {
  background: var(--accent);
  color: #0a0a0a;
  transform: scale(1.05);
}

.cic-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.cic-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.cic-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.2s;
}

.contact-icon-card:hover .cic-value {
  color: var(--ink);
}

.contact-form-section {
  margin: 3rem 0;
}

.contact-form-section h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.contact-form-section h2 em {
  font-style: normal;
  color: var(--accent);
}

.contact-form-section p {
  font-size: 0.92rem;
  color: var(--ink-3);
  margin-bottom: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cf-input,
.cf-textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.cf-input:focus,
.cf-textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 26, 26, 0.03);
}

.cf-input::placeholder,
.cf-textarea::placeholder {
  color: var(--ink-3);
}

.cf-textarea {
  min-height: 140px;
  resize: vertical;
}

/* QR codes */
.qr-section {
  margin-top: 3rem;
}

.qr-row {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.qr-box {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.qr-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ─── NOTES PAGE ──────────────────────────────────────────────── */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.note-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  transition: border-color 0.3s var(--ease-out-expo), background 0.2s, transform 0.3s var(--ease-out-expo), box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.note-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
}

.note-card:hover::after {
  transform: scaleX(1);
}

.note-card:hover {
  border-color: var(--border-hi);
  background: var(--bg-2);
  transform: translateY(-4px);
  box-shadow: var(--glow-sm);
}

.note-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.note-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.note-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.note-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 0.6rem;
  transition: color 0.2s;
}

.note-card:hover .note-title {
  color: var(--accent);
}

.note-excerpt {
  font-size: 0.84rem;
  font-weight: 300;
  color: var(--ink-3);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

.note-read-more {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  transition: color 0.2s, gap 0.3s var(--ease-out-expo);
}

.note-card:hover .note-read-more {
  color: var(--accent);
  gap: 0.65rem;
}

/* ─── FOOTER ──────────────────────────────────────────────────── */
footer {
  width: 100%;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 2rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

footer span {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

footer a {
  color: var(--ink-3);
  transition: color 0.2s;
}

footer a:hover {
  color: var(--accent);
}

/* ─── CLICK RIPPLE ────────────────────────────────────────────── */
.click-ripple {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-out 0.6s ease-out forwards;
}

@keyframes ripple-out {
  to {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

/* ─── SPLASH SCREEN ─────────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  overflow: hidden;
}

/* Spider web SVG backdrop */
.splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    conic-gradient(from 0deg at 50% 50%, rgba(255,26,26,0.04) 0deg, transparent 6deg,
      transparent 84deg, rgba(255,26,26,0.04) 90deg, transparent 96deg,
      transparent 174deg, rgba(255,26,26,0.04) 180deg, transparent 186deg,
      transparent 264deg, rgba(255,26,26,0.04) 270deg, transparent 276deg,
      transparent 354deg, rgba(255,26,26,0.04) 360deg),
    radial-gradient(circle at 50% 50%,
      transparent 8%, rgba(255,26,26,0.03) 8.5%, transparent 9%,
      transparent 22%, rgba(255,26,26,0.03) 22.5%, transparent 23%,
      transparent 38%, rgba(255,26,26,0.03) 38.5%, transparent 39%,
      transparent 56%, rgba(255,26,26,0.025) 56.5%, transparent 57%);
  background-size: 100% 100%, 100% 100%;
  opacity: 0;
  animation: splash-web-fade 0.8s 0.2s ease forwards;
}

@keyframes splash-web-fade {
  to { opacity: 1; }
}

.splash.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.splash-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(20px);
  animation: splash-fade-up 0.7s 0.1s var(--ease-out-expo) forwards;
}

.splash-line {
  width: 0;
  height: 2px;
  background: var(--accent);
  margin: 1rem auto;
  animation: splash-line-grow 0.6s 0.5s var(--ease-out-expo) forwards;
  box-shadow: var(--glow-sm);
}

.splash-role {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  animation: splash-fade-up 0.6s 0.8s var(--ease-out-expo) forwards;
}

@keyframes splash-line-grow {
  to { width: 60px; }
}

@keyframes splash-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── THREE.JS BACKGROUND ───────────────────────────────────── */
#three-canvas {
  opacity: 0;
  animation: fade-in 1.5s 1.8s ease forwards;
}

[data-theme="light"] #three-canvas {
  filter: invert(0.85) hue-rotate(180deg);
}

/* ─── KEYFRAMES ──────────────────────────────────────────────── */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ─── AOS INTEGRATION ─────────────────────────────────────────── */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
}

[data-aos].aos-animate {
  opacity: 1;
}

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-2);
}

/* ─── SELECTION ──────────────────────────────────────────────── */
::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ─── TYPOGRAPHY & GLOW POLISH ──────────────────────────────── */
.p-title em,
.pe-title em,
.hl-label,
.sg-title,
.pc-num,
.p-eyebrow {
  text-shadow: 0 0 20px rgba(255, 26, 26, 0.15);
}

.stat-n.accent {
  text-shadow: var(--glow-text);
}

.hs-num {
  text-shadow: 0 0 30px rgba(255, 26, 26, 0.06);
}

.section-divider.accent-line {
  box-shadow: 0 0 15px rgba(255, 26, 26, 0.2);
}

[data-theme="light"] .p-title em,
[data-theme="light"] .pe-title em,
[data-theme="light"] .hl-label,
[data-theme="light"] .sg-title,
[data-theme="light"] .pc-num,
[data-theme="light"] .p-eyebrow,
[data-theme="light"] .stat-n.accent,
[data-theme="light"] .hs-num {
  text-shadow: none;
}

[data-theme="light"] .section-divider.accent-line {
  box-shadow: none;
}

/* ─── MOBILE NAV ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .navbar {
    padding: 0 1.75rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .n-nav {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 0.25rem;
  }

  .n-nav.nav-open {
    display: flex;
  }

  .n-nav>li {
    width: 100%;
  }

  .n-nav a {
    padding: 0.75rem 1rem;
  }

  .dropdown-panel {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    background: var(--bg);
    margin-top: 0.25rem;
  }

  .has-dropdown.open .dropdown-panel {
    display: block;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 4rem 1.5rem;
  }

  .gallery-masonry .gallery-card:nth-child(5n + 1),
  .gallery-masonry .gallery-card:nth-child(7n + 3) {
    grid-row: span 1;
    grid-column: span 1;
  }

  .split-section {
    flex-direction: column;
    min-height: auto;
  }

  .split-content {
    padding: 3rem 2rem;
  }

  .split-section:nth-child(even) .split-content {
    padding: 3rem 2rem;
  }

  .split-media {
    min-height: 300px;
  }

  .project-card {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .project-card:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .pc-info {
    padding: 2rem;
  }

  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-sidebar {
    position: static;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .cf-row {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .hs-num {
    font-size: 2rem;
  }

  .hero-floating-snippets { display: none; }
  .hero-scroll-progress { display: none; }
  .cursor-trail { display: none; }

  .skill-proficiency-section .sp-grid {
    grid-template-columns: 1fr;
  }

  .ach-timeline {
    padding-left: 1.5rem;
  }

  .ach-timeline::before {
    left: 0;
  }

  .ach-timeline-item::before {
    left: -1.5rem;
  }

  .project-modal-overlay .pm-body {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: FLOATING CODE SNIPPETS IN HERO
═══════════════════════════════════════════════════════════════ */
.hero-floating-snippets {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.floating-snippet {
  position: absolute;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(255, 26, 26, 0.12);
  background: rgba(255, 26, 26, 0.03);
  border: 1px solid rgba(255, 26, 26, 0.06);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  white-space: nowrap;
  backdrop-filter: blur(2px);
  animation: floatDrift 20s ease-in-out infinite;
  will-change: transform, opacity;
}

.floating-snippet .fs-kw {
  color: rgba(255, 26, 26, 0.3);
  font-weight: 500;
}

.fs-1 { top: 12%; left: 8%; animation-delay: 0s; animation-duration: 18s; }
.fs-2 { top: 25%; right: 12%; animation-delay: -3s; animation-duration: 22s; }
.fs-3 { top: 55%; left: 5%; animation-delay: -6s; animation-duration: 24s; }
.fs-4 { top: 70%; right: 8%; animation-delay: -9s; animation-duration: 19s; }
.fs-5 { top: 40%; left: 75%; animation-delay: -2s; animation-duration: 21s; }
.fs-6 { top: 80%; left: 20%; animation-delay: -5s; animation-duration: 23s; }
.fs-7 { top: 18%; left: 60%; animation-delay: -8s; animation-duration: 17s; }
.fs-8 { top: 65%; right: 25%; animation-delay: -11s; animation-duration: 25s; }

@keyframes floatDrift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.5;
  }
  25% {
    transform: translate(15px, -20px) rotate(1deg);
    opacity: 0.8;
  }
  50% {
    transform: translate(-10px, 10px) rotate(-0.5deg);
    opacity: 0.4;
  }
  75% {
    transform: translate(8px, -8px) rotate(0.5deg);
    opacity: 0.7;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: SCROLL PROGRESS BAR
═══════════════════════════════════════════════════════════════ */
.hero-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  z-index: 9999;
  pointer-events: none;
}

.hero-scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--grad-accent);
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(255, 26, 26, 0.5);
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: CURSOR TRAIL
═══════════════════════════════════════════════════════════════ */
.cursor-trail {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform, opacity;
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: SKILLS PROFICIENCY VISUALIZATION
═══════════════════════════════════════════════════════════════ */
.skill-proficiency-section {
  margin-top: 3rem;
}

.sp-header {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.sp-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2rem;
}

.sp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.sp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
}

.sp-card:hover {
  border-color: var(--accent-dim);
  box-shadow: var(--glow-sm);
  transform: translateY(-4px);
}

.sp-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out-expo);
}

.sp-card:hover::after {
  transform: scaleX(1);
}

.sp-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sp-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sp-card:hover .sp-card-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--glow-sm);
}

.sp-card-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.sp-card-level {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

.sp-bar-track {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 0.75rem;
  overflow: hidden;
}

.sp-bar-fill {
  height: 100%;
  width: 0;
  background: var(--grad-accent);
  border-radius: 2px;
  transition: width 1.2s var(--ease-out-expo);
  box-shadow: 0 0 8px rgba(255, 26, 26, 0.4);
}

/* Width for .sp-bar-fill set inline via data-proficiency */

.sp-card-projects {
  margin-top: 0.75rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.sp-card-projects a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.sp-card-projects a:hover {
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: ACHIEVEMENT TIMELINE
═══════════════════════════════════════════════════════════════ */
.ach-timeline {
  position: relative;
  padding-left: 3rem;
  margin-top: 3rem;
}

.ach-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  opacity: 0.3;
}

.ach-timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.ach-timeline-item:last-child {
  padding-bottom: 0;
}

.ach-timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--glow-sm);
  z-index: 2;
}

.ach-timeline-item.gold::before {
  background: #FFD700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.ach-timeline-item.silver::before {
  background: #C0C0C0;
  box-shadow: 0 0 15px rgba(192, 192, 192, 0.4);
}

.ach-tl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
}

.ach-tl-card:hover {
  border-color: var(--accent-dim);
  box-shadow: var(--glow-sm);
  transform: translateX(8px);
}

.ach-tl-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: 3px 0 0 3px;
}

.ach-timeline-item.gold .ach-tl-card::before {
  background: linear-gradient(to bottom, #FFD700, #FFA500);
}

.ach-timeline-item.silver .ach-tl-card::before {
  background: linear-gradient(to bottom, #C0C0C0, #A0A0A0);
}

.ach-tl-trophy {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ach-tl-trophy-icon {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.3));
  transition: transform 0.4s var(--ease-out-expo);
}

.ach-tl-card:hover .ach-tl-trophy-icon {
  transform: scale(1.15) rotate(-5deg);
}

.ach-tl-year {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.ach-tl-year .ach-tl-rank {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.25rem;
}

.ach-tl-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.ach-tl-desc {
  font-size: 0.85rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.ach-tl-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ach-tl-stat {
  text-align: center;
}

.ach-tl-stat-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
}

.ach-tl-stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.2rem;
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: PROJECT MODAL EXPANSION
═══════════════════════════════════════════════════════════════ */
.project-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.96);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out-expo);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 2rem;
}

.project-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.project-modal-overlay .pm-content {
  max-width: 1000px;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.5s var(--ease-out-expo);
  max-height: 90vh;
  overflow-y: auto;
}

.project-modal-overlay.open .pm-content {
  transform: scale(1) translateY(0);
}

.pm-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.pm-close:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.pm-hero {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg);
  overflow: hidden;
}

.pm-hero video,
.pm-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-hero .media-placeholder {
  position: absolute;
  inset: 0;
}

.pm-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

.pm-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.pm-desc {
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.pm-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.pm-metric {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.pm-metric-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pm-metric-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.pm-sidebar {
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}

.pm-sidebar-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.pm-sidebar .tag-row {
  margin-bottom: 1.5rem;
}

.pm-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pm-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.pm-links a:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: GALLERY VIDEO SUPPORT
═══════════════════════════════════════════════════════════════ */
.gallery-card-inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-video-indicator {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  backdrop-filter: blur(4px);
}

.gallery-video-indicator svg {
  width: 12px;
  height: 12px;
  fill: white;
}

/* Enhanced lightbox with caption */
.lightbox .lb-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  max-width: 80vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox .lb-counter {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: SCROLL-TRIGGERED TEXT REVEALS FOR PAGE TITLES
═══════════════════════════════════════════════════════════════ */
.p-title .word {
  display: inline-block;
  overflow: hidden;
}

.p-title .word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.8s var(--ease-out-expo);
}

.p-title.revealed .word-inner {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: SECTION DIVIDER ANIMATION
═══════════════════════════════════════════════════════════════ */
.section-divider.accent-line {
  height: 2px;
  background: var(--grad-accent);
  border: none;
  margin: 2rem 0 3rem;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1s var(--ease-out-expo);
}

.section-divider.accent-line.visible {
  transform: scaleX(1);
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: ENHANCED HOVER SHIMMER ON CARDS
═══════════════════════════════════════════════════════════════ */
.project-card::before,
.skill-group::before,
.sp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: skewX(-15deg);
  transition: left 0.8s var(--ease-out-expo);
  pointer-events: none;
  z-index: 1;
}

.project-card:hover::before,
.skill-group:hover::before,
.sp-card:hover::before {
  left: 125%;
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENT: GLOWING ACCENT LINE UNDER ACTIVE NAV
═══════════════════════════════════════════════════════════════ */
.n-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  border-radius: 1px;
}
/* ═══════════════════════════════════════════════════════════════
   SPIDER-MAN THEME: SITE-WIDE WEB ACCENTS & ENHANCEMENTS
═══════════════════════════════════════════════════════════════ */

/* ── Web corner decoration utility ────────────────────────────
   Add class="web-corner-tl" etc to any section for a spiderweb
   micro-detail in a corner. Applied via ::before pseudo.       */
.web-corner-tr::after,
.web-corner-tl::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  background-image:
    conic-gradient(from var(--web-from, -90deg) at var(--web-x, 100%) var(--web-y, 0%),
      rgba(255,26,26,0.06) 0deg, transparent 5deg,
      transparent 85deg, rgba(255,26,26,0.06) 90deg, transparent 95deg,
      transparent 175deg, rgba(255,26,26,0.06) 180deg),
    radial-gradient(circle at var(--web-x, 100%) var(--web-y, 0%),
      transparent 15%, rgba(255,26,26,0.05) 15.5%, transparent 16%,
      transparent 30%, rgba(255,26,26,0.04) 30.5%, transparent 31%,
      transparent 48%, rgba(255,26,26,0.03) 48.5%, transparent 49%);
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
}

.web-corner-tr::after {
  top: 0; right: 0;
  --web-from: -90deg; --web-x: 100%; --web-y: 0%;
}

.web-corner-tl::before {
  top: 0; left: 0;
  --web-from: 180deg; --web-x: 0%; --web-y: 0%;
}

/* ── Snappy swing hover for cards ──────────────────────────── */
.note-card,
.ach-tl-card,
.sp-card,
.skill-group {
  transform-origin: top center;
}

/* ── Pulse ring on primary accent buttons ──────────────────── */
.btn-solid {
  position: relative;
}

.btn-solid::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius) + 3px);
  border: 1px solid rgba(255, 26, 26, 0.0);
  transition: border-color 0.3s, inset 0.3s;
  pointer-events: none;
}

.btn-solid:hover::before {
  inset: -6px;
  border-color: rgba(255, 26, 26, 0.25);
}

/* ── Enhanced scrollbar with red accent ────────────────────── */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 26, 26, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 26, 26, 0.55);
}

/* ── Section page headers — accent underline on title ──────── */
.p-title::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--accent);
  margin-top: 0.75rem;
  box-shadow: var(--glow-sm);
  transform-origin: left;
}

/* ── Hero stats number — stronger identity ──────────────────── */
.hs-num {
  text-shadow: 0 0 40px rgba(255, 26, 26, 0.1);
  transition: text-shadow 0.3s;
}

.hs-item:hover .hs-num {
  text-shadow: var(--glow-text);
}

/* ── Section-number watermark — slightly more visible ─────── */
.split-num {
  position: absolute;
  right: -0.05em;
  bottom: -0.1em;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18rem;
  line-height: 1;
  color: rgba(255, 26, 26, 0.025);
  pointer-events: none;
  z-index: 1;
  user-select: none;
  transition: color 0.5s;
}

.split-section:hover .split-num {
  color: rgba(255, 26, 26, 0.04);
}

/* ── Footer — subtle red web line at top ───────────────────── */
footer {
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,26,26,0.3), rgba(255,26,26,0.6) 50%, rgba(255,26,26,0.3), transparent);
  opacity: 0.5;
}

/* ── Floating snippets — slightly more presence ─────────────── */
.floating-snippet {
  color: rgba(255, 26, 26, 0.16);
  background: rgba(255, 26, 26, 0.035);
  border-color: rgba(255, 26, 26, 0.08);
}

.floating-snippet .fs-kw {
  color: rgba(255, 26, 26, 0.38);
}

/* ── Profile image border — pulsing glow ───────────────────── */
.profile-img-wrap {
  animation: profile-glow 3.5s ease-in-out infinite;
}

@keyframes profile-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,26,26,0); }
  50%       { box-shadow: 0 0 20px 2px rgba(255,26,26,0.18); }
}

/* ── Contact icon cards — stronger hover ───────────────────── */
.contact-icon-card:hover {
  background: var(--bg-2);
  box-shadow: inset 0 0 40px rgba(255,26,26,0.03);
}

/* ── Achievement timeline dot — web strand feel ─────────────── */
.ach-timeline-item::before {
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s;
}

.ach-timeline-item:hover::before {
  transform: scale(1.4);
  box-shadow: var(--glow-md);
}

/* ── Nano menu title update ─────────────────────────────────── */
.nano-menu-title::before {
  content: '🕷 ';
  font-size: 8px;
}
