/* ==========================================================================
   BWJ-ART — Industrial / Monospace Portfolio
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&display=swap');

:root {
  --slate: #64748B;
  --slate-dark: #475569;
  --slate-light: #94A3B8;
  --neutral: #171717;
  --neutral-soft: #2A2A2A;
  --white: #FFFFFF;
  --off-white: #F5F5F4;
  --line: #D4D4D4;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;
  --space-xxl: 10rem;

  --nav-width: min(420px, 100vw);
  --transition: 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--mono);
  background-color: var(--white);
  color: var(--neutral);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Consistent, on-brand scrollbar across Windows/Mac (WebKit + Firefox) */
html { scrollbar-width: thin; scrollbar-color: var(--slate) var(--off-white); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--slate); border: 2px solid var(--off-white); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-dark); background-clip: padding-box; }

img { display: block; max-width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

ul { list-style: none; }

button {
  font-family: var(--mono);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  touch-action: manipulation;
}

/* Industrial texture backdrop */
.texture-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image:
    repeating-linear-gradient(0deg, var(--neutral) 0px, var(--neutral) 1px, transparent 1px, transparent 80px),
    repeating-linear-gradient(90deg, var(--neutral) 0px, var(--neutral) 1px, transparent 1px, transparent 80px);
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--slate);
  display: inline-block;
}

/* ==========================================================================
   Top bar (logo + hamburger only — nav hidden)
   ========================================================================== */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--space-md);
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding-top: max(1.5rem, env(safe-area-inset-top));
  padding-left: max(var(--space-md), env(safe-area-inset-left));
  padding-right: max(var(--space-md), env(safe-area-inset-right));
}

.logo {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo .dot {
  width: 8px;
  height: 8px;
  background: var(--slate);
  border-radius: 50%;
  display: inline-block;
}

.hamburger {
  position: relative;
  z-index: 210;
  width: 44px;
  height: 44px;
  border: 1px solid var(--neutral);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--white);
  transition: background var(--transition), border-color var(--transition);
}
.hamburger:hover { background: var(--neutral); }
.hamburger:hover span { background: var(--white); }

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--neutral);
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hamburger.active { background: var(--neutral); }
.hamburger.active span { background: var(--white); }

/* Slide-out nav panel */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.55);
  z-index: 190;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition);
}
.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: var(--nav-width);
  background: var(--neutral);
  color: var(--white);
  z-index: 200;
  transform: translateX(100%);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-lg) var(--space-lg);
  border-left: 1px solid var(--slate);
}
.nav-panel.active { transform: translateX(0); }

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-links li a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.6rem 0;
  color: var(--white);
  transition: color var(--transition), padding-left var(--transition);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-links li a:hover {
  color: var(--slate-light);
  padding-left: 0.75rem;
}
.nav-links li a.current { color: var(--slate-light); }

.nav-panel-footer {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--slate-light);
  letter-spacing: 0.05em;
}
.nav-panel-footer .socials {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.5rem;
}
.nav-panel-footer .socials a {
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
  height: 38px;
  padding: 0 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background var(--transition), border-color var(--transition);
}
.nav-panel-footer .socials a:hover {
  background: var(--slate);
  border-color: var(--slate);
}

body.nav-open { overflow: hidden; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--space-xl) + 4rem) var(--space-md) var(--space-xl);
  position: relative;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--neutral);
}

.hero-line { display: block; }
.hero-accent { color: var(--slate); }

.hero-sub {
  margin-top: var(--space-md);
  max-width: 46ch;
  color: var(--neutral);
  font-size: 1.05rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.hero-meta div {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
}
.hero-meta div strong {
  display: block;
  font-size: 1rem;
  color: var(--neutral);
  letter-spacing: 0;
  text-transform: none;
  margin-top: 0.35rem;
  font-weight: 500;
}

/* ==========================================================================
   Section scaffolding
   ========================================================================== */

.section {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-top: 0.75rem;
  color: var(--slate-dark);
}

.section-note {
  max-width: 40ch;
  color: var(--neutral);
  font-size: 0.9rem;
}

/* Left accent bar for the home page artist statement quote. A separate
   class (rather than styling .section-note directly) so the other
   .section-note usages elsewhere (About page timeline/exhibit intros)
   aren't affected. */
.quote-bar {
  border-left: 2px solid var(--slate);
  padding-left: var(--space-sm);
}

/* Exhibits section (About page): keeps the gallery/venue address sitting
   directly beside the exhibit title instead of off to the side as a
   separate block. */
.exhibit-heading-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  width: 100%;
}
.exhibit-location {
  margin: 0;
}

