@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Inter:wght@300;400;500&display=swap');

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

:root {
  --bg: #0a0a0a;
  --fg: #f5f4f0;
  --fg-dim: rgba(245,244,240,0.7);
  --fg-muted: rgba(245,244,240,0.45);
  --accent: rgba(245,244,240,0.12);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --max: 1440px;
}

html { font-size: 18px; scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-weight: 300;
  line-height: 1.7; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a.link {
  color: var(--fg-dim); border-bottom: 1px solid rgba(245,244,240,0.25);
  transition: color 0.2s, border-color 0.2s; padding-bottom: 1px;
}
a.link:hover { color: var(--fg); border-color: rgba(245,244,240,0.65); }

/* ── Image fade-in (general) ─────────────────────────────── */
img { opacity: 0; transition: opacity 0.5s ease; }
img.loaded { opacity: 1; }

/* ── Scroll-reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ─── NAV ─────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 56px;
  background: rgba(10,10,10,0.96);
  border-bottom: 1px solid rgba(245,244,240,0.06);
  backdrop-filter: blur(8px);
}

.nav-brand {
  font-family: var(--serif); font-size: 1rem; font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg);
}

.nav-links { display: flex; gap: 16px; list-style: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.nav-links a {
  font-family: var(--sans); font-size: 0.58rem; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted);
  transition: color 0.25s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); }

.nav-toggle {
  display: none; flex-direction: column; gap: 6px; cursor: pointer;
  padding: 12px; margin: -12px -12px -12px 0; /* extend tap area */
  background: none; border: none; min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 26px; height: 1.5px; background: var(--fg); transition: all 0.3s; }

/* ─── HOME HERO ───────────────────────────────────────────── */
.hero {
  position: relative; height: calc(100vh - 73px); overflow: hidden;
  display: flex; align-items: flex-end; background: #111;
}
/* Hero image */
.hero img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; opacity: 0;
  transition: opacity 0.8s ease; filter: brightness(0.7);
}
.hero img.loaded { opacity: 1; }
/* Hero gradient overlay for text legibility */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.32) 40%,
    transparent 70%
  );
  pointer-events: none; z-index: 0;
}
.hero-content {
  position: relative; padding: 0 56px 72px; z-index: 1;
}
.hero-title {
  font-family: var(--serif); font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 300; letter-spacing: 0.04em; line-height: 1; margin-bottom: 14px;
}
.hero-subtitle {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--fg-dim); font-weight: 300;
}

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(245,244,240,0.3); font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; z-index: 1;
  animation: fadeUpDown 2.8s ease-in-out infinite;
}
.scroll-hint svg { width: 14px; height: 14px; }
@keyframes fadeUpDown {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.7; transform: translateX(-50%) translateY(6px); }
}

/* ─── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  padding: 80px 56px 56px;
  border-bottom: 1px solid rgba(245,244,240,0.07);
}
.page-header h1 {
  font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 300; letter-spacing: 0.04em; line-height: 1;
}
.page-header .subtitle {
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fg-muted); margin-top: 14px;
}

/* ─── WORKS FILTERS ───────────────────────────────────────── */
.works-filters-wrap {
  position: sticky;
  top: 56px;
  z-index: 90;
  background: var(--bg);
}
.works-filters-wrap::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
}

.works-filters {
  display: flex; gap: 0; padding: 0 56px;
  border-bottom: 1px solid rgba(245,244,240,0.07);
  overflow-x: auto; scrollbar-width: none;
}
.works-filters::-webkit-scrollbar { display: none; }

