@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@300;400;500&display=swap');

/* ============================================================
   ROOT & RESET  —  editorial light + mono theme
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:             #F6F4EF;
  --bg-card:        #FCFBF7;
  --border:         rgba(22,23,27,0.12);
  --border-hover:   rgba(22,23,27,0.24);
  --accent:         #1B3BD6;
  --accent-dim:     rgba(27,59,214,0.35);
  --accent-faint:   rgba(27,59,214,0.10);
  --text-primary:   #16171B;
  --text-secondary: rgba(22,23,27,0.90);
  --text-muted:     rgba(22,23,27,0.76);
  --text-faint:     rgba(22,23,27,0.62);
  --text-ghost:     rgba(22,23,27,0.52);
  --success:        #2E7D46;
  --error:          #B23B3B;
  --font-display:   'Instrument Serif', Georgia, serif;
  --font-body:      'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }


/* ============================================================
   AMBIENT GLOW  (off on paper — kept so markup stays intact)
   ============================================================ */
.glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.glow--tr {
  top: -100px; right: -60px;
  width: 420px; height: 420px;
  background: radial-gradient(ellipse, transparent 0%, transparent 65%);
}

.glow--bl {
  bottom: -80px; left: 60px;
  width: 300px; height: 300px;
  background: radial-gradient(ellipse, transparent 0%, transparent 65%);
}


/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(246,244,239,0.96);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 48px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(22,23,27,0.20);
  padding: 6px 14px;
  transition: border-color 0.2s;
}

.site-logo:hover { border-color: rgba(22,23,27,0.40); }

.site-logo__text {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-logo__divider {
  width: 1px;
  height: 12px;
  background: rgba(22,23,27,0.20);
}

.main-nav { display: flex; gap: 28px; }

.main-nav__link {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(22,23,27,0.72);
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.main-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.2s;
}

.main-nav__link:hover,
.main-nav__link--active { color: rgba(22,23,27,0.92); }

.main-nav__link:hover::after,
.main-nav__link--active::after { width: 100%; }

.site-header__meta {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-ghost);
  letter-spacing: 0.12em;
}
/* ============================================================
   MOBILE NAV  —  paste into main.css, right after the
   `.site-header__meta { … }` rule (end of the HEADER section).
   Matches existing tokens: bordered box like .site-logo,
   mono uppercase links, --accent active state.
   ============================================================ */

/* hamburger button — hidden on desktop, bordered box echoes .site-logo */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(22,23,27,0.20);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.nav-toggle:hover { border-color: rgba(22,23,27,0.40); }

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle__bar { transition: none; }
}

/* ---- below 760px: collapse the row into a hamburger + dropdown ---- */
@media (max-width: 760px) {
  .site-header__inner { padding: 14px 20px; }
  .site-header__meta  { display: none; }   /* ATL → NEW HAVEN: hide to free space */

  .nav-toggle { display: flex; }

  /* the horizontal nav becomes a full-width dropdown panel under the header */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 6px 20px 14px;
    background: rgba(246,244,239,0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: none;            /* collapsed by default */
  }

  .site-header.nav-open .main-nav { display: flex; }

  .main-nav__link {
    font-size: 12px;
    letter-spacing: 0.10em;
    padding: 12px 2px;
    border-bottom: 1px solid var(--border);
  }
  .main-nav__link:last-child { border-bottom: none; }

  /* the sliding underline doesn't read well on stacked rows */
  .main-nav__link::after { display: none; }
  .main-nav__link--active { color: var(--accent); }

  /* bars morph into an X when open */
  .site-header.nav-open .nav-toggle__bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .site-header.nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle__bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
}


/* ============================================================
   MAIN & CONTAINER
   ============================================================ */
.main-content { flex: 1; position: relative; z-index: 5; }
.main-content:not(:has(.home)) { padding-top: 16px; }
.main-content:has(.home) { display: flex; flex-direction: column; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 36px; }

.page-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.page-section:last-child { border-bottom: none; }


/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.frame-tag {
  font-size: 9px;
  letter-spacing: 0.20em;
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.frame-tag::before {
  content: '';
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--accent);
}

.display-name {
  font-family: var(--font-display);
  font-size: 88px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 0.92;
  letter-spacing: -0.01em;
}

