/* Lens rays at beacon peak */
.neo-rays { position:absolute; inset:0; pointer-events:none; z-index:7; }
.neo-rays span { position:absolute; left:50%; top:50%; width:18vw; height:2.5px; transform-origin:0% 50%; transform: translate(-50%,-50%) rotate(var(--ang,0deg)) scaleX(0.2); border-radius:999px; opacity:0; background:
  linear-gradient(90deg, rgba(255,255,255,.95) 0%, rgba(168,231,255,.6) 40%, rgba(56,189,248,.2) 80%, rgba(0,0,0,0) 100%);
  filter: drop-shadow(0 0 10px rgba(168,231,255,.6));
}
.neo-rays span:nth-child(1){ --ang: -20deg }
.neo-rays span:nth-child(2){ --ang: 10deg }
.neo-rays span:nth-child(3){ --ang: 32deg }
.neo-rays span:nth-child(4){ --ang: -42deg }
.neo-rays span:nth-child(5){ --ang: -8deg }
.neo-rays span:nth-child(6){ --ang: 58deg }

#loading-screen.beacon-reveal-active.neo-mode .neo-rays span { animation: rayOut .55s cubic-bezier(.16,.84,.44,1) .08s forwards; }
@keyframes rayOut { 0% { opacity:0; transform: translate(-50%,-50%) rotate(var(--ang)) scaleX(0.2) }
  20% { opacity:1 }
  100% { opacity:0; transform: translate(-50%,-50%) rotate(var(--ang)) scaleX(1.05) translateX(20vw) }
}

@media (prefers-reduced-motion: reduce) { .neo-rays, .neo-rays span { display:none !important; } }
/* CSS Custom Properties - Premium Design System */
:root {
  /* Colors - Simplified, Stylish Dark Theme */
  --primary-bg: #0b1220; /* deep navy */
  --secondary-bg: #0e1626;
  --tertiary-bg: #131c2e;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --surface-active: rgba(255, 255, 255, 0.1);
  --text-primary: #e6edf3;
  --text-secondary: #c9d4df;
  --text-muted: #93a2b8;
  /* Single primary accent + subtle companion */
  --accent-primary: #22d3ee; /* cyan */
  --accent-secondary: #38bdf8; /* sky */
  --accent-tertiary: #a78bfa; /* violet */
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --ego-red: #ef4444; /* vivid red for story layer */
  --ego-red-deep: #991b1b;
  /* Minimal gradients using the primary accent */
  --gradient-primary: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
  --gradient-secondary: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%);
  --gradient-accent: linear-gradient(135deg, rgba(34,211,238,1) 0%, rgba(34,211,238,0.6) 100%);
  --gradient-glow: linear-gradient(135deg, rgba(34,211,238,0.9) 0%, rgba(56,189,248,0.8) 50%, rgba(167,139,250,0.75) 100%);
  --code-bg: #0d1117;
  --code-border: #30363d;
  /* Loader slash angles */
  --slash-angle: -16deg;
  --slash-angle-2: -12deg;
  
  /* Typography Scale - Premium */
  --font-sans: 'SF Pro Display', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;
  --font-size-7xl: 4.5rem;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 2.5rem;
  --space-3xl: 3rem;
  --space-4xl: 4rem;
  --space-5xl: 5rem;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;
  
  /* Shadows - Sophisticated */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
  --shadow-glow-lg: 0 0 60px rgba(59, 130, 246, 0.2);
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
  --hue-rotate: 0deg;
}

/* === Ambient Anime Speedlines Overlay === */
.ambient-speedlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1; /* below loader (which sits higher) and above base bg */
  opacity: .10;
  background:
    repeating-linear-gradient(
      var(--slash-angle),
      rgba(168,231,255,0.16) 0px,
      rgba(168,231,255,0.16) 2px,
      transparent 2px,
      transparent 16px
    );
  transform: translateZ(0);
  animation: speedlinesDrift 6s linear infinite;
}
@keyframes speedlinesDrift {
  0% { background-position: 0 0; }
  100% { background-position: 200px -200px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ambient-speedlines { display: none !important; }
}

/* Hero name slash sweep removed */

/* === Slash hover effects for buttons and project cards === */
.btn, .project-card { position: relative; overflow: hidden; }
.btn::before, .project-card::before {
  content: "";
  position: absolute;
  top: 50%; left: -120%;
  width: 140%; height: 180%;
  transform: translateY(-50%) rotate(var(--slash-angle));
  background:
    linear-gradient(90deg, rgba(255,255,255,.7), rgba(168,231,255,.45) 55%, rgba(56,189,248,.15) 80%, rgba(0,0,0,0));
  opacity: 0;
  pointer-events: none;
}
.btn:hover::before, .project-card:hover::before {
  animation: hoverSlash .6s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes hoverSlash {
  0% { left:-120%; opacity: .0; }
  10% { opacity: .9; }
  100% { left: 120%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn::before, .project-card::before { display: none !important; }
}

/* === Click impact slash element === */
.click-slash {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transform: rotate(var(--slash-angle));
  background:
    linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(168,231,255,0.6) 40%, rgba(56,189,248,0.2) 75%, rgba(0,0,0,0) 100%);
  border-radius: 999px;
  filter: drop-shadow(0 0 14px rgba(34,211,238,.55)) drop-shadow(0 0 28px rgba(56,189,248,.4));
  animation: clickSlashFly .5s cubic-bezier(.16,.84,.44,1) forwards;
}
@keyframes clickSlashFly {
  0% { opacity: 0; transform: rotate(var(--slash-angle)) scaleX(0.6) translateZ(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--slash-angle)) translateX(20vw) scaleX(1.1); }
}
@media (prefers-reduced-motion: reduce) { .click-slash { display:none !important; } }

/* Light theme overrides */
body.light-theme {
  color-scheme: light;
  --primary-bg: #ffffff;
  --secondary-bg: #f6fbff;
  --tertiary-bg: #edf6fb;
  --surface: rgba(0, 0, 0, 0.03);
  --surface-hover: rgba(0, 0, 0, 0.06);
  --surface-active: rgba(0, 0, 0, 0.1);
  --text-primary: #0b1220;
  --text-secondary: #152235;
  --text-muted: #4b5b72;
  --code-bg: #f3f9fd;
  --code-border: #e2eef6;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--primary-bg);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Better selection and focus states */
::selection {
  background: rgba(59, 130, 246, 0.25);
  color: var(--text-primary);
}

:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-primary);
  color: #fff;
  padding: 8px 12px;
  z-index: var(--z-fixed);
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 10px; }

/* Premium Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(167, 139, 250, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  filter: hue-rotate(var(--hue-rotate));
}

/* Premium Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-secondary);
}

/* Subtle grain/dot overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.06;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background:
    radial-gradient(800px 400px at 15% 10%, rgba(34,211,238,0.08), transparent 70%),
    radial-gradient(1000px 500px at 85% 90%, rgba(56,189,248,0.06), transparent 70%),
    var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 1;
  visibility: visible;
  clip-path: circle(140% at 50% 50%);
  transition: opacity 0.8s ease, visibility 0.8s ease, clip-path 1s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  clip-path: circle(0% at 50% 50%);
}

.loading-content {
  text-align: center;
  max-width: 300px;
}

.logo-container {
  margin-bottom: var(--space-xl);
}

.logo {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: white;
  margin: 0 auto var(--space-lg);
  animation: logoFloat 3s ease-in-out infinite, neonPulse 2.2s ease-in-out infinite;
  position: relative;
  box-shadow: 
    0 20px 40px rgba(34, 211, 238, 0.35),
    0 0 60px rgba(56, 189, 248, 0.28),
    inset 0 2px 20px rgba(255, 255, 255, 0.2);
}

.logo::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary), var(--accent-primary));
  animation: rotate 2s linear infinite;
  z-index: -1;
}

.logo::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: var(--primary-bg);
  z-index: -1;
}

.loading-text {
  font-size: var(--font-size-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
}

.progress-bar {
  width: 300px;
  height: 8px;
  background: var(--surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  animation: progressFill 3.2s ease-in-out forwards;
  position: relative;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes logoFloat {
  0%, 100% { 
    transform: translateY(0px) scale(1);
    filter: hue-rotate(0deg);
  }
  50% { 
    transform: translateY(-20px) scale(1.05);
    filter: hue-rotate(10deg);
  }
}

@keyframes neonPulse {
  0%, 100% { box-shadow: 0 20px 40px rgba(34,211,238,0.25), 0 0 40px rgba(56,189,248,0.22), inset 0 2px 20px rgba(255,255,255,0.2); }
  50% { box-shadow: 0 25px 50px rgba(34,211,238,0.4), 0 0 70px rgba(56,189,248,0.35), inset 0 2px 22px rgba(255,255,255,0.25); }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes progressFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Loading screen ambient orbs */
.loading-screen::before,
.loading-screen::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.15;
  z-index: -1;
}
.loading-screen::before {
  background: radial-gradient(circle, rgba(34,211,238,0.8), transparent 65%);
  top: -100px; left: -100px;
  animation: orbDrift1 12s ease-in-out infinite;
}
.loading-screen::after {
  background: radial-gradient(circle, rgba(167,139,250,0.7), transparent 65%);
  bottom: -120px; right: -120px;
  animation: orbDrift2 14s ease-in-out infinite;
}
@keyframes orbDrift1 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(40px,20px) scale(1.1);} }
@keyframes orbDrift2 { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(-30px,-10px) scale(1.08);} }

/* Spinner removed in favor of sword/kanji animation */

/* Anime overlay elements */
.anime-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 1200px;
  transform-style: preserve-3d;
  animation: cameraKick 1s ease 0.25s 1;
  will-change: transform, opacity;
}

