/* =========================================================
   1. TIPOGRAFÍAS
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap');

/* =========================================================
   2. ICONOS
========================================================= */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css");
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600&display=swap');

/* =========================================================
   3. ESTILOS GENERALES
========================================================= */
h1, h2, h3, h4, h5, h6 { font-family: "Inter", sans-serif; }
p, a, button, li, label, input, select, textarea, span { font-family: "IBM Plex Sans", sans-serif; }

/* =========================================================
   4. VARIABLES
========================================================= */
:root {
  /* Fondos */
  --color-bg: #0f0f0f;
  --color-bg-alt: #0a0a0a;
  --color-bg-card: #050505;
  --color-bg-portfolio: #100508;
  --color-bg-hobbies: #0f0a0f;

  /* Texto */
  --color-text: #fff;
  --color-text-muted: #ccc;
  --color-text-dim: #888;

  /* Acento */
  --color-accent: #b10f2e;
  --color-accent-hover: #900b25;
  --color-accent-glow: rgba(177, 15, 46, 0.4);

  /* Transiciones */
  --transition-fast: 0.3s ease;
  --transition-smooth: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* =========================================================
   5. GENERAL / BODY
========================================================= */
html {
  scroll-behavior: smooth;
}

html {
  overflow-x: hidden;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  cursor: none;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =========================================================
   CUSTOM CURSOR
========================================================= */
*, *::before, *::after, a, button { cursor: none !important; }

#cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  will-change: left, top;
}

#cursor-ring {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  will-change: left, top, width, height;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease;
  opacity: 0.7;
}

#cursor-ring.expand { width: 50px; height: 50px; }

/* =========================================================
   NAVBAR  — intacto, exactamente como estaba
========================================================= */
.bg-negro { background: var(--color-bg); }

.navbar { padding: 10px; }

/* Línea animada del navbar (desde el centro) — SIN CAMBIOS */
.navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #858585;
  transform: translateX(-50%);
  transition: width 1.2s ease;
}
.navbar.animar-linea::after { width: 95%; }

/* Logo */
.navbar .logo { font-size: 25px; font-weight: 800; transition: 0.5s; }
.navbar .logo:hover { transform: scale(1.1); }

.miguel { color: var(--color-accent); }
.menor, .mayor, .lozano { color: rgba(177, 15, 46, 0.5); }

/* Links */
.navbar #navbarNav .nav-item a {
  color: var(--color-text);
  font-size: 20px;
  margin-right: 10px;
  border-bottom: 1px solid transparent;
  transition: 0.5s;
}
.navbar #navbarNav .nav-item a:hover,
.navbar #navbarNav .nav-item a.active {
  color: var(--color-accent) !important;
  border-bottom: 1px solid var(--color-accent);
}

.btnDescargar {
  text-decoration: none;
  background: var(--color-accent);
  color: #fff !important;
  padding: 10px 25px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 0 10px 0 10px;
}
.btnDescargar:hover {
  background: var(--color-accent-hover);
  color: #000 !important;
  transform: translateY(-2px);
}

/* =========================================================
   WAVE DIVIDERS — nuevos
========================================================= */
.wave-divider {
  display: block;
  overflow: hidden;
  line-height: 0;
  margin: 0;
  padding: 0;
}
.wave-divider svg { display: block; width: 100%; height: 70px; }

/* El bg de cada wave coincide con el fondo de la sección anterior */
.wave-1 { background: var(--color-bg); }
.wave-2 { background: var(--color-bg); }
.wave-3 { background: #0a0a0a; }
.wave-4 { background: var(--color-bg); }
.wave-5 { background: #100508; }
.wave-6 { background: var(--color-bg); }
.wave-7 { background: #0a0a0a; }
.wave-8 { background: var(--color-bg-hobbies); }

/* =========================================================
   6. HERO SECTION
========================================================= */
#hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--color-bg);
  overflow: hidden;
  padding-top: 60px;
}

/* tsParticles — posición absoluta detrás de todo */
#particles-hero {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Glow del cursor para el parallax */
#hero-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(177,15,46,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: left 0.12s ease, top 0.12s ease, opacity 0.3s ease;
}

/* Imagen */
.hero-img-wrapper {
  position: relative;
  z-index: 2;
  display: inline-block;
}
.hero-img-wrapper img {
  display: block;
  height: auto;
  max-height: 85vh;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}
.hero-img-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to bottom, transparent 0%, var(--color-bg) 100%);
  pointer-events: none;
}

/* Títulos hero */
#hero h1 {
  position: absolute;
  width: 100%;
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  left: 0;
  font-size: clamp(3rem, 8vw, 9rem);
  line-height: 0.9;
  color: var(--color-accent);
}

#hero .nombre {
  z-index: 1;
  top: 50%;
  transform: translateY(-130%);
}

#hero .titulo-encima {
  z-index: 3;
  top: 50%;
  transform: translateY(40%);
  pointer-events: none;
}

#hero .transparente {
  color: transparent;
  -webkit-text-stroke: 1px rgba(177, 15, 46, 1);
}

/* =========================================================
   SCRAMBLE TITLE
========================================================= */
.scramble-title { cursor: default; display: inline-block; }

/* =========================================================
   7. SOBRE MÍ
========================================================= */
#sobre-mi {
  padding: 100px 0;
  position: relative;
  background-color: var(--color-bg);
}

#sobre-mi h4 {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
  font-size: 1.2rem;
  color: #858585;
  margin-bottom: 5px;
}

#sobre-mi h3 {
  font-family: "Inter", sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
}

#sobre-mi .nombre-rojo { color: var(--color-accent); }

#sobre-mi p {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.6;
  color: #d1d1d1;
  max-width: 90%;
}

#sobre-mi .logica-p {
  color: var(--color-accent);
  font-family: "Source Code Pro", monospace;
  font-weight: 600;
}

/* =========================================================
   8. REDES SOCIALES
========================================================= */
.redes-sociales-container .list-unstyled { margin-top: 30px; }

