/* ============================================================
   ELITE CYBERSECURITY PLATFORM — DESIGN SYSTEM v2.0
   Theme: Deep Navy / Electric Cyan / Neon Green
   Grade: Enterprise SaaS — CrowdStrike / Cortex Level
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Backgrounds */
  --bg-void:    #0B0F19;
  --bg-surface: #111827;
  --bg-card:    #151C2C;
  --bg-card-hover: #1A2236;
  --bg-glass:   rgba(17,24,39,0.65);
  --bg-input:   #0F1525;

  /* Accents */
  --accent:       #00F5FF;
  --accent-dim:   rgba(0,245,255,0.12);
  --accent-mid:   rgba(0,245,255,0.25);
  --cyber-blue:   #0066FF;
  --neon-green:   #10B981;
  --secondary:    #22D3EE;

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #00F5FF, #0066FF);
  --gradient-neon:   linear-gradient(135deg, #00F5FF 0%, #10B981 100%);
  --gradient-hero:   radial-gradient(ellipse at 50% 30%, rgba(0,245,255,0.08) 0%, transparent 60%);

  /* Semantic */
  --success: #10B981;
  --danger:  #EF4444;
  --warning: #F59E0B;

  /* Risk badges */
  --risk-critical: #EF4444;
  --risk-high:     #F59E0B;
  --risk-medium:   #3B82F6;
  --risk-low:      #10B981;

  /* Text */
  --text-primary:   #E5E7EB;
  --text-secondary: #B0B8C9;
  --text-muted:     #9CA3AF;
  --text-dim:       #6B7280;

  /* Borders */
  --border:       rgba(255,255,255,0.06);
  --border-input: rgba(255,255,255,0.08);
  --border-accent: rgba(0,245,255,0.2);

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.5);
  --shadow-neon: 0 0 20px rgba(0,245,255,0.15), 0 0 60px rgba(0,245,255,0.05);

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;
  --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* Typography scale */
  --text-xs:  0.75rem;
  --text-sm:  0.875rem;
  --text-base: 1rem;
  --text-lg:  1.125rem;
  --text-xl:  1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-hero: clamp(2.8rem, 6vw, 5.5rem);

  /* Font */
  --font-body:  'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Rajdhani', 'Inter', sans-serif;

  /* ★ Motion Scale — consistent across entire site */
  --motion-fast:   150ms;
  --motion-medium: 250ms;
  --motion-slow:   400ms;
  --motion-slower: 600ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 110px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color var(--motion-medium); }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }

::selection {
  background: rgba(0,245,255,0.25);
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 3. CANVAS, GRID, MOUSE SPOTLIGHT ---------- */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.cyber-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,245,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Radial spotlight that follows mouse (desktop) */
.mouse-spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(0,245,255,0.035),
    transparent 40%
  );
  transition: background var(--motion-slow);
}

/* ---------- 4. SCROLL PROGRESS BAR ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--gradient-accent);
  z-index: 10001;
  transition: none;
  will-change: width;
}

/* ---------- 5. LOADER ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-6);
  transition: opacity var(--motion-slower) ease, visibility var(--motion-slower) ease;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-shield {
  width: 80px;
  height: 96px;
  margin-bottom: var(--s-2);
}
.loader-shield svg {
  width: 100%;
  height: 100%;
}
.loader-shield-path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: loaderShieldDraw 1.4s ease forwards;
}
.loader-check-path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: loaderCheckDraw 0.6s 1s ease forwards;
}

@keyframes loaderShieldDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes loaderCheckDraw {
  to { stroke-dashoffset: 0; }
}

.loader-name-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}

.loader-logo {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.12em;
}

.loader-line {
  width: 120px;
  height: 2px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.loader-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-accent);
  animation: loaderProgress 1.6s ease-in-out infinite;
  border-radius: 2px;
}
@keyframes loaderProgress {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

.loader-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- 6. CONTAINER ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-6);
}

/* ---------- 7. SECTION UTILITIES ---------- */
section {
  position: relative;
  z-index: 1;
  padding: var(--s-24) 0;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--s-3);
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: var(--s-4);
  text-align: center;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
  position: relative;
  z-index: 1;
}

