:root {
  --black: #111;
  --white: #fff;
  --grey: #888;
  --rule: #ddd;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 24px;
  background: var(--white);
  color: var(--black);
  font-family: Arial, Helvetica, sans-serif;
}

.spine {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: var(--grey);
  text-decoration: none;
}
.spine:hover { background: var(--black); color: var(--white); }

header, main, footer {
  max-width: 1100px;
  margin: 0 auto;
}

header {
  padding: 40px 0 32px;
}

header h1 {
  font-family: "Times New Roman", Times, serif;
  font-weight: normal;
  font-size: 30px;
  margin: 28px 0 6px;
}

header .meta {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: var(--grey);
  margin: 0 0 20px;
}

header .intro {
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.5;
  max-width: 60ch;
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 4px;
}

.cell {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f2f2f2;
}

.cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}

.cell:hover img {
  opacity: 0.8;
}

.cell .tag {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 1px 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

main {
  padding-bottom: 40px;
}

footer {
  padding: 32px 0 64px;
  border-top: 1px solid var(--rule);
  margin-top: 20px;
}

footer p {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: var(--grey);
  margin: 0;
}

@media (max-width: 500px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
