/* ==========================================================================
   Anita — Painter · as-t.art
   A minimal, high-end gallery portfolio.
   ========================================================================== */

:root {
  --bg:        #f1eee8;   /* off-white canvas */
  --bg-soft:   #efece6;
  --ink:       #12100e;   /* near-black */
  --muted:     #716b62;   /* soft grey for secondary text */
  --line:      #e2ddd4;   /* hairline borders */
  --accent:    #5a5247;   /* warm taupe accent */
  --overlay:   rgba(20, 18, 16, 0.92);

  --max:       1380px;
  --gutter:    clamp(1.25rem, 5vw, 4.5rem);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  font-size: 16px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.home-page {
  overflow: hidden;
  height: 100vh;
  height: 100svh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

body.front-lock-checking .site-header,
body.front-lock-checking main {
  opacity: 0;
  pointer-events: none;
}
body.front-locked {
  overflow: hidden;
}
body.front-locked .site-header,
body.front-locked main {
  visibility: hidden;
  pointer-events: none;
}
.front-lock {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--bg);
}
.front-lock[hidden] {
  display: none !important;
}
.front-lock-card {
  width: min(390px, 100%);
  display: grid;
  gap: 1rem;
}
.front-lock-card .eyebrow {
  color: var(--ink);
}
.front-lock-card label {
  font-family: "Archivo", var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--muted);
}
.front-lock-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
  align-items: stretch;
}
.front-lock-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(251, 250, 247, 0.58);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.86rem 1rem;
  outline: none;
}
.front-lock-row input:focus {
  border-color: var(--accent);
}
.front-lock-row button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-family: "Archivo", var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  padding: 0 1.2rem;
}
.front-lock-error {
  min-height: 1.4em;
  margin: 0;
  color: #9f3a26;
  font-size: 0.9rem;
}
@media (max-width: 520px) {
  .front-lock-row {
    grid-template-columns: 1fr;
  }
  .front-lock-row button {
    min-height: 3rem;
  }
}

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.08; margin: 0; letter-spacing: 0.005em; }
.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.5rem, 12vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.45;
  font-weight: 300;
  color: var(--ink);
  max-width: 24ch;
}
p { margin: 0 0 1.2em; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
section { position: relative; }
.section-pad { padding-block: clamp(4.5rem, 12vw, 9rem); }

/* ==========================================================================
   Header / nav
   ========================================================================== */
/* top menu bar with a light, translucent, blurred background.
   The blur lives on a ::before layer (not the header itself) so the header
   does NOT become a containing block that traps the fixed mobile nav overlay. */
.site-header {
  position: fixed; z-index: 100;
  top: 0; left: 0; right: 0; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem var(--gutter) 1.4rem;
  background: transparent;
  border: 0;
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(251, 250, 247, 0.66);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  transition: background 0.5s var(--ease);
}
.site-header.scrolled::before {
  background: rgba(251, 250, 247, 0.78);
}
.brand {
  line-height: 1;
  transform: translate3d(var(--logo-avoid-x, 0px), var(--logo-avoid-y, 0px), 0);
  transition: transform 0.55s var(--ease);
  will-change: transform;
}
.brand .name {
  font-family: "Archivo", var(--sans);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  transform-origin: 50% 55%;
  transition: letter-spacing 0.45s var(--ease), transform 0.45s var(--ease);
  will-change: transform, letter-spacing;
}
.brand .name .logo-char {
  display: inline-block;
  color: var(--ink);
  transform: translate3d(var(--char-x, 0px), var(--char-y, 0px), 0);
  transition: transform 0.68s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.brand:hover .name,
.brand:focus-visible .name {
  letter-spacing: 0.025em;
  transform: translateY(-1px);
}
.brand:focus-visible { outline: 1px solid var(--accent); outline-offset: 0.35rem; }
.brand .tag {
  font-family: "Archivo", var(--sans);
  font-weight: 600;
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}

@media (prefers-reduced-motion: reduce) {
  .brand { transform: none !important; transition: none; }
  .brand .name { animation: none !important; transition: none; }
  .brand .name .logo-char { transform: none !important; transition: none; }
}

.nav { display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 2.8rem); }
.nav a {
  font-family: "Archivo", var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding-block: 0.4rem;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { color: var(--accent); }

/* language switcher */
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin-left: clamp(0.6rem, 1.5vw, 1.4rem);
  padding-left: clamp(0.8rem, 1.5vw, 1.4rem);
  border-left: 1px solid var(--line);
}
.lang-btn {
  font-family: "Archivo", var(--sans); font-weight: 600;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  border: 0; background: none; color: var(--muted);
  padding: 0.2rem 0.1rem; transition: color 0.3s var(--ease);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-current="true"] { color: var(--ink); border-bottom: 1.5px solid currentColor; }

/* mobile nav toggle */
.nav-toggle {
  display: none; border: 0; background: none; padding: 0.4rem;
  width: 34px; height: 26px; position: relative; z-index: 110;
}
.nav-toggle span { position: absolute; left: 4px; right: 4px; height: 1.5px; background: var(--ink); transition: transform 0.4s var(--ease), opacity 0.3s; }
.nav-toggle span:nth-child(1) { top: 7px; }
.nav-toggle span:nth-child(2) { bottom: 7px; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-top: 8rem; }
.hero-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap; margin-bottom: 2.4rem;
}
.hero-head .display { flex: 1 1 auto; }
.hero-meta { text-align: right; padding-bottom: 0.6rem; }
.hero-meta .eyebrow + .eyebrow { margin-top: 0.5rem; display: block; }

