/* ==========================================================================
   Theon-inspired portfolio — original build, placeholder content.
   Techniques documented in Theon_analisis_tecnico.docx:
   - mono uppercase for functional text, script accent for brand
   - generous negative space, left-anchored content blocks
   - full-bleed gradient "video" hero with grain overlay
   - tabular index overlay, editorial list, photo grid
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Zeyada&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --fg-soft: #555555;
  --line: #e2e2e2;
  --mono: 'JetBrains Mono', 'Geist Mono', monospace;
  --script: 'Zeyada', cursive;
  --gap: clamp(24px, 4vw, 64px);
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.caps {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--gap);
  z-index: 100;
  mix-blend-mode: difference;
  color: #fff;
  pointer-events: none;
}
.nav * { pointer-events: auto; }
.nav-brand {
  font-family: var(--script);
  font-size: 22px;
  line-height: 1;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 30px;
  font-size: 13px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  opacity: 0.75;
  transition: opacity .2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { opacity: 1; }

/* ---------- page shell ---------- */
main { min-height: 100vh; }

.page-pad {
  padding: calc(var(--nav-h) + var(--gap)) var(--gap) var(--gap);
}

/* ---------- HOME ---------- */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #000;
}
.hero-bg-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 1.4s ease;
  animation: hero-drift 9s ease-in-out infinite alternate;
  transform-origin: center;
}
.hero-bg-slide.active { opacity: 1; }
.hero-bg-slide.paused { animation-play-state: paused; }
@keyframes hero-drift {
  0%   { transform: scale(1.06) translate3d(0,0,0); filter: saturate(1); }
  100% { transform: scale(1.13) translate3d(-1%, -1%, 0); filter: saturate(1.06); }
}
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
.hero-content {
  position: absolute;
  left: var(--gap);
  bottom: var(--gap);
  color: #fff;
  z-index: 2;
}
.hero-eyebrow {
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 10px;
}
.hero-title {
  font-family: var(--script);
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1;
  margin: 0;
}
.hero-control {
  position: absolute;
  left: var(--gap);
  top: calc(var(--nav-h) + 12px);
  z-index: 2;
  color: #fff;
  font-size: 11px;
  background: none;
  border: none;
  font-family: var(--mono);
  cursor: pointer;
  opacity: 0.85;
}
.hero-control:hover { opacity: 1; }

/* ---------- FILMS (editorial list) ---------- */
.film-list {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.film-item img {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.film-item figcaption {
  margin-top: 10px;
  font-size: 11px;
}
.film-item figcaption .no {
  color: var(--fg-soft);
  margin-right: 10px;
}
figure { margin: 0; }

/* ---------- ARCHIVE (index table over bg) ---------- */
.archive-hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
}
.archive-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.9;
  animation: hero-drift 24s ease-in-out infinite alternate;
}
.archive-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.15) 45%, rgba(0,0,0,0.35));
}
.archive-table-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 var(--gap);
  color: #fff;
}
.archive-table-wrap .section-eyebrow { color: rgba(255,255,255,0.7); margin-bottom: 10px; }
.archive-table-wrap .section-head { color: #fff; font-size: clamp(20px, 3vw, 28px); margin-bottom: 10px; }
.archive-note {
  font-size: 12px;
  opacity: 0.8;
  max-width: 480px;
  margin: 0 0 36px 0;
}
table.archive {
  width: 100%;
  max-width: 900px;
  border-collapse: collapse;
  font-size: 11px;
}
table.archive th {
  text-align: left;
  font-weight: 400;
  opacity: 0.6;
  padding: 0 16px 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
table.archive td {
  padding: 10px 16px 10px 0;
  vertical-align: top;
  white-space: normal;
}
table.archive td:first-child,
table.archive th:first-child { width: 34%; }
table.archive td:last-child,
table.archive th:last-child { width: 48px; white-space: nowrap; }
table.archive tr.head-row th:first-child,
table.archive tr td:first-child { padding-left: 0; }
table.archive tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
table.archive tbody tr:hover { background: rgba(255,255,255,0.05); }
td.project { font-weight: 500; }

/* ---------- PHOTOGRAPHY grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 64px 24px;
}
.photo-grid figure img {
  width: 100%;
  display: block;
}
.photo-grid figcaption {
  margin-top: 8px;
  font-size: 10px;
}
@media (max-width: 900px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- INFO ---------- */
.info-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
}
.info-block {
  max-width: 440px;
  padding-bottom: var(--gap);
}
.info-logo {
  font-family: var(--script);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 10px 0;
}
.info-bio {
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 16px 0;
  color: #222;
}
.info-bio:last-of-type { margin-bottom: 22px; }
.info-meta {
  margin-top: 22px;
  font-size: 10px;
  color: var(--fg-soft);
  display: flex;
  gap: 18px;
}

/* ---------- editorial sections (Inicio: La artista / Versatilista / La mirada / Cartografía / El proceso) ---------- */
.section {
  max-width: 1180px;
  padding: 96px var(--gap);
  border-top: 1px solid var(--line);
}
.section:first-of-type { border-top: none; }

.section-columns {
  display: block;
}
.section-text { max-width: 640px; }
.section-visual { display: none; }

.section-num {
  font-size: 11px;
  color: var(--fg-soft);
  margin-bottom: 14px;
}
.section-title {
  font-size: 45px;
  font-weight: 100;
  line-height: 1;
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
}
.section-subhead {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--fg-soft);
  margin: 0 0 36px 0;
  max-width: 460px;
}
.section-body p {
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 18px 0;
  max-width: 560px;
  color: #222;
}
.section-body p:last-child { margin-bottom: 0; }
.section-body strong { font-weight: 600; color: var(--fg); }

