/* ======= ESTILOS GENERALES ======= */
body {
  font-family: 'Orbitron', sans-serif;
  background: radial-gradient(circle at center, #0a0a23, #000000);
  color: #e0e0e0;
  scroll-behavior: smooth;
  margin: 0;
  position: relative;
  overflow-x: hidden;
}

/* ======= PARTICLES ======= */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ======= NAVBAR ======= */
.navbar-dark {
  background: linear-gradient(180deg, rgba(10, 10, 35, 0.9), rgba(0, 0, 0, 0.7)) !important;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 20px rgba(0, 168, 255, 0.5);
  z-index: 1000;
}

.navbar-brand, .nav-link {
  color: #00e6ff !important;
  text-shadow: 0 0 8px rgba(0, 230, 255, 0.7);
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #ffffff !important;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

/* ======= HERO ======= */
.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(10, 10, 35, 0.5));
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 3;
}

.rgb-border {
  padding: 25px;
  border: 4px solid;
  border-image: linear-gradient(45deg, #ff00ff, #00e6ff, #ff5500) 1;
  animation: rgb-border 3s linear infinite;
  box-shadow: 0 0 25px rgba(0, 230, 255, 0.6), inset 0 0 10px rgba(0, 230, 255, 0.3);
  background: rgba(10, 10, 35, 0.5);
  border-radius: 10px;
  backdrop-filter: blur(3px);
}

@keyframes rgb-border {
  0% { border-image-source: linear-gradient(45deg, #ff00ff, #00e6ff, #ff5500); }
  33% { border-image-source: linear-gradient(45deg, #00e6ff, #ff5500, #ff00ff); }
  66% { border-image-source: linear-gradient(45deg, #ff5500, #ff00ff, #00e6ff); }
  100% { border-image-source: linear-gradient(45deg, #ff00ff, #00e6ff, #ff5500); }
}

.lanyard-container {
  perspective: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lanyard-strap {
  width: 70px;
  height: 160px;
  background: linear-gradient(45deg, #00e6ff, #ff00ff);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 0 25px rgba(0, 230, 255, 0.8);
  transition: transform 0.5s ease-in-out;
}

.lanyard-container:hover .lanyard-strap {
  animation: elastic-swing 1.8s ease-in-out infinite;
}

@keyframes elastic-swing {
  0% { transform: rotate(0deg) scaleY(1); }
  20% { transform: rotate(15deg) scaleY(1.3); }
  40% { transform: rotate(-12deg) scaleY(0.7); }
  60% { transform: rotate(10deg) scaleY(1.25); }
  80% { transform: rotate(-8deg) scaleY(0.85); }
  100% { transform: rotate(0deg) scaleY(1); }
}

/* ======= CARD FLIP ======= */
.card-flip {
  width: 300px;
  height: 400px;
  position: relative;
  transition: transform 0.8s ease-in-out;
  transform-style: preserve-3d;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 230, 255, 0.7);
}

.lanyard-container:hover .card-flip {
  transform: rotateY(360deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border: 4px solid;
  border-image: linear-gradient(45deg, #ff00ff, #00e6ff, #ff5500) 1;
  animation: rgb-border 3s linear infinite;
  border-radius: 15px;
  padding: 15px;
  background: linear-gradient(145deg, #0a0a23, #1a1a2e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.card-front {
  transform: rotateY(0deg);
}

.card-back {
  transform: rotateY(180deg);
  position: relative;
  overflow: hidden;
}

.profile-img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #00e6ff;
  box-shadow: 0 0 15px rgba(0, 230, 255, 0.5);
}

.card-profile-info {
  margin-top: 10px;
  text-align: center;
  color: #e0e0e0;
  font-size: 1em;
  overflow: hidden;
}

.card-profile-info p {
  margin: 4px 0;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.card-profile-info p:first-child {
  color: #00e6ff;
  font-weight: 700;
}

.back-icons {
  position: relative;
  width: 100%;
  height: 100%;
}

.back-icons i {
  color: #00e6ff;
  text-shadow: 0 0 10px rgba(0, 230, 255, 0.7);
  transition: transform 0.3s ease;
  position: absolute;
}

.back-icons i:hover {
  transform: scale(1.2);
}

/* Posicionamiento manual de los iconos */
.icon-python { top: 10%; left: 15%; }
.icon-github { top: 25%; right: 20%; }
.icon-vercel { bottom: 30%; left: 25%; }
.icon-git { top: 50%; left: 50%; }
.icon-java { bottom: 15%; right: 15%; }
.icon-linux { top: 15%; left: 40%; }
.icon-html { bottom: 25%; left: 10%; }

.nombre {
  color: #00e6ff;
  text-shadow: 0 0 12px rgba(0, 230, 255, 0.8);
}

/* ======= SECCIONES ======= */
.section {
  padding: 120px 0;
  background: linear-gradient(180deg, #0a0a23, #1a1a2e);
  position: relative;
  z-index: 2;
}

/* ======= HABILIDADES ======= */
.skill-item {
  background: rgba(10, 10, 35, 0.8);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 230, 255, 0.4);
  border: 3px solid;
  border-image: linear-gradient(45deg, #ff00ff, #00e6ff, #ff5500) 1;
  animation: rgb-border 3s linear infinite;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.skill-item:hover {
  transform: scale(1.15) translateY(-5px);
  box-shadow: 0 0 40px rgba(0, 230, 255, 0.9);
}

.skill-icon {
  color: #00e6ff;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  animation: glow-pulse 3s ease-in-out infinite;
}

.skill-item:hover .skill-icon {
  transform: scale(1.1);
  color: #ffffff;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9));
}

@keyframes glow-pulse {
  0% { filter: drop-shadow(0 0 12px rgba(0, 230, 255, 0.7)); }
  50% { filter: drop-shadow(0 0 20px rgba(255, 85, 0, 0.7)); }
  100% { filter: drop-shadow(0 0 12px rgba(0, 230, 255, 0.7)); }
}

.skill-name {
  font-size: 1.1em;
  font-weight: 600;
  color: #e0e0e0;
  text-shadow: 0 0 8px rgba(0, 230, 255, 0.6);
}

/* ======= CARDS PROYECTOS ======= */
.card {
  background: rgba(10, 10, 35, 0.9);
  border: 3px solid;
  border-image: linear-gradient(45deg, #ff00ff, #00e6ff, #ff5500) 1;
  animation: rgb-border 3s linear infinite;
  box-shadow: 0 0 20px rgba(0, 230, 255, 0.5);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border-radius: 12px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-15px);
  box-shadow: 0 0 40px rgba(0, 230, 255, 0.8);
}

.card-img-top-container {
  overflow: hidden;
  position: relative;
}

.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-img-top {
  transform: scale(1.1);
}

.card-body {
  color: #e0e0e0;
  padding: 20px;
}

.card-title {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 230, 255, 0.6);
}

.btn-outline-neon {
  border: 3px solid;
  border-image: linear-gradient(45deg, #ff00ff, #00e6ff, #ff5500) 1;
  animation: rgb-border 3s linear infinite;
  color: #ffffff;
  background: transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.4s ease;
}

.btn-outline-neon:hover {
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(0, 230, 255, 0.9);
  color: #0a0a23;
  background: #00e6ff;
}

.btn-outline-neon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 255, 0.5), transparent);
  transition: left 0.6s ease;
  z-index: -1;
}

.btn-outline-neon:hover::before {
  left: 100%;
}

/* ======= MODALES ======= */
.modal.fade .modal-dialog {
  transform: scale(0.7);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.modal.show .modal-dialog {
  transform: scale(1);
  opacity: 1;
}

.rgb-modal {
  border: 4px solid;
  border-image: linear-gradient(45deg, #ff00ff, #00e6ff, #ff5500) 1;
  animation: rgb-border 3s linear infinite;
  box-shadow: 0 0 40px rgba(0, 230, 255, 0.8);
  background: rgba(10, 10, 35, 0.95);
}

.modal-content {
  background: transparent;
  color: #e0e0e0;
  backdrop-filter: blur(5px);
}

.modal-header {
  border-bottom: 2px solid #00e6ff;
}

.modal-footer {
  border-top: 2px solid #00e6ff;
}

.btn-secondary {
  background: rgba(10, 10, 35, 0.8);
  border-color: #00e6ff;
  box-shadow: 0 0 15px rgba(0, 230, 255, 0.6);
}

.btn-secondary:hover {
  background: #00e6ff;
  color: #0a0a23;
  box-shadow: 0 0 25px rgba(0, 230, 255, 0.9);
}

/* ======= CONTACTO ======= */
.btn-neon {
  background: transparent;
  border: 3px solid #00e6ff;
  color: #00e6ff;
  box-shadow: 0 0 20px rgba(0, 230, 255, 0.6);
  animation: glow-pulse 3s ease-in-out infinite;
  transition: all 0.4s ease;
  padding: 12px 30px;
}

.btn-neon:hover {
  background: #00e6ff;
  color: #0a0a23;
  box-shadow: 0 0 40px rgba(0, 230, 255, 0.9);
}

.contact-info li {
  margin-bottom: 20px;
  font-size: 1.2em;
}

.contact-info i {
  color: #00e6ff;
  margin-right: 10px;
}

.contact-info a {
  color: #00e6ff;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(0, 230, 255, 0.6);
}

.contact-info a:hover {
  text-decoration: underline;
  text-shadow: 0 0 15px rgba(0, 230, 255, 0.9);
}

/* ======= FOOTER ======= */
footer {
  background: linear-gradient(180deg, #0a0a23, #000000);
  box-shadow: 0 0 20px rgba(0, 230, 255, 0.5);
}

/* ======= BOTÓN WHATSAPP ======= */
.whatsapp-float {
  position: fixed;
  width: 70px;
  height: 70px;
  bottom: 30px;
  right: 30px;
  background: #25d366;
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.6);
  animation: glow-pulse-whatsapp 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.whatsapp-float i {
  font-size: 2.5em;
  color: #ffffff;
}

.whatsapp-float:hover {
  transform: scale(1.2);
  box-shadow: 0 0 30px rgba(37, 211, 102, 0.9);
}

@keyframes glow-pulse-whatsapp {
  0% { box-shadow: 0 0 20px rgba(37, 211, 102, 0.6); }
  50% { box-shadow: 0 0 30px rgba(37, 211, 102, 0.9); }
  100% { box-shadow: 0 0 20px rgba(37, 211, 102, 0.6); }
}

/* ======= AJUSTES PARA MOBILE ======= */
@media (max-width: 768px) {
  .hero {
    padding: 100px 20px 20px;
  }
  .lanyard-strap {
    height: 120px;
    width: 60px;
  }
  .card-flip {
    width: 220px;
    height: 320px;
  }
  .profile-img {
    max-height: 180px;
  }
  .card-profile-info {
    font-size: 0.9em;
  }
  .back-icons i {
    font-size: 1.8em;
  }
  .icon-python { top: 15%; left: 10%; }
  .icon-github { top: 30%; right: 15%; }
  .icon-vercel { bottom: 25%; left: 20%; }
  .icon-git { top: 45%; left: 55%; }
  .icon-java { bottom: 10%; right: 10%; }
  .icon-linux { top: 20%; left: 45%; }
  .icon-html { bottom: 30%; left: 15%; }
  .rgb-border {
    padding: 20px;
  }
  .skill-item {
    padding: 20px;
  }
  .skill-icon {
    font-size: 3.5rem;
  }
  .skill-name {
    font-size: 1rem;
  }
  .card-img-top {
    height: 150px;
  }
}