/* The AI Biographer - Theme & Design System */

:root {
  /* Brand Colors - Light Theme */
  --primary: #1E3A5F;      /* Deep navy for headers */
  --primary-dark: #162C4A;
  --primary-light: rgba(30, 58, 95, 0.1);
  
  --secondary: #4A90E2;    /* Soft blue - trustworthy */
  --secondary-dark: #357ABD;
  --secondary-light: #6BA3E5;
  
  --accent: #E74C3C;       /* Warm red - CTAs */
  --accent-dark: #C0392B;
  --accent-light: #EC7063;
  
  /* Warm accent colors for senior-friendly design */
  --accent-warm: #f59e0b;        /* Gold/amber for highlights */
  --accent-warm-light: rgba(245, 158, 11, 0.15);
  --accent-cream: #fef3c7;       /* Soft cream for subtle backgrounds */
  
  /* Neutral Colors - Light Theme */
  --background: #FEFDF8;         /* Warm white */
  --surface: #FFFFFF;            /* Pure white for cards */
  --surface-alt: #FAF8F3;        /* Soft beige for alternating sections */
  --surface-hover: #F5F3EE;
  
  --text: #2D3436;               /* Dark charcoal for body text */
  --text-light: #636E72;         /* Medium gray for secondary text */
  --text-lighter: #95A5A6;       /* Light gray for hints */
  --text-inverse: #FFFFFF;       /* White text on dark backgrounds */
  
  --border: #E5E7EB;             /* Soft gray borders */
  --border-light: #F3F4F6;
  --border-dark: #D1D5DB;
  
  /* Status Colors */
  --success: #27AE60;
  --success-light: rgba(46, 204, 113, 0.1);
  --success-dark: #229954;
  --warning: #F39C12;
  --warning-light: rgba(241, 196, 15, 0.1);
  --error: #E74C3C;
  --error-light: rgba(236, 112, 99, 0.1);
  --error-dark: #C0392B;
  --info: #3498DB;
  
  /* Typography */
  --font-headers: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Georgia', 'Times New Roman', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
  
  /* Font Sizes - Enhanced for senior readability */
  --text-xs: 0.875rem;    /* 14px - increased from 12px */
  --text-sm: 1rem;        /* 16px - increased from 14px */
  --text-base: 1.125rem;  /* 18px - increased from 16px */
  --text-lg: 1.25rem;     /* 20px - increased from 18px */
  --text-xl: 1.5rem;      /* 24px - increased from 20px */
  --text-2xl: 1.875rem;   /* 30px - increased from 24px */
  --text-3xl: 2.25rem;    /* 36px - increased from 30px */
  --text-4xl: 2.75rem;    /* 44px - increased from 36px */
  --text-5xl: 3.5rem;     /* 56px - increased from 48px */
  
  /* Spacing (8px grid) */
  --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 */
  
  /* Border Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-base: 0.375rem; /* 6px */
  --radius-lg: 0.5rem;    /* 8px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-full: 9999px;
  
  /* Shadows - Softer for light theme */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-base: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 32px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 120ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
  
  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-tooltip: 600;
  --z-notification: 700;
  
  /* Layout */
  --max-width-xs: 320px;
  --max-width-sm: 640px;
  --max-width-md: 768px;
  --max-width-lg: 1024px;
  --max-width-xl: 1280px;
  --max-width-2xl: 1536px;
  
  /* Section Colors (for visual distinction) */
  --section-early-years: #8B4513;     /* Warm brown */
  --section-education: #4169E1;       /* Royal blue */
  --section-coming-of-age: #9370DB;   /* Medium purple */
  --section-career: #2F4F4F;          /* Dark slate gray */
  --section-relationships: #DC143C;   /* Crimson */
  --section-family-life: #228B22;     /* Forest green */
  --section-challenges: #FF8C00;      /* Dark orange */
  --section-passions: #FFD700;        /* Gold */
  --section-wisdom: #4B0082;          /* Indigo */
  --section-legacy: #006400;          /* Dark green */
}

/* Dark Mode Variables - Disabled for now to force light theme */
/* Uncomment this section to enable automatic dark mode based on user preference */
/*
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0e1b;
    --surface: #141824;
    --surface-alt: #1a1f2e;
    --surface-hover: #1f2435;
    
    --text: #e0e0e0;
    --text-light: #b0b0b0;
    --text-lighter: #808080;
    --text-inverse: #000000;
    
    --border: #2a2f3e;
    --border-light: #1a1f2e;
    --border-dark: #3a3f4e;
    
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-base: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 10px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
  }
}
*/

/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;  /* Enhanced for senior readability */
  color: var(--text);
  background-color: var(--background);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headers);
  font-weight: 700;  /* Enhanced weight for better visibility */
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
}

/* Links */
a {
  color: var(--secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--secondary-dark);
  text-decoration: underline;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: var(--max-width-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}