/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  /* ancho máximo en desktop */
  margin: 0 auto;
  /* centra horizontalmente */
  padding: 0 20px;
  /* aire en los lados */
}

/* BODY + FONDO DIFUMINADO */
body {
  font-family: Arial, sans-serif;
  color: #e5e7eb;
  line-height: 1.6;

  background: linear-gradient(180deg,
      #020617 0%,
      #0e163a 60%,
      #020617 100%);
  position: relative;
}

/* TEXTURA SUTIL (noise) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.015),
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 2px);
  pointer-events: none;
  z-index: 9999;
}

/* ================= HEADER ================= */

.header {
  background: linear-gradient(135deg,
      #020617,
      #020617,
      rgba(56, 189, 248, 0.15));
  padding: 20px 40px;
  position: relative;
}

/* GLOW SUAVE */
.header::before {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(circle at top left,
      rgba(56, 189, 248, 0.18),
      transparent 60%);
  z-index: 0;

}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.logo-nombre {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header .logo {
  max-height: 100px;
  max-width: 150px;
  width: auto;
  height: auto;
}

.header-text h1 {
  color: #38bdf8;
  font-size: 2rem;
}

.header-text p {
  font-size: 1rem;
  opacity: 0.9;
}

/* ================= NAV ================= */

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav a:hover {
  color: #38bdf8;
}

/* ================= HERO ================= */

.hero {
  padding: 80px 20px;
  text-align: center;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.hero p {
  opacity: 0.85;
}

/* CTA - Llamado a la acción */
.cta {
  margin: 80px auto;
  padding: 60px 20px;
  max-width: 1000px;
  /* evita que se vea estirado en pantallas grandes */
  text-align: center;
  border-radius: 16px;
  /* border: 1px solid #1e293b; */
}

.cta h2 {
  font-size: 2rem;
  color: #38bdf8;
  margin-bottom: 10px;
}

.cta p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  color: #e5e7eb;
}

.btn-cta {
  display: inline-block;
  /* importante */
  padding: 14px 28px;
  background: #38bdf8;
  color: #020617;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-cta:hover {
  background: #0ea5e9;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.25);
  transition: all 0.2s ease;
}




@keyframes ctaPulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }

  70% {
    opacity: 0;
    transform: scale(1.3);
  }

  100% {
    opacity: 0;
  }
}


/* ================= PROYECTOS ================= */

.proyectos {
  padding: 60px 20px;
}

.grid-proyectos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* máximo 3 columnas */
  gap: 20px;
  margin-top: 30px;
}


/* TARJETAS GLASS */
.proyecto {
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 14px;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    max-height 0.4s ease;
  position: relative;
}

.proyecto:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.15);
}

.proyecto img {
  width: 100%;
  border-radius: 10px;
}

/* LINK ENVOLVENTE DE TARJETA */
.proyecto-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* HACER LA TARJETA INTERACTIVA */
.proyecto {
  cursor: pointer;
}

/* INDICADOR VISUAL DE CLICK */
.proyecto::after {
  content: "Toca para ver";
  position: absolute;
  bottom: 14px;
  right: 16px;
  font-size: 0.75rem;
  opacity: 0.5;
}


/* ================= PROYECTOS DESACTIVADOS ================= */

.proyecto.desactivado {
  opacity: 0.5;
  pointer-events: none;
}

.proximo {
  display: inline-block;
  padding: 8px 15px;
  background-color: gray;
  color: #fff;
  border-radius: 6px;
  font-weight: bold;
  cursor: not-allowed;
}

