/* ========================================
   LIQUID GLASS PORTFOLIO - STYLES
   Apple-Inspired Design System
   ======================================== */

/* === CSS VARIABLES === */
:root {
  /* Colors - Dark Mode (Default) */
  --primary: #0a84ff;
  --primary-hover: #409cff;
  --secondary: #98989d;
  --background: #000000;
  --surface: #1c1c1e;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --border: rgba(255, 255, 255, 0.1);
  
  /* Glass Effects - Dark Mode */
  --glass-bg: rgba(28, 28, 30, 0.72);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
  --glass-highlight: rgba(255, 255, 255, 0.15);
  --glass-tint: rgba(255, 255, 255, 0.08);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* === DARK MODE LIQUID DROPS (Always Active) === */
.tag {
    background: 
      linear-gradient(135deg, 
        rgba(28, 28, 30, 0.95) 0%,
        rgba(28, 28, 30, 0.85) 50%,
        rgba(28, 28, 30, 0.75) 100%
      );
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
      0 4px 20px rgba(10, 132, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 -1px 0 rgba(0, 0, 0, 0.3),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
  
  .tag::before {
    background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.15) 15%,
      transparent 50%
    );
  }
  
  .tag::after {
    background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 70%
    );
  }
  
  /* Dark mode liquid drops for stat items */
  .stat-item {
    background: 
      linear-gradient(135deg, 
        rgba(28, 28, 30, 0.95) 0%,
        rgba(28, 28, 30, 0.85) 50%,
        rgba(28, 28, 30, 0.75) 100%
      );
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
      0 4px 20px rgba(10, 132, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 -1px 0 rgba(0, 0, 0, 0.3),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
  
  .stat-item::before {
    background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.15) 15%,
      transparent 50%
    );
  }
  
  .stat-item::after {
    background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 70%
    );
  }
  
  /* Dark mode liquid navbar */
  .glass-nav {
    background: 
      linear-gradient(135deg, 
        rgba(28, 28, 30, 0.95) 0%,
        rgba(28, 28, 30, 0.88) 50%,
        rgba(28, 28, 30, 0.82) 100%
      );
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 
      0 4px 24px rgba(10, 132, 255, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 0 -1px 0 rgba(0, 0, 0, 0.3),
      0 8px 40px rgba(0, 0, 0, 0.5);
  }
  
  .glass-nav::before {
    background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.35) 0%,
      rgba(255, 255, 255, 0.18) 15%,
      transparent 50%
    );
  }
  
  .glass-nav::after {
    background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.5) 0%,
      transparent 70%
    );
  }
  
  /* Dark mode liquid filter buttons */
  .filter-btn {
    background: 
      linear-gradient(135deg, 
        rgba(28, 28, 30, 0.95) 0%,
        rgba(28, 28, 30, 0.85) 50%,
        rgba(28, 28, 30, 0.75) 100%
      );
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
      0 4px 20px rgba(10, 132, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 -1px 0 rgba(0, 0, 0, 0.3),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
  
  .filter-btn::before {
    background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.15) 15%,
      transparent 50%
    );
  }
  
  .filter-btn::after {
    background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 70%
    );
  }
  
  /* Dark mode liquid project badges */
  .project-badge {
    background: 
      linear-gradient(135deg, 
        rgba(28, 28, 30, 0.95) 0%,
        rgba(28, 28, 30, 0.85) 50%,
        rgba(28, 28, 30, 0.75) 100%
      );
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
      0 4px 20px rgba(10, 132, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 -1px 0 rgba(0, 0, 0, 0.3),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
  
  .project-badge::before {
    background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.15) 15%,
      transparent 50%
    );
  }
  
  .project-badge::after {
    background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 70%
    );
  }
  
  /* Dark mode liquid tech tags */
  .tech-tag {
    background: 
      linear-gradient(135deg, 
        rgba(28, 28, 30, 0.95) 0%,
        rgba(28, 28, 30, 0.85) 50%,
        rgba(28, 28, 30, 0.75) 100%
      );
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
      0 4px 20px rgba(10, 132, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 -1px 0 rgba(0, 0, 0, 0.3),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
  
  .tech-tag::before {
    background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.15) 15%,
      transparent 50%
    );
  }
  
  .tech-tag::after {
    background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 70%
    );
  }
  
  /* Dark mode liquid contact items */
  .contact-item {
    background: 
      linear-gradient(135deg, 
        rgba(28, 28, 30, 0.95) 0%,
        rgba(28, 28, 30, 0.85) 50%,
        rgba(28, 28, 30, 0.75) 100%
      );
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
      0 4px 20px rgba(10, 132, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 -1px 0 rgba(0, 0, 0, 0.3),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
  
  .contact-item::before {
    background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.15) 15%,
      transparent 50%
    );
  }
  
  .contact-item::after {
    background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 70%
    );
  }
  
  /* Dark mode liquid social links */
  .social-link {
    background: 
      linear-gradient(135deg, 
        rgba(28, 28, 30, 0.95) 0%,
        rgba(28, 28, 30, 0.85) 50%,
        rgba(28, 28, 30, 0.75) 100%
      );
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
      0 4px 20px rgba(10, 132, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 -1px 0 rgba(0, 0, 0, 0.3),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
  
  .social-link::before {
    background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.15) 15%,
      transparent 50%
    );
  }
  
  .social-link::after {
    background: radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 70%
    );
  }
  
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark; /* Force dark color scheme */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.47059;
  overflow-x: hidden;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  color-scheme: dark; /* Force dark color scheme */
}

