@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Syne:wght@400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

/* ================================
   ESTILOS HERO MODERNIZADO MEJORADO
   ================================ */

/* Hero Section - Sin paralax, posición normal */
#hero {
  position: relative;
  z-index: 1;
  transform: none !important;
}

/* Tipografía artística para el Hero */
#hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  background: linear-gradient(135deg, #0d6efd 0%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  margin-bottom: 1.5rem;
  animation: slideInDown 0.8s ease-out, floatText 4s ease-in-out 1s infinite;
  position: relative;
}

#hero h1:hover {
  animation: slideInDown 0.8s ease-out, floatText 2s ease-in-out infinite;
}

@keyframes floatText {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.02);
  }
}

#hero h1 br {
  display: block;
  content: "";
}

#hero h1 span.text-primary {
  background: linear-gradient(135deg, #00d4ff 0%, #0d6efd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  letter-spacing: -3px;
}

/* Párrafo de saludo mejorado con movimiento */
#hero .text-primary.fw-semibold {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #00d4ff !important;
  animation: slideInLeft 0.8s ease-out, glowMove 3s ease-in-out 0.8s infinite;
  position: relative;
  display: inline-block;
}

@keyframes glowMove {
  0%, 100% {
    transform: translateX(0px);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
  }
  50% {
    transform: translateX(10px);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
  }
}

#hero .text-primary.fw-semibold i {
  animation: wiggle 2s ease-in-out 0.8s infinite;
  display: inline-block;
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}

/* Subtítulo "Full Stack Developer" con animación de escritura */
#hero .fs-4.text-light-emphasis.fw-medium {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 1.5rem;
  position: relative;
  min-height: 2.5rem;
  animation: glowText 3s ease-in-out 0.5s infinite;
}

/* Animación de escritura para "Full Stack Developer" - INFINITA */
.typing-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid #00d4ff;
  animation: typing 2s steps(25, end) 0.3s infinite, 
             blink-caret 0.75s step-end 0.3s infinite;
  max-width: 100%;
}

@keyframes typing {
  0% {
    width: 0;
  }
  100% {
    width: 24em;  /* Ancho reducido para no extenderse tanto */
  }
}

@keyframes blink-caret {
  from, to {
    border-right-color: #00d4ff;
  }
  50% {
    border-right-color: transparent;
  }
}

/* Agregar brillo animado al texto */
@keyframes glowText {
  0%, 100% {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3), 0 0 20px rgba(13, 110, 253, 0.2);
  }
  50% {
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.6), 0 0 40px rgba(13, 110, 253, 0.4);
  }
}

#hero .fs-4.text-light-emphasis.fw-medium .text-primary {
  font-weight: 800;
  color: #00d4ff;
}

/* Descripción con tipografía mejorada y movimientos */
#hero .lead.text-light-emphasis {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.75) !important;
  animation: slideInUp 0.8s ease-out 0.3s both, shineEffect 4s ease-in-out 1.1s infinite;
  position: relative;
}

@keyframes shineEffect {
  0%, 100% {
    text-shadow: none;
  }
  50% {
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
  }
}

#hero .lead.text-light-emphasis:hover {
  animation: slideInUp 0.8s ease-out 0.3s both, shineEffect 2s ease-in-out infinite;
}

/* Foto circular con glow - MEJORADA */
.profile-circle-hero {
  width: 400px;
  height: 400px;
  max-width: 100%;
  position: relative;
  animation: floatHero 3.5s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
  filter: drop-shadow(0 0 60px rgba(13, 110, 253, 0.5));
  flex-shrink: 0;
}

@keyframes floatHero {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-25px) scale(1.02);
  }
}

.profile-img-hero {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #0d6efd;
  box-shadow: 0 0 40px rgba(13, 110, 253, 0.7), inset 0 0 40px rgba(0, 212, 255, 0.1);
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
}

.profile-img-hero:hover {
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.8), inset 0 0 50px rgba(13, 110, 253, 0.2);
  filter: brightness(1.05);
}

