@font-face {
  font-family: "Seth Hand";
  src: url("assets/fonts/SethHand.otf?v=5") format("opentype");
  font-display: swap;
}

:root {
  --mat: #1f5c3b;
  --mat-line: #e4d65b;
  --paper: #fbf8f1;
  --ink: #1d1d1b;
  --muted: #5f5b52;
  --pen: #2b59c3;
  --note: #ffe57a;
  --margin: 56px;
  /* The lamp: just off the top-left of the screen, warm (~2700K) */
  --lx: 12%;
  --ly: -8%;
  --shadow: 32, 20, 6;
  --type: "Courier Prime", ui-monospace, Menlo, monospace;
  /* Work uses the same typewriter face as the Anatomage line */
  --sans: var(--type);
  --mono: var(--type);
  /* Your handwriting, traced into a font (alternates between two versions of each lowercase letter) */
  /* Seth's own handwriting stays on titles (and the menu, which uses traced images) */
  --title-font: "Seth Hand", "Karla", cursive;
  /* Clean, warm sans for stickers, tabs and notes */
  --sticker-font: "Karla", system-ui, sans-serif;
  --sticker-scale: .5;
  --hand: "Caveat", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--mat);
  color: var(--ink);
  font-family: var(--type);
  min-height: 100vh;
  overflow-x: hidden;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Layers: mat 0, pile 1, email 1, sheet 2, note 40, flying stickers 60, light 70 */
#mat { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; display: block; z-index: 0; opacity: 0; transition: opacity .4s ease; }
#mat.ready { opacity: 1; }
#pile, #fly { position: fixed; inset: 0; pointer-events: none; }
#pile { z-index: 3; } /* landed stickers sit on the mat and on the paper */
#fly { z-index: 60; }

/* ---------- One warm lamp lighting everything ---------- */
#light-falloff, #light-warm {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}
/* Light falls off with distance from the lamp; far corners go warm-dark */
#light-falloff {
  mix-blend-mode: multiply;
  background: radial-gradient(ellipse 110% 125% at var(--lx) var(--ly),
    #ffffff 0%, #fffaf1 30%, #ecdcc2 64%, #b9a385 100%);
}
/* Warm cast, strongest near the lamp */
#light-warm {
  mix-blend-mode: soft-light;
  background:
    radial-gradient(ellipse 65% 75% at var(--lx) var(--ly),
      rgba(255, 200, 130, .75) 0%, rgba(255, 190, 115, .28) 40%, rgba(255, 190, 115, 0) 72%),
    rgba(255, 180, 105, .10);
}

/* ---------- Paper ---------- */
/* The desk holds a stack of sheets: the cover on top, project sheets underneath */
.desk {
  position: relative;
  z-index: 2;
  width: calc(100% - 2 * var(--margin));
  max-width: 1080px;
  min-height: calc(100vh - var(--margin));
  margin: var(--margin) auto 0;
}

.sheet {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  min-height: calc(100vh - var(--margin));
  padding: clamp(28px, 6vw, 88px) clamp(28px, 7vw, 104px);
  background-color: var(--paper);
  background-image:
    /* uneven light: brighter top-left, falling off to the bottom-right */
    radial-gradient(120% 90% at 22% 12%, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 60%),
    /* the sheet isn't perfectly flat: a faint bow catches the light */
    linear-gradient(112deg, rgba(0,0,0,0) 30%, rgba(255,255,255,.16) 46%, rgba(0,0,0,0) 58%, rgba(60,40,10,.035) 80%, rgba(0,0,0,0) 100%),
    /* long fibres */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='420'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .25  0 0 0 -1.6 .9'/></filter><rect width='100%' height='100%' filter='url(%23f)' opacity='.10'/></svg>"),
    /* blotchy pulp density */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='.006' numOctaves='3' seed='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .42  0 0 0 0 .28  0 0 0 1.4 -.55'/></filter><rect width='100%' height='100%' filter='url(%23b)' opacity='.14'/></svg>");
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .85),
    inset -1px -1px 0 rgba(110, 90, 50, .10),
    /* shadows fall down-right, away from the lamp */
    /* lying flat: just a thin contact shadow where the edge meets the mat */
    .5px .8px .6px rgba(var(--shadow), .5),
    1.5px 2.5px 3px rgba(var(--shadow), .16);
  display: flex;
  flex-direction: column;
  isolation: isolate;
  /* not quite square to the mat, and each sheet a little differently */
  rotate: var(--tilt, -.4deg);
}
/* Paper tooth: lit noise gives the surface a slight emboss */
.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: .22;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='t' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' seed='11' stitchTiles='stitch' result='n'/><feDiffuseLighting in='n' surfaceScale='1.6' lighting-color='%23ffffff' diffuseConstant='1.05'><feDistantLight azimuth='225' elevation='66'/></feDiffuseLighting></filter><rect width='100%' height='100%' filter='url(%23t)'/></svg>");
}
/* Specks and a slightly darker deckle along the edges */
.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='520' height='520'><filter id='s'><feTurbulence type='fractalNoise' baseFrequency='.5' numOctaves='1' seed='19' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .25  0 0 0 0 .2  0 0 0 0 .12  0 0 0 -18 4.4'/></filter><rect width='100%' height='100%' filter='url(%23s)' opacity='.35'/></svg>");
  box-shadow: inset 0 0 18px rgba(120, 100, 60, .10);
}

/* The cover reads like a letter: start near the top-left, not floating in the middle */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: clamp(28px, 11vh, 120px);
  max-width: 64%;
}

.intro {
  margin: 0;
  font-weight: 400;
  font-size: clamp(26px, 4vw, 56px);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: #262421;
  text-shadow: 0 0 .6px rgba(38, 36, 33, .45);
}
.intro .line { display: block; height: 1.62em; white-space: nowrap; }
.intro .line + .line { margin-top: .12em; }