.display-role {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(22,23,27,0.64);
  margin-bottom: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-label {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.25em;
  color: var(--text-ghost);
  margin-bottom: 28px;
  text-transform: uppercase;
}

.body-text {
  font-size: 14px;
  font-weight: 400;
  color: rgba(22,23,27,0.84);
  line-height: 1.8;
  max-width: 560px;
}

.body-text strong { color: #16171B; font-weight: 500; }

.divider { width: 36px; height: 1px; background: var(--accent-dim); margin: 24px 0; }

.text-link {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent-faint);
  padding-bottom: 2px;
  transition: all 0.2s;
}

.text-link:hover { color: var(--text-primary); border-color: var(--accent-dim); }


/* ============================================================
   HOME (stacked layout)
   ============================================================ */
.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 3vh, 38px);
  padding-top: 20px;
  padding-bottom: 20px;
}

.home-hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 0;
}

.home-hero__intro .display-name { margin: 10px 0 8px; }
.home-hero__intro .display-role { margin-bottom: 16px; }
.home-hero__intro .body-text { max-width: 420px; }

.home-feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.2s;
}

.home-feature:hover { border-color: var(--accent-dim); }

.home-feature img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.home-feature__label {
  position: relative;
  z-index: 1;
  margin: 14px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* stats row */
.home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.stat { padding: 18px 0; }

.stat__val {
  display: block;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat--accent .stat__val { color: var(--accent); }

.stat__lbl {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(22,23,27,0.66);
}

/* nav cards */
.home-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 0;
}

.home-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 15px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.home-card:hover { background: #EFEBE2; border-color: var(--accent); }

.home-card__top { display: flex; justify-content: space-between; align-items: center; }
.home-card__num { font-size: 10px; color: var(--text-faint); }

.home-card__arrow { font-size: 13px; color: var(--text-faint); transition: color 0.15s; }
.home-card:hover .home-card__arrow { color: var(--accent); }

.home-card__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-primary);
}

.home-card__sub { font-size: 9px; color: var(--text-faint); letter-spacing: 0.04em; }