.redes-sociales-container .btn-redes {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 140px;
  padding: 10px 20px;
  background: #fff;
  color: var(--color-accent);
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.redes-sociales-container .btn-redes i {
  color: var(--color-accent);
  margin-right: 8px;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.redes-sociales-container .btn-redes:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-3px);
}
.redes-sociales-container .btn-redes:hover i { color: #fff; }

/* =========================================================
   9. IMAGEN SOBRE MÍ
========================================================= */
.img-container-sobremi {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  max-width: 450px;
  margin: auto;
  padding: 20px;
}

.img-container-sobremi::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to bottom, transparent 0%, var(--color-bg) 90%);
  z-index: 10;
  pointer-events: none;
}

.img-container-sobremi img.foto-flotante {
  position: relative;
  z-index: 5;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(0,0,0,0.5));
  animation: flotarSuave 4s ease-in-out infinite alternate;
}

.img-container-sobremi::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 45%;
  z-index: 1;
  opacity: 0.6;
  background-image: url('../img/fondo-patron.png');
  background-repeat: no-repeat;
  background-position: top right;
  background-size: contain;
}

.figura-cuadro, .figura-cuadro:hover { display: none; }

@keyframes flotarSuave {
  0% { transform: translateY(0); }
  100% { transform: translateY(-15px); }
}

/* =========================================================
   PERFIL PROFESIONAL
========================================================= */
#perfil-profesional {
  position: relative;
  padding: 150px 0 100px 0;
  width: 100%;
  overflow: hidden;
  background-color: var(--color-bg-alt);
}

.fondo-perfil {
  position: absolute;
  top: -160px;
  left: -50px;
  width: 100%;
  height: 100%;
  /* z-index: -1; */
}

.fondo-perfil img { border-radius: 0 0 20px 20px; }

.cabecera-perfil { padding-left: 5%; padding-right: 5%; }

.titulo-seccion {
  font-family: "Inter", sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 20px;
  text-align: center;
  margin-left: 10px;
}

@media (min-width: 992px) { .titulo-seccion { text-align: left; } }

.descripcion {
  font-size: 1.1rem;
  font-weight: 300;
  color: #ddd;
  line-height: 1.6;
  margin-bottom: 30px;
}

.btn-contacto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  background: var(--color-accent);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(177, 15, 46, 0.4);
}
.btn-contacto:hover { background: #fff; color: var(--color-accent); transform: translateY(-3px); }
.btn-contacto i { margin-left: 10px; }

/* Tarjetas habilidades */
.habilidades-tarjeta {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  height: 320px;
  background: var(--color-bg-card);
  border: 1px solid #222;
  border-radius: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  cursor: pointer;
  will-change: transform;
}

.habilidades-tarjeta .card-body {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.habilidades-tarjeta .card-title {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0;
  transition: all 0.4s ease;
}

.habilidades-tarjeta .icono,
.habilidades-tarjeta .detalles {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
}

.habilidades-tarjeta:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 30px var(--color-accent-glow), 0 20px 40px rgba(0,0,0,0.5);
  transform: translateY(-10px);
  height: 390px;
  margin-bottom: -90px;
  z-index: 10;
  position: relative;
}

.habilidades-tarjeta:hover .card-title { font-size: 1.1rem; margin-bottom: 10px; }

.habilidades-tarjeta:hover .icono {
  height: auto;
  opacity: 1;
  font-size: 3rem;
  color: var(--color-accent);
  margin-bottom: 10px;
  animation: slideUp 0.3s ease forwards;
}

.habilidades-tarjeta:hover .detalles {
  height: auto;
  opacity: 1;
  list-style: none;
  padding: 0;
  text-align: left;
  width: 100%;
}

.habilidades-tarjeta .detalles li {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 5px;
  padding-left: 15px;
  position: relative;
}
.habilidades-tarjeta .detalles li::before {
  content: "•";
  color: var(--color-accent);
  position: absolute;
  left: 0;
  font-weight: bold;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* =========================================================
   HABILIDADES
========================================================= */
#habilidades {
  width: 100%;
  padding: 50px 0;
  background-color: var(--color-bg);
}

.titulo-seccion-centro {
  text-align: center;
  font-weight: 700;
  font-size: 30px;
  color: #fff;
  margin-bottom: 20px;
}

.descripcion-centro {
  padding: 0 10%;
  font-size: 25px;
  text-align: center;
  padding-bottom: 60px;
  color: #fff;
}

.etiquetas-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  max-width: 600px;
  margin-left: auto;
}

.etiquetas-container button {
  border-radius: 8px;
  padding: 10px 35px;
  font-weight: 700;
  font-size: 18px;
  background-color: var(--color-accent);
  color: #fff;
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
}

.etiquetas-container button.animar {
  animation: caerDesdeIzquierda 1s ease-out forwards;
}

.etiquetas-container button:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-3px);
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4);
}

@keyframes caerDesdeIzquierda {
  0%   { opacity: 0; transform: translateX(-150px) rotate(0); }
  80%  { transform: translateX(10px) rotate(0); }
  100% { opacity: 1; transform: translateX(0) rotate(0); }
}

.barras-container { width: 100%; }
.barras-container .skill-item {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  transition: border-color 0.3s;
}
.barras-container .skill-item:hover { border-color: rgba(177,15,46,0.35); }

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 5px;
}

.barras-container h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #fff;
  display: flex;
  justify-content: space-between;
}

.progress {
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  height: 7px;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #7a0820 0%, #b10f2e 65%, #d4143a 100%);
  box-shadow: 0 0 12px rgba(177, 15, 46, 0.6);
  position: relative;
  transition: width 1.5s ease-in-out;
  border-radius: 8px;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -60px; bottom: 0;
  width: 60px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: barShimmer 2.5s ease infinite;
}

@keyframes barShimmer {
  0%   { left: -60px; }
  100% { left: 110%; }
}

.fade-out { opacity: 0; transform: scale(0.9); transition: all 0.3s ease; }

.fade-in { animation: aparecerSuave 0.5s ease forwards; }

@keyframes aparecerSuave {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   PORTAFOLIO
========================================================= */
#portafolio {
  width: 100%;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg-portfolio);
}

#portafolio h2 { text-align: center; font-weight: 700; padding-bottom: 70px; }

.proyecto {
  position: relative;
  background: #af0e2c80;
  margin: 1px 0;
  padding: 2rem;
  transition: all 0.5s ease;
  cursor: pointer;
}

