/* ═══════════════════════════════════════════
   LA ESTANTERÍA DEL VACÍO
   Archivo Mnemosyne — Estilos Base
   ═══════════════════════════════════════════ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --void: #0e0e0e;
  --void-deep: #050505;
  --void-surface: #141414;
  --void-panel: #111111;
  --panel-fabric: #121212;
  --parchment: #E8DCC8;
  --label-paper: #f0f0f0;
  --ink: #1a1a1a;
  --frame-warm: #8B7355;
  --frame-gold: #A0845C;
  --gold-old: #d4af37;
  --text-primary: #e2dbd0;
  --text-secondary: #a89d8e;
  --text-ghost: #635c52;
  --accent: #A0845C;
  --line-connection: rgba(255, 255, 255, 0.4);
  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans: 'Inter', 'Helvetica Neue', sans-serif;
  --header-height: 56px;
  --ease-ethereal: cubic-bezier(0.25, 0.1, 0.0, 1.0);
  --duration-slow: 0.8s;
  --duration-medium: 0.5s;
  --duration-fast: 0.3s;
}

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--void);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}

/* ─── Cursor DOM: ocultar cursor OS en todo el documento ─── */
html body * {
  cursor: none !important;
}

/* ─── Cursor personalizado — El Jabalí ─── */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 99999;
  will-change: transform;
}

.custom-cursor__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 16px 10px; /* hotspot coincide con el cursor CSS original */
  transition: transform 0.25s ease;
}

/* Al pasar sobre obras: el jabalí se inclina */
.custom-cursor.is-over-image .custom-cursor__img {
  transform: rotate(-30deg);
}

/* ═══ Film Grain Noise Overlay ═══ */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%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)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
  contain: strict;
}

/* ═══════════════════════════════════════════
   HEADER — EDITORIAL REFINADO
   ═══════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 400;
  height: var(--header-height);
  background: rgba(6, 6, 6, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.06);
}

/* Thin gold accent line along the very bottom */
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: clamp(16px, 3vw, 60px);
  right: clamp(16px, 3vw, 60px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.18) 20%,
    rgba(212, 175, 55, 0.25) 50%,
    rgba(212, 175, 55, 0.18) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 clamp(16px, 3vw, 60px);
  max-width: 1600px;
  margin: 0 auto;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}

/* Small decorative mark before the name */
.site-header__brand::before {
  content: '◆';
  font-size: 0.35rem;
  color: var(--gold-old);
  opacity: 0.5;
  flex-shrink: 0;
  letter-spacing: 0;
  margin-right: 2px;
}

.site-header__name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.site-header__line {
  width: 20px;
  height: 1px;
  background: var(--gold-old);
  opacity: 0.4;
  flex-shrink: 0;
}

.site-header__surname {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.site-header__filters {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-left: 20px;
}

.site-header__filters::-webkit-scrollbar {
  display: none;
}

/* ─── Filter Chips — Sans + Gold Active + Ink-bleed Hover ─── */
.filter-chip {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-ghost);
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color var(--duration-fast) var(--ease-ethereal);
}

/* Ink-bleed underline on hover */
.filter-chip::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 1px;
  background: var(--gold-old);
  opacity: 0.4;
  transition: left 0.4s var(--ease-ethereal), right 0.4s var(--ease-ethereal), opacity 0.4s;
}

.filter-chip:hover {
  color: var(--text-secondary);
}

.filter-chip:hover::after {
  left: 10%;
  right: 10%;
  opacity: 0.6;
}

.filter-chip.is-active {
  color: var(--gold-old);
}

.filter-chip.is-active::after {
  left: 10%;
  right: 10%;
  opacity: 0.5;
  background: var(--gold-old);
}

.filter-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  margin: 0 6px;
}

/* ═══════════════════════════════════════════
   ATLAS — COMPOSICIÓN ESTÁTICA
   ═══════════════════════════════════════════ */
