/* ------------------------------------------------------------------
   Hatem Elmougy — scrapbook portfolio
   Paper, tape, torn edges, stickers. No frameworks.
   ------------------------------------------------------------------ */

:root {
  --paper: #e6d9bf;
  --paper-light: #f3ebda;
  --paper-white: #faf5ea;
  --ink: #2b1a0c;
  --ink-2: #5b4733;
  --ink-3: #8a7460;
  --mustard: #f2c744;
  --mustard-deep: #dcae2a;
  --sky: #a9cce0;
  --sky-deep: #5f8fb3;
  --spot: #1b1a17;
  --spot-green: #1ed760;
  --red: #c8271f;
  --tape: rgba(222, 198, 128, 0.62);
  --shadow: rgba(46, 28, 8, 0.18);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --mono: "Courier Prime", "Courier New", Courier, monospace;

  --noise: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --fiber: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.03' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.22 0 0 0 0 0.08 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}

/* torn-edge polygons (generated; two per family so the white rim varies) */
:root{
--tear-wide-a:polygon(0% 1.3%,3.3% 1.2%,6.5% 0.3%,9.9% 1%,13.5% 1.3%,17.3% 1.6%,21.7% 0.6%,25.2% 1.5%,29.1% 0.6%,33% 0.1%,37.4% 1.9%,40.1% 0.7%,43.8% 0.4%,46.4% 0.7%,49% 0.9%,52.4% 1.2%,55.4% 1.4%,58.6% 0.3%,62.1% 1.4%,65.7% 0.5%,69.9% 1.5%,74.4% 1.6%,78.2% 1.6%,82.8% 0.6%,87.6% 0.7%,90.8% 0.5%,93.4% 1.9%,96.8% 0.9%,98.9% 4%,99.4% 9.3%,99.3% 16%,99.8% 22.1%,99.7% 28.6%,99% 33.7%,98.9% 40.8%,99.6% 45.7%,99.7% 52.1%,99.5% 57.4%,99.3% 63.4%,99.7% 71.2%,99.8% 78.9%,99.3% 85.7%,99.8% 90.8%,99.5% 96.5%,100% 98.6%,95.4% 99.5%,91.2% 98.8%,86.8% 99.6%,84.2% 99.6%,80.4% 99.3%,77.3% 98.5%,74.7% 99.2%,70.3% 98.3%,67.4% 99.5%,63.4% 99.7%,59% 99.7%,55.4% 98.6%,50.9% 99.9%,46.6% 99.7%,43.1% 98.7%,39.8% 99.4%,36.6% 99.9%,33.7% 99.7%,29.6% 98.6%,26.5% 99.4%,23.3% 99.5%,19.3% 99%,15.8% 99.4%,12.8% 98.6%,8.5% 99.6%,5.4% 98.7%,1.1% 98.8%,0.4% 96.3%,0.1% 90.5%,0.9% 82.5%,0.1% 76.8%,1% 70.4%,0.7% 64.7%,0.7% 60.2%,0.5% 55%,0.4% 49.9%,0.2% 45%,0.5% 40.7%,0.8% 34.7%,0.6% 29.1%,0.1% 21.6%,0.1% 15.6%,0.3% 10.5%,1% 5.6%,0.1% 1.6%);
--tear-wide-b:polygon(0% 1.5%,3.4% 1.2%,7.7% 0.5%,11.4% 0.4%,15.3% 1.3%,19.2% 1.1%,22.6% 0.5%,26.5% 0.8%,29.8% 1.1%,33.4% 0.5%,37.1% 0.6%,41.6% 0.2%,44.5% 0.3%,48.4% 0.5%,52.5% 1.2%,55.6% 0.4%,58.9% 1.2%,62.4% 0.4%,66.3% 0.4%,70.3% 0.8%,73.8% 1%,78.4% 0.9%,82.7% 1.1%,87.2% 1.1%,92.1% 0.7%,95.6% 0.7%,99.3% 0.4%,99.7% 4.8%,99.7% 12.7%,99.3% 18.2%,99.2% 25.9%,99.5% 31.6%,99.5% 37.6%,99.3% 44.2%,99.4% 50.6%,99.2% 57.9%,99.7% 63.1%,99.2% 70.3%,99.6% 78.4%,99.6% 85.2%,99.3% 91.1%,99.4% 96.5%,100% 99.1%,96.1% 99.4%,93.4% 99.4%,89.6% 99.5%,86% 99.2%,81.8% 99.5%,78.5% 98.9%,74% 99.1%,70.4% 99.4%,66.9% 98.7%,63.3% 98.9%,59.6% 99.7%,55.2% 99.6%,51.6% 98.9%,48.5% 99.4%,44.7% 99.4%,40.9% 99.5%,37.7% 98.9%,34% 99.4%,30.7% 99.5%,27.6% 99.7%,23.5% 99.3%,19.5% 99.1%,15.6% 99.6%,11.4% 99.5%,7.6% 99.1%,4.6% 99.5%,0.8% 99.5%,0.9% 95.1%,0.1% 88.2%,0.8% 80.7%,0.6% 74.9%,0.7% 68%,0.2% 62.6%,0.6% 56.7%,0.3% 51.5%,0.6% 45%,0.5% 40.4%,0.9% 34.1%,0.8% 28.8%,0.2% 23.5%,0.8% 17.7%,0.4% 11.6%,0.9% 5.3%,0.5% 0.4%);
--tear-tall-a:polygon(0% 1.7%,3.8% 0.4%,8.2% 0.4%,12.9% 1.2%,16.9% 1.6%,20.2% 1.4%,25.4% 1.5%,29.3% 0.5%,33.3% 1.5%,36.4% 0.4%,41.6% 1.4%,45.3% 1.7%,49.8% 0.3%,54.5% 0.6%,59.9% 1.5%,63.8% 1%,68.3% 1.6%,73.5% 0.6%,77.3% 0.7%,82.2% 1.2%,86.9% 1.6%,92.3% 0.7%,97.2% 1.6%,99.2% 5.1%,99.4% 11.6%,99.5% 19.3%,98.9% 25.6%,99.6% 33.7%,99.1% 41.5%,99.4% 50.7%,99.5% 58.9%,99.3% 66.1%,99.7% 72.6%,99.4% 79.7%,99.1% 86.6%,99.5% 94.2%,100% 99.1%,95.5% 99.2%,91.6% 98.6%,87.9% 99.2%,83% 99.3%,78.4% 98.6%,73.7% 99.4%,69.7% 99.1%,65.6% 98.6%,60.2% 99.4%,56.2% 98.4%,50.9% 98.3%,46.5% 99.5%,42.2% 99.2%,38.3% 99.4%,34.4% 98.5%,30.4% 98.6%,25.8% 98.7%,21.3% 98.6%,16.5% 99.2%,11.9% 98.7%,7.6% 98.6%,3% 98.7%,0.5% 96.4%,0.3% 88%,1.3% 79.2%,0.9% 71.3%,1.2% 64.4%,0.8% 55.9%,0.4% 46.5%,1.2% 39.9%,1.4% 32.6%,0.5% 25.8%,1.1% 17.8%,0.4% 9.5%,0.8% 2.8%);
--tear-tall-b:polygon(0% 1.1%,4.8% 0.8%,9.4% 0.3%,13.3% 0.3%,17.4% 1.1%,22.3% 0.3%,26.7% 0.4%,32% 1.5%,36.4% 0.3%,40.4% 1.5%,44.4% 0.2%,48.7% 0.6%,53.8% 1.5%,57.4% 0.5%,62.9% 1.1%,67.1% 0.2%,72.2% 1.2%,76.1% 0.7%,81.2% 0.7%,84.5% 0.9%,88.6% 0.7%,93.4% 0.6%,97.6% 1.3%,99.6% 6.2%,99.4% 12.6%,99.7% 20.7%,99.2% 29.4%,99.4% 37.6%,99.1% 44.7%,99.2% 52.3%,99.4% 61.6%,99.7% 68.8%,99.5% 76.8%,99.3% 84.9%,99.2% 92.1%,100% 98.7%,96.3% 99.4%,92.3% 98.9%,87.2% 99.3%,82.9% 99.3%,78.3% 99.1%,74% 99.1%,70.4% 98.8%,66.8% 99.1%,62.1% 99.1%,58.5% 99.5%,54.4% 98.9%,50.5% 99.4%,45.7% 98.9%,41.3% 99.7%,36.2% 99.2%,31.2% 98.8%,27.7% 99.4%,23.5% 99.3%,18.8% 99.6%,13.9% 99.1%,10% 98.8%,5.7% 98.7%,1.2% 99.4%,0.5% 92.8%,1.1% 85.6%,0.4% 78.7%,0.9% 69.9%,1.3% 61%,0.8% 53.7%,0.3% 46.6%,0.4% 38.6%,0.5% 30.3%,0.8% 23.5%,0.4% 17%,0.4% 10.3%,0.9% 2.3%);
--tear-card-a:polygon(0% 1.6%,4.9% 1.2%,10.1% 1.5%,15.3% 0.7%,20% 1.1%,25.4% 1.5%,30.2% 1.4%,35.4% 0.5%,39.6% 0.3%,45.3% 1.7%,50.9% 0.5%,54.5% 0.6%,59.5% 0.9%,64.6% 0.9%,70.2% 0.3%,76.4% 1.7%,80.4% 0.4%,86.8% 1%,92.2% 1.1%,97.2% 0.6%,99.5% 5.8%,99.5% 13.3%,99.6% 21.2%,99.6% 29%,99.6% 36%,99.5% 42.6%,99.5% 50.7%,99.2% 58.5%,99.7% 66.9%,99.4% 75.6%,99.6% 85.8%,99.1% 94.6%,100% 98.7%,95.5% 98.5%,90.6% 98.7%,86.4% 99.4%,80.8% 99%,75.4% 99.3%,69.4% 98.7%,63.5% 99.5%,58.9% 99%,54.6% 99.4%,49.4% 98.8%,44.1% 99.8%,39.6% 99.2%,34.5% 99.3%,29.4% 99.6%,24.2% 99.2%,19.8% 99.5%,14.3% 99.2%,9.1% 98.9%,3.2% 98.7%,0.4% 95.8%,0.4% 86.2%,0.6% 76.3%,0.8% 66.6%,1.1% 57.7%,1.1% 48.5%,0.9% 38.6%,1.3% 30.7%,0.8% 21.6%,0.6% 11.1%,1.3% 4.2%);
--tear-card-b:polygon(0% 1.2%,4.7% 1.4%,9.5% 0.6%,14.6% 0.7%,20.7% 1.4%,25.6% 0.9%,30.1% 0.4%,35.2% 0.9%,40.7% 0.2%,46% 0.5%,50.4% 1.3%,55.9% 0.9%,61.3% 0.8%,66.6% 0.4%,71.4% 0.3%,76.1% 0.7%,81.7% 0.3%,86.7% 0.3%,92.1% 0.6%,97.3% 0.9%,99.3% 6.6%,99.6% 15.3%,99.6% 22.9%,99.3% 30.6%,99.4% 37.6%,99.5% 45.6%,99.6% 54.8%,99.4% 63.4%,99.5% 71.8%,99.4% 78.9%,99.4% 87%,99.6% 95.3%,100% 99.1%,94.9% 99.2%,90.4% 98.9%,85.7% 99.6%,80.3% 99.1%,74.5% 99.3%,68.5% 99.2%,63.7% 99.1%,58.8% 99.6%,53.7% 99.4%,48.5% 99.4%,43.3% 99.1%,38.9% 99.2%,33.3% 99.6%,28.3% 99%,23.7% 99.5%,18.6% 99.5%,13.4% 99.1%,8.3% 99.5%,3.6% 99.2%,0.6% 93.8%,0.4% 85.3%,0.7% 76.4%,0.8% 66.9%,0.6% 59.4%,0.9% 50.7%,0.4% 42.3%,0.9% 33.3%,0.6% 24.7%,1.1% 16.5%,1% 8.3%,0.9% 1.7%);
--tear-dark-a:polygon(0% 0.9%,4.3% 1.2%,8.5% 1%,12.2% 0.2%,15.6% 0.9%,20.3% 0.7%,25.2% 0.5%,29.3% 1.1%,33.8% 0.8%,38.2% 1.4%,42.5% 0.7%,47.5% 0.3%,51.3% 1.3%,56.1% 0.5%,60.5% 0.3%,64.3% 0.9%,69.5% 1.3%,74.2% 0.5%,79.4% 1.2%,83.4% 1.1%,87.9% 0.5%,92.6% 1.4%,97.4% 0.7%,99.6% 5.6%,99.4% 13.1%,99.7% 21.5%,99.6% 28.3%,99.6% 35.2%,99.3% 43.5%,99.4% 52.2%,99.5% 59.8%,99.6% 66.3%,99.5% 74.5%,99.5% 82.1%,99.2% 89.4%,99.6% 96.6%,100% 99.1%,95.4% 99.1%,90.5% 98.9%,86.1% 99.4%,81.8% 99.2%,77.6% 98.9%,73.6% 99.3%,69.2% 99.4%,64.8% 99.2%,60.4% 99.6%,55.9% 98.9%,51.5% 98.9%,47.7% 99.4%,43.4% 98.8%,38.9% 99.6%,34.9% 99.5%,30.4% 99%,26.6% 99.3%,21.6% 99.5%,17.3% 99.3%,12.8% 99.2%,8.6% 98.9%,4.2% 99.4%,0.4% 96.1%,0.9% 89.4%,0.4% 80.8%,0.5% 72.1%,0.9% 63.9%,0.7% 55.6%,0.6% 48.6%,0.5% 39.9%,0.7% 32.6%,0.3% 24.3%,0.8% 16.6%,0.5% 9.5%,0.6% 2.9%);
--tear-dark-b:polygon(0% 0.8%,4.5% 1%,9.5% 0.6%,13.1% 0.5%,17.7% 0.3%,21.7% 0.8%,26.1% 0.7%,31.2% 0.3%,35.7% 1%,39.6% 1.1%,44.1% 0.7%,48.3% 0.5%,52.8% 0.4%,57.7% 0.7%,62.7% 0.6%,66.6% 0.2%,71.4% 0.6%,76% 0.4%,80.2% 1%,84.6% 0.9%,89.4% 0.8%,93.7% 0.6%,97.8% 0.4%,99.5% 5.1%,99.7% 12.2%,99.5% 20.6%,99.6% 27.5%,99.6% 35.7%,99.7% 44.2%,99.5% 52.6%,99.5% 60.9%,99.6% 68.3%,99.7% 75.4%,99.5% 83.3%,99.6% 91.4%,99.5% 97.8%,96.5% 99.4%,92.2% 99.5%,87.6% 99.1%,83.4% 99.5%,79.1% 99.3%,74.4% 99.4%,70.1% 99.4%,66% 99.6%,61.3% 99.1%,57.2% 99.5%,52.6% 99.3%,48.6% 99.6%,44.4% 99.1%,40.3% 99.5%,36.2% 99.3%,31.7% 99.3%,27.5% 99.4%,23.7% 99.3%,19.4% 99%,15.3% 99.5%,10.5% 99.4%,6.5% 99.2%,2.1% 99.4%,0.6% 95.5%,0.5% 88.7%,0.7% 80.4%,0.4% 72.6%,0.5% 64.9%,0.6% 57.7%,0.6% 50.2%,0.8% 42.7%,0.6% 35.3%,0.6% 27.4%,0.7% 19.9%,0.5% 12.4%,0.5% 5.4%);
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* paper grain — fixed so it never scrolls with content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    var(--noise) center / 260px 260px repeat,
    var(--fiber) center / 700px 700px repeat,
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(120, 85, 40, 0.14), transparent 55%),
    var(--paper);
  opacity: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px dashed var(--ink);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper-white);
  font-family: var(--hand);
  font-size: 1.25rem;
  border-radius: 4px;
}