/* Speedlines across screen */
.speedlines {
  position: absolute;
  inset: -20% -20% -20% -20%;
  background:
    repeating-linear-gradient(
      -10deg,
      transparent 0 14px,
      rgba(34,211,238,0.12) 14px 16px
    ),
    repeating-linear-gradient(
      -10deg,
      transparent 0 48px,
      rgba(56,189,248,0.14) 48px 50px
    );
  transform: translateX(-10%);
  animation: speedlinesMove 1.4s cubic-bezier(.16,.84,.44,1) infinite;
  mix-blend-mode: screen;
}
@keyframes speedlinesMove {
  0% { transform: translateX(-12%); opacity: 0.6; }
  50% { transform: translateX(0%); opacity: 0.8; }
  100% { transform: translateX(12%); opacity: 0.6; }
}

/* Aura pulse centered on content */
.aura {
  position: absolute;
  top: 50%; left: 50%;
  width: 320px; height: 320px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,0.3) 0%, rgba(56,189,248,0.18) 60%, transparent 70%);
  filter: blur(18px);
  animation: auraPulse 2s ease-in-out infinite;
}
@keyframes auraPulse {
  0%,100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.95; }
}

/* Diagonal energy slash */
.slash {
  position: absolute;
  width: 140%; height: 4px;
  top: 40%; left: -20%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
  filter: drop-shadow(0 0 14px rgba(34,211,238,0.5));
  transform: rotate(-12deg) translateX(-120%);
  animation: slashAcross 0.55s cubic-bezier(.14,.64,.22,1) 0.12s forwards;
}
/* Additional slashes for more impact */
.slash-2 {
  top: 55%;
  transform: rotate(8deg) translateX(-130%);
  animation: slashAcross2 0.55s cubic-bezier(.14,.64,.22,1) 0.22s forwards;
}
.slash-3 {
  top: 30%;
  transform: rotate(-20deg) translateX(-130%);
  animation: slashAcross3 0.55s cubic-bezier(.14,.64,.22,1) 0.32s forwards;
}
@keyframes slashAcross {
  0% { transform: rotate(-12deg) translateX(-120%); opacity: 0; }
  10% { opacity: 1; }
  80% { transform: rotate(-12deg) translateX(10%); opacity: 1; }
  100% { transform: rotate(-12deg) translateX(30%); opacity: 0; }
}
@keyframes slashAcross2 {
  0% { transform: rotate(8deg) translateX(-130%); opacity: 0; }
  10% { opacity: 1; }
  80% { transform: rotate(8deg) translateX(10%); opacity: 1; }
  100% { transform: rotate(8deg) translateX(30%); opacity: 0; }
}
@keyframes slashAcross3 {
  0% { transform: rotate(-20deg) translateX(-130%); opacity: 0; }
  10% { opacity: 1; }
  80% { transform: rotate(-20deg) translateX(10%); opacity: 1; }
  100% { transform: rotate(-20deg) translateX(30%); opacity: 0; }
}

/* Kanji flash */
.kanji {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  font-size: 96px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 0 30px rgba(34,211,238,0.6), 0 0 60px rgba(56,189,248,0.45);
  filter: blur(0.4px);
  opacity: 0;
  animation: kanjiPop 0.6s cubic-bezier(.2,.9,.2,1) 0.2s forwards, kanjiGlitch 0.5s steps(2, end) 0.6s 2, kanjiFade 1.2s ease 1.4s forwards;
}
.kanji-seam {
  position: absolute;
  top: 50%; left: 50%;
  width: 64vw; height: 2px;
  transform: translate(-50%, -50%) rotate(var(--slash-angle)) scaleX(0.9);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95) 20%, rgba(168,231,255,0.8) 50%, rgba(255,255,255,0.95) 80%, transparent);
  filter: blur(0.5px) drop-shadow(0 0 10px rgba(34,211,238,0.5));
  opacity: 0;
  z-index: 4;
  animation: seamFlash 0.45s cubic-bezier(.2,.9,.2,1) 0.5s forwards;
}
@keyframes seamFlash {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--slash-angle)) scaleX(0.7); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--slash-angle)) scaleX(1.05); }
}
.kanji::before, .kanji::after {
  content: attr(data-text);
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.95);
  text-shadow: 0 0 22px rgba(34,211,238,0.55), 0 0 44px rgba(56,189,248,0.35);
  opacity: 0;
}
.kanji::before {
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  animation: kanjiLeft 0.9s cubic-bezier(.2,.9,.2,1) 0.65s forwards;
}
.kanji::after {
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
  animation: kanjiRight 0.9s cubic-bezier(.2,.9,.2,1) 0.65s forwards;
}
@keyframes kanjiLeft {
  0% { opacity: 0; filter: blur(0px); transform: translate(calc(-50% - 0px), -50%) rotate(0deg); }
  25% { opacity: 1; }
  100% { opacity: 1; filter: blur(0.4px); transform: translate(calc(-50% - 6px), -50%) rotate(-2deg); }
}
@keyframes kanjiRight {
  0% { opacity: 0; filter: blur(0px); transform: translate(calc(-50% + 0px), -50%) rotate(0deg); }
  25% { opacity: 1; }
  100% { opacity: 1; filter: blur(0.4px); transform: translate(calc(-50% + 6px), -50%) rotate(2deg); }
}
@keyframes kanjiPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7) rotate(-4deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}
@keyframes kanjiGlitch {
  0% { text-shadow: 2px 0 rgba(34,211,238,0.7), -2px 0 rgba(167,139,250,0.6); transform: translate(calc(-50% + 1px), calc(-50% - 1px)); }
  50% { text-shadow: -2px 0 rgba(34,211,238,0.7), 2px 0 rgba(167,139,250,0.6); transform: translate(calc(-50% - 1px), calc(-50% + 1px)); }
  100% { text-shadow: 0 0 30px rgba(34,211,238,0.6), 0 0 60px rgba(56,189,248,0.45); transform: translate(-50%, -50%); }
}
@keyframes kanjiFade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Screen shake on content */
.loading-content {
  animation: shake 0.5s ease-in-out 0.8s 1, surge 0.6s ease-in 1.2s 1;
}
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
@keyframes surge {
  0% { transform: scale(1); }
  100% { transform: scale(1.04); }
}

/* CRT scanlines & chromatic burst */
.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 4px);
  mix-blend-mode: overlay;
  opacity: 0.18;
  animation: scanPulse 1.8s ease-in-out infinite;
}
@keyframes scanPulse { 0%,100% { opacity: 0.14; } 50% { opacity: 0.24; } }

.chromaburst {
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(34,211,238,0.55) 40%, transparent 70%);
  filter: blur(6px);
  animation: chromaExpand 0.6s cubic-bezier(.16,.84,.44,1) 0.9s forwards;
}
@keyframes chromaExpand {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.6; }
  80% { transform: translate(-50%, -50%) scale(18); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(22); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .speedlines, .aura, .slash, .slash-2, .slash-3, .kanji, .loading-content, .scanlines, .chromaburst, .sword, .sword-thrust, .sword-sweep, .sweep-lines, .shockwave, .sparks span, .rgb-split, .vignette, .kanji-seam, .air-slice, .blade-glint, .screen-tear,
  .red-veil, .crosshair, .iris, .ego-lines, .katakana-group, .narrative-caption, .kunai, .kunai-group, .slash-transition, .slash-transition .slash-line, .slash-transition .slash-glow, .slash-break, .break-panel, .break-shards .shard, .neo-sigil, .neo-glyph, .neo-ring, .neo-embers span, .neo-ink, .neo-ink::before, .neo-flare, .neo-crosshair, .neo-flash, .neo-beacon { animation: none !important; }
  /* Hide the narrative overlays entirely for reduced motion */
  .red-veil, .crosshair, .iris, .ego-lines, .katakana-group, .narrative-caption, .kunai-group, .slash-transition, .slash-break, .neo-sigil, .neo-glyph, .neo-ring, .neo-embers, .neo-ink, .neo-flare, .neo-crosshair, .neo-flash, .neo-beacon { opacity: 0 !important; }
}

/* Katana swords */
.sword {
  position: absolute;
  width: 300px; height: 20px;
  filter: drop-shadow(0 0 10px rgba(34,211,238,0.45)) drop-shadow(0 0 24px rgba(56,189,248,0.35));
  opacity: 0;
}
.sword svg { width: 100%; height: 100%; display: block; }