.atlas {
  position: fixed;
  inset: 0;
  /* background-color omitido: el fondo lo provee el <body> (#0e0e0e),
     permitiendo que el canvas de partículas (z-index:9) sea visible
     a través del gradiente central transparente del atlas.           */
  background-image:
    radial-gradient(circle at 50% 50%, rgba(20, 20, 20, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
  overflow: hidden;
  cursor: inherit;
  z-index: 10;
}

.atlas__canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

/* ─── Obra ─── */
.atlas__obra {
  position: absolute;
  cursor: pointer;
  transition: opacity 0.3s ease-out;
  will-change: transform, opacity;
}

.atlas__obra:hover {
  z-index: 100 !important;
}

.atlas__obra:hover .atlas__obra-frame {
  box-shadow:
    3px 6px 20px rgba(0, 0, 0, 0.9),
    6px 12px 40px rgba(0, 0, 0, 0.5);
}

.atlas__obra-frame {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  box-shadow:
    2px 4px 12px rgba(0, 0, 0, 0.6),
    4px 8px 30px rgba(0, 0, 0, 0.4);
  transition: box-shadow var(--duration-medium) var(--ease-ethereal);
}

.atlas__obra-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  line-height: 0; /* elimina espacio inline bajo la imagen */
}

.atlas__obra-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Sticker (PNG transparente) debe mostrar la imagen completa sin recorte */
.atlas__obra--sticker .atlas__obra-img {
  object-fit: contain;
}

/* Sticker effect for special items (e.g. Bitácora logo) */
.atlas__obra--sticker .atlas__obra-frame {
  box-shadow: none;
  background: transparent;
}
.atlas__obra--sticker .atlas__obra-inner {
  background: transparent;
  overflow: visible;
}
.atlas__obra--sticker .atlas__obra-img {
  filter: drop-shadow(3px 4px 6px rgba(0,0,0,0.5));
}

.atlas__obra-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
  opacity: 0;
  transition: opacity var(--duration-fast);
  pointer-events: none;
}

.atlas__obra:hover .atlas__obra-title {
  opacity: 1;
}

.atlas__obra-pin {
  display: none;
}

.atlas__obra-pin--left {
  left: 45%;
}

/* ═══ Static Mode Panels — Shadow Box ═══ */
.atlas__panel {
  position: absolute;
  background: linear-gradient(170deg, #111111 0%, #0d0d0d 40%, #0a0a0a 100%);
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 8px 40px rgba(0, 0, 0, 0.8),
    0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
}

.atlas.is-static .atlas__panel {
  opacity: 0;
}

/* Fabric texture overlay */
.atlas__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0px, rgba(255, 255, 255, 0.008) 1px, transparent 2px, transparent 4px),
    repeating-linear-gradient(90deg, transparent 0px, rgba(255, 255, 255, 0.005) 1px, transparent 2px, transparent 6px);
  pointer-events: none;
}

.atlas__panel-label {
  position: absolute;
  top: -28px;
  left: 16px;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-ghost);
  opacity: 0.5;
  white-space: nowrap;
}

/* Ceiling wire */
.atlas__panel-wire {
  position: absolute;
  top: -120px;
  width: 1px;
  height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.atlas__panel-wire--left {
  left: 25%;
}

.atlas__panel-wire--right {
  left: 75%;
}

/* ─── Scroll Hint ─── */
.atlas__scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-ghost);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity var(--duration-fast), color var(--duration-fast);
  z-index: 50;
  animation: hint-bob 2.5s ease-in-out infinite;
}

.atlas__scroll-hint:hover {
  opacity: 0.8;
  color: var(--text-secondary);
}

@keyframes hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(5px); }
}

/* ─── Hover: Zoom only ─── */

/* ─── Vacío Reactivo: Filtros ─── */
.atlas.is-filtered .atlas__obra {
  transition: none;
}

.atlas.is-filtered .atlas__obra.matches-filter {
  opacity: 1;
  filter: none;
}

/* ─── Static Mode ─── */
.atlas.is-static .atlas__obra {
  transition: none;
}

