/* HOME / INDEX - HERO Y SOBRE MÍ */

/* HERO */
.hero{
  position: relative;
  min-height: calc(100vh - var(--header-h));
  padding: 32px 16px 80px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #8b5cf6 100%);
  overflow: hidden;
}

.hero-content{
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero-name{
  margin: 0;
  font-weight: 800;
  font-size: clamp(48px, 10vw, 96px);
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.15);
  letter-spacing: -0.02em;
}

.hero-title{
  margin: 16px 0 0;
  font-weight: 600;
  font-size: clamp(18px, 3vw, 28px);
  color: rgba(255, 255, 255, 0.95);
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

#typewriter-text{
  display: inline-block;
}

.cursor{
  display: inline-block;
  color: #ffffff;
  animation: blink 1s infinite;
  font-weight: 400;
  margin-left: 2px;
}

@keyframes blink{
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero-desc{
  max-width: 820px;
  margin: 12px auto 0;
  font-size: clamp(14px, 2.1vw, 18px);
  color: rgba(255, 255, 255, 0.9);
}

.hero-cta{
  margin-top: 32px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-hero-primary{
  color: #667eea;
  background: #ffffff;
  border: 2px solid transparent;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.btn-hero-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  background: #f8f9ff;
}

.btn-hero-outline{
  color: #ffffff;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.8);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 8px;
}

.btn-hero-outline:hover{
  background: rgba(255,255,255,0.15);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

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

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

.animate-fade-in{
  animation: fadeIn 1s ease-out forwards;
  opacity: 0;
}

.animate-fade-in-up{
  animation: fadeInUp 1s ease-out 0.3s forwards;
  opacity: 0;
}

.animate-fade-in-up-delay{
  animation: fadeInUp 1s ease-out 0.6s forwards;
  opacity: 0;
}

.animate-bounce-in{
  animation: fadeIn 1s ease-out 1.2s forwards;
  opacity: 0;
}

.scroll-indicator{
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);

  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  color: rgba(255,255,255,0.85);
  cursor: pointer;

  animation: bounceArrow 2s ease-in-out infinite;
  transition: color .3s, opacity .3s;
  z-index: 2;
  opacity: 0.9;
}

.scroll-indicator:hover{
  color: #ffffff;
  opacity: 1;
  animation-play-state: paused;
}

.scroll-indicator svg{
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
  stroke-width: 2.5;
}

@keyframes bounceArrow{
  0%, 100%{
    transform: translateX(-50%) translateY(0);
  }
  50%{
    transform: translateX(-50%) translateY(15px);
  }
}

/* SOBRE MÍ */
.about{
  background: #f7f9fc;
  padding: 48px 0;
}

.about-content{
  display: grid;
  gap: 24px;
}

.profile-full{
  width: 100%;
}

.about-grid{
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.profile{
  grid-row: 1 / span 2;
}

.profile p{
  margin: 0 0 14px;
  line-height: 1.8;
  color: #334155;
}

/* HABILIDADES TÉCNICAS */
.skills-section{
  background: #fff;
  padding: 48px 0 64px;
}

.skills-category{
  margin-bottom: 48px;
  
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.skills-category.animate-visible{
  opacity: 1;
  transform: translateY(0);
}

.skills-category:nth-child(2).animate-visible{
  transition-delay: 0.1s;
}
.skills-category:nth-child(3).animate-visible{
  transition-delay: 0.2s;
}
.skills-category:nth-child(4).animate-visible{
  transition-delay: 0.3s;
}
.skills-category:nth-child(5).animate-visible{
  transition-delay: 0.4s;
}
.skills-category:nth-child(6).animate-visible{
  transition-delay: 0.5s;
}
.skills-category:nth-child(7).animate-visible{
  transition-delay: 0.6s;
}

.skills-category:last-child{
  margin-bottom: 0;
}

.category-title{
  display: flex;
  align-items: center;
  gap: 12px;

  margin: 0 0 20px;
  padding-bottom: 12px;
  font-size: 26px;
  font-weight: 700;
  color: #4b5563;
  
  border-bottom: 2px solid #e5e7eb;
  position: relative;
}

.category-title::after{
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 2px;
}

.category-icon{
  width: 28px;
  height: 28px;
  color: #6366f1;
  flex-shrink: 0;
}

.pillset{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 16px;
  border-radius: 999px;

  font-weight: 600;
  font-size: 14px;

  color: #4b5563;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;

  user-select: none;
  cursor: default;

  transition: all 0.25s ease;
}

.pill:hover{
  color: #6366f1;
  background: #eef2ff;
  border-color: #c7d2fe;
  
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.tech-icon{
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

.pill:hover .tech-icon{
  opacity: 1;
}

.pillset.with-icons .pill{
  padding: 10px 16px 10px 12px;
}

.skills-category:nth-child(6) .pill{
  color: #6b7280;
  background: #ffffff;
  border-color: #d1d5db;
}

.skills-category:nth-child(6) .pill:hover{
  color: #374151;
  background: #f3f4f6;
  border-color: #9ca3af;
  
  transform: scale(1.04) translateY(-1px);
  box-shadow: 0 3px 10px rgba(107, 114, 128, 0.12);
}

.languages .lang-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  transition: background 0.2s ease;
}

.languages .lang-row:hover{
  background: #f9fafb;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px;
}

.languages .lang-row + .lang-row{
  border-top: 1px solid rgba(0,0,0,.06);
}

.languages span{
  color: #374151;
  font-weight: 500;
}

.badge{
  display: inline-flex;
  align-items: center;

  padding: 6px 10px;
  border-radius: 999px;

  font-weight: 700;
  font-size: 13px;

  color: #6366f1;
  background: #eef2ff;
  border: 1.5px solid #c7d2fe;

  user-select: none;
  cursor: default;
  transition: all 0.25s ease;
}

.badge:hover{
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.15);
}

.languages-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

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

  padding: 16px 20px;
  border-radius: 12px;

  background: #f9fafb;
  border: 1.5px solid #e5e7eb;

  transition: all 0.25s ease;
}

.lang-item:hover{
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
  border-color: #c7d2fe;
  background: #ffffff;
}

.lang-name{
  font-weight: 600;
  font-size: 15px;
  color: #374151;
}

.lang-level{
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  
  color: #6366f1;
  background: #eef2ff;
  border: 1.5px solid #c7d2fe;
  
  transition: all 0.25s ease;
}

.lang-item:hover .lang-level{
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}

/* RESPONSIVE */
@media (max-width: 900px){
  .about-grid{
    grid-template-columns: 1fr;
  }
  .profile{
    grid-row: auto;
  }
}

@media (max-width: 600px){
  .hero{
    padding: 24px 16px 60px;
  }
  
  .hero-name{
    font-size: clamp(36px, 12vw, 72px);
  }
  
  .hero-title{
    font-size: clamp(16px, 4vw, 24px);
  }
  
  .hero-cta{
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .btn-hero-primary,
  .btn-hero-outline{
    width: 100%;
  }
}