.sword-1 {
  top: 42%; left: -40%;
  transform: rotate(-14deg) translateX(0);
  animation: swordFly1 0.8s cubic-bezier(.14,.64,.22,1) 0.7s forwards;
}
@keyframes swordFly1 {
  0% { transform: rotate(-14deg) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  80% { transform: rotate(-14deg) translateX(150%); opacity: 1; }
  100% { transform: rotate(-14deg) translateX(170%); opacity: 0; }
}

.sword-2 {
  top: 58%; left: 80%;
  transform: rotate(168deg) translateX(0);
  animation: swordFly2 0.8s cubic-bezier(.14,.64,.22,1) 1s forwards;
}

/* 3D center sword thrust */
.sword-thrust {
  position: absolute;
  top: 50%; left: 50%;
  width: 80px; height: 520px;
  transform: translate(-50%, -50%) translateZ(-800px) rotateX(12deg) rotateZ(2deg) scale(0.55);
  transform-origin: 50% 50%;
  opacity: 0;
  filter: drop-shadow(0 0 14px rgba(34,211,238,0.5)) drop-shadow(0 0 28px rgba(56,189,248,0.35));
  animation: swordThrust 0.9s cubic-bezier(.08,.9,.2,1) 0.45s forwards;
}
.sword-thrust svg { width: 100%; height: 100%; display: block; }

@keyframes swordThrust {
  0% { transform: translate(-50%, -50%) translateZ(-800px) rotateX(12deg) rotateZ(2deg) scale(0.55); opacity: 0; filter: saturate(1) blur(0.5px); }
  40% { opacity: 1; }
  70% { filter: saturate(1.15) blur(0.25px); }
  100% { transform: translate(-50%, -50%) translateZ(260px) rotateX(0deg) rotateZ(0deg) scale(1.1); opacity: 1; filter: saturate(1.25) blur(0); }
}
@keyframes swordFly2 {
  0% { transform: rotate(168deg) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  80% { transform: rotate(168deg) translateX(-150%); opacity: 1; }
  100% { transform: rotate(168deg) translateX(-170%); opacity: 0; }
}

/* Premium Navigation */
/* Sword sweep generator */
.sword-sweep {
  position: absolute;
  top: 58%; left: -5%;
  width: 300px; height: 20px;
  transform-origin: 0% 50%;
  transform: rotate(var(--slash-angle)) translate3d(0,0,0);
  filter: drop-shadow(0 0 14px rgba(34,211,238,0.6)) drop-shadow(0 0 36px rgba(56,189,248,0.45));
  mix-blend-mode: screen;
  animation: sweepArc 1.05s cubic-bezier(.22,.61,.36,1) 0.22s forwards;
  z-index: 3;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
}
.sword-sweep svg { width: 100%; height: 100%; display: block; }

@keyframes sweepArc {
  0% { transform: rotate(var(--slash-angle)) translate3d(0,0,0); opacity: 0; filter: brightness(1) saturate(1); }
  12% { opacity: 1; }
  70% { transform: rotate(var(--slash-angle)) translate3d(88vw,0,0); opacity: 1; filter: brightness(1.35) saturate(1.25); }
  100% { transform: rotate(var(--slash-angle)) translate3d(103vw,0,0); opacity: 0.25; filter: brightness(1.05) saturate(1.05); }
}

.sweep-lines {
  position: absolute;
  left: 275px; top: 8px; /* anchor near blade tip (blade rect x=40..280) */
  height: 4px; width: 86vw; /* full length, then scale */
  transform-origin: 0% 50%;
  transform: translate3d(0,0,0) scaleX(0);
  background: repeating-linear-gradient(90deg,
    rgba(255,255,255,0.9) 0 10px,
    rgba(168,231,255,0.9) 10px 20px,
    rgba(34,211,238,0.65) 20px 30px,
    rgba(56,189,248,0.25) 30px 40px,
    rgba(0,0,0,0) 40px 60px
  );
  filter: blur(0.4px) drop-shadow(0 0 10px rgba(34,211,238,0.45));
  opacity: 0;
  border-radius: 10px;
  z-index: 2; /* behind the blade */
  animation: linesGrow 0.9s cubic-bezier(.22,.61,.36,1) 0.24s forwards;
  will-change: transform, opacity, filter;
}
.sweep-lines::before,
.sweep-lines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: inherit;
  filter: blur(1.2px) opacity(0.7);
}
.sweep-lines::before {
  transform: translateY(-4px) scaleX(0);
  opacity: 0.6;
  animation: linesGrowGhostUp 0.95s cubic-bezier(.22,.61,.36,1) 0.3s forwards;
}
.sweep-lines::after {
  transform: translateY(4px) scaleX(0);
  opacity: 0.45;
  animation: linesGrowGhostDown 0.9s cubic-bezier(.22,.61,.36,1) 0.34s forwards;
}

@keyframes linesGrow {
  0% { transform: translate3d(0,0,0) scaleX(0); opacity: 0; filter: blur(0.6px); }
  10% { opacity: 1; }
  80% { transform: translate3d(0,0,0) scaleX(0.86); opacity: 1; filter: blur(0.3px); }
  100% { transform: translate3d(0,0,0) scaleX(1); opacity: 0.18; filter: blur(0.2px); }
}

@keyframes linesGrowGhostUp {
  0% { transform: translateY(-4px) scaleX(0); opacity: 0; }
  20% { opacity: 0.6; }
  80% { transform: translateY(-4px) scaleX(0.86); opacity: 0.6; }
  100% { transform: translateY(-4px) scaleX(0.9); opacity: 0.12; }
}
@keyframes linesGrowGhostDown {
  0% { transform: translateY(4px) scaleX(0); opacity: 0; }
  20% { opacity: 0.45; }
  80% { transform: translateY(4px) scaleX(0.82); opacity: 0.45; }
  100% { transform: translateY(4px) scaleX(0.8); opacity: 0.1; }
}

/* Second, shorter follow-through sweep */
.sword-sweep.second {
  top: 46%; left: -8%;
  transform: rotate(var(--slash-angle-2)) translate3d(0,0,0);
  animation: sweepArc2 0.68s cubic-bezier(.22,.61,.36,1) 0.54s forwards;
}
.sword-sweep.second .sweep-lines {
  left: 275px; top: 8px;
  height: 3px; width: 66vw;
  transform: translate3d(0,0,0) scaleX(0);
  animation: linesGrow2 0.55s cubic-bezier(.22,.61,.36,1) 0.58s forwards;
}
@keyframes sweepArc2 {
  0% { transform: rotate(var(--slash-angle-2)) translate3d(0,0,0); opacity: 0; filter: brightness(1) saturate(1); }
  12% { opacity: 1; }
  80% { transform: rotate(var(--slash-angle-2)) translate3d(70vw,0,0); opacity: 1; filter: brightness(1.25) saturate(1.2); }
  100% { transform: rotate(var(--slash-angle-2)) translate3d(84vw,0,0); opacity: 0.2; filter: brightness(1.05) saturate(1.05); }
}
@keyframes linesGrow2 {
  0% { transform: translate3d(0,0,0) scaleX(0); opacity: 0; filter: blur(0.6px); }
  20% { opacity: 1; }
  80% { transform: translate3d(0,0,0) scaleX(0.88); opacity: 1; filter: blur(0.3px); }
  100% { transform: translate3d(0,0,0) scaleX(1); opacity: 0.18; filter: blur(0.2px); }
}

/* Blade tip glint */
.blade-glint {
  position: absolute;
  left: 278px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(168,231,255,0.6) 60%, rgba(56,189,248,0.2) 80%, rgba(0,0,0,0) 100%);
  filter: blur(0.4px) drop-shadow(0 0 8px rgba(34,211,238,0.7));
  transform: scale(0.6);
  opacity: 0;
  z-index: 4;
  animation: glint 0.35s ease 0.28s forwards;
  will-change: transform, opacity, filter;
}
.sword-sweep.second .blade-glint { animation-delay: 0.6s; }
@keyframes glint { 0% { opacity: 0; transform: scale(0.6); } 30% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(0.8); } }

/* Air slice crescent ahead of blade */
.air-slice {
  position: absolute;
  left: 292px; top: -4px;
  width: 70px; height: 28px;
  border-radius: 50% / 60%;
  background: radial-gradient(ellipse at 20% 50%, rgba(255,255,255,0.6) 0%, rgba(168,231,255,0.35) 45%, rgba(56,189,248,0.2) 65%, rgba(0,0,0,0) 76%);
  filter: blur(0.6px) drop-shadow(0 0 10px rgba(34,211,238,0.6));
  transform: scale(0.9);
  opacity: 0;
  z-index: 1;
  animation: airSlice 0.5s cubic-bezier(.16,.84,.44,1) 0.26s forwards;
  will-change: transform, opacity, filter;
}
.sword-sweep.second .air-slice { animation-delay: 0.58s; width: 56px; height: 22px; left: 292px; top: -6px; }
@keyframes airSlice { 0% { opacity: 0; transform: scale(0.9); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }

/* Screen tear bands */
.screen-tear {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: repeating-linear-gradient(0deg, rgba(56,189,248,0.06) 0 2px, rgba(0,0,0,0) 2px 5px);
  animation: tearFlicker 0.4s ease 0.45s 1 forwards;
}
@keyframes tearFlicker { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }

/* Vignette for drama */
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(0,0,0,0) 0%, rgba(0,0,0,0.25) 70%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
  opacity: 0;
  animation: vignettePulse 1.2s ease 0.2s forwards;
}
@keyframes vignettePulse {
  0% { opacity: 0; }
  40% { opacity: 0.7; }
  100% { opacity: 0.35; }
}

/* Film grain overlay */
.film-grain {
  position: absolute; inset: 0; pointer-events: none; z-index: 11;
  opacity: 0.04; mix-blend-mode: overlay; contain: paint;
  background-image:
    radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,.12) 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  background-position: 0 0, 20px 10px;
  animation: grainShift .8s steps(2) infinite;
}
@keyframes grainShift {
  0% { background-position: 0 0, 20px 10px; }
  100% { background-position: 10px 5px, 30px 15px; }
}

/* Video loader removed: cleaning related styles */

/* Shockwave ring */
.shockwave {
  position: absolute;
  top: 52%; left: 50%;
  width: 10px; height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(56,189,248,0.65), 0 0 0 0 rgba(34,211,238,0.55) inset;
  opacity: 0;
  animation: shock 0.6s cubic-bezier(.16,.84,.44,1) 0.55s forwards;
  will-change: transform, opacity, box-shadow;
}
@keyframes shock {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); box-shadow: 0 0 0 0 rgba(56,189,248,0.65), 0 0 0 0 rgba(34,211,238,0.55) inset; }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(22); box-shadow: 0 0 0 2px rgba(56,189,248,0), 0 0 0 2px rgba(34,211,238,0) inset; }
}

