/* ==========================================================================
   Svonko Anic Olguín — Premium Portfolio Stylesheet
   Design System: Ultra-Premium Dark-First with Glassmorphism & Neon Accents
   ========================================================================== */

/* 1. IMPORTS & GOOGLE FONTS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

/* 2. DESIGN SYSTEM — CSS CUSTOM PROPERTIES
   ¿Por qué?: Centralizar tokens en variables permite un theme toggle
   instantáneo y consistencia visual absoluta en todo el sitio.
   ========================================================================== */
:root, [data-theme="dark"] {
  /* Backgrounds */
  --bg-deep: #050a18;
  --bg-surface: #0c1225;
  --bg-card: rgba(12, 18, 40, 0.7);
  --border-glass: rgba(255, 255, 255, 0.06);
  --header-bg: rgba(5, 10, 24, 0.88);
  --shadow-color: rgba(0, 0, 0, 0.5);

  /* Brand Colors */
  --primary: #0077ff;
  --primary-light: #00d4ff;
  --primary-glow: rgba(0, 119, 255, 0.3);
  --accent: #39ff14;
  --accent-glow: rgba(57, 255, 20, 0.2);

  /* Text */
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Typography */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;

  /* Spacing */
  --section-padding: 6rem 0;
  --container-max: 1200px;
}

[data-theme="light"] {
  --bg-deep: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --border-glass: rgba(15, 23, 42, 0.08);
  --header-bg: rgba(248, 250, 252, 0.92);
  --shadow-color: rgba(15, 23, 42, 0.06);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --primary-glow: rgba(0, 119, 255, 0.15);
  --accent-glow: rgba(57, 255, 20, 0.12);
}

/* 3. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body {
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.theme-transitioning * { transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease !important; }

a { color: inherit; text-decoration: none; transition: var(--transition-fast); }
img { max-width: 100%; height: auto; display: block; }
strong { color: var(--text-primary); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

::selection { background: var(--primary); color: #fff; }

/* 4. CONTAINER
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 5. SECTION TITLES
   ========================================================================== */
.section-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 6. GRADIENT TEXT UTILITY
   ========================================================================== */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER / NAVBAR
   ¿Por qué?: Glassmorphism con backdrop-filter para un header flotante
   que se integra con el contenido sin bloquearlo visualmente.
   ══════════════════════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-deep); /* Fondo sólido para evitar que los elementos brillantes trasluzcan al hacer scroll */
  border-bottom: none; /* Eliminada la línea divisoria inferior del header */
  transition: var(--transition-smooth);
}

.header.scrolled {
  box-shadow: 0 4px 30px var(--shadow-color);
  background: var(--bg-surface); /* Fondo sólido */
}

[data-theme="light"] .header.scrolled {
  background: var(--bg-surface);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-text span {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-right { display: flex; align-items: center; }

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 1px;
  transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  margin-left: 0.5rem;
}

.theme-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Hamburger (Mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1001;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.nav-toggle.active .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active .hamburger-line:nth-child(2) { opacity: 0; }
.nav-toggle.active .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ¿Por qué?: Fullscreen con imagen de fondo, overlay degradado denso
   y tarjeta glassmorphism para crear una primera impresión WOW.
   ══════════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 85vh; /* Reducido de 100vh para mostrar la imagen más completa (menor recorte vertical) */
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%; /* Ajustado para que comience desde la cabeza, ocultando el librero sin cortar el rostro */
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.02); } /* Reducido de 1.08 para minimizar recorte durante la animación */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 10, 24, 0.97) 0%,
    rgba(5, 10, 24, 0.85) 30%,
    rgba(5, 10, 24, 0.5) 60%,
    rgba(5, 10, 24, 0.3) 100%
  );
  z-index: 1;
}

[data-theme="light"] .hero-overlay {
  background: linear-gradient(
    to top,
    rgba(248, 250, 252, 0.97) 0%,
    rgba(248, 250, 252, 0.8) 30%,
    rgba(248, 250, 252, 0.4) 60%,
    rgba(248, 250, 252, 0.2) 100%
  );
}