/* Tab panels — controlled by JS + active class */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.filter-btn {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 20px 24px 20px 0; margin-right: 24px;
  color: var(--fg-muted); background: none; border: none; cursor: pointer;
  border-bottom: 1px solid transparent; margin-bottom: -1px;
  white-space: nowrap; transition: color 0.2s;
}
.filter-btn:hover { color: var(--fg-dim); }
.filter-btn.active { color: var(--fg); border-bottom-color: var(--fg); }
.filter-btn.empty { opacity: 0.35; cursor: default; pointer-events: none; }
/* Wide item — spans full row in paintings-grid */
.paintings-grid .gallery-wide {
  grid-column: 1 / -1;
}
.paintings-grid .gallery-wide .gallery-img-wrap img {
  max-height: 70vh;
  object-fit: contain;
}
.paintings-grid .gallery-hero {
  grid-column: 1 / -1;
}
.paintings-grid .gallery-hero .gallery-img-wrap img {
  max-height: 88vh;
  object-fit: contain;
}
.paintings-grid .gallery-xl {
  grid-column: 1 / -1;
}
.paintings-grid .gallery-xl .gallery-img-wrap img {
  max-height: 110vh;
  object-fit: contain;
}
.paintings-grid .gallery-medium {
  grid-column: span 2;
}
.paintings-grid .gallery-small {
  max-width: 75%;
  margin: 0 auto;
}

.filter-all-btn {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--fg-dim);
  padding-right: 32px;
  margin-right: 32px;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.filter-all-btn.active { color: var(--fg); border-bottom-color: var(--fg); }

/* ─── GALLERY MASONRY ─────────────────────────────────────── */
.gallery-grid {
  columns: 3 360px;
  column-gap: 16px;
  padding: 24px 56px 48px;
}

/* Each gallery item = image wrapper + permanent caption below */
.gallery-item {
  break-inside: avoid;
  margin-bottom: 24px;
  cursor: pointer;
}

/* Image container — hover effects live here */
.gallery-img-wrap {
  position: relative; overflow: hidden; background: #111;
}
.gallery-img-wrap img {
  width: 100%; height: auto; display: block;
  max-height: none; object-fit: contain; object-position: center;
  transition: opacity 0.5s ease, filter 0.4s ease;
  filter: brightness(1);
}
.gallery-img-wrap img.loaded { opacity: 1; }
.gallery-item:hover .gallery-img-wrap img { filter: brightness(0.65); }

/* Hover overlay: dark tint + centered title */
.gallery-hover-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.35s ease;
  pointer-events: none;
}
.gallery-item:hover .gallery-hover-overlay { background: rgba(0,0,0,0.30); }
.gallery-hover-title {
  font-family: var(--serif); font-size: 1.05rem; font-weight: 300;
  color: var(--fg); letter-spacing: 0.04em; text-align: center;
  padding: 0 16px;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover .gallery-hover-title { opacity: 1; transform: none; }

/* Permanent caption below image */
.gallery-caption {
  padding: 10px 0 0;
  display: flex; align-items: baseline; gap: 8px;
}
.gallery-caption-title {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 0.72rem; color: var(--fg-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gallery-caption-year {
  font-family: var(--sans); font-size: 0.65rem; font-weight: 300;
  color: var(--fg-muted); flex-shrink: 0;
}

/* Staggered fade-in for gallery items */
.gallery-item {
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.gallery-item.visible { opacity: 1; transform: none; }

/* ─── BIO ─────────────────────────────────────────────────── */
/* Default: two columns (portrait + text) */
.bio-layout {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 80px; padding: 72px 56px 80px; max-width: var(--max);
}
/* When portrait is hidden: full-width single column */
.bio-layout.no-portrait {
  grid-template-columns: 1fr; max-width: 820px;
}
.bio-layout.no-portrait .bio-portrait { display: none; }

.bio-portrait { position: relative; }
.bio-portrait-img {
  width: 100%; aspect-ratio: 3/4; background: #161616;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(245,244,240,0.07);
}
.bio-portrait-img svg { width: 48px; height: 48px; color: var(--fg-muted); }
.bio-portrait-caption {
  margin-top: 16px; font-size: 0.65rem; letter-spacing: 0.12em;
  color: var(--fg-muted); text-transform: uppercase;
}

.bio-text-block { padding-top: 8px; }
.bio-text {
  font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.85; font-weight: 300; color: rgba(245,244,240,0.88);
}
.bio-text + .bio-text { margin-top: 28px; }

/* Inter-page nav */
.page-nav-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-muted); margin-top: 48px; transition: color 0.2s;
}
.page-nav-link:hover { color: var(--fg); }
.page-nav-link svg { width: 12px; height: 12px; }

/* ─── CV ──────────────────────────────────────────────────── */
.content-wrap { max-width: 860px; padding: 0 56px 80px; }

.cv-section { margin-bottom: 64px; }
.cv-section h2 {
  font-size: 0.65rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 28px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(245,244,240,0.07);
}
.cv-list { list-style: none; }
.cv-list li {
  display: flex; gap: 28px; padding: 12px 0;
  border-bottom: 1px solid rgba(245,244,240,0.04);
  font-size: 0.9rem; line-height: 1.6;
}
.cv-list .year {
  font-family: var(--serif); font-size: 1rem; color: var(--fg-dim);
  min-width: 64px; font-weight: 300; padding-top: 1px;
}

/* Collections grid */
.collections-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0; margin: 0;
}
.collection-item {
  padding: 18px 0; border-bottom: 1px solid rgba(245,244,240,0.06);
}
.collection-item .institution { color: var(--fg); font-size: 0.88rem; font-weight: 400; }
.collection-item .location { font-size: 0.72rem; color: var(--fg-muted); margin-top: 3px; letter-spacing: 0.05em; }

/* News */
.news-list { margin-top: 8px; }
.news-item {
  display: flex; gap: 28px; padding: 20px 0;
  border-bottom: 1px solid rgba(245,244,240,0.06);
}
.news-item .news-date { font-size: 0.72rem; color: var(--fg-muted); min-width: 72px; padding-top: 4px; }
.news-item .news-body h3 { font-family: var(--serif); font-size: 1.05rem; font-weight: 300; margin-bottom: 5px; }
.news-item .news-body p { font-size: 0.78rem; color: var(--fg-dim); }

/* CV download */
.cv-download {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-muted); margin-top: 48px; transition: color 0.2s;
  border-bottom: 1px solid rgba(245,244,240,0.2); padding-bottom: 2px;
}
.cv-download:hover { color: var(--fg); }
.cv-download svg { width: 12px; height: 12px; }