/* Sparks */
.sparks { position: absolute; inset: 0; pointer-events: none; }
.sparks span {
  --i: 1;
  position: absolute;
  top: 56%; left: 8%;
  width: 8px; height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(56,189,248,0.4));
  border-radius: 2px;
  transform: rotate(calc(-30deg + var(--i) * 3deg));
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(34,211,238,0.6));
  animation: sparkFly 0.6s cubic-bezier(.16,.84,.44,1) calc(0.3s + var(--i) * 0.02s) forwards;
  will-change: transform, opacity, filter;
}
.sparks span:nth-child(1){ --i: 0; }
.sparks span:nth-child(2){ --i: 1; }
.sparks span:nth-child(3){ --i: 2; }
.sparks span:nth-child(4){ --i: 3; }
.sparks span:nth-child(5){ --i: 4; }
.sparks span:nth-child(6){ --i: 5; }
.sparks span:nth-child(7){ --i: -1; }
.sparks span:nth-child(8){ --i: -2; }
.sparks span:nth-child(9){ --i: -3; }
.sparks span:nth-child(10){ --i: -4; }
.sparks span:nth-child(11){ --i: -5; }
.sparks span:nth-child(12){ --i: -6; }

@keyframes sparkFly {
  0% { opacity: 0; transform: translate(0,0) rotate(-20deg) scaleX(1); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(40px + var(--i) * 4px), calc(-20px + var(--i) * -3px)) rotate(-20deg) scaleX(0.4); }
}

/* Camera kick */
@keyframes cameraKick {
  0% { transform: none; }
  28% { transform: translate(-1px, -1px) rotate(-0.15deg) scale(1.012); }
  38% { transform: translate(1px, 2px) rotate(0.2deg) scale(1.022); }
  48% { transform: translate(-2px, 0) rotate(-0.12deg) scale(1.012); }
  60% { transform: none; }
}

