/**
 * CSS Custom Properties (Variables)
 * 
 * Unified design system for the Yogesh Wadadekar website.
 * This file defines all color, typography, spacing, and other design tokens.
 */

:root {
  /* ===========================
   * Color Palette - Light Mode
   * =========================== */
  
  /* Primary Colors - Deep Blue (Professional/Academic) */
  --color-primary: #1a365d;
  --color-primary-light: #2c5282;
  --color-primary-dark: #0f2744;
  --color-primary-rgb: 26, 54, 93;
  
  /* Secondary Colors */
  --color-secondary: #2d3748;
  --color-secondary-light: #4a5568;
  --color-secondary-dark: #1a202c;
  
  /* Accent Colors */
  --color-accent: #3182ce;
  --color-accent-light: #4299e1;
  --color-accent-dark: #2b6cb0;
  
  /* Semantic Colors */
  --color-success: #38a169;
  --color-success-light: #48bb78;
  --color-warning: #d69e2e;
  --color-warning-light: #ecc94b;
  --color-danger: #e53e3e;
  --color-danger-light: #fc8181;
  --color-info: #3182ce;
  
  /* Nature/Wildlife Theme Colors */
  --color-forest: #276749;
  --color-forest-light: #38a169;
  --color-earth: #744210;
  --color-earth-light: #975a16;
  
  /* Background Colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f7fafc;
  --color-bg-tertiary: #edf2f7;
  --color-bg-dark: #1a202c;
  
  /* Text Colors */
  --color-text-primary: #1a202c;
  --color-text-secondary: #4a5568;
  --color-text-muted: #718096;
  --color-text-light: #a0aec0;
  --color-text-inverse: #f7fafc;
  
  /* Border Colors */
  --color-border: #e2e8f0;
  --color-border-light: #edf2f7;
  --color-border-dark: #cbd5e0;
  
  /* Link Colors */
  --color-link: #2b6cb0;
  --color-link-hover: #1a4971;
  --color-link-visited: #553c9a;
  
  /* ===========================
   * Typography
   * =========================== */
  
  /* Font Families */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  
  /* Font Sizes - Using rem for accessibility */
  --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 Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
  
  /* Letter Spacing */
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  
  /* ===========================
   * Spacing
   * =========================== */
  
  --spacing-0: 0;
  --spacing-1: 0.25rem;   /* 4px */
  --spacing-2: 0.5rem;    /* 8px */
  --spacing-3: 0.75rem;   /* 12px */
  --spacing-4: 1rem;      /* 16px */
  --spacing-5: 1.25rem;   /* 20px */
  --spacing-6: 1.5rem;    /* 24px */
  --spacing-8: 2rem;      /* 32px */
  --spacing-10: 2.5rem;   /* 40px */
  --spacing-12: 3rem;     /* 48px */
  --spacing-16: 4rem;     /* 64px */
  --spacing-20: 5rem;     /* 80px */
  --spacing-24: 6rem;     /* 96px */
  
  /* ===========================
   * Border Radius
   * =========================== */
  
  --radius-none: 0;
  --radius-sm: 0.125rem;  /* 2px */
  --radius-default: 0.25rem;  /* 4px */
  --radius-md: 0.375rem;  /* 6px */
  --radius-lg: 0.5rem;    /* 8px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-2xl: 1rem;     /* 16px */
  --radius-3xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
  
  /* ===========================
   * Shadows
   * =========================== */
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  
  /* Colored Shadows */
  --shadow-primary: 0 4px 14px 0 rgba(var(--color-primary-rgb), 0.25);
  
  /* ===========================
   * Transitions
   * =========================== */
  
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-slower: 500ms ease;
  
  /* ===========================
   * Z-Index Scale
   * =========================== */
  
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* ===========================
   * Layout
   * =========================== */
  
  --container-max-width: 1200px;
  --container-padding: var(--spacing-4);
  --navbar-height: 64px;
  --sidebar-width: 280px;
  
  /* ===========================
   * Breakpoints (for reference)
   * =========================== */
  
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1400px;
}

/* ===========================
 * Dark Mode Variables
 * =========================== */

[data-bs-theme="dark"],
.dark-mode {
  --color-bg-primary: #1a202c;
  --color-bg-secondary: #2d3748;
  --color-bg-tertiary: #4a5568;
  --color-bg-dark: #0d1117;
  
  --color-text-primary: #f7fafc;
  --color-text-secondary: #e2e8f0;
  --color-text-muted: #a0aec0;
  --color-text-light: #718096;
  
  --color-border: #4a5568;
  --color-border-light: #2d3748;
  --color-border-dark: #718096;
  
  --color-link: #63b3ed;
  --color-link-hover: #90cdf4;
  --color-link-visited: #c3b6ff;
  
  --color-primary-light: #4299e1;
  --color-accent: #63b3ed;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}

/* Auto dark mode based on system preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-bs-theme="light"]) {
    --color-bg-primary: #1a202c;
    --color-bg-secondary: #2d3748;
    --color-bg-tertiary: #4a5568;
    --color-bg-dark: #0d1117;
    
    --color-text-primary: #f7fafc;
    --color-text-secondary: #e2e8f0;
    --color-text-muted: #a0aec0;
    --color-text-light: #718096;
    
    --color-border: #4a5568;
    --color-border-light: #2d3748;
    --color-border-dark: #718096;
    
    --color-link: #63b3ed;
    --color-link-hover: #90cdf4;
  }
}