/* === TYPOGRAPHY === */
/* Apple uses SF Pro Display for large text (20pt+) and SF Pro Text for smaller text */

h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
  line-height: 1.0714285714;
  letter-spacing: -0.005em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.009em;
  line-height: 1.0714285714;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.003em;
  line-height: 1.1666666667;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.001em;
  line-height: 1.2;
}

h5 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0em;
  line-height: 1.2222222222;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0em;
  line-height: 1.25;
}

p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  line-height: 1.47059;
  letter-spacing: -0.022em;
  font-weight: 400;
}

/* Large body text (SF Pro Display territory) */
.large-text {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  line-height: 1.381;
  letter-spacing: 0.007em;
}

/* Small text */
.small-text {
  font-size: 0.875rem;
  line-height: 1.42857;
  letter-spacing: -0.016em;
}

/* === LIQUID GLASS COMPONENTS === */
.glass-container,
.glass-card,
.glass-nav,
.glass-button {
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  border: 1px solid var(--glass-border);
  box-shadow: 
    var(--glass-shadow),
    inset 0 1px 0 0 var(--glass-highlight),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-base);
  position: relative;
}

.glass-container::before,
.glass-card::before,
.glass-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--glass-highlight) 50%, 
    transparent
  );
  opacity: 0.8;
}

.glass-card {
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
}

.glass-card h2 {
  margin-bottom: var(--spacing-lg);
}

/* More compact padding for modal glass-card */
.modal-content.glass-card {
  padding: var(--spacing-lg);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 20px 60px 0 rgba(31, 38, 135, 0.3),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
  -webkit-backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
}

.glass-button {
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  cursor: pointer;
  border: none;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
}

.glass-button:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.02);
  box-shadow: 
    0 8px 24px 0 rgba(0, 113, 227, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(50px) saturate(220%) brightness(1.2);
  -webkit-backdrop-filter: blur(50px) saturate(220%) brightness(1.2);
}

/* === HERO SECTION === */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  margin-top: -20px;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 113, 227, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 113, 227, 0.08) 0%, transparent 50%);
}

.glass-container {
  text-align: center;
  padding: var(--spacing-2xl);
  border-radius: var(--radius-xl);
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 
    0 20px 80px 0 rgba(31, 38, 135, 0.25),
    inset 0 2px 0 0 rgba(255, 255, 255, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #0a84ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.80rem;
}

.credential {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.003em;
  opacity: 0.9;
  line-height: 1.2;
}

.subtitle {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  font-weight: 500;
  line-height: 1.2105263158;
  letter-spacing: -0.003em;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: center;
  margin-top: var(--spacing-xl);
}

.tag {
  padding: var(--spacing-sm) var(--spacing-lg);
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.15) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 
    0 4px 20px rgba(0, 113, 227, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(31, 38, 135, 0.1);
  overflow: hidden;
}

/* Liquid drop highlight effect */
.tag::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.15) 15%,
    transparent 50%
  );
  opacity: 0.8;
  pointer-events: none;
}

/* Bottom shadow for depth */
.tag::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15) 0%,
    transparent 70%
  );
  filter: blur(3px);
  opacity: 0.6;
}

.tag:hover {
  background: 
    linear-gradient(135deg, 
      rgba(0, 113, 227, 0.95) 0%,
      rgba(10, 132, 255, 0.85) 50%,
      rgba(64, 156, 255, 0.75) 100%
    );
  color: white;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 8px 32px rgba(0, 113, 227, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 12px 48px rgba(31, 38, 135, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.tag:hover::before {
  opacity: 1;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.5) 15%,
    transparent 50%
  );
}

.tag:hover::after {
  height: 6px;
  opacity: 0.8;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 113, 227, 0.3) 0%,
    transparent 70%
  );
}