/* RGB split overlay */
.rgb-split { position: absolute; inset: 0; pointer-events: none; }
.rgb-split::before, .rgb-split::after {
  content: '';
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0;
  filter: blur(1px) saturate(1.3);
  will-change: opacity, transform;
}
.rgb-split::before {
  background: radial-gradient(40% 40% at 50% 50%, rgba(0,255,255,0.0) 0%, rgba(0,255,255,0.35) 40%, rgba(0,0,0,0) 75%);
  transform: translateX(-2px);
  animation: rgbPulse 0.35s ease 0.52s 1 forwards;
}
.rgb-split::after {
  background: radial-gradient(40% 40% at 50% 50%, rgba(255,0,0,0.0) 0%, rgba(255,0,0,0.25) 42%, rgba(0,0,0,0) 78%);
  transform: translateX(2px);
  animation: rgbPulse 0.35s ease 0.52s 1 forwards;
}
@keyframes rgbPulse { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

/* Ultra mode tuning */
#loading-screen[data-ultra="true"] .sweep-lines { filter: blur(0.35px) drop-shadow(0 0 14px rgba(34,211,238,0.65)); }
#loading-screen[data-ultra="true"] .vignette { animation: vignettePulse 1.2s ease 0.1s forwards; }
#loading-screen[data-ultra="true"] .sword-sweep { filter: drop-shadow(0 0 18px rgba(34,211,238,0.7)) drop-shadow(0 0 44px rgba(56,189,248,0.5)); }
#loading-screen[data-ultra="true"] .sparks span { animation-duration: 0.52s; }

/* === Neo Loader (Sigil + Ink Wipe) === */
/* Hide legacy layers in neo-mode */
#loading-screen.neo-mode .speedlines,
#loading-screen.neo-mode .aura,
#loading-screen.neo-mode .slash,
#loading-screen.neo-mode .slash-2,
#loading-screen.neo-mode .slash-3,
#loading-screen.neo-mode .kanji,
#loading-screen.neo-mode .kanji-seam,
#loading-screen.neo-mode .sword-sweep,
#loading-screen.neo-mode .sweep-lines,
#loading-screen.neo-mode .blade-glint,
#loading-screen.neo-mode .air-slice,
#loading-screen.neo-mode .scanlines,
#loading-screen.neo-mode .chromaburst,
#loading-screen.neo-mode .shockwave,
#loading-screen.neo-mode .sparks,
#loading-screen.neo-mode .screen-tear,
#loading-screen.neo-mode .vignette,
#loading-screen.neo-mode .rgb-split,
#loading-screen.neo-mode .red-veil,
#loading-screen.neo-mode .crosshair,
#loading-screen.neo-mode .iris,
#loading-screen.neo-mode .ego-lines,
#loading-screen.neo-mode .katakana-group,
#loading-screen.neo-mode .narrative-caption,
#loading-screen.neo-mode .kunai-group,
#loading-screen.neo-mode .slash-transition { display: none !important; }

.neo-sigil { position:absolute; top:50%; left:50%; width:280px; height:280px; transform: translate(-50%,-50%); filter: drop-shadow(0 0 18px rgba(34,211,238,.7)) drop-shadow(0 0 40px rgba(56,189,248,.5)); opacity: 0; animation: sigilIn .7s cubic-bezier(.22,.61,.36,1) .12s forwards; }
.neo-sigil svg { width:100%; height:100%; display:block; }
.neo-sigil circle { stroke-width: 2.4; animation: circleDraw 1s cubic-bezier(.22,.61,.36,1) .18s forwards, sigilGlow 1.6s ease .6s infinite alternate; }
.neo-sigil .ticks { animation: sigilSpin 1.6s cubic-bezier(.22,.61,.36,1) .22s forwards; transform-origin: 50% 50%; opacity: 0; }
.neo-sigil path { stroke-width: 1.6; animation: arcDraw 1s cubic-bezier(.22,.61,.36,1) .28s forwards; }

@keyframes sigilIn { 0%{ opacity:0; transform: translate(-50%,-52%) scale(.94) } 100%{ opacity:1; transform: translate(-50%,-50%) scale(1) } }
@keyframes circleDraw { 0%{ stroke-dashoffset: 430; opacity:.8 } 100%{ stroke-dashoffset: 0; opacity:1 } }
@keyframes arcDraw { 0%{ stroke-dashoffset: 160; opacity:.7 } 100%{ stroke-dashoffset: 0; opacity:1 } }
@keyframes sigilSpin { 0%{ opacity:0; transform: rotate(-8deg) } 100%{ opacity:1; transform: rotate(0deg) } }
@keyframes sigilGlow { from{ filter: drop-shadow(0 0 12px rgba(34,211,238,.55)) } to{ filter: drop-shadow(0 0 24px rgba(56,189,248,.7)) } }

.neo-glyph { position:absolute; top:50%; left:50%; transform: translate(-50%,-50%); font-family: var(--font-sans); font-weight:900; letter-spacing:.06em; font-size: 56px; color: #e6fbff; text-shadow: 0 0 18px rgba(34,211,238,.7), 0 0 42px rgba(56,189,248,.5); opacity:0; animation: glyphIn .5s cubic-bezier(.22,.61,.36,1) .22s forwards; z-index:3; }
@media (min-width: 640px){ .neo-glyph { font-size: 76px; } }
@keyframes glyphIn { 0%{ opacity:0; transform: translate(-50%,-54%) scale(.92) } 100%{ opacity:1; transform: translate(-50%,-50%) scale(1) } }


.neo-dust { position:absolute; inset:0; pointer-events:none; z-index:2; }
.neo-dust span { position:absolute; width:3px; height:3px; background: rgba(168,231,255,.95); border-radius:50%; opacity:0; filter: blur(.2px); }
.neo-dust span:nth-child(1){ left:48%; top:46%; animation: dustOut .8s ease .3s forwards }
.neo-dust span:nth-child(2){ left:52%; top:54%; animation: dustOut .9s ease .34s forwards }
.neo-dust span:nth-child(3){ left:56%; top:50%; animation: dustOut .85s ease .36s forwards }
.neo-dust span:nth-child(4){ left:44%; top:52%; animation: dustOut .92s ease .38s forwards }
.neo-dust span:nth-child(5){ left:50%; top:44%; animation: dustOut .88s ease .4s forwards }
.neo-dust span:nth-child(6){ left:40%; top:49%; animation: dustOut .86s ease .42s forwards }
.neo-dust span:nth-child(7){ left:60%; top:51%; animation: dustOut .84s ease .44s forwards }
.neo-dust span:nth-child(8){ left:46%; top:58%; animation: dustOut .9s ease .46s forwards }
.neo-dust span:nth-child(9){ left:54%; top:42%; animation: dustOut .88s ease .48s forwards }
.neo-dust span:nth-child(10){ left:58%; top:46%; animation: dustOut .86s ease .5s forwards }
@keyframes dustOut {
  0% { opacity:0; transform: translate3d(0,0,0) }
  30% { opacity:1 }
  100% { opacity:0; transform: translate3d(var(--dx, 6vw), var(--dy, -4vh), 0) }
}

.neo-ink { position:absolute; inset:0; pointer-events:none; z-index:3; opacity:0; mix-blend-mode: screen; }
.neo-ink::before { content:""; position:absolute; left:-140vw; top:50%; width:220vw; height:40vh; transform-origin:0% 50%; transform: rotate(var(--slash-angle)) translate3d(0,0,0); background:
  radial-gradient(60% 140% at 10% 50%, rgba(255,255,255,.95) 0%, rgba(168,231,255,.6) 40%, rgba(56,189,248,.18) 70%, rgba(0,0,0,0) 100%),
  linear-gradient(90deg, rgba(255,255,255,.85), rgba(168,231,255,.5) 50%, rgba(56,189,248,.2) 75%, rgba(0,0,0,0) 100%);
  filter: blur(2px);
  border-radius: 18px/50%;
}
.neo-ink::after { content:""; position:absolute; left:-140vw; top:50%; width:230vw; height:46vh; transform-origin:0% 50%; transform: rotate(var(--slash-angle)) translate3d(0,0,0); background:
  linear-gradient(90deg, rgba(168,231,255,.22), rgba(56,189,248,.18) 50%, rgba(0,0,0,0) 100%);
  filter: blur(10px); border-radius: 22px/50%; opacity:.9;
}

.neo-flare { position:absolute; top:50%; left:50%; width:24px; height:24px; transform: translate(-50%,-50%) scale(0); border-radius:50%; background: radial-gradient(circle, rgba(255,255,255,.98) 0%, rgba(168,231,255,.6) 45%, rgba(0,0,0,0) 70%); filter: blur(2px); opacity:0; z-index:4; box-shadow: 0 0 24px rgba(255,255,255,.65), 0 0 48px rgba(56,189,248,.45); }

/* Beacon reveal sequencing (replaces final slash/ink wipe) */
#loading-screen.beacon-reveal-active.neo-mode .neo-beacon { animation: beaconBurst .85s cubic-bezier(.16,.84,.44,1) 0s forwards; }
#loading-screen.beacon-reveal-active.neo-mode .neo-flash { animation: neoFlash .2s ease-out .04s; }
#loading-screen.beacon-reveal-active.neo-mode .anime-layer { animation: camKick 120ms cubic-bezier(.2,.9,.2,1) .04s; }
#loading-screen.beacon-reveal-active.neo-mode .neo-sigil { animation: sigilOut 0.45s ease .4s forwards; }
#loading-screen.beacon-reveal-active.neo-mode .neo-glyph { animation: glyphOut 0.4s ease .35s forwards; }

@keyframes neoWipe { 0% { opacity:1 } 100% { opacity:1 } }
/* Old slash wipe disabled by not triggering its class (kept for archival) */
@keyframes neoSweep { 0% { left:-140vw } 100% { left:140vw } }
@keyframes neoBleed { 0% { filter: blur(2px) } 100% { filter: blur(4px) } }
@keyframes neoFlare { 0% { opacity:0; transform: translate(-50%,-50%) scale(0) } 30% { opacity:1; transform: translate(-50%,-50%) scale(1.25) } 100% { opacity:0; transform: translate(-50%,-50%) scale(1.75) } }
@keyframes sigilOut { 0% { opacity:1 } 100% { opacity:.0 } }
@keyframes glyphOut { 0% { opacity:1 } 100% { opacity:0 } }

/* Beacon element: radial burst + vertical beam using pseudos */
.neo-beacon { position:absolute; top:50%; left:50%; width:8px; height:8px; transform: translate(-50%,-50%); pointer-events:none; z-index:6; opacity:0; }
.neo-beacon::before { content:""; position:absolute; inset:-6px; border-radius:50%; background: radial-gradient(circle, rgba(255,255,255,.98) 0%, rgba(168,231,255,.7) 30%, rgba(56,189,248,.25) 55%, rgba(0,0,0,0) 70%); filter: blur(2px); transform: scale(.2); opacity:0; }
.neo-beacon::after { content:""; position:absolute; left:50%; top:50%; width:16vw; height:135vh; transform: translate(-50%,-50%) scaleY(0); border-radius: 50% / 10%; background:
  linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(202,242,255,.75) 28%, rgba(168,231,255,.55) 48%, rgba(56,189,248,.22) 70%, rgba(0,0,0,0) 100%);
  box-shadow: 0 0 32px rgba(255,255,255,.55), 0 0 64px rgba(56,189,248,.35);
  filter: blur(10px); mix-blend-mode: screen; opacity:.98;
}
@keyframes beaconBurst {
  0% { opacity:1 }
  10% { opacity:1 }
  65% { opacity:1 }
  100% { opacity:0 }
}
#loading-screen.beacon-reveal-active.neo-mode .neo-beacon::before { animation: beaconRing 0.85s cubic-bezier(.16,.84,.44,1) 0s forwards; }
#loading-screen.beacon-reveal-active.neo-mode .neo-beacon::after { animation: beaconBeam 0.88s cubic-bezier(.2,.9,.2,1) .06s forwards; }
@keyframes beaconRing {
  0% { transform: scale(.2); opacity: 0 }
  15% { opacity: 1 }
  80% { transform: scale(16); opacity: .45 }
  100% { transform: scale(20); opacity: 0 }
}
@keyframes beaconBeam {
  0% { transform: translate(-50%,-50%) scaleY(0); opacity: 0 }
  30% { opacity: 1 }
  70% { transform: translate(-50%,-50%) scaleY(1.1); opacity: .9 }
  100% { transform: translate(-50%,-50%) scaleY(1.25); opacity: 0 }
}

/* === Neo Loader Enhancements: Ring, Embers, Crosshair, Flash, Cam Kick === */
.neo-ring { position:absolute; top:50%; left:50%; width:320px; height:320px; transform: translate(-50%,-50%); pointer-events:none; z-index:1; opacity:.9; filter: drop-shadow(0 0 10px rgba(56,189,248,.3)); }
.neo-ring::before, .neo-ring::after { content:""; position:absolute; inset:0; border:1.5px solid rgba(168,231,255,.45); border-radius:50%; transform: scale(.82); opacity:0; }
.neo-ring { background:
  conic-gradient(from 0deg, transparent 0 18deg, rgba(168,231,255,.14) 18deg 22deg, transparent 22deg 360deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 46%, #000 47% 53%, transparent 54%);
          mask: radial-gradient(circle at 50% 50%, transparent 46%, #000 47% 53%, transparent 54%);
  animation: ringSpin 8s linear infinite;
}
@keyframes ringSpin { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }
.neo-ring::before { animation: ringPulse 1.6s ease-out .18s infinite; }
.neo-ring::after { border-color: rgba(56,189,248,.35); animation: ringPulse 1.6s ease-out .98s infinite; }
@keyframes ringPulse { 0%{ opacity:.85; transform: scale(.78) } 70%{ opacity:.18 } 100%{ opacity:0; transform: scale(1.28) } }

.neo-embers { position:absolute; inset:0; pointer-events:none; z-index:2; }
.neo-embers span { position:absolute; left:50%; top:50%; width:2px; height:8px; background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(168,231,255,0)); border-radius:999px; opacity:0; transform: translate(-50%,-50%) rotate(var(--angle, -18deg)); filter: drop-shadow(0 0 6px rgba(56,189,248,.45)); }
.neo-embers span:nth-child(1){ --dx: 12vw; --dy: -6vh; --angle:-18deg; animation: emberOut .9s ease .42s forwards }
.neo-embers span:nth-child(2){ --dx: 10vw; --dy: -4vh; --angle:-14deg; animation: emberOut 1s ease .5s forwards }
.neo-embers span:nth-child(3){ --dx: 14vw; --dy: -8vh; --angle:-20deg; animation: emberOut .95s ease .46s forwards }
.neo-embers span:nth-child(4){ --dx: 8vw; --dy: -2vh; --angle:-10deg; animation: emberOut 1.05s ease .52s forwards }
.neo-embers span:nth-child(5){ --dx: 16vw; --dy: -10vh; --angle:-22deg; animation: emberOut .98s ease .54s forwards }
.neo-embers span:nth-child(6){ --dx: 6vw; --dy: -5vh; --angle:-12deg; animation: emberOut .92s ease .58s forwards }
.neo-embers span:nth-child(7){ --dx: -10vw; --dy: 3vh; --angle:162deg; animation: emberOut .96s ease .44s forwards }
.neo-embers span:nth-child(8){ --dx: -14vw; --dy: 6vh; --angle:168deg; animation: emberOut 1.04s ease .5s forwards }
.neo-embers span:nth-child(9){ --dx: -8vw; --dy: 4vh; --angle:176deg; animation: emberOut .9s ease .56s forwards }
.neo-embers span:nth-child(10){ --dx: -12vw; --dy: 8vh; --angle:170deg; animation: emberOut .98s ease .6s forwards }
.neo-embers span:nth-child(11){ --dx: -6vw; --dy: 2vh; --angle:160deg; animation: emberOut 1.02s ease .62s forwards }
.neo-embers span:nth-child(12){ --dx: 4vw; --dy: -3vh; --angle:-6deg; animation: emberOut .94s ease .64s forwards }
@keyframes emberOut { 0% { opacity:0; transform: translate(-50%,-50%) rotate(var(--angle)); }
  20% { opacity:1 }
  100% { opacity:0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--angle)); } }

.neo-crosshair { position:absolute; top:50%; left:50%; width:220px; height:220px; transform: translate(-50%,-50%); pointer-events:none; z-index:5; opacity:0; animation: crossIn .35s ease .2s forwards, crossPulse 1.4s ease .6s infinite alternate; }
.neo-crosshair .h { position:absolute; left:0; top:50%; width:100%; height:1px; transform: translateY(-50%); background: linear-gradient(90deg, transparent, rgba(168,231,255,.9) 50%, transparent); filter: drop-shadow(0 0 8px rgba(56,189,248,.5)); }
.neo-crosshair .v { position:absolute; top:0; left:50%; width:1px; height:100%; transform: translateX(-50%); background: linear-gradient(180deg, transparent, rgba(168,231,255,.9) 50%, transparent); filter: drop-shadow(0 0 8px rgba(56,189,248,.5)); }
@keyframes crossIn { from{ opacity:0 } to{ opacity:.6 } }
@keyframes crossPulse { from{ opacity:.35 } to{ opacity:.75 } }

.neo-flash { position:absolute; inset:0; pointer-events:none; z-index:20; opacity:0; background: radial-gradient(60% 60% at 50% 50%, rgba(255,255,255,.9) 0%, rgba(255,255,255,0) 70%); mix-blend-mode: screen; }
#loading-screen.slash-reveal-active.neo-mode .neo-flash { animation: neoFlash .18s ease-out .05s; }
@keyframes neoFlash { 0%{ opacity:0 } 20%{ opacity:.95 } 100%{ opacity:0 } }

