:root{
  --bg: #070b14;
  --panel: rgba(255,255,255,.03); /* Más transparente para efecto glass */
  --panel2: rgba(255,255,255,.09);
  --text: #eaf0ff;
  --muted: rgba(234,240,255,.72);
  --line: rgba(255,255,255,.12);
  --accent: #4cc9f0;
  --accent2: #7c3aed;
  --shadow: 0 14px 40px rgba(0,0,0,.45);
  --radius: 18px;
  --mono: 'Fira Code', monospace; /* Nueva fuente */
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

/* Scrollbar Personalizado */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

body{
  margin:0;
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(76,201,240,.15), transparent 60%),
    radial-gradient(900px 500px at 85% 20%, rgba(124,58,237,.15), transparent 60%),
    linear-gradient(180deg, #040611, var(--bg));
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover{ color: var(--accent); }

.container{ width:min(1100px, 92vw); margin-inline:auto; }

/* === Header === */
.header{
  position: sticky; top:0; z-index: 30;
  backdrop-filter: blur(16px);
  background: rgba(7,11,20,.7);
  border-bottom: 1px solid var(--line);
}
.header__inner{ display:flex; align-items:center; justify-content:space-between; padding: 12px 0; }
.brand{ display:flex; gap:10px; align-items:center; font-weight:700; }
.brand__dot{
  width:10px; height:10px; border-radius:99px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 12px var(--accent);
}

.nav__toggle{ display:none; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 8px 10px; cursor:pointer; }
.nav__menu{ display:flex; gap: 16px; align-items:center; }
.nav__menu a{ font-size: 14px; font-weight: 500; opacity: .8; }
.nav__menu a:hover{ opacity: 1; color: var(--accent); }

/* === Buttons con Glow === */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 10px 18px; border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-weight:600; font-size: 14px;
  box-shadow: 0 4px 20px rgba(76, 201, 240, 0.3);
  transition: all 0.3s ease;
  position: relative; z-index: 1; overflow: hidden;
}
.btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(76, 201, 240, 0.5);
  border-color: #fff;
}
.btn--ghost{
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn--ghost:hover{
  background: rgba(255,255,255,0.05);
  box-shadow: none;
  border-color: var(--accent);
}
.btn--small{ padding: 8px 14px; font-size: 13px; }

/* === Hero & Typing Effect === */
.hero{ padding: 40px 0 20px; }
.hero__grid{ display:grid; grid-template-columns: 1.35fr .65fr; gap: 30px; align-items:start; }

.kicker{
  margin:0 0 8px; opacity:.9;
  letter-spacing: .1em; text-transform: uppercase;
  font-size: 12px; font-family: var(--mono);
  color: var(--accent);
}
h1{ margin:0; font-size: clamp(36px, 5vw, 52px); line-height: 1.1; font-weight: 700; letter-spacing: -1px; }

/* Animación de máquina de escribir */
.typing-effect {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--accent);
  width: 0;
  animation: typing 3.5s steps(40, end) forwards, blink .75s step-end infinite;
  margin: 12px 0 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
}
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink { from, to { border-color: transparent } 50% { border-color: var(--accent) } }

