/* ============================================
   MODERN PORTFOLIO - DESIGN SYSTEM
   ============================================ */

/* ============================================
   1. CSS VARIABLES & DESIGN TOKENS
   ============================================ */

:root {
  /* Modern Color Palette - Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-secondary: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
  --gradient-accent: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
  --gradient-dark: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  
  /* Solid Colors */
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;
  --color-secondary: #06b6d4;
  --color-accent: #10b981;
  --color-accent-warm: #f59e0b;
  --color-pink: #ec4899;
  
  /* Neutral Colors - Light Mode */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;
  --color-surface: rgba(255, 255, 255, 0.8);
  --color-surface-elevated: rgba(255, 255, 255, 0.95);
  
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-tertiary: #94a3b8;
  
  --color-border: rgba(148, 163, 184, 0.2);
  --color-border-strong: rgba(148, 163, 184, 0.4);
  
  /* Shadows */
  --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);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  --shadow-glow-strong: 0 0 40px rgba(99, 102, 241, 0.5);
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  
  /* Typography */
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */
  --font-size-6xl: 3.75rem;     /* 60px */
  --font-size-7xl: 4.5rem;      /* 72px */
  
  /* Spacing */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */
  
  /* Border Radius */
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-3xl: 2rem;      /* 32px */
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Z-index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  
  /* Layout */
  --container-max-width: 1280px;
  --container-padding: var(--space-6);
  --section-padding: var(--space-24);
  --header-height: 80px;
}

/* Dark Mode Variables */
body.dark-mode {
  --color-bg-primary: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-tertiary: #334155;
  --color-surface: rgba(30, 41, 59, 0.8);
  --color-surface-elevated: rgba(30, 41, 59, 0.95);
  
  --color-text-primary: #f1f5f9;
  --color-text-secondary: #cbd5e1;
  --color-text-tertiary: #64748b;
  
  --color-border: rgba(148, 163, 184, 0.1);
  --color-border-strong: rgba(148, 163, 184, 0.2);
  
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);
  --shadow-glow-strong: 0 0 40px rgba(99, 102, 241, 0.6);
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */

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

/* Skip to content link - hidden until focused for accessibility */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--space-3) var(--space-6);
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: 600;
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: transparent;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background: transparent;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* Background gradient layer behind particles */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  z-index: -3;
  pointer-events: none;
}

body.dark-mode::before {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

/* Particles Canvas */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Floating Blobs Background */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -2;
  pointer-events: none;
}

.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -2;
  will-change: transform;
}

.blob-1 {
  width: 300px;
  height: 300px;
  background: var(--gradient-primary);
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.blob-2 {
  width: 250px;
  height: 250px;
  background: var(--gradient-secondary);
  top: 50%;
  right: 5%;
  animation-delay: -5s;
}

.blob-3 {
  width: 200px;
  height: 200px;
  background: var(--gradient-accent);
  bottom: 10%;
  left: 30%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -50px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--font-size-6xl);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-3);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
}

/* Gradient Text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

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

/* ============================================
   4. LAYOUT COMPONENTS
   ============================================ */

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

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

/* ============================================
   5. GLASSMORPHISM COMPONENTS
   ============================================ */

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-base);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.3);
}

/* ============================================
   6. NAVIGATION
   ============================================ */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-fixed);
  padding: var(--space-4) 0;
  transition: all var(--transition-base);
}

header.scrolled {
  padding: var(--space-3) 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
}

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

.nav-link {
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  transition: color var(--transition-fast);
}

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

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

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

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-text-primary);
}

/* ============================================
   7. BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

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

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #818cf8 0%, #3b82f6 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 0;
  border-radius: inherit;
}

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

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary span,
.btn-primary i,
.btn-primary * {
  position: relative;
  z-index: 2;
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-ghost:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

/* Magnetic Button Effect */
.btn-magnetic {
  transition: transform var(--transition-fast);
}