/* Tiny camera kick at impact */
#loading-screen.beacon-reveal-active.neo-mode .anime-layer { animation: camKick 120ms cubic-bezier(.2,.9,.2,1) .04s; }
@keyframes camKick { 0% { transform: translateZ(0) } 50% { transform: translate3d(2px,-1px,0) } 100% { transform: translateZ(0) } }

/* === Cinematic Red "Ego" Story Layer === */
.red-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 50%, rgba(239,68,68,0) 0%, rgba(239,68,68,0.12) 48%, rgba(153,27,27,0.22) 100%);
  mix-blend-mode: screen;
  opacity: 0;
  z-index: 10;
  animation: redVeil 0.6s ease 0.34s forwards, storyOut 0.22s ease 2.95s forwards;
}
@keyframes redVeil { 0%{opacity:0} 40%{opacity:1} 100%{opacity:.35} }

/* removed panel-bars per feedback */

.crosshair{ position:absolute; inset:0; pointer-events:none; opacity:0; z-index:10; animation: crossPing .6s ease 0.42s forwards, storyOut 0.2s ease 2.95s forwards; }
.crosshair .h,.crosshair .v{ position:absolute; background: rgba(239,68,68,0.7); box-shadow:0 0 12px rgba(239,68,68,.45); }
.crosshair .h{ top:50%; left:8%; right:8%; height:1px; transform:translateY(-50%); }
.crosshair .v{ left:50%; top:10%; bottom:10%; width:1px; transform:translateX(-50%); }
@keyframes crossPing{ 0%{opacity:0} 30%{opacity:1} 100%{opacity:.65} }

.iris{ position:absolute; inset:0; pointer-events:none; opacity:0; backdrop-filter: blur(0px) saturate(1); z-index:10;
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0, transparent 0, black 0);
  mask: radial-gradient(circle at 50% 50%, transparent 0, transparent 0, black 0);
  animation: irisOpen .6s cubic-bezier(.22,.61,.36,1) 0.38s forwards, storyOut 0.2s ease 2.95s forwards;
}
@keyframes irisOpen{
  0%{opacity:0; -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0, transparent 0, black 0);}
  30%{opacity:1}
  100%{opacity:1; -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0, transparent 52%, black 53%);}
}

.ego-lines{ position:absolute; inset:0; pointer-events:none; opacity:0; mix-blend-mode:screen; z-index:10; contain: paint;
  background:
    radial-gradient(circle at 50% 50%, rgba(239,68,68,0.3) 0, rgba(239,68,68,0.15) 40%, rgba(0,0,0,0) 60%),
    repeating-conic-gradient(from 0deg, rgba(239,68,68,0.4) 0 6deg, rgba(0,0,0,0) 6deg 12deg);
  animation: egoSpin .7s cubic-bezier(.22,.61,.36,1) 0.44s forwards, storyOut 0.2s ease 2.95s forwards;
}
@keyframes egoSpin{ 0%{opacity:0; transform:rotate(0)} 40%{opacity:1} 100%{opacity:.22; transform:rotate(8deg)} }

.katakana-group{ position:absolute; inset:0; pointer-events:none; display:flex; gap:8px; justify-content:center; align-items:center; opacity:0; z-index:10; contain: paint; }
.katakana-group span{ font-family: var(--font-sans); font-weight:900; font-size:56px; letter-spacing:.06em; color: rgba(255,255,255,.95);
  text-shadow: 0 0 18px rgba(239,68,68,.6), 0 0 36px rgba(239,68,68,.4); transform: translateY(8px) scale(.96);
}
.katakana-group{ animation: kataIn .5s cubic-bezier(.22,.61,.36,1) 0.46s forwards, storyOut 0.2s ease 2.95s forwards; }
@keyframes kataIn{ 0%{opacity:0} 60%{opacity:1} 100%{opacity:.85; transform:translateY(0) scale(1)} }
/* per-character stutter pop */
.katakana-group .k1, .katakana-group .k2, .katakana-group .k3 { opacity: 0; transform: translateY(8px) scale(.96) rotate(-1deg); }
.katakana-group .k1 { animation: kataChar .22s cubic-bezier(.22,.61,.36,1) 0.48s forwards; }
.katakana-group .k2 { animation: kataChar .22s cubic-bezier(.22,.61,.36,1) 0.55s forwards; }
.katakana-group .k3 { animation: kataChar .22s cubic-bezier(.22,.61,.36,1) 0.62s forwards; }
@keyframes kataChar { 0%{opacity:0; transform: translateY(8px) scale(.96) rotate(-2deg)} 100%{opacity:1; transform: translateY(0) scale(1) rotate(0deg)} }

.narrative-caption{ position:absolute; bottom:14%; width:100%; text-align:center; opacity:0; z-index:10; contain: paint; animation: captionReveal .55s cubic-bezier(.22,.61,.36,1) 0.5s forwards, storyOut 0.2s ease 2.95s forwards; }
.narrative-caption span{ display:inline-block; padding:.35rem .7rem; background: rgba(10,14,26,.55); border:1px solid rgba(239,68,68,.35);
  border-radius:12px; color:#fff; font-weight:700; letter-spacing:.04em; text-shadow:0 0 10px rgba(239,68,68,.4);
}
.narrative-caption{ animation: captionReveal .45s cubic-bezier(.22,.61,.36,1) 0.5s forwards; }
@keyframes captionReveal{ 0%{opacity:0; transform:translateY(6px)} 100%{opacity:1; transform:translateY(0)} }
@keyframes storyOut { 0% { opacity: var(--story-out-from, 1); } 100% { opacity: 0; } }

/* Kunai fly-bys */
.kunai-group { position:absolute; inset:0; pointer-events:none; z-index: 12; }
.kunai {
  position:absolute; width: 42px; height: 10px; opacity: 0; will-change: transform, opacity, filter;
  filter: drop-shadow(0 0 10px rgba(34,211,238,0.45)) drop-shadow(0 0 20px rgba(56,189,248,0.35));
}
.kunai::before, .kunai::after { content:""; position:absolute; inset:0; border-radius: 2px; }
/* Blade body */
.kunai::before {
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(168,231,255,0.75) 60%, rgba(56,189,248,0.35));
}
/* Tip triangle */
.kunai::after {
  width: 0; height: 0; inset: auto; left: auto; right: -10px; top: 50%; transform: translateY(-50%);
  border-left: 10px solid rgba(255,255,255,0.95);
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
/* Motion ghost trail */
.kunai .ghost { display:none; }
.kunai::marker{ content:'' }

/* Paths */
.kunai.k1 { top: 32%; left: -12%; transform: rotate(10deg) translate3d(0,0,0); animation: kunaiFlyRight 0.68s cubic-bezier(.22,.61,.36,1) 0.26s forwards; }
.kunai.k2 { top: 62%; right: -14%; transform: rotate(195deg) translate3d(0,0,0); animation: kunaiFlyLeft 0.72s cubic-bezier(.22,.61,.36,1) 0.42s forwards; }
.kunai.k3 { top: -10%; left: 18%; transform: rotate(115deg) translate3d(0,0,0); animation: kunaiDrop 0.64s cubic-bezier(.22,.61,.36,1) 0.5s forwards; }
.kunai.k4 { bottom: -12%; left: 72%; transform: rotate(-65deg) translate3d(0,0,0); animation: kunaiRise 0.66s cubic-bezier(.22,.61,.36,1) 0.58s forwards; }

@keyframes kunaiFlyRight {
  0% { opacity:0; transform: rotate(10deg) translate3d(0,0,0); filter: blur(0.2px) brightness(1); }
  10% { opacity:1 }
  100% { opacity:0; transform: rotate(10deg) translate3d(125vw,2vh,0); filter: blur(0.6px) brightness(1.1); }
}
@keyframes kunaiFlyLeft {
  0% { opacity:0; transform: rotate(195deg) translate3d(0,0,0); filter: blur(0.2px) brightness(1); }
  10% { opacity:1 }
  100% { opacity:0; transform: rotate(195deg) translate3d(-125vw,-1vh,0); filter: blur(0.6px) brightness(1.1); }
}
@keyframes kunaiDrop {
  0% { opacity:0; transform: rotate(115deg) translate3d(0,0,0); filter: blur(0.2px) }
  10% { opacity:1 }
  100% { opacity:0; transform: rotate(115deg) translate3d(6vw,130vh,0); filter: blur(0.8px) }
}
@keyframes kunaiRise {
  0% { opacity:0; transform: rotate(-65deg) translate3d(0,0,0); filter: blur(0.2px) }
  10% { opacity:1 }
  100% { opacity:0; transform: rotate(-65deg) translate3d(-4vw,-130vh,0); filter: blur(0.8px) }
}

/* Slash transition (reveal wipe) */
.slash-transition { position:absolute; inset:0; pointer-events:none; z-index: 20; opacity: 0; }
.slash-transition .slash-line,
.slash-transition .slash-glow {
  position:absolute; left:-120vw; top:50%; transform-origin: 0% 50%;
  transform: rotate(var(--slash-angle)) translate3d(0,0,0);
  border-radius: 12px; filter: blur(0.2px);
}
.slash-transition .slash-line {
  width: 160vw; height: 7px;
  background: linear-gradient(90deg, rgba(255,255,255,0.98), rgba(168,231,255,0.9) 45%, rgba(56,189,248,0.6) 75%, rgba(0,0,0,0) 100%);
  box-shadow: 0 0 20px rgba(34,211,238,0.65), 0 0 48px rgba(56,189,248,0.45);
}
.slash-transition .slash-glow {
  width: 180vw; height: 22px; top: calc(50% + 2px);
  background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(168,231,255,0.4) 35%, rgba(56,189,248,0.2) 65%, rgba(0,0,0,0) 100%);
  filter: blur(8px); opacity: .95;
}

