@font-face {
  font-family: 'Gorton';
  src: url('/fonts/GortonDigitalRegular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gorton';
  src: url('/fonts/GortonDigitalMedium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --col-width: 900px;
  --gap: 72px;
  --caption-color: #383838;
}

html, body {
  background: #000;
  color: #fff;
  min-height: 100%;
}

body {
  font-family: 'Gorton', monospace;
  font-weight: 500;
}

main {
  max-width: var(--col-width);
  margin: 0 auto;
  padding: var(--gap) 24px;
}

/* Photos */
figure.photo {
  margin-bottom: var(--gap);
}

figure.photo picture,
figure.photo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 70vh;
  max-height: 70vh;
  object-fit: contain;
  object-position: left;
  cursor: zoom-in;
}

/* Captions */
figcaption a {
  color: inherit;
  text-decoration: none;
}

figcaption {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--caption-color);
  line-height: 1.4;
}

.sep {
  margin: 0 0.4em;
  opacity: 0.4;
}

/* Footer */
footer {
  max-width: var(--col-width);
  margin: 0 auto;
  padding: 0 24px calc(var(--gap) / 2);
  display: flex;
  justify-content: flex-end;
}

footer a {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--caption-color);
  text-decoration: none;
  border-bottom: 1px solid #222;
  padding-bottom: 1px;
}

footer a:hover {
  color: #555;
  border-color: #444;
}

/* Overlay */
dialog#overlay {
  border: none;
  background: #000;
  padding: 0;
  margin: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
}

dialog#overlay[open] {
  display: flex;
}

dialog#overlay::backdrop {
  background: #000;
}

#overlay-img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Overlay caption */
#overlay-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px 24px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--caption-color);
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
  pointer-events: none;
}

/* Overlay buttons */
#prev, #next, #close {
  position: absolute;
  background: none;
  border: none;
  color: #333;
  font-size: 20px;
  cursor: pointer;
  padding: 16px;
  transition: color 0.15s;
  font-family: inherit;
}

#prev:hover, #next:hover, #close:hover { color: #888; }
#prev:focus-visible, #next:focus-visible, #close:focus-visible { outline: 1px solid #555; outline-offset: 2px; }

#prev { left: 16px; top: 50%; transform: translateY(-50%); }
#next { right: 16px; top: 50%; transform: translateY(-50%); }
#close { top: 16px; right: 16px; font-size: 16px; }

/* Responsive */
@media (max-width: 600px) {
  main { padding: 40px 16px; }
  :root { --gap: 48px; }
}
