/* ── Custom properties ─────────────────────────────────────── */
:root {
  --bg:        #111111;
  --bg-card:   #1a1a1a;
  --bg-nav:    #0d0d0d;
  --text:      #f0ece4;
  --text-dim:  #a09890;
  --accent:    #c9a84c;
  --accent-dim:#7a6028;
  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans:  system-ui, -apple-system, sans-serif;
  --nav-h:     56px;
  --gutter:    20px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Visibility ─────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Header / Nav ──────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-nav);
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  gap: 16px;
  z-index: 100;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.site-title:hover { text-decoration: none; color: var(--accent); }

#nav-links {
  display: flex;
  flex: 1;
  overflow: hidden;
}
#nav-links > ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  list-style: none;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
#nav-links > ul::-webkit-scrollbar { display: none; }
#nav-series {
  display: contents;
  list-style: none;
}
.nav-link {
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Hamburger — hidden on desktop */
#hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px; height: 18px;
  background: none; border: none; cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}
#hamburger span {
  display: block; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Main content area ─────────────────────────────────────── */
#main-content {
  padding-top: var(--nav-h);
}

/* ── Section titles ─────────────────────────────────────────── */
.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--text);
  text-align: center;
  padding: 60px var(--gutter) 40px;
  letter-spacing: 0.03em;
}

/* ── Home / Hero ────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 48px;
}
.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: 0.02em;
}
.tagline {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 1.05rem;
  font-style: italic;
  font-family: var(--font-serif);
}
#hero-image-wrap {
  overflow: hidden;
  min-height: 320px;
}
#hero-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.bio {
  max-width: 560px;
  margin: 32px auto 0;
}
.bio p {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 1.2em;
}
.bio p:last-child { margin-bottom: 0; }

/* ── Work grid ──────────────────────────────────────────────── */
.gallery-section {
  padding: 0 var(--gutter) 80px;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 32px;
  max-width: 1000px;
  margin: 0 auto;
}
.work-card {
  cursor: default;
}
.work-card.has-image { cursor: pointer; }
.work-card.has-image:hover .card-title { color: var(--accent); }

.work-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: center;
  background: var(--bg-card);
  transition: opacity 0.2s;
}
.work-card.has-image:hover img { opacity: 0.88; }

.image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid #2a2a2a;
}

.card-caption {
  padding: 10px 0 0;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.3;
  transition: color 0.15s;
}
.card-meta {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.card-status {
  margin-top: 5px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.p-status {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 3px;
}
.p-sold   { background: #7ab87a; color: #111; }
.p-nfs    { background: #8a8aaa; color: #111; }
.p-prints { background: #7ab0b8; color: #111; }
.p-fire   { background: #c0522a; color: #fff; }
.p-flood  { background: #3a7ab8; color: #fff; }

#lb-status {
  margin-top: 6px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* Available: price tag */
.price-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  background: var(--accent-dim);
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  border-radius: 2px;
}
.inquire-link {
  text-align: center;
  padding: 32px 0;
  font-size: 0.9rem;
}
.empty-message {
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  padding: 40px var(--gutter);
}

/* ── Contact ─────────────────────────────────────────────────── */
.contact-body {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
  text-align: center;
}
.contact-body p {
  margin-bottom: 16px;
  color: var(--text-dim);
}
.contact-link {
  font-size: 1.05rem;
  color: var(--accent);
}

/* ── Lightbox ────────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
}
.lb-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 95vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.lb-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
#lb-img {
  max-width: 88vw;
  max-height: 72vh;
  object-fit: contain;
  box-shadow: 0 4px 40px rgba(0,0,0,0.6);
  cursor: zoom-in;
}
.lb-hint {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-dim);
  opacity: 0.7;
  letter-spacing: 0.03em;
}

/* Full-size view: the image at its true pixel size, scrolled/dragged to pan */
#lb-zoom {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  overflow: auto;
  background: #000;
  cursor: zoom-out;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}
#lb-zoom.dragging { cursor: grabbing; }
#lb-zoom img {
  max-width: none;
  margin: auto;            /* centres when smaller than the screen, scrolls when larger */
  user-select: none;
  -webkit-user-drag: none;
}
#lb-zoom::after {
  content: 'Click to close \00b7  drag to move around';
  position: fixed;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background: rgba(0,0,0,0.6);
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  border-radius: 12px;
  pointer-events: none;
}
.lb-meta {
  width: 100%;
  max-width: 640px;
  padding: 20px 16px 24px;
  text-align: center;
}
.lb-meta h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
}
#lb-caption {
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

/* Lightbox nav buttons */
.lb-prev, .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--text);
  font-size: 2.5rem;
  line-height: 1;
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.15s;
  z-index: 1002;
  border-radius: 3px;
}
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.14); }

.lb-close {
  position: fixed;
  top: 12px; right: 16px;
  background: none; border: none;
  color: var(--text-dim);
  font-size: 2rem;
  cursor: pointer;
  z-index: 1002;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.15s;
}
.lb-close:hover { color: var(--text); }

/* Collapsible notes / poetry */
.lb-collapsible {
  margin-top: 16px;
  text-align: left;
  width: 100%;
  border-top: 1px solid #2a2a2a;
  padding-top: 12px;
}
.lb-toggle {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.lb-toggle:hover { color: var(--text); }
.lb-collapsible-body {
  margin-top: 10px;
  color: var(--text-dim);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
  white-space: pre-wrap;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: unset;
  }
  .hero-text { padding: 40px var(--gutter) 24px; }
  #hero-image-wrap { min-height: 52vw; }
}

/* Top bar collapses into the hamburger menu before the tabs can run out of room */
@media (max-width: 1180px) {
  #hamburger { display: flex; }

  #nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-nav);
    border-bottom: 1px solid #222;
    padding: 12px 0 20px;
    z-index: 99;
    overflow: visible;
  }
  #nav-links.open { display: flex; }
  #nav-links > ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 var(--gutter);
    flex-wrap: wrap;
    overflow: visible;
  }
  #nav-series { display: contents; }
  .nav-link {
    font-size: 0.88rem;
    padding: 8px 0;
    border-bottom: none;
  }
  .nav-link.active { color: var(--accent); }
}

@media (max-width: 600px) {
  .work-grid { grid-template-columns: 1fr; }

  #lb-img { max-height: 60vh; }
  .lb-prev { left: 2px; padding: 8px 10px; font-size: 1.8rem; }
  .lb-next { right: 2px; padding: 8px 10px; font-size: 1.8rem; }
}

/* ── All Work page: dense overview grid, 5 across on desktop ───── */
#all-work .work-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 16px;
  max-width: 1600px;
}
#all-work .card-title { font-size: 0.9rem; }
#all-work .card-meta  { font-size: 0.72rem; }

@media (max-width: 1200px) { #all-work .work-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { #all-work .work-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { #all-work .work-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; } }

/* ── Patreon tab in the top bar ─────────────────────────────────── */
.nav-link.nav-patreon {
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 3px;
  margin-left: 6px;
}
.nav-link.nav-patreon:hover { color: var(--text); border-color: var(--accent); }
@media (max-width: 1180px) {
  .nav-link.nav-patreon { border: none; margin-left: 0; }   /* plain gold link inside the hamburger menu */
}
