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

body {
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Back nav — matches other pages */
.home-nav-box a {
  display: block;
  position: fixed;
  top: 20px;
  left: 20px;
  width: 20px;
  height: 30px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 30"><polyline points="15,5 5,15 15,25" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  text-indent: -9999px;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.home-nav-box a:hover {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 30"><polyline points="15,5 5,15 15,25" fill="none" stroke="red" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

/* Layout */
.Archive {
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 80px;
  padding-bottom: 100px;
}

/* Tabs */
.Archive__Tabs {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 50px;
}

.Archive__Tab {
  background: none;
  border: none;
  font-family: "Source Serif 4", Georgia, serif;
  font-optical-sizing: auto;
  font-size: 20px;
  font-weight: 400;
  color: #999;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.Archive__Tab:hover {
  color: #000;
}

.Archive__Tab--active {
  color: #000;
}

/* Grid */
.Archive__Grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
}

.Archive__Grid--hidden {
  display: none;
}

/* Thumbnail cell — provides the placeholder background */
.Archive__Cell {
  aspect-ratio: 1;
  background-color: #eee;
  overflow: hidden;
}

/* Thumbnail image — fades in on load */
.Archive__Thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s;
}

.Archive__Thumb.loaded {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .Archive {
    width: 90%;
  }

  .Archive__Grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .Archive__Tabs {
    gap: 24px;
  }
}
