/* Keep it plain: a little layout help, otherwise let the browser look like itself. */
body {
  margin: 8px;
  background: white;
  color: black;
  font-family: "Times New Roman", Times, serif;
}

main { max-width: 900px; margin: 0 auto; }
header, footer { margin: 1em 0; }
.site-header {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 1em;
}
.site-header h1 { margin: 0; }
nav { margin: 1em 0; }
.site-header nav { display: flex; gap: 1em; }
.site-header nav a { margin: 0; }
h1 { font-size: 2em; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 1.5em 0;
}
.photo-card { margin: 0; }
.photo-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.photo-card img.middle-crop { object-position: center center; }
.photo-card img.show-whole { height: auto; object-fit: contain; }
.photo-card figcaption { margin-top: 4px; }
.photo-card figcaption span { display: block; }
.detail-image { display: block; max-width: 100%; height: auto; }
.photo-detail { margin: 1.5em 0; }
.photo-nav { display: flex; justify-content: space-between; margin: 1.5em 0; }

@media (max-width: 420px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo-card img { height: 150px; }
  .photo-card img.show-whole { height: auto; }
}
