/* rebuilt from the Cargo site: every size is in rem, and rem scales with the viewport like Cargo's does */

:root {
  --ink: rgba(0, 0, 0, 0.85);
  --muted: rgba(0, 0, 0, 0.4);
  --serif: "Newsreader", Georgia, serif;
  --nav-h: calc(0.9rem + 1.05rem * 1.2 + 3rem);
  --footer-h: calc(8rem + 0.8rem * 1.2 + 1rem);
}

html { font-size: clamp(12.3px, 0.65vw + 7.4px, 12.96px); }

@media (max-width: 767px) {
  html { font-size: min(3.36vw, 18px); }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.2;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2 { margin: 0; font-weight: 400; line-height: 1; }
h1 { font-size: 4.1rem; letter-spacing: -0.01em; }
h2 { font-size: 2.4rem; }

.caption { font-size: 0.8rem; line-height: 1.2; }
.muted { color: var(--muted); }

/* fixed top nav, right half of a 12-column row */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 5fr 7fr;
  column-gap: 1rem;
  padding: 0.9rem 1rem 3rem;
  pointer-events: none;
}
.site-nav div { grid-column: 2; text-align: right; pointer-events: auto; }
.site-nav a:hover { opacity: 0.6; }

/* fixed bottom-left copyright line */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  padding: 0 1rem 1rem;
  pointer-events: none;
}

.page { padding: 0.9rem 1rem 3rem; }
main > .page:first-child { padding-top: calc(var(--nav-h) + 0.9rem); }
.page.single { padding-bottom: calc(var(--footer-h) + 3rem); }

/* home: three masonry columns, filled shortest-first like Cargo's columnized gallery */
.gallery { display: flex; gap: 1rem; align-items: flex-start; }
.gallery .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }

.gallery img,
.work img,
.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

/* series pages: one piece per row, centered in the middle of three columns */
.work .row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 4rem;
}
.work .row > * { grid-column: 2; }
.work figure { margin: 0; }
.work .caption { padding-top: 1rem; }

.statement { margin: 0; }

/* about: text on 8 of 12 columns, photo on 4 at 81.1% */
.about {
  display: grid;
  grid-template-columns: 8fr 4fr;
  column-gap: 1rem;
}
.about p { margin: 0; }
.about-photo { width: 81.1%; margin: 0; }

@media (max-width: 767px) {
  .site-nav { padding: 0.675rem 0.75rem 2.25rem; column-gap: 0.75rem; }
  .site-footer { padding: 0 0.75rem 0.75rem; }
  .page { padding: 0.675rem 0.75rem 2.25rem; }
  .gallery, .gallery .col { gap: 1.5rem; }
  .work .row { display: block; }
  .about { display: block; }
  .about-text { margin-bottom: 0.75rem; }
}

/* lightbox, modeled on Cargo's quick view: white field, image fit to the window, round controls */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 39px 90px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button {
  position: absolute;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lightbox button svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.2; fill: none; }
.lightbox .close { top: 20px; right: 20px; }
.lightbox .prev { left: 20px; top: calc(50% - 15px); }
.lightbox .next { right: 20px; top: calc(50% - 15px); }

@media (max-width: 767px) {
  .lightbox { padding: 60px 12px; }
  .lightbox .prev, .lightbox .next { top: auto; bottom: 16px; }
}
