/* ==========================================================================
   TIMY GONZÁLEZ | ENTERPRISE UX & AI LEADERSHIP PORTFOLIO
   Design System, CSS Variables & Foundations
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Palette: Modern Enterprise Tech & Creative Vibrancy */
  --bg-base: #07090e;
  --bg-surface-1: #0d121f;
  --bg-surface-2: #141b2d;
  --bg-surface-3: #1c263e;
  --bg-glass: rgba(13, 18, 31, 0.72);
  --bg-glass-strong: rgba(20, 27, 45, 0.85);

  /* Colorful Brand & Accent Gradients */
  --accent-cyan: #00d4ff;
  --accent-blue: #3b82f6;
  --accent-violet: #8b5cf6;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  /* Gradient Presets */
  --gradient-brand: linear-gradient(135deg, #00d4ff 0%, #3b82f6 50%, #8b5cf6 100%);
  --gradient-ai: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f59e0b 100%);
  --gradient-dark: linear-gradient(180deg, rgba(7, 9, 14, 0.2) 0%, rgba(7, 9, 14, 0.95) 100%);
  --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);

  /* Border & Glow Effects */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(0, 212, 255, 0.4);
  --glow-cyan: 0 0 35px rgba(0, 212, 255, 0.25);
  --glow-violet: 0 0 35px rgba(139, 92, 246, 0.25);

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #8ea3bf; /* WCAG AA compliant >= 5.1:1 contrast against #07090e */
  --text-inverse: #07090e;

  /* Spacing & Layout */
  --max-width: 1280px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Accessible Keyboard Skip Link (WCAG 2.4.1) */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 20px;
  background: #ffff00;
  color: #000000;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  z-index: 99999;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  transition: top 0.2s ease-in-out;
  border: 2px solid #000000;
}

.skip-to-content:focus {
  top: 20px;
  outline: 3px solid #ffff00;
  outline-offset: 3px;
}

/* Visible Keyboard Focus Indicators (WCAG 2.4.7) */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

/* Comprehensive Reduced Motion Support (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track {
    animation: none !important;
  }
  .animate-float {
    animation: none !important;
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  color-scheme: light dark;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 212, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 35%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Section Header Utility */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 32px auto;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-pill.ai-pill {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  color: #c084fc;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Gradient Text Effect */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-ai {
  background: var(--gradient-ai);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Button Component Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-smooth);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 212, 255, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-light);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-glow-ai {
  background: var(--gradient-ai);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}

.btn-glow-ai:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(236, 72, 153, 0.4);
}

/* Glassmorphism Card Surface */
.glass-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.glass-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-float {
  animation: floatAnim 6s ease-in-out infinite;
}

/* Scroll reveal utility (guarantees full content visibility) */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: none;
}
