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

body {
  background-color: #fff50e;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  position: relative;
  /* Ocultar scrollbar en todos los navegadores */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE / Edge */
}

body::-webkit-scrollbar {
  display: none; /* Chrome / Safari / Opera */
}

/* --- ESTILOS DE LA INTRO (MAIN) --- */
#static-page {
  width: 100%;
  height: 100vh; /* Forzamos altura de pantalla completa para el pinning */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  color: #000000;
  z-index: 1;
  position: relative;
}

#static-page h1 {
  font-weight: 800;
  font-size: 6rem;
  text-transform: uppercase;
  letter-spacing: 5px;
}

#static-page p {
  line-height: 1;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin-top: 0.1rem;
  opacity: 0.7;
}

.hero-text {
  margin-top: 15vh; /* Ajustado para dar espacio */
  z-index: 5;
  text-align: center;
}

#moaiShow {
  width: 100%;
  height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

/* --- ESTILOS DE LA PANTALLA DE PIXELES --- */
#pixel-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none; /* Se activa con JS */
  grid-template-columns: repeat(10, 1fr);
  z-index: 50; /* Z-index alto para tapar todo al inicio */
  pointer-events: none;
}

.pixel {
  background-color: #fff50e;
  width: 100%;
  height: 100%;
  border: 0.5px solid rgba(0, 0, 0, 0.05);
}

/* --- NAVEGACIÓN --- */
nav {
  position: fixed; /* Fijo para que acompañe el scroll si quieres, o relative si no */
  top: 0;
  right: 0;
  width: 100%;
  z-index: 20;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  display: flex;
  justify-content: flex-end;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 20px;
}

nav a {
  text-decoration: none;
  color: black; /* Cambiado a negro para verse sobre el amarillo */
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
  cursor: pointer;
}

nav a:hover {
  text-decoration: underline;
  color:white;
}

/* --- NUEVA SECCIÓN DE PROYECTOS (ARTÍCULOS) --- */
#projects-section {
  position: relative;
  width: 100%;
  background-color: #fff50e;
  z-index: 10;
  /* Padding top opcional si el pinning lo requiere, pero el pinSpacing suele manejarlo */
}

.project-item {
  min-height: 100vh; /* Ocupa toda la pantalla para el efecto Snap */
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  /* Borde sutil para separar visualmente mientras desarrollas */
  /* border-bottom: 1px solid rgba(0,0,0,0.05); */
}

.project-item h2 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.project-item p {
  font-size: 1.5rem;
  max-width: 800px; /* Aumentado de 600px a 800px como en Sobre mí */
  font-weight: 500;
  line-height: 1.5; /* Agrega "aire" entre renglones */
  text-wrap: balance; /* Hace que los renglones queden parejos */
  margin-top: 1rem; /* Separa los párrafos entre sí */
  text-align: center;
}

/* --- RESPONSIVE --- */
@media (max-width: 670px) {
  #static-page h1 {
    font-size: 3.5rem;
    letter-spacing: 3px;
  }
  .project-item h2 {
    font-size: 3.5rem;
  }
  #static-page p {
    font-size: 0.9rem;
  }
  #moaiShow {
    margin-top: 5vh;
    height: 50vh;
  }
}
/* --- ESTILOS ESPECÍFICOS PARA SOBRE MÍ --- */
#about-me p {
  text-align: center;
  text-justify: distribute;
  font-size: 1.5rem; /* Un poco más grande que el texto normal */
  line-height: 1.5; /* Más espacio entre líneas para que respire */
  max-width: 800px; /* Más ancho para evitar que parezca una columna angosta */
  font-weight: 500;
  text-wrap: balance; /* Equilibra visualmente las líneas (muy pro) */
  margin-top: 1rem;
}

/* Estilo para el enlace del correo */
#about-me a {
  color: black;
  font-weight: 800; /* Hacemos el email bien grueso */
  text-decoration: none;
  border-bottom: 3px solid black; /* Un subrayado sólido y moderno */
  transition: all 0.2s ease;
}

/* Efecto al pasar el mouse sobre el correo */
#about-me a:hover {
  background-color: rgb(0, 0, 0);
  color: #ffffff; /* El texto se vuelve amarillo (tu color de fondo) */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 0 5px; /* Un pequeño relleno para que se vea como etiqueta */
}

/* --- GALERÍA ESTILOS --- */
#gallery-container {
  padding-top: 100px;
  padding-bottom: 50px;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column; /* Apilar título y grid */
  justify-content: flex-start;
  align-items: center; /* Centrar todo */
  background-color: #fff50e;
}

.gallery-title {
  font-size: 4rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 40px;
  letter-spacing: 2px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto; /* Asegurar centrado si el flex falla */
}

.gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* Cuadrado perfecto */
  overflow: hidden;
  border: 5px solid black; /* Borde negro cuadrado */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Recortar imagen para llenar el cuadrado */
  display: block;
}

/* Ajustes responsive para que no se rompa en pantallas chicas */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* --- ESTILOS DEL MODAL (LIGHTBOX) --- */
.modal {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(
    255,
    255,
    255,
    0.95
  ); /* Fondo blanco semitransparente */
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff50e;
  border: 4px solid black; /* Borde grueso global */
  padding: 65px 20px 20px 20px;
  width: auto;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.1); /* Sombra dura opcional */
}

.modal-image-container {
  width: 100%;
  margin-bottom: 15px;
  /* Removed border and background */
  display: flex;
  justify-content: center;
}

#modal-image {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  max-height: 50vh; /* Reducido para evitar que deforme el modal */
  object-fit: contain;
  border: 4px solid black;
}

.modal-caption {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 15px;
  text-transform: uppercase;
  text-align: center;
}

.modal-nav {
  display: flex;
  justify-content: space-between;
  width: 100%; /* Botones a los lados o centrados */
  max-width: 200px;
}

.nav-btn {
  background: none;
  border: none;
  font-size: 3rem;
  font-weight: 900;
  cursor: pointer;
  padding: 0 20px;
  transition: transform 0.2s;
}

.nav-btn:hover {
  transform: scale(1.2);
}

.close-button {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e81123;
  color: #fff;
  font-size: 28px;
  font-family: "Segoe UI", sans-serif;
  font-weight: 400;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.1s;
}

.close-button:hover,
.close-button:focus {
  background-color: #c10e1d;
  text-decoration: none;
}