/* Subtle floating animation for liquid drop effect */
@keyframes liquidFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.01);
  }
}

.tag {
  animation: liquidFloat 4s ease-in-out infinite;
}

.tag:hover {
  animation-play-state: paused;
}

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

/* === NAVIGATION === */
.glass-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  margin: var(--spacing-md) auto;
  max-width: 800px;
  padding: var(--spacing-sm);
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-xs);
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.28) 0%,
      rgba(255, 255, 255, 0.2) 50%,
      rgba(255, 255, 255, 0.18) 100%
    );
  backdrop-filter: blur(60px) saturate(200%) brightness(1.12);
  -webkit-backdrop-filter: blur(60px) saturate(200%) brightness(1.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4px 24px rgba(0, 113, 227, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 8px 40px rgba(31, 38, 135, 0.12);
  overflow: hidden;
}

/* Liquid drop highlight effect for navbar */
.glass-nav::before {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.2) 15%,
    transparent 50%
  );
}

/* Bottom shadow for navbar depth */
.glass-nav::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 5%;
  right: 5%;
  height: 5px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.18) 0%,
    transparent 70%
  );
  filter: blur(4px);
  opacity: 0.7;
  z-index: -1;
}

.nav-item {
  padding: var(--spacing-sm) 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--primary);
  color: white;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
}

/* === SECTIONS === */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-2xl) var(--spacing-xl);
  overflow-x: hidden;
  width: 100%;
}

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

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-top: var(--spacing-sm);
}

/* === ABOUT SECTION === */
#about .glass-card {
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(circle at top right, rgba(0, 113, 227, 0.08), transparent 70%),
    var(--glass-bg);
}

#about .glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0071e3, #00d4ff);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 1;
}

#about .glass-card:hover::before {
  opacity: 1;
}

#about .glass-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 25px 80px 0 rgba(31, 38, 135, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
  -webkit-backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
}

#about .glass-card > * {
  position: relative;
  z-index: 2;
}

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

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

.stat-item {
  text-align: center;
  padding: var(--spacing-lg);
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.15) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 
    0 4px 20px rgba(0, 113, 227, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(31, 38, 135, 0.1);
  overflow: hidden;
}

/* Liquid drop highlight effect for stat items */
.stat-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.15) 15%,
    transparent 50%
  );
  opacity: 0.8;
  pointer-events: none;
}

/* Bottom shadow for depth */
.stat-item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15) 0%,
    transparent 70%
  );
  filter: blur(3px);
  opacity: 0.6;
}

.stat-item:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 8px 32px rgba(0, 113, 227, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 12px 48px rgba(31, 38, 135, 0.2);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
}

.stat-item:hover::before {
  opacity: 1;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.2) 15%,
    transparent 50%
  );
}

.stat-item:hover::after {
  height: 6px;
  opacity: 0.8;
}

/* Subtle floating animation for stat cards */
@keyframes statFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.stat-item {
  animation: statFloat 5s ease-in-out infinite;
}

.stat-item:nth-child(1) { animation-delay: 0s; }
.stat-item:nth-child(2) { animation-delay: 0.4s; }
.stat-item:nth-child(3) { animation-delay: 0.8s; }

.stat-item:hover {
  animation-play-state: paused;
}

.stat-number {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  position: relative;
  z-index: 1;
}

.stat-label {
  display: block;
  margin-top: var(--spacing-xs);
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

/* === PROJECTS SECTION === */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  max-width: 100%;
  width: 100%;
}

.filter-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.15) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 
    0 4px 20px rgba(0, 113, 227, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(31, 38, 135, 0.1);
  overflow: hidden;
}

/* Liquid drop highlight effect for filter buttons */
.filter-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.15) 15%,
    transparent 50%
  );
  opacity: 0.8;
  pointer-events: none;
}

/* Bottom shadow for filter button depth */
.filter-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15) 0%,
    transparent 70%
  );
  filter: blur(3px);
  opacity: 0.6;
}

.filter-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 
    0 6px 28px rgba(0, 113, 227, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 10px 40px rgba(31, 38, 135, 0.15);
}

.filter-btn:hover::before {
  opacity: 1;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.2) 15%,
    transparent 50%
  );
}

.filter-btn:hover::after {
  height: 5px;
  opacity: 0.7;
}