.profile-circle-glow {
  position: absolute;
  top: -30px;
  left: -30px;
  right: -30px;
  bottom: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 110, 253, 0.4) 0%, rgba(0, 212, 255, 0.2) 40%, transparent 70%);
  animation: glowPulse 4s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
  z-index: 1;
}

@keyframes glowPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.4;
  }
}

/* Iconos de redes sociales en Hero */
.social-icon-hero {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.2), rgba(0, 212, 255, 0.1));
  border: 2.5px solid rgba(13, 110, 253, 0.4);
  border-radius: 50%;
  color: #0d6efd;
  font-size: 1.3rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.8s ease-out 0.5s both, float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.social-icon-hero:nth-child(1) {
  animation-delay: 0.5s, 0.5s;
}

.social-icon-hero:nth-child(2) {
  animation-delay: 0.6s, 0.6s;
}

.social-icon-hero:nth-child(3) {
  animation-delay: 0.7s, 0.7s;
}

.social-icon-hero:nth-child(4) {
  animation-delay: 0.8s, 0.8s;
}

.social-icon-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.social-icon-hero:hover {
  background: linear-gradient(135deg, #0d6efd, #00d4ff);
  color: white;
  border-color: #00d4ff;
  transform: translateY(-12px) scale(1.15) rotate(5deg);
  box-shadow: 0 12px 30px rgba(13, 110, 253, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.1);
  animation: none;
}

.social-icon-hero:hover::before {
  left: 100%;
}

/* Botones CTA mejorados */
#hero .btn {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  padding: 0.8rem 2.5rem;
  border-radius: 2rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.8s ease-out 0.4s both, pulseButton 2s ease-in-out 1.2s infinite;
}

#hero .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.4s ease;
  z-index: -1;
}

#hero .btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 35px rgba(13, 110, 253, 0.3);
  animation: none;
}

#hero .btn:hover::before {
  left: 100%;
}

@keyframes pulseButton {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.4);
  }
}

#hero .btn-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #00d4ff 100%);
  border: 2px solid transparent;
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

#hero .btn-primary:hover {
  background: linear-gradient(135deg, #00d4ff 0%, #0d6efd 100%);
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.5);
}

#hero .btn-outline-primary {
  border: 2.5px solid #0d6efd;
  color: #0d6efd;
  background: transparent;
}

#hero .btn-outline-primary:hover {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(0, 212, 255, 0.1));
  border-color: #00d4ff;
  color: #00d4ff;
}

/* Animaciones de entrada */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* Responsive para Hero */
@media (max-width: 991px) {
  #hero h1 {
    font-size: 3.5rem;
  }

  #hero .fs-4.text-light-emphasis.fw-medium {
    font-size: 1.5rem;
  }

  #hero .lead.text-light-emphasis {
    font-size: 1.1rem;
  }

  .profile-circle-hero {
    width: 350px;
    height: 350px;
    position: absolute;
    top: 0;
    right: 2%;  /* ✅ Ajustado para pantallas más pequeñas */
  }

  #hero .pe-lg-5 {
    padding-right: 0 !important;
    text-align: center;
  }

  #hero h1 {
    margin-bottom: 1rem;
  }

  #hero .text-primary.fw-semibold {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  #hero h1 {
    font-size: 2.8rem;
  }

  #hero .fs-4.text-light-emphasis.fw-medium {
    font-size: 1.3rem;
  }

  #hero .lead.text-light-emphasis {
    font-size: 1rem;
  }

  .profile-circle-hero {
    width: 310px;
    height: 310px;
    position: relative;
    flex-shrink: 0;
    margin: 0 auto;
  }

  .social-icon-hero {
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
  }

  /* Email contact en tablet - más bajo */
  .email-contact-hero {
    margin-top: 2.5rem !important;
  }
}

