

:root {
  /* Modern Dark Color Palette */
  --color-bg: #0a0a0a;
  --color-bg-alt: #111111;
  --color-bg-section: #0f0f0f;
  --color-bg-card: #1a1a1a;
  --color-bg-elevated: #252525;

  --color-text: #ffffff;
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #64748b;
  --color-text-subtle: #475569;

  /* Accent Colors */
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-accent-light: rgba(59, 130, 246, 0.1);
  --color-accent-glow: rgba(59, 130, 246, 0.3);

  /* Secondary Colors */
  --color-purple: #8b5cf6;
  --color-cyan: #06b6d4;
  --color-emerald: #10b981;
  --color-orange: #f59e0b;

  /* Borders & Dividers */
  --color-border: #2a2a2a;
  --color-border-light: #333333;
  --color-border-hover: #404040;

  /* Shadows & Glows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4),
    0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5),
    0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
    0 10px 10px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
  --shadow-glow-hover: 0 0 30px rgba(59, 130, 246, 0.25);

  /* Enhanced Typography */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    system-ui, sans-serif;
  --font-secondary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Monaco", "Inconsolata", "Fira Code",
    monospace;
  --font-display: "Inter", system-ui, sans-serif;

  /* Fluid Typography Scale */
  --text-xs: clamp(0.75rem, 0.9vw, 0.875rem);
  --text-sm: clamp(0.875rem, 1vw, 1rem);
  --text-base: clamp(1rem, 1.2vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.4vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.6vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 2.2vw, 2rem);
  --text-3xl: clamp(1.875rem, 2.8vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 3.5vw, 3.5rem);
  --text-5xl: clamp(3rem, 5vw, 5rem);
  --text-6xl: clamp(3.75rem, 6vw, 6rem);

  /* Enhanced Spacing Scale */
  --space-xs: clamp(0.25rem, 1vw, 0.5rem);
  --space-sm: clamp(0.5rem, 1.5vw, 1rem);
  --space-md: clamp(1rem, 2vw, 1.5rem);
  --space-lg: clamp(1.5rem, 2.5vw, 2rem);
  --space-xl: clamp(2rem, 3.5vw, 3rem);
  --space-2xl: clamp(3rem, 5vw, 4rem);
  --space-3xl: clamp(4rem, 7vw, 6rem);

  /* Layout */
  --container-max: 1200px;
  --container-padding: clamp(1rem, 5vw, 2rem);
  --section-padding: clamp(4rem, 10vw, 8rem);

  /* Enhanced Borders & Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;

  /* Professional Animations */
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.25s;
  --duration-slow: 0.35s;
  --duration-slower: 0.5s;

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--color-purple) 100%
  );
  --gradient-secondary: linear-gradient(
    135deg,
    var(--color-cyan) 0%,
    var(--color-accent) 100%
  );
  --gradient-surface: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  --gradient-text: linear-gradient(
    135deg,
    var(--color-text-primary) 0%,
    var(--color-text-secondary) 100%
  );
}

/* =============================================
   BASE STYLES & RESET
   ============================================= */

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

::selection {
  background: var(--color-accent-light);
  color: var(--color-text-primary);
}

::-webkit-scrollbar {
  width: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

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

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

body.loading {
  overflow: hidden;
}

/* Enhanced Container System */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--container-padding);
}

.highlight {
  color: var(--color-accent);
  font-weight: 600;
  background: var(--color-accent-light);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
}

/* =============================================
   MODERN LOADING SCREEN
   ============================================= */

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity var(--duration-slow) var(--ease-out-cubic),
    visibility var(--duration-slow) var(--ease-out-cubic);
}

.loading-screen.loaded {
  opacity: 0;
  visibility: hidden;
}

.loading-container {
  text-align: center;
  transform: translateY(-20px);
  animation: fadeInUp 1s var(--ease-out-cubic);
}

.loading-logo .logo-mark {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-md);
  display: block;
}

.loading-text {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.loading-progress {
  width: 200px;
  height: 2px;
  background: var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.loading-bar {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  border-radius: var(--radius-sm);
  animation: loadingProgress 2s var(--ease-out-cubic) forwards;
}

@keyframes loadingProgress {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

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

/* =============================================
   ENHANCED TYPOGRAPHY
   ============================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
  letter-spacing: -0.025em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: 600;
  letter-spacing: -0.03em;
}

h3 {
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.025em;
}

h4 {
  font-size: var(--text-2xl);
  font-weight: 500;
}

h5 {
  font-size: var(--text-xl);
  font-weight: 500;
}

h6 {
  font-size: var(--text-lg);
  font-weight: 500;
}

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.text-large {
  font-size: var(--text-xl);
  line-height: 1.6;
}

.text-small {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

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

.text-accent {
  color: var(--color-accent);
}

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

/* Enhanced Links */
a {
  color: inherit;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out-cubic);
}

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

.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--duration-normal) var(--ease-out-cubic);
}

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

.loading-progress {
  width: 200px;
  height: 2px;
  background: var(--color-border);
  margin: var(--space-lg) auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--color-accent);
  transform: translateX(-100%);
  transition: transform 2s var(--ease-out-cubic);
}

.loading-counter {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Custom Cursor */
.cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  position: absolute;
  top: -4px;
  left: -4px;
  transition: transform var(--duration-fast) var(--ease-out-cubic);
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  position: absolute;
  top: -16px;
  left: -16px;
  transition: transform var(--duration-normal) var(--ease-out-cubic);
}

.cursor.cursor-hover .cursor-dot {
  transform: scale(2);
}

.cursor.cursor-hover .cursor-ring {
  transform: scale(1.5);
}

