/* ==========================================================================
   Theme System - The Technology Tribe
   Based on DEV Community design with custom purple accent (#6366F1)
   ========================================================================== */

/* Light Theme Variables */
:root {
  /* Colors - Light Theme */
  --color-bg: #FFFFFF;
  --color-surface: #F8FAFC;
  --color-surface-elevated: #F3F4F6;
  --color-text: #111827;
  --color-text-secondary: #4B5563;
  --color-border: #E5E7EB;
  --color-border-hover: #D1D5DB;
  
  /* Purple Primary Accent - Matching Logo */
  --color-primary: #6366F1;
  --color-primary-hover: #5458d9;
  --color-primary-focus: rgba(99, 102, 241, 0.5);
  --color-primary-light: rgba(99, 102, 241, 0.1);
  
  /* Semantic Colors */
  --color-success: #10B981;
  --color-success-light: rgba(16, 185, 129, 0.1);
  --color-warning: #F59E0B;
  --color-warning-light: rgba(245, 158, 11, 0.1);
  --color-danger: #EF4444;
  --color-danger-light: rgba(239, 68, 68, 0.1);
  --color-info: #0EA5E9;
  --color-info-light: rgba(14, 165, 233, 0.1);
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  
  /* Type Scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 2.25rem;   /* 36px */
  --text-4xl: 3rem;      /* 48px */
  
  /* Line Heights */
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Spacing Scale - 8px base unit */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  
  /* Border Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-base: 0.5rem;  /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 1px rgba(16, 24, 40, 0.06);
  --shadow-base: 0 4px 6px -1px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 6px 16px rgba(16, 24, 40, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(16, 24, 40, 0.1), 0 10px 10px -5px rgba(16, 24, 40, 0.04);
  
  /* Focus Ring */
  --focus-ring: 0 0 0 3px var(--color-primary-focus);
  
  /* Breakpoints (for reference in media queries) */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px; 
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  
  /* Layout */
  --container-max-width: 1200px;
  --header-height: 64px;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  /* Colors - Dark Theme */
  --color-bg: #0B0B0F;
  --color-surface: #111318;
  --color-surface-elevated: #151922;
  --color-text: #E5E7EB;
  --color-text-secondary: #A3A6AD;
  --color-border: #242834;
  --color-border-hover: #374151;
  
  /* Purple Primary Accent - Lighter in dark theme */
  --color-primary: #818CF8;
  --color-primary-hover: #A3B1FB;
  --color-primary-focus: rgba(129, 140, 248, 0.5);
  --color-primary-light: rgba(129, 140, 248, 0.1);
  
  /* Semantic Colors - Adjusted for dark theme */
  --color-success: #34D399;
  --color-success-light: rgba(52, 211, 153, 0.1);
  --color-warning: #FBBF24;
  --color-warning-light: rgba(251, 191, 36, 0.1);
  --color-danger: #F87171;
  --color-danger-light: rgba(248, 113, 113, 0.1);
  --color-info: #38BDF8;
  --color-info-light: rgba(56, 189, 248, 0.1);
  
  /* Dark theme shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 1px rgba(0, 0, 0, 0.2);
  --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Theme transition for smooth switching */
*,
*::before,
*::after {
  transition-property: background-color, border-color, color, fill, stroke, box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Disable transitions for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Circle Colors for Content Classification */
.circle-experts-guild {
  --circle-color: #6366F1;
  --circle-bg: rgba(99, 102, 241, 0.1);
}

.circle-open-circle {
  --circle-color: #10B981;
  --circle-bg: rgba(16, 185, 129, 0.1);
}

.circle-impact-lab {
  --circle-color: #F59E0B;
  --circle-bg: rgba(245, 158, 11, 0.1);
}