.skip-link:focus {
  top: 1rem;
}

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

/* ---------- typography helpers ---------- */

.display {
  font-family: var(--serif);
  font-weight: 900;
  font-variation-settings: "opsz" 144, "SOFT" 40;
  letter-spacing: -0.02em;
  line-height: 0.9;
}

.hand {
  font-family: var(--hand);
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
}

/* ---------- page frame & corner scraps ---------- */

.page {
  position: relative;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 2.5rem) clamp(1rem, 3vw, 3rem) clamp(2rem, 4vw, 4rem);
  overflow: hidden;
}

.scrap {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-image: var(--noise);
  background-size: 200px 200px;
  background-blend-mode: multiply;
}

.scrap-tl {
  left: -2vw;
  top: -2vw;
  width: clamp(5rem, 8.5vw, 8.5rem);
  height: clamp(12rem, 28vw, 28rem);
  background-color: var(--sky-deep);
  clip-path: polygon(0 0, 100% 0, 96% 5%, 90% 9%, 88% 15%, 80% 19%, 76% 27%, 70% 31%, 64% 39%, 58% 44%, 55% 52%, 48% 57%, 42% 64%, 38% 71%, 30% 76%, 26% 83%, 18% 88%, 12% 95%, 0 100%);
}

.scrap-br {
  right: -2vw;
  bottom: -2vw;
  width: clamp(9rem, 22vw, 22rem);
  height: clamp(9rem, 24vw, 24rem);
  background-color: var(--sky-deep);
  clip-path: polygon(100% 0, 100% 100%, 0 100%, 6% 92%, 14% 88%, 18% 80%, 27% 76%, 33% 68%, 40% 62%, 44% 54%, 52% 49%, 58% 42%, 62% 34%, 70% 28%, 76% 20%, 82% 15%, 88% 8%, 94% 5%);
}