/* ─── CONTACT ─────────────────────────────────────────────── */
.contact-wrap { padding: 72px 56px 80px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }

.contact-info p { font-size: 0.88rem; line-height: 2; color: var(--fg-dim); }

.contact-social { margin-top: 28px; }
.contact-social a {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; color: var(--fg-dim); transition: color 0.25s;
}
.contact-social a:hover { color: var(--fg); }
.contact-social svg { width: 17px; height: 17px; }

.contact-form {}
.form-field { margin-bottom: 28px; }
.form-field label {
  display: block; font-size: 0.65rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--fg-muted); margin-bottom: 10px;
}
.form-field input, .form-field textarea {
  width: 100%; background: rgba(245,244,240,0.04);
  border: 1px solid rgba(245,244,240,0.22); color: var(--fg);
  padding: 13px 16px; font-family: var(--sans); font-size: 0.9rem; font-weight: 300;
  outline: none; transition: border-color 0.25s, background 0.2s;
}
.form-field input:focus, .form-field textarea:focus {
  border-color: rgba(245,244,240,0.55); background: rgba(245,244,240,0.06);
}
.form-field textarea { resize: vertical; min-height: 140px; }
.btn-submit {
  background: transparent; border: 1px solid rgba(245,244,240,0.35);
  color: var(--fg); padding: 14px 44px; font-family: var(--sans);
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  cursor: pointer; transition: all 0.25s;
}
.btn-submit:hover { background: var(--fg); color: var(--bg); }

/* ─── FOOTER ──────────────────────────────────────────────── */
footer {
  padding: 40px 56px;
  border-top: 1px solid rgba(245,244,240,0.07);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 0.65rem; letter-spacing: 0.12em; color: var(--fg-muted);
}
.footer-left { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.footer-right { display: flex; gap: 20px; align-items: center; }
footer a { color: var(--fg-muted); transition: color 0.2s; }
footer a:hover { color: var(--fg); }
.footer-social-icon { color: var(--fg-dim) !important; transition: color 0.2s; }
.footer-social-icon:hover { color: var(--fg) !important; }
.footer-social-icon svg { width: 17px; height: 17px; display: block; }

/* ─── LIGHTBOX ────────────────────────────────────────────── */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.97);
  flex-direction: column;
  align-items: stretch;
}
.lightbox-overlay.open { display: flex; }