/* ---------- 8. NAVIGATION ---------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-8);
  background: rgba(11,15,25,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--motion-slow), box-shadow var(--motion-slow), padding var(--motion-slow);
}
#navbar.scrolled {
  background: rgba(11,15,25,0.92);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: #fff !important;
  letter-spacing: 0.02em;
}
.nav-logo-icon { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  list-style: none;
}
.nav-links a {
  position: relative;
  display: inline-block;
  padding: var(--s-2) var(--s-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--r-md);
  transition: color var(--motion-medium), background var(--motion-medium);
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.04);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 1px;
  transform: translateX(-50%);
  transition: width var(--motion-slow) ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 60%;
}

.nav-cta {
  background: rgba(0,245,255,0.08) !important;
  border: 1px solid var(--border-accent) !important;
  color: var(--accent) !important;
  border-radius: var(--r-full) !important;
  padding: var(--s-2) var(--s-5) !important;
}
.nav-cta:hover {
  background: rgba(0,245,255,0.15) !important;
  color: #fff !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-3);
  z-index: 1010;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  border-radius: var(--r-md);
  transition: background var(--motion-medium);
  margin-right: calc(-1 * var(--s-2));
}
.hamburger:active {
  background: rgba(255,255,255,0.06);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--motion-slow), opacity var(--motion-slow);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 10. HERO — SPLIT LAYOUT ---------- */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px var(--s-6) var(--s-16);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(0,245,255,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-split {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-16);
  align-items: center;
  max-width: 1200px;
  width: 100%;
}

.hero-left {
  max-width: 560px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  background: rgba(0,245,255,0.06);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--s-8);
}
.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--neon-green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  margin-bottom: var(--s-4);
  letter-spacing: 0.02em;
  text-align: center;
}

.hero-title {
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: var(--s-6);
  min-height: 2em;
  text-align: center;
}
.typed-cursor {
  display: inline-block;
  font-weight: 300;
  color: var(--accent);
  animation: blink .75s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--s-10);
  line-height: 1.7;
  text-align: center;
}
.hero-desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- 11. CYBER COMMAND PANEL ---------- */
.hero-right {
  display: flex;
  justify-content: center;
}

.cyber-command-panel {
  background: rgba(15,21,37,0.6);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-xl);
  padding: var(--s-8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-6);
  position: relative;
  overflow: hidden;
}
/* Scanning beam across panel */
.cyber-command-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: panelScan 4s ease-in-out infinite;
}
@keyframes panelScan {
  0%   { left: -100%; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Cyber rings around shield */
.cyber-ring-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border-style: dashed;
}
.ring-outer {
  inset: 0;
  border-width: 1px;
  border-color: rgba(0,245,255,0.15);
  animation: ringRotateCW 25s linear infinite;
}
.ring-mid {
  inset: 12px;
  border-width: 1px;
  border-color: rgba(0,102,255,0.12);
  animation: ringRotateCCW 18s linear infinite;
}
.ring-inner {
  inset: 24px;
  border-width: 1px;
  border-color: rgba(0,245,255,0.08);
  animation: ringRotateCW 12s linear infinite;
}

@keyframes ringRotateCW { to { transform: rotate(360deg); } }
@keyframes ringRotateCCW { to { transform: rotate(-360deg); } }

.shield-center {
  width: 90px;
  height: 105px;
  position: relative;
  z-index: 2;
}
.shield-outline {
  animation: shieldPulse 3s ease-in-out infinite;
}
.shield-check {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkDraw 1.5s 0.5s ease forwards;
}
@keyframes shieldPulse {
  0%, 100% { filter: url(#shieldGlow); opacity: 1; }
  50% { filter: url(#shieldGlow) drop-shadow(0 0 8px rgba(0,245,255,0.5)); opacity: 0.85; }
}
@keyframes checkDraw { to { stroke-dashoffset: 0; } }

/* ★ Scroll indicator */
.scroll-indicator {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  opacity: 0.5;
  animation: bobUp 2s ease-in-out infinite;
  margin-top: var(--s-12);
}
.scroll-mouse {
  width: 22px; height: 34px;
  border: 2px solid var(--text-muted);
  border-radius: 11px;
  position: relative;
}
.scroll-wheel {
  width: 3px; height: 6px;
  background: var(--accent);
  border-radius: 2px;
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  animation: scrollDown 1.8s ease-in-out infinite;
}
.scroll-indicator span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}
@keyframes bobUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes scrollDown {
  0%   { opacity: 0; top: 4px; }
  30%  { opacity: 1; }
  100% { opacity: 0; top: 18px; }
}

/* ---------- 13. BUTTONS ---------- */
.btn-primary,
.btn-secondary,
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--s-3) var(--s-6);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--motion-slow) ease;
  border: none;
  letter-spacing: 0.02em;
  will-change: transform;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #0B0F19;
}
.btn-primary:hover {
  box-shadow: var(--shadow-neon);
  transform: translateY(-2px);
  color: #0B0F19;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  background: rgba(0,245,255,0.04);
}

.btn-submit {
  width: 100%;
  justify-content: center;
  background: var(--gradient-accent);
  color: #0B0F19;
  padding: var(--s-4) var(--s-8);
  font-size: var(--text-base);
}
.btn-submit:hover { box-shadow: var(--shadow-neon); transform: translateY(-2px); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- 14. ABOUT SECTION ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--s-16);
  align-items: start;
}