/* NAVIGATION COMPLETELY DISABLED FOR PROFESSIONAL CLEAN LOOK */
.navbar,
.nav-menu,
.nav-toggle,
.nav-container,
header {
  display: none !important;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  max-width: 100vw;
  background: rgba(16, 16, 16, 0.7);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10000;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-sizing: border-box;
  overflow-x: hidden;
  transform: translateY(0);
  will-change: transform, opacity, background;
}

/* Enhanced scroll states */
.navbar.scrolled {
  background: rgba(16, 16, 16, 0.95);
  backdrop-filter: blur(25px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(255, 0, 110, 0.1);
  border-bottom: 1px solid rgba(255, 0, 110, 0.2);
  transform: translateY(0) scale(0.98);
}

/* Smart hide/show navbar on scroll */
.navbar.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.navbar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* At the very top - always visible */
.navbar:not(.scrolled) {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Scroll progress indicator */
.navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    #ff006e,
    #8338ec,
    #3a86ff,
    #06ffa5,
    #ffbe0b
  );
  background-size: 300% 100%;
  animation: progressFlow 3s ease-in-out infinite;
  transition: width 0.1s ease-out;
  width: var(--scroll-progress, 0%);
  z-index: 1;
}

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

/* Hover effect to always show navbar */
.navbar:hover {
  transform: translateY(0) !important;
  opacity: 1 !important;
  background: rgba(16, 16, 16, 0.98) !important;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-text);
  transition: color var(--duration-normal) var(--ease-out-cubic);
}

.logo-mark {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.logo-text {
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: rgb(255, 255, 255);
}

/* Desktop Navigation - Clean Professional Style */
@media (min-width: 769px) {
  .nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    position: relative;
    box-shadow: var(--color-shadow);
    transition: all var(--duration-normal) var(--ease-out-cubic);
  }

  .nav-menu:hover {
    box-shadow: var(--color-shadow-hover);
    transform: translateY(-2px);
  }

  .nav-item {
    list-style: none;
    margin: 0;
  }

  .nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out-cubic);
    position: relative;
  }

  .nav-link:hover {
    color: var(--color-accent);
    background: var(--color-border-light);
  }

  .nav-link.active {
    color: var(--color-accent);
    background: var(--color-border-light);
  }

  .nav-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    opacity: 0.7;
  }

  .nav-text {
    font-weight: 500;
  }

  /* Hide hamburger on desktop */
  .nav-toggle {
    display: none;
  }
}

/* Base nav-link styles - Clean and Professional */
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: var(--color-text-light);
  transition: all var(--duration-fast) var(--ease-out-cubic);
  font-weight: 500;
  position: relative;
}

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

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

/* Navigation numbers and text styling */
.nav-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  opacity: 0.7;
}

.nav-text {
  font-weight: 500;
}

/* Navigation Toggle (Hamburger) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 12px 8px;
  z-index: 1001;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

@keyframes numberGlow {
  0%,
  100% {
    transform: scale(1.2) rotateY(0deg);
  }
  50% {
    transform: scale(1.4) rotateY(180deg);
  }
}

.nav-link:hover .nav-text,
.nav-link.active .nav-text {
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(
    45deg,
    #ff006e,
    #8338ec,
    #3a86ff,
    #06ffa5,
    #ffbe0b
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbowText 1.5s ease-in-out infinite;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 120%;
  opacity: 1;
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.8), 0 0 40px rgba(131, 56, 236, 0.6);
}

/* Active state with special morphing effects */
.nav-link.active {
  background: linear-gradient(
    135deg,
    rgba(255, 0, 110, 0.15),
    rgba(131, 56, 236, 0.15),
    rgba(58, 134, 255, 0.15)
  );
  border: 1px solid rgba(255, 0, 110, 0.4);
  position: relative;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    #ff006e,
    #8338ec,
    #3a86ff,
    #06ffa5,
    #ffbe0b,
    #ff006e
  );
  background-size: 400% 400%;
  border-radius: inherit;
  z-index: -1;
  animation: activeBorderFlow 3s ease-in-out infinite;
}

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

/* Floating animation for all nav items */
@media (min-width: 769px) {
  .nav-link {
    animation: navFloat 3s ease-in-out infinite;
  }

  .nav-link:nth-child(1) {
    animation-delay: 0s;
  }
  .nav-link:nth-child(2) {
    animation-delay: 0.3s;
  }
  .nav-link:nth-child(3) {
    animation-delay: 0.6s;
  }
  .nav-link:nth-child(4) {
    animation-delay: 0.9s;
  }
}

@keyframes navFloat {
  0%,
  100% {
    transform: translateY(0px) rotateZ(0deg);
  }
  33% {
    transform: translateY(-2px) rotateZ(1deg);
  }
  66% {
    transform: translateY(1px) rotateZ(-1deg);
  }
}

/* Interactive particle effect on hover */
.nav-link:hover .nav-text::after {
  content: "✦";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: #06ffa5;
  animation: sparkleRotate 1s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(6, 255, 165, 0.8);
}

@keyframes sparkleRotate {
  0%,
  100% {
    opacity: 0;
    transform: translateY(-50%) scale(0.5) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.2) rotate(180deg);
  }
}

/* Magnetic effect between nav items */
.nav-link:hover ~ .nav-link {
  transform: translateX(8px) scale(0.95);
  opacity: 0.7;
  filter: blur(1px);
}

.nav-link:hover + .nav-link {
  transform: translateX(12px) scale(0.9);
}

/* Focus states for accessibility */
.nav-link:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 0, 110, 0.6),
    0 8px 25px rgba(131, 56, 236, 0.4);
  background: rgba(255, 0, 110, 0.1);
}

/* Animated underline */
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #7c3aed, #06b6d4);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.nav-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.6;
  margin-bottom: 2px;
  transition: all 0.3s ease;
  color: var(--color-accent);
  font-weight: 600;
}