.hero__meta{ display:flex; gap: 12px; flex-wrap:wrap; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.meta-pill{
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 6px; font-family: var(--mono);
}
.verify__icon{ color: var(--accent); margin-right: 4px; }
.hero__cta{ display:flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }

/* Avatar */
.avatar{
  width: 100px; height: 100px;
  border-radius: 50%; overflow: hidden;
  border: 2px solid var(--line);
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  margin: 0 0 16px auto;
  position: relative;
}
.avatar::after{
  content:''; position: absolute; inset:0;
  border-radius: 50%;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}
.avatar img{ width: 100%; height: 100%; object-fit: cover; }

/* === Cards Glassmorphism === */
.section{ padding: 40px 0; }
.section__head{ display:flex; align-items:flex-end; justify-content:space-between; margin-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.section__head h2{ margin:0; font-size: 26px; }

.card{
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
}
.card:hover{
  border-color: rgba(76, 201, 240, 0.3);
  box-shadow: 0 15px 40px -5px rgba(0,0,0,0.6);
}
.card__title{ margin: 0 0 10px; font-size: 18px; }
.muted{ color: var(--muted); line-height: 1.6; }
.small{ font-size: 12px; }

/* === Timeline Conectada === */
.timeline{
  position: relative;
  padding-left: 24px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.tl-item{
  margin: 0;
  position: relative;
}
/* El punto conector */
.tl-item::before{
  content: '';
  position: absolute;
  left: -32px; /* Ajuste para centrar en la línea */
  top: 24px;
  width: 10px; height: 10px;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  z-index: 2;
}

.tl-top{ display:flex; align-items:center; justify-content:space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.tl-top h3{ margin:0; font-size: 18px; }

/* =========================
   ESTILOS PARA BADGES & CERTIFICADOS
   (Corrige el tamaño y alineación)
========================= */

/* Ajuste de la cuadrícula */
.badges-grid {
  margin-top: 24px;
  gap: 20px; /* Espacio entre tarjetas */
}

/* La tarjeta del badge */
.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  min-height: 220px; /* Altura uniforme para todas */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* El enlace dentro de la tarjeta */
.badge-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none; /* Quita el subrayado */
}

/* === LA IMAGEN DEL BADGE (Lo importante) === */
.badge-img {
  width: 120px;        /* Tamaño fijo horizontal */
  height: 120px;       /* Tamaño fijo vertical */
  object-fit: contain; /* CLAVE: Ajusta la imagen sin estirarla ni recortarla */
  margin-bottom: 16px; /* Espacio entre imagen y texto */
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.4)); /* Sombra suave tras la imagen */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Efecto Hover: La imagen crece un poco */
.badge-card:hover .badge-img {
  transform: scale(1.15) translateY(-5px);
}

/* Título del certificado */
.badge-card h4 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
  color: var(--text);
  opacity: 0.9;
}

/* Listas y Forms */
.bullets{ margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.bullets li { margin-bottom: 6px; }

.form{ display:grid; gap: 14px; }
label{ display:grid; gap: 6px; color: var(--muted); font-size: 13px; font-family: var(--mono); }
input, textarea{
  width: 100%; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(0,0,0,.3);
  color: var(--text); outline: none; font-family: inherit;
  transition: border-color 0.2s;
}
input:focus, textarea:focus{ border-color: var(--accent); box-shadow: 0 0 0 2px rgba(76,201,240,0.1); }

.grid-2{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer{ padding: 30px 0; border-top: 1px solid var(--line); margin-top: 40px; text-align: center; }

/* === Background FX (Scanlines) === */
.fx-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; }
.blob--a { width: 400px; height: 400px; background: var(--accent); top: -100px; left: -100px; animation: move 20s infinite alternate; }
.blob--b { width: 300px; height: 300px; background: var(--accent2); bottom: -50px; right: -50px; animation: move 15s infinite alternate-reverse; }
.scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(0,0,0,0.1) 3px);
  pointer-events: none; z-index: 10;
}
.noise {
  position: absolute; inset: 0; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 11;
}

@keyframes move { from { transform: translate(0,0); } to { transform: translate(50px, 50px); } }