/* Particles */
.particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: floatUp linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; width: 4px; height: 4px; }
.particle:nth-child(2) { left: 25%; animation-duration: 15s; animation-delay: 2s; }
.particle:nth-child(3) { left: 40%; animation-duration: 10s; animation-delay: 4s; width: 2px; height: 2px; background: var(--accent); }
.particle:nth-child(4) { left: 55%; animation-duration: 14s; animation-delay: 1s; }
.particle:nth-child(5) { left: 70%; animation-duration: 11s; animation-delay: 3s; background: var(--primary-light); }
.particle:nth-child(6) { left: 85%; animation-duration: 13s; animation-delay: 5s; width: 2px; height: 2px; }
.particle:nth-child(7) { left: 15%; animation-duration: 16s; animation-delay: 7s; background: var(--accent); }
.particle:nth-child(8) { left: 60%; animation-duration: 9s; animation-delay: 6s; width: 4px; height: 4px; background: var(--primary-light); }

@keyframes floatUp {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.hero-container-content {
  position: relative;
  z-index: 3;
  width: 100%;
}

.hero-content {
  display: flex;
  align-items: center;
  min-height: 85vh; /* Reducido de 100vh */
  padding: 6rem 0 1.5rem; /* Menos padding inferior para achicar el espacio con la siguiente ficha */
}

.hero-text-content {
  max-width: 700px;
  position: relative;
  z-index: 3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .hero-text-content {
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.6);
}

/* Efecto de entrada animada para las letras */
@keyframes fadeInUpHero {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text-content .hero-tagline {
  opacity: 0;
  animation: fadeInUpHero 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
}

.hero-text-content .hero-title {
  opacity: 0;
  animation: fadeInUpHero 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.4s;
}

.hero-text-content .hero-subtitle {
  opacity: 0;
  animation: fadeInUpHero 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.6s;
}

.hero-text-content .hero-description {
  opacity: 0;
  animation: fadeInUpHero 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.8s;
}

.hero-text-content .hero-actions {
  opacity: 0;
  animation: fadeInUpHero 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1s;
}

.hero-tagline {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-title);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--primary-light);
  margin-bottom: 1.25rem;
  min-height: 1.8rem;
  font-weight: 500;
}

.typing-cursor {
  color: var(--accent);
  font-weight: 300;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* GLOW BUTTONS
   ¿Por qué?: Botones con efecto neon-glow que refuerzan la estética
   premium y generan un call-to-action visualmente irresistible. */
.glow-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.glow-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow), 0 0 40px rgba(0, 119, 255, 0.1);
  transform: translateY(-2px);
}

.glow-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.glow-btn.primary:hover {
  box-shadow: 0 6px 30px var(--primary-glow), 0 0 50px rgba(0, 119, 255, 0.2);
  transform: translateY(-3px);
}

/* ══════════════════════════════════════════════════════════════════════════
   STATS BAR
   ══════════════════════════════════════════════════════════════════════════ */
.stats-bar {
  background: transparent;
  border: none;
  padding: 0.5rem 0; /* Aún más reducido */
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stat-number {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════════════════════════════════════
   ABOUT SECTION
   ══════════════════════════════════════════════════════════════════════════ */
.about {
  padding: 2.5rem 0 6rem 0; /* Reducido espaciado superior para achicar el espacio con el Hero */
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: center;
  margin-top: 2rem;
}

.about-image-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.about-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--accent));
  border-radius: 18px;
  z-index: -1;
  opacity: 0.6;
}

.about-img {
  border-radius: 16px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.about-text h3 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
}

.badge i { color: var(--primary); font-size: 0.75rem; }

/* ══════════════════════════════════════════════════════════════════════════
   ECOSISTEMA SECTION
   ══════════════════════════════════════════════════════════════════════════ */
.ecosistema {
  padding: var(--section-padding);
  background: var(--bg-surface);
}