.lightbox-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 32px; flex-shrink: 0;
  border-bottom: 1px solid rgba(245,244,240,0.06);
}
.lightbox-counter {
  font-size: 0.65rem; letter-spacing: 0.18em; color: var(--fg-muted); text-transform: uppercase;
}
.lightbox-close {
  font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-muted); background: none; border: none; cursor: pointer;
  padding: 4px 0; transition: color 0.2s; font-family: var(--sans);
}
.lightbox-close:hover { color: var(--fg); }

.lightbox-body {
  display: flex; flex: 1; overflow: hidden;
}
.lightbox-img-area {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 32px; position: relative;
}
.lightbox-img-area img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  opacity: 0; transition: opacity 0.3s ease;
}
.lightbox-img-area img.loaded { opacity: 1; }

.lightbox-sidebar {
  width: 280px; flex-shrink: 0; padding: 48px 40px;
  border-left: 1px solid rgba(245,244,240,0.07);
  display: flex; flex-direction: column; justify-content: center; gap: 0;
}
.lightbox-sidebar h2 {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 300;
  line-height: 1.2; margin-bottom: 20px; color: var(--fg);
}
.lightbox-meta { list-style: none; margin-bottom: 32px; }
.lightbox-meta li {
  font-size: 0.78rem; color: var(--fg-dim); padding: 8px 0;
  border-bottom: 1px solid rgba(245,244,240,0.06); line-height: 1.4;
}
.lightbox-meta li:last-child { border-bottom: none; }

/* Inquire button */
.lightbox-inquire {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 0.65rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-muted); text-decoration: none;
  border-bottom: 1px solid rgba(245,244,240,0.2); padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s; margin-top: auto;
  align-self: flex-start;
}
.lightbox-inquire:hover { color: var(--fg); border-bottom-color: rgba(245,244,240,0.6); }

.lightbox-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; cursor: pointer; color: var(--fg-dim);
  background: none; border: none; padding: 20px 16px;
  transition: color 0.2s; z-index: 1;
}
.lightbox-nav-btn:hover { color: var(--fg); }
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  nav { padding: 20px 40px; }
  .lightbox-sidebar { width: 240px; padding: 32px 28px; }
  .bio-layout { gap: 48px; }
  .page-header { padding: 64px 40px 44px; }
  .content-wrap { padding: 0 40px 80px; }
  .contact-wrap { padding: 64px 40px 80px; }
  .gallery-grid { padding: 20px 40px 40px; }
  .works-filters { padding: 0 40px; }
  footer { padding: 32px 40px; }
}

