/* preston.studio — public site. Left-sidebar layout, monospace nav, teal accent.
   Modelled on Joshua's original site: white, big imagery, lots of whitespace. */

:root {
  --ink: #1a1a1a;
  --muted: #8a8a8a;
  --line: #ececec;
  --bg: #ffffff;
  --teal: #468070;       /* PRESTON — deep teal */
  --mint: #9ed5cb;       /* JOSHUA — mint */
  --sidebar-w: 200px;
  --gap: 22px;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  font-family: "Source Code Pro", ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  padding: 34px 26px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  z-index: 40;
}
.logo { display: block; margin-bottom: 40px; }
.logo img { width: 128px; height: auto; display: block; }

.nav-main, .nav-secondary { display: flex; flex-direction: column; gap: 7px; }
.nav-secondary { margin-top: 26px; }
.sidebar nav a {
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--muted);
  transition: color 140ms;
  width: fit-content;
}
.sidebar nav a:hover { color: var(--ink); }
.sidebar nav a.active { color: var(--teal); }

.nav-social { margin-top: 26px; }
.nav-social a { color: var(--ink); display: inline-flex; opacity: 0.8; transition: opacity 140ms; }
.nav-social a:hover { opacity: 1; color: var(--teal); }

/* ── Hamburger (mobile only) ── */
.nav-toggle {
  display: none;
  position: fixed; top: 18px; right: 18px; z-index: 60;
  background: rgba(255,255,255,0.9); border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }

/* ── Main content ── */
.site-main {
  margin-left: var(--sidebar-w);
  padding: 34px clamp(20px, 4vw, 52px) 70px;
  max-width: 1500px;
}

/* ── Collection cards grid (home + subsections) ── */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 34px);
}
.coll-card { display: block; }
.coll-card-img { overflow: hidden; background: #f5f5f5; aspect-ratio: 1 / 1; }
.coll-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 300ms;
}
.coll-card:hover .coll-card-img img { opacity: 0.86; }
.coll-card-empty { width: 100%; height: 100%; background: #f0f0f0; }
.coll-card-label {
  margin-top: 11px;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--ink);
}
.subsection-grid { margin-bottom: 46px; }

/* ── Collection header ── */
.coll-head { margin-bottom: clamp(22px, 4vw, 40px); }
.coll-head h1 {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  margin: 0;
}
.crumb { font-size: 0.72rem; letter-spacing: 0.05em; text-transform: lowercase; color: var(--muted); margin-bottom: 8px; }
.crumb a:hover { color: var(--teal); }
.crumb span { margin: 0 5px; }
.coll-intro { max-width: 620px; color: #555; margin-top: 12px; font-size: 0.82rem; }

/* ── Photo grid (3-column masonry, uncropped, like the original) ── */
.photo-grid {
  column-count: 3;
  column-gap: var(--gap);
}
.photo {
  margin: 0 0 var(--gap);
  break-inside: avoid;
  cursor: zoom-in;
  background: #f5f5f5;
  overflow: hidden;
}
.photo img { width: 100%; height: auto; display: block; transition: opacity 200ms; }
.photo:hover img { opacity: 0.9; }

/* ── Prose (about / contact) ── */
.prose { max-width: 620px; font-weight: 300; font-size: 0.86rem; }
.prose h1 { font-weight: 400; font-size: 1.15rem; letter-spacing: 0.06em; text-transform: lowercase; margin: 0 0 22px; }
.prose p { margin: 0 0 16px; }
.prose img { max-width: 100%; height: auto; }
.contact-lines { margin-top: 22px; font-size: 0.9rem; }
.contact-lines a { color: var(--teal); border-bottom: 1px solid var(--mint); }

.empty-note { color: var(--muted); padding: 40px 0; font-size: 0.8rem; }

/* ── Lightbox ── */
.lightbox { position: fixed; inset: 0; background: rgba(255,255,255,0.985); display: none; align-items: center; justify-content: center; z-index: 200; }
.lightbox.open { display: flex; }
.lb-figure { margin: 0; max-width: 88vw; max-height: 92vh; text-align: center; }
.lb-figure img { max-width: 88vw; max-height: 82vh; object-fit: contain; }
.lb-figure figcaption {
  color: var(--muted); font-size: 0.72rem; font-weight: 300;
  margin-top: 16px; letter-spacing: 0.03em; padding: 0 20px;
}
.lb-close, .lb-prev, .lb-next {
  position: fixed; background: none; border: 0; color: var(--muted);
  cursor: pointer; font-weight: 300; transition: color 140ms;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--teal); }
.lb-close { top: 20px; right: 26px; font-size: 2rem; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 2.4rem; padding: 0 20px; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .photo-grid { column-count: 2; }
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 220ms ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.12);
    width: 220px;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .site-main { margin-left: 0; padding: 64px 20px 60px; }
}
@media (max-width: 480px) {
  .photo-grid { column-count: 1; }
  .collection-grid { grid-template-columns: 1fr 1fr; }
}
