/* Gallery (gated) — neo-brutal full-screen shelf. Base tokens in /assets/neo.css */
.shelf { flex: 1; width: 100%; padding: 26px var(--pad) 56px; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.shelf-title { font: 400 clamp(34px, 5.2vw, 76px)/.95 var(--head); text-transform: uppercase; margin: 0; letter-spacing: -.01em; }
.shelf-title span { background: var(--yellow); border: var(--bw) solid var(--ink); box-shadow: var(--sh); padding: 2px .18em 4px; display: inline-block; transform: rotate(-1deg); }
.shelf-sub { margin: 14px 0 0; font-weight: 600; font-size: 17px; }
.shelf-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px 26px; }
.album-grid.nested { margin-bottom: 34px; }
.album-card .body { display: flex; flex-direction: column; }
.album-card .stack { position: relative; aspect-ratio: 1.45 / 1; overflow: hidden; background:
  repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0 2px, transparent 2px 12px), var(--paper); border-bottom: var(--bw) solid var(--ink); }
.photo { position: absolute; width: 50%; aspect-ratio: 4 / 5; background: #e6e1d6; border: var(--bw) solid var(--ink); box-shadow: 4px 4px 0 var(--ink); overflow: hidden; transition: transform .2s ease; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.is-empty { background: repeating-linear-gradient(-45deg, #ece7dc 0 8px, #e1dbcf 8px 16px); }
.photo.p-left { left: 9%; top: 16%; transform: rotate(-9deg); }
.photo.p-right { right: 9%; top: 16%; transform: rotate(8deg); }
.photo.p-front { left: 25%; top: 9%; transform: rotate(-1deg); z-index: 2; }
a.album-card:hover .p-left { transform: rotate(-13deg) translate(-8px, -2px); }
a.album-card:hover .p-right { transform: rotate(12deg) translate(8px, -2px); }
a.album-card:hover .p-front { transform: rotate(1deg) translateY(-6px); }
.play-mini { position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; background: var(--pink); border: 2px solid var(--ink); }
.play-mini::after { content: ""; position: absolute; left: 8px; top: 5px; border-left: 10px solid var(--ink); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.card-foot { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; }
.card-meta { flex: 1; min-width: 0; }
.card-meta b { display: block; font: 700 16px/1.2 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.nb-chip.go { width: 36px; height: 36px; flex-basis: 36px; }
.album-card.is-error .card-meta small { color: #b0303a; }
.album-card.is-loading .photo { animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { filter: brightness(1); } to { filter: brightness(.92); } }

/* ---- album page ---- */
.album-head { --accent: var(--yellow); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; padding: 16px; background: var(--accent); border: var(--bw) solid var(--ink); box-shadow: var(--sh); }
.album-head .back { width: 52px; height: 52px; padding: 0; }
.album-head-text { flex: 1; min-width: 0; }
.album-title { font: 400 clamp(28px, 4.2vw, 58px)/1 var(--head); text-transform: uppercase; margin: 8px 0 0; overflow-wrap: anywhere; }
.section-label { font: 400 20px/1 var(--head); text-transform: uppercase; margin: 0 0 4px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.media-tile { position: relative; aspect-ratio: 1; padding: 0; border: var(--bw) solid var(--ink); background: #e6e1d6; box-shadow: var(--sh-sm); cursor: pointer; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.media-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tile:hover { transform: translate(-3px, -3px); box-shadow: var(--sh); }
.media-tile:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.media-tile.no-thumb img { display: none; }
.play-badge { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; background: var(--pink); border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm); }
.play-badge::after { content: ""; position: absolute; left: 20px; top: 14px; border-left: 18px solid var(--ink); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.duration { position: absolute; right: 8px; bottom: 8px; background: var(--yellow); border: 2px solid var(--ink); font: 700 12px/1 var(--mono); padding: 4px 6px; }
.media-skel { aspect-ratio: 1; border: var(--bw) solid var(--ink); background: repeating-linear-gradient(-45deg, #ece7dc 0 8px, #e1dbcf 8px 16px); animation: pulse 1.2s ease-in-out infinite alternate; }

/* lightbox + video */
body.lb-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(20, 18, 14, .92); display: flex; align-items: center; justify-content: center; padding: 70px 80px; }
.viewer-fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.viewer-fig img { max-width: 100%; max-height: calc(100vh - 170px); border: var(--bw) solid var(--ink); box-shadow: 8px 8px 0 var(--yellow); background: #fff; }
.viewer-caption { background: var(--paper); border: var(--bw) solid var(--ink); padding: 6px 10px; font-weight: 700; font-size: 14px; }
.viewer-close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; padding: 0; font-size: 20px; }
.viewer-nav { position: absolute; top: 50%; width: 54px; height: 54px; padding: 0; margin-top: -27px; font-size: 30px; background: var(--yellow); }
.viewer-nav.prev { left: 16px; } .viewer-nav.next { right: 16px; }
.video-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.video-backdrop { position: absolute; inset: 0; background: rgba(20, 18, 14, .88); }
.video-sheet { position: relative; width: min(1100px, 100%); background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: 10px 10px 0 var(--pink); }
.video-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: var(--bw) solid var(--ink); background: var(--yellow); }
.video-title { margin: 0; font: 400 18px/1.2 var(--head); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-stage video { display: block; width: 100%; max-height: 75vh; background: #000; }

@media (max-width: 640px) {
  .shelf { padding-top: 18px; }
  .album-grid { grid-template-columns: 1fr 1fr; gap: 26px 14px; }
  .album-card .tab { font-size: 11px; padding: 0 8px; height: 28px; top: -25px; }
  .nb-card { margin-top: 25px; }
  .album-card .stack { aspect-ratio: 1.15 / 1; }
  .photo { box-shadow: 2px 2px 0 var(--ink); border-width: 2px; }
  .card-foot { padding: 8px; gap: 8px; }
  .card-foot .nb-chip.white { display: none; }
  .card-meta b { font-size: 13px; }
  .card-meta small { font-size: 11px; }
  .nb-chip.go { width: 28px; height: 28px; flex-basis: 28px; }
  .nb-chip.go svg { width: 14px; height: 14px; }
  .nb-card .body { box-shadow: 4px 4px 0 var(--ink); }
  .media-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .media-tile { border-width: 2px; box-shadow: 2px 2px 0 var(--ink); }
  .play-badge { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .play-badge::after { left: 12px; top: 8px; border-left-width: 12px; border-top-width: 7px; border-bottom-width: 7px; }
  .album-head { padding: 12px; gap: 12px; }
  .album-head .back { width: 44px; height: 44px; }
  .viewer { padding: 64px 10px; }
  .viewer-nav { top: auto; bottom: 14px; margin: 0; }
}

/* ---------- Bio pages ---------- */
.bio-desc { margin: 10px 0 0; font-weight: 600; max-width: 70ch; }
.subgrid + .subgrid { margin-top: 34px; }
.card-badge { position: absolute; left: 10px; top: 10px; z-index: 3; }
.media-tile { color: var(--ink); text-decoration: none; }
.media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; background: #222; }
.media-tile.is-doc, .media-tile.is-audio { display: grid; place-items: center; background: var(--yellow); }
.media-tile.is-audio { background: var(--purple); color: #fff; }
.tile-ico svg { width: 46px; height: 46px; }
.tile-type { position: absolute; left: 8px; top: 8px; font: 700 11px/1 var(--body); letter-spacing: .08em; border: 2px solid var(--ink); background: #fff; color: var(--ink); padding: 4px 6px; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; background: var(--paper); color: var(--ink); border-top: var(--bw) solid var(--ink); font: 700 12px/1.25 var(--body); padding: 5px 8px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-tile .tile-cap ~ .duration, .media-tile.is-video .tile-cap + .duration { bottom: 34px; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.link-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 0; text-decoration: none; background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh); border-left: 12px solid var(--accent); }
.link-card:hover { transform: translate(-2px, -2px); box-shadow: var(--sh-lg); }
.lc-meta { flex: 1; min-width: 0; }
.lc-meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-meta small { display: block; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-cap { margin: 0; padding: 10px 12px; border-top: var(--bw) solid var(--ink); font-weight: 600; }
.video-stage audio { display: block; width: 100%; padding: 24px 16px; }
@media (max-width: 640px) { .tile-cap { font-size: 10px; padding: 3px 5px; border-top-width: 2px; } .link-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .album-head .album-head-text { flex: 1 1 calc(100% - 60px); }
  .album-head .shelf-meta { flex: 1 1 100%; }
  .album-title { font-size: clamp(26px, 8.4vw, 40px); overflow-wrap: normal; word-break: normal; }
  .bio-desc { font-size: 14px; }
}