/* recently strip */
.recently {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.recently__tag { color: var(--accent); font-weight: 500; }
.recently__dot { color: var(--text-faint); }

@media (max-width: 900px) {
  .home { display: block; padding: 36px 0 48px; }
  .home-hero { grid-template-columns: 1fr; gap: 28px; }
  .home-stats { margin-top: 28px; }
  .home-cards { margin-top: 20px; }
  .recently   { margin-top: 24px; }
}

@media (min-width: 901px) and (max-height: 780px) {
  .home { gap: clamp(10px, 2vh, 22px); }
  .home .display-name { font-size: 64px; }
  .home-feature { aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  .home-stats { grid-template-columns: 1fr 1fr; }
  .home-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container      { padding: 0 20px; }          /* 36px is tight on phones */
  .section-title  { font-size: 27px; }          /* eases big serif heads */
  .home-cards     { grid-template-columns: 1fr; } /* 2-up → 1-up on small phones */
}
@media (max-width: 480px) {
  .display-name   { font-size: 56px; }          /* 88px can overflow ~360px */
}


/* ============================================================
   APP MODULES (professional page)
   ============================================================ */
.modules { padding: 56px 0 0; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.module-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 16px 16px 14px;
  text-decoration: none;
  transition: border-color 0.2s;
}

.module-card:hover { border-color: var(--accent); }

.module-card--local { cursor: default; }
.module-card--local:hover { border-color: var(--border); }

.module-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.module-card__num {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.module-card__badge {
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 8px;
}

.module-card__title {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.05;
  color: var(--text-primary);
}

.module-card__sub {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-muted);
}


/* ============================================================
   PROJECTS (professional page)
   ============================================================ */
.projects { padding: 56px 0; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 16px 16px 14px;
  text-decoration: none;
  transition: border-color 0.2s;
}

.project-card:hover { border-color: var(--accent); }

.project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card__num {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.project-card__badge {
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 8px;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.05;
  color: var(--text-primary);
}

.project-card__desc {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.project-card__flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 10px;
  color: var(--text-faint);
}

.project-card__flow .arrow { color: var(--accent); }

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.proj-tag {
  font-size: 9px;
  letter-spacing: 0.03em;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 7px;
}


/* ============================================================
   EXHIBITIONS (photo stories)
   ============================================================ */
.exhibitions { padding: 56px 0; }

.gallery { padding: 56px 0; }

.exhibition {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.exhibition:first-of-type { border-top: none; padding-top: 20px; }

.exhibition__title {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.04;
  color: var(--text-primary);
}

.exhibition__meta {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-top: 6px;
}

.exhibition__desc { margin-top: 14px; }

.photo-masonry {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.photo-masonry img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: opacity 0.2s;
}

.photo-masonry img:hover { opacity: 0.9; }
/* JS sizes each .masonry-item to fill rows edge-to-edge (justified layout) */

/* lightbox + details panel */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(22,23,27,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  cursor: zoom-out;
  padding: 96px 24px 32px;   /* extra top clears the sticky header */
  box-sizing: border-box;
}

.lightbox.open { display: flex; }

.lightbox__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 96%;
  max-height: 92vh;
  cursor: default;
}

#lightbox-img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 6px;
  display: block;
}

.lightbox.show-details #lightbox-img { max-width: calc(96vw - 300px); }

.lightbox__details { display: none; }

.lightbox.show-details .lightbox__details {
  display: block;
  width: 268px;
  max-height: 92vh;
  overflow: auto;
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 22px;
}

.lb-cap {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.12;
  margin-bottom: 16px;
}

.lb-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.lb-dl dt { color: var(--text-faint); }
.lb-dl dd { color: var(--text-primary); text-align: right; margin: 0; }
.lb-dl dd { white-space: nowrap; }
.lb-time { color: var(--text-faint); font-size: 0.92em; }

.lb-sep { height: 1px; background: var(--border); margin: 14px 0; }

.lightbox__close,
.lightbox__toggle {
  position: absolute;
  top: 18px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-mono);
}

.lightbox__close {
  right: 18px;
  width: 34px; height: 34px;
  font-size: 20px; line-height: 1;
}

.lightbox__toggle {
  right: 62px;
  height: 34px;
  padding: 0 14px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.lightbox__close:hover,
.lightbox__toggle:hover { background: rgba(255,255,255,0.22); }

@media (max-width: 700px) {
  .lightbox.show-details .lightbox__inner { flex-direction: column; }
  .lightbox.show-details #lightbox-img { max-width: 100%; max-height: 55vh; }
  .lightbox.show-details .lightbox__details { width: 100%; max-height: 34vh; }
}


/* admin inline edit + photo captions */
.admin-bar {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}
.admin-bar a { color: var(--text-muted); border-bottom: 1px solid var(--border); }

.ex-edit {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
  padding: 18px;
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  background: var(--accent-faint);
}

.ex-edit__row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ex-edit__row > * { flex: 1; min-width: 160px; }

.ex-edit input[type="text"],
.ex-edit input[type="date"],
.ex-edit textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 4px;
  outline: none;
}

.ex-edit input.ex-title { font-family: var(--font-display); font-size: 22px; }
.ex-edit textarea { min-height: 70px; resize: vertical; }

.ex-edit label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.ex-edit__actions { display: flex; align-items: center; gap: 16px; }

.masonry-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
}

.masonry-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #fff;
  padding: 16px 8px 6px;
  letter-spacing: 0.02em;
  background: linear-gradient(to top, rgba(10,11,14,0.7), rgba(10,11,14,0));
  pointer-events: none;
}

.caption-input {
  width: 100%;
  margin-top: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 4px;
  outline: none;
}

.caption-input:focus,
.ex-edit input:focus,
.ex-edit textarea:focus { border-color: var(--accent); }


/* ============================================================
   NAV ITEMS
   ============================================================ */
.nav-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: padding-left 0.15s;
  position: relative;
}

.nav-item:first-of-type { border-top: 1px solid var(--border); }
.nav-item:hover { padding-left: 6px; }

.nav-item:hover::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--accent);
}

.nav-item:hover .nav-item__title { color: var(--text-primary); }
.nav-item:hover .nav-item__num   { color: var(--accent); }

