@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@100;200;300;400&family=DM+Sans:ital,wght@0,300;0,400;1,300&display=swap');

:root {
  --white: #ffffff;
  --off-white: #f5f4f1;
  --ink: #1c1c1a;
  --mid: #75746e;
  --light: #bfbdb7;
  --rule: #e0ded8;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--white); color: var(--ink); font-family: 'DM Sans', sans-serif; font-weight: 300; line-height: 1.75; overflow-x: hidden; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 1.4rem 3rem;
  background: rgba(255,255,255,0.0);
  border-bottom: 1px solid transparent;
  transition: background 0.5s, border-color 0.5s, padding 0.4s;
}
nav.solid {
  background: rgba(255,255,255,0.96);
  border-bottom-color: var(--rule);
  backdrop-filter: blur(10px);
}
nav.always-solid {
  background: rgba(255,255,255,0.96);
  border-bottom-color: var(--rule);
  backdrop-filter: blur(10px);
}
nav.scrolled { padding: 1rem 3rem; }

.nav-left { display: flex; gap: 2.5rem; }
.nav-right { display: flex; gap: 2.5rem; justify-content: flex-end; }

/* Nav link base */
.nav-left a, .nav-right a {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.78rem; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; transition: color 0.25s;
}

/* Hero page — white links */
nav:not(.solid):not(.always-solid) .nav-left a,
nav:not(.solid):not(.always-solid) .nav-right a { color: rgba(255,255,255,0.85); }
nav:not(.solid):not(.always-solid) .nav-left a:hover,
nav:not(.solid):not(.always-solid) .nav-right a:hover { color: #fff; }

/* All other pages — black links */
nav.solid .nav-left a, nav.always-solid .nav-left a,
nav.solid .nav-right a, nav.always-solid .nav-right a { color: var(--ink); }
nav.solid .nav-left a:hover, nav.always-solid .nav-left a:hover,
nav.solid .nav-right a:hover, nav.always-solid .nav-right a:hover { color: var(--mid); }
nav.solid .nav-left a.active, nav.always-solid .nav-left a.active,
nav.solid .nav-right a.active, nav.always-solid .nav-right a.active { color: var(--ink); font-weight: 400; }

/* Logo */
.nav-logo { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.nav-logo img { height: 74px; width: auto; transition: height 0.4s, opacity 0.25s; }
nav.scrolled .nav-logo img { height: 54px; }
.nav-logo img:hover { opacity: 0.6; }
nav:not(.solid):not(.always-solid) .nav-logo img { filter: brightness(0) invert(1); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; grid-column: 3; justify-self: end; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 1px; transition: background 0.3s; }
nav:not(.solid):not(.always-solid) .hamburger span { background: #fff; }
nav.solid .hamburger span, nav.always-solid .hamburger span { background: var(--ink); }

.mobile-menu { display: none; position: fixed; inset: 0; background: var(--white); z-index: 99; flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-family: 'Josefin Sans', sans-serif; font-size: 1.5rem; font-weight: 200; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.mobile-menu a:hover { color: var(--mid); }

/* ── HERO ── */
.hero {
  position: relative; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('images/paintings/Flash by.jpg') center/cover no-repeat;
  transform: scale(1.04);
  animation: heroZoom 14s ease-out forwards;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%); }
@keyframes heroZoom { from{transform:scale(1.04)} to{transform:scale(1.0)} }
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow { font-family: 'Josefin Sans', sans-serif; font-size: 0.62rem; font-weight: 300; letter-spacing: 0.45em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 2rem; opacity: 0; animation: fadeUp 0.8s 0.4s forwards; }
.hero-title { font-family: 'Josefin Sans', sans-serif; font-size: clamp(3rem, 9vw, 8rem); font-weight: 100; letter-spacing: 0.26em; text-transform: uppercase; line-height: 1.08; color: #fff; opacity: 0; animation: fadeUp 0.8s 0.65s forwards; }
.hero-title span { display: block; font-weight: 200; }
.hero-rule { width: 30px; height: 1px; background: rgba(255,255,255,0.4); margin: 2.5rem auto; opacity: 0; animation: fadeUp 0.8s 0.9s forwards; }
.hero-sub { font-family: 'Josefin Sans', sans-serif; font-size: 0.62rem; font-weight: 300; letter-spacing: 0.42em; text-transform: uppercase; color: rgba(255,255,255,0.7); opacity: 0; animation: fadeUp 0.8s 1.1s forwards; }
.hero-scroll { position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; opacity: 0; animation: fadeUp 0.8s 1.5s forwards; }
.hero-scroll span { font-family: 'Josefin Sans', sans-serif; font-size: 0.52rem; letter-spacing: 0.35em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.scroll-line { width: 1px; height: 36px; background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:0.3} 50%{opacity:0.9} }

/* ── PAGE WRAP ── */
.page-wrap { padding-top: 90px; }

/* ── SHARED SECTION UTILS ── */
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 3rem; }
.section-label { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 2.5rem; }
.section-label-text { font-family: 'Josefin Sans', sans-serif; font-size: 0.6rem; font-weight: 300; letter-spacing: 0.38em; text-transform: uppercase; color: var(--mid); white-space: nowrap; }
.section-label-rule { flex: 1; height: 1px; background: var(--rule); }

/* ── ABOUT ── */
.about-section { padding: 5rem 0 7rem; border-top: 1px solid var(--rule); }
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 6rem; align-items: start; }
.about-image-wrap img { width: 100%; display: block; }
.about-text h2 { font-family: 'Josefin Sans', sans-serif; font-size: clamp(1.4rem, 2.8vw, 2.2rem); font-weight: 200; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.3; margin-bottom: 2.5rem; }
.about-text h2 em { display: block; font-style: normal; font-weight: 100; color: var(--mid); }
.about-body p { color: var(--mid); font-size: 0.97rem; line-height: 2; margin-bottom: 1.2rem; }
.about-body p:first-child { font-size: 1.05rem; color: var(--ink); font-style: italic; }

/* ── GALLERY PAGES ── */
.page-header { padding: 4rem 0 3rem; border-bottom: 1px solid var(--rule); margin-bottom: 4rem; }
.page-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 3rem; }
.page-heading { font-family: 'Josefin Sans', sans-serif; font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 100; letter-spacing: 0.24em; text-transform: uppercase; }
.gallery-wrap { max-width: 1200px; margin: 0 auto; padding: 0 3rem 7rem; }
.gallery-masonry { columns: 3; column-gap: 1rem; }
@media (max-width: 900px) { .gallery-masonry { columns: 2; } }
@media (max-width: 560px) { .gallery-masonry { columns: 1; } }
.gallery-item { break-inside: avoid; margin-bottom: 1rem; cursor: pointer; overflow: hidden; }
.gallery-item img { display: block; width: 100%; height: auto; transition: transform 0.65s cubic-bezier(0.25,0.46,0.45,0.94); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption { padding: 0.5rem 0 0; font-family: 'Josefin Sans', sans-serif; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); font-weight: 400; }

/* ── EXHIBITIONS ── */
.ex-wrap { max-width: 1200px; margin: 0 auto; padding: 0 3rem 7rem; }
.ex-table { width: 100%; border-collapse: collapse; margin-bottom: 5rem; }
.ex-table tr { border-bottom: 1px solid var(--rule); }
.ex-table tr:first-child { border-top: 1px solid var(--rule); }
.ex-table td { padding: 1.8rem 0; vertical-align: middle; }
.ex-year { font-family: 'Josefin Sans', sans-serif; font-size: 0.72rem; font-weight: 200; letter-spacing: 0.2em; color: var(--light); width: 6rem; padding-right: 2rem; }
.ex-name { font-family: 'Josefin Sans', sans-serif; font-size: 0.9rem; font-weight: 300; letter-spacing: 0.08em; }
.ex-venue { font-size: 0.72rem; color: var(--mid); margin-top: 0.3rem; }
.ex-tag { font-family: 'Josefin Sans', sans-serif; font-size: 0.5rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mid); border: 1px solid var(--rule); padding: 0.28rem 0.75rem; white-space: nowrap; }
.ex-photos-label { font-family: 'Josefin Sans', sans-serif; font-size: 0.6rem; letter-spacing: 0.38em; text-transform: uppercase; color: var(--mid); margin-bottom: 1.5rem; }

