/**
 * Apple-Inspired Design System
 * Modern design tokens for the portfolio website
 */

:root {
  /* ============================================
     COLOR PALETTE - LIGHT THEME
     ============================================ */
  --primary-purple: #6C5CE7;
  --background-light: #F5F5F7;
  --background-white: #FFFFFF;
  --text-primary: #1D1D1F;
  --text-secondary: #86868B;
  --accent-blue: #007AFF;
  --success-green: #30D158;
  --glass-overlay: rgba(255, 255, 255, 0.8);

  /* ============================================
     TYPOGRAPHY SYSTEM
     ============================================ */
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  
  /* Font Sizes with Line Heights */
  --text-xs: 12px;
  --text-xs-lh: 1.4;
  --text-sm: 14px;
  --text-sm-lh: 1.5;
  --text-base: 16px;
  --text-base-lh: 1.6;
  --text-lg: 18px;
  --text-lg-lh: 1.6;
  --text-xl: 20px;
  --text-xl-lh: 1.5;
  --text-2xl: 24px;
  --text-2xl-lh: 1.4;
  --text-3xl: 32px;
  --text-3xl-lh: 1.3;
  --text-4xl: 40px;
  --text-4xl-lh: 1.2;
  --text-5xl: 48px;
  --text-5xl-lh: 1.1;
  --text-6xl: 56px;
  --text-6xl-lh: 1.0;
  
  /* Font Weights */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* ============================================
     SPACING SYSTEM
     ============================================ */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ============================================
     BORDER RADIUS
     ============================================ */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 50px;
  --radius-full: 9999px;

  /* ============================================
     SHADOWS
     ============================================ */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.12);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.2);

  /* ============================================
     TRANSITIONS
     ============================================ */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.6s ease;
  --transition-cubic: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   DARK THEME
   ============================================ */
[data-theme="dark"] {
  --background-dark: #000000;
  --surface-dark: #1C1C1E;
  --text-primary-dark: #F5F5F7;
  --text-secondary-dark: #98989D;
  --primary-purple-dark: #7F7FFF;
  --glass-overlay-dark: rgba(28, 28, 30, 0.8);
}

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

/* Glass Card */
.glass-card {
  background: var(--glass-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Button System */
.btn-primary {
  background: var(--primary-purple);
  color: white;
  border: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-weight: var(--font-semibold);
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--text-base);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: color-mix(in srgb, var(--primary-purple) 90%, black);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-weight: var(--font-semibold);
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--text-base);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Impact Badges */
.impact-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.impact-badge.high-impact {
  background: rgba(48, 209, 88, 0.1);
  color: var(--success-green);
}

.impact-badge.ai-enhanced {
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary-purple);
}

.impact-badge.popular {
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent-blue);
}

.impact-badge.trending {
  background: rgba(255, 149, 0, 0.1);
  color: #FF9500;
}

/* Animation Classes */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Timeline Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Download Button Animation */
@keyframes downloadBounce {
  0%, 20%, 60%, 100% { 
    transform: translateY(0); 
  }
  40% { 
    transform: translateY(-3px); 
  }
  80% { 
    transform: translateY(-1px); 
  }
}

.download-btn:hover .download-icon {
  animation: downloadBounce 0.6s ease-in-out;
}

/* Service Card Enhancement */
.service-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Typography Utilities */
.text-xs { font-size: var(--text-xs); line-height: var(--text-xs-lh); }
.text-sm { font-size: var(--text-sm); line-height: var(--text-sm-lh); }
.text-base { font-size: var(--text-base); line-height: var(--text-base-lh); }
.text-lg { font-size: var(--text-lg); line-height: var(--text-lg-lh); }
.text-xl { font-size: var(--text-xl); line-height: var(--text-xl-lh); }
.text-2xl { font-size: var(--text-2xl); line-height: var(--text-2xl-lh); }
.text-3xl { font-size: var(--text-3xl); line-height: var(--text-3xl-lh); }
.text-4xl { font-size: var(--text-4xl); line-height: var(--text-4xl-lh); }
.text-5xl { font-size: var(--text-5xl); line-height: var(--text-5xl-lh); }
.text-6xl { font-size: var(--text-6xl); line-height: var(--text-6xl-lh); }