.nav-item__num {
  font-size: 9px;
  font-weight: 400;
  color: var(--text-ghost);
  padding-top: 4px;
  min-width: 22px;
  transition: color 0.15s;
}

.nav-item__body { flex: 1; }

.nav-item__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 3px;
  transition: color 0.15s;
}

.nav-item__sub {
  font-size: 9px;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.pill {
  font-size: 7px;
  font-weight: 400;
  padding: 3px 8px;
  border-radius: 2px;
  align-self: center;
  flex-shrink: 0;
  letter-spacing: 0.06em;
}

.pill--accent {
  background: var(--accent-faint);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}

.pill--dim {
  background: rgba(22,23,27,0.03);
  color: var(--text-ghost);
  border: 1px solid var(--border);
}


/* ============================================================
   PHOTO GRID
   ============================================================ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px;
}

.photo-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/2;
  background: var(--bg-card);
}

.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.95);
  transition: transform 0.4s ease, filter 0.3s ease;
}

.photo-item:hover img { transform: scale(1.03); filter: brightness(1); }

.photo-item__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(11,15,24,0.82), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.photo-item:hover .photo-item__caption { opacity: 1; }
.photo-item__loc { font-size: 10px; color: rgba(255,255,255,0.88); }
.photo-item__meta { font-size: 8px; color: rgba(255,255,255,0.55); letter-spacing: 0.08em; }


/* ============================================================
   CARDS
   ============================================================ */
.card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 28px;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--border-hover); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
}

.card-grid .card {
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}


/* ============================================================
   CONTACT FORM
   ============================================================ */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 8px;
  font-weight: 400;
  color: var(--text-ghost);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-input:focus,
.form-textarea:focus { border-color: var(--accent-dim); }

.form-textarea { resize: vertical; min-height: 140px; }

.form-btn {
  background: transparent;
  border: 1px solid var(--accent-dim);
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 36px;
  cursor: pointer;
  transition: all 0.2s;
}

.form-btn:hover {
  background: var(--accent-faint);
  border-color: var(--accent);
  color: var(--text-primary);
}


/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash-wrap { padding: 0 36px; position: relative; z-index: 20; }

.flash {
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.05em;
  border-left: 1px solid;
  margin-top: 1px;
}

.flash--success { background: rgba(46,125,70,0.08); border-color: var(--success); color: var(--success); }
.flash--error   { background: rgba(178,59,59,0.08); border-color: var(--error);   color: var(--error); }


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--border); position: relative; z-index: 5; }

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 36px;
}

.footer-copy,
.footer-meta {
  font-size: 8px;
  font-weight: 400;
  color: var(--text-ghost);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links { display: flex; gap: 20px; }

.footer-link {
  font-size: 8px;
  font-weight: 400;
  color: var(--text-ghost);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--text-faint); }


/* ============================================================
   UTILITIES
   ============================================================ */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mt-64 { margin-top: 64px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; height: auto; }
  .hero__right { min-height: 360px; }
  .hero__left { padding: 48px 32px; }
  .hero__nav { padding: 40px 32px; }
  .display-name { font-size: 64px; }
  .main-nav { gap: 16px; }
  .site-header__meta { display: none; }
}

@media (max-width: 640px) {
  .site-header__inner { padding: 12px 24px; }
  .container { padding: 0 24px; }
  .display-name { font-size: 48px; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .site-footer__inner { padding: 14px 24px; flex-wrap: wrap; gap: 8px; }
  .stat-strip { flex-wrap: wrap; gap: 20px; }
  .stat { border-right: none; padding-right: 0; margin-right: 0; }
}

/* lightbox toggle — force above any button resets */
#lightbox { position: fixed; }
#lightbox > .lightbox__toggle,
#lightbox > .lightbox__close {
  position: fixed;
  top: 76px;            /* below your sticky header instead of behind it */
  z-index: 300;
  background: rgba(22,23,27,0.55);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-mono);
}
#lightbox > .lightbox__toggle { right: 70px; height: 34px; padding: 0 14px; font-size: 11px; }
#lightbox > .lightbox__close  { right: 24px; width: 34px; height: 34px; font-size: 20px; line-height: 32px; text-align: center; }

/* ---- lightbox details: floating panel, image stays put ---- */
.lightbox.show-details #lightbox-img { max-width: 96vw; }   /* stop shrinking the image */