#loading-screen.slash-reveal-active .slash-transition { animation: slashRevealShow 0.7s ease forwards; }
#loading-screen.slash-reveal-active .slash-transition .slash-line { animation: slashSweep 0.7s cubic-bezier(.16,.84,.44,1) 0s forwards; }
#loading-screen.slash-reveal-active .slash-transition .slash-glow { animation: slashSweep 0.7s cubic-bezier(.16,.84,.44,1) 0s forwards, slashGlowFade 0.7s ease 0s forwards; }

/* Fade loader content during the slash */
#loading-screen.slash-reveal-active .anime-layer { animation: loaderCut 0.6s ease 0.1s forwards; }

@keyframes slashRevealShow { 0%{ opacity:0 } 20%{ opacity:1 } 100%{ opacity:1 } }
@keyframes slashSweep {
  0% { transform: rotate(var(--slash-angle)) translate3d(0,0,0); left: -120vw; }
  100% { transform: rotate(var(--slash-angle)) translate3d(0,0,0); left: 120vw; }
}
@keyframes slashGlowFade { 0%{ opacity:.9 } 100%{ opacity:.1 } }
@keyframes loaderCut { 0%{ opacity:1 } 100%{ opacity:0 } }

/* Removed glass break effect to favor clean, high-fidelity slash */
/* Premium Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--surface);
  z-index: var(--z-fixed);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 14, 26, 0.95);
  box-shadow: var(--shadow-lg);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-logo {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-text {
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 3s ease-in-out infinite;
}

.nav-links {
  display: flex;
  gap: var(--space-2xl);
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--font-size-sm);
  letter-spacing: 0.01em;
  position: relative;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: var(--transition-normal);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: var(--transition-normal);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--surface-hover);
  background: var(--surface);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}
.icon-btn:hover { background: var(--surface-hover); transform: translateY(-2px); }
.icon-btn:active { transform: translateY(-1px); }

/* Active nav link */
.nav-link.active { color: var(--text-primary); }
.nav-link.active::after { width: 100%; }

/* Mobile nav behavior */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: right 0.3s ease;
    z-index: var(--z-fixed);
  }
  .nav-links.nav-open { right: 0; }
  .nav-toggle { display: flex; }
}

/* Premium Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(34,211,238,0.08), transparent 60%),
              radial-gradient(800px 400px at 90% 110%, rgba(56,189,248,0.06), transparent 60%),
              var(--primary-bg);
}

.hero-blob {
  position: absolute;
  width: 700px;
  height: 700px;
  left: -150px;
  top: -120px;
  background: radial-gradient(closest-side, rgba(34,211,238,0.32), rgba(56,189,248,0.22), transparent 70%);
  filter: blur(40px) saturate(130%);
  animation: blobFloat 12s ease-in-out infinite;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0,0) scale(1); opacity: 0.85; }
  50% { transform: translate(40px, 30px) scale(1.08); opacity: 1; }
}

.particles-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particles-bg::before,
.particles-bg::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  opacity: 0.08;
  animation: float 8s ease-in-out infinite;
  filter: blur(2px);
}

.particles-bg::before {
  background: var(--accent-primary);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.particles-bg::after {
  background: var(--accent-secondary);
  bottom: 20%;
  right: 10%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) scale(1);
    opacity: 0.08;
  }
  50% {
    transform: translateY(-30px) scale(1.1);
    opacity: 0.12;
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 10px 0 0;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 120px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 80px;
  padding-left: 0;
  margin-left: -50px;
  padding-right: 20px;
}

.hero-text {
  flex: 1;
  max-width: 600px;
  margin-right: 0;
  padding-left: 0;
  margin-left: 0;
}

.hero-visual {
  flex: 0 0 400px;
  width: 400px;
  height: 250px;
  margin-left: auto;
  margin-right: -20px;
}

.hero-greeting {
  font-size: var(--font-size-lg);
  color: var(--accent-primary);
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: slideInLeft 0.8s ease 0.2s forwards;
}

.hero-name {
  font-size: clamp(var(--font-size-5xl), 8vw, var(--font-size-7xl));
  font-weight: 800;
  margin-bottom: var(--space-md);
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  line-height: 0.9;
  letter-spacing: -0.04em;
  opacity: 0;
  animation: fadeInUp 1s ease 0.4s forwards, gradientShift 4s ease-in-out infinite 1s;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-tagline {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-lg);
  min-height: 3rem;
}

.typewriter {
  border-right: 2px solid var(--accent-primary);
  animation: blink 1s infinite;
  padding-right: 2px;
}

@keyframes blink {
  0%, 50% { border-color: var(--accent-primary); }
  51%, 100% { border-color: transparent; }
}

/* Enhanced Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px var(--accent-primary);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-primary), 0 0 30px var(--accent-primary);
  }
}

.hero-description {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  padding: var(--space-lg) 0;
}

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

.stat-number {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.3s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Page Transition Animations */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Premium Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-2xl);
  border-radius: var(--radius-xl);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-base);
  letter-spacing: 0.01em;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  min-width: 180px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 
    var(--shadow-2xl),
    0 0 40px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: var(--surface-active);
  color: var(--text-primary);
  border: 2px solid var(--surface-hover);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
}

.hero-visual {
  position: relative;
  height: 250px;
}

.code-editor-mini {
  background: var(--code-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--code-border);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  height: 100%;
  width: 100%;
}

.code-editor {
  background: var(--code-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--code-border);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  height: 100%;
  max-width: 900px; /* Increased width significantly */
  width: 100%; /* Full width within container */
  margin: 0 auto;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #161b22;
  padding: var(--space-sm);
  border-bottom: 1px solid var(--code-border);
}

.editor-tabs {
  display: flex;
  gap: var(--space-xs);
}

.tab {
  padding: var(--space-xs) var(--space-md);
  background: #21262d;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-normal);
}

.tab.active {
  background: var(--code-bg);
  color: var(--text-primary);
}

.editor-controls {
  display: flex;
  gap: var(--space-xs);
}

.control-btn {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: #ff5f56;
}

.control-btn:nth-child(2) {
  background: #ffbd2e;
}

.control-btn:nth-child(3) {
  background: #27ca3f;
}

.editor-content {
  display: flex;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  height: calc(100% - 60px);
}

.line-numbers {
  background: #161b22;
  padding: var(--space-md) var(--space-sm);
  color: #6e7681;
  text-align: right;
  min-width: 40px;
  user-select: none;
}

.line-numbers span {
  display: block;
}

.code-lines {
  flex: 1;
  padding: var(--space-md);
  overflow: hidden;
}

.code-line {
  margin-bottom: 2px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.3s ease;
}

.keyword {
  color: #ff7b72;
}

.function {
  color: #d2a8ff;
}

.variable {
  color: #79c0ff;
}

.string {
  color: #a5d6ff;
}

.comment {
  color: #8b949e;
  font-style: italic;
}

.scroll-indicator {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.scroll-indicator:hover {
  opacity: 1;
}

.mouse-icon {
  position: relative;
  width: 24px;
  height: 36px;
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.mouse-wheel {
  width: 3px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: 1.5px;
  animation: mouseScroll 2s infinite;
}

@keyframes mouseScroll {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(8px);
    opacity: 0.5;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.scroll-indicator span {
  font-size: 0.8rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  z-index: var(--z-fixed);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Custom cursor removed by request */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Shared Section Styles */
.section {
  padding: var(--space-3xl) 0;
  position: relative;
  min-height: auto;
  overflow: visible;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-line {
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  margin: 0 auto;
  border-radius: var(--radius-full);
}

/* About Section */
.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.about-text {
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--text-secondary);
  opacity: 1;
  transform: translateY(0);
}

.about-intro {
  font-size: var(--font-size-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.about-text p {
  margin-bottom: var(--space-lg);
}

.about-highlights {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.highlight-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.highlight-item i {
  color: var(--accent-primary);
  font-size: var(--font-size-lg);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.stat-card {
  background: var(--accent-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  border: 1px solid var(--surface-hover);
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.stat-card h4 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: var(--space-xs);
}

.stat-card span {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  border: 1px solid var(--surface-hover);
}

.profile-image {
  margin-bottom: var(--space-lg);
}

.profile-placeholder {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: white;
  margin: 0 auto;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.tech-item {
  background: var(--accent-bg);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--accent-primary);
  font-weight: 500;
}

/* Experience Timeline Section */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.timeline::before {
  content: '';
  position: absolute;
  width: 4px;
  background: var(--gradient-secondary);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(100, 179, 244, 0.3);
}

.timeline-item {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--surface-hover);
  margin-bottom: var(--space-2xl);
  transition: all var(--transition-normal);
  opacity: 1;
  transform: translateY(0);
  width: calc(50% - var(--space-xl));
}

.timeline-item:nth-child(odd) {
  left: 0;
  animation: slideInLeft 0.8s ease forwards;
}

.timeline-item:nth-child(even) {
  left: calc(50% + var(--space-xl));
  animation: slideInRight 0.8s ease forwards;
}

.timeline-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.timeline-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--gradient-secondary);
  border: 4px solid var(--primary-bg);
  border-radius: 50%;
  top: var(--space-xl);
  box-shadow: 0 0 15px rgba(100, 179, 244, 0.5);
  z-index: 10;
}

.timeline-item:nth-child(odd) .timeline-marker {
  right: -62px;
}

.timeline-item:nth-child(even) .timeline-marker {
  left: -62px;
}

.timeline-content {
  position: relative;
}

.timeline-date {
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  display: inline-block;
  background: var(--accent-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
}

.timeline-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.timeline-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.experience-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-md);
}

.experience-link {
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: var(--transition-normal);
}

.experience-link:hover {
  color: var(--accent-primary);
}

.experience-description {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tech-tag {
  background: var(--accent-bg);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--accent-primary);
  font-weight: 500;
}

.resume-link-container {
  text-align: center;
  margin-top: 3rem;
}

.resume-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-normal);
}

.resume-link:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Premium Projects Section - 3 Cards in Row */
.projects-showcase {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--space-xl);
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.project-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--surface-hover);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
  width: 350px;
  height: 500px;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
}

.project-card.featured {
  transform: scale(1.1); /* Middle card zoomed in */
  z-index: 10;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-active) 100%);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow-lg);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

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