@media (max-width: 576px) {
  #hero h1 {
    font-size: 2.2rem;
    letter-spacing: -1px;
  }

  #hero .text-primary.fw-semibold {
    font-size: 1rem;
    letter-spacing: 1px;
  }

  #hero .fs-4.text-light-emphasis.fw-medium {
    font-size: 1.2rem;
  }

  #hero .lead.text-light-emphasis {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .profile-circle-hero {
    width: 270px;
    height: 270px;
    position: relative;
    flex-shrink: 0;
    margin: 0 auto;
  }

  .social-icon-hero {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  #hero .btn {
    font-size: 0.95rem;
    padding: 0.7rem 2rem;
  }

  /* Email contact en móviles - más bajo */
  .email-contact-hero {
    margin-top: 2rem !important;
  }
}

/* ================================
   ESTILOS MEJORADOS PARA SECCIÓN TECNOLOGÍAS
   ================================ */

/* Títulos de Tecnologías con animación */
#tecnologias h2 {
  animation: glowInText 1s ease-out;
}

#tecnologias h3 {
  animation: slideInDown 0.8s ease-out;
  position: relative;
  padding-bottom: 1rem;
}

#tecnologias h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  animation: expandWidth 0.8s ease-out 0.5s both;
}

@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 100px;
  }
}

@keyframes glowInText {
  from {
    opacity: 0;
    text-shadow: 0 0 0px rgba(0, 212, 255, 0);
  }
  to {
    opacity: 1;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3), 0 0 40px rgba(13, 110, 253, 0.2);
  }
}

/* Mejorar Cards de Tecnología */
.tech-card-main {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(0, 212, 255, 0.05));
  border: 1px solid rgba(13, 110, 253, 0.3);
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
}

.tech-card-main::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  animation: rotate 3s linear infinite;
  z-index: -1;
}

.tech-card-main:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 20px 50px rgba(0, 212, 255, 0.2);
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.2), rgba(0, 212, 255, 0.1));
}

.tech-card-body {
  padding: 2rem 1.5rem;
  text-align: center;
  animation: fadeInScale 0.8s ease-out;
}

.tech-icon-main {
  max-width: 80px;
  height: auto;
  margin-bottom: 1rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 15px rgba(13, 110, 253, 0.3));
}

.tech-card-main:hover .tech-icon-main {
  transform: rotate(-10deg) scale(1.15);
  filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.6));
}

.tech-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem;
  transition: all 0.3s ease;
}

.tech-card-main:hover .tech-title {
  color: #00d4ff;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.tech-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
  transition: all 0.3s ease;
}

.tech-card-main:hover .tech-description {
  color: #fff;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ================================
   EMAIL CONTACT EN HERO
   ================================ */

.email-contact-hero {
  animation: slideInUp 0.8s ease-out 0.4s both;
  pointer-events: auto;
}

.email-icon-wrapper {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(13, 110, 253, 0.2) 100%);
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #00d4ff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pulse 2s ease-in-out infinite;
}

.email-contact-hero:hover .email-icon-wrapper {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3) 0%, rgba(13, 110, 253, 0.3) 100%);
  border-color: #00d4ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  transform: scale(1.1);
}

.email-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.email-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.email-address-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(13, 110, 253, 0.1) 100%);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  transition: all 0.3s ease;
  user-select: none;
}

.email-contact-hero:hover .email-address-container {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(13, 110, 253, 0.15) 100%);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.email-address {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #00d4ff;
  user-select: none;
  pointer-events: none;
}

.email-action-btn {
  background: transparent;
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: rgba(0, 212, 255, 0.7);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
  padding: 0;
}

.email-action-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: #00d4ff;
  color: #00d4ff;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
  transform: scale(1.1);
}

.email-action-btn:active {
  transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
  .email-contact-hero {
    flex-direction: column;
    align-items: center;
  }

  .email-icon-wrapper {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .email-address-container {
    padding: 0.6rem 1rem;
  }

  .email-address {
    font-size: 0.9rem;
  }

  .email-action-btn {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .email-contact-hero {
    gap: 1rem;
    align-items: center;
  }

  .email-icon-wrapper {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .email-label {
    font-size: 0.85rem;
  }

  .email-address {
    font-size: 0.85rem;
  }

  .email-address-container {
    padding: 0.5rem 0.8rem;
    gap: 0.6rem;
  }

  .email-action-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
}
