/* ─── ANIMACIONES DE ENTRADA ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes slideInLeft {
  from { transform: translateX(-30px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* ─── ANIMACIÓN INICIAL DE PÁGINA ─── */
.contenedor {
  animation: fadeIn 0.8s ease-out forwards;
}

.perfil {
  animation: slideInUp 0.8s ease-out 0.2s both;
}

.foto-perfil {
  animation: fadeIn 1s ease-out 0.4s both;
}

h1, .perfil-info p {
  animation: slideInUp 0.8s ease-out 0.6s both;
}

/* ─── EFECTO TIPEO ─── */
@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.typing-effect {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--color-primary);
  width: 0;
  display: inline-block;
  max-width: 100%;
}

.typing-effect.animate {
  animation:
    typing 2.8s steps(40, end) forwards,
    blink 1s step-end infinite;
}

/* ─── FLOAT PARA REDES SOCIALES ─── */
@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

.float-element {
  animation: float 3s ease-in-out infinite;
}

.float-element:nth-child(2) { animation-delay: 0.3s; }
.float-element:nth-child(3) { animation-delay: 0.6s; }
.float-element:nth-child(4) { animation-delay: 0.9s; }

/* ─── GLOWING ─── */
@keyframes glowing {
  0%   { box-shadow: 0 0 5px rgba(52, 152, 219, 0.4); }
  50%  { box-shadow: 0 0 20px rgba(52, 152, 219, 0.8); }
  100% { box-shadow: 0 0 5px rgba(52, 152, 219, 0.4); }
}

.btn-glow:hover {
  animation: glowing 1.5s infinite;
}

/* ─── PROGRESS BARS ─── */
@keyframes progressFill {
  from { width: 0%; }
}

/* ─── CONTADORES ─── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stat-item {
  animation: countUp 0.5s ease-out both;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

/* ─── TEMA ─── */
.theme-switch {
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ─── TIMELINE DOTS ─── */
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(52, 152, 219, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}

.timeline-dot {
  animation: pulseDot 2s infinite;
}

/* ─── HOVER EN TARJETAS DE EXPERIENCIA ─── */
.experiencia-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experiencia-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