/* ─── SVG Conexiones ─── */
.atlas__connections {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 50;
  overflow: visible;
}

.atlas__connection-line {
  fill: none;
  stroke: var(--line-connection);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0;
  transition: opacity var(--duration-medium);
  filter: url(#glow);
}

.atlas__connection-line.is-visible {
  opacity: 1;
}

/* ═══════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease-ethereal);
}

.modal.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(8px);
}

.modal__container {
  position: relative;
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--void-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  scrollbar-width: thin;
  scrollbar-color: var(--void-panel) transparent;
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-ghost);
  cursor: pointer;
  padding: 8px;
  z-index: 10;
  transition: color var(--duration-fast);
}

.modal__close:hover {
  color: var(--text-primary);
}

.modal__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}

/* ─── Modal Gallery ─── */
.modal__gallery {
  display: flex;
  flex-direction: column;
  background: var(--void-panel);
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
}

.modal__gallery-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  min-height: 300px;
}

.modal__gallery-main img {
  max-width: 100%;
  max-height: 350px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  cursor: zoom-in;
}

.modal__gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.modal__gallery-arrow {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast);
}

.modal__gallery-arrow svg {
  width: 22px;
  height: 22px;
}

.modal__gallery-arrow:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

.modal__gallery-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}

.modal__gallery-thumbs::-webkit-scrollbar { display: none; }

.modal__thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.4;
  filter: grayscale(0.6);
  border: 1px solid transparent;
  transition: all var(--duration-fast);
  flex-shrink: 0;
}

.modal__thumb:hover {
  opacity: 0.7;
  filter: grayscale(0.2);
}

.modal__thumb.is-active {
  opacity: 1;
  filter: none;
  border-color: var(--gold-old);
}

.modal__gallery-counter {
  position: absolute;
  top: 12px;
  left: 16px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

/* ─── Modal Info — Estética de Expediente ─── */
.modal__info {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.015'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(20,18,14,1) 0%, rgba(18,16,12,1) 100%);
}

.modal__texts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal__tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}

.modal__title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-primary);
}

.modal__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.modal__meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.modal__meta-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-ghost);
}

.modal__meta-value {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.modal__description {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
}


/* ═══════════════════════════════════════════
   LIGHTBOX — FULLSCREEN IMAGE VIEWER
   ═══════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 8px;
  z-index: 10;
  transition: color var(--duration-fast);
}

.lightbox__close:hover {
  color: #fff;
}

.lightbox__img-wrap {
  position: relative;
  z-index: 5;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  transition: color var(--duration-fast), background var(--duration-fast), border-color var(--duration-fast);
}

.lightbox__arrow:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.lightbox__arrow--prev {
  left: 20px;
}

.lightbox__arrow--next {
  right: 20px;
}

.lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5);
  z-index: 10;
}

/* ═══════════════════════════════════════════
   ATLAS SPACER — Pushes content below viewport
   ═══════════════════════════════════════════ */
.atlas-spacer {
  height: 100vh;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   ABOUT — BIOGRAFÍA + RETRATO
   ═══════════════════════════════════════════ */
.about {
  position: relative;
  z-index: 500;
  background: #060606;
  border-top: 1px solid rgba(212, 175, 55, 0.06);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Subtle gradient veil over the dark background */
.about::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 80% 80%, rgba(160, 132, 92, 0.025) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.about__inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 100px clamp(32px, 6vw, 100px) 80px;
  gap: 80px;
  align-items: center;
}

/* ─── Portrait — typographic placeholder ─── */
.about__portrait {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  overflow: hidden;
}

/* Bounding frame — dashed archival border */
.about__portrait::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(212, 175, 55, 0.08);
  pointer-events: none;
}

/* Corner brackets — top-left */
.about__portrait::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 28px;
  height: 28px;
  border-top: 2px solid rgba(212, 175, 55, 0.3);
  border-left: 2px solid rgba(212, 175, 55, 0.3);
  pointer-events: none;
}

