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

:root {
  --ink: #1a1a1a;
  --mute: #666;
  --line: #eee;
  --bg: #fff;
  --gutter: 1.25rem;
}

html { font-size: 17px; }
@media (max-width: 600px) { html { font-size: 16px; } }

body {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.75rem;
}

nav a {
  text-decoration: none;
  color: var(--mute);
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover,
nav a.active { color: var(--ink); }

main {
  flex: 1;
  padding: 2.5rem 2rem 4rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* ---------- Splash hero ---------- */

body.splash { overflow: hidden; }
body.splash main { padding: 0; max-width: none; margin: 0; height: 100vh; }
body.splash footer { display: none; }

body.splash nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  border-bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
  padding-bottom: 2.75rem;
}

body.splash nav .logo,
body.splash nav a {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

body.splash nav a:hover,
body.splash nav a.active {
  color: #fff;
}

.hero {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #111;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
  will-change: transform, opacity;
  transform: scale(1.05);
}

.hero-layer.active { opacity: 1; }

/* Base scale kept modest; translate ranges widened so pan is the dominant motion. */
@keyframes kb1 { from { transform: scale(1.10) translate(-4%, -2%); } to { transform: scale(1.14) translate(4%,  2%);  } }
@keyframes kb2 { from { transform: scale(1.14) translate(4%,  3%);  } to { transform: scale(1.10) translate(-4%, -3%); } }
@keyframes kb3 { from { transform: scale(1.13) translate(-4%, 3%);  } to { transform: scale(1.11) translate(4%, -3%);  } }
@keyframes kb4 { from { transform: scale(1.10) translate(5%,  0);   } to { transform: scale(1.14) translate(-5%, 0);   } }
@keyframes kb5 { from { transform: scale(1.12) translate(0, -4%);   } to { transform: scale(1.15) translate(0,  4%);   } }
@keyframes kb6 { from { transform: scale(1.15) translate(-3%, 3%);  } to { transform: scale(1.11) translate(3%, -3%);  } }

/* ---------- Gallery (masonry via CSS columns) ---------- */

.gallery {
  column-count: 3;
  column-gap: var(--gutter);
}

@media (max-width: 1000px) { .gallery { column-count: 2; } }
@media (max-width: 560px)  { .gallery { column-count: 1; } }

.gallery figure {
  break-inside: avoid;
  margin: 0 0 var(--gutter);
  display: block;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  background: #f5f5f5;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.gallery img.loaded { opacity: 1; }

.gallery figure { cursor: zoom-in; }

/* ---------- Lightbox ---------- */

#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: zoom-out;
}

#lightbox[hidden] { display: none; }

#lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

#lightbox button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.7);
  font-family: Georgia, serif;
  font-size: 3rem;
  line-height: 1;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: color 0.15s;
}

#lightbox button:hover { color: #fff; }

#lightbox .lb-prev { left: 1rem; }
#lightbox .lb-next { right: 1rem; }

#lightbox .lb-close {
  top: 1rem;
  right: 1rem;
  transform: none;
  font-size: 2rem;
}

@media (max-width: 560px) {
  #lightbox button { font-size: 2rem; padding: 0.25rem 0.5rem; }
}

/* ---------- Text pages ---------- */

.prose {
  max-width: 640px;
}

.prose h1 {
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 1.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
  color: #262626;
}

.prose a {
  border-bottom: 1px solid #ccc;
  text-decoration: none;
  transition: border-color 0.2s;
}
.prose a:hover { border-color: var(--ink); }

.prose ul.plain {
  list-style: none;
  margin-bottom: 1.25rem;
}

.prose ul.plain li {
  padding: 0.35rem 0;
}

/* ---------- Exhibitions ---------- */

.exhibitions {
  max-width: 780px;
}

.exhibitions h1 {
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 2rem;
}

.exhibitions ol {
  list-style: none;
}

.exhibitions li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.exhibitions .year {
  color: var(--mute);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  padding-top: 0.05rem;
}

.exhibitions .body { font-size: 0.98rem; }

.exhibitions .title { font-style: italic; }

.exhibitions .venue,
.exhibitions .meta {
  color: var(--mute);
  display: block;
  font-size: 0.92rem;
}

@media (max-width: 560px) {
  .exhibitions li { grid-template-columns: 1fr; gap: 0.15rem; }
  .exhibitions .year { padding-top: 0; }
}

/* ---------- Footer ---------- */

footer {
  padding: 2rem;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}
