/* ══════════════════════════════════════════════════════
   proyectos.css  —  estilos para páginas de proyecto
   Layout inspirado en: texto izquierda / imágenes derecha (fondo negro)
   con scrolls independientes en cada columna
══════════════════════════════════════════════════════ */


/* ── Reset de <main> para que la página de proyecto
      ocupe toda la altura disponible sin scroll propio ── */
.project-page #main {
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}


/* ══════════════════════════════════════════════════════
   WRAPPER PRINCIPAL: divide en dos columnas de altura completa
══════════════════════════════════════════════════════ */
.project-split {
  display: flex;
  flex: 1;
  height: 100%;
  overflow: hidden;
}


/* ══════════════════════════════════════════════════════
   COLUMNA IZQUIERDA — texto, fondo blanco, scroll propio
══════════════════════════════════════════════════════ */
.project-col-text {
  flex: 0 0 50%;
  overflow-y: auto;
  height: 100%;
  border-right: 1px solid var(--line);
  scrollbar-width: none;
  background: var(--white);
}
.project-col-text::-webkit-scrollbar { display: none; }


/* ── Breadcrumb ── */
.project-breadcrumb {
  padding: 20px 48px 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #aaa;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: inline-block;
  transition: color 0.15s;
}
.project-breadcrumb:hover { color: #3535c8; }


/* ── Cabecera ── */
.project-header {
  padding: 24px 48px 32px;
  border-bottom: 1px solid var(--line);
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #6d6d6d;
}

.project-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 0.8vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 8px;
}

.project-header blockquote {
  font-style: italic;
  color: #898989;
  font-size: 0.65rem;
  line-height: 1.6;
  border-left: 2px solid #7aff97;
  padding-left: 10px;
  margin: 8px 0;
  max-width: 520px;
}

.project-lead {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-style: bold;
  line-height: 1.75;
  color: #444;
  max-width: 560px;
}




/* ── Zona de distribución / dónde encontrar ── */
.project-distribution {
  padding: 28px 48px;
  border-bottom: 1px solid var(--black);
}

.project-distribution p {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 6px;
}

.project-distribution p strong {
  font-weight: 500;
}

.project-distribution ul {
  list-style: none;
  margin-top: 8px;
}

.project-distribution ul li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #a9a9a9;
  padding: 2px 0;
}

.project-distribution ul li::before {
  content: '→ ';
  color: #aaa;
}

.project-distribution a {
  color: #3535c8;
  text-decoration: none;
}
.project-distribution a:hover { text-decoration: underline; }


/* ── Cuerpo principal del texto ── */
.project-text {
  padding: 36px 48px;
  border-bottom: 1px solid var(--line);
}

.project-text p {
  font-family: var(--font-serif);
  font-size: 0.65rem;
  line-height: 1.85;
  color: #222;
  max-width: 560px;
  margin-bottom: 24px;
}

.project-text blockquote {
  font-style: italic;
  color: #222;
  font-size: 1rem;
  line-height: 1.7;
  border-left: 2px solid #42f569;
  padding-left: 20px;
  margin: 28px 0;
  max-width: 520px;
}

.project-text ul {
  list-style: none;
  margin-top: 8px;
}

.project-text ul li {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  color: #a2a2a2;
  padding: 2px 0;
}

/* ── Ficha técnica ── */
.project-ficha {
  padding: 36px 48px;
}

/* ✏️ CAMBIO: se quitó el borde inferior que dejaba una barra
   divisoria sin función después de Year/Category/Collaborators
   cuando la ficha es el último bloque de la columna de texto
   (caso de todos los proyectos actuales) — no había nada debajo
   que esa línea estuviera separando. Si en el futuro se agrega
   contenido DESPUÉS de la ficha, basta con darle su propio
   border-top a ese bloque nuevo. */

.project-ficha dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 20px;
  align-items: baseline;
}

.project-ficha dt {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #aaa;
  padding-top: 2px;
}

.project-ficha dd {
  font-family: var(--font-serif);
  font-size: 0.6rem;
  color: #222;
  line-height: 1;
}


/* ── Navegación entre proyectos ── */
.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.project-nav a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 24px 48px;
  text-decoration: none;
  color: var(--black);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  transition: background 0.2s;
  border-top: 1px solid var(--black);
}