.nav-text {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  position: relative;
}

/* Enhanced hover and active states */
.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  transform: translateY(-2px) scale(1.05);
}

.nav-link:hover .nav-number,
.nav-link.active .nav-number {
  opacity: 1;
  transform: scale(1.1);
  color: #ffffff;
  text-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

.nav-link:hover .nav-text,
.nav-link.active .nav-text {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 110%;
  opacity: 1;
}

/* Active state special effects */
.nav-link.active {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.15),
    rgba(124, 58, 237, 0.15)
  );
  border: 1px solid rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-link.active::after {
  background: linear-gradient(90deg, #06b6d4, var(--color-accent), #7c3aed);
  height: 4px;
  animation: activeGlow 2s ease-in-out infinite alternate;
}

@keyframes activeGlow {
  0% {
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  }
  100% {
    box-shadow: 0 2px 15px rgba(37, 99, 235, 0.8);
  }
}

/* Cool floating animation on page load */
@media (min-width: 769px) {
  .nav-link {
    animation: navItemFloat 2s ease-in-out infinite;
  }

  .nav-link:nth-child(1) {
    animation-delay: 0s;
  }
  .nav-link:nth-child(2) {
    animation-delay: 0.2s;
  }
  .nav-link:nth-child(3) {
    animation-delay: 0.4s;
  }
  .nav-link:nth-child(4) {
    animation-delay: 0.6s;
  }
}

@keyframes navItemFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-1px);
  }
}

/* Enhanced focus states for accessibility */
.nav-link:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5),
    0 4px 15px rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.1);
}

/* Magnetic effect on hover */
.nav-link:hover {
  cursor: pointer;
}

.nav-link:hover ~ .nav-link {
  transform: translateX(4px);
  opacity: 0.7;
}

.nav-link:hover + .nav-link {
  transform: translateX(8px);
}

/* Interactive ripple effect */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link:active::before {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(2) rotate(180deg);
    opacity: 0;
  }
}

/* Glowing particles effect on hover */
@media (min-width: 769px) {
  .nav-menu {
    position: relative;
  }

  .nav-menu:hover {
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  /* Animated dots/particles */
  .nav-link:hover .nav-text::after {
    content: "✦";
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    color: var(--color-accent);
    animation: sparkle 1.5s ease-in-out infinite;
  }

  /* Advanced hover trail effect */
  .nav-link:hover .nav-text::before {
    content: "";
    position: absolute;
    top: 0;
    left: -5px;
    right: -5px;
    bottom: 0;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(37, 99, 235, 0.3),
      transparent
    );
    animation: textShimmer 0.8s ease-out;
    z-index: -1;
  }

  @keyframes textShimmer {
    0% {
      transform: translateX(-100%);
      opacity: 0;
    }
    50% {
      opacity: 1;
    }
    100% {
      transform: translateX(100%);
      opacity: 0;
    }
  }

  /* 3D Navigation Container with perspective */
  .nav-menu {
    transform-style: preserve-3d;
    perspective: 1000px;
  }

  .nav-link {
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  .nav-link:hover {
    transform: translateY(-4px) rotateX(10deg) scale(1.05);
    z-index: 10;
  }

  /* Holographic effect */
  .nav-link::after {
    background: linear-gradient(
      45deg,
      #ff006e,
      #8338ec,
      #3a86ff,
      #06ffa5,
      #ffbe0b,
      #fb5607
    );
    background-size: 300% 300%;
    animation: holographic 3s ease-in-out infinite;
  }

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

  /* Cyberpunk glow effect */
  .nav-link:hover {
    filter: brightness(1.2) saturate(1.3);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5),
      0 0 40px rgba(124, 58, 237, 0.3), 0 0 60px rgba(6, 182, 212, 0.2);
  }

  /* Advanced particle system */
  .nav-link:hover::before {
    background: radial-gradient(
      circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(37, 99, 235, 0.4) 0%,
      rgba(124, 58, 237, 0.3) 25%,
      rgba(6, 182, 212, 0.2) 50%,
      transparent 70%
    );
  }

  /* Neo-morphism effect for navigation container */
  .nav-menu {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.02)
      ),
      rgba(16, 16, 16, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  }

  /* Advanced active state with morphing */
  .nav-link.active {
    background: linear-gradient(
      135deg,
      rgba(37, 99, 235, 0.25),
      rgba(124, 58, 237, 0.25),
      rgba(6, 182, 212, 0.25)
    );
    border: 1px solid rgba(37, 99, 235, 0.4);
    position: relative;
    overflow: visible;
  }

  .nav-link.active::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
      45deg,
      rgba(37, 99, 235, 0.6),
      rgba(124, 58, 237, 0.6),
      rgba(6, 182, 212, 0.6),
      rgba(37, 99, 235, 0.6)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: activeBorderFlow 3s ease-in-out infinite;
  }

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

  /* Liquid navigation indicator */
  .nav-menu::after {
    background: linear-gradient(
      90deg,
      #ff006e 0%,
      #8338ec 25%,
      #3a86ff 50%,
      #06ffa5 75%,
      #ffbe0b 100%
    );
    background-size: 400% 100%;
    animation: liquidFlow 4s ease-in-out infinite;
    height: 3px;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.6);
  }

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

  @keyframes sparkle {
    0%,
    100% {
      opacity: 0;
      transform: translateY(-50%) scale(0.5) rotate(0deg);
    }
    50% {
      opacity: 1;
      transform: translateY(-50%) scale(1) rotate(180deg);
    }
  }

  /* Gradient border animation */
  .nav-menu {
    background: linear-gradient(
          rgba(255, 255, 255, 0.05),
          rgba(255, 255, 255, 0.05)
        )
        padding-box,
      linear-gradient(
          45deg,
          rgba(37, 99, 235, 0.3),
          rgba(124, 58, 237, 0.3),
          rgba(6, 182, 212, 0.3)
        )
        border-box;
    border: 1px solid transparent;
    position: relative;
  }

  .nav-menu::before {
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(37, 99, 235, 0.1) 25%,
      rgba(124, 58, 237, 0.1) 50%,
      rgba(6, 182, 212, 0.1) 75%,
      transparent 100%
    );
    animation: gradientShift 4s ease-in-out infinite;
  }

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

  /* Dynamic active indicator - moves based on active nav item */
  .nav-menu:has(.nav-link:nth-child(1).active)::after {
    width: 25%;
    left: 0%;
  }

  .nav-menu:has(.nav-link:nth-child(2).active)::after {
    width: 25%;
    left: 25%;
  }

  .nav-menu:has(.nav-link:nth-child(3).active)::after {
    width: 25%;
    left: 50%;
  }

  .nav-menu:has(.nav-link:nth-child(4).active)::after {
    width: 25%;
    left: 75%;
  }
}