/* ── CONTACT ── */
.contact-wrap { max-width: 500px; margin: 0 auto; padding: 2rem 3rem 7rem; text-align: center; }
.contact-headline { font-family: 'Josefin Sans', sans-serif; font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 100; letter-spacing: 0.22em; text-transform: uppercase; line-height: 1.25; margin-bottom: 0.8rem; }
.contact-desc { font-family: 'Josefin Sans', sans-serif; font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--mid); margin-bottom: 3rem; }
.contact-email { display: inline-block; font-family: 'Josefin Sans', sans-serif; font-size: 0.85rem; font-weight: 300; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 0.4rem; margin-bottom: 3.5rem; transition: border-color 0.3s; }
.contact-email:hover { border-color: var(--ink); }
.social-links { display: flex; justify-content: center; gap: 2.5rem; }
.social-links a { font-family: 'Josefin Sans', sans-serif; font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--mid); text-decoration: none; transition: color 0.25s; }
.social-links a:hover { color: var(--ink); }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--rule); padding: 2rem 3rem; display: flex; justify-content: space-between; align-items: center; }
footer p { font-family: 'Josefin Sans', sans-serif; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); font-weight: 400; }

/* ── LIGHTBOX ── */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(255,255,255,0.97); z-index: 200; align-items: center; justify-content: center; padding: 3rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 88vw; max-height: 85vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 1.5rem; right: 2rem; font-family: 'Josefin Sans', sans-serif; font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--mid); cursor: pointer; background: none; border: none; transition: color 0.25s; }
.lightbox-close:hover { color: var(--ink); }
.lightbox-caption { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); font-family: 'Josefin Sans', sans-serif; font-size: 0.6rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--mid); white-space: nowrap; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.75s ease, transform 0.75s ease; }
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.1s; } .d2 { transition-delay: 0.2s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 3rem; } }
@media (max-width: 768px) {
  nav { grid-template-columns: auto 1fr; padding: 1.2rem 1.5rem; }
  nav.scrolled { padding: 0.9rem 1.5rem; }
  .nav-left, .nav-right { display: none; }
  .hamburger { display: flex; grid-column: 2; }
  .nav-logo { justify-content: flex-start; }
  .nav-logo img { height: 54px; }
  .section-inner, .gallery-wrap, .ex-wrap, .contact-wrap, .page-header-inner { padding-left: 1.5rem; padding-right: 1.5rem; }
  .ex-tag { display: none; }
  footer { padding: 1.5rem; flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ── CAROUSEL ── */
.carousel {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: #fff;
  flex-direction: column;
}
.carousel.open { display: flex; }

.carousel-topbar {
  width: 100%; display: flex; justify-content: flex-end;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}

.carousel-close {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.75rem; font-weight: 400; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--ink); background: none; border: none; cursor: pointer;
  transition: color 0.25s; padding: 0.2rem 0;
}
.carousel-close:hover { color: var(--mid); }

.carousel-img-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 2rem 6rem; position: relative; overflow: hidden;
}

#carouselImg {
  max-width: 100%; max-height: 75vh;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 1.2rem;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.carousel-btn-prev { left: 1rem; }
.carousel-btn-next { right: 1rem; }
.carousel-btn svg { width: 42px; height: 42px; stroke: var(--ink); stroke-width: 1.8; fill: none; transition: stroke 0.2s; }
.carousel-btn:hover svg { stroke: var(--mid); }

.carousel-footer {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 2.5rem 1.5rem;
  border-top: 1px solid var(--rule);
  flex-shrink: 0;
}

#carouselCaption {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.82rem; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink);
}

#carouselCounter {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.78rem; font-weight: 400; letter-spacing: 0.18em;
  color: var(--ink);
}

@media (max-width: 768px) {
  .carousel-img-wrap { padding: 1.5rem 1rem; }
  .carousel-btn-prev { left: 0.2rem; }
  .carousel-btn-next { right: 0.2rem; }
  .carousel-footer { padding: 0.9rem 1.2rem 1.2rem; }
  #carouselCaption, #carouselCounter { font-size: 0.7rem; }
}

/* ── GALLERY LOADING STATE ── */
.gallery-loading {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--light); padding: 4rem 0; text-align: center; width: 100%;
}