/* Page header (interior pages) */
.page-header {
  padding: calc(var(--space-xl) + 4rem) 0 var(--space-lg);
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-top: var(--space-sm);
}
.page-header p {
  max-width: 55ch;
  color: var(--neutral);
  margin-top: var(--space-sm);
  font-size: 1rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 1rem 1.75rem;
  border: 1px solid var(--neutral);
  color: var(--neutral);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { background: var(--neutral); color: var(--white); }

.btn-solid {
  background: var(--neutral);
  color: var(--white);
}
.btn-solid:hover { background: var(--slate); border-color: var(--slate); }

.btn-arrow { transition: transform var(--transition); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ==========================================================================
   Masonry gallery
   ========================================================================== */

.masonry {
  column-count: 4;
  column-gap: var(--space-sm);
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: var(--space-sm);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--off-white);
  cursor: pointer;
}

.masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: grayscale(15%);
}

/* Wraps a masonry thumbnail's <img> when it has a 90/270deg CMS-set
   rotation (for a photo that was shot sideways). A plain CSS rotate on
   the <img> would visually swap its width/height without changing the
   column space it reserves, which could leave a gap or overlap the
   caption below — so script.js's fitGridRotations() sizes this wrapper
   to the correct post-rotation box (same fix as the lightbox). */
.thumb-rotate-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}
/* Rotation is applied via a CSS variable (set by JS) rather than
   overwriting `transform` directly, so the existing hover zoom effect
   below can still combine with it instead of being clobbered. */
.thumb-rotate-wrap img { transform: rotate(var(--thumb-rotation, 0deg)); }
.masonry-item:hover .thumb-rotate-wrap img { transform: rotate(var(--thumb-rotation, 0deg)) scale(1.04); }

.masonry-item:hover img {
  transform: scale(1.04);
  filter: grayscale(0%);
}

.masonry-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(to top, rgba(23,23,23,0.92), rgba(23,23,23,0));
  color: var(--white);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
}
.masonry-item:hover .masonry-caption {
  opacity: 1;
  transform: translateY(0);
}
.masonry-caption .cap-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.masonry-caption .cap-meta {
  font-size: 0.7rem;
  color: var(--slate-light);
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}

.diptych-imgs {
  display: flex;
  flex-direction: column;
}
.diptych-imgs > div {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.diptych-imgs > div:first-child {
  border-bottom: 2px solid var(--white);
}
.diptych-imgs img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: grayscale(15%);
}
.diptych-imgs > div:hover img {
  transform: scale(1.04);
  filter: grayscale(0%);
}

.tag {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--white);
}
.tag-price {
  background: rgba(255,255,255,0.92);
  color: var(--neutral);
  border-color: var(--white);
  font-weight: 700;
}

/* ==========================================================================
   Exhibits / press
   ========================================================================== */

.exhibit-list {
  display: flex;
  flex-direction: column;
}
.exhibit-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: var(--space-md);
  align-items: baseline;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.exhibit-row:last-child { border-bottom: 1px solid var(--line); }
