:root {
  --ink: #0c0f0d;
  --paper: #efe7d4;
  --gold: #e7c44a;
  --mute: #8a8578;
  --line: rgba(231, 196, 74, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2420, var(--ink));
  color: var(--paper);
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 8;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-areas:
    "mark slash title"
    ". . tag";
  align-items: baseline;
  gap: 0 0.55rem;
  padding: 1.6rem 1.4rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.mark,
.slash {
  color: var(--mute);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mark {
  grid-area: mark;
}

.slash {
  grid-area: slash;
}

h1 {
  grid-area: title;
  margin: 0;
  font-family: Syne, sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  color: var(--gold);
}

.tag {
  grid-area: tag;
  margin: 0.35rem 0 0;
  color: var(--mute);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.board {
  position: relative;
  z-index: 1;
  padding: 1.2rem 1.1rem 4rem;
  columns: 3 260px;
  column-gap: 0.85rem;
}

.empty {
  column-span: all;
  margin: 3rem auto;
  max-width: 28rem;
  text-align: center;
  color: var(--mute);
  line-height: 1.6;
}

.empty strong {
  color: var(--gold);
  font-weight: 500;
}

.card {
  break-inside: avoid;
  margin: 0 0 0.85rem;
  background: #101412;
  border: 1px solid rgba(239, 231, 212, 0.08);
  cursor: zoom-in;
}

.card img {
  display: block;
  width: 100%;
  height: auto;
}

.card figcaption {
  padding: 0.55rem 0.7rem 0.7rem;
  color: var(--mute);
  font-size: 0.72rem;
}

.lightbox {
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0.8rem 0.8rem 1rem;
  border: 1px solid var(--line);
  background: #0a0d0b;
  color: var(--paper);
}

.lightbox::backdrop {
  background: rgba(5, 8, 6, 0.82);
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  margin: 0 auto;
  object-fit: contain;
}

.light-title {
  margin: 0.75rem 0 0;
  color: var(--mute);
  font-size: 0.8rem;
}

.ghost {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.ghost.close {
  float: right;
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .top {
    grid-template-columns: 1fr;
    grid-template-areas:
      "mark"
      "title"
      "tag";
  }

  .slash {
    display: none;
  }
}