.about-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-8);
}

.about-avatar {
  position: relative;
  width: 160px; height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 50%;
  border: 2px solid var(--border-accent);
}
.about-avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(0,245,255,0.1);
  animation: ringPulse 4s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.4; }
}
.about-shield-icon { color: var(--accent); }

.about-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: center;
}
.tech-tag {
  padding: var(--s-1) var(--s-3);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  transition: border-color var(--motion-slow), color var(--motion-slow);
}
.tech-tag:hover {
  border-color: var(--border-accent);
  color: var(--accent);
}

.about-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--s-4);
  text-align: center;
}
.about-desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-8);
}

.expertise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: transform var(--motion-slow), border-color var(--motion-slow), box-shadow var(--motion-slow);
  will-change: transform;
}
.expertise-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-neon);
}

.expertise-icon {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--r-md);
  color: var(--accent);
  margin-bottom: var(--s-3);
  transition: transform var(--motion-slow);
}
.expertise-card:hover .expertise-icon { transform: scale(1.1); }
.expertise-title { font-weight: 600; font-size: var(--text-sm); color: #fff; margin-bottom: var(--s-2); }
.expertise-desc { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }

/* ---------- 15. INCIDENT RESPONSE TIMELINE ---------- */
.timeline-header {
  text-align: center;
  margin-bottom: var(--s-16);
}

.timeline-track {
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
  position: relative;
  padding-top: var(--s-12);
}

.timeline-line {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
}
.timeline-line-fill {
  width: 0;
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 1px;
  transition: width 1.5s ease;
}
.timeline-track.visible .timeline-line-fill {
  width: 100%;
}

.timeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.tl-node {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px solid var(--border-accent);
  border-radius: 50%;
  color: var(--accent);
  margin-bottom: var(--s-4);
  transition: background var(--motion-slow), box-shadow var(--motion-slow), transform var(--motion-slow);
  position: relative;
  z-index: 3;
}
.timeline-step:hover .tl-node {
  background: rgba(0,245,255,0.1);
  box-shadow: 0 0 20px rgba(0,245,255,0.2);
  transform: scale(1.1);
}

.tl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: transform var(--motion-slow), border-color var(--motion-slow), box-shadow var(--motion-slow);
  will-change: transform;
}
.timeline-step:hover .tl-card {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-neon);
}
.tl-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--s-2);
}
.tl-card p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- 16. PROJECTS — GLASSMORPHIC THREAT CARDS ---------- */
.projects-header,
.services-header,
.cert-header,
.tools-header {
  text-align: center;
  margin-bottom: var(--s-16);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6);
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--motion-slow), border-color var(--motion-slow), box-shadow var(--motion-slow);
  position: relative;
  will-change: transform;
}
.project-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-neon);
}