.exhibit-row .ex-date {
  font-size: 0.8rem;
  color: var(--slate);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.exhibit-row h4 {
  font-size: 1.1rem;
  text-transform: uppercase;
  color: var(--slate-dark);
}
.exhibit-row p {
  font-size: 0.88rem;
  color: var(--neutral);
  margin-top: 0.2rem;
}
.exhibit-row .ex-tag {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  border: 1px solid var(--line);
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
  height: fit-content;
}

.exhibit-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.exhibit-gallery .masonry-item img { height: 280px; object-fit: cover; }
.exhibit-gallery .masonry-item:first-child img { height: 280px; object-fit: contain; background: var(--neutral); }

.quote-block {
  border-left: 2px solid var(--slate);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
  font-size: 1.15rem;
  font-style: normal;
  color: var(--neutral);
  max-width: 64ch;
}
.quote-block cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  font-style: normal;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.gallery-filters button {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line);
  color: var(--slate-dark);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.gallery-filters button:hover,
.gallery-filters button.active {
  background: var(--neutral);
  color: var(--white);
  border-color: var(--neutral);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.96);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition);
  padding: var(--space-md);
}
.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-inner {
  max-width: 1100px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Wraps the lightbox <img>. When an image is rotated 90/270deg, the CSS
   rotate transform visually swaps its width/height but does NOT change
   the space it reserves in the page's layout flow — without this wrapper,
   a rotated image could visually overflow past its reserved space and
   overlap the caption below. JS sizes this wrapper to the correct
   post-rotation visual bounding box so the caption always sits where it
   should. */
.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.lightbox img {
  max-height: 72vh;
  width: auto;
  border: 1px solid var(--slate);
  transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
  transform-origin: center center;
}

.lightbox-caption {
  color: var(--white);
  margin-top: var(--space-sm);
  text-align: center;
}
.lightbox-caption .cap-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.lightbox-caption .cap-meta {
  font-size: 0.8rem;
  color: var(--slate-light);
  margin-top: 0.3rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next,
.lightbox-rotate,
.lightbox-rotate-ccw,
.lightbox-download {
  position: absolute;
  color: var(--white);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  font-size: 1.1rem;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-rotate:hover,
.lightbox-rotate-ccw:hover,
.lightbox-download:hover { background: var(--slate); }

.lightbox-close { top: var(--space-md); right: var(--space-md); }
.lightbox-rotate { top: var(--space-md); right: calc(var(--space-md) + 58px); }
.lightbox-rotate-ccw { top: var(--space-md); right: calc(var(--space-md) + 116px); }
.lightbox-download { top: var(--space-md); right: calc(var(--space-md) + 174px); }
.lightbox-prev { left: var(--space-md); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-md); top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   About page pieces
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-lg);
  align-items: start;
}

.about-portrait {
  border: 1px solid var(--line);
  overflow: hidden;
  position: sticky;
  top: 6.5rem;
}
.about-portrait img { filter: grayscale(30%); }

.about-copy p {
  margin-bottom: 1.25rem;
  color: var(--neutral);
  max-width: 62ch;
}
.about-copy p:first-of-type {
  font-size: 1.15rem;
  color: var(--neutral);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}
.stat-row div strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--neutral);
}
.stat-row div span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}

.timeline {
  margin-top: var(--space-md);
}
.timeline-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-md);
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.timeline-row:last-child { border-bottom: 1px solid var(--line); }
.timeline-row .year {
  font-weight: 700;
  color: var(--slate);
}
.timeline-row h4 {
  font-size: 1.05rem;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  color: var(--slate-dark);
}
.timeline-row p {
  color: var(--neutral);
  font-size: 0.92rem;
  max-width: 60ch;
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.field {
  margin-bottom: var(--space-md);
}
.field label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.6rem;
}
.field input,
.field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--neutral);
  background: transparent;
  font-family: var(--mono);
  font-size: 1rem;
  padding: 0.75rem 0;
  color: var(--neutral);
  transition: border-color var(--transition);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--slate);
}
.field textarea { resize: vertical; min-height: 120px; }

.contact-info-block {
  padding-left: var(--space-lg);
  border-left: 1px solid var(--line);
}
.contact-info-block h3 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate-dark);
  margin-bottom: 0.75rem;
  margin-top: var(--space-md);
}
.contact-info-block h3:first-child { margin-top: 0; }
.contact-info-block p, .contact-info-block a {
  font-size: 1.05rem;
  color: var(--neutral);
  display: block;
}
.contact-info-block a:hover { color: var(--slate); }

.social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.social-row a {
  width: 42px;
  height: 42px;
  border: 1px solid var(--neutral);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.social-row a:hover { background: var(--neutral); color: var(--white); }

/* ==========================================================================
   Featured strip (home)
   ========================================================================== */

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}
.view-all-row {
  display: flex;
  justify-content: center;
  margin-top: var(--space-lg);
}
.feature-card {
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.feature-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  filter: grayscale(20%);
  transition: transform 0.6s ease, filter 0.6s ease;
}
.feature-card:hover img { transform: scale(1.05); filter: grayscale(0%); }
.feature-card-label {
  padding: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.feature-card-label h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--slate-dark);
}
.feature-card-label span {
  font-size: 0.7rem;
  color: var(--slate);
}