/* ============================================
   8. HERO SECTION
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-text {
  z-index: 2;
}

.hero-title {
  font-size: var(--font-size-7xl);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  line-height: 1.6;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-visual {
  position: relative;
  height: 500px;
  animation: fadeIn 1s ease-out 0.6s backwards;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-2xl);
  border: 3px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

.hero-image-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: var(--gradient-primary);
  border-radius: var(--radius-3xl);
  filter: blur(60px);
  opacity: 0.3;
  z-index: 0;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.1); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-tertiary);
  font-size: var(--font-size-sm);
  animation: bounce 2s ease-in-out infinite;
}

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

/* ============================================
   9. ANIMATIONS
   ============================================ */

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

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

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

@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 scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Scroll Reveal Classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   10. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  :root {
    --font-size-7xl: 3.5rem;
    --font-size-6xl: 3rem;
    --font-size-5xl: 2.5rem;
    --section-padding: var(--space-16);
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  
  .hero-visual {
    height: 400px;
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-7xl: 2.5rem;
    --font-size-6xl: 2rem;
    --font-size-5xl: 1.875rem;
    --container-padding: var(--space-4);
    --section-padding: var(--space-12);
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-6);
    padding: var(--space-8);
    box-shadow: var(--shadow-2xl);
    transition: right var(--transition-base);
    z-index: var(--z-modal);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .menu-toggle {
    display: block;
    z-index: calc(var(--z-modal) + 1);
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-7xl: 2rem;
    --font-size-6xl: 1.75rem;
    --font-size-5xl: 1.5rem;
  }
  
  .hero-visual {
    height: 300px;
  }
}

/* ============================================
   11. UTILITY CLASSES
   ============================================ */

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

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

/* ============================================
   12. PRELOADER
   ============================================ */

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-border);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* ============================================
   SECTION-SPECIFIC STYLES
   ============================================ */

/* ============================================
   1. SECTION HEADERS
   ============================================ */

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
  animation: fadeInUp 0.8s ease-out;
}

.section-title {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-4);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.section-subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: var(--space-6) auto 0;
  line-height: 1.6;
}

/* ============================================
   2. ABOUT SECTION - BENTO GRID
   ============================================ */

.about {
  background: transparent;
  position: relative;
  overflow: hidden;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}

.bento-item {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.bento-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 0;
}

.bento-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-2xl), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.4);
}

.bento-item:hover::before {
  opacity: 0.05;
}

.bento-item > * {
  position: relative;
  z-index: 1;
}

/* Bento Grid Layout Variations */
.bento-large {
  grid-column: span 8;
  grid-row: span 2;
}

.bento-medium {
  grid-column: span 6;
}

.bento-small {
  grid-column: span 4;
}

.bento-tall {
  grid-row: span 2;
}

/* Profile Card */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-6);
}

.profile-image-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}

.profile-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: var(--gradient-primary);
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.4;
  z-index: 0;
  animation: pulse 3s ease-in-out infinite;
}

.profile-info h3 {
  margin-bottom: var(--space-2);
}

.profile-role {
  color: var(--color-text-tertiary);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
}

.skill-item {
display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: rgba(241, 245, 249, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
  cursor: default;
}

body.dark-mode .skill-item {
  background: rgba(51, 65, 85, 0.7);
}

.skill-item:hover {
  transform: translateY(-4px);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.skill-icon {
  font-size: var(--font-size-4xl);
  filter: grayscale(0.3);
  transition: filter var(--transition-base);
}

.skill-item:hover .skill-icon {
  filter: grayscale(0);
  transform: scale(1.1);
}

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

/* Expertise Bars */
.expertise-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.expertise-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.expertise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.expertise-level {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

.expertise-bar {
  height: 8px;
  background: rgba(241, 245, 249, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

body.dark-mode .expertise-bar {
  background: rgba(51, 65, 85, 0.7);
}

.expertise-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.expertise-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

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

/* Stats Card */
.stats-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

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

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

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   3. PROJECTS SECTION
   ============================================ */

.projects {
  position: relative;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
  min-height: 400px; /* Ensure grid has height */
}

/* Ensure project cards are visible */
.projects-grid > * {
  opacity: 1;
  visibility: visible;
}

.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.6s ease-out backwards;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 0;
}

.project-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-2xl), var(--shadow-glow-strong);
  border-color: rgba(99, 102, 241, 0.5);
}

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

.project-image-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: var(--color-bg-tertiary);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image {
  transform: scale(1.1);
}

.project-overlay-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-primary);
  border: 1px solid var(--glass-border);
}