.numero-fondo {
  position: absolute;
  top: 47%;
  left: 250px;
  transform: translateY(-50%) scale(0.5);
  font-size: 15rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.15);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  white-space: nowrap;
}

.proyecto:hover .numero-fondo { transform: translateY(-50%) scale(1); opacity: 1; }
.proyecto.inactive:hover .numero-fondo { transform: translateY(-50%) scale(1); opacity: 1; }
.proyecto.active .numero-fondo { transform: translateY(-50%) scale(1); opacity: 1; }

.proyecto .info { padding-left: 170px; }

.proyecto hr {
  position: absolute;
  border: 1px solid #fff;
  width: 14%;
  top: 83px;
  left: 0;
}

.proyecto .numero { font-size: 2.5rem; opacity: 0.5; transition: all 0.4s ease; }
.proyecto h3 { margin-top: 0.5rem; font-size: 2rem; transition: all 0.4s ease; }
.proyecto p { opacity: 0.8; font-size: 20px; font-weight: 200; }
.proyecto .link { padding-right: 150px; }

.proyecto a {
  position: relative;
  display: inline-block;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.4s ease;
  z-index: 10;
}

.proyecto a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -25px;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: #000;
  border-radius: 50%;
  z-index: -1;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.proyecto:hover .link a::before { opacity: 0; }

.proyecto .preview {
  position: absolute;
  right: 0;
  bottom: -20px;
  max-width: 100%;
  width: 350px;
  opacity: 0;
  transform: rotate(-5deg) scale(0.95);
  transition: all 0.6s ease;
}

.proyecto .preview::before {
  content: "";
  position: absolute;
  top: 100px;
  left: -40px;
  width: 90%;
  height: 70%;
  background: rgba(0, 0, 0, 0.9);
  box-shadow: -10px 0 30px rgba(255, 0, 0, 0.7);
  z-index: -1;
  transition: all 0.5s ease;
}

.proyecto .preview img { width: 400px; border-radius: 12px; }

.preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 10%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #fff;
}

.preview-info h4 { font-size: 1.5rem; font-weight: 700; margin: 0; color: var(--color-accent); }
.preview-info span { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; color: #ccc; margin-bottom: 5px; display: block; }
.preview-info p { font-size: 0.85rem; opacity: 0.8; margin: 0; line-height: 1.4; }

.proyecto:hover {
  background: #b1122f;
  transform: scale(1);
  box-shadow: 0px 0px 40px -10px var(--color-bg);
  z-index: 20;
  position: relative;
}

.proyecto:hover .numero { font-size: 5rem; opacity: 0.2; }
.proyecto:hover h3 { font-size: 2.5rem; }

.proyecto:hover a {
  background: #fff;
  color: #000;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  z-index: 999;
}

.proyecto:hover .preview {
  right: -1px;
  bottom: -56px;
  opacity: 1;
  transform: rotate(0) scale(1);
  z-index: 30;
}

.btn-ver-mas-container { margin-top: 60px; text-align: center; }

.btn-ver-mas {
  display: inline-block;
  padding: 15px 50px;
  border: 2px solid var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.3s ease;
  background: transparent;
}

.btn-ver-mas:hover {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(177, 15, 46, 0.6);
  letter-spacing: 2px;
}

/* =========================================================
   ESTUDIOS
========================================================= */
#mis-estudios {
  width: 100%;
  padding: 100px 0;
  background-color: var(--color-bg);
}

#mis-estudios h2 { margin-bottom: 50px; color: #fff; }

.tarjeta-estudio {
  display: flex;
  width: 100%;
  height: 250px;
  border-radius: 0 12px 12px 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: all 0.5s ease;
  border: 1px solid #333;
}

.lado-anio {
  flex: 1;
  background: linear-gradient(135deg, #5c0012 0%, #3d000c 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  border-right: 1px solid rgba(255,255,255,0.1);
}

.lado-anio h3 {
  font-size: 5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.2);
  margin: 0;
  transition: all 0.4s ease;
}

.indicador {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
  transition: opacity 0.3s;
}
.indicador i { display: inline-block; transition: transform 0.3s ease; }

.lado-info {
  flex: 0;
  background: var(--color-accent);
  overflow: hidden;
  opacity: 0;
  display: flex;
  align-items: center;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.lado-info .contenido {
  padding: 30px;
  width: 500px;
  color: #fff;
  transform: translateX(50px);
  transition: transform 0.4s ease 0.1s;
}

.lado-info h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 5px; }
.lado-info h4 { font-size: 1.1rem; opacity: 0.9; margin-bottom: 15px; font-weight: 400; }
.lado-info p { font-size: 0.95rem; line-height: 1.5; opacity: 0.8; margin: 0; }

.tarjeta-estudio:hover,
.tarjeta-estudio.active { box-shadow: 0 10px 30px rgba(177, 15, 46, 0.4); }