/* ★ Animated scanning line */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  transform: translateX(-100%);
  animation: scanLine 3.5s ease-in-out infinite;
  z-index: 5;
}
@keyframes scanLine {
  0%, 100% { transform: translateX(-100%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

.project-header {
  padding: var(--s-8) var(--s-6) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.project-img-bg {
  width: 80px; height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--r-lg);
  color: var(--accent);
  transition: transform var(--motion-slow);
}
.project-card:hover .project-img-bg { transform: scale(1.05); }

/* ★ Risk level badges */
.risk-badge {
  padding: 3px 10px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--r-full);
  border: 1px solid;
}
.risk-critical {
  color: var(--risk-critical);
  border-color: rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.08);
}
.risk-high {
  color: var(--risk-high);
  border-color: rgba(245,158,11,0.3);
  background: rgba(245,158,11,0.08);
}
.risk-medium {
  color: var(--risk-medium);
  border-color: rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.08);
}
.risk-low {
  color: var(--risk-low);
  border-color: rgba(16,185,129,0.3);
  background: rgba(16,185,129,0.08);
}

.project-info { padding: var(--s-6); }
.project-num {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--s-2);
}
.project-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--s-3);
}
.project-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--s-3);
}

.project-impact-bar {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--neon-green);
  margin-bottom: var(--s-4);
  padding: var(--s-2) var(--s-3);
  background: rgba(16,185,129,0.06);
  border-radius: var(--r-sm);
  border: 1px solid rgba(16,185,129,0.15);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.project-tag {
  padding: var(--s-1) var(--s-3);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent);
  transition: gap var(--motion-slow), color var(--motion-medium);
}
.project-link:hover { gap: var(--s-3); color: #fff; }

/* ---------- 17. SERVICES SECTION ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  transition: transform var(--motion-slow), border-color var(--motion-slow), box-shadow var(--motion-slow);
  will-change: transform;
}
.service-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-neon);
}

.service-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--r-md);
  color: var(--accent);
  margin-bottom: var(--s-5);
  transition: transform var(--motion-slow);
}
.service-card:hover .service-icon { transform: scale(1.1); }
.service-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--s-3);
}
.service-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--s-4);
}
.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.service-list li {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  padding-left: var(--s-5);
  position: relative;
}
.service-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

/* ---------- 18. TOOLS & AUTHORITY ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-4);
  margin-bottom: var(--s-12);
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-5) var(--s-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-align: center;
  transition: transform var(--motion-slow), border-color var(--motion-slow), box-shadow var(--motion-slow);
  will-change: transform;
}
.tool-item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-neon);
}

.tool-icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--r-md);
  color: var(--accent);
  transition: transform var(--motion-slow);
}
.tool-item:hover .tool-icon { transform: scale(1.1); }
.tool-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: #fff;
}
.tool-cat {
  font-size: var(--text-xs);
  color: var(--text-dim);
}

/* Mission quote */
.mission-quote {
  position: relative;
  text-align: center;
  padding: var(--s-10) var(--s-12);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  max-width: 700px;
  margin: 0 auto;
}
.mission-quote::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-accent);
}
.mission-quote .quote-icon {
  display: block;
  margin: 0 auto var(--s-4);
  color: var(--accent);
}
.mission-quote p {
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--s-4);
}
.mission-quote cite {
  font-size: var(--text-sm);
  color: var(--text-dim);
  font-style: normal;
}

/* ---------- 19. CERTIFICATIONS ---------- */
.cert-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  max-width: 800px;
  margin: 0 auto;
}

.cert-card {
  display: flex;
  gap: var(--s-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  transition: transform var(--motion-slow), border-color var(--motion-slow), box-shadow var(--motion-slow);
  align-items: flex-start;
  will-change: transform;
}
.cert-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-neon);
}

.cert-badge-wrap {
  flex-shrink: 0;
  width: 64px; height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--r-md);
  color: var(--accent);
}
.cert-award-icon { transition: transform var(--motion-slow); }
.cert-card:hover .cert-award-icon { transform: scale(1.1); }

.cert-info { flex: 1; }
.cert-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--s-1);
}
.cert-issuer { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--s-3); }
.cert-desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--s-3); }
.cert-skills { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.cert-skill {
  padding: var(--s-1) var(--s-3);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}

.cert-verified {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--s-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--neon-green);
  white-space: nowrap;
  animation: certPulse 3s ease-in-out infinite;
}
.cert-verified svg { color: var(--neon-green); }
@keyframes certPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ---------- 20. WHY HIRE ME ---------- */
#why { padding: var(--s-16) 0; }