.hero-figure {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

/* ---- big full-width featured picture filling the hero (home) ---- */
.wall-hero {
  height: 100vh;
  height: 100dvh;
  margin: 0; padding: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
/* stacked, crossfading background layers */
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 3.5s var(--ease);
}
.hero-slide.is-active { opacity: 1; }
.wall-hero::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(20,18,16,0.46), rgba(20,18,16,0.16) 42%, rgba(20,18,16,0.04));
}
.hero-text {
  position: absolute;
  z-index: 10;
  left: var(--gutter);
  bottom: clamp(7rem, 13vw, 11rem);
  max-width: min(760px, 72vw);
  color: #fff;
  text-shadow: 0 2px 26px rgba(0,0,0,0.42);
}
.hero-text p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4.35vw, 4.35rem);
  line-height: 1.08;
  font-weight: 300;
}

/* bottom-corner slideshow arrows */
.hero-prev, .hero-next {
  position: absolute; z-index: 20;
  bottom: clamp(1.1rem, 3vw, 2.4rem);
  width: clamp(48px, 5vw, 60px); height: clamp(48px, 5vw, 60px);
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px;
  background: rgba(250, 249, 246, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 8px 24px -8px rgba(20, 18, 16, 0.4);
  color: var(--ink);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}
.hero-next { right: clamp(1.1rem, 3vw, 2.4rem); }
.hero-prev { left: clamp(1.1rem, 3vw, 2.4rem); }
.hero-prev:hover, .hero-next:hover { background: rgba(255, 255, 255, 0.9); transform: scale(1.06); }
.hero-prev:active, .hero-next:active { transform: scale(0.96); }
.hero-prev svg, .hero-next svg { width: 42%; height: 42%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- About panel that slides down from the top ---- */
.about-panel {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  max-height: 100vh; overflow-y: auto;
  background: var(--bg);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 20px 50px -20px rgba(20, 18, 16, 0.4);
  transform: translateY(-100%);
  transition: none;
  -webkit-overflow-scrolling: touch;
}
body.app-ready .about-panel { transition: transform 0.6s var(--ease); }
body.about-open .about-panel { transform: translateY(0); }
.about-inner {
  position: relative;
  max-width: 1100px; margin: 0 auto;
  padding: clamp(6rem, 11vw, 8.5rem) var(--gutter) clamp(1.4rem, 3vw, 2.2rem);
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) 1.25fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.about-figure {
  margin: 0;
  /* top must equal .about-inner's padding-top so it sticks immediately
     with no upward drift before locking */
  position: sticky; top: clamp(6rem, 11vw, 8.5rem);
}
.about-figure img {
  width: 100%; height: auto; display: block;
  box-shadow: 0 18px 40px -18px rgba(20, 18, 16, 0.5);
}
.about-inner .eyebrow { display: block; margin-bottom: 1.4rem; }
.about-cert {
  margin: clamp(1.8rem, 4vw, 2.6rem) 0 0;
  width: 100%;
}
.about-cert img {
  width: 100%; height: auto; display: block;
}
.about-inner p {
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.75; color: var(--ink);
  margin: 0 0 1.3em;
}
.about-inner .about-cta { margin-top: 2rem; color: var(--accent); }
.about-inner .about-cta a {
  font-family: "Archivo", var(--sans); font-weight: 700;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.about-inner .about-cta a:hover { color: var(--ink); }
.about-close {
  position: absolute; top: clamp(4.8rem, 9vw, 6rem); right: var(--gutter);
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--ink);
  border-radius: 999px; transition: transform 0.4s var(--ease);
}
.about-close:hover { transform: scale(1.1); }
.about-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

.hero-intro {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  margin-top: 3rem; align-items: start;
}
.hero-intro .lede { max-width: 30ch; }
.hero-intro .col-note { color: var(--muted); max-width: 46ch; justify-self: end; }

/* reveal animation */
[data-reveal] { opacity: 0; transform: none; transition: opacity 0.7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.12s; }
[data-reveal][data-delay="2"] { transition-delay: 0.24s; }
[data-reveal][data-delay="3"] { transition-delay: 0.36s; }

.figure-cover { transform: scale(1.06); transition: transform 1.6s var(--ease); }
[data-reveal].in .figure-cover { transform: scale(1); }

/* ==========================================================================
   Generic page header (interior pages)
   ========================================================================== */
.page-head { padding-top: 9rem; }
.page-head .eyebrow { margin-bottom: 1.4rem; display: block; }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
.page-head .sub { color: var(--muted); margin-top: 1.4rem; max-width: 52ch; font-size: 1.05rem; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ==========================================================================
   Featured strip (home)
   ========================================================================== */
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.4rem); }
.feature-card figure { margin: 0; overflow: hidden; background: var(--bg-soft); }
.feature-card img { width: 100%; transition: transform 1.2s var(--ease); }
.feature-card:hover img { transform: scale(1.04); }
.feature-card figcaption { margin-top: 1rem; }
.feature-card .t { font-family: var(--serif); font-size: 1.3rem; }
.feature-card .m { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.04em; margin-top: 0.15rem; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.8rem;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.link-quiet {
  font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); position: relative; white-space: nowrap;
}
.link-quiet::after {
  content: "→"; margin-left: 0.6rem; display: inline-block;
  transition: transform 0.4s var(--ease);
}
.link-quiet:hover::after { transform: translateX(6px); }

/* ==========================================================================
   Gallery
   ========================================================================== */
.filters {
  display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 3rem;
}
.filters button {
  border: 1px solid transparent; background: none; color: var(--muted);
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.55rem 1rem; border-radius: 100px; transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); border-color: var(--line); background: var(--bg-soft); }
.gallery-toolbar {
  max-width: var(--max);
  margin: 0 auto clamp(1.8rem, 4vw, 3rem);
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
}
.gallery-control {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}
.gallery-size-control {
  margin-left: 1.35rem;
  padding-left: 1.35rem;
  border-left: 1px solid var(--line);
}
.gallery-toolbar button {
  border: 0;
  background: none;
  color: var(--muted);
  font-family: "Archivo", var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.2rem 0.1rem;
  border-radius: 0;
  transition: color 0.3s var(--ease);
}
.gallery-toolbar button:hover,
.gallery-toolbar button[aria-pressed="true"] {
  color: var(--ink);
}
.gallery-toolbar button[aria-pressed="true"] {
  border-bottom: 1.5px solid currentColor;
}