.tarjeta-estudio:hover .lado-anio,
.tarjeta-estudio.active .lado-anio { flex: 0 0 200px; background: #1a1a1a; }

.tarjeta-estudio:hover .lado-anio h3,
.tarjeta-estudio.active .lado-anio h3 { font-size: 3.5rem; color: #fff; }

.tarjeta-estudio:hover .indicador,
.tarjeta-estudio.active .indicador { opacity: 0; }

.tarjeta-estudio:hover .lado-info,
.tarjeta-estudio.active .lado-info { flex: 1; opacity: 1; }

.tarjeta-estudio:hover .contenido,
.tarjeta-estudio.active .contenido { transform: translateX(0); }

/* =========================================================
   EXPERIENCIA
========================================================= */
#experiencia {
  background-color: var(--color-bg-alt);
  position: relative;
  padding: 120px 0;
}

.experiencia-subtitulo {
  color: var(--color-accent);
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.experiencia-titulo {
  font-family: "Inter", sans-serif;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.experiencia-titulo .miguel { color: var(--color-accent); }

.timeline { position: relative; padding-left: 20px; }

.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 0;
  left: 49px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  cursor: pointer;
  padding: 10px 0;
}

.timeline-dot {
  position: absolute;
  top: 15px;
  left: 19px;
  width: 22px;
  height: 22px;
  background: var(--color-bg);
  border: 3px solid #666;
  border-radius: 50%;
  z-index: 2;
  transition: all 0.4s ease;
  box-shadow: 0 0 0 5px var(--color-bg);
}

.timeline-content { padding-left: 60px; }

.encabezado-item { display: flex; align-items: center; justify-content: space-between; }

.timeline-content h4 { font-size: 1.4rem; font-weight: 700; color: #fff; margin: 0; transition: color 0.3s; }

.icono-toggle { color: #666; transition: transform 0.4s ease; }

.timeline-content .fecha {
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 5px;
  margin-bottom: 10px;
  display: block;
}

.descripcion-wrapper {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.descripcion {
  color: #ccc;
  font-weight: 300;
  line-height: 1.6;
  padding-left: 15px;
  border-left: 2px solid rgba(255,255,255,0.05);
}

.timeline-item:hover .timeline-dot,
.timeline-item.active .timeline-dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 15px var(--color-accent);
  transform: scale(1.2);
}

.timeline-item:hover h4,
.timeline-item.active h4 { color: var(--color-accent); }

.timeline-item:hover .icono-toggle,
.timeline-item.active .icono-toggle { transform: rotate(180deg); color: #fff; }

.timeline-item:hover .descripcion-wrapper,
.timeline-item.active .descripcion-wrapper { max-height: 200px; opacity: 1; transform: translateY(0); }

/* Título animado */
.titulo-animado {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.titulo-animado.visible { opacity: 1; transform: translateY(0); }

.miguel {
  position: relative;
  color: var(--color-accent);
  display: inline-block;
  text-decoration: none;
}

.miguel::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 3px;
  bottom: 2px;
  left: 0;
  background-color: var(--color-accent);
  transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
  transition-delay: 0.6s;
}

.titulo-animado.visible .miguel::after { width: 100%; }

/* =========================================================
   HOBBIES
========================================================= */
#hobbies {
  background-color: var(--color-bg-hobbies);
  padding: 100px 0;
  position: relative;
}

#hobbies h2 { color: #fff; margin-bottom: 50px; }

.hobby-card {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: default;
}

.contenido-visible {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.4s ease;
  text-align: center;
  width: 100%;
}

.icono-hobby { font-size: 3rem; color: #fff; margin-bottom: 10px; display: block; transition: color 0.3s; }

.titulo-hobby {
  color: #aaa;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin: 0;
}

.contenido-oculto {
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  text-align: center;
  opacity: 0;
  transition: all 0.4s ease;
}

.detalle {
  color: var(--color-accent);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.hobby-card:hover { border-color: var(--color-accent); box-shadow: 0 5px 20px rgba(177, 15, 46, 0.3); background: #1a0509; transform: translateY(-5px); }
.hobby-card:hover .contenido-visible { top: 35%; }
.hobby-card:hover .icono-hobby { color: var(--color-accent); transform: scale(0.9); }
.hobby-card:hover .contenido-oculto { bottom: 25px; opacity: 1; }

/* =========================================================
   FOOTER
========================================================= */
#footer-premium {
  background-color: var(--color-bg);
  padding: 80px 0 30px 0;
  position: relative;
  overflow: hidden;
}

#footer-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  box-shadow: 0 0 20px var(--color-accent);
}

.footer-content { text-align: center; }

.nombre-gigante {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 3.5rem;
  letter-spacing: -1px;
  color: #fff;
  margin: 0;
}

.nombre-gigante .apellido { color: var(--color-accent); }

.frase-cierre {
  color: #888;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 10px;
}

.social-buttons { display: flex; justify-content: center; gap: 20px; margin-top: 30px; }

.social-btn {
  width: 55px;
  height: 55px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  position: relative;
}

.social-btn:hover { background: var(--color-accent); color: #fff; transform: translateY(-5px); box-shadow: 0 0 20px rgba(177, 15, 46, 0.5); }

.social-btn .tooltip {
  position: absolute;
  top: -40px;
  background: #fff;
  color: #000;
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-weight: bold;
  white-space: nowrap;
}

.social-btn .tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #fff;
}

.social-btn:hover .tooltip { opacity: 1; visibility: visible; top: -50px; }

.copyright { color: #666; font-size: 0.9rem; margin: 0; text-align: center; }

.back-to-top { color: #fff; text-decoration: none; font-size: 0.9rem; transition: color 0.3s; display: flex; align-items: center; gap: 5px; }
.back-to-top:hover { color: var(--color-accent); }

/* =========================================================
   PAGE LOADER
========================================================= */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content { text-align: center; }

.loader-name {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-accent);
  letter-spacing: -2px;
  margin-bottom: 24px;
  opacity: 0;
  animation: loaderFadeIn 0.4s ease 0.1s forwards;
}

@keyframes loaderFadeIn { to { opacity: 1; } }

.loader-bar {
  width: 160px;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-progress {
  height: 100%;
  width: 0;
  background: var(--color-accent);
  border-radius: 2px;
  animation: loaderFill 0.8s ease 0.3s forwards;
}

@keyframes loaderFill { to { width: 100%; } }

/* =========================================================
   NAVBAR — glassmorphism al hacer scroll
========================================================= */
.navbar.scrolled {
  background: rgba(12, 12, 12, 0.88) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(177, 15, 46, 0.12);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* =========================================================
   EMPRESA — texto empresa en timeline
========================================================= */
.empresa { color: var(--color-text-dim); font-weight: 400; }

/* =========================================================
   BADGE ACTUAL — trabajo presente
========================================================= */
.badge-actual {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-accent);
  background: rgba(177, 15, 46, 0.1);
  border: 1px solid rgba(177, 15, 46, 0.3);
  padding: 2px 9px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 8px;
  text-transform: uppercase;
}

/* =========================================================
   HERO — gradient ambiental + badge + CTA + scroll indicator
========================================================= */
#hero {
  background:
    radial-gradient(ellipse 60% 50% at 80% 15%, rgba(177, 15, 46, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 10% 85%, rgba(177, 15, 46, 0.05), transparent),
    var(--color-bg);
}

.hero-badge {
  position: absolute;
  top: 100px;
  left: 5%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(177, 15, 46, 0.08);
  border: 1px solid rgba(177, 15, 46, 0.25);
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 8px 16px;
  border-radius: 30px;
  z-index: 4;
  text-transform: uppercase;
  animation: heroFadeSlide 0.8s ease 1.2s both;
}

@keyframes heroFadeSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(177, 15, 46, 0.5); }
  50%       { opacity: 0.6; box-shadow: 0 0 0 6px rgba(177, 15, 46, 0); }
}

.hero-cta-desktop {
  position: absolute;
  bottom: 12%;
  right: 5%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 4;
  animation: heroFadeSlide 0.8s ease 1.5s both;
}

.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: heroFadeSlide 0.8s ease 1.8s both;
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, transparent, rgba(177, 15, 46, 0.6));
  animation: scrollDrop 2s ease-in-out infinite;
}

@keyframes scrollDrop {
  0%  { transform: scaleY(0); transform-origin: top; opacity: 0; }
  30% { opacity: 1; }
  70% { transform: scaleY(1); transform-origin: top; }
  71% { transform-origin: bottom; }
  100%{ transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* =========================================================
   BOTONES — sistema unificado
========================================================= */
.btn-base {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.3px;
  border-radius: 4px;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-accent:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
  box-shadow: 0 8px 25px var(--color-accent-glow);
}

.btn-outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.18);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Ripple effect */
.btn-base .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

/* Magnetic — transform aplicado por JS */
.magnetic {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

/* =========================================================
   STATS BAR
========================================================= */
#stats-bar {
  background: var(--color-bg);
  padding: 70px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.stat-item {
  padding: 20px 16px;
  position: relative;
}

.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.stat-number-wrapper {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 10px;
}

.stat-number {
  font-family: "Inter", sans-serif;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
  display: inline-block;
}

.stat-suffix {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  font-weight: 900;
  color: var(--color-accent);
  opacity: 0.55;
  display: inline-block;
}

.stat-label {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.75rem;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
  font-weight: 500;
}

/* =========================================================
   TIMELINE — dot con pulso cuando está activo
========================================================= */
.timeline-item.active .timeline-dot {
  animation: dotPulseTimeline 1.8s ease-in-out infinite !important;
}

@keyframes dotPulseTimeline {
  0%, 100% { box-shadow: 0 0 0 0 rgba(177, 15, 46, 0.5), 0 0 12px var(--color-accent); }
  50%       { box-shadow: 0 0 0 8px rgba(177, 15, 46, 0), 0 0 22px var(--color-accent); }
}

/* =========================================================
   TIPOGRAFÍA — mejoras generales de premium
========================================================= */
.titulo-seccion,
.titulo-seccion-centro {
  letter-spacing: -0.5px;
}

/* =========================================================
   RESPONSIVE — nuevos componentes
========================================================= */
@media (max-width: 991px) {
  .hero-badge { top: 90px; }
}

@media (max-width: 767px) {
  .hero-badge       { display: none; }
  .hero-cta-desktop { display: none; }
  .scroll-indicator { display: none; }

  #stats-bar { padding: 40px 0; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item + .stat-item::before { display: none; }

  .stat-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .stat-item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
  }

  .stat-item:nth-child(3),
  .stat-item:nth-child(4) {
    border-bottom: none;
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media screen and (max-width: 991px) {
  .navbar-collapse { background: var(--color-bg); padding: 1.5rem; border-radius: 0 0 12px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); border-top: 1px solid rgba(177, 15, 46, 0.3); max-height: 80vh; overflow-y: auto; }
  .navbar-nav { text-align: center; padding: 1rem 0; }
  .navbar #navbarNav .nav-item a { font-size: 1.5rem; padding: 0.75rem 0; display: block; }
  .btnDescargar { width: 100%; text-align: center; margin-top: 1rem !important; padding: 15px 25px; font-size: 1.2rem; }
  #hero { flex-direction: column; justify-content: flex-start; min-height: 90vh; padding-top: 80px; }
  #hero h1 { font-size: clamp(2.5rem, 10vw, 4.5rem); position: relative; top: auto; transform: none; margin: 0.5rem 0; }
  #hero .nombre { order: 1; transform: none; margin-bottom: -0.5rem; }
  #hero .hero-img-wrapper { order: 2; max-width: 70%; margin: 0 auto; }
  #hero .titulo-encima { order: 3; transform: none; margin-top: -1rem; }
  .habilidades-tarjeta { max-width: 100%; height: auto; min-height: 200px; margin-bottom: 0; }
  .habilidades-tarjeta:hover { height: auto; min-height: 350px; margin-bottom: 0; transform: translateY(-5px); }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
  #hero .nombre { margin-bottom: -1rem; }
  #hero .titulo-encima { margin-top: -1.5rem; }
  .row.g-4 { --bs-gutter-y: 2rem; }
  .tarjeta-estudio { height: 220px; }
  .lado-anio h3 { font-size: 3.5rem; }
  .timeline-content h4 { font-size: 1.3rem; }
  .hobby-card { height: 150px; }
  .icono-hobby { font-size: 2.5rem; }
  .hobby-card:hover .contenido-oculto { bottom: 20px; }
}

/* =========================================================
   MOBILE REDESIGN — reemplaza TODO el bloque
   @media screen and (max-width: 767px) { ... }
   en tu styles.css. El resto del archivo no cambia.
========================================================= */

@media screen and (max-width: 767px) {

  /* ── BASE ── */
  body { overflow-x: hidden; }
  h2 { font-size: clamp(1.8rem, 7vw, 2.2rem) !important; }
  h3 { font-size: 1.5rem !important; }

  /* ── NAVBAR ── */
  .navbar { padding: 12px 16px; }
  .navbar .logo { font-size: 16px; }
  .navbar-collapse {
    background: #080808;
    padding: 1.2rem 1.5rem;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.8);
    border-top: 1px solid rgba(177,15,46,0.3);
    max-height: 80vh;
    overflow-y: auto;
  }
  .navbar-nav { text-align: center; padding: 0.5rem 0; }
  .navbar #navbarNav .nav-item a {
    font-size: 1.3rem;
    padding: 0.6rem 0;
    display: block;
  }
  .btnDescargar {
    width: 100%;
    text-align: center;
    margin-top: 1rem !important;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 0 10px 0 10px;
  }

  /* ── WAVES EN MÓVIL ── */
  .wave-divider svg { height: 35px; }

  /* ── HERO ── */
  #hero {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100svh;
    padding-top: 70px;
    padding-bottom: 0;
    text-align: center;
  }

  /* Ocultar los h1 absolutos del desktop */
  #hero .nombre,
  #hero .titulo-encima { display: none; }

  /* Imagen centrada */
  #hero .hero-img-wrapper {
    position: relative;
    z-index: 2;
    width: 75%;
    max-width: 260px;
    margin: 0 auto;
    order: 2;
  }
  #hero .hero-img-wrapper img { max-height: 50vh; }
  #hero .hero-img-wrapper::after { height: 25%; }

  /* Bloque de texto encima de la imagen */
  #hero::before {
    content: '';
    display: none;
  }

  /* Nombre + rol como texto estático sobre el hero */
  #hero-mobile-text {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 20px;
    order: 1;
    margin-bottom: 8px;
  }

  /* Chip "disponible" */
  .hero-available-tag {
    display: inline-block;
    background: #1a0508;
    border: 1px solid rgba(177,15,46,0.4);
    color: #b10f2e;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
  }

  .hero-mobile-name {
    font-size: clamp(2.2rem, 11vw, 3rem);
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -1px;
    margin: 0 0 4px;
  }
  .hero-mobile-name span { color: #b10f2e; }

  .hero-mobile-role {
    font-size: 10px;
    color: #555;
    letter-spacing: 4px;
    margin: 0 0 16px;
    text-transform: uppercase;
  }

  /* Botones del hero en móvil */
  .hero-mobile-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 16px 0 0;
    order: 3;
    position: relative;
    z-index: 3;
  }
  .hero-mobile-btns .btn-hero-primary {
    background: #b10f2e;
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: none;
  }
  .hero-mobile-btns .btn-hero-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid #333;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: none;
  }

  /* ── SOBRE MÍ ── */
  #sobre-mi {
    padding: 40px 20px !important;
    text-align: center;
  }
  #sobre-mi .row { flex-direction: column; }
  #sobre-mi h4 { font-size: 0.85rem; letter-spacing: 3px; color: #b10f2e; }
  #sobre-mi h3 { font-size: 1.8rem !important; margin-bottom: 12px; }
  #sobre-mi p { font-size: 0.9rem; max-width: 100%; color: #999; line-height: 1.7; }

  /* Ocultar foto duplicada en sobre mi */
  #sobre-mi .col-md-6:last-child { display: none; }

  .redes-sociales-container .list-unstyled {
    justify-content: center !important;
    margin-top: 20px;
  }
  .redes-sociales-container .btn-redes {
    min-width: 120px;
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
  }

  /* ── PERFIL PROFESIONAL ── */
  #perfil-profesional {
    padding: 40px 16px !important;
    background-color: var(--color-bg-alt);
  }
  .fondo-perfil { display: none; }
  .cabecera-perfil { padding: 0; text-align: center; margin-bottom: 24px !important; }
  .titulo-seccion { font-size: 1.8rem !important; text-align: center; margin: 0 0 12px; }
  .descripcion { font-size: 0.9rem; text-align: center; color: #999; }
  .btn-contacto { width: 100%; padding: 13px; font-size: 1rem; border-radius: 8px; }

  /* Tarjetas en grid 2 columnas compacto */
  .tarjetas-container { margin-top: 8px !important; }
  .tarjetas-container .col-md-6 { padding: 6px !important; }

  .habilidades-tarjeta {
    max-width: 100%;
    height: auto !important;
    min-height: auto !important;
    margin: 0;
    border-radius: 10px;
    padding: 14px !important;
    transition: none;
  }
  .habilidades-tarjeta .card-body {
    justify-content: flex-start;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  /* Mostrar icono siempre en móvil */
  .habilidades-tarjeta .icono {
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    font-size: 1.4rem !important;
    color: #b10f2e;
    margin: 0 !important;
    flex-shrink: 0;
  }
  .habilidades-tarjeta .card-title {
    font-size: 0.8rem !important;
    text-align: left;
    margin: 0 !important;
    line-height: 1.2;
  }
  /* Lista oculta por defecto en móvil, visible al hacer tap */
  .habilidades-tarjeta .detalles { display: none !important; }
  .habilidades-tarjeta.active { border-color: rgba(177,15,46,0.5) !important; }
  .habilidades-tarjeta.active .card-body {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
  .habilidades-tarjeta.active .icono { margin-bottom: 2px !important; }
  .habilidades-tarjeta.active .card-title { margin: 0 !important; }
  .habilidades-tarjeta.active .detalles {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    list-style: none;
  }
  .habilidades-tarjeta.active .detalles li {
    background: rgba(177,15,46,0.15);
    border: 1px solid rgba(177,15,46,0.3);
    color: #ccc;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 20px;
  }
  .habilidades-tarjeta.active .detalles li::before { display: none !important; }
  .habilidades-tarjeta:hover, .habilidades-tarjeta.active {
    transform: none;
    height: auto !important;
    margin-bottom: 0 !important;
  }

  /* ── HABILIDADES (barras) ── */
  #habilidades { padding: 40px 16px !important; }
  .titulo-seccion-centro { font-size: 1.5rem !important; }
  .descripcion-centro {
    font-size: 0.9rem !important;
    padding: 0 0 30px !important;
    color: #888;
  }
  #habilidades .row { flex-direction: column-reverse; }
  #habilidades .col-lg-5 { width: 100% !important; max-width: 100% !important; }

  .etiquetas-container {
    justify-content: center;
    gap: 6px;
    margin: 0 0 20px;
    max-width: 100%;
  }
  .etiquetas-container button {
    padding: 7px 16px;
    font-size: 13px;
    flex: 0 1 auto;
    min-width: auto;
    border-radius: 20px;
  }

  /* ── PORTAFOLIO ── */
  #portafolio {
    padding: 40px 0 40px !important;
    background-color: var(--color-bg-portfolio);
  }
  #portafolio h2 {
    padding: 0 16px 24px !important;
    font-size: 1.5rem !important;
    text-align: left;
  }

  /* Ocultar la galería de lista del desktop */
  #contenedor-proyectos .proyecto { display: none !important; }

  /* Grid de cards móvil generado por JS */
  #proyectos-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 16px;
  }

  .proj-card-mobile {
    background: #111;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    overflow: hidden;
  }
  .proj-card-mobile-img {
    height: 110px;
    background: linear-gradient(135deg, #2a0a10, #1a0508);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }
  .proj-card-mobile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
  }
  .proj-card-mobile-num {
    position: absolute;
    font-size: 52px;
    font-weight: 900;
    color: rgba(255,255,255,0.06);
    line-height: 1;
  }
  .proj-card-mobile-tag {
    position: absolute;
    bottom: 10px;
    left: 12px;
    background: #b10f2e;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
  }
  .proj-card-mobile-body { padding: 14px 16px; }
  .proj-card-mobile-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
  }
  .proj-card-mobile-cat {
    font-size: 11px;
    color: #666;
    margin-bottom: 12px;
  }
  .proj-card-mobile-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .proj-card-mobile-tech {
    font-size: 10px;
    color: #b10f2e;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
  .proj-card-mobile-link {
    background: #b10f2e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    cursor: none;
  }

  .btn-ver-mas-container { padding: 20px 16px 0; }
  .btn-ver-mas { width: 100%; padding: 13px; font-size: 0.95rem; border-radius: 8px; }

  /* ── ESTUDIOS ── */
  #mis-estudios { padding: 40px 16px !important; }
  #mis-estudios h2 { margin-bottom: 24px; font-size: 1.5rem !important; }

  .tarjeta-estudio {
    flex-direction: column;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(177,15,46,0.2);
  }
  .lado-anio {
    flex: 0 0 auto;
    width: 100%;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: #1a0508;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .lado-anio h3 {
    font-size: 2rem !important;
    color: #b10f2e;
    font-weight: 900;
  }
  .indicador {
    opacity: 1;
    color: #555;
    font-size: 0.75rem;
  }
  .lado-info {
    flex: 0 0 auto;
    width: 100%;
    background: transparent;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.38s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0;
  }
  .lado-info .contenido {
    padding: 16px;
    text-align: left;
    transform: none !important;
    width: 100%;
  }
  .lado-info h3 { font-size: 1rem !important; color: #fff; }
  .lado-info h4 { font-size: 0.85rem !important; color: #b10f2e; opacity: 1; margin-bottom: 6px; }
  .lado-info p { font-size: 0.82rem; color: #777; }

  .tarjeta-estudio.active .lado-info {
    max-height: 200px;
    opacity: 1;
  }
  .tarjeta-estudio.active .indicador i { transform: rotate(45deg); }
  .tarjeta-estudio.active .lado-anio { background: #1a1a1a; }

  /* ── EXPERIENCIA ── */
  #experiencia { padding: 40px 16px !important; background-color: var(--color-bg-alt); }
  .experiencia-subtitulo { text-align: left; font-size: 0.8rem; }
  .experiencia-titulo {
    font-size: 1.4rem !important;
    text-align: left;
    opacity: 1 !important;
    transform: none !important;
  }
  .experiencia-titulo.titulo-animado { opacity: 1; transform: none; }

  /* Ocultar columna izquierda del desktop y mostrar solo timeline */
  #experiencia .col-lg-5 { display: none; }
  #experiencia .col-lg-7 { width: 100% !important; max-width: 100% !important; }

  /* Header de experiencia en móvil */
  #experiencia-mobile-header {
    margin-bottom: 24px;
  }
  #experiencia-mobile-header .exp-sub {
    font-size: 0.75rem;
    color: #b10f2e;
    letter-spacing: 3px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  #experiencia-mobile-header .exp-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
  }
  #experiencia-mobile-header .exp-title span { color: #b10f2e; }

  .timeline { padding-left: 12px; }
  .timeline::before { left: 28px; background: rgba(177,15,46,0.2); }
  .timeline-dot {
    left: 16px;
    width: 16px;
    height: 16px;
    border-color: #b10f2e33;
  }
  .timeline-content { padding-left: 44px; }
  .timeline-content h4 { font-size: 1rem !important; }
  .timeline-content .empresa { font-size: 0.85rem; color: #b10f2e; }
  .timeline-content .fecha { font-size: 0.75rem; }
  .descripcion { font-size: 0.82rem; }
  .icono-toggle { font-size: 1rem; }

  /* ── HOBBIES ── */
  #hobbies { padding: 40px 16px !important; background-color: var(--color-bg-hobbies); }
  #hobbies h2 { font-size: 1.5rem !important; margin-bottom: 20px; }

  .hobby-card {
    height: 90px;
    border-radius: 10px;
    background: #111;
  }
  .icono-hobby { font-size: 1.6rem; margin-bottom: 5px; }
  .titulo-hobby { font-size: 0.7rem; letter-spacing: 1px; }
  .contenido-oculto { display: none; }

  /* ── FOOTER ── */
  #footer-premium { padding: 32px 16px 20px !important; }
  .nombre-gigante { font-size: 1.6rem !important; }
  .frase-cierre { font-size: 0.8rem; letter-spacing: 1px; }
  .social-btn { width: 42px; height: 42px; font-size: 1.1rem; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; margin-top: 16px; }
  .back-to-top { justify-content: center; }
  .copyright { font-size: 0.8rem; margin-bottom: 8px; }

  /* ── NEUTRALIZAR :hover de desktop en touch ── */
  /* Estudios: :hover no debe activar el estado expandido */
  .tarjeta-estudio:hover:not(.active) { box-shadow: none !important; }
  .tarjeta-estudio:hover:not(.active) .lado-anio {
    flex: 0 0 auto !important;
    background: #1a0508 !important;
  }
  .tarjeta-estudio:hover:not(.active) .lado-anio h3 {
    font-size: 2rem !important;
    color: #b10f2e !important;
  }
  .tarjeta-estudio:hover:not(.active) .indicador { opacity: 1 !important; }
  .tarjeta-estudio:hover:not(.active) .lado-info {
    max-height: 0 !important;
    opacity: 0 !important;
  }

  /* Experiencia: :hover no debe expandir los items */
  .timeline-item:hover:not(.active) .timeline-dot {
    background: var(--color-bg) !important;
    border-color: #666 !important;
    box-shadow: 0 0 0 5px var(--color-bg) !important;
    transform: none !important;
  }
  .timeline-item:hover:not(.active) h4 { color: #fff !important; }
  .timeline-item:hover:not(.active) .icono-toggle {
    transform: none !important;
    color: #666 !important;
  }
  .timeline-item:hover:not(.active) .descripcion-wrapper {
    max-height: 0 !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
  }
}

/* ── MÓVILES PEQUEÑOS ── */
@media screen and (max-width: 400px) {
  #hero .hero-img-wrapper { width: 90%; }
  .hero-mobile-name { font-size: 2rem; }
  .nombre-gigante { font-size: 1.3rem !important; }
  .etiquetas-container button { font-size: 12px; padding: 6px 12px; }
}

/* ── LANDSCAPE EN MÓVIL ── */
@media screen and (max-width: 850px) and (orientation: landscape) {
  #hero { min-height: 100svh; padding-top: 60px; }
  #hero .hero-img-wrapper img { max-height: 55vh; }
  .navbar-collapse { max-height: 70vh; overflow-y: auto; }
}

@media screen and (max-width: 400px) {
  #hero h1 { font-size: clamp(1.8rem, 10vw, 2.5rem); }
  #hero .hero-img-wrapper { max-width: 95%; }
  .nombre-gigante { font-size: 1.8rem; }
  .etiquetas-container button { min-width: 100%; }
}

@media screen and (max-width: 850px) and (orientation: landscape) {
  #hero { min-height: 120vh; padding-top: 100px; }
  #hero .hero-img-wrapper img { max-height: 60vh; }
  .hero-img-wrapper::after { height: 20%; }
  .navbar-collapse { max-height: 80vh; overflow-y: auto; }
}

/* =========================================================
   MOBILE DRAWER
========================================================= */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.drawer-overlay.open { opacity: 1; visibility: visible; }

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: #080808;
  border-left: 1px solid rgba(177, 15, 46, 0.18);
  z-index: 9991;
  transform: translateX(105%);
  transition: transform 0.42s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.mobile-drawer::-webkit-scrollbar { display: none; }

.mobile-drawer.open { transform: translateX(0); }

/* Header del drawer */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.drawer-brand {
  font-family: "Inter", sans-serif;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.drawer-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.drawer-close:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(177, 15, 46, 0.08);
}

/* Nav links del drawer */
.drawer-nav {
  list-style: none;
  padding: 16px 0;
  margin: 0;
  flex: 1;
}

.drawer-nav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: color 0.25s ease, padding-left 0.25s ease, background 0.25s ease;
  position: relative;
}

.drawer-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--color-accent);
  transform: scaleY(0);
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  border-radius: 0 2px 2px 0;
}

.drawer-link:hover,
.drawer-link.active {
  color: #fff;
  padding-left: 32px;
  background: rgba(177, 15, 46, 0.06);
}

.drawer-link:hover::before,
.drawer-link.active::before { transform: scaleY(1); }

.drawer-num {
  font-size: 0.65rem;
  color: var(--color-accent);
  opacity: 0.6;
  font-family: "Source Code Pro", monospace;
  letter-spacing: 0;
  width: 18px;
  flex-shrink: 0;
}

/* Bottom section */
.drawer-bottom {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-shrink: 0;
}

.drawer-cv {
  width: 100%;
  justify-content: center;
  font-size: 0.9rem;
}

.drawer-social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.drawer-social-row a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  text-decoration: none;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.drawer-social-row a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(177, 15, 46, 0.08);
}