.project-content {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.project-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
}

.project-description {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  flex: 1;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.project-tag {
  padding: var(--space-1) var(--space-3);
  background: rgba(241, 245, 249, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.project-tag:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

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

.project-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.project-link:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

/* Project Filter */
.project-filter {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--space-3) var(--space-6);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: var(--color-surface-elevated);
  color: var(--color-text-primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

/* ============================================
   4. CONTACT SECTION
   ============================================ */

.contact {
  background: transparent;
  position: relative;
}

.contact-container {
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-3xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

.contact-header {
  background: var(--gradient-primary);
  padding: var(--space-10);
  text-align: center;
  color: white;
}

.contact-header h3 {
  color: white;
  margin-bottom: var(--space-2);
}

.contact-header p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

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

.form-group {
  position: relative;
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  transition: color var(--transition-fast);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-4);
  background: rgba(241, 245, 249, 0.7);
  backdrop-filter: blur(10px);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  transition: all var(--transition-base);
  outline: none;
}

body.dark-mode .form-input,
body.dark-mode .form-textarea {
  background: rgba(51, 65, 85, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.form-input:focus + .form-label,
.form-textarea:focus + .form-label {
  color: var(--color-primary);
}

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

.form-submit {
  width: 100%;
  padding: var(--space-5);
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.form-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #818cf8 0%, #3b82f6 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.form-submit:hover::before {
  opacity: 1;
}

.form-submit span {
  position: relative;
  z-index: 1;
}

/* Form Messages */
.form-message {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: slideInDown 0.3s ease-out;
}

.form-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

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

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.social-link {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--color-text-primary);
  font-size: var(--font-size-xl);
  transition: all var(--transition-base);
  text-decoration: none;
}

.social-link:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-4px) scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   5. FOOTER
   ============================================ */

footer {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--space-16) 0 var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.05);
}

body.dark-mode footer {
  background: rgba(30, 41, 59, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-section h4 {
  margin-bottom: var(--space-4);
  font-size: var(--font-size-lg);
}

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

.footer-link {
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-link:hover {
  color: var(--color-primary);
  transform: translateX(4px);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-tertiary);
  font-size: var(--font-size-sm);
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-fixed);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

/* ============================================
   6. RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1024px) {
  .bento-large,
  .bento-medium,
  .bento-small {
    grid-column: span 12;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-6);
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  
  .stats-card {
    grid-template-columns: 1fr;
  }
  
  .contact-header,
  .contact-form {
    padding: var(--space-6);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}
/* ============================================
   CRITICAL BUG FIXES FOR DISPLAY ISSUES
   ============================================ */

/* Fix 1: Bento Grid Responsive Issues */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .bento-large {
    grid-column: span 6;
  }
  
  .bento-medium {
    grid-column: span 6;
  }
  
  .bento-small {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .bento-large,
  .bento-medium,
  .bento-small,
  .bento-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .bento-item {
    min-height: auto;
  }
}

/* Fix 2: Hero Section Alignment */
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .hero-text {
    order: 1;
  }
  
  .hero-visual {
    order: 2;
    margin: 0 auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
}

/* Fix 3: Glassmorphism Fallback for Firefox */
@supports not (backdrop-filter: blur(20px)) {
  .glass,
  .glass-card,
  .bento-item,
  .project-card,
  .contact-card,
  header.scrolled {
    background: var(--color-surface-elevated);
  }
  
  body.dark-mode .glass,
  body.dark-mode .glass-card,
  body.dark-mode .bento-item,
  body.dark-mode .project-card,
  body.dark-mode .contact-card,
  body.dark-mode header.scrolled {
    background: rgba(30, 41, 59, 0.95);
  }
}

/* Fix 4: Mobile Menu Improvements */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-6);
    padding: var(--space-8);
    box-shadow: var(--shadow-2xl);
    transition: right var(--transition-base);
    z-index: var(--z-modal);
    border-left: 1px solid var(--glass-border);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  /* Mobile menu backdrop */
  .nav-links.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
  
  .menu-toggle {
    display: block;
    z-index: calc(var(--z-modal) + 1);
    position: relative;
  }
  
  .nav-link {
    font-size: var(--font-size-lg);
    padding: var(--space-3) 0;
  }
}

/* Fix 5: Project Card Image Loading */
.project-image-container {
position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

body.dark-mode .project-image-container {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

/* Image loading state */
.project-image[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.project-image.lazy-loaded {
  opacity: 1;
}

/* Fix 6: Expertise Bars Animation */
.expertise-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
  position: relative;
  overflow: hidden;
  will-change: width;
}

/* Fix 7: Scroll Indicator Positioning */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-tertiary);
  font-size: var(--font-size-sm);
  animation: bounce 2s ease-in-out infinite;
  z-index: 10;
}

@media (max-width: 768px) {
  .scroll-indicator {
    display: none;
  }
}

/* Fix 8: Profile Image Sizing */
.profile-image-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}

/* Fix 9: Skills Grid Responsive */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-4);
}

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