/* Enhanced typography effects */
.nav-link:hover .nav-text {
  background: linear-gradient(45deg, #ffffff, var(--color-accent), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 12px 8px;
  z-index: 1001;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-toggle:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.nav-toggle::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s ease;
}

.nav-toggle:hover::before {
  left: 100%;
}

.toggle-line {
  width: 26px;
  height: 3px;
  background: linear-gradient(45deg, #ffffff, #e5e7eb);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-radius: 2px;
  transform-origin: center;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-toggle.active .toggle-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-toggle.active .toggle-line:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.nav-toggle.active .toggle-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* =============================================
   MODERN BUTTONS & FORM ELEMENTS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out-cubic);
  position: relative;
  overflow: hidden;
  min-width: 140px;
  text-align: center;
}

.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 var(--duration-slow) var(--ease-out-cubic);
}

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

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-light);
}

.btn-secondary:hover {
  background: var(--color-bg-elevated);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--text-lg);
  min-width: 160px;
}

.btn-small {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  min-width: 100px;
}

/* Social Links */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-secondary);
  transition: all var(--duration-normal) var(--ease-out-cubic);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--color-accent-light);
  border-radius: 50%;
  transition: all var(--duration-normal) var(--ease-out-cubic);
  transform: translate(-50%, -50%);
  z-index: 1;
}

.social-link:hover::before {
  width: 100%;
  height: 100%;
}

.social-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.social-link i {
  position: relative;
  z-index: 2;
  font-size: 1.25rem;
}

/* =============================================
   ENHANCED HERO SECTION
   ============================================= */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 var(--section-padding);
  position: relative;
  background: var(--color-bg);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: var(--gradient-surface);
  opacity: 0.3;
  z-index: 1;
}

.hero-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s var(--ease-out-cubic) forwards;
  animation-delay: 0.5s;
}

.hero-greeting {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  display: block;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.hero-name {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: var(--space-lg);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.name-line {
  display: block;
  overflow: hidden;
}

.name-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  transform: translateX(-100%);
  animation: revealText 1s var(--ease-out-cubic) forwards;
  animation-delay: 0.8s;
}

.name-line:nth-child(2)::before {
  animation-delay: 1s;
}

.hero-title {
  margin-bottom: var(--space-xl);
  overflow: hidden;
}

.title-text {
  display: block;
  font-size: var(--text-2xl);
  font-weight: 500;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
  transform: translateY(100%);
  animation: slideUp 1s var(--ease-out-cubic) forwards;
}

.title-text:first-child {
  animation-delay: 1.2s;
}

.title-text:last-child {
  animation-delay: 1.4s;
}

.hero-description {
  margin-bottom: var(--space-xl);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--ease-out-cubic) forwards;
  animation-delay: 1.6s;
}

.hero-description p {
  font-size: var(--text-xl);
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--ease-out-cubic) forwards;
  animation-delay: 1.8s;
}

.hero-social {
  display: flex;
  gap: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--ease-out-cubic) forwards;
  animation-delay: 2s;
}

.hero-visual {
  position: relative;
  opacity: 0;
  transform: scale(0.9);
  animation: scaleIn 1s var(--ease-out-cubic) forwards;
  animation-delay: 0.8s;
}

.hero-image {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 500px;
  margin: 0 auto;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--duration-slow) var(--ease-out-cubic);
}

.hero-image:hover img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-surface);
  opacity: 0.8;
  transition: opacity var(--duration-normal) var(--ease-out-cubic);
}

.hero-image:hover .image-overlay {
  opacity: 0.6;
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.floating-element {
  position: absolute;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  box-shadow: 0 4px 20px var(--color-shadow);
  animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
  top: 20%;
  right: -20px;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  top: 60%;
  left: -30px;
  animation-delay: 2s;
}

.floating-element:nth-child(3) {
  bottom: 20%;
  right: -10px;
  animation-delay: 4s;
}

.element-content {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  opacity: 0;
  animation: fadeIn 1s var(--ease-out-cubic) forwards;
  animation-delay: 2.5s;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--color-text-muted);
  animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-text {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  transition: all var(--duration-normal) var(--ease-out-cubic);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left var(--duration-slow) var(--ease-out-cubic);
}

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

.btn-primary {
  background: var(--color-accent);
  color: white;
  border: 1px solid var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-text);
  color: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--color-shadow);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-arrow {
  transition: transform var(--duration-normal) var(--ease-out-cubic);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* Subtle interactive glow for buttons */
.btn:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25), var(--shadow-glow);
}