/* masonry via JS-built flex columns — all columns start at the same top,
   so the first row always aligns; works keep their natural proportions */
.gallery-grid {
  max-width: var(--max); margin-inline: auto;
  display: flex; align-items: flex-start;
  gap: clamp(1rem, 2vw, 1.6rem);
}
.gallery-grid.square-grid {
  --square-min: 300px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--square-min), 100%), 1fr));
  align-items: start;
}
.gallery-grid.square-grid.square-small { --square-min: 220px; }
.gallery-grid.square-grid.square-large { --square-min: 300px; }
@media (max-width: 1399px) {
  .gallery-size-control { display: none; }
  .gallery-layout-control { gap: 1.2rem; }
}
.gallery-col {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column;
  gap: clamp(1.4rem, 3vw, 2.4rem);
}
/* fallback before JS builds the columns: simple multi-column */
.gallery-grid:not(.cols) { display: block; column-width: 300px; column-gap: clamp(1rem, 2vw, 1.6rem); }
.gallery-grid.square-grid:not(.cols) { display: grid; column-width: auto; }

.art {
  break-inside: avoid; margin: 0;
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; padding: 0;
  opacity: 0; transform: none;
  transition: opacity 0.7s var(--ease);
}
.art.in { opacity: 1; transform: none; }
/* gallery tiles never carry the reveal offset, so every column's first
   item aligns exactly at the top of the grid */
