/* Mirrors the Squarespace "Wells"-style layout the site used: fixed left sidebar and
   3-column masonry galleries. Clicked photos open centred over a dimmed page. */
:root {
  --ink: #222; --text: #444; --muted: #999; --gap: 10px;
  --sans: Figtree, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; } /* no layout shift when the viewer locks scrolling */
body { margin: 0; background: #fff; color: var(--text); font: 14px/1.65 var(--sans); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site { display: flex; align-items: flex-start; padding: 40px 50px 0; }
.side { position: sticky; top: 0; flex: 0 0 240px; padding: 28px 20px 40px 0; }
.logo { display: inline-block; margin-left: 5px; }
.logo img { width: 140px; }
.tagline { margin: 14px 0 0; max-width: 180px; color: var(--muted); font-size: 11px; line-height: 1.55; letter-spacing: .075em; }

.side nav { display: flex; flex-direction: column; align-items: flex-start; }
.nav { margin-top: 40px; }
.side nav > a, .folder > summary { display: block; padding: 4px 3px; color: var(--ink); font-size: 15px; line-height: 24px; cursor: pointer; }
.folder > summary { list-style: none; }
.folder > summary::-webkit-details-marker { display: none; }
.folder[open] { padding-bottom: 13px; }
.folder[open] > summary { color: var(--muted); }
.folder > a { display: block; padding: 0 0 0 11px; color: var(--ink); font-size: 15px; line-height: 25px; }
.folder > a:first-of-type { margin-top: 5px; }
.side nav a.on { color: var(--muted); }
.side nav a:hover, .folder > summary:hover { color: var(--muted); }
.mobile-menu { display: none; }

.content { flex: 1 1 auto; min-width: 0; }

/* Galleries: gallery.js moves the photos into .col columns; without it they stack in one column. */
.gallery { display: flex; flex-direction: column; gap: var(--gap); }
.gallery.ready { flex-direction: row; align-items: flex-start; }
.gallery .col { display: flex; flex: 1 1 0; flex-direction: column; gap: var(--gap); min-width: 0; }
.gallery .ph { display: block; cursor: pointer; }
.gallery .ph img { width: 100%; }

/* Photo viewer (gallery.js): the photo centred over the page, dimmed with translucent black.
   gallery.js sizes the image and animates it between its grid spot and the centre. */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox .backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .85); }
.lightbox img { position: relative; max-width: none; transform-origin: 0 0; cursor: pointer; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); will-change: transform, opacity; }
.lightbox .ui { position: absolute; inset: 0; pointer-events: none; }
.lightbox .ui button { pointer-events: auto; }
.lightbox button { position: absolute; padding: 16px; border: 0; background: none; color: #fff; font: 300 42px/1 var(--sans); cursor: pointer; opacity: .7; }
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lightbox .close { top: 8px; right: 12px; font-size: 36px; }
.lightbox .prev, .lightbox .next { top: 50%; transform: translateY(-50%); }
.lightbox .prev { left: 6px; }
.lightbox .next { right: 6px; }
.lightbox .count { position: absolute; right: 0; bottom: 16px; left: 0; color: rgba(255, 255, 255, .7); font-size: 11px; letter-spacing: .12em; text-align: center; }
.lightbox-open { overflow: hidden; }

/* Text pages */
.page { max-width: 885px; padding: 8px 0 0 10px; }
.page h1 { margin: 0 0 22px; color: #111; font-size: 26px; font-weight: 400; line-height: 1.3; }
.page p { margin: 0 0 14px; }
.about { display: grid; grid-template-columns: 425px minmax(0, 1fr); gap: 33px; align-items: start; }
.about .portrait { width: 100%; }
.about .text { padding-top: 10px; }
.page.contact > * { max-width: 580px; margin-right: auto; margin-left: auto; }
.contact h1 { margin-bottom: 96px; }
.contact p:first-of-type { color: #111; font-size: 15px; font-weight: 500; }

.social { display: flex; justify-content: center; gap: 12px; padding: 40px 0 50px; color: var(--ink); }
.narrow .social { max-width: 895px; }
.social a { display: block; padding: 2px; }
.social a:hover { color: var(--muted); }
.social svg { display: block; }

@media (max-width: 640px) {
  .site { display: block; padding: 20px 20px 0; }
  .side { position: static; padding: 0 0 26px; }
  .logo { margin-left: 0; }
  .logo img { width: 80px; }
  .tagline { max-width: none; margin-top: 10px; }
  .side .nav { display: none; }
  .mobile-menu { display: block; margin-top: 18px; }
  .mobile-menu > summary { display: inline-block; color: var(--ink); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; list-style: none; cursor: pointer; }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .mobile-menu > nav { margin-top: 10px; }
  .page { padding: 0; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .page.contact > * { max-width: none; }
  .contact h1 { margin-bottom: 30px; }
  .lightbox .prev, .lightbox .next { top: auto; bottom: 0; transform: none; }
}