.about__portrait-word {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(6rem, 14vw, 11rem);
  color: rgba(212, 175, 55, 0.06);
  letter-spacing: -0.02em;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  /* Slight angle for archival feel */
  transform: rotate(-3deg) translateY(4%);
}

/* ─── Content ─── */
.about__content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.about__overline {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-old);
  opacity: 0.7;
}

.about__name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

/* ─── Divider — gold ruled line ─── */
.about__divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-old) 0%, rgba(212, 175, 55, 0.2) 100%);
  margin: -4px 0;
}

.about__bio {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--text-secondary);
  max-width: 420px;
  font-style: italic;
}

/* ─── Footer — Minimal Colophon ─── */
.footer {
  position: relative;
  z-index: 1;
  padding: 40px clamp(32px, 6vw, 100px);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer__colophon {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-ghost);
  letter-spacing: 0.08em;
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {

  /* ─── Scroll fix: sin bloqueos en html/body ─── */
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* ─── Header — nombre compacto en móvil ─── */
  .site-header__brand {
    flex-shrink: 1;
    min-width: 0;
  }

  .site-header__name {
    font-size: clamp(0.75rem, 2.8vw, 1.1rem);
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 44vw;
  }

  .site-header__filters {
    padding-left: 8px;
    flex-shrink: 1;
  }

  /* ─── Atlas — flujo en documento, altura gestionada por JS ─── */
  .atlas {
    position: relative;
    height: auto;
    min-height: 100px;
    overflow: visible;
    background-image: none;
    z-index: 15;
  }

  /* ─── Canvas: posicionamiento absoluto del masonry JS ─── */
  .atlas__canvas {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    /* height la pone JS con totalH */
  }

  /* ─── Obras: sin margin ni padding ─── */
  .atlas__obra {
    margin: 0;
    padding: 0;
  }

  .atlas__obra-frame {
    margin: 0;
    padding: 0;
  }

  .atlas__obra-inner {
    margin: 0;
    padding: 0;
  }

  .atlas__obra-img {
    display: block;
  }

  /* Spacer innecesario en móvil */
  .atlas-spacer {
    display: none;
  }

  /* Scroll hint no aplica en móvil */
  .atlas__scroll-hint {
    display: none;
  }

  /* Títulos siempre visibles en móvil */
  .atlas__obra-title {
    opacity: 0.9;
  }

  /* ─── Modal ─── */
  .modal__body {
    grid-template-columns: 1fr;
  }

  .modal__gallery {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }

  .modal__gallery-main {
    min-height: 200px;
    padding: 20px;
  }

  /* Texto centrado en móvil (Panel 47 y todos los paneles) */
  .modal__info {
    padding: 28px 20px;
    text-align: center;
  }

  .modal__meta-row {
    justify-content: center;
    gap: 8px;
  }

  .modal__title,
  .modal__description {
    text-align: center;
  }

  /* ─── Bio ─── */
  /* 85vh en lugar de 100vh: evita la zona ciega de iOS Safari.
     svh (small viewport height) es ideal si el browser lo soporta (iOS 15.4+) */
  .about {
    min-height: 85vh;
    min-height: 85svh;
  }

  .about__inner {
    grid-template-columns: 1fr;
    padding: 60px 24px 48px;
    gap: 40px;
    text-align: center;
  }

  .about__portrait {
    min-height: 180px;
    overflow: visible;
  }

  .about__portrait-word {
    font-size: clamp(5rem, 22vw, 7rem);
  }

  .about__content {
    align-items: center;
  }

  .about__divider {
    margin: -4px auto;
  }

  .about__bio {
    max-width: 100%;
  }

  .footer {
    padding: 28px 24px;
  }

  .footer__colophon {
    font-size: 0.85rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .filter-chip {
    font-size: 0.6rem;
    padding: 4px 10px;
  }

  /* Ocultar nombre en pantallas muy pequeñas para no aplastar los filtros */
  .site-header__brand {
    display: none;
  }
}
