/* ================================
   CSS Custom Properties (Variables)
   Andy Yen Portfolio - Cool Tones Theme
   ================================ */

:root {
  /* ============================================
     COLOR PALETTE - Light Mode (Override Theme)
     ============================================ */

  /* Backgrounds */
  --color-bg-primary: #FAFBFC;
  --color-bg-secondary: #F4F6F8;
  --color-bg-tertiary: #E8ECF0;
  --color-bg-overlay: rgba(250, 251, 252, 0.95);

  /* Text Colors - Enhanced contrast */
  --color-text-primary: #0F1A28;
  --color-text-secondary: #3A4556;
  --color-text-tertiary: #5F6B7A;
  --color-text-inverse: #FAFBFC;

  /* Accent Colors - Cool Tones */
  --color-accent-primary: #2C5F8D;      /* Deep cool blue */
  --color-accent-secondary: #4C6B8A;    /* Muted blue */
  --color-accent-tertiary: #6B8BA3;     /* Light blue */
  --color-accent-teal: #2D9D94;         /* Deep teal */
  --color-accent-purple: #5B4DBB;       /* Deep purple */

  /* UI Elements */
  --color-border: #E2E8F0;
  --color-border-hover: #CBD5E0;
  --color-shadow: rgba(26, 35, 50, 0.1);
  --color-shadow-lg: rgba(26, 35, 50, 0.15);

  /* States */
  --color-success: #38A169;
  --color-error: #E53E3E;
  --color-warning: #DD6B20;
  --color-info: #3182CE;
}

[data-theme="dark"] {
  /* ============================================
     COLOR PALETTE - Dark Mode (Default)
     ============================================ */

  /* Backgrounds */
  --color-bg-primary: #0F1419;
  --color-bg-secondary: #1A1F28;
  --color-bg-tertiary: #242B35;
  --color-bg-overlay: rgba(15, 20, 25, 0.95);

  /* Text Colors - Enhanced contrast for better readability */
  --color-text-primary: #F0F4F8;
  --color-text-secondary: #C5CCD6;
  --color-text-tertiary: #94A0B0;
  --color-text-inverse: #1A2332;

  /* Accent Colors - Cool Tones */
  --color-accent-primary: #5B9FD7;      /* Cool sky blue */
  --color-accent-secondary: #7CB8E8;    /* Sky blue */
  --color-accent-tertiary: #A3D1F5;     /* Light blue */
  --color-accent-teal: #4ECDC4;         /* Vibrant teal */
  --color-accent-purple: #7B68EE;       /* Medium slate blue */

  /* UI Elements */
  --color-border: #2C3540;
  --color-border-hover: #3D4654;
  --color-shadow: rgba(0, 0, 0, 0.4);
  --color-shadow-lg: rgba(0, 0, 0, 0.6);

  /* States */
  --color-success: #48BB78;
  --color-error: #FC8181;
  --color-warning: #F6AD55;
  --color-info: #63B3ED;
}

/* ============================================
   GRADIENTS - Cool Tones
   ============================================ */

:root,
[data-theme="dark"] {
  /* Primary Gradients */
  --gradient-cool-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-cool-2: linear-gradient(135deg, #2E3192 0%, #1BFFFF 100%);
  --gradient-cool-3: linear-gradient(135deg, #4A5568 0%, #2C5F8D 100%);
  --gradient-hero: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e8ba3 100%);

  /* Overlay Gradients */
  --gradient-overlay-light: linear-gradient(135deg,
    rgba(91, 159, 215, 0.1) 0%,
    rgba(78, 205, 196, 0.1) 100%
  );
  --gradient-overlay-strong: linear-gradient(135deg,
    rgba(91, 159, 215, 0.2) 0%,
    rgba(78, 205, 196, 0.2) 100%
  );

  /* Divider Gradient */
  --gradient-divider: linear-gradient(90deg,
    transparent 0%,
    var(--color-accent-primary) 50%,
    transparent 100%
  );
}

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

:root {
  /* Font Families */
  --font-family-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;

  /* Font Sizes - Type Scale (1.25 ratio) */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.25rem;      /* 20px */
  --font-size-xl: 1.563rem;     /* 25px */
  --font-size-2xl: 1.953rem;    /* 31px */
  --font-size-3xl: 2.441rem;    /* 39px */
  --font-size-4xl: 3.052rem;    /* 49px */
  --font-size-5xl: 3.815rem;    /* 61px */
  --font-size-6xl: 4.768rem;    /* 76px */

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;
  --line-height-loose: 2;

  /* Letter Spacing */
  --letter-spacing-tighter: -0.05em;
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.05em;
  --letter-spacing-wider: 0.1em;
}

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

:root {
  --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 */
}

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

:root {
  /* Breakpoints */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* Container Max Widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;

  /* Z-Index Layers */
  --z-index-base: 1;
  --z-index-dropdown: 10;
  --z-index-sticky: 20;
  --z-index-overlay: 30;
  --z-index-modal: 40;
  --z-index-popover: 50;
  --z-index-toast: 60;
}

/* ============================================
   BORDER RADIUS
   ============================================ */

:root {
  --radius-sm: 0.125rem;    /* 2px */
  --radius-base: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;    /* 6px */
  --radius-lg: 0.5rem;      /* 8px */
  --radius-xl: 0.75rem;     /* 12px */
  --radius-2xl: 1rem;       /* 16px */
  --radius-full: 9999px;
}

/* ============================================
   SHADOWS
   ============================================ */

:root {
  --shadow-sm: 0 1px 2px 0 var(--color-shadow);
  --shadow-base: 0 1px 3px 0 var(--color-shadow),
                 0 1px 2px 0 var(--color-shadow);
  --shadow-md: 0 4px 6px -1px var(--color-shadow),
               0 2px 4px -1px var(--color-shadow);
  --shadow-lg: 0 10px 15px -3px var(--color-shadow),
               0 4px 6px -2px var(--color-shadow);
  --shadow-xl: 0 20px 25px -5px var(--color-shadow),
               0 10px 10px -5px var(--color-shadow);
  --shadow-2xl: 0 25px 50px -12px var(--color-shadow);
}

/* ============================================
   TRANSITIONS & ANIMATIONS
   ============================================ */

:root {
  /* Durations */
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;

  /* Easing Functions */
  --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-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* Common Transitions */
  --transition-colors: color var(--duration-base) var(--ease-smooth),
                       background-color var(--duration-base) var(--ease-smooth),
                       border-color var(--duration-base) var(--ease-smooth);

  --transition-transform: transform var(--duration-base) var(--ease-smooth);

  --transition-all: all var(--duration-base) var(--ease-smooth);

  --transition-shadow: box-shadow var(--duration-base) var(--ease-smooth);
}