.scrap-bl {
  left: -1vw;
  bottom: -1vw;
  width: clamp(6rem, 12vw, 12rem);
  height: clamp(5rem, 10vw, 10rem);
  background-color: var(--mustard);
  clip-path: polygon(0 0, 8% 6%, 18% 4%, 30% 12%, 42% 18%, 50% 30%, 62% 38%, 70% 50%, 80% 58%, 86% 70%, 94% 80%, 100% 100%, 0 100%);
}

/* ---------- nav ---------- */

.nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(0.5rem, 1.5vw, 1.5rem);
  font-family: var(--hand);
  font-weight: 600;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.15rem 0.35rem;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  bottom: 0.25rem;
  height: 0.35rem;
  background: var(--mustard);
  border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
  transform: scaleX(0) rotate(-1.5deg);
  transform-origin: left center;
  transition: transform 180ms ease-out;
  z-index: -1;
}

.nav a:hover::after,
.nav a:focus-visible::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1) rotate(-1.5deg);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.4rem, 2vw, 1.4rem);
}

/* ---------- the board (hero) ---------- */

.board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-template-areas:
    "n n n n n n n n n n . . s s s s s s s s . g g g"
    "p p p p p p p p p p p p b b b b b b l l l l l l"
    "o o o o o o o o o o o o w w w w w w w w w w w .";
  column-gap: clamp(0.8rem, 1.6vw, 1.6rem);
  row-gap: clamp(1.6rem, 3vw, 3rem);
  align-items: start;
}