@media (prefers-reduced-motion: reduce) {
  .project-card:hover {
    transform: none;
  }
  .project-link:hover {
    transform: none;
  }
}

/* Social Links */
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-light);
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out-cubic);
  position: relative;
}

.social-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--color-shadow);
}

/* =============================================
   ENHANCED SECTIONS & LAYOUTS
   ============================================= */

section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-label {
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out-cubic) forwards;
}

.section-label span {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: var(--color-accent-light);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s var(--ease-out-cubic) forwards;
  animation-delay: 0.1s;
}

.section-description {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 600px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out-cubic) forwards;
  animation-delay: 0.2s;
}

/* =============================================
   ABOUT SECTION
   ============================================= */

.about {
  background: var(--color-bg-section);
  position: relative;
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.3;
}

.about-grid {
  display: grid;
  gap: var(--space-3xl);
  align-items: start;
  margin-top: var(--space-2xl);
}

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

.about-text p {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.about-text p:first-child {
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  font-weight: 500;
}

.about-stats {
  display: grid;
  max-width: 500px;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stat-item {
  text-align: center;
  padding: var(--space-md);
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: all var(--duration-normal) var(--ease-out-cubic);
}

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

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-xs);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  font-weight: 500;
}

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

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-tag {
  padding: var(--space-xs) var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  color: var(--color-text);
  transition: all var(--duration-normal) var(--ease-out-cubic);
}

.skill-tag:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  transform: translateY(-2px);
}

.about-visual {
  position: relative;
}

.about-image {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px var(--color-shadow);
  margin-bottom: var(--space-xl);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.visual-elements {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.element-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out-cubic);
  opacity: 0;
  transform: translateX(30px);
}

.element-card.revealed {
  opacity: 1;
  transform: translateX(0);
}

.element-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--color-shadow);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.card-text h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.card-text p {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

/* Work Section */
.work {
  background: var(--color-bg);
}

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

/* Page toolbar (e.g., Back button on project pages) */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 5px 0 var(--space-md) 0;
}

.back-btn {
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.project-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out-cubic);
  opacity: 0;
  transform: translateY(30px);
  position: relative;
}

.project-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px var(--color-shadow), 0 0 0 1px rgba(59, 130, 246, 0.15) inset;
  border-color: var(--color-border-hover);
}

/* Soft highlight from top on hover */
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(220px 80px at 50% 0%, rgba(59, 130, 246, 0.12), transparent 65%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out-cubic);
}

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

.project-image {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--duration-slow) var(--ease-out-cubic);
}

/* Project detail gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.project-gallery img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

/* Clickable cue for gallery images */
.project-gallery img,
.project-image img { cursor: zoom-in; }

@media (max-width: 1024px) {
  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }
  .project-gallery img {
    height: 220px;
  }
}

/* Minimal Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999999 !important; /* ensure above all interactive elements */
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent;
}
.lightbox.open {
  display: flex;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255, 255, 255, 0.692);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000000 !important; /* sit above other interactive elements */
  touch-action: manipulation;
  margin: 10px;
}
.lightbox-prev { left: env(safe-area-inset-left, 16px); }
.lightbox-next { right: env(safe-area-inset-right, 16px); }
.lightbox-close { top: env(safe-area-inset-top, 16px); right: env(safe-area-inset-right, 16px); transform: none; }

/* Larger touch targets on small screens */
@media (max-width: 640px) {
  .lightbox-btn {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  }
  .lightbox-prev { left: max(12px, env(safe-area-inset-left, 12px)); }
  .lightbox-next { right: max(12px, env(safe-area-inset-right, 12px)); }
}

/* Force pointer events for lightbox controls in case global nav hides pointer-events */
.lightbox .lightbox-btn {
  pointer-events: auto !important;
}

/* Ensure tap targets inside the lightbox are reliably interactive on mobile */
.lightbox, .lightbox * {
  -ms-touch-action: manipulation;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 2rem;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(37, 99, 235, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out-cubic);
}

.overlay-content {
  display: flex;
  gap: var(--space-lg);
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: white;
  color: var(--color-accent);
  border-radius: 50%;
  text-decoration: none;
  transition: transform var(--duration-normal) var(--ease-spring), box-shadow var(--duration-normal) var(--ease-out-cubic);
}

.project-link:hover {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.project-content {
  padding: var(--space-xl);
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.project-description {
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

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

.tech-tag {
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.work-cta {
  text-align: center;
  padding: var(--space-2xl);
  background: var(--color-bg-alt);
  border-radius: var(--radius-xl);
}

.work-cta p {
  font-size: 1.25rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

/* Contact Section */
.contact {
  background: var(--color-bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-3xl);
  align-items: start;
}

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

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


/* Subtle interactive glow for buttons */
.btn:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,.25), var(--shadow-glow);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .project-card:hover {
    transform: none;
  }
  .project-link:hover {
    transform: none;
  }
}
.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out-cubic);
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--color-shadow);
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-label {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.contact-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--duration-normal) var(--ease-out-cubic);
}

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

.contact-text {
  color: var(--color-text);
  font-weight: 500;
}

.contact-social {
  display: flex;
  gap: var(--space-md);
}

.contact-form-container {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

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

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg-alt);
  transition: all var(--duration-normal) var(--ease-out-cubic);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Form Status Messages */
.form-status {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out-cubic);
  opacity: 0;
  transform: translateY(-10px);
}

.form-status.show {
  opacity: 1;
  transform: translateY(0);
}

.form-status.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.form-status.loading {
  background: var(--color-accent-light);
  color: var(--color-accent);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Button Loading State */
.btn.loading {
  position: relative;
  pointer-events: none;
}

.btn.loading .btn-text {
  opacity: 0;
}

.btn.loading .btn-arrow {
  opacity: 0;
}

.btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Enhanced Mobile Form States */
.form-group {
  position: relative;
}

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: #e74c3c;
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
  border-color: #27ae60;
}