/* Generic heading used on Obras / Archivo-Trayectoria (pages outside the 5 Inicio blocks) */
.section-eyebrow {
  font-size: 11px;
  color: var(--fg-soft);
  margin-bottom: 18px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.section-eyebrow .no { color: var(--line); }
.section-head {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 28px 0;
  max-width: 640px;
}

@media (min-width: 900px) {
  .section-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: 64px;
    align-items: start;
  }
  .section-visual {
    display: block;
    position: sticky;
    top: calc(var(--nav-h) + 40px);
  }
  .section-visual img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
  }
}

/* Hero lead-in quote under the hero, before the sections start */
.lead {
  max-width: 720px;
  padding: 120px var(--gap) 80px;
}
.lead-quote {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 40px 0;
}
.lead-head {
  font-size: 45px;
  font-weight: 100;
  line-height: 1.25;
  margin: 0 0 24px 0;
}
.lead-body p {
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 18px 0;
  max-width: 560px;
  color: #222;
}
.lead-body p:last-child { margin-bottom: 0; }

/* ---------- Cartografía concept grid ---------- */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: 8px;
}
.concept-card {
  background: var(--bg);
  padding: 28px 22px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.concept-card .no {
  font-size: 10px;
  color: var(--fg-soft);
}
.concept-card h3 {
  font-size: 13px;
  margin: 14px 0 8px 0;
  font-weight: 500;
}
.concept-card p {
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  color: #333;
}
@media (max-width: 760px) {
  .concept-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .concept-grid { grid-template-columns: 1fr; }
}

/* ---------- OBRAS intro + categories ---------- */
.obras-intro {
  max-width: 640px;
  margin-bottom: 56px;
}
.obras-intro .section-head { margin-bottom: 20px; }
.obras-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.obras-category {
  max-width: 220px;
}
.obras-category .caps {
  font-size: 10px;
  color: var(--fg-soft);
  display: block;
  margin-bottom: 6px;
}
.obras-category p {
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  color: #333;
}

/* ---------- OBRAS anchor nav + per-work sections ---------- */
.obras-nav-wrap {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 56px 0;
}
.obras-nav {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 16px 0;
  font-size: 11px;
  scrollbar-width: none;
}
.obras-nav::-webkit-scrollbar { display: none; }
.obras-nav a { opacity: 0.6; transition: opacity .2s ease; flex: 0 0 auto; }
.obras-nav a:hover, .obras-nav a:focus { opacity: 1; }

.work-section {
  max-width: 1180px;
  padding: 72px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 72px);
}
.work-section:first-of-type { border-top: none; padding-top: 8px; }
.work-head { max-width: 720px; margin-bottom: 36px; }
.work-materials {
  font-size: 12px;
  color: var(--fg-soft);
  margin: 0 0 24px 0;
}
.work-label {
  font-size: 11px;
  color: var(--fg-soft);
  font-weight: 500;
  margin: 0 0 10px 0;
}

/* ---------- lightbox ---------- */
.photo-grid figure { cursor: pointer; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox-img {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.lightbox-caption {
  position: absolute;
  left: 50%;
  bottom: var(--gap);
  transform: translateX(-50%);
  color: #fff;
  font-size: 11px;
  opacity: 0.75;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  opacity: 0.8;
  padding: 12px;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-close { top: var(--gap); right: var(--gap); }
.lightbox-prev { left: var(--gap); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--gap); top: 50%; transform: translateY(-50%); }

/* ---------- contact ---------- */
.contact-block { max-width: 480px; }
.contact-block .info-bio { margin-bottom: 22px; }
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}
.contact-links a { text-decoration: underline; text-decoration-color: var(--line); }
.contact-links a:hover { text-decoration-color: var(--fg); }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