/* ---------- torn paper primitive ----------
   .torn        wrapper: rotation, drop-shadow (follows the clip), tape lives here
   .torn::before white fibrous rim (polygon A)
   .torn-inner  coloured sheet (polygon B), slightly inset so the rim shows
*/

.torn {
  position: relative;
  --a: var(--tear-wide-a);
  --b: var(--tear-wide-b);
  --rim: #f9f4e6;
  transform: rotate(var(--rot, 0deg));
  filter: drop-shadow(0.45rem 0.55rem 0 var(--shadow)) drop-shadow(0 1px 1.5px rgba(30, 15, 0, 0.22));
}

.torn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--rim);
  clip-path: var(--a);
}

.torn-inner {
  position: relative;
  margin: 0.32rem;
  clip-path: var(--b);
  background: var(--sheet, var(--paper-light));
  overflow: hidden;
}

.torn-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--noise) center / 220px 220px repeat;
  opacity: 0.55;
  mix-blend-mode: multiply;
}

.torn-tall {
  --a: var(--tear-tall-a);
  --b: var(--tear-tall-b);
}

.torn-card {
  --a: var(--tear-card-a);
  --b: var(--tear-card-b);
}

.torn-dark {
  --a: var(--tear-dark-a);
  --b: var(--tear-dark-b);
  --rim: #d9d2c2;
}

/* ---------- tape ---------- */

.tape {
  position: absolute;
  z-index: 6;
  width: var(--w, 6.2rem);
  height: 1.55rem;
  top: -0.75rem;
  left: var(--x, 50%);
  transform: translateX(-50%) rotate(var(--t, -3deg));
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 5px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, 0.28)),
    var(--tape);
  box-shadow: 0 1px 2px rgba(40, 25, 5, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  clip-path: polygon(0 4%, 2% 0, 98% 3%, 100% 10%, 99% 96%, 97% 100%, 3% 98%, 0 92%, 1% 48%);
  pointer-events: none;
}

.tape-side {
  left: auto;
  right: var(--x, 4%);
  transform: rotate(var(--t, 3deg));
}

/* ---------- name block ---------- */

.name-block {
  grid-area: n;
  position: relative;
  padding: clamp(0.5rem, 1.5vw, 1.4rem) 0 0 clamp(0.6rem, 2.5vw, 2.4rem);
  transform: rotate(-2deg);
  z-index: 3;
}

.name-block h1 {
  margin: 0;
  font-size: clamp(4.6rem, 8vw, 8.6rem);
  color: #2c1a0b;
  text-shadow: 0.04em 0.05em 0 rgba(255, 255, 255, 0.22);
}

.name-block h1 span {
  display: block;
}

.name-block h1 .last {
  margin-left: clamp(1.2rem, 4vw, 4.4rem);
}

.underline-swoosh {
  width: min(24rem, 78%);
  height: 1.1rem;
  margin: 0.55rem 0 0 clamp(1.6rem, 5.5vw, 6rem);
  color: var(--mustard);
}

/* ---------- spotify card ---------- */

.spotify-wrap {
  grid-area: s;
  justify-self: end;
  width: min(100%, 30rem);
  margin-top: clamp(1rem, 2.5vw, 2.6rem);
  --rot: -1.6deg;
  z-index: 2;
}

.spotify {
  --sheet: var(--spot);
  color: #f7f3ea;
  padding: 1.15rem 1.4rem 1.05rem;
}

.spotify .torn-inner::after {
  opacity: 0.25;
  mix-blend-mode: screen;
}

.spotify-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.spotify-kicker {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.35rem;
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2rem;
}

.spotify-logo {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--spot-green);
}

.song {
  display: grid;
  grid-template-columns: 5.6rem 1fr;
  gap: 1.1rem;
  align-items: center;
}

.album-art {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 3px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.85);
}

.album-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.4));
}

