.catalog-grid {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--grid-gutter);
  padding-block: var(--space-4);
}

/* Cards were reading cramped on desktop — go wider and use fewer, larger
   columns instead of the standard 4/6-column catalogue density. */
@media (min-width: 1024px) {
  .catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    width: 100%;
    max-width: 75vw;
  }
}

.catalog-item {
  position: relative;
  z-index: 10;
  min-width: 0;
  display: block;
  color: var(--color-fg);
  text-decoration: none;
}

/* The bordered "label" box */
.catalog-item-box {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 2px solid var(--color-fg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* No stray borders/outlines/shadows on any image inside a card, however
   it gets there (icons, future real cover photos, etc.) */
.catalog-item-box img {
  border: none;
  outline: none;
  box-shadow: none;
}

.catalog-item-icon {
  display: block;
  width: 100%;
  height: 100%;
}

/* Globe icon, floated top-right above the ID bar */
.catalog-item-icon-top {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  width: 26px;
  height: 20px;
}

/* Inverted (filled) bar showing the catalog number */
.catalog-item-idbar {
  display: block;
  background: var(--color-fg);
  color: var(--color-bg);
  text-align: center;
  font-size: var(--font-caption);
  font-weight: 700;
  letter-spacing: 0.05em;
  padding-block: var(--space-1);
  margin-top: var(--space-4);
}

/* Body zone: solid card-surface color at rest, reveals an image on hover.
   Strictly contained between the ID bar above and the bottom bar below —
   .card-image fills only this box, never those siblings. */
.catalog-item-media {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--card-bg);
}

.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #00FF88;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.catalog-item:hover .card-image,
.catalog-item:focus-visible .card-image {
  opacity: 1;
}

/* No hover on touch devices — instead, the card(s) crossing the middle
   band of the viewport get .is-centered from catalog.js, so the green
   reveal travels card to card as you scroll: hover driven by the thumb.
   Slightly slower transition than desktop hover so the handoff between
   cards reads as a glide rather than a flicker. */
@media (hover: none) {
  .card-image {
    transition: opacity 0.55s ease;
  }

  .catalog-item.is-centered .card-image {
    opacity: 1;
  }
}

/* Footer zone: the name/year row, plus a third row underneath for the
   project title — both now live inside the card, not below it. */
.catalog-item-footer {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--color-fg);
}

/* Row 1: signature mark + name (+ optional collaborator) on the left,
   year on the right */
.catalog-item-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1);
}

.catalog-item-signature {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}

.catalog-item-signature .catalog-item-icon {
  width: 22px;
  height: 17px;
  flex-shrink: 0;
}

.catalog-item-name-block {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

/* One line, truncated — long titles must never wrap and change the
   footer height, so every tile keeps identical proportions. */
.catalog-item-name {
  font-size: calc(var(--font-caption) * 0.9);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-item-collab {
  font-size: calc(var(--font-caption) * 0.8);
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-item-year {
  font-size: var(--font-subhead);
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

/* Row 2: project title, smaller monospace, inside the card footer zone */
.catalog-item-project-title {
  border-top: 1px solid var(--color-fg);
  padding: var(--space-1);
  font-size: calc(var(--font-caption) * 0.85);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bee heads — index page arrangement: stacked overlapping cluster.
   Horizontal position is now controlled entirely by the fixed
   .bee-heads-container (anchored to the right edge of the viewport),
   so no per-head left values are set here anymore. */
.bee-head-1 { top: 28%; width: 669px; --base-rotation: -14deg; }
.bee-head-2 { top: 30%; width: 489px; --base-rotation: 9deg; }
.bee-head-3 { top: 26%; width: 797px; --base-rotation: 16deg; }
.bee-head-4 { top: 32%; width: 591px; --base-rotation: -19deg; }
.bee-head-5 { top: 29%; width: 900px; --base-rotation: 5deg; }
.bee-head-6 { top: 31%; width: 694px; --base-rotation: -7deg; }