/* Mobile-specific form enhancements */
@media (max-width: 768px) {
  .form-group input,
  .form-group textarea {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .form-group input:focus,
  .form-group textarea:focus {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  }

  /* Better spacing for mobile forms */
  .contact-form {
    gap: var(--space-lg);
  }

  .form-group {
    gap: var(--space-sm);
  }
}

/* Footer */
.footer {
  background: black;
  color: white;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3xl);
  margin-bottom: var(--space-xl);
}

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

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

.footer-logo .logo-mark {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.footer-logo .logo-text {
  font-weight: 500;
  font-size: 1rem;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

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

.footer-column h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.footer-column a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--duration-normal) var(--ease-out-cubic);
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes revealText {
  to {
    transform: translateX(100%);
  }
}

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

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.5;
    transform: scaleY(0.8);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
    --section-padding: 3rem;
  }

  * {
    box-sizing: border-box;
    max-width: 100%;
  }

  html {
    overflow-x: hidden;
    max-width: 100vw;
  }

  body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .navbar {
    width: 100vw;
    max-width: 100vw;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    /* Preserve scroll behavior properties */
    position: fixed !important;
    top: 0 !important;
    z-index: 10000 !important;
  }

  .nav-container {
    padding: 0 var(--container-padding);
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: visible; /* Allow mobile menu to break out */
    position: relative;
  }

  .logo-link {
    flex-shrink: 0;
    max-width: 60%;
    overflow: hidden;
  }

  .logo-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Body scroll lock for mobile menu */
  .menu-open {
    overflow: hidden !important;
    height: 100vh;
  }

  .menu-open body {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
  }

  /* Mobile Navigation Menu - Positioned independently */
  .nav-menu {
    display: none; /* Hidden by default on all screens */
  }

  @media (max-width: 768px) {
    .nav-toggle {
      display: flex;
    }

    .nav-menu {
      display: flex;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      width: 100vw;
      height: 100vh;
      background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.98),
        rgba(16, 16, 16, 0.98)
      );
      backdrop-filter: blur(20px);
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 2rem;
      transform: translateX(-100%);
      transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
      z-index: 99999;
      list-style: none;
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      opacity: 0;
      visibility: hidden;
    }

    /* Add a subtle pattern overlay */
    .nav-menu::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: radial-gradient(
          circle at 20% 30%,
          rgba(37, 99, 235, 0.1) 0%,
          transparent 50%
        ),
        radial-gradient(
          circle at 80% 70%,
          rgba(124, 58, 237, 0.1) 0%,
          transparent 50%
        );
      z-index: -1;
    }

    .nav-menu.active {
      transform: translateX(0);
      opacity: 1;
      visibility: visible;
    }

    /* Close Button for Mobile Menu */
    .nav-close {
      position: absolute;
      top: 2rem;
      right: 2rem;
      width: 44px;
      height: 44px;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
      z-index: 100001;
      backdrop-filter: blur(10px);
      transform: scale(0) rotate(-90deg);
      opacity: 0;
    }

    .nav-menu.active .nav-close {
      transform: scale(1) rotate(0deg);
      opacity: 1;
      transition-delay: 0.3s;
    }

    .nav-close:hover {
      background: rgba(255, 255, 255, 0.2);
      border-color: var(--color-accent);
      transform: scale(1.1) rotate(90deg);
      box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    }

    .nav-close:focus {
      outline: 2px solid var(--color-accent);
      outline-offset: 2px;
    }

    .close-line {
      position: absolute;
      width: 18px;
      height: 2px;
      background: #ffffff;
      border-radius: 1px;
      transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .close-line:nth-child(1) {
      transform: rotate(45deg);
    }

    .close-line:nth-child(2) {
      transform: rotate(-45deg);
    }

    .nav-close:hover .close-line {
      background: var(--color-accent);
      box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
    }

    /* Touch feedback for close button */
    .nav-close.touch-pressed {
      transform: scale(0.9) rotate(0deg) !important;
      background: rgba(255, 255, 255, 0.3);
      transition: all 0.1s ease;
    }

    .nav-close.touch-pressed .close-line {
      background: var(--color-accent);
    }

    .nav-item {
      transform: translateY(30px) scale(0.9);
      opacity: 0;
      transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
      width: 100%;
      max-width: 320px;
      text-align: center;
      position: relative;
      z-index: 100000;
    }

    .nav-menu.active .nav-item {
      transform: translateY(0) scale(1);
      opacity: 1;
    }

    .nav-menu.active .nav-item:nth-child(1) {
      transition-delay: 0.1s;
    }
    .nav-menu.active .nav-item:nth-child(2) {
      transition-delay: 0.2s;
    }
    .nav-menu.active .nav-item:nth-child(3) {
      transition-delay: 0.3s;
    }
    .nav-menu.active .nav-item:nth-child(4) {
      transition-delay: 0.4s;
    }

    .nav-link {
      font-size: 1.2rem;
      font-weight: 500;
      color: #ffffff;
      text-decoration: none;
      padding: 1rem 1.5rem;
      margin: 0 1rem;
      border-radius: 12px;
      background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05)
      );
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 90%;
      position: relative;
      overflow: hidden;
    }

    .nav-link::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.6s ease;
    }

    .nav-link:hover::before {
      left: 100%;
    }

    .nav-link:hover,
    .nav-link.active {
      background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.3),
        rgba(124, 58, 237, 0.3)
      );
      border-color: rgba(37, 99, 235, 0.5);
      transform: translateY(-2px) scale(1.02);
      box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    }

    .nav-number {
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--color-accent);
      font-family: var(--font-mono);
    }

    .nav-text {
      font-size: 1.1rem;
      font-weight: 500;
    }
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--color-accent);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
  }

  .nav-number {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    opacity: 0.7;
    margin-bottom: 0.25rem;
  }

  .nav-text {
    font-size: 1.25rem;
    font-weight: 500;
  }

  .nav-toggle {
    display: flex;
    position: relative;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 4px;
    padding: 10px;
    z-index: 10000;
    flex-direction: column;
    gap: 5px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    touch-action: manipulation;
  }

  .toggle-line {
    background: #ffffff;
    width: 24px;
    height: 3px;
    display: block;
    transition: all var(--duration-normal) var(--ease-out-cubic);
    border-radius: 1px;
  }

  .nav-toggle.active .toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active .toggle-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  /* Enhanced Contact Items for Mobile */
  .contact-info {
    margin-bottom: var(--space-2xl);
  }

  .contact-item {
    padding: var(--space-lg) var(--space-md);
    margin-bottom: var(--space-md);
    border-radius: var(--radius-md);
    gap: var(--space-md);
  }

  .contact-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .contact-details {
    flex: 1;
    min-width: 0; /* Allows text to truncate */
  }

  .contact-link {
    font-size: 0.9rem;
    word-break: break-word;
    line-height: 1.4;
  }

  .contact-label {
    font-size: 0.8rem;
    margin-bottom: var(--space-xs);
  }

  /* Enhanced Contact Form for Mobile */
  .contact-form-container {
    padding: var(--space-xl) var(--space-lg);
    border-radius: var(--radius-lg);
  }

  .contact-form {
    gap: var(--space-md);
  }

  .form-group {
    gap: var(--space-xs);
  }

  .form-group label {
    font-size: 0.85rem;
    margin-bottom: var(--space-xs);
  }

  .form-group input,
  .form-group textarea {
    padding: var(--space-md) var(--space-sm);
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    -webkit-appearance: none;
    appearance: none;
  }

  .form-group textarea {
    min-height: 100px;
    resize: vertical;
  }

  /* Better touch targets for mobile */
  .btn {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.9rem;
    min-height: 48px;
    border-radius: var(--radius-md);
  }

  .contact-social {
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-lg);
  }

  .social-link {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-links {
    justify-content: space-between;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }

  /* Extra Small Mobile Contact Optimizations */
  .contact {
    padding: var(--space-2xl) 0;
  }

  .contact-grid {
    gap: var(--space-xl);
  }

  .section-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: var(--space-lg);
  }

  .contact-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
  }

  /* Compact Contact Items */
  .contact-info {
    margin-bottom: var(--space-xl);
  }

  .contact-item {
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    gap: var(--space-sm);
    border-radius: var(--radius-sm);
  }

  .contact-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .contact-label {
    font-size: 0.75rem;
    margin-bottom: 2px;
  }

  .contact-link,
  .contact-text {
    font-size: 0.85rem;
    line-height: 1.3;
  }

  /* Optimized Form for Small Screens */
  .contact-form-container {
    padding: var(--space-lg) var(--space-md);
    margin: 0 -var(--space-xs); /* Extend to screen edges */
    border-radius: var(--radius-md);
    border-left: none;
    border-right: none;
  }

  .form-group {
    gap: 6px;
  }

  .form-group label {
    font-size: 0.8rem;
    font-weight: 600;
  }

  .form-group input,
  .form-group textarea {
    padding: 12px 10px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 6px;
    border-width: 1px;
    transition: all 0.2s ease;
  }

  .form-group input:focus,
  .form-group textarea:focus {
    transform: none; /* Remove transforms on small screens */
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  }

  .form-group textarea {
    min-height: 80px;
    max-height: 120px;
  }

  /* Better button for small screens */
  .btn-full {
    margin-top: var(--space-sm);
    padding: var(--space-md);
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 48px;
    border-radius: var(--radius-sm);
  }

  /* Compact social links */
  .contact-social {
    gap: var(--space-xs);
    margin-top: var(--space-md);
    justify-content: center;
  }

  .social-link {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
}