.gallery-grid .art { opacity: 1; transform: none; }
.art.hide { display: none; }
.art:focus { outline: none; }
.art:focus-visible .art-frame { outline: 2px solid var(--accent); outline-offset: 4px; }
.art-frame {
  margin: 0; overflow: hidden; position: relative; background: var(--bg-soft);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.art img { width: 100%; height: auto; display: block; transition: transform 1.3s var(--ease), filter 0.6s var(--ease); }
.gallery-grid.square-grid .art-frame { aspect-ratio: 1 / 1; }
.gallery-grid.square-grid .art img { height: 100%; object-fit: cover; }
.art:hover img { transform: scale(1.045); }
.art-frame::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  opacity: 0; transition: opacity 0.5s var(--ease); pointer-events: none;
}
.art:hover .art-frame::after { opacity: 1; }
.art figcaption { margin-top: 0.9rem; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.art .t { font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; }
.art .y { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.06em; }
.art .meta { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.03em; margin-top: 0.1rem; }

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0.5s;
  padding: clamp(1rem, 5vw, 4rem);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-stage { display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lb-img-wrap {
  display: flex; align-items: center; justify-content: center;
  max-height: 76vh; max-width: 90vw;
}
.lb-img-wrap img,
.lb-img-wrap video {
  max-height: 76vh; max-width: 100%; width: auto; height: auto;
  box-shadow: 0 40px 80px rgba(0,0,0,0.4);
  background: var(--bg-soft);
}
.lb-img-wrap img {
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.lb-img-wrap img.loaded { opacity: 1; }
.lb-img-wrap video {
  display: block;
  opacity: 1;
}
.lb-img-wrap img[hidden],
.lb-img-wrap video[hidden] { display: none; }
.lb-caption { color: #efeae2; text-align: center; margin-top: 1.6rem; }
.lb-caption .t { font-family: var(--serif); font-size: 1.5rem; }
.lb-caption .m { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: #b9b2a7; margin-top: 0.5rem; }
.lb-caption .d { font-size: 0.92rem; line-height: 1.6; color: #d8d2c8; margin-top: 0.9rem; max-width: 52ch; margin-inline: auto; }
.lb-caption .d:empty { display: none; }

.lb-btn {
  position: absolute; background: none; border: 0; color: #efeae2;
  width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  opacity: 0.7; transition: opacity 0.3s, transform 0.3s var(--ease);
}
.lb-btn:hover { opacity: 1; }
.lb-btn svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 1; fill: none; }
.lb-close { top: clamp(0.8rem, 3vw, 1.8rem); right: clamp(0.8rem, 3vw, 1.8rem); }
.lb-prev { left: clamp(0.4rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(0.4rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) translateX(-4px); }
.lb-next:hover { transform: translateY(-50%) translateX(4px); }
.lb-count { position: absolute; bottom: clamp(1rem, 4vw, 2rem); left: 50%; transform: translateX(-50%); color: #b9b2a7; font-size: 0.75rem; letter-spacing: 0.2em; }

/* ==========================================================================
   About
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about-grid figure { margin: 0; overflow: hidden; background: var(--bg-soft); }
.about-grid img { width: 100%; }
.about-copy p { font-size: 1.08rem; max-width: 56ch; }
.about-copy .lede { margin-bottom: 1.8rem; }
.statement { font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.32; max-width: 22ch; }

/* exhibitions list */
.cv { display: grid; gap: 0; margin-top: 1rem; }
.cv-row {
  display: grid; grid-template-columns: 5rem 1fr auto; gap: clamp(1rem, 3vw, 2.5rem);
  padding: 1.5rem 0; border-top: 1px solid var(--line); align-items: start;
  position: relative;
}
.cv-row:last-child { border-bottom: 1px solid var(--line); }
.cv-year { grid-column: 1; grid-row: 1; font-family: var(--serif); font-size: 1.3rem; color: var(--accent); }
.cv-title { grid-column: 2; grid-row: 1; font-size: 1.02rem; }
.cv-title .sub { color: var(--muted); font-size: 0.9rem; display: block; margin-top: 0.2rem; white-space: pre-line; }
.cv-place { grid-column: 3; grid-row: 1; align-self: start; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.04em; text-align: right; }
.cv-more-wrap {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  display: flex;
  justify-content: flex-end;
  margin: 0;
}
.cv-more {
  display: inline-flex; border: 0; background: none; color: var(--ink);
  font-family: "Archivo", var(--sans); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 0.2rem 0.1rem; border-bottom: 1.5px solid currentColor;
}
.exhibition-more {
  grid-column: 2 / -1;
  grid-row: 2;
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transition: grid-template-rows 0.42s var(--ease), opacity 0.32s var(--ease), margin-top 0.42s var(--ease);
}
.cv-row.is-open .exhibition-more { grid-template-rows: 1fr; opacity: 1; margin-top: 1rem; }
.exhibition-thumbs {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: none;
}
.exhibition-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: var(--bg-soft);
  cursor: pointer;
}
.exhibition-thumb img,
.exhibition-thumb video,
.exhibition-thumb .video-fallback {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.7s var(--ease), filter 0.4s var(--ease);
}
.exhibition-thumb:hover img,
.exhibition-thumb:hover video,
.exhibition-thumb:hover .video-fallback { transform: scale(1.045); filter: saturate(1.03); }
.exhibition-thumb .video-fallback {
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.96), rgba(255,255,255,0) 34%),
    linear-gradient(135deg, rgba(251,250,247,0.98), rgba(218,211,200,0.9)),
    var(--bg-soft);
  box-shadow: inset 0 0 0 1px rgba(18,16,14,0.05);
}
.exhibition-thumb .video-fallback::after {
  content: "Video";
  position: absolute; left: 50%; top: calc(50% + 2rem); transform: translateX(-50%);
  color: var(--muted); font-family: "Archivo", var(--sans);
  font-size: 0.56rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}
.exhibition-thumb .video-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  background: rgba(18,16,14,0.72); color: #fff;
  display: grid; place-items: center;
}
.exhibition-thumb .video-play::before {
  content: "";
  width: 0; height: 0;
  border-top: 0.43rem solid transparent;
  border-bottom: 0.43rem solid transparent;
  border-left: 0.68rem solid currentColor;
  margin-left: 0.16rem;
}
@media (max-width: 640px){
  .cv-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    padding: 1.25rem 0;
  }
  .cv-year { grid-column: 1; grid-row: 1; }
  .cv-title { grid-column: 1; grid-row: 2; }
  .cv-place {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
    margin-top: 0.1rem;
  }
  .cv-more-wrap {
    position: static;
    grid-column: 1;
    grid-row: 4;
    justify-content: flex-end;
    margin-top: 0.7rem;
  }
  .cv-more { margin-left: 0; }
  .exhibition-more {
    grid-column: 1;
    grid-row: 5;
    width: 100%;
  }
  .cv-row.is-open .exhibition-more { margin-top: 0.85rem; }
  .exhibition-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    max-width: none;
    width: 100%;
  }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.contact-head { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.contact-head .eyebrow,
.contact-head h1,
.contact-head .sub { grid-column: 1; }
.contact-head .contact-portrait { grid-column: 2; grid-row: 1 / 4; justify-self: start; align-self: start; margin-top: 0.15rem; }
.contact-portrait { width: min(100%, 16rem); aspect-ratio: 1 / 1; margin: 0; overflow: hidden; background: var(--line); }
.contact-portrait img { width: 100%; height: 100%; display: block; object-fit: cover; }
.contact-info dl { margin: 0; }
.contact-info dt { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-top: 2rem; }
.contact-info dd { margin: 0.4rem 0 0; font-family: var(--serif); font-size: 1.35rem; }
.contact-info dd a { position: relative; }
.contact-info dd a:hover { color: var(--accent); }

/* ==========================================================================
   Media
   ========================================================================== */
.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(2rem, 5vw, 4rem); }
.media-card { display: grid; gap: 1rem; }
.media-frame { aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; }
.media-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.media-instagram { width: 100%; max-width: 540px; }
.media-instagram .instagram-media { margin: 0 !important; min-width: 0 !important; width: 100% !important; }
.media-card h2 { margin: 0.2rem 0 0; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 300; line-height: 1.1; }
.media-card p { color: var(--muted); max-width: 58ch; }

.form-field { position: relative; margin-bottom: 2.4rem; }
.form-field input, .form-field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--line);
  background: none; padding: 0.7rem 0; font: inherit; color: var(--ink);
  transition: border-color 0.4s var(--ease);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--ink); }
