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

:root {
  --ink: #111111;
  --muted: #5f5f5f;
  --bg: #ffffff;
  --gap: 24px;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--muted); text-decoration: none; }
a:hover { color: var(--ink); }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px;
}

/* Masthead */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 80px 0 40px;
  text-align: center;
}
.masthead h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 72px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.masthead h1 a { color: var(--ink); }
.tagline { margin: 0; font-size: 15px; color: var(--muted); }

/* Section tabs */
.sections {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  padding-bottom: 48px;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sections a {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.sections a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Gallery: JS splits photos into columns */
.gallery {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
}
.gallery .col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.gallery button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #eeeeec;
  cursor: zoom-in;
}
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery img.loaded { opacity: 1; }
.gallery button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; width: 100%; }

/* About */
.about {
  max-width: 620px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.65;
}
.about a { color: var(--ink); border-bottom: 1px solid #bbbbbb; }

/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 80px 0 64px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.footer-email { font-family: var(--serif); font-size: 28px; color: var(--ink); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.98);
}
.lightbox[hidden] { display: none; }
.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 160px);
}
.lb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 110px);
  object-fit: contain;
}
.lb-figure figcaption { font-size: 13px; color: var(--muted); letter-spacing: 0.06em; }
.lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.lb-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-btn:focus-visible { outline: 2px solid var(--ink); }

/* Smaller screens */
@media (max-width: 900px) {
  .wrap { padding: 0 28px; }
  .masthead { padding: 56px 0 32px; }
  .masthead h1 { font-size: 56px; }
  :root { --gap: 16px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .masthead h1 { font-size: 44px; }
  .sections { gap: 10px 20px; font-size: 13px; padding-bottom: 32px; }
  .lb-figure { max-width: 100vw; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-figure img { max-height: calc(100vh - 160px); }
}