.filter-btn.active {
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 
    0 6px 28px rgba(0, 113, 227, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 10px 40px rgba(31, 38, 135, 0.25);
}

/* Category-specific filter button colors */
.filter-btn[data-filter="ml"].active {
  background: linear-gradient(135deg, #0071e3, #00b4d8);
  border-color: #0071e3;
}

.filter-btn[data-filter="dl"].active {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-color: #7c3aed;
}

.filter-btn[data-filter="cv"].active {
  background: linear-gradient(135deg, #059669, #34d399);
  border-color: #059669;
}

.filter-btn[data-filter="nlp"].active {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  border-color: #f59e0b;
}

.filter-btn[data-filter="agents"].active {
  background: linear-gradient(135deg, #ff4500, #ff6347);
  border-color: #ff4500;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  width: 100%;
  max-width: 100%;
  min-height: 200px;
  visibility: visible;
  box-sizing: border-box;
}

/* Prevent grid blowout on any screen size */
.projects-grid > * {
  min-width: 0;
  max-width: 100%;
}

.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex !important;
  flex-direction: column;
  opacity: 1 !important;
  transform: scale(1) !important;
  visibility: visible !important;
  position: relative;
  overflow: hidden;
  box-shadow: 
    var(--glass-shadow),
    inset 0 1px 0 0 var(--glass-highlight),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  min-height: 250px;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #0a84ff);
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.project-card.hidden {
  opacity: 0;
  transform: scale(0.9);
  display: none !important;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 25px 80px 0 rgba(31, 38, 135, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
  -webkit-backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
}

/* Machine Learning Theme - Blue/Cyan */
.project-card[data-category="ml"] {
  background: 
    radial-gradient(circle at top right, rgba(0, 113, 227, 0.08), transparent 70%),
    var(--glass-bg);
}

.project-card[data-category="ml"]::before {
  background: linear-gradient(90deg, #0071e3, #00d4ff);
}

.project-card[data-category="ml"] .project-badge {
  background: linear-gradient(135deg, #0071e3, #00b4d8);
}

/* Deep Learning Theme - Purple/Violet */
.project-card[data-category="dl"] {
  background: 
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.08), transparent 70%),
    var(--glass-bg);
}

.project-card[data-category="dl"]::before {
  background: linear-gradient(90deg, #7c3aed, #c084fc);
}

.project-card[data-category="dl"] .project-badge {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

/* Computer Vision Theme - Green/Emerald */
.project-card[data-category="cv"] {
  background: 
    radial-gradient(circle at top right, rgba(5, 150, 105, 0.08), transparent 70%),
    var(--glass-bg);
}

.project-card[data-category="cv"]::before {
  background: linear-gradient(90deg, #059669, #10b981);
}

.project-card[data-category="cv"] .project-badge {
  background: linear-gradient(135deg, #059669, #34d399);
}

/* NLP Theme - Orange/Amber */
.project-card[data-category="nlp"] {
  background: 
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.08), transparent 70%),
    var(--glass-bg);
}

.project-card[data-category="nlp"]::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.project-card[data-category="nlp"] .project-badge {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

/* AI Agents Theme - OrangeRed */
.project-card[data-category="agents"] {
  background: 
    radial-gradient(circle at top right, rgba(255, 69, 0, 0.08), transparent 70%),
    var(--glass-bg);
}

.project-card[data-category="agents"]::before {
  background: linear-gradient(90deg, #ff4500, #ff6347);
}

.project-card[data-category="agents"] .project-badge {
  background: linear-gradient(135deg, #ff4500, #ff6347);
}

.card-header {
  margin-bottom: var(--spacing-md);
}

.project-badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.15) 100%
    );
  color: white;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 
    0 4px 20px rgba(0, 113, 227, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(31, 38, 135, 0.1);
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Liquid drop highlight effect for project badge */
.project-badge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.15) 15%,
    transparent 50%
  );
  opacity: 0.8;
  pointer-events: none;
}

/* Bottom shadow for project badge depth */
.project-badge::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15) 0%,
    transparent 70%
  );
  filter: blur(3px);
  opacity: 0.6;
}

.card-header h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

.card-content {
  flex: 1;
}

.card-content p {
  margin-bottom: var(--spacing-md);
  font-size: 1rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-lg);
  margin-top: var(--spacing-sm);
}

/* More compact tech stack in modal */
.modal-content .tech-stack {
  margin-bottom: var(--spacing-sm);
  margin-top: var(--spacing-xs);
}

.tech-tag {
  padding: 4px 12px;
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.15) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--text-primary);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 
    0 4px 20px rgba(0, 113, 227, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(31, 38, 135, 0.1);
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

/* Liquid drop highlight effect for tech tags */
.tech-tag::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.15) 15%,
    transparent 50%
  );
  opacity: 0.8;
  pointer-events: none;
}