.form-field label {
  position: absolute; left: 0; top: 0.7rem; color: var(--muted);
  font-size: 0.95rem; pointer-events: none;
  transition: transform 0.35s var(--ease), font-size 0.35s var(--ease), color 0.35s var(--ease);
  transform-origin: left;
}
.form-field input:focus + label, .form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label, .form-field textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.6rem) scale(0.78); color: var(--accent);
}
.btn {
  display: inline-flex; align-items: center; gap: 0.8rem;
  border: 1px solid var(--ink); background: none; color: var(--ink);
  padding: 0.95rem 2.2rem; font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase;
  border-radius: 100px; transition: background 0.45s var(--ease), color 0.45s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--bg); }
.form-note { color: var(--muted); font-size: 0.85rem; margin-top: 1.4rem; }
.form-success { color: var(--accent); font-size: 0.95rem; margin-top: 1.2rem; min-height: 1.2em; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta { text-align: center; }
.cta h2 { font-size: clamp(2rem, 6vw, 4.2rem); max-width: 16ch; margin: 0 auto 2rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(1.2rem, 3vw, 2rem);
}
.site-footer .wrap {
  max-width: none;
  padding-inline: var(--gutter);
}
.about-panel-footer {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
  padding-block: clamp(1.2rem, 3vw, 2rem);
  background: transparent;
}
.about-panel-footer .wrap {
  padding-inline: 0;
}
.footer-inner { display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-inner .f-brand { font-family: var(--serif); font-size: 1.2rem; }
.footer-inner .f-dom { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; }
.footer-nav { display: flex; justify-content: center; gap: 1.6rem; }
.footer-nav a { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.footer-nav a:hover, .footer-nav a[aria-current="page"] { color: var(--ink); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 820px){
  .site-header {
    position: fixed;
    top: 0;
    z-index: 120;
  }
  .nav {
    position: fixed; inset: 0; z-index: 105;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 2.2rem; background: var(--bg);
    pointer-events: none;
    transform: translateY(-100%);
    transition: transform 0.6s var(--ease);
    will-change: transform;
  }
  body.nav-open .nav {
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav a { font-size: 1.2rem; letter-spacing: 0.24em; }
  .lang-switch { border-left: 0; padding-left: 0; margin: 1.4rem 0 0; gap: 1.2rem; }
  .lang-btn { font-size: 0.95rem; }
  .about-inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .about-figure { position: static; max-width: 320px; }
  /* pin the toggle above the bar and the open overlay */
  .nav-toggle {
    display: block;
    position: fixed;
    top: 1.5rem;
    right: var(--gutter);
    z-index: 300;
  }
  .hero-text {
    max-width: calc(100vw - 2 * var(--gutter));
    bottom: calc(clamp(7.6rem, 22vw, 10rem) + env(safe-area-inset-bottom));
  }
  .hero-text p {
    font-size: clamp(1.6rem, 8vw, 2.85rem);
  }
  .wall-hero {
    height: 100vh;
    height: 100svh;
    min-height: 100svh;
    margin-bottom: 0;
  }
  .hero-prev,
  .hero-next {
    bottom: calc(clamp(1.2rem, 4vw, 2rem) + env(safe-area-inset-bottom));
  }
  .hero-intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-intro .col-note { justify-self: start; }
  .page-head { padding-top: 5.2rem; }
  .feature-row { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-grid, .contact-grid, .contact-head { grid-template-columns: 1fr; }
  .contact-head .eyebrow,
  .contact-head h1,
  .contact-head .sub,
  .contact-head .contact-portrait { grid-column: 1; }
  .contact-head .contact-portrait { grid-row: auto; margin-top: 2rem; }
  .about-grid figure { max-width: 440px; }
  .hero-meta { text-align: left; }
  .footer-inner { text-align: center; }
  .footer-nav {
    width: 100%;
    flex-wrap: nowrap;
    gap: clamp(0.7rem, 4vw, 1.15rem);
  }
  .footer-nav a {
    font-size: clamp(0.54rem, 2.6vw, 0.68rem);
    letter-spacing: 0.14em;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  [data-reveal], .art { opacity: 1 !important; transform: none !important; }
}