@media (max-width: 900px) {
  .gallery-grid { columns: 2 260px; column-gap: 12px; padding: 16px 28px 40px; }
  .gallery-item { margin-bottom: 14px; }
  .works-filters { padding: 0 28px; }
  .bio-layout { grid-template-columns: 1fr; gap: 40px; padding: 56px 28px 64px; }
  .bio-portrait { max-width: 280px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-wrap { padding: 56px 28px 72px; }
}

@media (max-width: 768px) {
  /* Nav — hamburger */
  nav {
    padding: 16px 20px;
    backdrop-filter: none; /* Disable — creates containing block that breaks fixed overlay in iOS Safari */
    -webkit-backdrop-filter: none;
  }
  .nav-brand { font-size: 0.9rem; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%; height: 100dvh;
    background-color: #0a0a0a; /* fallback */
    background-color: var(--bg);
    align-items: center; justify-content: center;
    gap: 28px; z-index: 500;
    list-style: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.95rem; letter-spacing: 0.22em; color: rgba(245,244,240,0.85); }
  .nav-links a.active, .nav-links a:hover { color: #f5f4f0; }
  .nav-toggle { display: flex; z-index: 600; position: relative; }

  /* Hero */
  .hero { height: 85svh; }
  .hero-content { padding: 0 20px 40px; }
  .hero-title { font-size: clamp(2.8rem, 13vw, 5rem); }
  .hero-subtitle { font-size: 0.65rem; letter-spacing: 0.2em; }

  /* Page header */
  .page-header { padding: 48px 20px 36px; }

  /* Filters */
  .works-filters { padding: 0 20px; gap: 0; }
  .filter-btn { padding: 16px 20px 16px 0; font-size: 0.65rem; }

  /* Gallery */
  .gallery-grid { columns: 2; column-gap: 8px; padding: 10px 12px 32px; }
  .gallery-item { margin-bottom: 8px; }
  .gallery-img-wrap img { max-height: none; }
  .gallery-caption-title { font-size: 0.68rem; }

  /* Bio */
  .bio-layout { padding: 40px 20px 56px; }
  .bio-text { font-size: 1rem; }

  /* CV */
  .content-wrap { padding: 0 20px 64px; }
  .cv-list li { flex-direction: column; gap: 4px; }
  .cv-list .year { min-width: auto; font-size: 0.85rem; }

  /* Contact */
  .contact-wrap { padding: 40px 20px 64px; }

  /* Lightbox */
  .lightbox-header { padding: 14px 20px; }
  .lightbox-body { flex-direction: column; overflow-y: auto; }
  .lightbox-img-area {
    padding: 16px 8px 12px; min-height: 50svh; max-height: 62svh;
    flex-shrink: 0;
  }
  .lightbox-img-area img { max-height: 58svh; }
  .lightbox-nav-btn { padding: 14px 10px; font-size: 1.3rem; }
  .lightbox-sidebar {
    width: 100%; border-left: none; border-top: 1px solid rgba(245,244,240,0.07);
    padding: 16px 20px 24px; flex-direction: row; flex-wrap: wrap;
    gap: 12px; align-items: flex-start; justify-content: flex-start;
    flex-shrink: 0;
  }
  .lightbox-sidebar h2 { font-size: 1.05rem; margin-bottom: 0; width: 100%; }
  .lightbox-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 0; }
  .lightbox-meta li { border-bottom: none; padding: 0; font-size: 0.72rem; }
  .lightbox-inquire { margin-top: 0; }

  /* Footer */
  footer { padding: 24px 20px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-left { flex-direction: column; gap: 6px; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(2.4rem, 14vw, 4rem); }
  .gallery-grid { columns: 1; padding: 8px 12px; }
  .gallery-img-wrap img { max-height: none; }
  .page-header h1 { font-size: clamp(1.9rem, 10vw, 3rem); }
  .filter-btn { font-size: 0.62rem; padding: 14px 16px 14px 0; margin-right: 12px; }
  .bio-text { font-size: 0.95rem; }
}

/* Safe area insets (iPhone notch) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .lightbox-sidebar { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* Book series section dividers */
.gallery-section-divider {
  column-span: all;
  display: none; /* shown by JS when books filter active */
  width: 100%;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid rgba(245,244,240,0.12);
  margin-bottom: 0.5rem;
}
.gallery-section-divider:first-of-type {
  border-top: none;
  padding-top: 0.5rem;
}
.gallery-section-divider span {
  font-family: var(--serif);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.38);
  font-variant: small-caps;
}

/* ─── HERO ENTER BUTTON ────────────────────────────────────── */
.hero-enter-btn {
  display: inline-block; margin-top: 32px;
  font-family: var(--sans); font-size: 0.68rem; font-weight: 400;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(245,244,240,0.75); border: 1px solid rgba(245,244,240,0.3);
  padding: 12px 36px; transition: all 0.3s ease;
  position: relative; z-index: 1;
}
.hero-enter-btn:hover {
  color: var(--fg); border-color: rgba(245,244,240,0.7);
  background: rgba(245,244,240,0.07);
}

/* ─── EXPLORE GRID ─────────────────────────────────────────── */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: #0a0a0a;
  min-height: calc(100vh - 73px);
}
.explore-cell {
  position: relative; overflow: hidden;
  aspect-ratio: 4/3;
  display: block; cursor: pointer;
  background: #111;
}
.explore-cell img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: opacity 0.5s ease, transform 0.6s ease, filter 0.4s ease;
  filter: brightness(0.5); transform: scale(1);
}
.explore-cell img.loaded { opacity: 1; }
.explore-cell:hover img {
  filter: brightness(0.35); transform: scale(1.04);
}
.explore-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: clamp(0.9rem, 1.5vw, 1.3rem);
  font-weight: 300; letter-spacing: 0.12em;
  color: rgba(245,244,240,0.9); text-align: center;
  padding: 20px; line-height: 1.3;
  transition: color 0.3s ease;
  pointer-events: none;
}
.explore-cell:hover .explore-label { color: var(--fg); }

