/* ═══ THE MARKS + THE WORK ════════════════════════════════════════
   The portfolio layer. Loaded after sos.css; same tokens, same three
   grounds. Marks live on NIGHT SHIFT because they were drawn as white
   one-colour ink. Work lives on PAPER because it was drawn to print.

   Column counts are DECLARED, never auto-fit. 15 marks stack 5x3 on
   desktop and 3x5 on tablet — both exact, no orphan row. Grid lines
   are drawn per CELL (box-shadow ring) so a part-filled trailing row
   leaves black, not a slab of container colour.

   A tile only turns to PAPER once its image has actually loaded. A
   grid of blank cream squares reads as broken; a grid of dark cells
   reads as a wall waiting to be hung.

   NO mix-blend-mode anywhere. Ninety blended pseudo-elements plus a
   fixed full-viewport blended overlay pushed the whole page into one
   composited layer and froze the renderer on scroll. Grain is plain
   opacity now — it looks the same and it scrolls.
   ════════════════════════════════════════════════════════════════ */

/* ── THE MARKS — fifteen, so 5 x 3 ── */
.marks{display:grid;grid-template-columns:repeat(5,1fr);
  gap:1px;background:var(--black);border:1px solid var(--rule)}
@media(max-width:940px){.marks{grid-template-columns:repeat(3,1fr)}}
@media(max-width:520px){.marks{grid-template-columns:repeat(3,1fr)}}
.mark{background:var(--black);display:grid;place-items:center;
  padding:26px 22px;min-height:124px;box-shadow:0 0 0 1px var(--rule2);
  transition:background .35s ease}
.mark img{max-width:100%;max-height:64px;width:auto;object-fit:contain;
  opacity:.5;filter:grayscale(1);
  transition:opacity .4s ease,filter .4s ease,transform .5s cubic-bezier(.2,1.3,.4,1)}
.mark:hover{background:var(--black2)}
.mark:hover img{opacity:1;filter:none;transform:scale(1.06)}
.marks-note{margin-top:16px;font-family:var(--type);font-size:12px;color:var(--dim);letter-spacing:.04em}

/* ── THE WORK — a specimen wall ──
   Uniform square plates, artwork CONTAINED not cropped. A menu with its
   edge cut off is not a portfolio piece, it is a texture.
   dense packing so a 2-wide panorama never punches a hole in the grid. */
.work{display:grid;grid-template-columns:repeat(5,1fr);grid-auto-flow:row dense;
  gap:2px;background:var(--black);border:1px solid var(--rule)}
@media(max-width:1080px){.work{grid-template-columns:repeat(4,1fr)}}
@media(max-width:820px){.work{grid-template-columns:repeat(3,1fr)}}
@media(max-width:560px){.work{grid-template-columns:repeat(2,1fr)}}
.wk{margin:0;position:relative;background:var(--black2);aspect-ratio:1/1;
  overflow:hidden;box-shadow:0 0 0 1px var(--rule2);
  content-visibility:auto;contain-intrinsic-size:220px 220px;
  transition:background .45s ease}
.wk.ready{background:var(--paper)}
/* a panorama gets a plate its own shape, not a ribbon floating in a box */
.wk.wide{grid-column:span 2;aspect-ratio:2/1;contain-intrinsic-size:440px 220px}
@media(max-width:560px){.wk.wide{grid-column:span 2;aspect-ratio:2/1}}
.wk img{width:100%;height:100%;object-fit:contain;padding:13px;display:block;
  opacity:0;transition:opacity .45s ease,transform .7s cubic-bezier(.2,.7,.3,1)}
.wk.ready img{opacity:1}
.wk figcaption{position:absolute;left:0;right:0;bottom:0;z-index:2;
  padding:8px 10px;font-family:var(--goth);font-weight:600;font-size:9.5px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--sand);
  background:rgba(8,7,6,.93);border-top:1px solid var(--rule);
  transform:translateY(101%);transition:transform .3s cubic-bezier(.2,.7,.3,1);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wk:hover img{transform:scale(1.05)}
.wk:hover figcaption,.wk:focus-within figcaption{transform:none}
/* touch and coarse pointers never get :hover — show the caption there */
@media(hover:none){.wk.ready figcaption{transform:none}}
@media(prefers-reduced-motion:reduce){
  .wk,.wk img,.wk figcaption,.mark img{transition:none}
  .wk.ready figcaption{transform:none}
}

/* the count, stated plainly */
.tally{display:flex;flex-wrap:wrap;gap:0 44px;margin-top:34px;padding-top:22px;
  border-top:1px solid var(--rule)}
.tally div{padding:8px 0}
.tally b{display:block;font-family:var(--fat);font-weight:800;color:var(--gold);
  font-size:clamp(26px,3.4vw,40px);line-height:1}
.tally span{font-family:var(--goth);font-size:10.5px;letter-spacing:.2em;
  text-transform:uppercase;color:var(--dim)}