/* Bottom shadow for tech tag depth */
.tech-tag::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15) 0%,
    transparent 70%
  );
  filter: blur(3px);
  opacity: 0.6;
}

.tech-tag:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 
    0 6px 28px rgba(0, 113, 227, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 10px 40px rgba(31, 38, 135, 0.15);
}

.tech-tag:hover::before {
  opacity: 1;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.2) 15%,
    transparent 50%
  );
}

.tech-tag:hover::after {
  height: 5px;
  opacity: 0.7;
}

.card-actions {
  margin-top: auto;
  padding-top: var(--spacing-md);
}

/* === EXPERIENCE SECTION === */
.timeline {
  position: relative;
  padding-left: var(--spacing-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-2xl);
}

.timeline-marker {
  position: absolute;
  left: -41px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--background);
  box-shadow: 0 0 0 4px var(--primary);
}

.timeline-content {
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #0a84ff);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 1;
}

.timeline-content:hover::before {
  opacity: 1;
}

.timeline-content:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 25px 80px 0 rgba(31, 38, 135, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
  -webkit-backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
}

.timeline-content > * {
  position: relative;
  z-index: 2;
}

/* OrangeRed Theme - Vesnay */
.timeline-item:nth-child(1) .timeline-content {
  background: 
    radial-gradient(circle at top right, rgba(255, 69, 0, 0.08), transparent 70%),
    var(--glass-bg);
}

.timeline-item:nth-child(1) .timeline-content::before {
  background: linear-gradient(90deg, #ff4500, #ff6347);
}

.timeline-item:nth-child(1) .timeline-marker {
  background: #ff4500;
  box-shadow: 0 0 0 4px #ff4500;
}

/* Blue Theme - City of Rochester */
.timeline-item:nth-child(2) .timeline-content {
  background: 
    radial-gradient(circle at top right, rgba(0, 113, 227, 0.08), transparent 70%),
    var(--glass-bg);
}

.timeline-item:nth-child(2) .timeline-content::before {
  background: linear-gradient(90deg, #0071e3, #00d4ff);
}

.timeline-item:nth-child(2) .timeline-marker {
  background: #0071e3;
  box-shadow: 0 0 0 4px #0071e3;
}

/* Green Theme - OpenBrand */
.timeline-item:nth-child(3) .timeline-content {
  background: 
    radial-gradient(circle at top right, rgba(5, 150, 105, 0.08), transparent 70%),
    var(--glass-bg);
}

.timeline-item:nth-child(3) .timeline-content::before {
  background: linear-gradient(90deg, #059669, #10b981);
}

.timeline-item:nth-child(3) .timeline-marker {
  background: #059669;
  box-shadow: 0 0 0 4px #059669;
}

.timeline-content h3 {
  margin-bottom: var(--spacing-xs);
}

.company {
  display: block;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.duration {
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-md);
}

.timeline-content ul {
  list-style: none;
  padding-left: 0;
}

.timeline-content li {
  padding-left: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  position: relative;
  color: var(--text-secondary);
}

.timeline-content li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* === SKILLS SECTION === */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.skill-category {
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: 
    var(--glass-shadow),
    inset 0 1px 0 0 var(--glass-highlight),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #0a84ff);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.skill-category:hover::before {
  opacity: 1;
}

.skill-category:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 25px 80px 0 rgba(31, 38, 135, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
  -webkit-backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
}

/* Red Theme - Programming & Data Science */
.skill-category:nth-child(1) {
  background: 
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.08), transparent 70%),
    var(--glass-bg);
}

.skill-category:nth-child(1)::before {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Blue Theme - Machine Learning & AI */
.skill-category:nth-child(2) {
  background: 
    radial-gradient(circle at top right, rgba(0, 113, 227, 0.08), transparent 70%),
    var(--glass-bg);
}

.skill-category:nth-child(2)::before {
  background: linear-gradient(90deg, #0071e3, #00d4ff);
}

/* Green Theme - Tools & Platforms */
.skill-category:nth-child(3) {
  background: 
    radial-gradient(circle at top right, rgba(5, 150, 105, 0.08), transparent 70%),
    var(--glass-bg);
}

.skill-category:nth-child(3)::before {
  background: linear-gradient(90deg, #059669, #10b981);
}

.skill-category h3 {
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
}

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

.skill-name {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--text-primary);
}

.skill-bar {
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-level {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #0a84ff);
  border-radius: 4px;
  transition: width 1s ease;
  width: 0;
}

.skill-item:hover .skill-level {
  filter: brightness(1.2);
}

/* === CONTACT SECTION === */
.contact-card {
  max-width: 800px;
  margin: 0 auto;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(circle at top right, rgba(0, 113, 227, 0.08), transparent 70%),
    var(--glass-bg);
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0071e3, #00d4ff);
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.contact-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 25px 80px 0 rgba(31, 38, 135, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
  -webkit-backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
}

.contact-card h2 {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
  z-index: 2;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  position: relative;
  z-index: 2;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  min-width: 0;
  align-self: start;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.15) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 
    0 4px 20px rgba(0, 113, 227, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(31, 38, 135, 0.1);
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
}

/* Liquid drop highlight effect for contact items */
.contact-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.15) 15%,
    transparent 50%
  );
  opacity: 0.8;
  pointer-events: none;
}

/* Bottom shadow for contact item depth */
.contact-item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15) 0%,
    transparent 70%
  );
  filter: blur(3px);
  opacity: 0.6;
}

