:root {
  color-scheme: dark;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  color: #eeeaf3;
  background: radial-gradient(ellipse at 50% 58%, #202139 0%, #12141f 42%, transparent 72%), #0b0d12;
  font: 14px/1.6 system-ui, sans-serif;
}

main {
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vmin, 72px) clamp(16px, 5vw, 64px);
}

.gallery { width: min(100%, 1000px); min-width: 0; }
.gallery__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-bottom: 18px;
}
.gallery__header h2 { margin: 0; font: 400 19px/1.5 var(--serif); letter-spacing: .13em; }
.gallery__header p { margin: 0; color: #bcb8cb; font-size: 12px; letter-spacing: .04em; }
.gallery__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 22px);
}

.spotlight-card {
  --accent: 178, 159, 255;
  --lx: 50%;
  --ly: 42%;
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: none;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.spotlight-card--lens { --accent: 133, 225, 222; }
.spotlight-card--film { --accent: 255, 164, 186; }
.spotlight-card:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 5px; }

.card-surface {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 15px;
  height: 100%;
  min-height: 284px;
  padding: clamp(16px, 2.1vw, 27px);
  overflow: hidden;
  pointer-events: none;
  border: 1px solid #ffffff26;
  border-radius: inherit;
  background: linear-gradient(150deg, rgb(var(--accent), .08), transparent 72%), linear-gradient(160deg, #ffffff0a, #0a0b15a6);
  box-shadow: inset 0 1px #ffffff13, 0 20px 42px -21px #03040bd9;
  transform: perspective(850px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .42s cubic-bezier(.2,.8,.28,1), border-color .24s;
}
.card-surface::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0;
  background: radial-gradient(ellipse at var(--lx) var(--ly), rgb(var(--accent), .29), rgb(var(--accent), .09) 38%, transparent 73%);
  transition: opacity .25s;
}
.spotlight-card:is([data-tracking], [aria-pressed="true"], :focus-visible) .card-surface { border-color: rgb(var(--accent), .62); }
.spotlight-card:is([data-tracking], [aria-pressed="true"], :focus-visible) .card-surface::before { opacity: 1; }
.spotlight-card[data-tracking] .card-surface { transition-duration: .12s, .24s; }

.card-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgb(var(--accent));
  font: 500 10px/1.4 var(--mono);
  letter-spacing: .19em;
  text-transform: uppercase;
}
.card-label::before { content: ""; width: 14px; height: 1px; background: currentColor; }
.card-copy { display: grid; gap: 4px; padding-inline-end: 22px; }
.card-name { font: 400 clamp(22px, 2.6vw, 31px)/1.25 var(--serif); letter-spacing: .09em; }
.card-note { color: #c0bdcd; font-size: 12px; }
.card-pin {
  position: absolute;
  right: clamp(16px, 2.1vw, 27px);
  bottom: clamp(16px, 2.1vw, 27px);
  width: 12px;
  height: 12px;
  border: 1px solid rgb(var(--accent), .58);
  border-radius: 50%;
}
[aria-pressed="true"] .card-pin {
  border: 3px double #1a1428;
  background: rgb(var(--accent));
  box-shadow: 0 0 14px rgb(var(--accent), .7);
}

.specimen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 115px;
  background:
    radial-gradient(ellipse at center, rgb(var(--accent), .15), transparent 65%),
    repeating-linear-gradient(90deg, rgb(var(--accent), .10) 0 1px, transparent 1px 16px) center / 81px 1px no-repeat;
}
.specimen::before {
  content: "";
  position: absolute;
  width: 106px;
  height: 106px;
  border: 1px dashed rgb(var(--accent), .26);
  border-radius: 50%;
}
.specimen i { position: relative; display: block; width: 72px; height: 72px; }
.spotlight-card--prism .specimen i {
  clip-path: polygon(50% 0, 94% 26%, 94% 74%, 50% 100%, 6% 74%, 6% 26%);
  background: conic-gradient(from 30deg, #8e7ed3 0deg, #453b76 60deg, #baaef3 120deg, #3d2e69 180deg, #8273c3 240deg, #d8cbfc 300deg, #8e7ed3 360deg);
}
.spotlight-card--prism .specimen i::after {
  content: "";
  position: absolute;
  inset: 1px;
  clip-path: inherit;
  background: conic-gradient(from 30deg, #63538e 0deg 60deg, #9e8bd7 60deg 120deg, #463467 120deg 180deg, #7760a8 180deg 240deg, #b1a1e9 240deg 300deg, #584881 300deg);
}
.spotlight-card--lens .specimen i {
  border: 1px solid #b0fff0a6;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 36%, #d1fff0 0%, #8aeede 3%, #6892ae55 18%, #112d4666 42%, #72dad17a 69%, #9aefe3 100%);
  box-shadow: inset 0 0 0 5px #8ce5de29, 0 0 26px #76e4db2a;
}
.spotlight-card--film .specimen i {
  width: 64px;
  height: 64px;
  border: 1px solid #ffd1dbad;
  border-radius: 13px;
  transform: rotate(-23deg) skew(8deg);
  background: repeating-linear-gradient(140deg, #855884 -4%, #ec91b2 18%, #ffc1b0 27%, #815791 48%);
  box-shadow: inset 0 0 0 3px #ffe1f03d, 9px 8px #dd88ac23, 17px 16px #eab5e11e;
}

@media (max-width: 640px) {
  .gallery { width: min(100%, 440px); }
  .gallery__cards { grid-template-columns: 1fr; }
  .card-surface {
    grid-template: "label specimen" auto "copy specimen" 1fr / minmax(0, 1fr) 86px;
    align-items: center;
    gap: 8px;
    min-height: 132px;
  }
  .card-label { grid-area: label; }
  .card-copy { grid-area: copy; align-self: start; padding-inline-end: 0; }
  .specimen { grid-area: specimen; min-height: 76px; transform: scale(.72); }
  .card-pin { right: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .spotlight-card .card-surface { transform: none; transition: none; }
  .card-surface::before { transition: none; }
}
