/* ==========================================================================
   HC ADVANCED SOLUTIONS - STYLESHEET (MINIMALIST & ELEGANT LUXURY TECH)
   - Dark Top Section by Default (Navbar, Status Bar, Hero Banner)
   - Image Slider with Cinematic Overlays
   - Minimalist & Elegant Executive CV Modal
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&display=swap');

:root {
  --color-primary-dark: #0B2D6B;
  --color-primary: #007BFF;
  --color-accent: #00C6FF;
  --color-cyan: #3abff0;
  --color-gray-text: #6B7280;
  --color-gray-light: #F4F7FB;
  --font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  
  /* Light Mode Tokens (Default for content sections) */
  --bg-main: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #0B2D6B;
  --text-body: #334155;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --shadow-card: 0 4px 20px -2px rgba(11, 45, 107, 0.05);
  --shadow-card-hover: 0 12px 30px -4px rgba(0, 123, 255, 0.12);
}

/* Dark Mode Tokens */
html.dark {
  --bg-main: #050f24;
  --bg-secondary: #081a3e;
  --bg-card: #0c1d3f;
  --text-main: #FFFFFF;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-card-hover: 0 16px 32px -4px rgba(0, 198, 255, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  background-color: var(--bg-main);
  color: var(--text-body);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #040b1b;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #007BFF, #3abff0);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3abff0;
}