.contact-item:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 
    0 6px 28px rgba(0, 113, 227, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 10px 40px rgba(31, 38, 135, 0.15);
  cursor: pointer;
}

.contact-item:hover::before {
  opacity: 1;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.2) 15%,
    transparent 50%
  );
}

.contact-item:hover::after {
  height: 5px;
  opacity: 0.7;
}

.contact-item .icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

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

.social-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  min-width: 0;
  align-self: start;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.15) 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 
    0 4px 20px rgba(0, 113, 227, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(31, 38, 135, 0.1);
  overflow: hidden;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
}

/* Liquid drop highlight effect for social links */
.social-link::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.15) 15%,
    transparent 50%
  );
  opacity: 0.8;
  pointer-events: none;
}

/* Bottom shadow for social link depth */
.social-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.15) 0%,
    transparent 70%
  );
  filter: blur(3px);
  opacity: 0.6;
}

.social-link:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 
    0 6px 28px rgba(0, 113, 227, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 10px 40px rgba(31, 38, 135, 0.15);
}

.social-link:hover::before {
  opacity: 1;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.2) 15%,
    transparent 50%
  );
}

.social-link:hover::after {
  height: 5px;
  opacity: 0.7;
}

.social-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--primary);
  transition: color var(--transition-fast);
}

/* === MANUSCRIPTS SECTION === */
.manuscripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.manuscript-card {
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 520px;
  box-shadow: 
    var(--glass-shadow),
    inset 0 1px 0 0 var(--glass-highlight),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

.manuscript-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #0a84ff);
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.manuscript-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 25px 80px 0 rgba(31, 38, 135, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
  -webkit-backdrop-filter: blur(50px) saturate(220%) brightness(1.15);
}

/* Red Theme - Card 1 */
.manuscript-card:nth-child(1) {
  background: 
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.08), transparent 70%),
    var(--glass-bg);
}

