:root { --ink: #111; --muted: #777; --line: #e4e2dd; --sans: "Montserrat", system-ui, sans-serif; --serif: "EB Garamond", Georgia, serif; --gutter: clamp(20px, 3.6vw, 72px); }
body { background: #fff; color: var(--ink); font-family: var(--serif); }

.site-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: clamp(14px, 2.2vw, 36px) var(--gutter); }
.site-header--overlay { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
.site-header--on-dark .wordmark, .site-header--on-dark .site-nav a, .site-header--on-dark .lang-toggle { color: #fff; }
.site-header--on-dark .site-nav a[aria-current="page"], .site-header--on-dark .site-nav a:hover { color: #fff; }
.site-header--on-dark .site-nav a:not([aria-current="page"]) { opacity: .75; }
.wordmark { font-family: "Libre Franklin", "Franklin Gothic Medium", Arial, sans-serif; font-weight: 800; font-size: clamp(.95rem, 1.45vw, 1.4rem); letter-spacing: .1em; text-transform: uppercase; line-height: 1.6; }
.site-nav { display: flex; align-items: baseline; gap: clamp(18px, 2.6vw, 50px); font-size: clamp(1.05rem, 1.35vw, 1.4rem); }
.site-nav a { color: var(--muted); transition: color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav .lang-toggle { font-size: .95em; letter-spacing: .08em; color: var(--ink); }

.page-title { font-family: var(--sans); font-weight: 500; font-size: clamp(1.4rem, 2.4vw, 2.4rem); letter-spacing: .36em; text-transform: uppercase; text-align: center; padding: calc(clamp(48px, 7vw, 110px) - clamp(14px, 2.2vw, 36px)) var(--gutter) clamp(48px, 7vw, 110px); }

/* Texto de lectura: biografía, panorama y pies de foto */
:root { --text: "Lexend", "Montserrat", system-ui, sans-serif; }
body .bio p, body .overview p, body .portrait figcaption, body .work figcaption small { font-family: var(--text); font-weight: 300; }
body .bio p, body .overview p { font-size: 13px; line-height: 1.85; }
body .portrait figcaption, body .work figcaption small { font-size: .82rem; line-height: 1.6; }

.label { font-family: var(--sans); font-weight: 500; font-size: clamp(.7rem, .95vw, .9rem); letter-spacing: .3em; text-transform: uppercase; }

.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 40px var(--gutter); border-top: 1px solid var(--line); margin-top: clamp(64px, 9vw, 140px); font-size: 1rem; color: var(--muted); }

@media (max-width: 760px) {
  .site-header { flex-direction: column; gap: 16px; }
  .site-nav { flex-wrap: wrap; gap: 6px 18px; }
}

/* Obra: 3 por fila */
.grid { --maxh: 32vw; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: clamp(32px, 4vw, 64px) clamp(16px, 2vw, 32px); }
.work .frame { padding: 0; }
.work img { display: block; width: 100%; height: auto; max-height: var(--maxh); object-fit: contain; object-position: left top; }
.work figcaption { margin-top: 14px; font-family: var(--serif); font-size: 1.05rem; line-height: 1.4; letter-spacing: 0; text-transform: none; }
.work figcaption small { display: block; margin-top: 6px; color: var(--muted); }
@media (max-width: 1100px) { .grid { --maxh: 42vw; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid { --maxh: 54vw; grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pending { font-family: var(--text); font-weight: 300; font-size: 13px; line-height: 1.85; color: var(--muted); }

/* Título de sección en vertical, al margen izquierdo */
body .block { display: grid; grid-template-columns: clamp(28px, 3vw, 44px) minmax(0, 1fr); }
body .block > h2 { grid-column: 1; grid-row: 1; margin: 0; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; justify-self: start; align-self: start; }
body .block > :not(h2) { grid-column: 2; }
@media (max-width: 560px) {
  body .block { grid-template-columns: minmax(0, 1fr); }
  body .block > h2 { grid-column: 1; writing-mode: horizontal-tb; transform: none; margin-bottom: 20px; }
  body .block > :not(h2) { grid-column: 1; }
}

/* Panorama sin título visible (se conserva para lectores de pantalla) */
body #overview { grid-template-columns: minmax(0, 1fr); }
body #overview > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body #overview > :not(h2) { grid-column: 1; }

/* Serie con presentación de imágenes */
.work a.frame { display: block; cursor: zoom-in; }
.slideshow { position: fixed; inset: 0; z-index: 50; background: #fff; display: flex; align-items: center; justify-content: center; }
.slideshow[hidden] { display: none; }
.slideshow figure { display: grid; justify-items: center; gap: 18px; max-width: min(78vw, 1100px); }
.slideshow img { display: block; max-width: 100%; max-height: 78svh; width: auto; height: auto; cursor: pointer; }
.slideshow figcaption { text-align: center; font-family: var(--text); font-weight: 300; font-size: 13px; line-height: 1.8; min-height: 3.6em; }
.slideshow figcaption em { font-style: italic; }
.slideshow figcaption .ss-note { color: var(--muted); }
.slideshow button { position: absolute; color: #888; transition: color .2s; line-height: 1; }
.slideshow button:hover, .slideshow button:focus-visible { color: var(--ink); }
.ss-prev, .ss-next { top: 50%; transform: translateY(-50%); font-size: 3rem; padding: 24px clamp(14px, 3vw, 48px); }
.ss-prev { left: 0; }
.ss-next { right: 0; }
.ss-close { top: clamp(14px, 2vw, 28px); right: clamp(18px, 3vw, 48px); font-size: 2.4rem; }
@media (max-width: 560px) { .slideshow figure { max-width: 84vw; } .ss-prev, .ss-next { font-size: 2.2rem; padding: 24px 8px; } }

/* Menús en Lexend */
body .site-nav, body .tabs, body .lang-toggle { font-family: var(--text); font-weight: 300; }
body .site-nav { font-size: clamp(1.2rem, 1.55vw, 1.55rem); letter-spacing: .02em; }
body .site-nav .lang-toggle { font-size: 1em; letter-spacing: .08em; }
body .tabs { letter-spacing: .22em; }

/* Pie de página en Lexend, como los textos */
body .site-footer { font-family: var(--text); font-weight: 300; font-size: 13px; }

/* Logotipo de la galería */
.wordmark { line-height: 0; }
.wordmark .logo { --logo-h: clamp(32px, 3.1vw, 48px); display: inline-flex; align-items: center; height: var(--logo-h); }
.wordmark img { display: block; height: var(--logo-h); width: auto; }
.wordmark .logo-en { font-family: "Mulish", "Nunito Sans", system-ui, sans-serif; font-weight: 300; font-size: calc(var(--logo-h) * .67); line-height: 1; letter-spacing: .01em; text-transform: uppercase; margin-left: calc(var(--logo-h) * .1); position: relative; top: calc(var(--logo-h) * .02); color: #000; }

/* El título de página ya está en el menú: se conserva solo para lectores de pantalla */
.page-title { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-title + * { margin-top: clamp(40px, 5vw, 72px); }

.slideshow.single .ss-prev, .slideshow.single .ss-next { display: none; }