/* Ultra Small Screens (320px and below) */
@media (max-width: 320px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .section-title {
    font-size: 1.6rem;
    line-height: 1.1;
  }

  .contact-description {
    font-size: 0.9rem;
  }

  .contact-item {
    padding: var(--space-sm);
    gap: var(--space-xs);
  }

  .contact-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .contact-link,
  .contact-text {
    font-size: 0.8rem;
  }

  .contact-form-container {
    padding: var(--space-md) var(--space-sm);
    margin: 0 -var(--space-sm);
  }

  .form-group input,
  .form-group textarea {
    padding: 10px 8px;
    font-size: 16px;
  }

  .btn-full {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
  }
}

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

/* Print styles */
@media print {
  .navbar,
  .loading-screen,
  .cursor,
  .floating-elements,
  .scroll-indicator {
    display: none !important;
  }
}

/* JavaScript Animation Support */
.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Ensure navbar scroll behavior works on all screen sizes */
@media (max-width: 768px) {
  .navbar.hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .navbar.visible {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .navbar:not(.scrolled) {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .navbar:hover {
    transform: translateY(0) !important;
    opacity: 1 !important;
    background: rgba(16, 16, 16, 0.98) !important;
  }
}

.element-card:not(.revealed) {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.project-card:not(.revealed) {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Form Focus States */
.form-group.focused label {
  color: var(--color-accent);
}

.form-group.filled label {
  color: var(--color-accent);
}

/* Button Loading State */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Navigation Active States Enhanced */
.nav-link.active .nav-number {
  opacity: 1;
  color: var(--color-accent);
}

.nav-link.active .nav-text {
  color: var(--color-accent);
}

/* Smooth Transitions */
.nav-toggle.active .toggle-line {
  background: var(--color-accent);
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  z-index: 9999;
  transition: width 0.3s ease;
}

/* Text Animation Support */
.animate-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: charFadeIn 0.6s ease forwards;
}

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

/* Enhanced Hover Effects */
.social-link:hover {
  transform: translateY(-3px) scale(1.05);
}

.skill-tag:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Loading Screen Enhancements */
.loading-screen.loaded {
  pointer-events: none;
}

/* =============================================
   ENHANCED MOBILE-FIRST RESPONSIVE DESIGN
   ============================================= */

/* Mobile Optimizations (320px - 767px) */
@media (max-width: 767px) {
  :root {
    --container-padding: 1rem;
    --section-padding: 3rem;
    --space-3xl: 3rem;
    --space-2xl: 2rem;
    --space-xl: 1.5rem;
  }

  body {
    font-size: var(--text-sm);
  }

  /* Enhanced Mobile Hero */
  .hero {
    min-height: 100vh;
    padding: 100px 0 var(--section-padding);
    text-align: center;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }

  .hero-content {
    order: 2;
  }

  .hero-visual {
    order: 1;
    margin-bottom: var(--space-lg);
  }

  .hero-name {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-md);
  }

  .hero-title .title-text {
    font-size: var(--text-xl);
  }

  .hero-description p {
    font-size: var(--text-lg);
    margin: 0 auto;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .hero-social {
    justify-content: center;
    gap: var(--space-sm);
  }

  .hero-image {
    max-width: 280px;
    height: 350px;
    margin: 0 auto;
  }

  /* Enhanced Mobile Sections */
  .section-title {
    font-size: var(--text-3xl);
    text-align: center;
  }

  .section-description {
    text-align: center;
    margin: 0 auto;
  }

  /* Mobile About Section */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .stat-item {
    padding: var(--space-lg);
  }

  .skills-grid {
    justify-content: center;
  }

  /* Mobile Work Section */
  .work-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .project-card {
    margin: 0 auto;
    max-width: 100%;
  }

  /* Mobile Contact Section */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .contact-form {
    order: 1;
  }

  .contact-info {
    order: 2;
    text-align: center;
  }

  /* Mobile Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-lg);
  }

  /* Mobile Typography Adjustments */
  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }

  h3 {
    font-size: var(--text-2xl);
  }

  /* Mobile Button Optimizations */
  .btn {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    min-height: 48px; /* Minimum touch target */
    width: 100%;
    max-width: 320px;
  }

  .btn-large {
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--text-lg);
    min-height: 56px;
  }

  .social-link {
    width: 48px;
    height: 48px;
    font-size: 1.125rem;
  }

  /* Mobile Form Optimizations */
  .form-group input,
  .form-group textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: var(--space-md);
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .form-group textarea {
    min-height: 120px;
  }

  /* Mobile Loading Screen */
  .loading-logo .logo-mark {
    font-size: var(--text-3xl);
  }

  .loading-text {
    font-size: var(--text-sm);
  }

  /* Mobile Scroll Indicator Fix */
  .scroll-indicator {
    bottom: var(--space-lg);
    gap: var(--space-xs);
  }

  .scroll-line {
    height: 30px;
    animation: scrollPulse 1.5s ease-in-out infinite;
  }

  .scroll-text {
    font-size: var(--text-xs);
    letter-spacing: 0.05em;
    text-align: center;
    margin-top: var(--space-xs);
  }
}

/* Tablet Optimizations (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  :root {
    --container-padding: 1.5rem;
    --section-padding: 4rem;
  }

  .hero-container {
    gap: var(--space-2xl);
  }

  .hero-name {
    font-size: var(--text-5xl);
  }

  .about-grid {
    gap: var(--space-2xl);
  }

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

  .contact-grid {
    gap: var(--space-2xl);
  }
}

/* Large Desktop Optimizations (1200px+) */
@media (min-width: 1200px) {
  .hero-container {
    gap: var(--space-3xl);
  }

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

  .skills-grid {
    gap: var(--space-md);
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.98);
  }

  .social-link:hover {
    transform: none;
  }

  .social-link:active {
    transform: scale(0.95);
  }

  .project-card:hover {
    transform: none;
  }

  .project-card:active {
    transform: scale(0.98);
  }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-image,
  .project-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-content,
  .hero-visual,
  .section-label,
  .section-title,
  .section-description {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: light) {
  :root {
    /* Override for users who prefer light mode */
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-section: #f1f5f9;
    --color-bg-card: #ffffff;
    --color-bg-elevated: #f8fafc;

    --color-text: #0f172a;
    --color-text-primary: #1e293b;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    --color-text-subtle: #94a3b8;

    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;
    --color-border-hover: #cbd5e1;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
  }
}

/* =============================================
   ESSENTIAL ANIMATIONS
   ============================================= */

@keyframes revealText {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  }
}

/* =============================================
   UTILITY CLASSES
   ============================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fade-in {
  animation: fadeInUp 0.8s var(--ease-out-cubic) forwards;
}

.slide-up {
  animation: slideUp 0.8s var(--ease-out-cubic) forwards;
}

.scale-in {
  animation: scaleIn 0.8s var(--ease-out-cubic) forwards;
}

.floating {
  animation: float 3s ease-in-out infinite;
}

.glowing {
  animation: glow 2s ease-in-out infinite alternate;
}

/* Focus Styles for Accessibility */
.btn:focus-visible,
.social-link:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-accent);
  color: white;
  padding: 8px;
  border-radius: 4px;
  text-decoration: none;
  transition: top 0.3s;
  z-index: 10001;
}

.skip-link:focus {
  top: 6px;
}

/* End of Modern Dark Portfolio CSS */