.manuscript-card:nth-child(1)::before {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Blue Theme - Card 2 */
.manuscript-card:nth-child(2) {
  background: 
    radial-gradient(circle at top right, rgba(0, 113, 227, 0.08), transparent 70%),
    var(--glass-bg);
}

.manuscript-card:nth-child(2)::before {
  background: linear-gradient(90deg, #0071e3, #00d4ff);
}

/* Green Theme - Card 3 */
.manuscript-card:nth-child(3) {
  background: 
    radial-gradient(circle at top right, rgba(5, 150, 105, 0.08), transparent 70%),
    var(--glass-bg);
}

.manuscript-card:nth-child(3)::before {
  background: linear-gradient(90deg, #059669, #10b981);
}

.manuscript-header {
  margin-bottom: var(--spacing-md);
}

.manuscript-header h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.manuscript-meta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.manuscript-authors {
  font-weight: 500;
  color: var(--text-primary);
}

.manuscript-venue {
  font-style: italic;
}

.manuscript-abstract {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.manuscript-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
}

.manuscript-year {
  font-weight: 600;
  color: var(--primary);
}

.manuscript-type {
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgba(0, 113, 227, 0.1);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === MANUSCRIPT PDF MODAL === */
.manuscript-pdf-modal {
  max-width: 100vw;
  width: 100vw;
  max-height: 95vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* === RESUME PDF MODAL === */
.resume-pdf-modal {
  max-width: 80vw;
  width: 80vw;
  max-height: 98vh;
  height: 98vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.manuscript-modal-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
}

.manuscript-modal-header h2 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.manuscript-modal-header p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

.pdf-container {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  background: #f5f5f5;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) rgba(0, 0, 0, 0.1);
}

.pdf-container::-webkit-scrollbar {
  width: 8px;
}

.pdf-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.pdf-container::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.pdf-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

.pdf-container iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 70vh;
  border: none;
  display: block;
}

/* === FOOTER === */
.footer {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-xl);
  margin-top: var(--spacing-2xl);
  border-top: 1px solid var(--border);
}

.footer-content p {
  margin: var(--spacing-xs) 0;
  font-size: 0.875rem;
}

/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.modal-content {
  position: relative;
  max-width: 1400px;
  width: 95vw;
  max-height: 95vh;
  overflow-y: auto;
  z-index: 1;
  animation: modalSlideUp 0.3s ease;
  backdrop-filter: blur(60px) saturate(220%) brightness(1.15);
  -webkit-backdrop-filter: blur(60px) saturate(220%) brightness(1.15);
  box-shadow: 
    0 30px 100px 0 rgba(0, 0, 0, 0.5),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Hide scrollbar but keep functionality */
.modal-content {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.modal-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Modal header layout */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-lg);
  gap: var(--spacing-lg);
}

.modal-title-section {
  flex: 1;
  min-width: 0; /* Allow text to wrap */
}

.modal-action-buttons {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-sm);
  flex-shrink: 0;
  align-items: center;
  margin-right: 60px; /* Provide space for close button */
}

.modal-action-btn {
  background: var(--primary) !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
  transition: all var(--transition-base) !important;
  padding: var(--spacing-sm) var(--spacing-md) !important;
  font-size: 0.875rem !important;
  white-space: nowrap;
}

.modal-action-btn:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 
    0 8px 24px 0 rgba(0, 113, 227, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.3) !important;
}

/* Modal content spacing improvements - more compact */
.modal-content h2 {
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal-content h3 {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-content h3:first-of-type {
  margin-top: var(--spacing-md);
}

.modal-content p {
  margin-bottom: var(--spacing-sm);
  line-height: 1.5;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Modal stats grid - more compact for Key Metrics */
.modal-content .stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.modal-content .stat-item {
  padding: var(--spacing-sm);
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-content .stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  word-wrap: break-word;
  hyphens: auto;
}

.modal-content .stat-label {
  font-size: 0.75rem;
  margin-top: var(--spacing-xs);
  line-height: 1.3;
  word-wrap: break-word;
  hyphens: auto;
}

/* Modal project badge spacing */
.modal-content .project-badge {
  margin-bottom: var(--spacing-lg);
  margin-top: 0;
}

/* Modal action buttons spacing */
.modal-content .glass-button {
  margin-top: 0;
  margin-bottom: 0;
}


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

/* Copy notification animations */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.close-button {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  z-index: 100;
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
}

.close-button:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg);
}

.download-button {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: var(--text-primary) !important;
  z-index: 100;
  text-decoration: none;
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
}

.download-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.download-button:hover {
  background: var(--primary);
  color: white !important;
  transform: scale(1.05);
}

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

/* Only animate on desktop */
@media (min-width: 769px) {
  .section {
    animation: fadeInUp 0.6s ease;
  }
}

/* Ensure sections are visible on mobile */
@media (max-width: 768px) {
  .section {
    animation: none !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* === RESPONSIVE DESIGN === */

/* Tablets */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .skills-container {
    grid-template-columns: 1fr;
  }
}

/* iPhone and Mobile Devices */
@media (max-width: 834px) {
  #projects {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Fix section padding to prevent card overflow */
  #projects.section {
    padding: var(--spacing-2xl) var(--spacing-md);
    overflow-x: hidden;
  }
  
  .projects-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--spacing-md);
    display: grid !important;
    visibility: visible !important;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  
  .projects-grid > * {
    min-width: 0;
    max-width: 100%;
  }
  
  .project-card {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }
  
  /* Ensure card content doesn't overflow */
  .project-card .tech-stack {
    width: 100%;
    box-sizing: border-box;
  }
  
  .project-card .card-content {
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  
  .filter-bar {
    gap: var(--spacing-xs);
    display: flex !important;
    visibility: visible !important;
  }
  
  .filter-btn {
    font-size: 0.9rem;
    padding: var(--spacing-xs) var(--spacing-md);
    display: inline-flex !important;
    visibility: visible !important;
  }
  
  /* Fix contact grid for tablets and medium screens */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  /* Add extra padding to contact section on tablets */
  #contact.section {
    padding-bottom: calc(var(--spacing-2xl) + var(--spacing-lg));
  }
  
  /* Fix footer padding for small screens */
  .footer {
    padding: var(--spacing-xl) var(--spacing-md);
  }
}

/* Mobile */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .glass-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-left: var(--spacing-md);
    margin-right: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    width: calc(100% - var(--spacing-md) * 2);
    max-width: none;
  }
  
  .nav-item {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.875rem;
    flex: 0 0 auto;
  }
  
  /* Fix Projects section padding */
  #projects.section {
    padding: var(--spacing-2xl) var(--spacing-md);
    overflow-x: hidden;
  }
  
  .projects-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--spacing-md);
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  
  .projects-grid > * {
    min-width: 0;
    max-width: 100%;
  }
  
  .project-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }
  
  /* Ensure card content doesn't overflow */
  .project-card .tech-stack {
    width: 100%;
    box-sizing: border-box;
  }
  
  .project-card .card-content {
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline {
    padding-left: var(--spacing-lg);
  }
  
  .timeline-marker {
    left: -28px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  /* Add extra padding to contact section on mobile to prevent cutoff */
  #contact.section {
    padding-bottom: calc(var(--spacing-2xl) + var(--spacing-xl));
  }
  
  /* Ensure social links have enough bottom margin */
  .social-links {
    margin-bottom: var(--spacing-lg);
  }
  
  .filter-bar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
  }
  
  .filter-btn {
    flex: 0 0 auto;
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.875rem;
  }
  
  /* Manuscripts mobile */
  .manuscripts-grid {
    grid-template-columns: 1fr;
  }
  
  /* Fix footer padding for mobile */
  .footer {
    padding: var(--spacing-xl) var(--spacing-md);
  }
  
  /* Modal mobile adjustments */
  .modal {
    padding: var(--spacing-sm);
  }
  
  .modal-content {
    width: 95vw;
    max-width: 95vw;
    max-height: 95vh;
  }
  
  /* Modal header mobile adjustments */
  .modal-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-md);
  }
  
  .modal-action-buttons {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-right: 0; /* Reset margin on mobile since layout is stacked */
  }
  
  .modal-action-btn {
    flex: 1;
    min-width: 140px;
    text-align: center;
    font-size: 0.8rem !important;
    padding: var(--spacing-xs) var(--spacing-sm) !important;
  }
  
  .modal-content .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  
  .modal-content .stat-item {
    min-height: 100px;
    padding: var(--spacing-sm);
  }
  
  .modal-content .stat-number {
    font-size: 1.25rem;
  }
  
  .modal-content .stat-label {
    font-size: 0.75rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .section {
    padding: var(--spacing-lg) var(--spacing-sm);
  }
  
  /* Override for Projects section specifically */
  #projects.section {
    padding: var(--spacing-lg) var(--spacing-sm);
    overflow-x: hidden;
  }
  
  /* Add extra padding to contact section on very small screens */
  #contact.section {
    padding: var(--spacing-lg) var(--spacing-sm);
    padding-bottom: calc(var(--spacing-xl) + var(--spacing-lg));
  }
  
  /* Navbar width and spacing for very small screens */
  .glass-nav {
    margin-left: var(--spacing-md);
    margin-right: var(--spacing-md);
    width: calc(100% - var(--spacing-md) * 2);
    max-width: none;
  }
  
  .glass-card {
    padding: var(--spacing-md);
  }
  
  .hero {
    min-height: calc(100vh - 120px);
    padding: var(--spacing-md);
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
  }
  
  .glass-container {
    padding: var(--spacing-md);
    margin-left: auto;
    margin-right: auto;
  }
  
  .tag-cloud {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .tag {
    text-align: center;
  }
  
  /* Ensure projects grid works on very small screens */
  .projects-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--spacing-sm);
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  
  .projects-grid > * {
    min-width: 0;
    max-width: 100%;
  }
  
  .project-card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }
  
  /* Ensure card content doesn't overflow */
  .project-card .tech-stack {
    width: 100%;
    box-sizing: border-box;
  }
  
  .project-card .card-content {
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  
  /* Make filter buttons more compact on very small screens */
  .filter-btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.8rem;
  }
  
  /* Fix footer padding for very small screens */
  .footer {
    padding: var(--spacing-lg) var(--spacing-sm);
  }
}

/* High-DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .glass-container,
  .glass-card,
  .glass-nav,
  .project-card {
    backdrop-filter: blur(60px) saturate(240%) brightness(1.12);
    -webkit-backdrop-filter: blur(60px) saturate(240%) brightness(1.12);
  }
  
  .glass-container:hover,
  .glass-card:hover,
  .project-card:hover {
    backdrop-filter: blur(80px) saturate(260%) brightness(1.18);
    -webkit-backdrop-filter: blur(80px) saturate(260%) brightness(1.18);
  }
}

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