@media (max-width: 768px) {
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
  .explore-cell { aspect-ratio: 3/2; }
}
@media (max-width: 480px) {
  .explore-grid { grid-template-columns: 1fr; }
  .explore-cell { aspect-ratio: 16/9; }
  .explore-label { font-size: 1rem; }
}

/* ─── PAINTINGS — 2-COL LARGE GRID ────────────────────────── */
.paintings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .paintings-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .paintings-grid { grid-template-columns: 1fr; }
}
.paintings-grid .gallery-img-wrap img {
  max-height: 520px;
  object-fit: contain;
  height: auto;
  width: 100%;
  background: #0a0a0a;
}
.paintings-grid .gallery-caption-year {
  display: block; font-size: 0.62rem; color: var(--fg-muted); margin-top: 2px;
}

/* ─── SERIES TEXT ONLY ─────────────────────────────────────── */
.series-text-only {
  padding: 32px 56px;
  border-bottom: 1px solid rgba(245,244,240,0.04);
}
.series-note {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-muted);
}

/* ─── COMING SOON PANEL ────────────────────────────────────── */
.coming-soon-panel {
  padding: 80px 56px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.coming-soon-panel p {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 300; color: var(--fg-dim);
}
.coming-soon-panel span {
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-muted);
}

/* ─── ETCHINGS LIST ────────────────────────────────────────── */
.etchings-list {
  padding: 40px 56px 64px; display: flex; flex-direction: column; gap: 0;
}
.etching-entry {
  padding: 40px 0; border-bottom: 1px solid rgba(245,244,240,0.06);
}
.etching-entry:last-child { border-bottom: none; }
.etching-meta h2 {
  font-family: var(--serif); font-size: 1.8rem; font-weight: 300;
  margin-bottom: 6px;
}
.etching-date {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 16px;
}
.etching-desc {
  font-size: 0.88rem; color: var(--fg-dim); line-height: 1.7;
  max-width: 700px; margin-bottom: 12px;
}
.etching-note {
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(245,244,240,0.25);
}

/* ─── ARTIST BOOKS SERIES HEADER ──────────────────────────── */
.book-series-header {
  padding: 48px 56px 0; border-top: 1px solid rgba(245,244,240,0.07);
}
.book-series-header:first-of-type { border-top: none; padding-top: 24px; }
.book-series-header h2 {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 300;
  margin-bottom: 6px;
}
.book-series-header p {
  font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--fg-muted);
}

/* ─── GALLERY INQUIRE NOTE ─────────────────────────────────── */
.gallery-inquire-note {
  padding: 20px 56px 48px;
  font-size: 0.78rem; color: var(--fg-muted);
  border-top: 1px solid rgba(245,244,240,0.06);
  font-style: italic;
}
.gallery-inquire-note a { color: var(--fg-dim); border-bottom: 1px solid rgba(245,244,240,0.2); }
.gallery-inquire-note a:hover { color: var(--fg); }

/* ─── EXHIBITIONS LIST ─────────────────────────────────────── */
.exhibitions-list { max-width: 960px; }
.exhibitions-list .cv-year { font-family: var(--serif); font-size: 0.95rem; color: var(--fg-dim); min-width: 80px; }