/* Fix 10: Contact Form Spacing */
.contact-form {
  padding: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .contact-form {
    padding: var(--space-6);
    gap: var(--space-5);
  }
  
  .contact-header {
    padding: var(--space-6);
  }
}

/* Fix 11: Button Text Alignment */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

/* Fix 12: Hero Image Responsive */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 500px;
  animation: fadeIn 1s ease-out 0.6s backwards;
}

@media (max-width: 1024px) {
  .hero-visual {
    height: 400px;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .hero-visual {
    height: 350px;
    max-width: 350px;
  }
}

@media (max-width: 480px) {
  .hero-visual {
    height: 300px;
    max-width: 300px;
  }
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-2xl);
  border: 3px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

/* Fix 13: Floating Blobs Performance */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
  will-change: transform;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .blob,
  .scroll-indicator,
  .hero-image-glow,
  .profile-glow {
    animation: none;
  }
  
  .expertise-fill {
    transition: none;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Fix 14: Dark Mode Transitions */
body {
  transition: background-color var(--transition-base), color var(--transition-base);
}

body.dark-mode {
  color: var(--color-text-primary);
}

/* Smooth dark mode transitions for all elements */
*,
*::before,
*::after {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: var(--transition-base);
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Exclude animations and transforms from dark mode transition */
* {
  transition-property: background-color, border-color, color, fill, stroke, box-shadow;
}

/* Fix 15: Section Padding Consistency */
section {
  padding: var(--section-padding) 0;
  position: relative;
}

@media (max-width: 768px) {
  section {
    padding: var(--space-16) 0;
  }
}

@media (max-width: 480px) {
  section {
    padding: var(--space-12) 0;
  }
}

/* Fix 16: Footer Responsive */
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .footer-links {
    align-items: center;
  }
}


/* Theme Toggle Button */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  margin-left: var(--space-4);
}

.theme-toggle:hover {
  background: var(--color-surface);
  transform: scale(1.1);
}

.sun-icon,
.moon-icon {
  position: absolute;
  transition: all var(--transition-base);
}

.sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.moon-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

body.dark-mode .sun-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

body.dark-mode .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Fix 19: Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-fixed);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: var(--space-6);
    right: var(--space-6);
    width: 44px;
    height: 44px;
  }
}

/* Fix 20: Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

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

.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-border);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* ============================================
   PROJECTS PAGE STYLES
   ============================================ */

/* Projects Hero Section */
.projects-hero-section {
  padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-24);
  position: relative;
  overflow: hidden;
}

