/**
 * ==============================================================================
 * GERARDO PEDROZA — EXECUTIVE CV WEB DESIGN SYSTEM & STYLESHEET
 * ==============================================================================
 * Modern, Minimalist, Responsive & Accessible Design System.
 * Tailored for Executive / FinTech / Product Leadership portfolios.
 * ==============================================================================
 */

/* ==============================================================================
   1. DESIGN TOKENS & COLOR PALETTES (CSS CUSTOM PROPERTIES)
   ============================================================================== */
:root {
  /* Brand Primary & Accents (Executive Sky / Deep Slate) */
  --color-primary-50: #f0f9ff;
  --color-primary-100: #e0f2fe;
  --color-primary-200: #bae6fd;
  --color-primary-300: #7dd3fc;
  --color-primary-400: #38bdf8;
  --color-primary-500: #0ea5e9;
  --color-primary-600: #0284c7;
  --color-primary-700: #0369a1;
  --color-primary-800: #075985;
  --color-primary-900: #0c4a6e;
  --color-primary-950: #082f49;

  /* Metric & Outcome Accents (Emerald Green) */
  --color-success-50: #ecfdf5;
  --color-success-500: #10b981;
  --color-success-600: #059669;
  --color-success-700: #047857;

  /* Recruiter Mode & Highlight Accents (Amber Gold) */
  --color-amber-50: #fffbeb;
  --color-amber-400: #fbbf24;
  --color-amber-500: #f59e0b;
  --color-amber-600: #d97706;

  /* Neutrals (Light Mode Defaults) */
  --bg-app: #ffffff;
  --bg-surface: #f8fafc;
  --bg-surface-alt: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;

  /* 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);

  /* Typography Scale */
  --font-family-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-body: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Border Radii */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.25rem;  /* 20px */
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================================================================
   2. DARK THEME TOKENS
   ============================================================================== */
.dark {
  --bg-app: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-alt: #1e293b;
  --bg-card: #111a2e;
  --bg-card-hover: #17233d;
  --border-subtle: #1e293b;
  --border-strong: #334155;
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
}

/* ==============================================================================
   3. BASE & RESET STYLES
   ============================================================================== */
html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-family-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==============================================================================
   4. GLASSMORPHISM & BLUR SYSTEM
   ============================================================================== */
.glass-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dark .glass-nav {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
}

.dark .glass-card {
  background: rgba(17, 26, 46, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
}

/* ==============================================================================
   5. COMPONENT DESIGNS
   ============================================================================== */

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 0.875rem;
  color: #ffffff;
  background: linear-gradient(to right, var(--color-primary-600), #2563eb);
  box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.35);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(2, 132, 199, 0.45);
  background: linear-gradient(to right, var(--color-primary-700), #1d4ed8);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-secondary:hover {
  background: var(--bg-surface-alt);
  transform: translateY(-1px);
}

/* Badges */
.badge-sky {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--color-primary-100);
  color: var(--color-primary-900);
  border: 1px solid var(--color-primary-200);
}

.dark .badge-sky {
  background: rgba(8, 47, 73, 0.8);
  color: var(--color-primary-300);
  border: 1px solid var(--color-primary-800);
}

.badge-amber {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--color-amber-50);
  color: var(--color-amber-600);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.dark .badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-amber-400);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Timeline Cards */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-normal);
}

.timeline-card:hover {
  border-color: var(--color-primary-400);
  box-shadow: var(--shadow-md);
}

/* ==============================================================================
   6. ANIMATIONS & MICRO-INTERACTIONS
   ============================================================================== */
@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.15); }
}

.animate-pulse-subtle {
  animation: pulse-subtle 2.5s infinite ease-in-out;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==============================================================================
   7. PRINT OPTIMIZATIONS
   ============================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  header, #recruiter-modal, #project-modal, footer, .no-print {
    display: none !important;
  }
  section {
    padding: 1rem 0 !important;
    page-break-inside: avoid;
  }
}
