:root {
  --bg: #fbfbfa;
  --fg: #161616;
  --muted: #8a8a86;
  --line: #e6e5e1;
  --accent: #161616;
  --gap: 8px;
  --row: 300px;
  --pad: clamp(16px, 4vw, 48px);
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
img { display: block; max-width: 100%; }

/* ---- Header / footer ---------------------------------------------------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  padding: clamp(28px, 6vw, 64px) var(--pad) clamp(24px, 4vw, 48px);
}

.brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.tagline { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.site-header nav { display: flex; gap: 28px; font-size: 13px; letter-spacing: .06em; }

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(48px, 8vw, 120px);
  padding: 32px var(--pad) 48px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.site-footer .contact { display: flex; gap: 28px; }
.site-footer small { color: var(--muted); }

/* ---- Grid: justified rows, order preserved left-to-right ------------------- */

main { padding: 0 var(--pad); }

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}
/* Soaks up the last row's free space so its photos keep their natural size. */
.grid::after { content: ""; flex-grow: 1e9; }

.tile {
  margin: 0;
  flex-grow: var(--ar);
  flex-basis: calc(var(--ar) * var(--row));
  background: var(--line);
}
.tile a { display: block; }
.tile img { width: 100%; height: auto; transition: opacity .25s; }
.tile a:hover img { opacity: .88; }

.more { height: 1px; }
.empty { color: var(--muted); padding: 10vh 0; text-align: center; }

@media (max-width: 640px) {
  :root { --row: 180px; --gap: 4px; }
}

/* ---- About -------------------------------------------------------------- */

.about {
  max-width: 620px;
  margin: clamp(64px, 10vw, 140px) auto 0;
  padding: 0 var(--pad);
}
.about h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 20px;
}
.about p { margin: 0 0 1em; }

/* ---- Lightbox ----------------------------------------------------------- */

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(251, 251, 250, .98);
  color: var(--fg);
}
.lightbox::backdrop { background: transparent; }

.lightbox figure {
  height: 100%;
  margin: 0;
  padding: 56px 72px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.lightbox img {
  max-width: 100%;
  max-height: calc(100% - 40px);
  object-fit: contain;
  user-select: none;
}
.lightbox figcaption { min-height: 1.6em; font-size: 13px; color: var(--muted); text-align: center; }

.lightbox button {
  position: absolute;
  border: 0;
  background: none;
  color: var(--fg);
  font: 300 28px/1 var(--font);
  padding: 16px;
  cursor: pointer;
  opacity: .55;
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 8px; right: 8px; }

@media (max-width: 640px) {
  .lightbox figure { padding: 56px 8px 24px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
}
