/**
 * Design Tokens - Vivek Yarra Portfolio
 * ======================================
 * Single source of truth for all design values.
 * Based on UI Design Specification v1.0
 */

:root {
  /* ===========================================
     COLORS - Dark Mode Primary
     =========================================== */

  /* Background Hierarchy */
  --color-bg-primary: #0a0a0a;
  --color-bg-secondary: #111111;
  --color-bg-elevated: #161616;
  --color-bg-surface: #1a1a1a;
  --color-bg-hover: #222222;
  --color-bg-active: #2a2a2a;

  /* Text Hierarchy */
  --color-text-primary: #fafafa;
  --color-text-secondary: #a3a3a3;
  --color-text-tertiary: #737373;
  --color-text-muted: #525252;
  --color-text-inverse: #0a0a0a;

  /* Accent Colors - Blue */
  --color-accent-50: #eff6ff;
  --color-accent-100: #dbeafe;
  --color-accent-200: #bfdbfe;
  --color-accent-300: #93c5fd;
  --color-accent-400: #60a5fa;
  --color-accent-500: #3b82f6;
  --color-accent-600: #2563eb;
  --color-accent-700: #1d4ed8;
  --color-accent-800: #1e40af;
  --color-accent-900: #1e3a8a;

  /* Primary accent shortcuts */
  --color-accent: var(--color-accent-500);
  --color-accent-hover: var(--color-accent-600);
  --color-accent-light: var(--color-accent-400);
  --color-accent-glow: rgba(59, 130, 246, 0.25);

  /* Borders */
  --color-border-subtle: #1f1f1f;
  --color-border-default: #2a2a2a;
  --color-border-strong: #3a3a3a;
  --color-border-accent: var(--color-accent-500);

  /* Semantic Colors */
  --color-success: #22c55e;
  --color-success-bg: rgba(34, 197, 94, 0.1);
  --color-warning: #eab308;
  --color-warning-bg: rgba(234, 179, 8, 0.1);
  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.1);
  --color-info: var(--color-accent-500);
  --color-info-bg: rgba(59, 130, 246, 0.1);

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

  /* Font Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', monospace;

  /* Font Sizes - Fluid Typography (matched to yvivek.com) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);        /* 12-14px */
  --text-sm: clamp(0.875rem, 0.8rem + 0.4vw, 1rem);            /* 14-16px */
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);          /* 16-18px */
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);           /* 18-20px */
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);          /* 20-24px */
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);           /* 24-32px */
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);               /* 32-48px */
  --text-4xl: clamp(2.5rem, 1.75rem + 3.75vw, 4rem);           /* 40-64px */
  --text-5xl: clamp(3rem, 2rem + 5vw, 5rem);                   /* 48-80px */
  --text-6xl: clamp(3.5rem, 2.5rem + 5vw, 5.5rem);             /* 56-88px */
  --text-hero: clamp(3rem, 2rem + 5vw, 5rem);                  /* 48-80px */

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ===========================================
     SPACING
     =========================================== */

  --space-0: 0;
  --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 */

  /* Section Spacing - Fluid */
  --space-section: clamp(4rem, 8vw, 6rem);
  --space-section-lg: clamp(6rem, 12vw, 10rem);

  /* ===========================================
     LAYOUT
     =========================================== */

  --container-xs: 480px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-max: 1200px;

  --container-padding: clamp(1rem, 5vw, 2rem);

  /* Grid */
  --grid-cols: 12;
  --grid-gap: var(--space-6);

  /* ===========================================
     EFFECTS
     =========================================== */

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.35), 0 4px 6px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4), 0 8px 10px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--color-accent-glow);
  --shadow-glow-lg: 0 0 40px var(--color-accent-glow);

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* ===========================================
     TRANSITIONS
     =========================================== */

  --duration-instant: 0ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
  --duration-slowest: 1000ms;

  /* Easings */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Common Transitions */
  --transition-fast: var(--duration-fast) var(--ease-out);
  --transition-normal: var(--duration-normal) var(--ease-out);
  --transition-slow: var(--duration-slow) var(--ease-out);

  /* ===========================================
     Z-INDEX SCALE
     =========================================== */

  --z-behind: -1;
  --z-base: 0;
  --z-raised: 1;
  --z-dropdown: 10;
  --z-sticky: 100;
  --z-overlay: 500;
  --z-modal: 1000;
  --z-toast: 1100;
  --z-tooltip: 1200;

  /* ===========================================
     BREAKPOINTS (Reference - use in media queries)
     =========================================== */

  /*
   * Mobile S:    320px
   * Mobile L:    480px   --breakpoint-sm
   * Tablet:      768px   --breakpoint-md
   * Desktop:     1024px  --breakpoint-lg
   * Desktop L:   1200px  --breakpoint-xl
   * Desktop XL:  1440px  --breakpoint-2xl
   */
}

/* ===========================================
   REDUCED MOTION PREFERENCE
   =========================================== */

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
    --duration-slower: 0ms;
    --duration-slowest: 0ms;
  }
}