.projects-hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.projects-hero-title {
  font-size: var(--font-size-6xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

.projects-hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-12);
  line-height: 1.6;
}

/* Projects Stats */
.projects-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  max-width: 600px;
  margin: 0 auto var(--space-16);
}

.stat-item {
  text-align: center;
  padding: var(--space-8);
  background: var(--color-bg-secondary);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

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

.stat-number {
  font-size: var(--font-size-5xl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Filter Section */
.projects-filter-section {
  padding: var(--space-12) 0;
  background: transparent;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.filter-container {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.filter-label {
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-buttons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  flex: 1;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-bg-primary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #ffffff !important;
  box-shadow: var(--shadow-glow);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 var(--space-2);
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.3);
}

/* Projects Grid Section */
.projects-grid-section {
  padding: var(--space-20) 0 var(--space-8);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-8);
  transition: opacity var(--transition-base);
}

/* Project Card */
.project-card {
background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  isolation: isolate;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.6s ease-out backwards;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl), var(--shadow-glow);
  border-color: var(--color-primary);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
}

.project-year {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
}

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

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

.project-description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.project-tag {
  padding: var(--space-1) var(--space-3);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  transition: all var(--transition-fast);
}

.project-tag:hover {
  background: var(--color-primary);
  color: white;
}

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

.project-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.project-btn-primary {
  background: var(--gradient-primary);
  color: white;
  flex: 1;
}

.project-btn-primary:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-glow);
}

.project-btn-secondary {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  width: 48px;
  height: 48px;
  padding: 0;
}

.project-btn-secondary:hover {
  background: var(--color-primary);
  color: white;
  transform: scale(1.1);
}

/* Loading State */
.projects-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) 0;
  gap: var(--space-4);
}

.projects-loading p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
}

/* No Projects State */
.no-projects {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-20) 0;
}

.no-projects i {
  font-size: 64px;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-4);
}

.no-projects p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
}

/* Error State */
.error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-20) 0;
}

.error-message i {
  font-size: 64px;
  color: #ef4444;
  margin-bottom: var(--space-4);
}

.error-message h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-3);
}

.error-message p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
}

/* Project Modal */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.project-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: var(--color-bg-primary);
  border-radius: var(--radius-3xl);
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  transform: scale(0.9);
  transition: transform var(--transition-base);
  border: 1px solid var(--color-border);
}

.project-modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: var(--font-size-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

#modal-body {
  padding: var(--space-8);
}

.modal-header {
  margin-bottom: var(--space-8);
}

.modal-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-2xl);
  margin-bottom: var(--space-6);
}

.modal-header-content {
  text-align: center;
}

.modal-year {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.modal-title {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

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

.modal-section {
  margin-bottom: var(--space-8);
}

.modal-section h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.modal-tag {
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.modal-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  flex: 1;
}

.modal-btn-primary {
  background: var(--gradient-primary);
  color: white;
}

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

.modal-btn-secondary {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.modal-btn-secondary:hover {
  background: var(--color-bg-secondary);
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-6);
  }
  
  .projects-stats {
    gap: var(--space-6);
  }
}

@media (max-width: 768px) {
  .projects-hero-title {
    font-size: var(--font-size-4xl);
  }
  
  .projects-hero-subtitle {
    font-size: var(--font-size-lg);
  }
  
  .projects-stats {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .filter-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-buttons {
    justify-content: center;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  #modal-body {
    padding: var(--space-6);
  }
  
  .modal-image {
    height: 200px;
  }
  
  .modal-title {
    font-size: var(--font-size-2xl);
  }
  
  .modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .projects-hero-section {
    padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-12);
  }
  
  .projects-hero-title {
    font-size: var(--font-size-3xl);
  }
  
  .stat-number {
    font-size: var(--font-size-4xl);
  }
  
  .filter-btn {
    font-size: var(--font-size-xs);
    padding: var(--space-2) var(--space-4);
  }
  
  .project-image-container {
    height: 200px;
  }
}