/* Typography & Gradient Helpers */
.text-gradient {
  background: linear-gradient(135deg, #3abff0 0%, #007BFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-purple {
  background: linear-gradient(135deg, #a78bfa 0%, #3abff0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-emerald {
  background: linear-gradient(135deg, #34d399 0%, #3abff0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-orange {
  background: linear-gradient(135deg, #fb923c 0%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   ROTATING IMAGE HERO BANNER (SLIDER)
   ========================================================================== */
.hero-slider-wrapper {
  position: relative;
  width: 100%;
  min-height: 640px;
  overflow: hidden;
  background-color: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  box-shadow: 0 4px 20px -2px rgba(11, 45, 107, 0.05);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

html.dark .hero-slider-wrapper {
  background-color: #040b1b;
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
  box-shadow: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 10;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 7s ease-out;
}

.hero-slide.active .hero-slide-bg {
  transform: scale(1);
}

/* Luminous High-Contrast Overlay for Light Mode */
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    rgba(248, 250, 252, 0.97) 0%, 
    rgba(248, 250, 252, 0.90) 50%, 
    rgba(248, 250, 252, 0.72) 100%
  );
  transition: background 0.3s ease;
}

@media (max-width: 1024px) {
  .hero-slide-overlay {
    background: linear-gradient(180deg, 
      rgba(248, 250, 252, 0.98) 0%, 
      rgba(248, 250, 252, 0.92) 60%, 
      rgba(248, 250, 252, 0.85) 100%
    );
  }
}

/* Cinematic Dark Overlay for Dark Mode */
html.dark .hero-slide-overlay {
  background: linear-gradient(90deg, 
    rgba(4, 11, 27, 0.96) 0%, 
    rgba(4, 11, 27, 0.88) 45%, 
    rgba(4, 11, 27, 0.65) 100%
  );
}

@media (max-width: 1024px) {
  html.dark .hero-slide-overlay {
    background: linear-gradient(180deg, 
      rgba(4, 11, 27, 0.96) 0%, 
      rgba(4, 11, 27, 0.85) 60%, 
      rgba(4, 11, 27, 0.95) 100%
    );
  }
}

/* Slider Progress Bar */
.slide-progress-bar {
  height: 3px;
  background-color: rgba(15, 23, 42, 0.15);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  transition: background-color 0.3s ease;
}

html.dark .slide-progress-bar {
  background-color: rgba(255, 255, 255, 0.15);
}

.slide-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #007BFF, #3abff0);
  border-radius: 9999px;
  transition: width 0.05s linear;
}

/* Slider Navigation Buttons */
.slide-nav-btn {
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid #cbd5e1;
  color: #1e293b;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.slide-nav-btn:hover {
  transform: translateY(-2px);
  background-color: #ffffff;
  color: #007BFF;
  border-color: #94a3b8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

html.dark .slide-nav-btn {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  box-shadow: none;
}

html.dark .slide-nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #00C6FF;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Slider Dots */
.hero-dot {
  height: 8px;
  width: 8px;
  border-radius: 9999px;
  background-color: rgba(100, 116, 139, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark .hero-dot {
  background-color: rgba(255, 255, 255, 0.3);
}

.hero-dot.active {
  width: 32px !important;
  background-color: #007BFF !important;
}

html.dark .hero-dot.active {
  background-color: #00C6FF !important;
}

/* ==========================================================================
   MINIMALIST & ELEGANT CARDS & MICRO-INTERACTIONS
   ========================================================================== */
.card-minimal {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-card);
}
.card-minimal:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* Pulsing Status Dot */
.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10B981;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.status-dot::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: #10B981;
  border-radius: 50%;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Floating Glass Badges */
.glass-chip {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   THEME-AWARE HERO SLIDER COMPONENTS (LIGHT & DARK ADAPTIVE)
   ========================================================================== */
.hero-glass-chip {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}
html.dark .hero-glass-chip {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  box-shadow: none;
}

.hero-btn-secondary {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}
.hero-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
html.dark .hero-btn-secondary {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;
}
html.dark .hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.hero-card-panel {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #cbd5e1;
  box-shadow: 0 20px 35px -5px rgba(11, 45, 107, 0.08), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}
html.dark .hero-card-panel {
  background: rgba(15, 23, 42, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hero-card-inner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.25s ease;
}
html.dark .hero-card-inner {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(51, 65, 85, 0.6);
}

.hero-badge-blue {
  background: rgba(239, 246, 255, 0.95);
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}
html.dark .hero-badge-blue {
  background: rgba(8, 51, 68, 0.65);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #67e8f9;
}

.hero-badge-purple {
  background: rgba(250, 245, 255, 0.95);
  border: 1px solid #e9d5ff;
  color: #7e22ce;
}
html.dark .hero-badge-purple {
  background: rgba(59, 7, 100, 0.55);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
}

.hero-badge-emerald {
  background: rgba(236, 253, 245, 0.95);
  border: 1px solid #a7f3d0;
  color: #047857;
}
html.dark .hero-badge-emerald {
  background: rgba(6, 78, 59, 0.55);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.hero-badge-orange {
  background: rgba(255, 247, 237, 0.95);
  border: 1px solid #fed7aa;
  color: #c2410c;
}
html.dark .hero-badge-orange {
  background: rgba(124, 45, 18, 0.55);
  border: 1px solid rgba(251, 146, 60, 0.35);
  color: #fdba74;
}

/* ==========================================================================
   MINIMALIST EXECUTIVE CV MODAL & TIMELINE
   ========================================================================== */
.cv-timeline-item {
  position: relative;
  padding-left: 1.75rem;
}
.cv-timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3abff0;
  box-shadow: 0 0 10px rgba(58, 191, 240, 0.5);
}
.cv-timeline-item::after {
  content: '';
  position: absolute;
  left: 3.5px;
  top: 22px;
  bottom: -12px;
  width: 1px;
  background: #E2E8F0;
}
html.dark .cv-timeline-item::after {
  background: #1E293B;
}
.cv-timeline-item:last-child::after {
  display: none;
}

/* Sleek Minimal Progress Lines for Skills */
.skill-line {
  height: 3px;
  background-color: #F1F5F9;
  border-radius: 2px;
  overflow: hidden;
}
html.dark .skill-line {
  background-color: #1E293B;
}
.skill-line-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #007BFF, #3abff0);
  transition: width 1s ease-in-out;
}

/* Ultra-Modern Tech Grid & Ambient Aura for Hero */
.hero-slide-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(11, 45, 107, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 45, 107, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 50%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 50%, transparent 95%);
  pointer-events: none;
  z-index: 2;
  transition: all 0.3s ease;
}

html.dark .hero-slide-grid {
  background-image: 
    linear-gradient(to right, rgba(0, 198, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 198, 255, 0.06) 1px, transparent 1px);
}

.hero-slide-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: 
    radial-gradient(circle 600px at 15% 25%, rgba(0, 123, 255, 0.09), transparent 70%),
    radial-gradient(circle 500px at 85% 65%, rgba(0, 198, 255, 0.07), transparent 70%);
  transition: background 0.4s ease;
}

html.dark .hero-slide-glow {
  background: 
    radial-gradient(circle 700px at 18% 28%, rgba(0, 123, 255, 0.22), transparent 75%),
    radial-gradient(circle 550px at 82% 62%, rgba(0, 198, 255, 0.15), transparent 70%),
    radial-gradient(circle 450px at 50% 15%, rgba(124, 58, 237, 0.14), transparent 70%);
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
  transition: all 0.3s ease;
}
.whatsapp-float:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 12px 25px rgba(37, 211, 102, 0.5);
}

/* ==========================================================================
   EXECUTIVE CV PRINT & PDF EXPORT STYLES (A4 FORMAT - EXACT 2 PAGES)
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 10mm 8mm 10mm;
  }
  
  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 8.8pt !important;
    line-height: 1.28 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Ocultar elementos no imprimibles */
  .no-print, 
  header, 
  nav, 
  footer, 
  .whatsapp-float, 
  .top-bar, 
  #theme-toggle-btn, 
  .cv-filter-btn,
  button {
    display: none !important;
  }

  /* Contenedor principal de CV en impresión */
  .cv-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    color: #0f172a !important;
  }

  /* Control estricto de 2 páginas */
  .cv-page-1 {
    page-break-after: always !important;
    break-after: page !important;
    display: block !important;
  }

  .cv-page-2 {
    page-break-before: always !important;
    break-before: page !important;
    display: block !important;
    padding-top: 4mm !important;
  }

  /* Evitar saltos de página incómodos en medio de elementos */
  .cv-timeline-item,
  .skill-card,
  .project-card,
  .education-card,
  .card-print,
  section {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Títulos y textos en impresión */
  h1, h2, h3, h4, h5 {
    color: #0B2D6B !important;
  }
  
  p, span, li {
    color: #1e293b !important;
  }

  .card-print {
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
  }

  .badge-print {
    border: 1px solid #cbd5e1 !important;
    background: #f1f5f9 !important;
    color: #0f172a !important;
  }

  /* Enlaces impresos en texto sobrio */
  a {
    color: inherit !important;
    text-decoration: none !important;
  }
}