/* Ocultar drawer en desktop — Bootstrap ya oculta el toggler */
@media (min-width: 992px) {
  .mobile-drawer,
  .drawer-overlay { display: none !important; }
}

/* =========================================================
   SECCIÓN CONTACTO
========================================================= */
#contacto {
  background-color: var(--color-bg-alt);
  padding: 100px 0;
}

.contacto-sub {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.contacto-titulo {
  font-family: "Inter", sans-serif;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: -1px;
}

.contacto-desc {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.95rem;
  color: var(--color-text-dim);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 420px;
}

/* Info items */
.contacto-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contacto-info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.contacto-info-item:not(.contacto-info-static):hover {
  border-color: rgba(177, 15, 46, 0.35);
  background: rgba(177, 15, 46, 0.06);
  color: #fff;
  transform: translateX(5px);
}

.contacto-info-icon {
  width: 38px;
  height: 38px;
  background: rgba(177, 15, 46, 0.1);
  border: 1px solid rgba(177, 15, 46, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1rem;
  flex-shrink: 0;
}

/* Formulario */
.contacto-form {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 40px;
}

/* Floating label fields */
.form-field {
  position: relative;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.95rem;
  padding: 20px 16px 8px;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
  resize: none;
  display: block;
}

.form-field label {
  position: absolute;
  top: 14px;
  left: 16px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.85rem;
  color: var(--color-text-dim);
  transition: all 0.2s ease;
  pointer-events: none;
  transform-origin: left;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: rgba(177, 15, 46, 0.5);
  background: rgba(177, 15, 46, 0.03);
}

.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
  top: 6px;
  font-size: 0.68rem;
  color: var(--color-accent);
  letter-spacing: 0.5px;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: transparent; }

.contacto-submit {
  width: 100%;
  padding: 15px 28px;
  font-size: 1rem;
  justify-content: center;
}

.form-feedback {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 8px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.88rem;
  line-height: 1.5;
}

.form-feedback.success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

.form-feedback.error {
  background: rgba(177, 15, 46, 0.08);
  border: 1px solid rgba(177, 15, 46, 0.3);
  color: #f87171;
}

/* ── CONTACTO RESPONSIVE ── */
@media (max-width: 991px) {
  #contacto { padding: 70px 0; }
  .contacto-form { padding: 28px; }
}

@media (max-width: 767px) {
  #contacto { padding: 48px 16px; }
  .contacto-titulo { font-size: 3rem; }
  .contacto-desc { max-width: 100%; }
  .contacto-form { padding: 20px 16px; border-radius: 12px; }

  /* En móvil el formulario va primero (más accionable) */
  #contacto > .container > .row { flex-direction: column-reverse; }
  #contacto .col-lg-5 { margin-top: 32px; }
}