.project-nav a:hover { background: #e5e5e5; }

.project-nav-prev { border-right: 1px solid var(--black); }
.project-nav-next { text-align: right; align-items: flex-end; }

.nav-hint {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  color: #aaa;
}


/* ══════════════════════════════════════════════════════
   COLUMNA DERECHA — imágenes apiladas, fondo negro, scroll propio
══════════════════════════════════════════════════════ */
.project-col-images {
  flex: 0 0 50%;
  overflow-y: auto;
  height: 100%;
  background: #fefefe;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.project-col-images::-webkit-scrollbar { display: none; }


/* ── Cada bloque de imagen ocupa aprox. la altura de la ventana ── */
.project-img-block {
  flex-shrink: 0;
  width: 100%;
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
}

.project-img-block img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

/* ── Placeholder cuando no hay imagen real ── */
.img-placeholder {
  width: 80%;
  height: 320px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #dfdfdf;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  gap: 12px;
}

/* ── Pie de imagen ── */
.img-caption {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  color: #b8b8b8;
  text-align: center;
  margin-top: 12px;
  letter-spacing: 0.04em;
}


/* ══════════════════════════════════════════════════════
   UTILIDADES (mantener compatibilidad con style.css)
══════════════════════════════════════════════════════ */
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.back-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #888;
  text-decoration: none;
  transition: color 0.15s;
}
.back-link:hover { color: #3535c8; }

.nav-project-label {
  margin-top: 32px;
  padding: 20px 20px 0;
  border-top: 1px solid #e0dbd3;
}

.nav-project-label p:first-child {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #bbb;
  margin-bottom: 6px;
}

.nav-project-label p:last-child {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.4;
}


/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════════
   SCROLL INDICATOR — aparece en cada columna scrolleable
   y desaparece cuando el usuario ha bajado un poco
══════════════════════════════════════════════════════ */
.scroll-hint {
  position: sticky;
  bottom: 12px;
  left: 0;
  right: 0;
  height: 36px;
  padding: 0 40px 0;
  display: flex;
  align-items: center;
  justify-content: left;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.4s ease;
}

.scroll-hint::before {
  content: 'scroll ↓';
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #686868;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 4px 14px;
  animation: scrollBounce 2.4s ease-in-out infinite;
}



@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(2px); }
}

.scroll-hint.hidden {
  opacity: 0;
}

/* ✏️ Botón flotante de scroll: contextual. Si la columna no
   tiene overflow vertical real (todo el contenido ya es
   visible), _initScrollHints() en main.js agrega esta clase y
   el indicador queda completamente oculto en vez de aparecer
   innecesariamente. Se recalcula dinámicamente (ResizeObserver +
   carga de imágenes), ver main.js. */
.scroll-hint.no-overflow {
  display: none;
}

/* ══════════════════════════════════════════════════════
   GALERÍA CON FILTRO POR AÑO + LIGHTBOX (sección GRAPHICS)
   ────────────────────────────────────────────────────────
   La lógica JS ya existe en main.js → _initTFGrid() (no editar
   esa función). Esta es la contraparte visual: se usa dentro
   de .project-col-images en páginas como Graphics/ThoughtForms.html.
   Estructura esperada:
     .tf-year-filter > .tf-year-chip[data-year]
     .tf-grid > .tf-grid-item[data-year][data-caption] > img[data-full]
     .tf-lightbox (se mueve a <body> automáticamente por JS)
══════════════════════════════════════════════════════ */
.tf-year-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 20px 32px 0;
}

.tf-year-chip {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  padding: 3px 12px;
  border: 1px solid #444;
  border-radius: 2px;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tf-year-chip.active { background: #fff; color: #111; }

.tf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2px;
  padding: 20px 32px 32px;
}

.tf-grid-item {
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #1a1a1a;
}
.tf-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.tf-grid-item:hover img { transform: scale(1.05); }

/* Oculta miniaturas que no coinciden con el chip de año activo */
.tf-grid-item.hidden-by-filter { display: none; }

/* ── Lightbox: visor de imagen ampliada con navegación ── */
.tf-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 300;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.tf-lightbox.open { display: flex; }

.tf-lightbox img {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
}

.tf-lightbox-caption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #ccc;
  text-align: center;
}

.tf-lightbox-close,
.tf-lightbox-prev,
.tf-lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 10px;
}
.tf-lightbox-close { top: 16px; right: 24px; }
.tf-lightbox-prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.tf-lightbox-next  { right: 16px; top: 50%; transform: translateY(-50%); }
.tf-lightbox-close:hover,
.tf-lightbox-prev:hover,
.tf-lightbox-next:hover { color: #3535c8; }


/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .project-split {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .project-col-text,
  .project-col-images {
    flex: none;
    height: auto;
    overflow-y: visible;
    width: 100%;
  }

  /* Imágenes visibles en mobile */
  .project-col-images {
    min-height: unset;
    background: #fefefe;
    padding-bottom: 16px;
  }

  .project-img-block {
    min-height: unset;
    padding: 16px;
  }

  .project-img-block img {
    width: 100%;
    max-height: unset;
    height: auto;
    object-fit: contain;
    display: block;
  }

  .img-placeholder {
    width: 100%;
    height: 200px;
  }

  .project-header,
  .project-text,
  .project-ficha,
  .project-distribution { padding: 24px; }

  .project-breadcrumb { padding: 16px 24px 0; }

  .project-ficha dl { grid-template-columns: 1fr; gap: 4px 0; }
  .project-ficha dt { margin-top: 14px; }
  .project-ficha dt:first-child { margin-top: 0; }

  .project-nav a { padding: 18px 24px; }

  /* scroll hint no necesario en mobile (no hay columnas fijas) */
  .scroll-hint { display: none; }
}