.project-card:hover {
  transform: scale(0.95);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-xl);
}

.project-card.featured:hover {
  transform: scale(1.15); /* Featured card hover */
}

.project-header {
  padding: var(--space-xl);
  border-bottom: 1px solid var(--surface-hover);
  flex-shrink: 0;
}

.project-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  color: white;
  margin-bottom: var(--space-lg);
}

.project-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: var(--font-size-sm);
}

.project-content {
  padding: var(--space-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.tech-badge {
  background: var(--tertiary-bg);
  color: var(--accent-primary);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border: 1px solid var(--surface-hover);
}

.project-links {
  display: flex;
  gap: var(--space-md);
  margin-top: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all var(--transition-normal);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-hover);
}

.project-link:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: var(--surface-active);
  transform: translateY(-2px);
}

/* More Projects Section */
.more-projects {
  margin-top: var(--space-5xl);
  text-align: center;
}

.more-projects h3 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2xl);
}

.more-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto var(--space-2xl);
}

.mini-project {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--surface-hover);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.mini-project:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

.mini-project i {
  font-size: var(--font-size-xl);
  color: var(--accent-primary);
  min-width: 24px;
}

.mini-project span {
  font-weight: 500;
  font-size: var(--font-size-base);
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-2xl);
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.view-all-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.project-icon i {
  font-size: var(--font-size-2xl);
  color: white;
}

.project-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.project-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.tech-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.project-links {
  display: flex;
  gap: var(--space-sm);
}

.project-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: var(--transition-normal);
  backdrop-filter: blur(10px);
}

.project-link:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* More Projects */
.more-projects {
  text-align: center;
}

.more-projects h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-xl);
  color: var(--text-primary);
}

.more-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto var(--space-xl);
}

.mini-project {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition-normal);
  border: 1px solid var(--surface-hover);
}

.mini-project:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  transform: translateY(-5px);
  border-color: var(--accent-primary);
}

.mini-project i {
  font-size: var(--font-size-2xl);
  color: var(--accent-primary);
}

.mini-project span {
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-align: center;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--gradient-secondary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  transition: var(--transition-normal);
}

.view-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Skills Section */
.skills-content {
  max-width: 900px;
  margin: 0 auto;
}

.skills-category {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  border: 1px solid var(--surface-hover);
  transition: var(--transition-normal);
}

.skills-category:hover {
  border-color: var(--accent-primary);
  transform: translateY(-5px);
}

.skills-category-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  text-align: center;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.skill-item {
  margin-bottom: var(--space-lg);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.skill-name {
  font-weight: 600;
  color: var(--text-primary);
}

.skill-level {
  font-size: var(--font-size-sm);
  color: var(--accent-primary);
}

.skill-bar {
  height: 8px;
  background: var(--accent-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  width: 0%;
  animation: skillFill 2s ease-out forwards;
  animation-delay: 0.5s;
}

@keyframes skillFill {
  to { width: var(--progress); }
}

.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-lg);
}

.tech-stack-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--accent-bg);
  border-radius: var(--radius-lg);
  transition: var(--transition-normal);
}

.tech-stack-item:hover {
  background: var(--surface-hover);
  transform: translateY(-5px);
}

.tech-stack-item i {
  font-size: var(--font-size-2xl);
  color: var(--accent-primary);
}

.tech-stack-item span {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.language-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: var(--accent-bg);
  border-radius: var(--radius-lg);
}

.language-name {
  font-weight: 600;
  color: var(--text-primary);
}

.language-level {
  font-size: var(--font-size-sm);
  color: var(--accent-primary);
}

/* Contact Section */
.contact-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-text {
  margin-bottom: var(--space-3xl);
}

.contact-text h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.contact-text p {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

.contact-info {
  margin-bottom: var(--space-3xl);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--surface-hover);
  transition: var(--transition-normal);
}

.contact-item:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.contact-item i {
  font-size: var(--font-size-xl);
  color: var(--accent-primary);
  width: 24px;
  text-align: center;
}

.contact-details {
  flex: 1;
  text-align: left;
}

.contact-label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.contact-value {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-normal);
}

.contact-value:hover {
  color: var(--accent-primary);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition-normal);
  border: 1px solid var(--surface-hover);
}

.social-link:hover {
  background: var(--accent-primary);
  color: var(--primary-bg);
  transform: translateY(-2px);
}

.social-link i {
  font-size: var(--font-size-lg);
}

/* Certifications Section */
.certifications-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-xl);
  max-width: 1000px;
  margin: 0 auto;
}

.certification-item {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--surface-hover);
  transition: var(--transition-normal);
  align-items: flex-start;
}

.certification-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.certification-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.certification-icon i {
  font-size: var(--font-size-2xl);
  color: white;
}

.certification-details {
  flex: 1;
}

.certification-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.certification-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.certification-date {
  font-size: var(--font-size-sm);
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.certification-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-normal);
}

.certification-link:hover {
  color: var(--text-primary);
  transform: translateX(5px);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--secondary-bg) 0%, rgba(24, 25, 26, 0.95) 100%);
  border-top: 2px solid var(--accent-primary);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(96, 165, 250, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.footer-logo .logo-text {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-brand p {
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 220px;
  font-size: var(--font-size-sm);
  font-style: italic;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-column h4 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: var(--space-xs);
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 1px;
}

.footer-column a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-normal);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  padding: var(--space-xs) 0;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.footer-column a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.1), rgba(168, 85, 247, 0.1));
  transition: width 0.3s ease;
  z-index: -1;
}

.footer-column a:hover {
  color: var(--accent-primary);
  transform: translateX(8px);
  padding-left: var(--space-sm);
}

.footer-column a:hover::before {
  width: 100%;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  margin-bottom: var(--space-xs);
  line-height: 1.4;
  opacity: 0.8;
}

.footer-bottom p:first-child {
  font-weight: 500;
}

.footer-bottom p:last-child {
  margin-bottom: 0;
  font-style: italic;
  background: linear-gradient(45deg, var(--text-muted), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animation Classes */
.fade-in {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 1s ease forwards;
}

.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.4s; }
.fade-in:nth-child(4) { animation-delay: 0.6s; }

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

.reveal-text {
  opacity: 1;
  transform: translateY(0);
  transition: var(--transition-slow);
}

.reveal-text.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-fade {
  opacity: 1;
  transform: translateY(0);
  transition: var(--transition-slow);
}

.reveal-fade.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: var(--transition-slow);
}

.reveal-card.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }
  
  .about-content {
    max-width: 100%;
    padding: 0 var(--space-md);
  }
  
  .projects-showcase {
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
  }
  
  .project-book:nth-child(1),
  .project-book:nth-child(3) {
    transform: scale(0.9) rotateY(0deg);
  }
  
  .project-book.featured {
    transform: scale(1) rotateY(0deg);
  }
  
  .certifications-content {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
  
  .footer-links {
    gap: var(--space-xl);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero {
    padding-top: 90px;
  }
  
  .hero-container {
    padding: 0 var(--space-md);
  }
  
  .hero-content {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
    padding-bottom: var(--space-2xl);
    margin-left: 0;
    padding-right: 0;
    justify-content: center;
  }
  
  .hero-text {
    margin-right: 0;
    margin-left: 0;
    max-width: 100%;
  }
  
  .hero-visual {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 350px;
    height: 220px;
  }
  
  .hero-stats {
    gap: var(--space-lg);
  }
  
  .code-editor {
    max-width: 100%;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  /* Projects Mobile Styles */
  .projects-showcase {
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
  }
  
  .project-card {
    width: 100%;
    max-width: 400px;
    transform: scale(1) !important;
  }
  
  .project-card.featured {
    transform: scale(1) !important;
    order: -1; /* Move featured to top on mobile */
  }
  
  /* Timeline Mobile Styles */
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    width: calc(100% - 60px);
    left: 60px !important;
  }
  
  .timeline-item:nth-child(odd) .timeline-marker,
  .timeline-item:nth-child(even) .timeline-marker {
    left: -50px;
    right: auto;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .projects-showcase {
    flex-direction: column;
    gap: var(--space-lg);
  }
  
  .project-book {
    transform: scale(1) rotateY(0deg) !important;
  }
  
  .book-cover {
    width: 100%;
    max-width: 300px;
  }
  
  .more-projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .certification-item {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-details {
    text-align: center;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 var(--space-md);
  }
  
  .section {
    padding: var(--space-2xl) 0;
  }
  
  .hero-name {
    font-size: var(--font-size-4xl);
  }
  
  .hero-tagline {
    font-size: var(--font-size-xl);
  }
  
  .hero-stats {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .section-title {
    font-size: var(--font-size-3xl);
  }
  
  .more-projects-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-stack-grid {
    grid-template-columns: 1fr;
  }
  
  .social-links {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-links {
    flex-direction: column;
    gap: var(--space-lg);
  }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --accent-primary: #00ff00;
    --surface: rgba(255, 255, 255, 0.2);
  }
}

/* Dark mode (default) */
@media (prefers-color-scheme: dark) {
  /* Already defined as default */
}