.song-title {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.song-artist {
  margin: 0.1rem 0 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

.progress {
  position: relative;
  height: 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 42%);
  border-radius: inherit;
  background: var(--spot-green);
  transition: width 400ms linear;
}

/* The scrubber knob only makes sense while something is actually playing;
   on a last-played track it would sit at zero and read as a stalled playhead. */
.spotify:not(.is-playing) .progress-fill::after {
  display: none;
}

.progress-fill::after {
  content: "";
  position: absolute;
  right: -0.3rem;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0 0.6rem;
}

.controls .ctrl,
.controls .play {
  padding: 0.4rem;
  color: rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.controls .ctrl svg {
  width: 1.35rem;
  height: 1.35rem;
}

.controls .play {
  width: 3.3rem;
  height: 3.3rem;
  padding: 0;
  background: #f7f3ea;
  color: #111;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.controls .play:hover,
.controls .play:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

.controls .play svg {
  width: 1.5rem;
  height: 1.5rem;
}

.controls .play .icon-pause,
.controls .play[aria-pressed="true"] .icon-play {
  display: none;
}

.controls .play[aria-pressed="true"] .icon-pause {
  display: block;
}

/* live indicator once the worker reports something is actually playing */
.spotify.is-playing .spotify-kicker::after {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.45rem;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--spot-green);
  box-shadow: 0 0 0 0 rgba(30, 215, 96, 0.6);
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  to {
    box-shadow: 0 0 0 0.55rem rgba(30, 215, 96, 0);
  }
}

/* ---------- globe + right-rail notes/stickers ---------- */

.globe-cell {
  grid-area: g;
  position: relative;
  justify-self: end;
  width: clamp(4.5rem, 7.5vw, 7.2rem);
}

.globe {
  width: 100%;
  transform: rotate(8deg);
  filter: drop-shadow(0.15rem 0.3rem 0 rgba(46, 28, 8, 0.2));
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.globe:hover {
  transform: rotate(-4deg) scale(1.04);
}

.note-music {
  position: absolute;
  right: -0.2rem;
  top: calc(100% + 1.2rem);
  width: 7rem;
  margin: 0;
  font-size: clamp(1.25rem, 1.7vw, 1.55rem);
  transform: rotate(-7deg);
  z-index: 2;
}

.note-music svg {
  width: 2rem;
  margin-top: 0.2rem;
  margin-left: 4.2rem;
}

.crown-sticker {
  position: absolute;
  left: -1.4rem;
  top: 1.6rem;
  width: clamp(3.4rem, 5vw, 5rem);
  transform: rotate(-12deg);
  z-index: 7;
  filter: drop-shadow(0.1rem 0.2rem 0 rgba(46, 28, 8, 0.2));
}

.polaroid-cell {
  grid-area: l;
  position: relative;
  margin-top: clamp(2rem, 3vw, 3rem);
}

.ticket {
  position: absolute;
  right: -0.4rem;
  top: 22%;
  padding: 0.9rem 0.45rem 0.8rem;
  z-index: 4;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: var(--red);
  background: #f6d33b;
  border: 3px solid #f9f4e6;
  border-radius: 0.5rem;
  box-shadow: inset 0 0 0 2px #1d120a, 0.2rem 0.3rem 0 rgba(46, 28, 8, 0.2);
  font-family: var(--serif);
  font-weight: 900;
  font-variation-settings: "opsz" 144;
  font-size: clamp(1.4rem, 2.2vw, 2.1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  line-height: 1;
}

.ticket small {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--hand);
  font-size: 0.75em;
  font-weight: 700;
  color: #1d120a;
  letter-spacing: 0;
}

.smiley {
  position: absolute;
  right: 4.2rem;
  top: calc(100% + 1.4rem);
  width: 3.4rem;
  transform: rotate(8deg);
  z-index: 4;
}

.sparks {
  position: absolute;
  width: 1.8rem;
  z-index: 4;
}

.sparks-a {
  right: -0.4rem;
  top: -0.6rem;
  transform: rotate(20deg);
}

.sparks-b {
  right: 1.6rem;
  top: 1.8rem;
  transform: rotate(25deg);
}

/* ---------- postcard (quote) ---------- */

.postcard-wrap {
  grid-area: p;
  --rot: -1.4deg;
  margin-top: 0.4rem;
}

.postcard {
  --sheet: #1f2a2b;
  min-height: clamp(18rem, 30vw, 27rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 4vw, 4rem);
  color: #ffe98f;
}

.postcard img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(1.05) contrast(1.02);
}

.postcard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 22, 20, 0.12), rgba(20, 22, 20, 0.5));
}

.postcard blockquote {
  position: relative;
  margin: 0;
  max-width: 42rem;
  text-align: center;
  font-family: var(--serif);
  font-weight: 900;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: clamp(1.35rem, 2.55vw, 2.55rem);
  line-height: 1.14;
  letter-spacing: -0.012em;
  text-wrap: balance;
  text-shadow: 0 0.1rem 0.6rem rgba(0, 0, 0, 0.55), 0 0 2rem rgba(0, 0, 0, 0.45);
}

.postcard blockquote .quote-swoosh {
  display: block;
  width: 9rem;
  height: 0.7rem;
  margin: 1.1rem auto 0;
  color: var(--mustard);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.postcard blockquote cite {
  display: block;
  margin-top: 0.7rem;
  font-size: clamp(1.15rem, 1.5vw, 1.55rem);
  font-style: normal;
  letter-spacing: 0.01em;
  color: #fff3c4;
  text-shadow: 0 0.08rem 0.5rem rgba(0, 0, 0, 0.6);
}

/* ---------- bio note ---------- */

.bio-wrap {
  grid-area: b;
  --rot: 1.3deg;
  margin-top: clamp(1rem, 2vw, 2rem);
}

.bio {
  --sheet: #efce63;
  padding: clamp(1.4rem, 2.4vw, 2.1rem) clamp(1.2rem, 2.2vw, 1.9rem) clamp(1.3rem, 2vw, 1.8rem);
  background-image: radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.3), transparent 60%);
}

.bio h2,
.panel-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.2rem, 3.4vw, 3.1rem);
}

.bio p {
  margin: 0;
  max-width: 17rem;
  font-size: clamp(0.92rem, 1.15vw, 1.02rem);
  line-height: 1.55;
  color: #2b1a0c;
}

.squiggles {
  width: 11rem;
  margin: 1.2rem 0 1rem;
  color: var(--ink);
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.4rem;
  transform: rotate(-2deg);
  transform-origin: left center;
  transition: transform 160ms ease;
}

.more-link svg {
  width: 1.6rem;
}

.more-link span {
  border-bottom: 2px solid var(--ink);
  line-height: 1;
}

.more-link:hover {
  transform: rotate(-2deg) translateX(0.2rem);
}

/* ---------- polaroid ---------- */

.polaroid {
  position: relative;
  width: min(100%, 17.5rem);
  margin: 0;
  padding: 0.85rem 0.85rem 2.9rem;
  background: #f8f3e6;
  background-image: var(--noise);
  background-size: 220px 220px;
  box-shadow: 0.4rem 0.5rem 0 var(--shadow), 0 1px 2px rgba(30, 15, 0, 0.2);
  transform: rotate(-3.5deg);
  z-index: 2;
  transition: transform 220ms ease;
}

.polaroid:hover {
  transform: rotate(-1.5deg) scale(1.015);
}

.polaroid .photo {
  aspect-ratio: 1 / 0.94;
  overflow: hidden;
  background: #2b2723;
  box-shadow: inset 0 0 0 1px rgba(43, 26, 12, 0.18);
}

.polaroid .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.18) contrast(1.02) saturate(0.95);
}

.polaroid figcaption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.3rem;
}

.polaroid figcaption svg {
  width: 2.2rem;
}

/* ---------- socials ---------- */

.socials-wrap {
  grid-area: o;
  --rot: -0.8deg;
}

.socials {
  --sheet: var(--sky);
  padding: clamp(1.4rem, 2.4vw, 2.1rem) clamp(1.4rem, 2.6vw, 2.4rem) clamp(1.2rem, 2vw, 1.9rem);
  background-image: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.28), transparent 55%);
}