/* Home "Featured Piece" — a single, non-rotating piece the artist flags
   as the one visitors should see first (CMS "Feature on Homepage?"),
   shown full-width right after the hero. */
.featured-piece {
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
}
.featured-piece-frame img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  filter: grayscale(15%);
  transition: transform 0.6s ease, filter 0.6s ease;
}
.featured-piece:hover .featured-piece-frame img { transform: scale(1.03); filter: grayscale(0%); }
.featured-piece-caption {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.featured-piece-caption h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  color: var(--slate-dark);
}
.featured-piece-caption span {
  font-size: 0.75rem;
  color: var(--slate);
}

/* Process strip on home */
.process-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
.process-step {
  border-top: 2px solid var(--neutral);
  padding-top: 1.25rem;
}
.process-step .step-num {
  font-size: 0.75rem;
  color: var(--slate);
  letter-spacing: 0.15em;
}
.process-step h4 {
  font-size: 1.1rem;
  text-transform: uppercase;
  margin: 0.5rem 0 0.5rem;
  color: var(--slate-dark);
}
.process-step p {
  font-size: 0.88rem;
  color: var(--neutral);
}

/* CTA band */
.cta-band {
  padding: var(--space-xl) 0;
  text-align: center;
  background: var(--neutral);
  color: var(--white);
  border-bottom: 1px solid var(--line);
}
.cta-band h2 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  text-transform: uppercase;
  font-weight: 800;
  max-width: 20ch;
  margin: 0.75rem auto var(--space-md);
}
.cta-band .eyebrow { color: var(--slate-light); }
.cta-band .eyebrow::before { background: var(--slate-light); }
.cta-band .btn { border-color: var(--white); color: var(--white); }
.cta-band .btn:hover { background: var(--white); color: var(--neutral); }

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  padding: var(--space-xl) 0 var(--space-md);
  background: var(--off-white);
}

.footer-newsletter {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line);
}
.footer-newsletter h5 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.4rem;
}
.footer-newsletter p {
  font-size: 0.85rem;
  color: var(--neutral);
  max-width: 40ch;
}
.newsletter-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.newsletter-form input[type="email"] {
  border: none;
  border-bottom: 1px solid var(--neutral);
  background: transparent;
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 0.6rem 0;
  color: var(--neutral);
  min-width: 220px;
}
.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--slate);
}
.newsletter-form .btn {
  padding: 0.7rem 1.25rem;
  font-size: 0.75rem;
}
.newsletter-confirmation,
.newsletter-error {
  flex-basis: 100%;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.newsletter-confirmation.is-visible,
.newsletter-error.is-visible {
  opacity: 1;
}
.newsletter-confirmation { color: var(--slate); }
.newsletter-error { color: #b33; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line);
}

.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p {
  color: var(--neutral);
  font-size: 0.9rem;
  max-width: 32ch;
}

.footer-col h5 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 1.1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col ul li a {
  font-size: 0.92rem;
  color: var(--neutral);
  transition: color var(--transition), padding-left var(--transition);
}
.footer-col ul li a:hover { color: var(--slate); padding-left: 4px; }

.footer-col .socials { display: flex; gap: 0.6rem; margin-top: 0.25rem; }
.footer-col .socials a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--neutral);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.footer-col .socials a:hover { background: var(--neutral); color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--slate);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Back to top
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  width: 50px;
  height: 50px;
  background: var(--neutral);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--neutral);
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--slate); }

/* ==========================================================================
   Load-in fade (page load only, not scroll-triggered)
   ========================================================================== */

.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Touch-device parity (no :hover available — reveal on-hover content by default)
   ========================================================================== */