/* Handwriting images: 115px frame, 25px caps, baseline 34px from the bottom */
.hw {
  --cap: .62em;
  display: inline-block;
  height: calc(var(--cap) * 4.6);
  width: auto;
  vertical-align: calc(var(--cap) * -1.36);
  margin: calc(var(--cap) * -2.1) 0 calc(var(--cap) * -0.9);
  mix-blend-mode: multiply;
  opacity: .93;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Red-pen note in the top-right corner of the cover, with arrows to the stickers */
:root { --red-pen: #c4352a; }
.hint {
  position: absolute;
  top: clamp(36px, 8vh, 84px);
  right: clamp(32px, 7vw, 96px);
  z-index: 2;
  margin: 0;
  font-size: clamp(22px, 2.3vw, 32px);
  transform: rotate(-5deg);
  transition: opacity .6s ease;
}
.hint-ink {
  display: block;
  height: calc(.62em * 4.6);
  aspect-ratio: 370 / 116;
  margin: calc(.62em * -2.1) 0 calc(.62em * -0.9);
  background: var(--red-pen);
  -webkit-mask: url("assets/hand/hint.svg") center / contain no-repeat;
          mask: url("assets/hand/hint.svg") center / contain no-repeat;
  mix-blend-mode: multiply;
  opacity: .92;
}
.hint-arrows {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
  transition: opacity .6s ease;
}
.hint-arrows path {
  fill: none;
  stroke: var(--red-pen);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .9;
}
.hint.gone, .hint.gone + .hint-arrows { opacity: 0; }

/* "Currently" sits at the foot of the sheet, under the introduction */
.current {
  margin: auto 0 0;
  padding-top: 48px;
  max-width: 44ch;
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.6;
  color: #4a463e;
}
.current p { margin: 0; }
.current .current-label {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.current strong { color: var(--ink); }

/* A photo taped to the right side of the sheet, balancing the handwriting on the left */
.polaroid {
  position: absolute;
  right: clamp(36px, 7vw, 104px);
  bottom: clamp(90px, 16vh, 170px);
  width: clamp(170px, 19vw, 250px);
  margin: 0;
  padding: 10px 10px 0;
  background: #fdfcf8;
  box-shadow: .5px .8px .6px rgba(var(--shadow), .45), 2px 4px 7px rgba(var(--shadow), .16);
  rotate: 3.5deg;
  z-index: 1;
}
.polaroid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(.92) contrast(.97); }
/* no caption: just the blank strip along the bottom, like a real instant photo */
.polaroid { padding-bottom: clamp(30px, 3.4vw, 44px); }
.polaroid figcaption {
  padding: 10px 2px 12px;
  font-family: var(--sticker-font);
  font-size: clamp(13px, 1.15vw, 15px);
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  color: #2b2926;
}
.polaroid .tape { top: -12px; left: 50%; translate: -50% 0; rotate: -4deg; width: 92px; }

/* Bottom of the sheet: where else to find me */
.sheet-foot {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
  color: var(--muted);
}
.sheet-foot a { color: #3a3733; text-decoration: none; border-bottom: 1px solid rgba(43, 41, 38, .3); }
.sheet-foot a:hover, .sheet-foot a:focus-visible { color: var(--ink); border-bottom-color: var(--ink); outline: none; }

/* ---------- Stickers ---------- */
.slot {
  display: inline-block;
  position: relative;
  width: var(--slot-w, 8em);
  height: 1.3em;
  margin-left: .42em;
  /* centre the sticker on the handwritten capitals */
  vertical-align: -.56em;
  border-radius: 10px;
  /* faint adhesive residue, visible between peel and slap */
  background: rgba(60, 50, 20, .045);
}

.sticker {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  padding: 0; margin: 0; border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  /* tight contact shadow plus a faint spread: stickers sit almost flat */
  /* stuck flat: only a hairline where the edge meets the paper */
  filter: drop-shadow(.3px .45px .25px rgba(var(--shadow), .3));
}
.sticker:active { cursor: grabbing; }
.sticker:focus-visible { outline: 2px dashed var(--ink); outline-offset: 6px; }

.sticker .face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background-color: var(--bg);
  /* label stock: fine grain plus a few longer paper fibres */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' seed='5' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .2  0 0 0 0 .18  0 0 0 0 .14  0 0 0 .3 -.06'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.035 .5' numOctaves='2' seed='13' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.6 -.95'/></filter><rect width='100%' height='100%' filter='url(%23f)' opacity='.35'/></svg>");
  background-blend-mode: multiply, screen;
  /* just a whisper of an edge, no bevel */
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .07);
  color: var(--fg);
  font-family: var(--sticker-font);
  font-weight: 500;
  letter-spacing: -.005em;
  font-size: var(--sticker-fs, .6em);
  white-space: nowrap;
  overflow: hidden;
}
/* marker ink: soaks into the label rather than sitting on top */
.sticker .txt {
  display: inline-block;
  transform: translateY(.02em);
  opacity: .92;
  mix-blend-mode: var(--ink-blend, multiply);
}
/* surface finish: a soft sheen on gloss labels, almost none on matte ones */
.sticker .face::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(165deg, rgba(255,255,255,var(--sheen, .18)) 0%, rgba(255,255,255,0) 45%);
  pointer-events: none;
}