.why-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s-16) var(--s-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.why-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-accent);
}
.why-box-title { margin-bottom: var(--s-4); }
.why-box-sub {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto var(--s-12);
}

.why-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
  margin-bottom: var(--s-10);
}
.why-stat { text-align: center; }
.why-num {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: var(--s-2);
}
.why-label { font-size: var(--text-sm); color: var(--text-muted); }
.why-cta-wrap {
  display: flex;
  gap: var(--s-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 21. CONTACT — SECURE TRANSMISSION ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-16);
  align-items: start;
}

.contact-intro {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--s-8);
  text-align: center;
}

.contact-items { display: flex; flex-direction: column; gap: var(--s-4); }
.contact-item { display: flex; align-items: flex-start; gap: var(--s-4); }
.ci-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--r-md);
  color: var(--accent);
}
.ci-text { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6; }
.ci-text strong { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }

/* Email Me Button */
.btn-email-me {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-6);
  padding: var(--s-3) var(--s-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #0B0F19;
  background: var(--gradient-accent);
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all var(--motion-slow) ease;
  will-change: transform, box-shadow;
  position: relative;
  overflow: hidden;
}
.btn-email-me::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity var(--motion-slow) ease;
}
.btn-email-me:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0,245,255,0.4), 0 0 40px rgba(0,245,255,0.15);
  color: #0B0F19;
}
.btn-email-me:hover::before { opacity: 1; }
.btn-email-me:active { transform: translateY(0); }
.btn-email-me svg { flex-shrink: 0; }

/* Form box */
.form-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  position: relative;
  overflow: hidden;
}

.form-secure-badge {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--neon-green);
  margin-bottom: var(--s-6);
  padding: var(--s-2) var(--s-3);
  background: rgba(16,185,129,0.06);
  border-radius: var(--r-sm);
  border: 1px solid rgba(16,185,129,0.15);
}
.form-secure-badge svg { color: var(--neon-green); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}

.form-group { margin-bottom: var(--s-4); }
.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--s-2);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border-color var(--motion-medium), box-shadow var(--motion-medium);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-err {
  display: block;
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: var(--s-1);
  min-height: 1em;
}
.form-group.has-error input,
.form-group.has-error textarea { border-color: var(--danger); }

/* Submission error banner */
.form-error-banner {
  display: none;
  background: rgba(239,68,68,0.12);
  border: 1px solid var(--danger);
  color: #FCA5A5;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  margin-bottom: var(--s-4);
  text-align: center;
}

/* Encrypting overlay */
.form-encrypting {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(11,15,25,0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
}
.form-encrypting.active {
  display: flex;
  animation: fadeIn var(--motion-slow) ease;
}
.encrypt-lock {
  color: var(--accent);
  animation: lockPulse 1s ease-in-out infinite;
}
@keyframes lockPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.6; }
}
.form-encrypting span {
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Form success */
.form-success {
  display: none;
  text-align: center;
  padding: var(--s-10) var(--s-6);
}
.form-success.visible {
  display: block;
  animation: fadeIn var(--motion-slower) ease;
}
.success-icon {
  width: 72px; height: 72px;
  margin: 0 auto var(--s-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16,185,129,0.1);
  border: 2px solid rgba(16,185,129,0.2);
  border-radius: 50%;
  color: var(--neon-green);
  animation: successPop var(--motion-slower) ease;
}
@keyframes successPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.success-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--s-2);
}
.success-msg {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

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

/* ---------- 22. FOOTER ---------- */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: var(--s-12) 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-6);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: #fff;
}
.footer-logo svg { color: var(--accent); }

.footer-links {
  display: flex;
  gap: var(--s-5);
  list-style: none;
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--motion-medium);
}
.footer-links a:hover { color: var(--accent); }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s-3);
}

.socials { display: flex; gap: var(--s-2); }
.social-btn {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-muted);
  transition: all var(--motion-slow);
  will-change: transform;
}
.social-btn:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(0,245,255,0.15);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-dim);
}