/* ─── WRITINGS ─────────────────────────────────────────────── */
.writings-wrap { max-width: 860px; }
.writings-section { margin-bottom: 64px; }
.writings-section-title {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 300;
  margin-bottom: 36px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(245,244,240,0.1);
}
.writings-subsection { margin-bottom: 40px; }
.writings-sub-title {
  font-size: 0.65rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 20px;
}
.writings-list { list-style: none; }
.writings-list li {
  display: flex; gap: 28px; padding: 14px 0;
  border-bottom: 1px solid rgba(245,244,240,0.04);
  align-items: flex-start;
}
.writings-year {
  font-family: var(--serif); font-size: 0.95rem; color: var(--fg-dim);
  min-width: 52px; font-weight: 300; padding-top: 2px; flex-shrink: 0;
}
.writings-entry em { font-family: var(--serif); font-size: 1.1rem; font-weight: 300; font-style: italic; }
.writings-entry p { font-size: 0.82rem; color: var(--fg-dim); margin-top: 5px; line-height: 1.6; }
.writings-entry em + p { margin-top: 6px; }
.writings-placeholder {
  font-size: 0.88rem; color: var(--fg-muted); padding: 16px 0;
}

@media (max-width: 768px) {
  /* Paintings */
  .paintings-grid { columns: 1 !important; max-width: 900px; margin: 0 auto; }
  .paintings-grid .gallery-img-wrap img { max-height: none; object-fit: contain; }

  /* Graphic works */
  .etchings-list { padding: 32px 20px 48px; }
  .book-series-header { padding: 36px 20px 0; }
  .gallery-inquire-note { padding: 20px 20px 36px; }
  .coming-soon-panel { padding: 48px 20px; }
  .etching-meta h2 { font-size: 1.4rem; }
  .etching-desc { font-size: 0.83rem; }

  /* Exhibitions — clear min-width on year col */
  .exhibitions-list .cv-year { min-width: auto; }

  /* Writings */
  .writings-list li { flex-direction: column; gap: 4px; }
  .writings-year { min-width: auto; }
  .writings-entry em { font-size: 1rem; }
  .writings-section-title { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .paintings-grid .gallery-img-wrap img { max-height: none; object-fit: contain; }
  .hero-enter-btn { font-size: 0.6rem; padding: 10px 28px; letter-spacing: 0.22em; }
}

/* ── Three Magi Details ─────────────────────────────────── */
.magi-details-section {
  max-width: 1200px;
  margin: 3rem auto 2rem;
  padding: 0 2rem;
}
.magi-details-label {
  font-family: var(--font-serif);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(245,244,240,0.15);
}
.magi-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.magi-detail-thumb {
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.magi-detail-thumb img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.85;
}
.magi-detail-thumb:hover img {
  transform: scale(1.03);
  opacity: 1;
}
@media (max-width: 600px) {
  .magi-details-grid { grid-template-columns: 1fr; }
  .magi-details-section { padding: 0 1rem; }
}

/* ── Atelier Page ───────────────────────────────────────── */
.atelier-intro {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--fg-dim);
  font-size: 0.95rem;
  line-height: 1.8;
  font-style: italic;
}
.atelier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}
.atelier-item {
  cursor: pointer;
  overflow: hidden;
}
.atelier-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.85;
}
.atelier-item:hover img {
  transform: scale(1.02);
  opacity: 1;
}
@media (max-width: 600px) {
  .atelier-grid { grid-template-columns: 1fr; padding: 0 1rem; }
}

/* ── Homepage — hide nav (splash page) ──────────────────── */
body.home nav { display: none; }

/* ── Explore overlay — improve label readability ─────────── */
.explore-label {
  background: rgba(0,0,0,0.42);
  border-radius: 2px;
  padding: 8px 16px;
}

