* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Gabarito", sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}

body.light {
  background: #f5f5f5;
  color: #111;
}

/* === Header === */
header {
  position: fixed;
  top: 1em; left: 0em;
  width: 100%;
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: transparent;
}

/* === Menú Hamburguesa === */
.menu-toggle {
  width: 28px; height: 20px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.menu-toggle div {
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: all 0.3s ease;
}
.menu-toggle.open div:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.open div:nth-child(2) { opacity: 0; }
.menu-toggle.open div:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* === Botón Dark/Light === */
#theme-toggle {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 0.9rem;
  letter-spacing: 1px;
  cursor: pointer;
}

/* === Menú lateral === */
.menu {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 99;
  display: flex;
  justify-content: center;
  align-items: center;
}
.menu.active { transform: translateX(0); }
.menu ul { list-style: none; text-align: center; }
.menu li { margin: 1.5rem 0; }
.menu a {
  color: #fff;
  font-size: 2rem;
  text-decoration: none;
  letter-spacing: 2px;
  transition: opacity 0.3s;
}
.menu a:hover { opacity: 0.7; }

/* === Hero === */
.hero {
  text-align: center;
  padding: 2rem 1rem 2rem;
}
.hero h1 { font-size: 4rem; font-weight: 400; letter-spacing: 0.2em; }
.hero p { margin-top: 0rem; font-weight: 200; font-size: 2rem; opacity: 0.8; }

/* === Bloques === */
.block {
  width: 100%;
  max-width: 1600px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  text-align: center;
}
.block img, .block video {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.6s ease-out;
}

/* === Texto grande === */
.text-block h2 {
  font-size: 4rem;
  font-weight: 600;
  line-height: 1;
  max-width: 1600px;
  margin: auto;
}

/* Selected Works GRID */

#works {
    font-size: 1.5rem;
    max-width: 1600px; /* más margen para que respiren */
    margin: 0 auto;
    padding: 0 40px;
}

.gallery {
  display: grid;
  gap: 12px;
  padding: 20px 0;
  grid-template-columns: repeat(3, 1fr); /* móvil */
}

.gallery img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.gallery img:hover {
  opacity: 0.8;
}

/* Escritorio */
@media (min-width: 900px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

/* === About === */
.about-block h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.about-block p {
  max-width: 1000px;
  margin: auto;
  line-height: 1.5;
  font-size: 2rem;
  opacity: 0.85;
}
.about-block .en { display: block; opacity: 0.6; font-style: italic; margin-top: 1rem; }

/* === Lightbox === */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox.show { display: flex; }
.lightbox.visible { opacity: 1; }
.lightbox img { max-width: 90%; max-height: 80%; border-radius: 10px; }
#lightbox-close {
  position: absolute; top: 20px; right: 30px;
  font-size: 2rem; color: #fff; cursor: pointer;
}

/* === Animaciones === */
.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* === Footer === */
footer {
  text-align: center;
  font-size: 0.9rem;
  padding: 2rem 0;
  opacity: 0.6;
}

/* === Responsive === */
@media (max-width: 600px) {
  .hero h1 { font-size: 2.5rem; }
  .text-block h2 { font-size: 1.3rem; }
  .menu a { font-size: 1.5rem; }
}

@media (min-width: 900px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 30px;
  }
}

/* Fija el hero, evita que se desplace con el parallax */
.hero {
  position: relative;
  z-index: 2;
  transform: none !important;
}