/* ---------- 23. FLOATING CTA ---------- */
.floating-cta {
  position: fixed;
  bottom: var(--s-8);
  right: var(--s-8);
  z-index: 900;
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  color: #0B0F19;
  border-radius: 50%;
  box-shadow: var(--shadow-neon);
  transition: transform var(--motion-slow), box-shadow var(--motion-slow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}
.floating-cta.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.floating-cta:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 0 30px rgba(0,245,255,0.3);
  color: #0B0F19;
}

/* ---------- 24. REVEAL & ANIMATION SYSTEM ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--motion-slower) ease, transform var(--motion-slower) ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

.reveal-hero {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--motion-slower) ease var(--delay, 0s), transform var(--motion-slower) ease var(--delay, 0s);
}
.reveal-hero.visible {
  opacity: 1;
  transform: translateY(0);
}

/* VFX hero name */
.vfx-pending { opacity: 0; }
.vfx-ready { opacity: 1; }
.vfx-ready .char-wrap { display: inline-block; overflow: hidden; }
.vfx-ready .char {
  display: inline-block;
  animation: charReveal var(--motion-slower) cubic-bezier(.16,1,.3,1) forwards;
  animation-delay: var(--d);
  opacity: 0;
  transform: translateY(100%);
}
@keyframes charReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ★ 3D Tilt (applied via JS custom properties) */
.tilt-card {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

/* ---------- 25. RESPONSIVE ---------- */

/* Body scroll lock when mobile menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-overflow-scrolling: none;
  overscroll-behavior: none;
}

/* 1200px — Desktop grid adjustments */
@media (max-width: 1200px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(4, 1fr); }
}

/* 1024px — Tablet & Mobile Navigation */
@media (max-width: 1024px) {

  /* ── Full-screen overlay navigation ── */
  .hamburger {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(11,15,25,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--s-3);
    z-index: 1005;
    padding: var(--s-16) var(--s-6);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: var(--text-2xl);
    font-family: var(--font-display);
    font-weight: 600;
    padding: var(--s-4) var(--s-8);
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: var(--r-lg);
    transition: color var(--motion-medium), background var(--motion-medium);
    transform: translateY(20px);
    opacity: 0;
  }
  .nav-links.open a {
    transform: translateY(0);
    opacity: 1;
    transition: color var(--motion-medium), background var(--motion-medium),
                transform .4s cubic-bezier(.16,1,.3,1), opacity .4s ease;
  }
  .nav-links.open a:nth-child(1) { transition-delay: .05s; }
  .nav-links.open a:nth-child(2) { transition-delay: .10s; }
  .nav-links.open a:nth-child(3) { transition-delay: .15s; }
  .nav-links.open a:nth-child(4) { transition-delay: .20s; }
  .nav-links.open a:nth-child(5) { transition-delay: .25s; }
  .nav-links.open a:nth-child(6) { transition-delay: .30s; }

  .nav-links a:hover,
  .nav-links a:active {
    color: #fff;
    background: rgba(0,245,255,0.06);
  }

  /* Nav CTA in overlay */
  .nav-links .nav-cta {
    margin-top: var(--s-6);
    font-size: var(--text-xl) !important;
    padding: var(--s-4) var(--s-10) !important;
    min-height: 56px;
  }

  /* ── Layout stacking ── */
  .hero-split {
    grid-template-columns: 1fr;
    gap: var(--s-10);
    text-align: center;
  }
  .hero-left { max-width: none; }
  .hero-right { justify-content: center; }
  .cyber-command-panel { max-width: 380px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--s-10);
    text-align: center;
  }

  .timeline-track {
    flex-direction: column;
    gap: var(--s-6);
    padding-top: 0;
    padding-left: var(--s-12);
  }
  .timeline-line {
    top: 0;
    bottom: 0;
    left: 24px;
    right: auto;
    width: 2px;
    height: auto;
  }
  .timeline-step {
    flex-direction: row;
    text-align: left;
    gap: var(--s-4);
  }
  .tl-node { flex-shrink: 0; margin-bottom: 0; }
  .tl-card { flex: 1; }

  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: var(--s-10); }

  .tools-grid { grid-template-columns: repeat(3, 1fr); }

  /* Reduce glows on tablet */
  .hero-glow { width: 500px; height: 350px; }
  .mouse-spotlight { display: none; }
}

