/* ============================================================
   Estructura y guía de ruta del CSS — Portafolio Hastur Mora
   ------------------------------------------------------------
   1) Variables y base tipográfica
   2) Reset y layout global
   3) Marca fija (brand)
   4) Secciones HERO con video de fondo (Vimeo o local)
   5) Barra superior (opcional)
   6) Texto / copy principal (posición y estilo)
   7) Créditos finales / CV / Footer
   ============================================================ */


/* ========== 1) Variables y base tipográfica ========== */
:root {
  --bg-dark: #000;
  --txt-light: #f7f7f7;
  --muted: rgba(255,255,255,.75);
  --blur-glass: rgba(0,0,0,.35);
  --shadow: 0 2px 12px rgba(0,0,0,.5);
  --accent: #fff;
  --font: 'Inter', system-ui, sans-serif;
}


/* ========== 2) Reset y layout global ========== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-dark);
  color: var(--txt-light);
  font-family: var(--font);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity .3s;
}
a:hover { opacity: .7; }


/* ========== 3) Marca fija (arriba-derecha) ========== */
.brand {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  font-weight: 800;
  font-size: 1rem;
  color: var(--txt-light);
  z-index: 10;
  text-shadow: var(--shadow);
  mix-blend-mode: difference;
}


/* ========== 4) Secciones HERO con video de fondo ========== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* --- Contenedor del video --- */
.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 100 * (9/16) = 56.25 */
  min-height: 100vh;
  min-width: 177.78vh; /* 100 * (16/9) = 177.78 */
  transform: translate(-50%, -50%);
  z-index: 0;
  overflow: hidden;
}

/* --- El iframe se comporta como un background-cover --- */
.video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 0;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
}

/* --- Oscurecer un poco para legibilidad del texto --- */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0.15) 20%,
    rgba(0,0,0,0.75) 80%);
  z-index: 1;
}


/* ========== 5) Barra superior (opcional) ========== */
.sticky-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 5;
  text-shadow: var(--shadow);
  mix-blend-mode: difference;
}

.sticky-bar .left {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sticky-bar .time {
  opacity: 0.8;
  font-size: 0.9rem;
}


/* ========== 6) Texto / copy principal ========== */
/* Contenido encima del video */
.content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end; 
  padding: 4rem;
  box-sizing: border-box;
}

/* Caja de texto por defecto (derecha) */
.text-box {
  max-width: 620px;
  text-align: right;
  color: var(--muted);
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  font-size: 0.95rem;
  line-height: 1.6;
}

.text-box h3 {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--txt-light);
  margin: 0 0 1rem 0;
}

.text-box p {
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
}

.text-box a {
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  color: var(--txt-light);
  text-decoration: none;
}

/* Variante: sección con texto a la izquierda
   - Le pones class="hero left" al <section>
   - Eso mueve el bloque a la izquierda y alinea el texto a la izquierda
*/
.hero.left .content {
  justify-content: flex-start; 
}

.hero.left .text-box {
  text-align: left;
  color: var(--muted);
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

/* ========== 7) Créditos y CV final ========== */
.cv, .foot {
  background: #000;
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.7;
}

.cv h3, .cv h4 {
  font-weight: 900;
  margin-bottom: .5rem;
}

.cv-inner {
  display: grid;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}

@media (min-width: 900px) {
  .cv-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.foot {
  font-style: italic;
  opacity: .75;
  letter-spacing: .03em;
  border-top: 1px solid rgba(255,255,255,.1);
}
/* ============================
   SECCIÓN GALERÍA / ARCHIVO
   ============================ */

.gallery-section {
  position: relative;
  background: #0046ff;
  background-image: url('assets/bg_clouds_tile.jpg'); /* fondo que quieras idealmente un gif o no se */
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 2rem 1rem 4rem 1rem;
  box-shadow: inset 0 0 100px rgba(0,0,0,.2);
}

.gallery-header {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.gallery-header .subtitle {
  font-weight: 400;
  opacity: .9;
  display: block;
}

/* grilla masonry ligera */
.gallery-grid {
  columns: 3 300px;      /* máx 3 columnas, cada una ~300px de ancho mínimo */
  column-gap: 1.5rem;
  margin-bottom: 2rem;
}

.gallery-item {
  break-inside: avoid;
  margin: 0 0 1.5rem 0;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  cursor: zoom-in;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* fila de texto bilingüe abajo */
.gallery-text-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  background: rgba(0,0,0,.4);
  padding: 1.5rem;
  border-radius: .5rem;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}

@media (min-width: 900px) {
  .gallery-text-row {
    grid-template-columns: 1fr 1fr;
  }
}

.gallery-copy h4 {
  margin: 0 0 .75rem 0;
  font-weight: 800;
  font-size: .9rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

.gallery-copy p {
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255,255,255,.9);
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}


/* ============================
   LIGHTBOX FULLSCREEN
   ============================ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: none;              /* se muestra via JS */
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}

/* la imagen grande */
.lb-img {
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 30px 60px rgba(0,0,0,.8);
  background: #fff;
  object-fit: contain;
}

/* Controles (prev, next, close) */
.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: rgba(255,255,255,.8);
  color: #000;
  border: 0;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  font-weight: 700;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
  transition: opacity .2s;
}

/* posiciones: */
.lb-close {
  top: 1rem;
  right: 1rem;
}

.lb-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* estado oculto (para el autohide) */
.lightbox.hide-ui .lb-close,
.lightbox.hide-ui .lb-prev,
.lightbox.hide-ui .lb-next {
  opacity: 0;
  pointer-events: none;
}

/* al hacer hover sobre los botones dentro del lightbox */
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  background: #fff;
}
/* ====================================
   SECCIÓN CV / BIO FINAL (NEGRO)
   ==================================== */

.cv-section {
  background: #000;
  color: #fff;
  padding: 6rem 2rem 5rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  border-top: 1px solid rgba(255,255,255,.1);
}

.cv-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 3rem;
}

.cv-bio {
  max-width: 720px;
}

.cv-bio h2 {
  font-weight: 900;
  font-size: 2rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.03em;
}

.cv-bio p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 1rem;
  font-weight: 300;
  text-align: justify;
}

/* Bloques del CV */
.cv-data {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .cv-data {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.cv-block h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.15);
  padding-bottom: .3rem;
}

.cv-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cv-block li {
  color: rgba(255,255,255,0.75);
  font-weight: 300;
  margin-bottom: 0.5rem;
}

/* Footer del CV */
.cv-footer {
  margin-top: 4rem;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-style: italic;
  letter-spacing: .02em;
}

.cv-footer .small {
  display: block;
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 0.5rem;
}