/* ── Screen-reader only ─────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ─── BACK TO EXPLORE ─────────────────────────────────────── */
.back-to-explore {
  display: inline-flex; align-items: center; gap: 6px;
  position: fixed; bottom: 1.8rem; left: 1.8rem; z-index: 90;
  font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.55);
  text-decoration: none; background: rgba(20,20,20,0.7);
  padding: 0.5rem 0.8rem; border-radius: 3px;
  backdrop-filter: blur(4px); transition: color 0.2s, background 0.2s;
}
.back-to-explore:hover { color: #fff; background: rgba(20,20,20,0.9); }

/* ─── PAINTING DETAIL PANEL (click to expand) ─────────────── */
.gallery-item--has-details .gallery-img-wrap::after {
  content: "Details ↓";
  position: absolute; bottom: 8px; right: 10px;
  font-family: var(--sans); font-size: 0.58rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(245,244,240,0.6);
  background: rgba(0,0,0,0.55); padding: 3px 7px; border-radius: 2px;
  pointer-events: none;
}
.gallery-item--has-details .gallery-img-wrap {
  position: relative; cursor: pointer;
}
.gallery-item--has-details.open .gallery-img-wrap::after {
  content: "Details ↑";
}
.detail-panel {
  display: none;
  padding: 1rem 0 2rem;
  animation: fadeIn 0.3s ease;
}
.gallery-item--has-details.open .detail-panel {
  display: block;
}
.detail-panel-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.detail-panel-grid img {
  width: calc(50% - 4px); height: auto; border-radius: 2px;
  display: block; cursor: pointer;
}
@keyframes fadeIn { from { opacity:0; transform: translateY(-4px); } to { opacity:1; transform: none; } }

@media (max-width: 768px) {
  .back-to-explore {
    bottom: auto;
    top: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    padding: 0.35rem 0.6rem;
    opacity: 0.5;
  }
}
/* ─── DROPDOWN NAVIGATION ─────────────────────────────────── */
.nav-item-has-dropdown { position: relative; }
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid rgba(245,244,240,0.08);
  padding: 0.5rem 0;
  z-index: 200;
  list-style: none;
  margin: 0;
}
.nav-item-has-dropdown:hover .nav-dropdown,
.nav-item-has-dropdown.open .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  padding: 0.45rem 1.2rem;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-dropdown a:hover { color: var(--fg); }
.nav-arrow { font-size: 0.55em; margin-left: 0.3em; opacity: 0.6; vertical-align: middle; }

/* Mobile dropdown — always expanded */
@media (max-width: 768px) {
  .nav-item-has-dropdown .nav-dropdown {
    position: static;
    border: none;
    padding: 0 0 0 1rem;
    background: transparent;
    display: block;
  }
  .nav-arrow { display: none; }
  .nav-dropdown a { font-size: 0.58rem; padding: 0.35rem 0.5rem; }
}

/* ─── LIGHTBOX ───────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox-overlay.active { display: flex; }
.lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90vw;
  max-width: 90vw;
  flex: 1;
}
.lightbox-img {
  width: auto;
  height: auto;
  max-width: 88vw;
  max-height: 78vh;
  min-height: 40vh;
  object-fit: contain;
  display: block;
}
.lightbox-caption {
  margin-top: 1rem;
  text-align: center;
  color: var(--fg);
}
.lightbox-caption .lb-title {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.lightbox-caption .lb-meta {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-top: 0.25rem;
}
.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--fg-muted);
  background: none;
  border: none;
  line-height: 1;
  z-index: 1001;
}
.lightbox-close:hover { color: var(--fg); }
.lightbox-prev, .lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--fg-muted);
  background: none;
  border: none;
  padding: 1rem;
  z-index: 1001;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover { color: var(--fg); }

/* ─── PAGE COVER HERO ─────────────────────────────────────── */
.page-cover-hero {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  border-bottom: 1px solid rgba(245,244,240,0.07);
}
.page-cover-hero img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* ─── WRITINGS LINKS ──────────────────────────────────────── */
.writings-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(245,244,240,0.15);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.writings-link:hover { color: var(--fg); border-color: rgba(245,244,240,0.5); }

/* ─── CATALOGUE PLACEHOLDER ───────────────────────────────── */
.catalogue-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,244,240,0.03);
  border: 1px solid rgba(245,244,240,0.07);
}

/* ─── PORTRAIT PAINTINGS ─────────────────────────────────── */
.gallery-item.portrait .gallery-img-wrap img {
  object-fit: contain;
  background: #0d0d0d;
}

/* ─── CAPTION DATE (month year) ──────────────────────────── */
.gallery-caption-date {
  display: block;
  font-size: 0.6rem;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  margin-top: 1px;
}
.gallery-caption-dims {
  font-size: 0.65rem;
  color: #aaa;
  display: block;
  margin-top: 1px;
  letter-spacing: 0.02em;
}

.atlas-section-title {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin: 3rem 0 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
}
.atlas-section-title:first-child { border-top: none; margin-top: 0; }