/* 768px — Mobile */
@media (max-width: 768px) {
  html { scroll-padding-top: 80px; }
  section { padding: var(--s-16) 0; }
  .section-title { font-size: var(--text-3xl); }
  .section-subtitle { font-size: var(--text-base); }

  /* ── Hero mobile ── */
  #hero { padding-top: 100px; padding-bottom: var(--s-10); min-height: auto; }
  .hero-name { font-size: clamp(2rem, 10vw, 3.5rem); }
  .hero-title { font-size: var(--text-xl); }
  .hero-desc { font-size: var(--text-base); margin-bottom: var(--s-8); }
  .hero-badge { margin-bottom: var(--s-6); }
  .hero-glow { width: 350px; height: 250px; opacity: 0.5; }
  .cyber-ring-wrap { width: 150px; height: 150px; }
  .shield-center { width: 70px; height: 82px; }

  /* ── Cards & grids single-column ── */
  .expertise-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .expertise-card { padding: var(--s-6); }
  .service-card { padding: var(--s-6); }

  .cert-card { flex-direction: column; gap: var(--s-4); text-align: center; }
  .cert-verified { justify-content: center; }
  .cert-skills { justify-content: center; }

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

  .tools-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }

  /* ── Footer mobile ── */
  .footer-inner { flex-direction: column; text-align: center; gap: var(--s-4); }
  .footer-right { align-items: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }

  /* ── Touch-friendly buttons (48px min tap targets) ── */
  .btn-primary,
  .btn-secondary {
    min-height: 48px;
    padding: var(--s-3) var(--s-6);
    font-size: var(--text-base);
  }
  .btn-submit {
    min-height: 52px;
    padding: var(--s-4) var(--s-8);
    font-size: var(--text-base);
  }
  .btn-email-me {
    min-height: 48px;
    padding: var(--s-3) var(--s-6);
  }

  /* ── Form inputs — 16px font prevents iOS zoom on focus ── */
  .form-group input,
  .form-group textarea {
    font-size: 16px;
    padding: var(--s-4);
    min-height: 48px;
  }
  .form-group label {
    font-size: var(--text-base);
    margin-bottom: var(--s-2);
  }
  .form-box { padding: var(--s-6); }

  /* ── Contact items touch targets ── */
  .contact-item { padding: var(--s-3) 0; }
  .ci-icon { width: 44px; height: 44px; }

  /* ── Social buttons 44px touch ── */
  .social-btn { width: 44px; height: 44px; }

  /* ── Reduce expensive shadows on mobile ── */
  .project-card:hover,
  .service-card:hover,
  .expertise-card:hover,
  .tool-item:hover,
  .cert-card:hover {
    box-shadow: 0 0 12px rgba(0,245,255,0.1);
  }

  /* Remove hover transforms on mobile (they stick on touch) */
  .project-card:hover,
  .service-card:hover,
  .expertise-card:hover {
    transform: none;
  }

  /* ── Cyber grid — tighter pattern on mobile ── */
  .cyber-grid { background-size: 40px 40px; }

  /* ── Project cards mobile ── */
  .project-header { padding: var(--s-6) var(--s-5) 0; }
  .project-info { padding: var(--s-5); }
  .project-img-bg { width: 64px; height: 64px; }
  .project-link { min-height: 44px; display: inline-flex; align-items: center; }

  /* ── Timeline compact ── */
  .timeline-track { padding-left: var(--s-10); }
  .tl-node { width: 40px; height: 40px; }
  .tl-card { padding: var(--s-4); }
  .tl-card h3 { font-size: var(--text-sm); }

  /* ── Mission quote ── */
  .mission-quote { padding: var(--s-8) var(--s-6); }
  .mission-quote p { font-size: var(--text-lg); }

  /* ── Why section ── */
  .why-box { padding: var(--s-12) var(--s-6); }
}