@media (hover: none) {
  .masonry-caption {
    opacity: 1;
    transform: translateY(0);
    position: static;
    background: var(--neutral);
    padding: 0.85rem 1rem;
  }
  .masonry-item { display: flex; flex-direction: column; }
  .masonry-item:hover img,
  .diptych-imgs > div:hover img,
  .feature-card:hover img { transform: none; filter: grayscale(15%); }
  .feature-card-label { position: static; }
  .featured-piece:hover .featured-piece-frame img { transform: none; filter: grayscale(15%); }
  .btn:hover { background: none; color: var(--neutral); }
  .btn-solid:hover { background: var(--neutral); color: var(--white); }
  .cta-band .btn:hover { background: none; color: var(--white); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Large tablets / small laptops (iPad Pro landscape, small Windows laptops) */
@media (max-width: 1100px) {
  .masonry { column-count: 3; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .process-row { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-md) var(--space-lg); }
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { position: static; max-width: 420px; }
  .exhibit-gallery { grid-template-columns: repeat(2, 1fr); }
  .exhibit-row { grid-template-columns: 100px 1fr; }
  .exhibit-row .ex-tag { grid-column: 1 / -1; }
}

/* Tablet portrait (iPad, Surface, Android tablets ~ 600–900px) */
@media (max-width: 900px) {
  .masonry { column-count: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info-block { padding-left: 0; border-left: none; border-top: 1px solid var(--line); padding-top: var(--space-md); }
  .hero-meta { row-gap: var(--space-md); }
}

/* Phones */
@media (max-width: 760px) {
  :root {
    --space-xl: 4.5rem;
    --space-lg: 2.5rem;
  }
  .masonry { column-count: 2; }
  .feature-strip { grid-template-columns: 1fr; }
  .process-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .footer-newsletter { flex-direction: column; align-items: stretch; }
  .newsletter-form input[type="email"] { min-width: 0; flex: 1; }
  .nav-panel { width: 100%; padding: var(--space-lg) var(--space-md); }
  .nav-links li a { font-size: 1.6rem; }
  .hero-meta { gap: var(--space-md); }
  .lightbox-prev, .lightbox-next { width: 44px; height: 44px; }
  .lightbox-close, .lightbox-rotate, .lightbox-rotate-ccw, .lightbox-download { width: 44px; height: 44px; font-size: 1rem; }
  .lightbox-rotate { right: calc(var(--space-md) + 52px); }
  .lightbox-rotate-ccw { right: calc(var(--space-md) + 104px); }
  .lightbox-download { right: calc(var(--space-md) + 156px); }
  .section-header { flex-direction: column; align-items: flex-start; }
  .exhibit-gallery { grid-template-columns: 1fr 1fr; }
  .contact-info-block h3 { margin-top: var(--space-sm); }
}

@media (max-width: 480px) {
  .masonry { column-count: 1; }
  .exhibit-gallery { grid-template-columns: 1fr; }
  .feature-card img { height: 300px; }
  .featured-piece-frame img { height: 320px; }
  .hero-meta { flex-direction: column; gap: 1.25rem; }
  .hero { padding-bottom: calc(var(--space-xl) + 2.5rem); }

  /* Tighten the lightbox's top-right control cluster (close/rotate x2/download)
     so all four fit without crowding on narrow phones. */
  .lightbox-close, .lightbox-rotate, .lightbox-rotate-ccw, .lightbox-download {
    width: 40px; height: 40px; font-size: 0.9rem;
  }
  .lightbox-close { right: var(--space-sm); }
  .lightbox-rotate { right: calc(var(--space-sm) + 44px); }
  .lightbox-rotate-ccw { right: calc(var(--space-sm) + 88px); }
  .lightbox-download { right: calc(var(--space-sm) + 132px); }
}

/* Landscape phones — hero shouldn't force a full viewport height when short */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { min-height: auto; padding-top: calc(var(--space-lg) + 3rem); padding-bottom: var(--space-lg); }
}

/* Safe-area padding for notched phones (nav panel + back-to-top) */
.back-to-top {
  bottom: max(var(--space-md), calc(env(safe-area-inset-bottom) + 0.5rem));
  right: max(var(--space-md), env(safe-area-inset-right));
}
.nav-panel {
  padding-right: max(var(--space-lg), calc(env(safe-area-inset-right) + var(--space-md)));
  padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom));
}
