:root {
  --bg: #f5f5f5;
  --fg: #000;
  --wrap: min(80vw, 1600px);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Jost", "futura-pt", "Futura", "Century Gothic", sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* Header: big light uppercase title left, underlined HOME right */
.top {
  width: var(--wrap);
  margin: 0 auto;
  padding: 44px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.title, .home {
  font-size: 31.6px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
}
.home {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  line-height: 1.05;
  flex: none;
}
.home:hover { opacity: .6; }

/* Photos page: album covers with captions */
.albums {
  width: var(--wrap);
  margin: 64px auto 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 20px;
  row-gap: 26px;
}
.album { text-decoration: none; display: block; }
.album img, .tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #e8e8e8;
}
.album img { transition: opacity .2s; }
.album:hover img { opacity: .85; }
.caption {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* Album page: tight 3-up grid */
.gallery {
  width: var(--wrap);
  margin: 150px auto 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.tile { display: block; cursor: zoom-in; }
.tile img { transition: opacity .2s; }
.tile:hover img { opacity: .85; }

.notfound { width: var(--wrap); margin: 64px auto; font-size: 18px; }

/* Lightbox */
.lb {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb[hidden] { display: none; }
.lb-img {
  max-width: calc(100vw - 180px);
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity .25s;
  cursor: pointer;
}
.lb-img.in { opacity: 1; }
.lb button {
  position: absolute;
  background: none;
  border: 0;
  color: var(--fg);
  font: 300 44px/1 "Jost", sans-serif;
  cursor: pointer;
  padding: 12px 18px;
  opacity: .7;
}
.lb button:hover { opacity: 1; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 8px; right: 12px; font-size: 36px !important; }

/* Tablet */
@media (max-width: 900px) {
  :root { --wrap: 88vw; }
  .albums, .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery { margin-top: 80px; gap: 10px; }
  .title, .home { font-size: 26px; }
}
/* Phone */
@media (max-width: 560px) {
  :root { --wrap: calc(100vw - 32px); }
  .top { padding-top: 28px; }
  .title, .home { font-size: 22px; }
  .albums { grid-template-columns: 1fr; margin-top: 40px; row-gap: 28px; }
  .gallery { grid-template-columns: 1fr; margin-top: 48px; gap: 12px; }
  .lb-img { max-width: 100vw; max-height: calc(100vh - 120px); }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }
}