/* 480px — Small phones */
@media (max-width: 480px) {
  .container { padding: 0 var(--s-4); }
  section { padding: var(--s-10) 0; }
  #navbar { padding: var(--s-3) var(--s-4); }
  .section-title { font-size: var(--text-2xl); }
  .section-label { font-size: 0.65rem; }

  /* ── Hero compact ── */
  #hero { padding-top: 80px; padding-bottom: var(--s-8); }
  .hero-badge { font-size: 0.65rem; padding: 6px 12px; }
  .hero-desc { font-size: var(--text-sm); }
  .hero-ctas { flex-direction: column; align-items: center; width: 100%; }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary { width: 100%; justify-content: center; max-width: 300px; }

  .scroll-indicator { display: none; }
  .cyber-command-panel { padding: var(--s-5); }
  .cyber-ring-wrap { width: 120px; height: 120px; }
  .shield-center { width: 56px; height: 66px; }

  /* ── Why section ── */
  .why-stats { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
  .why-num { font-size: var(--text-3xl); }
  .why-box { padding: var(--s-8) var(--s-4); }

  /* ── Tools grid 2-col ── */
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
  .tool-item { padding: var(--s-4) var(--s-2); }
  .tool-icon { width: 38px; height: 38px; }
  .tool-name { font-size: var(--text-xs); }

  /* ── Mission quote ── */
  .mission-quote { padding: var(--s-6) var(--s-4); }
  .mission-quote p { font-size: var(--text-base); }

  /* ── Floating CTA ── */
  .floating-cta { bottom: var(--s-4); right: var(--s-4); width: 46px; height: 46px; }

  /* ── Form compact ── */
  .form-box { padding: var(--s-5); }
  .form-group input,
  .form-group textarea { padding: var(--s-3) var(--s-4); }

  /* ── Nav overlay text smaller on small phones ── */
  .nav-links a { font-size: var(--text-xl); }

  /* ── Cards internal padding ── */
  .expertise-card { padding: var(--s-5); }
  .service-card { padding: var(--s-5); }
  .cert-card { padding: var(--s-5); }

  /* ── Footer ── */
  .footer-links { gap: var(--s-3); }
  .footer-links a { font-size: var(--text-xs); }

  /* ── About avatar smaller ── */
  .about-avatar { width: 120px; height: 120px; }

  /* ── Hide decorative elements to save paint ── */
  .hero-glow { display: none; }
  .cyber-grid { display: none; }
}

/* 360px — Very small phones */
@media (max-width: 360px) {
  .hero-name { font-size: 1.75rem; }
  .hero-title { font-size: var(--text-lg); }
  .section-title { font-size: var(--text-xl); }
  .nav-links a { font-size: var(--text-lg); padding: var(--s-3) var(--s-6); }
  .btn-primary, .btn-secondary { font-size: var(--text-sm); }
  .why-num { font-size: var(--text-2xl); }
  .about-avatar { width: 100px; height: 100px; }
  .cyber-ring-wrap { width: 100px; height: 100px; }
  .shield-center { width: 48px; height: 56px; }
}

/* ---------- 26. TOUCH DEVICES ---------- */
@media (hover: none) and (pointer: coarse) {
  /* Remove sticky hover effects on touch devices */
  .project-card:hover,
  .service-card:hover,
  .expertise-card:hover,
  .tool-item:hover,
  .cert-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
  }

  /* Active state for touch feedback */
  .project-card:active,
  .service-card:active,
  .expertise-card:active,
  .tool-item:active,
  .cert-card:active {
    border-color: var(--border-accent);
    box-shadow: 0 0 12px rgba(0,245,255,0.1);
    transition-duration: 0.1s;
  }

  .btn-primary:active,
  .btn-secondary:active,
  .btn-submit:active,
  .btn-email-me:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
  }

  /* Remove 3D tilt on touch */
  .tilt-card { transform: none !important; }

  /* Disable scan-line & ring animations (saves battery) */
  .scan-line { display: none; }
  .cyber-command-panel::before { display: none; }
  .ring-outer, .ring-mid, .ring-inner { animation: none; }
}

/* ---------- 27. PREFERS REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .reveal-hero { opacity: 1; transform: none; }
  .vfx-pending { opacity: 1; }
  .tilt-card { transform: none !important; }
  .mouse-spotlight { display: none; }
  .scan-line { display: none; }
}