/* Responsive */
/* =========================
   RESPONSIVE (Móviles y Tablets)
========================= */
@media (max-width: 900px) {

  /* 1. Ajustes generales de layout que ya teníamos */
  .hero__grid { grid-template-columns: 1fr; }
  .avatar { margin: 0 auto 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  
  /* Ajuste de Timeline */
  .timeline { border-left: none; padding-left: 0; gap: 14px; }
  .timeline::before, .tl-item::before { display: none; }
  .tl-item { border-left: 2px solid var(--line); border-radius: 0 var(--radius) var(--radius) 0; }

  /* === 2. CORRECCIÓN DEL TOOLBAR / MENÚ === */
  
  /* Mostrar el botón de menú (hamburguesa) */
  .nav__toggle {
    display: block; 
    font-size: 24px;
    padding: 4px 12px;
  }

  /* Estilos del menú desplegable */
  .nav__menu {
    position: absolute;
    top: 100%;       /* Justo debajo de la barra */
    left: 0;
    right: 0;
    flex-direction: column; /* Lista vertical */
    align-items: stretch;   /* Ocupar todo el ancho */
    background: rgba(7, 11, 20, 0.98); /* Fondo oscuro casi sólido */
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 20px;
    gap: 20px;
    
    /* Animación de entrada (oculto por defecto) */
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none; /* Evita clicks fantasma */
    z-index: 100;
  }

  /* Clase que activa JS cuando abres el menú */
  .nav__menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Ajustes de enlaces dentro del menú móvil */
  .nav__menu a {
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: block;
  }
  
  /* El botón de LinkedIn que ocupe todo el ancho */
  .nav__menu .btn {
    width: 100%;
    margin-top: 10px;
    text-align: center;
  }
}

/* =========================================
   PARCHE RESPONSIVO PARA LA SECCIÓN HERO
========================================= */

@media (max-width: 968px) {
  
  /* 1. Convertir la cuadrícula de 2 columnas a 1 sola columna */
  .hero__grid {
    grid-template-columns: 1fr !important; /* Fuerza una sola columna */
    display: flex;          /* Flexbox ayuda a ordenar verticalmente mejor en móvil */
    flex-direction: column;
    text-align: center;     /* Centra el texto */
    gap: 40px;              /* Espacio entre el texto y la tarjeta */
  }

  /* 2. Centrar los elementos internos (Pills, Botones, Chips) */
  .hero__meta {
    justify-content: center; /* Centra los iconos de ubicación/título */
  }

  .hero__cta {
    justify-content: center; /* Centra los botones de acción */
  }

  .chips {
    justify-content: center; /* Centra las etiquetas de skills */
  }

  /* 3. Ajustar la tarjeta del perfil (Avatar + Resumen) */
  .hero__card {
    width: 100%;            /* Que ocupe todo el ancho disponible */
    max-width: 400px;       /* Pero que no se haga gigante */
    margin: 0 auto;         /* Centrada horizontalmente */
  }

  /* 4. Asegurar que el avatar esté centrado */
  .avatar {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
  }

  /* 5. Ajustar tamaño de fuente del título en móvil para que no se rompa */
  .hero__text h1 {
    font-size: 32px;        /* Un poco más pequeño para móviles */
  }
}
/* =========================================
   CORRECCIÓN DE VISIBILIDAD EN MÓVIL
   (Pégalo al final de styles.css)
========================================= */

/* 1. Asegurar que el texto esté ENCIMA del fondo */
.hero {
  position: relative;
  z-index: 5; /* Pone el texto por encima de los blobs/fondo */
}

/* 2. Ajustes específicos para pantallas pequeñas */
@media (max-width: 968px) {
  
  /* Arreglar la estructura (Una sola columna) */
  .hero__grid {
    display: flex;
    flex-direction: column; /* Apila los elementos */
    align-items: center;    /* Centra todo */
    gap: 30px;
    padding-top: 20px;
  }

  .hero__text {
    text-align: center; /* Centra el texto del nombre y título */
    width: 100%;
  }

  /* 3. ARREGLAR EL EFECTO DE ESCRITURA EN MÓVIL (Importante) */
  /* El efecto "typewriter" suele romper el texto en celular. Lo desactivamos aquí. */
  .typing-effect {
    border-right: none;      /* Quita el cursor parpadeante */
    animation: none;         /* Quita la animación */
    white-space: normal;     /* Permite que el texto baje a la siguiente línea */
    width: auto;             /* Deja que ocupe el ancho natural */
    display: block;          /* Asegura que se comporte como bloque */
    font-size: 14px;         /* Ajuste de tamaño para que se lea bien */
    color: var(--muted);     /* Asegura el color */
  }

  /* 4. Centrar los pills (ubicación/cédula) */
  .hero__meta {
    justify-content: center;
    flex-direction: column; /* Pone los datos uno debajo de otro si son muy largos */
    align-items: center;
    gap: 8px;
  }

  /* 5. Centrar botones y chips */
  .hero__cta, 
  .chips {
    justify-content: center;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  /* Forma de globito/píldora */
  padding: 8px 18px;
  border-radius: 99px; 
  
  /* Estilo Cristal Oscuro */
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  
  /* Tipografía */
  color: var(--muted);
  font-family: var(--mono); /* Fuente Hacker */
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  
  /* Animación suave con rebote */
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: default; /* O pointer si quieres que parezcan clickeables */
  user-select: none;
}

/* === Efecto al pasar el Mouse (Hover) === */
.chip:hover {
  /* Se eleva como un globo */
  transform: translateY(-4px) scale(1.05);
  
  /* Se ilumina en color Cyan (Neon) */
  background: rgba(76, 201, 240, 0.15);
  border-color: var(--accent);
  color: #fff;
  
  /* Resplandor externo (Glow) */
  box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
  text-shadow: 0 0 8px var(--accent);
}