.lightbox.show-details .lightbox__details {
  position: fixed;
  top: 50%;
  right: 6vw;          /* was 24px — pulls it in from the edge toward the image */
  left: auto;
  transform: translateY(-50%);
  width: min(330px, 92vw);
  max-height: 80vh;
  overflow-y: auto;
}

/* let long values (lens names) wrap instead of overflowing */
.lb-dl dd { min-width: 0; overflow-wrap: anywhere; }
.lb-time { color: var(--text-faint); font-size: 0.92em; }


/* =========================================================
   Lightbox detail bars — hover-reveal (desktop), always-on (touch)
   Replaces the old side panel + Details/Hide button.
   Append to main.css. (Old .lightbox__details / .lightbox__toggle
   / .show-details rules are now unused — safe to delete later.)
   ========================================================= */

/* frame wraps tightly around the image so bars track its edges */
.lb-frame {
  position: relative;
  display: inline-block;
  line-height: 0;              /* kill inline-img descender gap */
  max-width: 96vw;
  max-height: calc(100vh - 128px);   /* 96 top + 32 bottom padding */
}
#lightbox-img {
  display: block;
  max-width: 96vw;
  max-height: calc(100vh - 128px);
  width: auto;
  height: auto;
}

.lb-bar {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 5;
}
.lb-bar span { white-space: nowrap; }
.lb-bar i { font-style: normal; opacity: 0.38; }   /* the · separators */

.lb-bar--top {
  top: 0;
  padding-bottom: 30px;
  background: linear-gradient(to bottom, rgba(10,11,14,0.80), rgba(10,11,14,0));
}
.lb-bar--bottom {
  bottom: 0;
  padding-top: 30px;
  background: linear-gradient(to top, rgba(10,11,14,0.80), rgba(10,11,14,0));
}

/* hover reveals (desktop) */
.lb-frame:hover .lb-bar { opacity: 1; }

/* don't render an empty bar */
.lb-frame:not(.has-top) .lb-bar--top,
.lb-frame:not(.has-bottom) .lb-bar--bottom { display: none; }

/* touch / small screens: no hover available — show always */
@media (hover: none), (max-width: 700px) {
  .lb-bar { opacity: 1; }
}


/* ---- admin drag-to-reorder (works on the justified layout) ---- */
.arrange-row {
  display: flex; gap: 12px; align-items: baseline;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-faint); margin: 4px 0 12px;
}
.arrange-status { font-size: 11px; }
.arrange-status--ok  { color: var(--accent); }
.arrange-status--err { color: #c0392b; }

/* drag handle sits over each photo (top-left) in admin mode */
.drag-handle {
  position: absolute; top: 8px; left: 8px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22,23,27,0.62); color: #fff;
  border-radius: 4px; font-size: 14px; line-height: 1;
  cursor: grab; user-select: none; z-index: 4;
}
.drag-handle:active { cursor: grabbing; }
.masonry-item.dragging { opacity: 0.4; }

/* admin caption editor overlays the bottom of the box (keeps box height uniform) */
.photo-masonry--admin .caption-input {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; margin: 0;
  background: rgba(22,23,27,0.72); color: #fff;
  border: 0; border-radius: 0;
  padding: 7px 9px;
  font-family: var(--font-mono); font-size: 11px;
  z-index: 4;
}
.photo-masonry--admin .caption-input::placeholder { color: rgba(255,255,255,0.5); }/* =========================================================
   Gallery — editorial "catalog" layout
   Alternating image / metadata spreads. Distinct from the
   exhibitions justified feed. Append to main.css.
   ========================================================= */

.gallery-wall {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 40px;
}

.gallery-piece {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}
/* divider line between pieces (not above the first) */
.gallery-piece + .gallery-piece {
  border-top: 1px solid var(--border);
  margin-top: 96px;
  padding-top: 96px;
}
/* every other piece flips: image moves to the right, meta to the left */
.gallery-piece:nth-child(even) { flex-direction: row-reverse; }

.gallery-piece__media { flex: 1 1 auto; min-width: 0; }
.gallery-piece__media img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: zoom-in;
  transition: opacity 0.2s;
}
.gallery-piece__media img:hover { opacity: 0.92; }

