/* EL RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Para todos */
body {
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  background-color: #202020;
  color: #D6D6D6;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Barra */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #333533;
  color: #FFFFFF;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(-90deg, #284B63, #00A8E8, #8ECAE6);
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text; 
  color: transparent;
  animation: logoRGB 10s linear infinite;
}

@keyframes logoRGB {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links li a {
  color: #D6D6D6;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: #00A8E8;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Carta de Hero Principal */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 90vh;
  background: linear-gradient(-45deg, #003459, #284B63, #00A8E8, #8ECAE6);
  background-size: 900% 600%;
  color: #D6D6D6;
  text-align: center;
  padding: 2rem;
  animation: heroBG 10s linear infinite, glowHero 10s ease-in-out infinite alternate;
  margin-bottom: 4.8rem;
  border-radius: 1px 1px 50rem 50rem;
}

.hero h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-top: -3rem; /* En caso de error siempre revisar esto*/
}

.hero h1 span {
  font-weight: 400;
  font-size: 1.4rem;
  display: block;
  margin-top: 0.5rem;
}

.typing-text {
  font-size: 1.2rem;
  font-weight: 500;
  min-height: 40px;
  margin-top: 1rem;
  text-align: center;
  color: #D6D6D6;
}

.typed-text {
  position: relative;
}

.typed-text::after {
  content: "";
  position: absolute;
  right: -5px;
  width: 2px;
  height: 100%;
  background-color: #92dce5;
  animation: blink 0.7s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  border-radius: 50%;
  border: 2px solid #92dce5;
  color: #92dce5;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: #92dce5;
  color: #2b2d42;
  transform: scale(1.15) translateY(-4px);
  box-shadow: 0 0 20px #92dce5;
}

.btn {
  display: inline-block;
  padding: 1rem 1rem;
  font-size: 1rem;
  border-radius: 3rem;
  color: #92dce5;
  font-weight: 600;
  border: 2px solid #92dce5;
  transition: 0.3s ease;
  text-align: center;
  margin-top: 0.2rem;
}

.btn:hover {
  background-color: #92dce5;
  color: #2b2d42;
  box-shadow: 0 0 20px #92dce5;
  transform: scale(1.05) translateY(-4px);
}

.contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 600px) {
  .contact-container {
    gap: 1rem;
  }

  /* Para asegurar que si este abajo */
  .social-icons {
    margin-bottom: 0.5rem;
  }
}

@keyframes heroBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes glowHero {
  0% {
    box-shadow: -30px 0 60px rgba(0, 52, 89, 0.9), 30px 0 60px rgba(0, 52, 89, 0.9);
  }
  33% {
    box-shadow: -30px 0 60px rgba(0, 126, 167, 0.9), 30px 0 60px rgba(0, 126, 167, 0.9);
  }
  66% {
    box-shadow: -30px 0 60px rgba(0, 168, 232, 0.9), 30px 0 60px rgba(0, 168, 232, 0.9);
  }
  100% {
    box-shadow: -30px 0 60px rgba(142, 202, 230, 0.9), 30px 0 60px rgba(142, 202, 230, 0.9);
  }
}

/* Las Secciones */
section {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: auto;
}

/*.sobre-mi {
    background: #202020;
}*/

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.proyecto {
  background: #333533;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.proyecto:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 168, 232, 0.6);
}

.proyecto img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}


/* Form que conecta con el EMAILJS */
.contacto form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contacto input,
.contacto textarea {
  padding: 0.8rem;
  border: 1px solid #D6D6D6;
  border-radius: 5px;
}

.contacto button {
  background: #00A8E8;
  color: #D6D6D6;
  border: none;
  padding: 0.8rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.contacto button:hover {
  background: #8ECAE6;
}

/* Pie */
footer {
  text-align: center;
  background: #333533;
  color: #D6D6D6;
  padding: 1rem;
}

/* Para lograr que sea responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: #222;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* Las demas partes */
.educacion,
.lenguajes,
.experiencia {
  /*background: #202020;*/
  margin-top: 2rem;
}

/* Grid de la info*/
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}


.item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #333533;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  z-index: 1;
}

/* Efectos para lo de los items */
.effect-glow {
  animation: softGlow 4s ease-in-out infinite;
}

@keyframes softGlow {
  0% { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
  50% { box-shadow: 0 1px 20px rgba(0, 168, 232, 0.7); }
  100% { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
}

.effect-line::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, transparent, #00a8e8, transparent);
  transform-origin: center;
  animation: growLine 2s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes growLine {
  0% {
    transform: translateX(-50%) scaleX(0);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
  }
}

.item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.skills {
  /*background: #202020;*/
  margin-top: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.skill i {
  font-size: 2.5rem;
  color: #00A8E8;
  margin-bottom: 0.5rem;
}

.skill p {
  font-size: 1rem;
  font-weight: 500;
}

.skills2 i {
    animation-duration: 3s !important;
}

section {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

.expBox h3{
    font-size: 1rem;
}

