/* The gallery: a grid of cards, each a picture of a document over what it is about. */
.gallery { max-width: 72rem; margin: 0 auto; padding: 3.5rem 1.5rem 5rem; }
.gallery .intro { max-width: 44rem; }
.gallery .kicker { font: 600 12px/1 ui-monospace, monospace; letter-spacing: .3em; text-transform: uppercase; color: var(--faint); }
.gallery .intro h1 { font-size: 2.6rem; margin: 1rem 0 1rem; font-family: ui-serif, Georgia, serif; font-weight: 500; letter-spacing: -.02em; }
.gallery .lead { font-size: 1.1rem; color: var(--soft); }

/* The filter: radio buttons drawn as a row of pills. */
.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: 2rem 0 1.5rem; }
.filters input { position: absolute; opacity: 0; pointer-events: none; }
.filters label { margin: 0; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem;
  color: var(--soft); cursor: pointer; user-select: none; }
.filters label:hover { color: var(--ink); border-color: var(--faint); }
.filters input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.filters input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.gallery:has(#f-maths:checked) .show:not([data-field="maths"]),
.gallery:has(#f-science:checked) .show:not([data-field="science"]),
.gallery:has(#f-computing:checked) .show:not([data-field="computing"]),
.gallery:has(#f-arts:checked) .show:not([data-field="arts"]),
.gallery:has(#f-society:checked) .show:not([data-field="society"]),
.gallery:has(#f-everyday:checked) .show:not([data-field="everyday"]) { display: none; }

.shows { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.show a { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--raised);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; }
.show a:hover { border-color: var(--faint); transform: translateY(-2px); box-shadow: 0 10px 28px rgb(0 0 0 / .12); }
.show a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The pictures are drawn dark, so they sit on a dark ground in light mode too. */
.show img { display: block; width: 100%; height: auto; aspect-ratio: 660 / 420; object-fit: cover; background: #161412;
  border-bottom: 1px solid var(--line); }
.show .about { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.show .about p { margin: 0; }
.show .topic { display: flex; justify-content: space-between; gap: .5rem; font: 500 11px/1.4 ui-monospace, monospace;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.show .field { color: var(--accent); }
.show h2 { margin: 0; font-size: 1.1rem; line-height: 1.3; color: var(--ink); font-weight: 600; }
.show .about > p:not(.topic):not(.uses) { color: var(--soft); font-size: .9rem; line-height: 1.5; }
.show .uses { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: auto; padding-top: .35rem; }
.show .uses span { font: 11px/1 ui-monospace, "iA Writer Mono S", monospace; color: var(--soft); background: var(--ground);
  border: 1px solid var(--line); border-radius: 5px; padding: .3rem .45rem; }

.gallery .yours { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); max-width: 44rem; }
.gallery .yours h2 { color: var(--ink); font-size: 1.25rem; margin: 0 0 .75rem; }
.gallery .yours p { color: var(--soft); }

@media (max-width: 560px) {
  .gallery { padding: 2rem 1rem 3rem; }
  .gallery .intro h1 { font-size: 2rem; }
  .shows { grid-template-columns: 1fr; }
}