.sticker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.75rem, 1.8vw, 1.5rem);
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.sticker-row > li {
  display: flex;
}

.sticker {
  --bg: #111;
  --fg: #fff;
  width: clamp(4.2rem, 6.3vw, 5.4rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0.3rem;
  background: #f9f4e6;
  border-radius: 1.35rem;
  box-shadow: 0 0.3rem 0 rgba(46, 28, 8, 0.2), 0 1px 1px rgba(0, 0, 0, 0.15);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 180ms cubic-bezier(0.2, 0.9, 0.3, 1.3), box-shadow 180ms ease;
}

.sticker-face {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 1.05rem;
  background: var(--bg);
  color: var(--fg);
}

.sticker-face svg {
  width: 56%;
  height: 56%;
  fill: currentColor;
}

.sticker:hover,
.sticker:focus-visible {
  transform: translateY(-0.3rem) rotate(calc(var(--tilt, 0deg) + 5deg));
  box-shadow: 0 0.65rem 0 rgba(46, 28, 8, 0.22), 0 1px 1px rgba(0, 0, 0, 0.15);
}

.sticker.x { --bg: #0f0f0f; }
.sticker.instagram { --bg: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.sticker.linkedin { --bg: #0a66c2; }
.sticker.github { --bg: #1b1f23; }
.sticker.email { --bg: var(--mustard); --fg: #2b1a0c; }

.connect-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1.1rem 0 0 0.4rem;
  font-size: 1.45rem;
  transform: rotate(-3deg);
  transform-origin: left center;
}

.connect-note svg {
  width: 3.2rem;
  margin-top: -0.6rem;
}

/* ---------- software ---------- */

.software-wrap {
  grid-area: w;
  --rot: 1deg;
  margin-top: clamp(0.5rem, 1.5vw, 1.4rem);
}

.software {
  --sheet: #f4ead6;
  padding: clamp(1.4rem, 2.4vw, 2.1rem) clamp(1.4rem, 2.6vw, 2.4rem) clamp(1.2rem, 2vw, 1.9rem);
}

.tool-row {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.6rem, 1.4vw, 1.4rem);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: clamp(0.85rem, 1.7vw, 1.4rem) clamp(1rem, 2vw, 1.85rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool {
  --fg: var(--ink);
  --bg: #fbf7ee;
  position: relative;
  width: clamp(3.9rem, 5.7vw, 5.1rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0.28rem;
  background: #f9f4e6;
  border-radius: 1.25rem;
  box-shadow: 0 0.28rem 0 rgba(46, 28, 8, 0.16), 0 1px 1px rgba(0, 0, 0, 0.12);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 180ms cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.tool-face {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: var(--bg);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px rgba(43, 26, 12, 0.08);
}

.tool-face svg {
  width: 58%;
  height: 58%;
  fill: currentColor;
}

.tool:hover {
  transform: translateY(-0.25rem) rotate(calc(var(--tilt, 0deg) - 4deg));
}

.tool .tool-label {
  position: absolute;
  left: 50%;
  bottom: -1.55rem;
  transform: translateX(-50%) scale(0.9);
  padding: 0.05rem 0.45rem;
  background: var(--ink);
  color: var(--paper-white);
  font-family: var(--hand);
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.tool:hover .tool-label,
.tool:focus-within .tool-label {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.tool.vscode { --fg: #007acc; }
.tool.figma { --fg: #f24e1e; }
.tool.adobe { --fg: #da1f26; }
.tool.docker { --fg: #2496ed; }
.tool.aws { --fg: #232f3e; }
.tool.jira { --fg: #0052cc; }
.tool.claude { --fg: #d97757; }
.tool.terminal { --bg: #1f1f1f; --fg: #f7f3ea; }

/* The AWS mark is a wordmark, so it needs more width than the square marks. */
.tool.aws .tool-face svg {
  width: 74%;
  height: auto;
}

.tool.terminal .tool-face {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.7vw, 1.5rem);
  letter-spacing: -0.05em;
}

.trade-note {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0 0 0.9rem;
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  line-height: 1.05;
  transform: rotate(-5deg);
  z-index: 3;
}

.trade-note svg {
  width: clamp(1.9rem, 2.6vw, 2.6rem);
  flex: 0 0 auto;
  transform: scaleX(-1) rotate(-4deg);
}

.trade-note span {
  min-width: 0;
}

/* ---------- Slate (the startup) ---------- */

.slate-aside {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.slate-aside svg {
  width: 2.6rem;
  flex: 0 0 auto;
  transform: scaleX(-1) rotate(-5deg);
}

.slate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}

.slate-wrap {
  --rot: -0.7deg;
}

.slate-card {
  --sheet: #0b0b0b;
  color: #f3efe6;
  padding: clamp(1.9rem, 3.2vw, 3rem) clamp(1.7rem, 3.2vw, 3rem) clamp(2rem, 3.4vw, 3rem);
}

.slate-wrap .torn-inner::after {
  opacity: 0.22;
  mix-blend-mode: screen;
}

.slate-card .contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
  stroke-linejoin: round;
  pointer-events: none;
}

.slate-body {
  position: relative;
  z-index: 1;
}

.slate-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.slate-brand img {
  width: 2.4rem;
  height: auto;
}

.slate-wordmark {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #fff;
  margin-right: auto;
}

.slate-founder {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0b0b0b;
  background: var(--mustard);
  padding: 0.2rem 0.55rem;
  transform: rotate(-2deg);
}

.slate-tagline {
  margin: 1.6rem 0 0.9rem;
  font-size: clamp(2.1rem, 4vw, 3.9rem);
  color: #fff;
  font-variation-settings: "opsz" 144, "SOFT" 60;
}

.slate-desc {
  margin: 0;
  max-width: 44rem;
  font-size: clamp(0.94rem, 1.15vw, 1.08rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.slate-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem 1.5rem;
  margin-top: 1.9rem;
}

.slate-link {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.82);
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  line-height: 1.1;
  transition: color 150ms ease, border-color 150ms ease;
}

.slate-link:hover,
.slate-link:focus-visible {
  color: #fff;
  border-color: var(--mustard);
}

.slate-col {
  display: grid;
  gap: clamp(1.4rem, 2.4vw, 2.2rem);
  align-content: start;
}

.slate-photo {
  position: relative;
  width: 50%;
  justify-self: start;
  margin: 0;
  padding: 0.75rem 0.75rem 0.4rem;
  background: #f8f3e6;
  background-image: var(--noise);
  background-size: 220px 220px;
  box-shadow: 0.4rem 0.48rem 0 var(--shadow), 0 1px 2px rgba(30, 15, 0, 0.2);
  transform: rotate(-2deg);
  transition: transform 220ms ease;
}

.slate-photo:hover {
  transform: rotate(-0.5deg) scale(1.012);
}

.slate-photo .photo {
  aspect-ratio: 1 / 0.98;
  overflow: hidden;
  background: #221d18;
  box-shadow: inset 0 0 0 1px rgba(43, 26, 12, 0.18);
}

.slate-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.97) contrast(1.02);
}

.slate-photo figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: clamp(1.1rem, 1.4vw, 1.32rem);
  color: var(--ink);
}

.slate-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.35rem 1.1rem;
  background: #fff;
  color: #0b0b0b;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.4rem;
  border-radius: 3px;
  box-shadow: 0.25rem 0.3rem 0 var(--mustard);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.slate-btn:hover,
.slate-btn:focus-visible {
  transform: translate(-0.1rem, -0.1rem);
  box-shadow: 0.4rem 0.45rem 0 var(--mustard);
}

.slate-note-wrap {
  --rot: 1.4deg;
  margin-top: clamp(0.5rem, 2vw, 2rem);
}

.slate-note {
  --sheet: #efce63;
  padding: 1.4rem 1.5rem 1.2rem;
}

.slate-note p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.slate-note .slate-with {
  margin-top: 0.9rem;
  font-size: 1.25rem;
  line-height: 1.15;
  color: var(--ink-2);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

/* ---------- second page: projects ---------- */

.section {
  position: relative;
  z-index: 1;
  margin-top: clamp(3rem, 6vw, 6rem);
}

.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 0 0 clamp(1.4rem, 2.5vw, 2.4rem);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2.6rem, 4.4vw, 4rem);
  transform: rotate(-1.2deg);
  transform-origin: left bottom;
}

.section-head h2 .mark {
  position: relative;
  display: inline-block;
}

.section-head h2 .mark::after {
  content: "";
  position: absolute;
  left: -0.15em;
  right: -0.15em;
  bottom: 0.08em;
  height: 0.28em;
  background: var(--mustard);
  border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
  transform: rotate(-1.5deg);
  z-index: -1;
}

.section-head .hand {
  font-size: clamp(1.25rem, 1.7vw, 1.55rem);
  color: var(--ink-2);
  transform: rotate(-1deg);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 2.6vw, 2.6rem) clamp(1.2rem, 2.2vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-card {
  --rot: var(--tilt, -1deg);
  height: 100%;
  transition: transform 220ms ease, filter 220ms ease;
}

.project-card:hover {
  transform: rotate(var(--tilt, -1deg)) translateY(-0.35rem);
  filter: drop-shadow(0.55rem 0.7rem 0 var(--shadow)) drop-shadow(0 1px 1.5px rgba(30, 15, 0, 0.22));
}

.project-card .torn-inner {
  --sheet: #f7f0df;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.9rem 0.9rem 1.1rem;
}

.project-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card .shot {
  position: relative;
  aspect-ratio: 1.45;
  overflow: hidden;
  background: #221d18;
  box-shadow: inset 0 0 0 1px rgba(43, 26, 12, 0.2);
}

.project-card .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-card:hover .shot img {
  transform: scale(1.03);
}

.project-card .shot.logo {
  display: grid;
  place-items: center;
  padding: 1.6rem;
}

.project-card .shot.logo img {
  width: auto;
  height: 4.6rem;
  max-width: 70%;
  object-fit: contain;
}

.project-card .shot.obscura img {
  width: 78%;
  height: auto;
  max-width: 78%;
}

.project-card .shot.sprk { background: #2d1650; }
.project-card .shot.briefly { background: #fbf6ea; }
.project-card .shot.obscura { background: #e6e6e2; }

.project-card .shot.label {
  background:
    repeating-linear-gradient(0deg, transparent 0 1.55rem, rgba(43, 26, 12, 0.12) 1.55rem calc(1.55rem + 1px)),
    #eadfc8;
  color: var(--ink);
}

.project-card .shot.label .big {
  font-family: var(--serif);
  font-weight: 900;
  font-variation-settings: "opsz" 144;
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  transform: rotate(-4deg);
}

.stamp {
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  padding: 0.25rem 0.55rem;
  border: 2px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(8deg);
  opacity: 0.85;
  mix-blend-mode: multiply;
}

.stamp.on-dark {
  mix-blend-mode: normal;
  border-color: #ffd36b;
  color: #ffd36b;
}

.project-card h3 {
  margin: 1rem 0 0.3rem;
  font-family: var(--serif);
  font-weight: 900;
  font-variation-settings: "opsz" 72;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.project-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.5;
  flex: 1;
}

.project-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(43, 26, 12, 0.3);
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}

.project-card .meta .stack {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  text-align: right;
}

/* ---------- third page: about (notebook) ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}

.notebook-wrap {
  --rot: -0.6deg;
}

.notebook {
  --sheet: #fbf6e9;
  --line: 1.7rem;
  padding: 1.5rem clamp(1.4rem, 2.6vw, 2.4rem) 1.8rem clamp(3rem, 5vw, 4.4rem);
  background-image:
    linear-gradient(90deg, transparent calc(clamp(3rem, 5vw, 4.4rem) - 1.1rem), rgba(200, 39, 31, 0.45) calc(clamp(3rem, 5vw, 4.4rem) - 1.1rem), rgba(200, 39, 31, 0.45) calc(clamp(3rem, 5vw, 4.4rem) - 1.1rem + 2px), transparent calc(clamp(3rem, 5vw, 4.4rem) - 1.1rem + 2px)),
    repeating-linear-gradient(0deg, transparent 0 calc(var(--line) - 1px), rgba(95, 143, 179, 0.38) calc(var(--line) - 1px) var(--line));
  background-position: 0 0, 0 0.35rem;
}

.notebook h2 {
  margin: 0 0 var(--line);
  font-size: clamp(2.2rem, 3.4vw, 3.1rem);
  line-height: var(--line);
  padding-top: 0.1rem;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 1rem;
  margin-bottom: var(--line);
  line-height: var(--line);
}

.timeline .role {
  font-family: var(--serif);
  font-weight: 700;
  font-variation-settings: "opsz" 48;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.timeline .org {
  grid-column: 1 / -1;
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink-2);
}

.timeline .when {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-3);
  white-space: nowrap;
}

.timeline .what {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9rem;
  line-height: var(--line);
  color: var(--ink-2);
}

.notebook .resume-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: var(--line);
}

.notebook .resume-link span {
  border-bottom: 2px solid var(--ink);
  line-height: 1;
}

.notebook .resume-link svg {
  width: 1.6rem;
}

.about-side {
  display: grid;
  gap: clamp(1.4rem, 2.6vw, 2.4rem);
  padding-top: clamp(1rem, 3vw, 3rem);
}

.stack-note-wrap {
  --rot: 1.6deg;
}

.stack-note {
  --sheet: #efce63;
  padding: 1.4rem 1.5rem 1.3rem;
}

.stack-note h3 {
  margin: 0 0 0.6rem;
  font-size: 1.9rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.15rem 0.55rem;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(43, 26, 12, 0.35);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  transform: rotate(var(--r, 0deg));
}

.chips li:nth-child(3n) { --r: -1.2deg; }
.chips li:nth-child(4n) { --r: 1.4deg; }

.pin-note {
  position: relative;
  justify-self: start;
  max-width: 19rem;
  padding: 1.1rem 1.3rem 1.1rem;
  background: #f8f3e6;
  background-image: var(--noise);
  background-size: 220px 220px;
  box-shadow: 0.35rem 0.4rem 0 var(--shadow), 0 1px 2px rgba(30, 15, 0, 0.2);
  transform: rotate(-2.2deg);
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--ink-2);
}

.pin-note strong {
  color: var(--ink);
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: clamp(3rem, 6vw, 6rem);
  padding-top: 1.4rem;
  border-top: 2px dashed rgba(43, 26, 12, 0.32);
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink-2);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

.footer a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  transition: border-color 140ms ease;
}

.footer a:hover {
  border-color: var(--ink);
}

.footer .made {
  font-size: 1.05rem;
  color: var(--ink-3);
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .board {
    grid-template-areas:
      "n n n n n n n n n n n n n s s s s s s s s s s s"
      "p p p p p p p p p p p p p b b b b b b b b b b b"
      "p p p p p p p p p p p p p l l l l l l l l l l l"
      "o o o o o o o o o o o o w w w w w w w w w w w w";
  }

  .postcard-wrap {
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }

  .postcard {
    flex: 1;
  }

  .bio-wrap {
    margin-top: 0.4rem;
  }

  .sticker-row {
    gap: 0.8rem;
  }

  .sticker {
    width: 4rem;
  }

  .sticker-row > li {
    flex: 0 0 auto;
  }

  .project-card .meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .project-card .meta .stack {
    text-align: left;
  }

  .globe-cell,
  .ticket,
  .smiley,
  .sparks {
    display: none;
  }

  .name-block h1 {
    font-size: clamp(4rem, 9vw, 7.5rem);
  }

  .polaroid-cell {
    margin-top: 0;
  }

  .polaroid {
    width: min(100%, 16rem);
    margin: 0 auto;
  }

  .software-wrap {
    margin-top: 0;
  }

  .tool-row {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
  }

  .tool-grid {
    width: 100%;
  }

  .trade-note {
    margin: 0 0.3rem 0 0;
    transform: rotate(-3deg);
  }

  .trade-note svg {
    transform: scaleX(-1) rotate(-62deg);
  }

  .about-grid,
  .slate-grid {
    grid-template-columns: 1fr;
  }

  .slate-note-wrap {
    margin-top: 0;
  }

  .slate-col {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
  }

  .about-side {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    padding-top: 0;
  }
}

@media (max-width: 820px) {
  .board {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2.2rem;
  }

  .name-block {
    order: 1;
    transform: rotate(-1.5deg);
    padding-left: 0.2rem;
  }

  .name-block h1 {
    font-size: clamp(3.9rem, 15.5vw, 6.5rem);
  }

  .spotify-wrap {
    order: 2;
    width: 100%;
    margin-top: 0.5rem;
  }

  .postcard-wrap { order: 3; }
  .bio-wrap { order: 4; margin-top: 0; }
  .polaroid-cell { order: 5; margin: 0; }
  .polaroid { width: min(100%, 17rem); margin: 0 auto; }
  .socials-wrap { order: 6; }
  .software-wrap { order: 7; }

  .postcard {
    min-height: 16rem;
  }

  .tool-grid {
    grid-template-columns: repeat(4, max-content);
    justify-content: start;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-side,
  .slate-col {
    grid-template-columns: 1fr;
  }

  .slate-photo {
    width: 50%;
  }

}

@media (max-width: 560px) {
  .page {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .nav-links {
    gap: 0.2rem 0.8rem;
  }

  .song {
    grid-template-columns: 4.6rem 1fr;
  }

  .controls {
    padding: 0;
  }

  .sticker-row {
    gap: 0.55rem;
    flex-wrap: nowrap;
  }

  .sticker-row > li {
    flex: 1 1 0;
    min-width: 0;
  }

  .sticker {
    width: 100%;
    min-width: 0;
    padding: 0.22rem;
    border-radius: 1rem;
  }

  .sticker-face {
    border-radius: 0.8rem;
  }

  .tool-grid {
    grid-template-columns: repeat(4, max-content);
    gap: 0.7rem;
    justify-content: space-between;
  }

  .tool {
    width: 3.9rem;
  }

  .trade-note {
    margin-right: 0.6rem;
  }

  .trade-note svg {
    transform: rotate(-45deg);
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .slate-wordmark {
    letter-spacing: 0.3em;
  }

  .timeline .when {
    line-height: var(--line);
  }

  .scrap-tl {
    width: 8rem;
    height: 11rem;
  }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- print: keep it legible ---------- */

@media print {
  body::before,
  .scrap,
  .nav,
  .tape {
    display: none;
  }

  .torn {
    filter: none;
    transform: none;
  }
}
