.playground {
  --ground: #e7e5e1;
  --ink: #181a1e;
  display: block;
  height: 100dvh;
  color: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
}
:root[data-theme="dark"] .playground { --ground: #18191b; --ink: #f1f0ef; }
.playground .identity { z-index: 5; }
.gallery, .wall { position: absolute; inset: 0; }
.gallery {
  overflow: clip;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.gallery.ready { touch-action: none; cursor: grab; }
.gallery::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(var(--ground) 0, var(--ground) clamp(3.6rem, 7vh, 5rem), transparent clamp(8rem, 15vh, 11rem)),
    radial-gradient(ellipse 65% 72% at 50% 55%, transparent 55%, color-mix(in srgb, var(--ground) 51%, transparent));
}
.projects { display: flex; justify-content: center; align-items: center; gap: 4vw; height: 100%; }
.gallery a {
  display: block; color: inherit; text-decoration: none;
  font: 400 clamp(.77rem,.8vw,.98rem)/1.25 var(--portfolio-mono);
  letter-spacing: -.035em; width: var(--card, 25vw);
  -webkit-user-drag: none;
}
.gallery img {
  display: block; width: 100%; height: auto; aspect-ratio: 9 / 16;
  border-radius: 3.5% / 1.97%; object-fit: cover; pointer-events: none;
}
.gallery a:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
.caption, .tags, .year { display: flex; align-items: center; }
.caption { justify-content: space-between; gap: 3px; margin: .7em .08em .48em; }
.year { font-size: .87em; gap: .43em; letter-spacing: 0; }
.year::before { content: ""; width: .43em; height: .43em; background: currentColor; }
.tags { gap: .36em; font-size: .81em; letter-spacing: -.025em; }
.tags span {
  border: 1px solid color-mix(in srgb, currentColor 50%, transparent);
  border-radius: 2em; padding: .19em .6em; white-space: nowrap;
}
.wall { pointer-events: none; }
.cell, .registration, .grid-cursor { position: absolute; left: 0; top: 0; }
.cell { transform-origin: 50% var(--mid); }
.cell a { pointer-events: auto; transform-origin: 50% var(--mid); transition: transform 160ms ease-out; }
.cell a:hover { transition-duration: 90ms; }
.registration { width: 9px; height: 9px; opacity: .64; }
.registration::before, .registration::after { content: ""; position: absolute; background: currentColor; }
.registration::before { inset: 4px 0; }
.registration::after { inset: 0 4px; }
.grid-cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .gallery.tracking, .tracking .cell a { cursor: none; }
  .tracking .grid-cursor {
    display: block; pointer-events: none; z-index: 4;
    width: 2.25rem; height: 2.25rem; margin: -1.125rem;
    background: color-mix(in srgb,var(--ink) 30%, transparent);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    transition: scale .16s ease-out;
  }
  .tracking:has(a:hover) .grid-cursor { scale: .55; }
  .tracking.dragging .grid-cursor { scale: .38; }
}
@media (max-width:720px), (max-width:950px) and (max-height:500px) {
  .playground .identity { background: var(--ground); }
  .gallery::after { background: linear-gradient(var(--ground) 3rem, transparent 6rem); }
  .projects { flex-wrap: wrap; align-content: center; }
  .projects a { width: 41vw; }
}
@media (prefers-reduced-motion: reduce) {
  .cell a, .tracking .grid-cursor { transition: none; }
}