/* ================= PROYECTOS OCULTOS ================= */
/* Estado oculto */
.proyecto.oculto {
  opacity: 0;
  transform: translateY(20px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Estado visible */
.proyecto.visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 1000px;
  /* suficiente para el contenido */
  pointer-events: auto;
}

.ver-mas-container {
  text-align: center;
  margin-top: 40px;
}

.btn-ver-mas {
  padding: 12px 28px;
  background: #38bdf8;
  color: #020617;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-ver-mas:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
}

/* ================= SOBRE MI / CONTACTO ================= */

.sobre-mi,
.contacto {
  text-align: center;
  padding: 50px 20px;
  background-color: transparent;
  /* azul oscuro elegante */
  color: #ffffff;
}

.contacto h2 {
  font-size: 2rem;
  margin-bottom: 25px;
  letter-spacing: 1px;
}

.redes {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 25px;
}

.redes a {
  color: white;
  font-size: 3rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.redes a:hover {
  transform: scale(1.2);
}

.redes a:nth-child(1):hover {
  color: #ff0000;
}

/* YouTube */
.redes a:nth-child(2):hover {
  color: #e1306c;
}

/* Instagram */
.redes a:nth-child(3):hover {
  color: #1877f2;
}

/* Facebook */
.redes a:nth-child(4):hover {
  color: #69C9D0;
}

/* TikTok */

.correo {
  font-size: 1rem;
  opacity: 0.9;
}

.correo a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: bold;
}

.correo a:hover {
  text-decoration: underline;
}


/* ================= FOOTER ================= */

.footer {
  text-align: center;
  padding: 25px;
  background: #020617;
  margin-top: 40px;
}

.footer a {
  color: #38bdf8;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ================= PROYECTOS INDIVIDUALES ================= */

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

  text-decoration: none;
  background-color: #2e509d;
  color: white;

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

  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-volver:hover {
  background-color: #1e293b;
  transform: translateX(-3px);
}

.btn-volver span {
  transition: transform 0.2s ease;
}

.btn-volver:hover span {
  transform: translateX(-4px);
}


.proyecto-detalle {
  max-width: 900px;
  /* ancho cómodo para lectura */
  margin: 0 auto;
  /* centra la página */
  padding: 60px 20px;
  /* espacio arriba y laterales */
  width: 100%;
  text-align: center;
  /* centra el texto */
}

.proyecto-detalle img {
  width: 100%;
  max-width: 400px;
  display: block;
  border-radius: 12px;
  margin: 20px auto;
}

.proyecto-detalle ul {
  list-style: none;
  margin: 20px 0;
}

.proyecto-detalle section {
  margin-bottom: 50px;
}

.proyecto-detalle p,
.proyecto-detalle li {
  line-height: 1.6;
  font-size: 1.05rem;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

  .header-content {
    flex-direction: column;
    align-items: center;
  }

  .logo-nombre {
    order: 1;
    flex-direction: column;
    text-align: center;
  }

  .nav {
    order: 2;
    width: 100%;
    justify-content: center;
    margin-top: 12px;
    flex-wrap: wrap;
  }

  .header .logo {
    max-height: 100px;
    max-width: 150px;
  }

  .contacto {
    padding: 40px 15px;
  }

  .redes {
    gap: 35px;
  }

  .redes a {
    font-size: 3.8rem;
    /* MÁS GRANDES EN CELULAR */
  }

  .correo {
    font-size: 1.1rem;
  }

  .adsense {
    padding: 5px;
    max-width: 100%;
  }
}

/* @media (max-width: 1024px) {
  .grid-proyectos {
    grid-template-columns: repeat(2, 1fr);
  }
} */

@media (max-width: 600px) {
  .grid-proyectos {
    grid-template-columns: 2fr;
  }
}

/* ================= ANIMACIONES ================= */
@keyframes glowPulse {
  0% {
    opacity: 0.15;
  }

  50% {
    opacity: 0.35;
  }

  100% {
    opacity: 0.15;
  }
}

.img-proyecto {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.img-proyecto::before {
  content: "";
  position: absolute;
  width: 80%;
  height: 80%;
  background: rgba(42, 136, 177, 0.25);
  filter: blur(40px);
  z-index: 0;
  border-radius: 50%;
}

.img-proyecto img {
  position: relative;
  z-index: 1;
  max-width: 100%;
}

/* MODAL - FORMULARIO */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-contenido {
  background: #020617;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  border-radius: 10px;
}

.modal h2 {
  margin-bottom: 10px;
}

.modal label {
  display: block;
  margin-top: 15px;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  background: #0e163a;
  color: #fff;
  border: 1px solid #1e293b;
  border-radius: 5px;
}

.cerrar {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

.mensaje-exito {
  display: none;
  text-align: center;
  padding: 30px 20px;
}

.mensaje-exito h3 {
  color: #38bdf8;
  margin-bottom: 10px;
}

.mensaje-exito p {
  color: #e5e7eb;
  font-size: 1rem;
}

/* BOTÓN */
/* .btn-cta {
  display: block;
  margin-top: 20px auto;
  padding: 12px 20px;
  background: #38bdf8;
  color: #020617;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
} */

p {
  margin: 1.5rem 0;
}

/* ANUNCIOS */
.adsense {
  max-width: 1200px;
  margin: 30px auto;
  /* espacio vertical y centrado horizontal */
  padding: 10px;
  border: 1px dashed #ccc;
  border-radius: 8px;
  text-align: center;
  background-color: #f9f9f9;
}