.ecosistema-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 2rem;
}

.ecosistema-text h3 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ecosistema-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.ecosistema-image-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.ecosistema-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, var(--accent), var(--primary-light), var(--primary));
  border-radius: 18px;
  z-index: -1;
  opacity: 0.6;
}

.ecosistema-img {
  border-radius: 16px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.ecosistema-caption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ecosistema-caption i { margin-right: 0.4rem; color: var(--primary); }

/* ══════════════════════════════════════════════════════════════════════════
   UNITS / SERVICES
   ¿Por qué?: Tarjetas glassmorphism con bordes luminiscentes por marca
   para diferenciar cada unidad de negocio visualmente.
   ══════════════════════════════════════════════════════════════════════════ */
.units {
  padding: var(--section-padding);
}

.units-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.unit-card {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.unit-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent, transparent, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.unit-card:hover { transform: translateY(-8px); }
.unit-card:hover::before { opacity: 1; }

/* Variant glows */
.unit-card.rejas:hover { box-shadow: 0 10px 40px rgba(255, 107, 53, 0.15); }
.unit-card.rejas::before { background: conic-gradient(from 0deg, #ff6b35, #ff8c42, #ff6b35, transparent, transparent); }

.unit-card.creapagina:hover { box-shadow: 0 10px 40px rgba(0, 212, 255, 0.15); }
.unit-card.creapagina::before { background: conic-gradient(from 90deg, #00d4ff, #0077ff, #00d4ff, transparent, transparent); }

.unit-card.creaplan:hover { box-shadow: 0 10px 40px rgba(168, 85, 247, 0.15); }
.unit-card.creaplan::before { background: conic-gradient(from 180deg, #a855f7, #7c3aed, #a855f7, transparent, transparent); }

.unit-card.nodo:hover { box-shadow: 0 10px 40px rgba(245, 158, 11, 0.15); }
.unit-card.nodo::before { background: conic-gradient(from 270deg, #f59e0b, #eab308, #f59e0b, transparent, transparent); }

.unit-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.unit-logo-img {
  width: 55px;
  height: 55px;
  object-fit: contain;
  border-radius: 50%;
}

.unit-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.unit-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.unit-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition-fast);
}

.unit-link i {
  margin-left: 0.4rem;
  transition: transform 0.3s ease;
}

.unit-link:hover { color: var(--primary-light); }
.unit-link:hover i { transform: translateX(5px); }

/* ══════════════════════════════════════════════════════════════════════════
   VALUE PROPOSITION
   ══════════════════════════════════════════════════════════════════════════ */
.value-prop {
  padding: var(--section-padding);
  background: var(--bg-surface);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.value-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 400px;
  justify-self: center;
}

.value-card {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px var(--primary-glow);
  border-color: rgba(0, 119, 255, 0.2);
}

.value-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.value-card h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.value-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════════════
   TIMELINE
   ¿Por qué?: Timeline vertical con tarjetas alternadas y línea gradiente
   para mostrar la progresión de carrera de forma narrativa y elegante.
   ══════════════════════════════════════════════════════════════════════════ */
.timeline-section {
  padding: var(--section-padding);
}

.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 2rem auto 0;
  padding-left: 40px;
}

.timeline-line {
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-light), var(--accent));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item.active {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 1.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-deep);
  box-shadow: 0 0 10px var(--primary-glow);
  z-index: 2;
  transition: var(--transition-smooth);
}

.timeline-item.active .timeline-dot {
  box-shadow: 0 0 20px var(--primary-glow), 0 0 40px rgba(0, 119, 255, 0.15);
}

.timeline-card {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.75rem;
  transition: var(--transition-smooth);
}

.timeline-card:hover {
  border-color: rgba(0, 119, 255, 0.15);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.timeline-date {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--primary-glow);
  border-radius: 50px;
}

.timeline-role {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline-company i {
  margin-right: 0.3rem;
  color: var(--primary);
  font-size: 0.8rem;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ══════════════════════════════════════════════════════════════════════════
   SKILLS & EDUCATION
   ¿Por qué?: Barras de progreso animadas para habilidades y tarjetas
   para educación, combinando datos cuantitativos con cualitativos.
   ══════════════════════════════════════════════════════════════════════════ */
.skills {
  padding: var(--section-padding);
  background: var(--bg-surface);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.skill-category h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.skill-category h3 i {
  margin-right: 0.5rem;
  color: var(--primary);
}

.skill-item {
  margin-bottom: 1.25rem;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.skill-pct {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.85rem;
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Education Cards */
.education-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edu-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.edu-card:hover {
  border-color: rgba(0, 119, 255, 0.15);
  transform: translateX(5px);
}

.edu-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.edu-year {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.edu-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.15rem 0;
}

.edu-institution {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════════════
   CONTACT
   ══════════════════════════════════════════════════════════════════════════ */
.contact {
  padding: var(--section-padding);
}

.contact-box {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-box::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--accent), var(--primary));
  border-radius: 22px;
  z-index: -1;
  opacity: 0.3;
  animation: borderRotate 6s linear infinite;
  background-size: 300% 300%;
}

@keyframes borderRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.contact-box h3 {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-box > p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.contact-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.contact-links a:hover { color: var(--primary); }
.contact-links a i { margin-right: 0.3rem; }

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════════ */
.footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border-glass);
  background: var(--bg-surface);
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-sub {
  margin-top: 0.4rem;
  font-size: 0.75rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ¿Por qué?: Las animaciones on-scroll generan sensación de profundidad
   y descubrimiento progresivo, clave en diseño premium.
   ══════════════════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active .reveal-left,
.reveal.active .reveal-right {
  opacity: 1;
  transform: translate(0);
}

/* Stagger children */
.reveal.active .stagger-child:nth-child(1) { transition-delay: 0.1s; }
.reveal.active .stagger-child:nth-child(2) { transition-delay: 0.2s; }
.reveal.active .stagger-child:nth-child(3) { transition-delay: 0.3s; }
.reveal.active .stagger-child:nth-child(4) { transition-delay: 0.4s; }
.reveal.active .stagger-child:nth-child(5) { transition-delay: 0.5s; }

.stagger-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active .stagger-child {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal-left, .reveal-right, .stagger-child { opacity: 1; transform: none; }
  .timeline-item { opacity: 1; transform: none; }
  .hero-bg-img { animation: none; }
  .particle { animation: none; display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .units-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2.6rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .ecosistema-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid > :last-child:nth-child(odd) { grid-column: auto; max-width: none; }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --section-padding: 4rem 0; }
  .section-title { font-size: 2rem; }

  /* Nav Mobile */
  .nav-toggle { display: flex; }

  .nav-right {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-deep);
    border-left: 1px solid var(--border-glass);
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 5rem 2rem 2rem;
  }

  .nav-right.active,
  .nav-menu.active ~ .nav-right,
  #nav-menu.active { right: 0; }

  /* Hack: nav-menu IS inside nav-right, so we style nav-right when it needs to show */
  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-menu.active {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-deep);
    border-left: 1px solid var(--border-glass);
    z-index: 999;
    padding: 5rem 2rem 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 1.05rem;
    padding: 0.75rem 0;
    width: 100%;
  }

  .nav-link::after { display: none; }

  /* Hero Mobile */
  .hero-text-content {
    margin: 0;
  }

  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-description { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; }
  .glow-btn { justify-content: center; width: 100%; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .stat-number { font-size: 2.2rem; }

  /* Units */
  .units-grid { grid-template-columns: 1fr; }

  /* Value */
  .value-grid { grid-template-columns: 1fr; }

  /* Timeline */
  .timeline-container { padding-left: 35px; }

  /* Contact */
  .contact-box { padding: 2rem 1.5rem; }
  .contact-buttons { flex-direction: column; }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .section-title { font-size: 1.6rem; }
  .stat-number { font-size: 1.8rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