.sticker .flapwrap {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 100%;
  display: none;
  pointer-events: none;
  filter: drop-shadow(-1px -2px 2.5px rgba(0, 0, 0, .32));
}
.sticker .flap {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 100%;
  border-radius: 7px;
  transform-origin: 0 0;
  /* the adhesive side: matte, slightly grey, darker toward the fold */
  background:
    linear-gradient(135deg, rgba(255,255,255,.0) 0%, rgba(0,0,0,.0) 50%, rgba(0,0,0,.18) 100%),
    linear-gradient(var(--back, #eeebe4), var(--back, #eeebe4));
}

/* Light label stock so the black handwriting reads clearly; each colour sits well apart from the cream paper */
.v-white  { --bg: #ffffff; --fg: #1d1d1b; --sheen: .05; --back: #efeeea; }
.v-yellow { --bg: #ffe14a; --fg: #1d1d1b; --sheen: .2;  --back: #f3edd0; }
.v-pink   { --bg: #ffb3cb; --fg: #1d1d1b; --sheen: .2;  --back: #f2e6ea; }
.v-mint   { --bg: #9ee6c0; --fg: #1d1d1b; --sheen: .18; --back: #e3efe8; }
.v-sky    { --bg: #a6d2ff; --fg: #1d1d1b; --sheen: .2;  --back: #e4ecf4; }
.v-peach  { --bg: #ffc285; --fg: #1d1d1b; --sheen: .16; --back: #f3e9de; }

/* ---------- Sticky-note menu ---------- */
.note {
  position: fixed;
  z-index: 40;
  top: clamp(84px, 16vh, 150px);
  left: 0;
  width: 256px;
  /* at rest: tossed aside, tilted, more than half off the left edge */
  transform: translateX(-68%) rotate(-7deg);
  transition: transform .55s cubic-bezier(.2, .9, .25, 1.12);
  cursor: pointer;
}
.note:not([data-open="true"]):hover { transform: translateX(-62%) rotate(-5.5deg); }
/* pulled in to read, still a little crooked and still bleeding off the edge */
.note[data-open="true"] { transform: translateX(-14px) rotate(-3deg); cursor: default; }

.note-inner {
  position: relative;
  min-height: 0;
  padding: 20px 50px 18px 24px;
  background-color: var(--note);
  background-image:
    /* only the top strip is glued, so the lower part curls up and catches less light */
    linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,0) 30%, rgba(0,0,0,0) 70%, rgba(90,60,0,.10) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .25  0 0 0 0 0  0 0 0 .12 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .45),
    .5px 1px 1px rgba(var(--shadow), .3),
    /* lifted bottom edge throws a longer shadow */
    6px 18px 18px -10px rgba(var(--shadow), .55);
}
.note-inner::before { /* adhesive strip shading */
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 22px;
  background: linear-gradient(rgba(0,0,0,.05), rgba(0,0,0,0));
}

.note ul { list-style: none; margin: 0; padding: 0; }
.note li + li { margin-top: 2px; }
.note a {
  --cap: 17px;
  position: relative;
  display: inline-block;
  padding: 2px 0;
  color: var(--ink);
  text-decoration: none;
  outline: none;
}
.note a .hw { --cap: 17px; }
/* a quick pencil underline on hover */
.note a::after {
  content: "";
  position: absolute;
  left: -2px; right: -4px; bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: #2b2926;
  opacity: 0;
  transform: rotate(-1.2deg) scaleX(.2);
  transform-origin: left center;
  transition: transform .25s ease, opacity .15s ease;
}
.note a:hover::after, .note a:focus-visible::after { opacity: .8; transform: rotate(-1.2deg) scaleX(1); }

.note-tab {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 34px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
}
.note-tab { display: flex; align-items: center; justify-content: center; overflow: visible; }
.note-tab .hw { --cap: 13px; transform: rotate(90deg); }
.note-tab:focus-visible { outline: 2px dashed var(--ink); outline-offset: -4px; }

/* ---------- Email on the mat ---------- */
.email {
  position: fixed;
  z-index: 1;
  /* a strip of masking tape stuck along the mat's left edge, email typed on it */
  left: 14px;
  bottom: 28px;
  writing-mode: vertical-rl;
  transform: rotate(178.5deg);
  padding: 16px 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  color: #2b261d;
  text-decoration: none;
  background-color: rgba(236, 222, 190, .94);
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.25), rgba(255,255,255,0) 40%, rgba(80,60,20,.08)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.9 .25' numOctaves='2' seed='6' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .4  0 0 0 0 .3  0 0 0 0 .1  0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
  /* torn ends */
  clip-path: polygon(0 3px, 14% 0, 30% 4px, 47% 1px, 63% 5px, 80% 0, 100% 3px,
                     100% calc(100% - 4px), 84% 100%, 68% calc(100% - 3px), 51% 100%, 33% calc(100% - 5px), 17% calc(100% - 1px), 0 calc(100% - 4px));
  filter: drop-shadow(.5px .8px .5px rgba(var(--shadow), .45));
  transition: background-color .2s ease;
}
.email:hover, .email:focus-visible { background-color: rgba(246, 234, 204, 1); outline: none; }
.sheet-email { display: none; }

/* LinkedIn: a sticker slapped on the mat next to the email tape, there on every view */
/* LinkedIn: a pin-back button lying on the mat next to the email tape, there on every view.
   From above you only see the printed face: flat in the middle, curling down at the edge.
   The lamp is up and to the left, so the top-left edge catches light and the
   bottom-right edge rolls into shade; the shadow falls down and to the right. */
.li-sticker {
  position: fixed;
  z-index: 45;
  left: 8px;
  bottom: calc(28px + var(--email-len, 250px) + 12px);
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #2b6cb3;
  box-shadow:
    .6px 1px .8px rgba(var(--shadow), .55),
    2.5px 4px 6px rgba(var(--shadow), .28);
  rotate: -9deg;
  transition: transform .2s ease, box-shadow .2s ease;
}
/* printed logo: flat ink on the face, so it takes the same light as the rest */
.li-sticker svg { position: relative; z-index: 0; display: block; width: 25px; height: 25px; fill: #f4f7fa; }
/* shading over face and logo alike */
.li-sticker::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
  background:
    /* broad, soft falloff across the face from the lamp */
    linear-gradient(140deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .10) 100%),
    /* the rolled edge: brighter where it faces the lamp, darker where it turns away */
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, .14) 93%, rgba(0, 0, 0, .3) 100%);
  box-shadow:
    inset 1.2px 1.2px 1.2px rgba(255, 255, 255, .22),
    inset -1.5px -1.8px 2px rgba(0, 10, 30, .32);
}
.li-sticker:hover, .li-sticker:focus-visible {
  transform: translateY(-1.5px);
  box-shadow:
    1px 2px 1.5px rgba(var(--shadow), .45),
    4px 7px 10px rgba(var(--shadow), .26);
  outline: none;
}
.li-sticker:focus-visible { outline: 2px dashed rgba(240, 232, 205, .9); outline-offset: 5px; }

/* ---------- Views: hello (cover), Work (cards), a project page ---------- */
.sheet:not(.is-active), .work-view:not(.is-active), .resume-view:not(.is-active), .play-view:not(.is-active) { visibility: hidden; }
.is-moving { visibility: visible !important; }

/* The way into Work: a round red badge floating above everything (part of the interface, not the desk) */
.work-badge {
  position: fixed;
  right: clamp(18px, 3vw, 40px);
  bottom: clamp(18px, 4vh, 40px);
  z-index: 80;
  width: clamp(112px, 11vw, 148px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  filter: drop-shadow(0 6px 14px rgba(120, 20, 10, .35)) drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
  transition: transform .35s cubic-bezier(.2, .9, .25, 1.4);
  -webkit-tap-highlight-color: transparent;
}
.work-badge svg { display: block; width: 100%; height: 100%; overflow: visible; }
.badge-face { fill: #e2372b; transition: fill .2s ease; }
.badge-ring {
  transform-origin: 60px 60px;
  animation: badge-spin 16s linear infinite;
}
.badge-ring text {
  fill: #fff;
  font-family: var(--type);
  font-size: 12.5px;
  font-weight: 700;
}
.badge-arrow {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .35s cubic-bezier(.2, .9, .25, 1.4);
}
.work-badge:hover, .work-badge:focus-visible { transform: scale(1.08) rotate(-4deg); outline: none; }
.work-badge:hover .badge-face, .work-badge:focus-visible .badge-face { fill: #c92a1f; }
.work-badge:hover .badge-ring { animation-duration: 5s; }
.work-badge:hover .badge-arrow, .work-badge:focus-visible .badge-arrow { transform: translateX(5px); }
.work-badge:focus-visible .badge-face { stroke: #fff; stroke-width: 3; }
.work-badge:active { transform: scale(.96); }
body:not([data-view="cover"]) .work-badge { visibility: hidden; opacity: 0; }
@keyframes badge-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .badge-ring { animation: none; } }

/* ---------- Work: project cards laid out on the mat ---------- */
.work-view {
  --card-w: min(500px, 82vw, calc(100vw - 280px));
  --cut-h: clamp(190px, calc(100vh - 470px), 380px);
  --gap: clamp(28px, 5vw, 64px);
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  min-height: calc(100vh - var(--margin));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 3vh, 32px);
  padding: 8px 0 28px;
  overflow: hidden;
  font-family: var(--type);
  color: #262421;
}
.work-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1080px, calc(100% - 2 * var(--margin) - 60px));
  margin: 0 auto;
}
.work-bar .back {
  justify-self: start;
  padding: 6px 10px;
  border: 0;
  background: rgba(236, 222, 190, .94);
  cursor: pointer;
  font: 700 15px var(--type);
  color: #2b261d;
  clip-path: polygon(2px 0, 100% 2px, calc(100% - 2px) 100%, 0 calc(100% - 1px));
  transform: rotate(-1.5deg);
}
.work-bar .back:hover, .work-bar .back:focus-visible { background: rgba(246, 234, 204, 1); outline: none; }
/* label on a strip of masking tape, like everything else on the mat */
.work-title {
  margin: 0;
  padding: 7px 18px 6px;
  background: rgba(236, 222, 190, .94);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #2b261d;
  transform: rotate(1deg);
  clip-path: polygon(0 3px, 20% 0, 45% 2px, 70% 0, 100% 3px, 100% calc(100% - 2px), 78% 100%, 50% calc(100% - 3px), 24% 100%, 0 calc(100% - 2px));
  filter: drop-shadow(.4px .6px .4px rgba(var(--shadow), .35));
}

.track-wrap { position: relative; width: 100%; touch-action: pan-y; cursor: grab; }
.track-wrap:active { cursor: grabbing; }
.track {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  padding-inline: calc((100vw - var(--card-w)) / 2);
  will-change: transform;
}

.card {
  flex: 0 0 var(--card-w);
  position: relative;
  display: flex;
  flex-direction: column;
  transform: rotate(var(--r, 0deg)) scale(.86);
  opacity: .8;
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .55s ease;
}
.card.is-current { transform: rotate(var(--rc, 0deg)); opacity: 1; }

/* The product, cut out of a print with scissors and lying on the mat */
.card-cut {
  position: relative;
  margin: 0;
  height: var(--cut-h);
  display: grid;
  place-items: center;
}
.card-cut img {
  max-width: 100%;
  max-height: var(--cut-h);
  width: auto;
  height: auto;
  user-select: none;
  /* a thin print lying flat: contact shadow plus a little lift at the edges */
  filter: drop-shadow(.6px 1px .6px rgba(var(--shadow), .5)) drop-shadow(2px 4px 5px rgba(var(--shadow), .2));
  rotate: calc(var(--rc, 0deg) * -2);
}
.card-cut.no-cut img, .card-cut.no-cut video { width: 100%; height: 100%; object-fit: cover; }

/* Title on a strip of masking tape, stuck across the bottom of the cutout */
.card-title {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin: -34px 0 0 4%;
  font-family: var(--title-font);
  font-size: clamp(34px, 3.6vw, 48px);
  font-weight: 400;
  line-height: 1;
  rotate: -3deg;
}
.card-title span {
  display: inline-block;
  padding: 10px 26px 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 40%, rgba(120, 95, 50, .06)),
    rgba(234, 220, 186, .93);
  color: #24211c;
  clip-path: polygon(0 4px, 6px 0, 30% 3px, 55% 0, 80% 2px, calc(100% - 5px) 0, 100% 5px, calc(100% - 3px) 50%, 100% calc(100% - 4px), 75% 100%, 48% calc(100% - 3px), 20% 100%, 4px calc(100% - 2px), 0 55%);
  filter: drop-shadow(.4px .6px .4px rgba(var(--shadow), .3));
}

/* A small slip of paper with the one-liner, and a coloured tab to open it */
.card-slip {
  position: relative;
  align-self: flex-end;
  width: 86%;
  margin-top: 26px;
  padding: 16px 22px 20px;
  background-color: #fbf8f1;
  background-image:
    radial-gradient(120% 90% at 22% 12%, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .25  0 0 0 0 .15  0 0 0 .1 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
  box-shadow: .5px .8px .7px rgba(var(--shadow), .45), 2px 4px 6px rgba(var(--shadow), .14);
  rotate: 1.2deg;
}
.card-num {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-line {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: #3a3733;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

/* Coloured paper tab, written by hand (also used for links on project pages) */
.card-more {
  --tab: #f4b9a0;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 16px 8px 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .04)),
    var(--tab);
  border-radius: 3px 10px 9px 2px / 2px 6px 8px 3px;
  font-family: var(--sticker-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #2a2420;
  text-decoration: none;
  box-shadow: .5px .8px .6px rgba(var(--shadow), .4), 1.5px 3px 5px rgba(var(--shadow), .14);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-more span { font-family: var(--sticker-font); font-size: 16px; transition: transform .2s ease; }
.card-more:hover, .card-more:focus-visible {
  transform: translate(-1px, -2px) rotate(-1deg);
  box-shadow: .5px .8px .6px rgba(var(--shadow), .35), 3px 6px 9px rgba(var(--shadow), .18);
  outline: none;
}
.card-more:hover span, .card-more:focus-visible span { transform: translateX(3px); }
.card .card-more { --tab: inherit; }
.card-slip .card-more {
  position: absolute;
  right: -20px;
  bottom: -16px;
  rotate: -2.5deg;
}
.card:not(.is-current) .card-more { pointer-events: none; }

/* Big arrows either side of the project image */
.card-arrow {
  position: absolute;
  z-index: 3;
  top: calc(var(--cut-h) / 2);
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #fffdf6, #efe6cf 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), .6px 1px .8px rgba(var(--shadow), .5), 3px 6px 10px rgba(var(--shadow), .28);
  color: #24211c;
  cursor: pointer;
  translate: 0 -50%;
  transition: transform .2s cubic-bezier(.2, .9, .25, 1.4), box-shadow .2s ease;
}
.card-arrow svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.card-arrow.prev { left: max(108px, calc(50% - var(--card-w) / 2 - 86px)); } /* clear of the menu note */
.card-arrow.next { right: max(28px, calc(50% - var(--card-w) / 2 - 86px)); }
.card-arrow:hover, .card-arrow:focus-visible { transform: scale(1.08); outline: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 1px 2px 1.5px rgba(var(--shadow), .4), 5px 10px 14px rgba(var(--shadow), .26); }
.card-arrow.prev:hover svg { transform: translateX(-2px); }
.card-arrow.next:hover svg { transform: translateX(2px); }
.card-arrow svg { transition: transform .2s ease; }
.card-arrow:focus-visible { outline: 2px dashed rgba(240, 232, 205, .9); outline-offset: 4px; }
.card-arrow:active { transform: scale(.95); }

/* Dots: one per project, the current one filled in */
.dots-row { display: flex; justify-content: center; align-items: center; gap: 18px; }
.dots { display: flex; gap: 12px; }
.dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1.5px solid rgba(240, 232, 205, .85);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color .25s ease, transform .25s ease;
}
.dot:hover { transform: scale(1.2); }
.dot[aria-current="true"] { background: rgba(240, 232, 205, .95); }
.dot:focus-visible, .arrow:focus-visible { outline: 2px dashed rgba(240, 232, 205, .9); outline-offset: 3px; }
.arrow {
  width: 34px;
  height: 30px;
  border: 0;
  background: none;
  cursor: pointer;
  font: 700 20px var(--type);
  color: rgba(240, 232, 205, .9);
}

/* ---------- Full project page ---------- */
.project-page { font-family: var(--type); color: #262421; }
/* Back to Work: a strip of masking tape that stays pinned at the top while you read */
.project-page .back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 9px 14px;
  border: 0;
  cursor: pointer;
  font: 700 16px var(--type);
  color: #2b261d;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 40%, rgba(120, 95, 50, .06)),
    rgba(232, 214, 172, .97);
  clip-path: polygon(0 3px, 18% 0, 45% 2px, 70% 0, 100% 3px, calc(100% - 3px) 50%, 100% calc(100% - 2px), 78% 100%, 50% calc(100% - 3px), 24% 100%, 0 calc(100% - 2px), 3px 50%);
  filter: drop-shadow(.5px .8px .5px rgba(var(--shadow), .4));
  rotate: -1.5deg;
  transition: transform .2s ease, background-color .2s ease;
}
.project-page .back span { font-size: 20px; line-height: 1; transition: transform .2s ease; }
.project-page .back:hover, .project-page .back:focus-visible { transform: translateY(-1px); outline: none; }
.project-page .back:hover span, .project-page .back:focus-visible span { transform: translateX(-4px); }
.project-page .back:focus-visible { outline: 2px dashed #2b261d; outline-offset: 4px; }
.project-page .back-top { position: sticky; top: 14px; z-index: 5; margin-top: -8px; }
.project-page .back-end { margin: 8px 0 8px; }
.proj-name { margin: 22px 0 0; font-family: var(--title-font); font-size: clamp(48px, 7vw, 84px); font-weight: 400; line-height: 1; }
.proj-summary { margin: 10px 0 0; max-width: 46ch; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; color: #3a3733; }
.proj-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 230px);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(28px, 4vw, 44px);
}
.meta { margin: 0; display: grid; gap: 14px; }
.meta a { color: #262421; text-underline-offset: 3px; }
.proj-top.solo { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.proj-sub { margin: 6px 0 0; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.proj-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 3vw, 36px); }
.notes:empty { display: none; }
.meta div { border-top: 1px solid rgba(43, 41, 38, .3); padding-top: 8px; }
.meta dt { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 4px 0 0; font-size: 15px; line-height: 1.45; }

.print {
  position: relative;
  margin: 0;
  padding: 10px 10px 8px;
  background: #fdfcf8;
  box-shadow: .4px .7px .5px rgba(var(--shadow), .4), 0 0 0 .5px rgba(0, 0, 0, .06);
  rotate: var(--r, 0deg);
}
.print img, .print .ph { display: block; width: 100%; aspect-ratio: var(--ar, 16 / 10); object-fit: cover; }
.print .ph {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(-45deg, rgba(43,41,38,.07) 0 1px, transparent 1px 9px), #ecebe5;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a8579;
}
.print figcaption { margin-top: 7px; font-size: 13px; color: #5f5b52; }
.tape {
  position: absolute;
  top: -11px;
  width: 84px;
  height: 24px;
  background: rgba(236, 222, 190, .82);
  clip-path: polygon(0 2px, 18% 0, 40% 3px, 63% 0, 84% 2px, 100% 0, 100% 100%, 80% calc(100% - 3px), 58% 100%, 35% calc(100% - 2px), 14% 100%, 0 calc(100% - 3px));
}
.tape.l { left: 6%; rotate: -6deg; }
.tape.r { right: 6%; rotate: 5deg; }
.hero-print { --r: -.5deg; }

.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(20px, 3vw, 44px);
  margin: clamp(36px, 5vw, 60px) 0;
}
.notes h3 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(43, 41, 38, .35);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.notes p { margin: 0; font-size: 15px; line-height: 1.65; color: #3a3733; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); margin-bottom: clamp(40px, 6vw, 72px); }
.gallery .print { --ar: 1; }
.print video { display: block; width: 100%; aspect-ratio: var(--ar, 16 / 10); object-fit: cover; background: #111; }
/* diagrams and drawings are shown whole, never cropped */
.print.contain img { object-fit: contain; background: #fff; }
.gallery .print.is-video { --ar: 1; }
.gallery .print:nth-child(1) { --r: 1deg; }
.gallery .print:nth-child(2) { --r: -.8deg; }
.gallery .print:nth-child(3) { --r: .6deg; }

/* ---------- Résumé: a portable printer on the mat ---------- */
.resume-view {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  min-height: calc(100vh - var(--margin));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3vh, 30px);
  padding: 8px 0 120px;
  font-family: var(--type);
  color: #262421;
}
.press {
  --pw: min(600px, 90vw);
  position: relative;
  width: var(--pw);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.printer {
  position: relative;
  z-index: 2;
  width: 100%;
  border-radius: 22px 22px 16px 16px;
  /* resting on the mat: tight contact shadow plus a soft one falling down-right, away from the lamp */
  filter: drop-shadow(1px 2px 1.5px rgba(var(--shadow), .55)) drop-shadow(6px 14px 16px rgba(var(--shadow), .35));
}
/* Top face: matte black plastic, a touch lighter where the lamp hits */
.pr-top {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 2.4vw, 24px);
  padding: clamp(16px, 2.6vw, 24px) clamp(18px, 3vw, 30px);
  border-radius: 22px 22px 6px 6px;
  background:
    radial-gradient(140% 120% at 18% 0%, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #2c2c2f, #1f1f22 70%, #1a1a1d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 1px 0 0 rgba(255, 255, 255, .05),
    inset 0 -1px 0 rgba(0, 0, 0, .5);
}
/* fine matte texture */
.pr-top::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.pr-brand {
  font: 700 12px/1 var(--type);
  letter-spacing: .16em;
  color: rgba(255, 255, 255, .28);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .6);
  writing-mode: vertical-rl;
  rotate: 180deg;
}
/* The screen: a small dark display behind glass, set into the plastic */
.pr-screen {
  position: relative;
  min-width: 0;
  padding: 10px 14px 9px;
  border-radius: 7px;
  background: radial-gradient(120% 140% at 30% 0%, #10151a, #06080a 70%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, .9),
    inset 0 0 0 1px rgba(0, 0, 0, .8),
    0 1px 0 rgba(255, 255, 255, .08);
  font-family: "VT323", ui-monospace, monospace;
  color: #bfe6ff;
  text-shadow: 0 0 6px rgba(120, 200, 255, .45);
  overflow: hidden;
}
/* restrained glare across the glass */
.pr-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .02) 38%, rgba(255, 255, 255, 0) 40%);
}
.pr-screen .ln { margin: 0; display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.pr-screen .small { font-size: 15px; line-height: 1.1; opacity: .8; }
.pr-screen .dim { opacity: .5; }
.pr-screen .big { font-size: clamp(22px, 3.4vw, 30px); line-height: 1.15; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; }
.pr-screen .bar { font-size: 15px; line-height: 1.1; letter-spacing: 1px; opacity: .85; }

.pr-keys { display: flex; align-items: center; gap: clamp(8px, 1.4vw, 14px); }
/* rubbery keys pressed into the top */
.pr-key {
  width: 38px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #2f2f33, #222226);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(0, 0, 0, .6), 0 2px 3px rgba(0, 0, 0, .35);
  color: rgba(255, 255, 255, .45);
  font-size: 11px;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.pr-key:active { transform: translateY(1px); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
/* the big round print button, with a green power-style LED ring */
.pr-go {
  position: relative;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #333338, #1d1d21 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 1px 0 rgba(0, 0, 0, .7), 0 3px 5px rgba(0, 0, 0, .4);
  cursor: pointer;
  transition: transform .08s ease;
}
.pr-go:active { transform: translateY(1px) scale(.98); }
.pr-led {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  border: 2.5px solid #4fe07a;
  box-shadow: 0 0 6px rgba(79, 224, 122, .7), inset 0 0 4px rgba(79, 224, 122, .5);
  opacity: .9;
}
.printer[data-state="pick"] .pr-led { animation: pr-breathe 2.2s ease-in-out infinite; }
.printer[data-state="printing"] .pr-led { animation: pr-blink .5s steps(2) infinite; }
@keyframes pr-breathe { 50% { opacity: .35; box-shadow: 0 0 2px rgba(79, 224, 122, .3); } }
@keyframes pr-blink { 50% { opacity: .3; } }
.pr-key:focus-visible, .pr-go:focus-visible { outline: 2px dashed rgba(240, 232, 205, .9); outline-offset: 3px; }

/* Front edge, seen at an angle, with the paper slot */
.pr-front {
  position: relative;
  height: 20px;
  margin-top: -1px;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, #161618, #0f0f11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.pr-slot {
  position: absolute;
  left: 7.5%;
  right: 7.5%;
  top: 7px;
  height: 4px;
  border-radius: 2px;
  background: #020203;
  box-shadow: inset 0 1px 2px #000, 0 1px 0 rgba(255, 255, 255, .06);
}

/* Paper comes out of the slot; only the top edge is hidden (inside the printer) */
.pr-out {
  position: relative;
  z-index: 3;
  width: 84%;
  /* starts at the slot: 11px above the printer's bottom edge, in front of its face */
  margin-top: -11px;
  aspect-ratio: 8.5 / 11;
  clip-path: inset(0 -120px -200px -120px);
}
.pr-paper {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  background: #fff;
  box-shadow: .5px .8px .6px rgba(var(--shadow), .4), 2px 5px 9px rgba(var(--shadow), .18);
  cursor: zoom-in;
}
.pr-paper img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
/* thermal paper: a faint sheen and a slight curl near the top, still warm from the head */
.pr-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, 0) 4%, rgba(255, 255, 255, 0) 80%, rgba(80, 60, 30, .03));
}
/* the slot's lip: a dark line and a little shadow where the sheet comes out of the printer */
.pr-out::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: -1%;
  right: -1%;
  top: 0;
  height: 5px;
  pointer-events: none;
  background: linear-gradient(180deg, #020203 0 1.5px, rgba(0, 0, 0, .35) 1.5px, rgba(0, 0, 0, 0));
}

.pr-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
}
.pr-actions[hidden] { display: none; }
.pr-dl { rotate: -1.5deg; white-space: nowrap; }
.pr-open { white-space: nowrap; }
.pr-open {
  padding: 4px 8px;
  background: rgba(236, 222, 190, .94);
  font: 700 14px var(--type);
  color: #2b261d;
  text-decoration: none;
  clip-path: polygon(2px 0, 100% 2px, calc(100% - 2px) 100%, 0 calc(100% - 1px));
  rotate: 1.5deg;
}
.pr-open:hover, .pr-open:focus-visible { background: rgba(246, 234, 204, 1); outline: none; }
button.pr-open { border: 0; cursor: pointer; }

/* Full-size viewer: the page held up close, over a dimmed desk */
.pr-viewer {
  position: fixed;
  inset: 0;
  z-index: 75;
  overflow-y: auto;
  padding: 18px 16px 48px;
  background: rgba(10, 14, 11, .78);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
}
.pr-viewer[hidden] { display: none; }
.pr-viewer-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0 auto 16px;
}
.pr-viewer-page {
  width: min(880px, 100%);
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px rgba(0, 0, 0, .35);
}
.pr-viewer-page img { display: block; width: 100%; height: auto; }

@media (max-width: 700px) {
  .resume-view { padding-top: 56px; }
  .pr-brand { display: none; }
  .pr-top { grid-template-columns: 1fr; justify-items: stretch; }
  .pr-keys { justify-content: center; }
  .pr-actions { gap: 12px; }
  .pr-open { font-size: 12.5px; }
}

/* ---------- Playground: one huge mat to roam ---------- */
.play-view {
  position: fixed;
  inset: 0;
  overflow: hidden;
  font-family: var(--type);
}
body[data-view="playground"] { overflow: hidden; }
/* the email tape stays reachable on top of the big mat */
body[data-view="playground"] .email { z-index: 5; }
.play-port {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #225a3a;
  cursor: grab;
  touch-action: none;
  outline: none;
}
.play-port.is-dragging { cursor: grabbing; }
.play-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  background-color: #225a3a;
  background-size: 220px 220px;
  will-change: transform;
}
/* soft mottling across the whole map so the tile doesn't read as a repeat */
.play-world::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 30% at 20% 30%, rgba(140, 180, 128, .08), transparent 70%),
    radial-gradient(35% 40% at 75% 65%, rgba(10, 40, 24, .12), transparent 70%),
    radial-gradient(30% 25% at 60% 20%, rgba(140, 180, 128, .06), transparent 70%),
    radial-gradient(45% 35% at 30% 85%, rgba(10, 40, 24, .1), transparent 70%);
}
/* pencil marks on the mat */
.pg-trails { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.pg-trails path {
  fill: none;
  stroke: rgba(240, 232, 205, .45);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2 9;
}
.pg-trails path:nth-child(even) { stroke-dasharray: none; }

/* Every item sits centred on its x/y, turned a little, lying flat on the mat */
.pg-item {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  transition: transform .25s cubic-bezier(.2, .9, .25, 1.2), filter .25s ease;
}
.pg-item:hover, .pg-item:focus-visible { transform: translate(-50%, -52%) rotate(var(--r, 0deg)) scale(1.03); outline: none; }
.pg-item:focus-visible { outline: 2px dashed rgba(240, 232, 205, .9); outline-offset: 6px; }
.is-dragging .pg-item { pointer-events: none; }

.pg-photo {
  width: var(--w, 230px);
  padding: 9px 9px 0;
  background: #fdfcf8;
  box-shadow: .5px .8px .6px rgba(var(--shadow), .45), 2px 4px 7px rgba(var(--shadow), .18);
}
.pg-photo img, .pg-photo video { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #ddd; }
.pg-photo.is-natural img, .pg-photo.is-natural video { aspect-ratio: auto; height: auto; min-height: 60px; }
.pg-photo.no-cap { padding-bottom: 9px; }
/* A stack: prints piled up, the next few peeking out from under the top one */
.pg-stack { isolation: isolate; }
.pg-under {
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 9px;
  background: #fbf9f3;
  box-shadow: .4px .7px .5px rgba(var(--shadow), .4), 1px 2px 4px rgba(var(--shadow), .14);
  transform: translate(var(--ux), var(--uy)) rotate(var(--ur));
  transition: transform .3s cubic-bezier(.2, .9, .25, 1.2);
}
.pg-under img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.pg-stack:hover .pg-under, .pg-stack:focus-visible .pg-under { transform: translate(calc(var(--ux) * 2.2), calc(var(--uy) * 1.6)) rotate(calc(var(--ur) * 1.8)); }
.pg-count {
  position: absolute;
  top: -10px;
  right: -10px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #c4352a;
  color: #fff;
  font: 700 14px/1 var(--sticker-font);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.pg-stack-view img { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: #f1efe9; }
.pg-stack-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
.pg-flip {
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 38% 30%, #fffdf6, #efe6cf 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), .6px 1px .8px rgba(var(--shadow), .5), 2px 4px 8px rgba(var(--shadow), .22);
  font: 700 18px var(--type); color: #24211c;
}
.pg-flip:disabled { opacity: .35; cursor: default; }
.pg-flip:focus-visible { outline: 2px dashed #24211c; outline-offset: 3px; }
.pg-flip-count { min-width: 60px; text-align: center; font: 600 15px var(--sticker-font); color: #3a3733; }

/* area names: a long strip of masking tape with the name typed on it */
.pg-label {
  position: absolute;
  padding: 12px 34px 10px;
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 40%, rgba(120, 95, 50, .06)),
    rgba(236, 222, 190, .94);
  font: 700 30px/1 var(--type);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #2b261d;
  white-space: nowrap;
  clip-path: polygon(0 4px, 6px 0, 30% 3px, 55% 0, 80% 2px, calc(100% - 5px) 0, 100% 5px, calc(100% - 3px) 50%, 100% calc(100% - 4px), 75% 100%, 48% calc(100% - 3px), 20% 100%, 4px calc(100% - 2px), 0 55%);
  filter: drop-shadow(.5px .8px .5px rgba(var(--shadow), .4));
  pointer-events: none;
}
.pg-cap {
  display: block;
  padding: 9px 2px 11px;
  font-family: var(--sticker-font);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: #2b2926;
}
.pg-tape {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 78px;
  height: 22px;
  translate: -50% 0;
  rotate: -4deg;
  background: rgba(236, 222, 190, .85);
  clip-path: polygon(0 2px, 18% 0, 40% 3px, 63% 0, 84% 2px, 100% 0, 100% 100%, 80% calc(100% - 3px), 58% 100%, 35% calc(100% - 2px), 14% 100%, 0 calc(100% - 3px));
}
.pg-cut { width: var(--w, 220px); }
.pg-cut img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(.6px 1px .6px rgba(var(--shadow), .5)) drop-shadow(2px 4px 5px rgba(var(--shadow), .2));
}
.pg-note {
  width: 210px;
  min-height: 170px;
  padding: 22px 20px;
  text-align: left;
  font-family: var(--sticker-font);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  color: #2b2926;
  background: var(--note);
  background-image: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,0) 30%, rgba(0,0,0,0) 70%, rgba(90,60,0,.08) 100%);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .45), .5px 1px 1px rgba(var(--shadow), .3), 5px 14px 14px -9px rgba(var(--shadow), .5);
}
.pg-note.is-start { width: 240px; font-size: 19px; }
.pg-start {
  position: absolute;
  min-height: 0;
  width: 220px;
  padding: 26px 22px;
  font-size: 21px;
  font-weight: 600;
  text-align: center;
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  pointer-events: none;
}
.c-pink { background-color: #ffc4d4; }
.c-blue { background-color: #bfdcf2; }
.c-green { background-color: #c9e6b3; }
.c-yellow { background-color: var(--note); }

.play-bar {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}
.play-bar > * { pointer-events: auto; white-space: nowrap; }
.play-bar .back {
  padding: 6px 10px;
  border: 0;
  background: rgba(236, 222, 190, .94);
  cursor: pointer;
  font: 700 15px var(--type);
  color: #2b261d;
  clip-path: polygon(2px 0, 100% 2px, calc(100% - 2px) 100%, 0 calc(100% - 1px));
  transform: rotate(-1.5deg);
}
.play-hint {
  margin: 0;
  font-family: var(--sticker-font);
  font-weight: 500;
  font-size: 15px;
  color: rgba(240, 232, 205, .85);
  transition: opacity .5s ease;
}
.play-hint.gone { opacity: 0; }

/* map in the corner: part of the interface, so it sits above the lamp light */
.play-map {
  position: fixed;
  z-index: 76;
  right: 18px;
  bottom: 18px;
  width: 180px;
  height: 130px;
  border-radius: 6px;
  background: rgba(246, 240, 224, .92);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 6px 16px rgba(0, 0, 0, .2);
  cursor: pointer;
}
body:not([data-view="playground"]) .play-map { display: none; }

/* Picked-up item */
.pg-viewer {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(10, 14, 11, .72);
  overflow-y: auto;
}
.pg-viewer[hidden] { display: none; }
.pg-card {
  width: min(560px, 100%);
  margin: 0;
  padding: 14px 14px 16px;
  background: #fdfcf8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px rgba(0, 0, 0, .35);
}
.pg-card img, .pg-card video { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: #f1efe9; }
.pg-card.is-cutout img { background: none; }
.pg-card-note { margin: 0; padding: 28px 26px; font: 500 22px/1.4 var(--sticker-font); color: #2b2926; }
.pg-card figcaption { margin-top: 12px; font-size: 15px; line-height: 1.5; color: #3a3733; }
.pg-card figcaption b { display: block; font-family: var(--sticker-font); font-size: 19px; color: #24211c; }
.pg-card-actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.pg-card .card-more { --tab: #f4b9a0; }

@media (max-width: 700px) {
  .play-bar { top: 60px; }
  .play-hint { display: none; }
  .play-map { width: 120px; height: 88px; right: 12px; bottom: 12px; }
}

/* Stickers belong to the cover: hide the pile and its clear button on other sheets */
body:not([data-view="cover"]) #pile, body:not([data-view="cover"]) .clear-pile { visibility: hidden; }

/* ---------- Clear stickers: a strip of masking tape, shown once stickers pile up ---------- */
.clear-pile {
  position: fixed;
  z-index: 45;
  right: calc(clamp(18px, 3vw, 40px) + clamp(112px, 11vw, 148px) + 18px);
  bottom: calc(clamp(18px, 4vh, 40px) + 8px);
  padding: 7px 16px 5px;
  border: 0;
  cursor: pointer;
  font-family: var(--sticker-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: #2b261d;
  transform: rotate(-2deg);
  background-color: rgba(236, 222, 190, .95);
  background-image:
    linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,0) 45%, rgba(80,60,20,.06)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.25 .9' numOctaves='2' seed='6' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .4  0 0 0 0 .3  0 0 0 0 .1  0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
  clip-path: polygon(3px 0, 100% 2px, calc(100% - 3px) 30%, 100% 55%, calc(100% - 2px) 80%, 100% 100%, 2px calc(100% - 1px), 0 70%, 3px 45%, 0 20%);
  filter: drop-shadow(.4px .6px .4px rgba(var(--shadow), .35));
  transition: background-color .2s ease;
}
.clear-pile[hidden] { display: none; }
.clear-pile:hover { background-color: rgba(246, 234, 204, 1); }
.clear-pile:focus-visible { outline: 2px dashed var(--ink); outline-offset: 3px; }

/* ---------- Mobile: simplified ---------- */
@media (max-width: 700px) {
  :root { --margin: 12px; }
  .sheet { padding: 72px 22px 28px; }
  .work-view { --card-w: 84vw; --gap: 18px; padding-top: 56px; justify-content: flex-start; }
  .card-arrow { width: 44px; height: 44px; }
  .card-arrow svg { width: 20px; height: 20px; }
  .card-arrow.prev { left: 2px; }
  .card-arrow.next { right: 2px; }
  .work-bar { width: calc(100% - 32px); }
  .work-bar span { display: none; }
  .work-bar { grid-template-columns: auto 1fr; gap: 12px; }
  .work-title { justify-self: end; }
  .proj-top, .notes { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro .line { height: auto; white-space: normal; }
  .slot { margin-left: 0; margin-top: .15em; vertical-align: middle; }
  .email { display: none; }
  .li-sticker { left: 12px; bottom: 16px; width: 44px; height: 44px; }
  .li-sticker svg { width: 22px; height: 22px; }
  /* phones: the note stays top-right, but there's no room for the arrows */
  .hint { top: 104px; right: 18px; font-size: 21px; }
  .hint-arrows { display: none; }
  .sheet-email { display: none; }

  .hero { max-width: none; padding-top: 64px; }
  .polaroid { position: relative; right: auto; bottom: auto; align-self: flex-start; width: min(54vw, 210px); margin: 44px 0 8px 6px; rotate: -3deg; }
  .current { padding-bottom: 96px; }
  .sheet-email a { color: var(--muted); }
  /* Menu drops down from the top edge instead of sliding in from the left */
  .note { top: 0; left: 14px; width: 200px; transform: translateY(calc(-100% + 40px)) rotate(-4deg); }
  .note:not([data-open="true"]):hover { transform: translateY(calc(-100% + 40px)) rotate(-4deg); }
  .note[data-open="true"] { transform: translateY(-6px) rotate(-2deg); }
  .note-inner { min-height: 0; padding: 22px 22px 54px; }
  .note a, .note a .hw { --cap: 17px; }
  .note-tab {
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto; height: 36px;
    border-left: 0;
  }
  .note-tab .hw { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .note { transition: none; }
}
