/* =====================================================================
   Maymara Brugnoli — estilos
   Según el brief de identidad de la artista: fondo claro y neutro para que
   mande la obra, tipografía sans serif geométrica (Jost + DM Sans), marcos
   finos y sombras suaves, y un solo acento vibrante (rojo carmín) usado con
   moderación. Tipografías alojadas en /fonts (sin Google Fonts).
   ===================================================================== */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/jost-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/jost-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jost-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/dm-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/dm-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/dm-sans-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #f7f7f5;
  --bg-deep: #1c1c1c;
  --ink: #1c1c1c;
  --muted: #6b6b6b;
  --line: #e2e2de;
  --accent: #b8203a;
  --accent-ink: #ffffff;
  --shadow-soft: 0 6px 24px rgba(28, 28, 28, .08);
  --font-display: "Jost", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin: 0 auto; }

/* ---------- Piezas de texto reutilizables ---------- */
.kicker {
  margin: 0; font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  padding-bottom: 4px; border-bottom: 1px solid var(--ink);
  transition: gap .25s var(--ease), color .2s;
}
.link-arrow::after { content: "→"; font-family: var(--font-display); font-size: 1.1rem; line-height: 1; }
.link-arrow:hover { gap: 16px; color: var(--accent); border-color: var(--accent); }
.link-arrow.down::after { content: "↓"; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px;
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  font-size: .78rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid var(--accent); border-radius: 2px;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-small { padding: 11px 18px; font-size: .72rem; }
.text-link { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .2s, color .2s; }
.text-link:hover { border-color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
@supports not (background: color-mix(in srgb, #fff, #000)) { .site-header { background: rgba(247,247,245,.92); } }
.site-header.scrolled { border-bottom-color: var(--line); }
.brand { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); }
.nav a { font-size: .74rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 500; letter-spacing: .14em; color: var(--muted); padding: 4px 0; }
.lang-toggle span { transition: color .2s; }
.lang-toggle span.active { color: var(--ink); border-bottom: 1px solid var(--ink); }
.lang-toggle .sep { opacity: .5; }

.menu-btn { display: none; width: 44px; height: 44px; position: relative; margin-right: -10px; }
.menu-btn span { position: absolute; left: 11px; width: 22px; height: 1.5px; background: currentColor; transition: transform .3s, top .3s; }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Portada: nombre a la izquierda, una obra entera (sin recortar) a la derecha ---------- */
.hero { padding: clamp(40px, 7vh, 88px) 0 clamp(56px, 8vh, 104px); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.hero-text { padding-bottom: clamp(8px, 2vh, 24px); }
.hero-title {
  font-size: clamp(3rem, 7.6vw, 6.6rem); font-weight: 300; letter-spacing: -.025em; line-height: 1;
  margin: 18px 0 26px;
}
.hero-tagline {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.35rem, 2.1vw, 1.8rem); line-height: 1.35; max-width: 28ch; margin: 0 0 36px;
}
.hero-art { margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.hero-art img {
  max-height: min(76vh, 820px); width: auto; max-width: 100%; height: auto; object-fit: contain;
  background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
.hero-art figcaption { font-size: .78rem; color: var(--muted); letter-spacing: .03em; text-align: right; }
.hero-art figcaption em { font-style: normal; font-weight: 500; color: var(--ink); }

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; scroll-margin-top: var(--header-h); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 40px; margin-bottom: clamp(32px, 4vw, 56px); }
.section h2 { font-size: clamp(2.2rem, 4.2vw, 3.2rem); font-weight: 400; letter-spacing: -.01em; }
.section-sub { font-family: var(--font-display); font-weight: 300; font-size: 1.3rem; color: var(--muted); margin: 0; max-width: 44ch; }

/* ---------- Filtros (series) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: -12px 0 36px; }
.pill {
  padding: 6px 0; font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.pill:hover { color: var(--ink); }
.pill.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Grilla de obras (pared) ---------- */
.grid { --cols: 3; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: clamp(24px, 3.5vw, 48px); align-items: start; }
.grid .col { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 56px); min-width: 0; }
.card { margin: 0; cursor: pointer; }
.card-img { position: relative; overflow: hidden; background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.card-img img { width: 100%; height: auto; opacity: 0; transition: opacity .6s var(--ease), transform .9s var(--ease); }
.card-img img.loaded { opacity: 1; }
.card:hover .card-img img { transform: scale(1.02); }
.badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 8px;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  font-size: .62rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
.card-caption { padding: 12px 0 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; line-height: 1.25; letter-spacing: 0; }
.card-meta { margin: 0; font-size: .74rem; color: var(--muted); letter-spacing: .03em; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.grid-empty { color: var(--muted); font-style: italic; }

/* ---------- Bio ---------- */
.bio-grid { display: grid; grid-template-columns: minmax(240px, 2fr) 3fr; gap: clamp(36px, 6vw, 110px); align-items: start; }
.bio-portrait { margin: 0; position: sticky; top: calc(var(--header-h) + 24px); }
.bio-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.bio-text h2 { margin-bottom: 28px; }
.bio-text p { font-size: 1.05rem; margin: 0 0 1.25em; max-width: 60ch; }
.bio-text p:first-of-type { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.35; font-weight: 300; }
.bio-links { margin-top: 32px; }
.cv { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr; gap: 24px 48px; }
.cv-title { grid-column: 1 / -1; font-size: 1.5rem; font-weight: 400; }
.cv-list { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; font-size: .92rem; align-content: start; }
.cv-list dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.cv-list dd { margin: 0; }
.expo { margin: 0; max-width: 420px; }
.expo img { width: 100%; height: auto; border: 1px solid var(--line); }
.expo figcaption { margin-top: 8px; font-size: .74rem; color: var(--muted); letter-spacing: .04em; }
@media (min-width: 1025px) { .cv { grid-template-columns: 3fr 2fr; align-items: start; } }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(24px, 6vw, 110px); align-items: start; }
.contact .section-sub { font-size: 1.5rem; color: var(--ink); max-width: 30ch; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin: 32px 0 36px; }
.contact-details { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; font-size: .95rem; }
.contact-details dt { color: var(--muted); font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; padding-top: 4px; }
.contact-details dd { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; font-size: .76rem; color: var(--muted); letter-spacing: .03em; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- Visor (lightbox) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(23, 24, 28, .97);
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  animation: fadein .25s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.lb-figure {
  margin: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px clamp(16px, 8vw, 110px) 28px;
}
.lb-imgwrap { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; width: 100%; }
.lb-imgwrap img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; animation: fadein .35s ease; }
.lb-caption { flex: 0 0 auto; text-align: center; padding-top: 22px; max-width: 70ch; }
.lb-caption h3 { font-size: 1.6rem; font-weight: 400; }
.lb-meta { margin: 6px 0 0; font-size: .78rem; letter-spacing: .06em; opacity: .7; font-variant-numeric: tabular-nums; }
.lb-desc { margin: 10px 0 0; font-size: .95rem; opacity: .85; }
.lb-desc:empty { display: none; }
.lb-caption .btn { margin-top: 18px; background: transparent; color: var(--bg); border-color: rgba(245,245,243,.5); }
.lb-caption .btn:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.lb-btn {
  position: absolute; z-index: 2; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; line-height: 1; color: var(--bg);
  background: rgba(245,245,243,.08); transition: background .2s;
}
.lb-btn:hover { background: rgba(245,245,243,.2); }
.lb-close { top: 16px; right: 16px; font-size: 1.9rem; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-btn.disabled { opacity: .2; pointer-events: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .bio-grid, .contact-grid { grid-template-columns: 1fr; }
  .bio-portrait { position: static; max-width: 400px; }
}
@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); padding: 4px var(--gutter) 24px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); width: 100%; font-size: .9rem; color: var(--ink); }
  .lang-toggle { margin-top: 18px; }
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-title { font-size: clamp(3rem, 15vw, 4.6rem); margin: 14px 0 20px; }
  .hero-tagline { font-size: 1.35rem; margin-bottom: 28px; }
  .hero-art { align-items: flex-start; }
  .hero-art img { max-height: 62vh; }
  .hero-art figcaption { text-align: left; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .card-caption { flex-direction: column; gap: 2px; }
  .card-meta { text-align: left; }
  .lb-figure { padding: 64px 12px 20px; }
  .lb-prev, .lb-next { width: 44px; height: 44px; top: auto; bottom: 14px; transform: none; }
  .lb-prev { left: 12px; } .lb-next { right: 12px; }
  .lb-caption { padding: 16px 56px 0; }
  .lb-caption h3 { font-size: 1.35rem; }
}
@media (max-width: 480px) {
  .grid { gap: 14px; }
  .grid .col { gap: 24px; }
  .card-title { font-size: 1rem; }
  .card-meta { font-size: .68rem; }
  .card-caption { padding-top: 8px; }
  .badge { top: 8px; left: 8px; font-size: .56rem; }
  .contact-details { grid-template-columns: 1fr; gap: 4px 0; }
  .contact-details dd { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-img img, .lightbox, .lb-imgwrap img, .link-arrow { transition: none; animation: none; }
  .card:hover .card-img img { transform: none; }
}
