/* Photography field.
   Column flow rather than a row grid: every plate keeps the proportions of the
   photograph itself instead of being cropped into a uniform card, and nothing
   leaves a hole under a short image the way an aligned grid does. */
.photo-grid {
  columns: 1;
  column-gap: var(--gutter);
}
@media (min-width: 44rem) { .photo-grid { columns: 2; } }
@media (min-width: 76rem) { .photo-grid { columns: 3; column-gap: var(--space-xl); } }

.photo-plate {
  break-inside: avoid;
  margin-bottom: var(--space-lg);
  padding: var(--space-sm);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.photo-plate button {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
}
.photo-plate img {
  width: 100%;
  height: auto;
  background: var(--ink-800);
  border-radius: calc(var(--radius-panel) - 5px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.photo-plate button:hover img { opacity: 0.92; transform: scale(1.012); }
.photo-plate figcaption {
  margin-top: var(--space-sm);
  border-top: 1px solid var(--line-hair);
  padding-top: var(--space-xs);
}
.photo-plate__object {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.15;
  color: var(--paper);
}
.photo-plate__object span {
  font-family: var(--font-mono);
  font-size: 0.5em;
  letter-spacing: var(--track-caps);
  color: var(--azure);
  margin-left: 0.5rem;
  vertical-align: 0.35em;
}
.photo-plate__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem var(--space-sm);
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--step--2);
  color: var(--fog-deep);
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  padding-block: var(--space-md);
  border-block: 1px solid var(--line);
  margin-bottom: var(--space-xl);
  position: sticky;
  top: var(--header-h);
  background: color-mix(in oklab, var(--ink-900) 94%, transparent);
  backdrop-filter: blur(14px);
  z-index: 20;
}

/* ============ NASA archive search ============ */
.archive-search {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: flex-end;
  margin-bottom: var(--space-md);
}
.archive-search .field { margin-bottom: 0; flex: 1 1 18rem; }

.archive-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
}
.archive-item button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
}
.archive-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--ink-800);
  border-radius: var(--radius-control);
  transition: opacity var(--dur-fast);
}
.archive-item button:hover img { opacity: 0.85; }
.archive-item h3 {
  font-size: var(--step--1);
  font-weight: 500;
  line-height: 1.35;
  margin-top: 0.5rem;
  color: var(--paper-dim);
}
.archive-item .archive-meta {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--fog-deep);
  margin-top: 0.2rem;
}

/* Detail column inside the lightbox */
.lightbox-meta h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.15;
}
.lightbox-meta__note {
  font-size: var(--step--1);
  color: var(--fog);
  line-height: 1.55;
  margin-top: var(--space-sm);
  max-width: 56ch;
}