.gallery-piece__meta {
  flex: 0 0 230px;
  padding-top: 4px;
}

.gallery-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.gallery-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  color: var(--text-primary);
  margin: 0 0 18px;
}

.gallery-spec { display: flex; flex-direction: column; gap: 7px; }
.gallery-spec div { display: flex; justify-content: space-between; gap: 12px; }
.gallery-spec dt {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.gallery-spec dd {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
}

/* stack on narrow screens: image on top, meta beneath */
@media (max-width: 760px) {
  .gallery-piece + .gallery-piece { margin-top: 56px; padding-top: 56px; }
  .gallery-piece,
  .gallery-piece:nth-child(even) { flex-direction: column; align-items: stretch; }
  .gallery-piece__meta { flex-basis: auto; }
  .gallery-piece__media img { max-height: 70vh; }
}

/* ---- admin: "add to gallery" star (sits on each photo in exhibitions admin) ---- */
.gallery-star {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22,23,27,0.62);
  color: rgba(255,255,255,0.55);
  border: 0; border-radius: 4px;
  font-size: 15px; line-height: 1;
  cursor: pointer; z-index: 4;
  transition: color 0.15s;
}
.gallery-star:hover { color: #fff; }
.gallery-star.is-on { color: #f2c14e; }   /* gold when in the gallery */
.gallery-star:disabled { opacity: 0.5; cursor: default; }

/* ---- gallery: description prose under the spec block ---- */
.gallery-desc {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 18px;
}

/* ---- admin: per-photo edit toggle + overlay editor (title + description) ---- */
.edit-toggle {
  position: absolute; top: 8px; right: 40px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22,23,27,0.62); color: rgba(255,255,255,0.7);
  border: 0; border-radius: 4px;
  font-size: 13px; line-height: 1; cursor: pointer; z-index: 4;
  transition: color 0.15s;
}
.edit-toggle:hover { color: #fff; }
.masonry-item.editing .edit-toggle { color: var(--accent); }

.photo-edit {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column; gap: 4px;
  padding: 12px;
  background: rgba(16,17,21,0.93);
  overflow-y: auto; z-index: 5;
}
.masonry-item.editing .photo-edit { display: flex; }
.photo-edit__label {
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55); margin-top: 4px;
}
.photo-edit__title, .photo-edit__desc {
  width: 100%; margin: 0;
  background: rgba(255,255,255,0.08); color: #fff;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 3px;
  padding: 6px 8px;
  font-family: var(--font-mono); font-size: 12px;
}
.photo-edit__desc { flex: 1 1 auto; min-height: 70px; resize: none; line-height: 1.5; }
.photo-edit__title::placeholder, .photo-edit__desc::placeholder { color: rgba(255,255,255,0.4); }

/* ---- gallery: admin inline description editor ---- */
.gallery-desc-edit {
  width: 100%;
  margin-top: 18px;
  min-height: 92px;
  resize: vertical;
  background: var(--bg-card, rgba(0,0,0,0.03));
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}
.gallery-desc-edit:focus { outline: none; border-color: var(--accent); }
.gallery-save {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 6px;
  min-height: 12px;
}
.gallery-save--ok  { color: var(--accent); }
.gallery-save--err { color: #c0392b; }


/* ============================================================
   PAGE PROGRESSION — "what's next" button (shared across pages)
   Moved out of professional.html so every page is styled the same.
   ============================================================ */
.pro-next { margin-top: 64px; }

.pro-next__link {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 38px 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s;
}

.pro-next__link:hover {
  border-color: var(--accent-dim);
  background: var(--accent-faint);
}

.pro-next__text { display: flex; flex-direction: column; gap: 12px; }

.pro-next__kicker {
  font-size: 8px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pro-next__kicker::before {
  content: '';
  display: inline-block;
  width: 14px; height: 1px;
  background: var(--accent);
}

.pro-next__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.25;
}

.pro-next__cue {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  padding-bottom: 4px;
}

.pro-next__arrow { transition: transform 0.25s; }
.pro-next__link:hover .pro-next__arrow { transform: translateX(5px); }

@media (max-width: 720px) {
  .pro-next__link {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 32px;
  }
}