/* =========================================================
   Ruby Chen — portfolio
   Theme: a warm manila folder on a desk. Paper, tape, stamps.
   ========================================================= */

:root {
  /* desk + folders */
  --desk: #2b201a;
  --desk-2: #3a2b22;
  --manila: #ecd6a4;
  --kraft: #dcbc8c;
  --blush: #eec4ae;
  --mint: #cfdcb4;
  --folder: var(--manila);

  /* paper + ink */
  --paper: #fbf6ec;
  --paper-2: #f3ead8;
  --card: #fffdf7;
  --ink: #1d1713;
  --ink-2: #4a3e35;
  --muted: #7b6b5d;
  --rule: rgba(64, 98, 150, 0.17);

  /* accents */
  --tomato: #e2512b;
  --mustard: #f2b43a;
  --sage: #8fb08a;
  --blue: #2d57cf;
  --plum: #2a1e3b;
  --pink: #f29a8e;

  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-hand: "Caveat", "Bradley Hand", cursive;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* textures */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .22 0 0 0 0 .12 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,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008 .04' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .15 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --stamp-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 0 0 0 3.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-display);
  font-size: clamp(16px, 1.05vw + 10px, 18px);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--desk);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(255, 210, 150, 0.12), transparent 70%),
    var(--grain),
    repeating-linear-gradient(97deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 9px, rgba(255, 255, 255, 0.015) 9px 11px, transparent 11px 23px);
  background-attachment: fixed, scroll, scroll;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 0.95; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--mustard); color: var(--ink); }

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--mustard);
  color: var(--ink);
  padding: 10px 14px;
  font-family: var(--f-mono);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.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;
}

/* ---------- scroll progress (a pencil line) ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  z-index: 60;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: repeating-linear-gradient(90deg, var(--tomato) 0 14px, var(--mustard) 14px 28px);
}

/* ---------- layout shell ---------- */
.shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px) clamp(10px, 3vw, 40px) 0;
}

/* folder tabs = main nav */
.tabs {
  display: flex;
  align-items: flex-end;
  gap: clamp(4px, 0.8vw, 10px);
  padding-left: clamp(10px, 3.5vw, 44px);
  position: relative;
  z-index: 3;
}
.tab {
  --tab: var(--paper-2);
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px clamp(14px, 2.2vw, 28px) 16px;
  margin-bottom: -6px;
  font-family: var(--f-mono);
  font-size: clamp(11px, 0.4vw + 9px, 13px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--tab) var(--fiber);
  border-radius: 14px 14px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 -2px 10px rgba(0, 0, 0, 0.18);
  transform: translateY(8px);
  filter: brightness(0.86) saturate(0.9);
  transition: transform 0.35s var(--ease-back), filter 0.25s;
}
.tab small { font-size: 0.85em; opacity: 0.55; }
.tab:hover { transform: translateY(0); filter: none; }
.tab[aria-current="page"] {
  transform: none;
  filter: none;
  padding-bottom: 22px;
  margin-bottom: -12px;
  z-index: 2;
}
.tab--home { --tab: var(--manila); }
.tab--about { --tab: var(--kraft); }
.tab--fun { --tab: var(--blush); }
.tab--work { --tab: var(--mint); }

.tab-hint {
  margin-left: auto;
  margin-right: clamp(10px, 3vw, 40px);
  padding-bottom: 14px;
  font-family: var(--f-hand);
  font-size: 22px;
  color: rgba(255, 238, 210, 0.7);
  transform: rotate(-3deg);
}

/* the folder itself */
.folder {
  position: relative;
  z-index: 1;
  background-color: var(--folder);
  background-image: var(--fiber), var(--grain);
  border-radius: 6px 22px 18px 18px;
  padding: clamp(18px, 4.5vw, 64px) clamp(14px, 4.5vw, 64px) clamp(40px, 6vw, 90px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 0 rgba(0, 0, 0, 0.06),
    0 40px 80px -30px rgba(0, 0, 0, 0.75),
    0 6px 0 -2px color-mix(in srgb, var(--folder) 70%, #000);
  animation: folder-in 0.9s var(--ease) both;
}
/* score lines near the bottom of a real folder */
.folder::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 7px;
  border-top: 1px solid rgba(80, 55, 25, 0.18);
  border-bottom: 1px solid rgba(80, 55, 25, 0.18);
  pointer-events: none;
}
body.page-home { --folder: var(--manila); }
body.page-about { --folder: var(--kraft); }
body.page-fun { --folder: var(--blush); }
body.page-work { --folder: var(--mint); }

@keyframes folder-in {
  from { opacity: 0; transform: translateY(50px) rotate(0.8deg); }
}
body.leaving .folder {
  transition: transform 0.4s var(--ease), opacity 0.35s;
  transform: translateY(70px) rotate(-1.2deg);
  opacity: 0;
}
body.leaving .tabs { transition: opacity 0.3s; opacity: 0.4; }

/* folder label sticker */
.folder-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  background: var(--card);
  border: 1.5px solid rgba(29, 23, 19, 0.75);
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.12);
  transform: rotate(-1.5deg);
}
.folder-label b { color: var(--tomato); }
.folder-label .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--tomato);
  box-shadow: 0 0 0 3px rgba(226, 81, 43, 0.2);
  animation: blink 1.8s infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- paper primitives ---------- */
.sheet {
  position: relative;
  background-color: var(--paper);
  background-image: var(--fiber), var(--grain);
  border-radius: 3px;
  box-shadow:
    0 1px 1px rgba(60, 40, 20, 0.12),
    0 18px 40px -18px rgba(60, 35, 15, 0.45);
}
.sheet--lined {
  background-image:
    linear-gradient(90deg, transparent 54px, rgba(226, 81, 43, 0.38) 54px 55.5px, transparent 55.5px),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px),
    var(--fiber), var(--grain);
  background-position: 0 0, 0 18px, 0 0, 0 0;
}
.sheet--grid {
  background-image:
    repeating-linear-gradient(0deg, var(--rule) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 26px),
    var(--fiber), var(--grain);
}
/* a page peeking out behind a sheet */
.sheet--stacked::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--paper-2) var(--grain);
  border-radius: 3px;
  transform: rotate(2.2deg) translate(8px, 6px);
  box-shadow: 0 10px 30px -14px rgba(60, 35, 15, 0.5);
}

/* washi tape */
.tape {
  --tape: rgba(242, 180, 58, 0.62);
  position: absolute;
  z-index: 3;
  width: 112px;
  height: 30px;
  background: var(--tape);
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 40%, rgba(255, 255, 255, 0.15));
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 10%, 96% 0, 100% 8%, 100% 92%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 90%, 4% 100%, 0 92%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}
.tape--pink { --tape: rgba(242, 154, 142, 0.66); }
.tape--sage { --tape: rgba(143, 176, 138, 0.68); }
.tape--blue { --tape: rgba(120, 150, 230, 0.55); }
.tape--tl { top: -14px; left: -26px; transform: rotate(-32deg); }
.tape--tr { top: -14px; right: -26px; transform: rotate(32deg); }
.tape--top { top: -15px; left: 50%; transform: translateX(-50%) rotate(-3deg); }
.tape--bl { bottom: -12px; left: -22px; transform: rotate(28deg); }

/* polaroid */
.polaroid {
  position: relative;
  margin: 0;
  padding: 12px 12px 54px;
  background: var(--card) var(--grain);
  border-radius: 2px;
  rotate: var(--r, -3deg);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.12), 0 26px 46px -20px rgba(40, 25, 10, 0.55);
  transition: rotate 0.5s var(--ease-back), box-shadow 0.4s;
}
.polaroid img {
  width: 100%;
  aspect-ratio: var(--ar, 4 / 5);
  object-fit: cover;
  object-position: var(--op, center);
  filter: saturate(0.92) contrast(1.03) sepia(0.06);
}
.polaroid figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  font-family: var(--f-hand);
  font-size: clamp(19px, 1.2vw + 12px, 24px);
  line-height: 1.1;
  text-align: center;
  color: var(--ink-2);
}
.polaroid:hover { rotate: 0deg; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.12), 0 36px 60px -24px rgba(40, 25, 10, 0.6); }

/* rubber stamp */
.stamp {
  --sc: var(--tomato);
  display: inline-block;
  padding: 8px 14px 6px;
  border: 3.5px solid var(--sc);
  border-radius: 8px;
  outline: 1.5px solid var(--sc);
  outline-offset: 3px;
  color: var(--sc);
  font-family: var(--f-mono);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  rotate: var(--r, -10deg);
  -webkit-mask-image: var(--stamp-mask);
  mask-image: var(--stamp-mask);
  mix-blend-mode: multiply;
}
.stamp small { display: block; font-size: 0.68em; font-weight: 700; letter-spacing: 0.18em; }
.stamp--blue { --sc: var(--blue); }
.stamp--ink { --sc: var(--ink); }
.stamp--sage { --sc: #4d7a49; }

.js .stamp.reveal { opacity: 0; transform: scale(2.4); transition: opacity 0.2s, transform 0.45s var(--ease-back); transition-delay: var(--d, 0s); }
.js .stamp.reveal.in { opacity: 0.92; transform: scale(1); }

/* neo-brutal sticker chip */
.chip {
  --cc: var(--card);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--cc);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 600;
  font-size: 0.92em;
  line-height: 1.3;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-back), box-shadow 0.25s;
}
.chip:hover { transform: translate(-2px, -2px) rotate(-2deg); box-shadow: 5px 5px 0 var(--ink); }
.chip--mustard { --cc: var(--mustard); }
.chip--tomato { --cc: var(--tomato); color: #fff; }
.chip--sage { --cc: var(--sage); }
.chip--blue { --cc: var(--blue); color: #fff; }
.chip--pink { --cc: var(--pink); }
.chip--plum { --cc: var(--plum); color: #fff; }

/* label-maker tape */
.dymo {
  --dy: var(--ink);
  display: inline-block;
  padding: 7px 13px 6px;
  background: var(--dy);
  color: #f6efe2;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 3px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), 0 -1px 0 rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.3), 0 3px 6px -2px rgba(0, 0, 0, 0.35);
  rotate: var(--r, 0deg);
  transition: rotate 0.3s var(--ease-back), transform 0.3s var(--ease-back);
}
.dymo:hover { transform: translateY(-3px); rotate: 0deg; }
.dymo--red { --dy: #b8321a; }
.dymo--blue { --dy: #23419b; }
.dymo--green { --dy: #2f5b3a; }
.dymo--plum { --dy: var(--plum); }

/* buttons */
.btn {
  --bs: var(--tomato);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 5px 5px 0 var(--bs);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--bs); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--bs); }
.btn--ghost { color: var(--ink); background: var(--card); --bs: var(--ink); }
.btn--mustard { --bs: var(--mustard); }
.btn .arr { transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* type helpers */
.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hand { font-family: var(--f-hand); font-weight: 600; }
.kicker {
  display: inline-block;
  font-family: var(--f-hand);
  font-size: clamp(24px, 1.6vw + 14px, 32px);
  font-weight: 600;
  color: var(--ink-2);
  rotate: -3deg;
}
.display {
  font-weight: 800;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.86;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 85;
}
.outline {
  color: var(--tomato);
  text-shadow: 0.035em 0.035em 0 var(--ink);
}
.mark {
  background: linear-gradient(100deg, transparent 0 2%, var(--mustard) 2% 97%, transparent 97%) no-repeat 0 88% / 0% 42%;
  transition: background-size 1.1s var(--ease) 0.35s;
  padding: 0 0.08em;
  margin: 0 -0.08em;
}
.mark--pink { background-image: linear-gradient(100deg, transparent 0 2%, var(--pink) 2% 97%, transparent 97%); }
.in .mark, .mark.in { background-size: 100% 42%; }

.section { padding-top: clamp(70px, 10vw, 140px); }
.section-head { text-align: center; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .kicker { margin-bottom: 8px; }
.section-head p { max-width: 560px; margin: 16px auto 0; color: var(--ink-2); }

/* hand-drawn underline */
.squiggle { display: block; width: min(260px, 60%); height: 18px; margin: 10px auto 0; overflow: visible; }
.squiggle path {
  fill: none; stroke: var(--tomato); stroke-width: 3.5; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s var(--ease) 0.3s;
}
.in .squiggle path, .squiggle.in path { stroke-dashoffset: 0; }

/* ---------- scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(46px) rotate(var(--rr, 1.5deg));
  transition: opacity 0.8s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal--drop { transform: translateY(-40px) rotate(-7deg) scale(1.06); }
.js .reveal--left { transform: translateX(-70px) rotate(-4deg); }
.js .reveal--right { transform: translateX(70px) rotate(4deg); }
.js .reveal--pop { transform: scale(0.6) rotate(-8deg); transition-timing-function: var(--ease), var(--ease-back); }
.js .reveal.in { opacity: 1; transform: none; }

/* split letters */
[data-split] .line { display: block; white-space: nowrap; }
.split-char {
  display: inline-block;
  transform-origin: 50% 100%;
}
.js .split .split-char {
  opacity: 0;
  transform: translateY(0.6em) rotate(var(--cr, 8deg)) scale(0.9);
  animation: char-in 0.9s var(--ease-back) forwards;
  animation-delay: calc(0.25s + var(--ci) * 0.055s);
}
@keyframes char-in { to { opacity: 1; transform: none; } }

/* ---------- marquee band ---------- */
.band {
  position: relative;
  margin: clamp(50px, 7vw, 90px) calc(clamp(14px, 4.5vw, 64px) * -1) 0;
  padding: 14px 0;
  background: var(--ink);
  color: var(--paper);
  rotate: -1.6deg;
  overflow: hidden;
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.6);
}
.band--mustard { background: var(--mustard); color: var(--ink); rotate: 1.2deg; margin-top: -8px; }
.band-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.band-track span {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 36px);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-variation-settings: "wdth" 88;
}
.band-track i { font-style: normal; color: var(--tomato); }
.band--mustard .band-track i { color: var(--paper); }

/* ---------- floating dock ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 50;
  display: flex;
  gap: 4px;
  padding: 6px;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(6px);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-50%, 140%);
  transition: transform 0.5s var(--ease-back);
}
.dock.show { transform: translate(-50%, 0); }
.dock a {
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}
.dock a { white-space: nowrap; }
.dock a:hover { background: var(--paper-2); }
.dock a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.dock .dock-mail { background: var(--mustard); }
.dock .dock-mail:hover { background: var(--tomato); color: #fff; }

/* ---------- footer (on the desk) ---------- */
.desk-footer {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) clamp(20px, 5vw, 70px) 110px;
  color: #f3e6cf;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: end;
}
.desk-footer .big {
  font-weight: 800;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.88;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 85;
}
.desk-footer .big em { font-style: normal; color: var(--mustard); }
.desk-footer .mail {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--f-hand);
  font-size: clamp(30px, 3vw, 44px);
  color: var(--mustard);
  text-decoration: none;
  background: linear-gradient(var(--tomato), var(--tomato)) no-repeat 0 100% / 0% 3px;
  transition: background-size 0.4s var(--ease);
}
.desk-footer .mail:hover { background-size: 100% 3px; }
.foot-meta { text-align: right; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(243, 230, 207, 0.65); }
.foot-meta nav { display: flex; gap: 18px; justify-content: flex-end; margin-bottom: 18px; flex-wrap: wrap; }
.foot-meta a { text-decoration: none; color: #f3e6cf; }
.foot-meta a:hover { color: var(--mustard); }

/* =========================================================
   HOME
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  margin-top: 26px;
}
.hero-sheet { padding: clamp(28px, 4vw, 54px) clamp(22px, 4vw, 54px) clamp(30px, 4vw, 48px) clamp(70px, 7vw, 96px); }
.clip {
  position: absolute;
  top: -26px;
  left: clamp(84px, 9vw, 120px);
  width: 30px;
  z-index: 4;
  filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.25));
}
.hello {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  font-family: var(--f-hand);
  font-size: clamp(28px, 2vw + 14px, 38px);
  font-weight: 600;
  color: var(--tomato);
  rotate: -4deg;
  margin-bottom: 6px;
}
.hello svg { width: 70px; height: 40px; }
.hello svg path { fill: none; stroke: var(--tomato); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-name {
  font-weight: 800;
  font-size: clamp(76px, 13.5vw, 200px);
  line-height: 0.8;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 85;
  margin-left: -0.04em;
}
.hero-name .line { display: block; white-space: nowrap; }
.hero-name .outline { text-shadow: 0.03em 0.03em 0 var(--ink); }
.hero-lede {
  margin-top: clamp(20px, 3vw, 34px);
  font-size: clamp(22px, 1.6vw + 12px, 32px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.hero-copy { max-width: 46ch; color: var(--ink-2); margin-top: 16px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 26px; }
.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1.5px dashed rgba(29, 23, 19, 0.25);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: #3f9b5a; box-shadow: 0 0 0 4px rgba(63, 155, 90, 0.2); animation: blink 1.8s infinite; }

.hero-side { position: relative; padding: 20px 10px 40px; }
.hero-side .polaroid { --r: 4deg; --ar: 1 / 1.05; max-width: 380px; margin-left: auto; }
.hero-side .stamp { position: absolute; left: -18px; bottom: 70px; z-index: 5; font-size: 14px; }
.sticky-note {
  position: absolute;
  z-index: 4;
  width: 190px;
  padding: 22px 18px 18px;
  background: #ffe98a;
  background-image: var(--grain);
  font-family: var(--f-hand);
  font-size: 23px;
  line-height: 1.1;
  color: var(--ink);
  rotate: var(--r, -6deg);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.08), 0 22px 30px -16px rgba(60, 40, 0, 0.55);
  clip-path: polygon(0 0, 100% 0, 100% 86%, 88% 100%, 0 100%);
}
.sticky-note::after {
  content: "";
  position: absolute; right: 0; bottom: 0; width: 12%; height: 14%;
  background: linear-gradient(135deg, #f1d468 50%, transparent 50%);
}
.hero-side .sticky-note { top: -16px; left: -30px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 22px);
  margin-top: clamp(40px, 6vw, 70px);
}
.stat {
  padding: 18px 18px 16px;
  background: var(--card) var(--grain);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--ink);
}
.stat b {
  display: block;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.015em;
  font-variation-settings: "wdth" 88;
}
.stat span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.stat:nth-child(1) { background-color: var(--mustard); }
.stat:nth-child(3) { background-color: var(--pink); }

/* work stack */
.work-stack { display: grid; gap: clamp(40px, 6vw, 70px); padding-bottom: 20px; }
.work-card {
  --c: var(--plum);
  --on: var(--paper);
  position: sticky;
  top: calc(28px + var(--i, 0) * 18px);
  transform-origin: 50% 0;
  will-change: transform;
}
.work-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: var(--tab-x, 0%);
  padding: 10px 26px 12px;
  background: var(--c);
  color: var(--on);
  border-radius: 12px 12px 0 0;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  top: 1px;
}
.work-body {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 4vw, 52px);
  background-color: var(--c);
  background-image: var(--grain);
  color: var(--on);
  border-radius: 0 14px 14px 14px;
  box-shadow: 0 30px 60px -28px rgba(30, 15, 5, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  min-height: clamp(380px, 46vw, 520px);
}
.work-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}
.work-meta::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.work-body h3 {
  margin: 14px 0 6px;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.015em;
  font-variation-settings: "wdth" 88;
}
.work-role { font-family: var(--f-hand); font-size: 26px; font-weight: 600; opacity: 0.9; margin-bottom: 14px; }
.work-body p { max-width: 44ch; opacity: 0.92; }
.work-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.work-tags li {
  padding: 5px 10px 4px;
  background: var(--on);
  color: var(--c);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}
.work-shot {
  position: relative;
  margin: 0;
  padding: 10px;
  background: var(--card);
  border-radius: 3px;
  rotate: var(--r, 1.5deg);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.6);
  transition: rotate 0.5s var(--ease-back);
}
.work-card:hover .work-shot { rotate: 0deg; }
.work-shot img { width: 100%; border-radius: 1px; }
.work-shot figcaption {
  font-family: var(--f-hand);
  font-size: 20px;
  color: var(--ink-2);
  padding: 8px 4px 0;
}
.work-card:nth-child(1) { --c: var(--plum); --tab-x: 0%; }
.work-card:nth-child(2) { --c: var(--blue); --tab-x: 22%; }
.work-card:nth-child(3) { --c: var(--tomato); --tab-x: 44%; }
.work-card:nth-child(4) { --c: var(--mustard); --on: var(--ink); --tab-x: 66%; }

/* TV frame around the Xfinity shot */
.tv { padding: 12px 12px 26px; background: #121016; border-radius: 10px; position: relative; }
.tv::after { content: ""; position: absolute; left: 50%; bottom: 9px; width: 40px; height: 4px; border-radius: 2px; background: #3a3540; transform: translateX(-50%); }
.tv img { border-radius: 3px; }

/* EOG timecard mock */
.timecard {
  position: relative;
  padding: 20px 22px 22px;
  background: var(--card);
  color: var(--ink);
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: 13px;
  rotate: -1.5deg;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.6);
}
.timecard header { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.timecard header img { width: 44px; height: 44px; }
.timecard header b { font-family: var(--f-display); font-size: 22px; letter-spacing: -0.02em; }
.timecard header span { margin-left: auto; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; text-align: right; }
.timecard table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.timecard td { padding: 8px 4px; border-bottom: 1px dashed rgba(29, 23, 19, 0.2); }
.timecard td:last-child { text-align: right; font-weight: 700; }
.timecard td:nth-child(2) { width: 62%; padding-left: 14px; padding-right: 14px; }
.timecard .bar { display: block; height: 8px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.timecard .bar i { display: block; height: 100%; width: var(--w); background: var(--tomato); border-radius: 4px; transform-origin: 0 50%; transform: scaleX(0); transition: transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.timecard.in .bar i { transform: scaleX(1); }
.timecard tfoot td { border: 0; padding-top: 14px; font-weight: 700; }
.timecard .stamp { position: absolute; right: 18px; bottom: 54px; font-size: 18px; }
.mock-note { font-family: var(--f-hand); font-size: 20px; margin-top: 12px; opacity: 0.9; }

/* now / cta row */
.now {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.now-note {
  position: relative;
  padding: clamp(30px, 4vw, 46px) clamp(26px, 4vw, 44px) clamp(30px, 4vw, 46px) 76px;
  font-size: clamp(18px, 0.8vw + 13px, 21px);
}
.now-note h3 { font-family: var(--f-hand); font-size: clamp(38px, 3vw, 50px); font-weight: 700; color: var(--tomato); margin-bottom: 14px; line-height: 1; letter-spacing: 0; }
.now-note ul li { position: relative; padding-left: 30px; margin-bottom: 8px; line-height: 32px; }
.now-note ul li::before { content: "→"; position: absolute; left: 0; color: var(--tomato); font-weight: 800; }
.now-side h2 { margin: 8px 0 18px; }
.now-side p { color: var(--ink-2); max-width: 46ch; }

/* =========================================================
   ABOUT / RÉSUMÉ
   ========================================================= */
.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  margin-top: 26px;
}
.page-head .display { margin: 16px 0 20px; }
.page-head .lede { font-size: clamp(20px, 1.2vw + 12px, 26px); font-weight: 500; line-height: 1.35; max-width: 32ch; }
.page-head .lede + p { color: var(--ink-2); max-width: 50ch; margin-top: 18px; }

.idcard {
  position: relative;
  padding: 20px 22px;
  background: var(--card) var(--grain);
  border-radius: 8px;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  rotate: 2deg;
}
.idcard-top { display: flex; gap: 16px; align-items: center; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 2px dashed rgba(29, 23, 19, 0.3); }
.idcard-top img { width: 92px; height: 112px; object-fit: cover; border-radius: 4px; border: 2px solid var(--ink); }
.idcard-top b { display: block; font-size: 28px; font-weight: 800; letter-spacing: 0; line-height: 1; }
.idcard-top span { font-family: var(--f-hand); font-size: 22px; color: var(--tomato); }
.idcard dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 15px; }
.idcard dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.idcard dd { margin: 0; font-weight: 600; }
.idcard .stamp { position: absolute; right: -14px; bottom: -22px; font-size: 13px; background: rgba(255, 253, 247, 0.4); }

/* origin route */
.route { position: relative; padding: clamp(30px, 4vw, 50px) clamp(16px, 3vw, 40px); }
.route svg.route-line { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.route-line .dash { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 9 9; vector-effect: non-scaling-stroke; }
.route-line .draw { fill: none; stroke: #fff; stroke-width: 40; stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--rp, 0)); }
.stops { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2.5vw, 30px); }
.stop {
  position: relative;
  padding: 20px 18px 18px;
  background: var(--card) var(--grain);
  border-radius: 4px;
  box-shadow: 0 16px 30px -18px rgba(40, 25, 10, 0.55);
  rotate: var(--r, 0deg);
}
.stop .yr { font-weight: 800; font-size: 34px; letter-spacing: -0.015em; line-height: 1; font-variation-settings: "wdth" 88; }
.stop h4 { font-size: 19px; margin: 8px 0 6px; letter-spacing: -0.01em; line-height: 1.1; }
.stop p { font-size: 15px; color: var(--ink-2); margin: 0; line-height: 1.45; }
.stop .emoji { position: absolute; top: -18px; right: 14px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); background: var(--mustard); font-size: 20px; box-shadow: 2px 2px 0 var(--ink); }
.stop:nth-child(2) .emoji { background: var(--pink); }
.stop:nth-child(3) .emoji { background: var(--sage); }
.stop:nth-child(4) .emoji { background: var(--tomato); }

/* deal the cards in left → right, then pop the badges; grow on hover */
.stop { transition: scale 0.35s var(--ease-back), rotate 0.35s var(--ease-back), box-shadow 0.35s var(--ease); }
.js .stop.reveal {
  transform: translate(-80px, 40px) rotate(-10deg) scale(0.88);
  transition:
    opacity 0.6s var(--ease) var(--d, 0s),
    transform 0.9s var(--ease-back) var(--d, 0s),
    scale 0.35s var(--ease-back) 0s,
    rotate 0.35s var(--ease-back) 0s,
    box-shadow 0.35s var(--ease) 0s;
}
.js .stop.reveal.in { transform: none; }
.js .stop .emoji { transform: scale(0) rotate(-90deg); transition: transform 0.5s var(--ease-back) calc(var(--d, 0s) + 0.55s); }
.js .stop.in .emoji { transform: none; }
.stop:hover {
  z-index: 2;
  scale: 1.07;
  rotate: 0deg;
  box-shadow: 0 30px 50px -22px rgba(40, 25, 10, 0.6);
}
.stop:hover .emoji { animation: wiggle 0.5s var(--ease) ; }
@keyframes wiggle { 30% { rotate: -14deg; } 60% { rotate: 10deg; } }

/* timeline */
.timeline { position: relative; display: grid; gap: clamp(26px, 4vw, 40px); padding-left: clamp(50px, 9vw, 150px); }
.timeline::before,
.timeline-ink {
  content: "";
  position: absolute;
  left: clamp(18px, 4vw, 64px);
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 2px;
  background: rgba(29, 23, 19, 0.14);
}
.timeline-ink {
  background: var(--ink);
  transform-origin: 50% 0;
  transform: scaleY(var(--tp, 0));
}
.job {
  position: relative;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 36px);
  padding: clamp(22px, 3vw, 34px) clamp(20px, 3vw, 38px) clamp(20px, 3vw, 30px) clamp(70px, 6vw, 84px);
}
.job::after {
  /* the pin on the timeline */
  content: "";
  position: absolute;
  top: 34px;
  left: calc((clamp(50px, 9vw, 150px) - clamp(18px, 4vw, 64px)) * -1 - 9px);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--jc, var(--mustard));
  box-shadow: 0 0 0 5px var(--folder);
}
.job-when .yrs { font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: 0; font-variation-settings: "wdth" 88; }
.job-when .place { display: block; margin-top: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.job-when .now-badge { margin-top: 12px; }
.job h3 { font-size: clamp(26px, 2.4vw, 34px); font-weight: 800; letter-spacing: 0; line-height: 1.05; }
.job .role { font-family: var(--f-hand); font-size: 25px; font-weight: 600; color: var(--tomato); line-height: 1.2; margin: 2px 0 10px; }
.job ul.points li { position: relative; padding-left: 22px; margin-bottom: 6px; line-height: 32px; }
.job ul.points li::before { content: "+"; position: absolute; left: 2px; font-weight: 800; color: var(--tomato); }
.job .work-tags { margin-top: 14px; }
.job .work-tags li { background: var(--ink); color: var(--paper); }
.job:nth-child(3) { --jc: var(--pink); }
.job:nth-child(4) { --jc: var(--sage); }
.job:nth-child(5) { --jc: var(--tomato); }
.job:nth-child(6) { --jc: var(--blue); }
.job:nth-child(7) { --jc: var(--plum); }
.job:nth-child(8) { --jc: var(--paper-2); }

/* skills */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 3vw, 36px); }
.skill-card { padding: clamp(26px, 3vw, 36px); }
.skill-card h3 { display: flex; align-items: baseline; gap: 12px; font-size: clamp(26px, 2.2vw, 32px); font-weight: 800; letter-spacing: 0; margin-bottom: 6px; }
.skill-card h3 .n { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--tomato); }
.skill-card > p { color: var(--ink-2); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px 10px; margin-top: 16px; }
.skill-card:nth-child(odd) { rotate: -0.8deg; }
.skill-card:nth-child(even) { rotate: 0.9deg; }

.toolbox {
  position: relative;
  margin-top: clamp(34px, 5vw, 56px);
  padding: clamp(30px, 4vw, 48px);
  background: #3b2c22 var(--grain);
  border-radius: 12px;
  color: var(--paper);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.06), inset 0 -8px 20px rgba(0, 0, 0, 0.35), 0 26px 40px -24px rgba(0, 0, 0, 0.7);
}
.toolbox::before {
  /* drawer handle */
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 120px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(#c9a46a, #8d6a3b);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.toolbox h3 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 800; letter-spacing: 0; }
.toolbox .hand { color: var(--mustard); font-size: 24px; display: block; margin-top: 4px; }
.toolbox .labels { display: flex; flex-wrap: wrap; gap: 16px 12px; margin-top: 24px; }
.toolbox .dymo { font-size: 13px; }

/* education */
.edu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 30px); }
.index-card {
  position: relative;
  padding: 50px 22px 22px;
  background-color: var(--card);
  background-image:
    linear-gradient(180deg, transparent 38px, rgba(226, 81, 43, 0.5) 38px 40px, transparent 40px),
    repeating-linear-gradient(180deg, transparent 0 27px, var(--rule) 27px 28px),
    var(--grain);
  background-position: 0 0, 0 40px, 0 0;
  border-radius: 3px;
  box-shadow: 0 16px 30px -18px rgba(40, 25, 10, 0.55);
  rotate: var(--r, 0deg);
  line-height: 28px;
}
.index-card .mono { position: absolute; top: 12px; left: 22px; color: var(--tomato); }
.index-card h4 { font-size: 22px; letter-spacing: -0.02em; line-height: 28px; }
.index-card p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* contact envelope */
.contact { position: relative; padding-top: clamp(80px, 11vw, 150px); }
.envelope {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  perspective: 1400px;
}
.env-letter {
  position: relative;
  z-index: 2;
  margin: 0 clamp(14px, 4vw, 48px);
  padding: clamp(30px, 5vw, 56px) clamp(24px, 5vw, 60px) clamp(120px, 11vw, 140px);
  text-align: center;
}
.js .env-letter { transform: translateY(120px); transition: transform 1.2s var(--ease) 0.35s; }
.js .envelope.in .env-letter { transform: translateY(0); }
.env-letter .display { font-size: clamp(54px, 9vw, 120px); margin: 8px 0 18px; }
.env-letter p { max-width: 44ch; margin: 0 auto 26px; color: var(--ink-2); }
.email-big {
  display: inline-block;
  font-weight: 800;
  font-size: clamp(26px, 4.4vw, 56px);
  letter-spacing: -0.015em;
  line-height: 1.05;
  text-decoration: none;
  word-break: break-word;
  background: linear-gradient(var(--mustard), var(--mustard)) no-repeat 0 90% / 100% 34%;
  transition: background-size 0.4s var(--ease), color 0.2s;
}
.email-big:hover { background-size: 100% 100%; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 30px; }
.env-body {
  position: relative;
  z-index: 3;
  margin-top: -90px;
  height: clamp(150px, 18vw, 200px);
  pointer-events: none;
  background: #e7c07a var(--fiber);
  border-radius: 6px 6px 12px 12px;
  box-shadow: 0 30px 60px -26px rgba(0, 0, 0, 0.7);
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
}
.env-body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.08), transparent 60%), linear-gradient(200deg, rgba(0, 0, 0, 0.08), transparent 60%);
}
.env-back {
  position: absolute;
  z-index: 1;
  left: 0; right: 0; bottom: 0;
  height: calc(clamp(150px, 18vw, 200px) + 60px);
  background: #d8ab62 var(--fiber);
  border-radius: 6px 6px 12px 12px;
}
.env-stamp {
  position: absolute;
  z-index: 4;
  right: clamp(14px, 4vw, 40px);
  bottom: clamp(24px, 4vw, 40px);
}
.copy-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 70;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--mustard);
  transform: translate(-50%, -120px);
  transition: transform 0.45s var(--ease-back);
}
.copy-toast.show { transform: translate(-50%, 0); }

/* =========================================================
   FUN
   ========================================================= */
.fun-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
  margin-top: 26px;
}
.fan {
  position: relative;
  height: clamp(380px, 44vw, 540px);
}
.fan .polaroid {
  position: absolute;
  width: clamp(170px, 20vw, 250px);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  animation: fan-out 1.2s var(--ease-back) both;
  animation-delay: var(--fd, 0.3s);
}
.fan .polaroid:nth-child(1) { --r: -14deg; --fx: -62%; --fy: 4%; --fd: 0.45s; }
.fan .polaroid:nth-child(2) { --r: 11deg; --fx: 58%; --fy: -2%; --fd: 0.6s; }
.fan .polaroid:nth-child(3) { --r: -2deg; --fx: -2%; --fy: -10%; --fd: 0.75s; z-index: 2; }
.fan .polaroid { transform: translate(var(--fx), var(--fy)); }
@keyframes fan-out {
  from { transform: translate(0, 30%) scale(0.85); rotate: 0deg; opacity: 0; }
}
.fan .stamp { position: absolute; right: 2%; bottom: 4%; z-index: 4; }

.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
}
.entry + .entry { margin-top: clamp(80px, 11vw, 150px); }
.entry--flip .entry-media { order: 2; }
.entry-media { position: relative; min-height: 340px; }
.entry-text .num { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--tomato); text-transform: uppercase; }
.entry-text h2 {
  margin: 12px 0 18px;
  font-size: clamp(44px, 6vw, 86px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 0.88;
  text-transform: uppercase;
  font-variation-settings: "wdth" 85;
}
.entry-text p { color: var(--ink-2); max-width: 44ch; }
.entry-text .aside { font-family: var(--f-hand); font-size: 25px; color: var(--ink); rotate: -2deg; display: inline-block; margin-top: 4px; }

.pair { position: relative; height: clamp(400px, 42vw, 520px); }
.pair .polaroid { position: absolute; width: 64%; }
.pair .polaroid:nth-child(1) { left: 0; top: 0; --r: -5deg; }
.pair .polaroid:nth-child(2) { right: 0; bottom: 0; --r: 6deg; width: 54%; }
.pair .stamp { position: absolute; z-index: 5; }

.passport {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
}
.passport .stamp { font-size: 13px; }

.motto {
  position: relative;
  margin: clamp(90px, 12vw, 160px) calc(clamp(14px, 4.5vw, 64px) * -1) 0;
  padding: clamp(60px, 8vw, 110px) clamp(20px, 6vw, 90px);
  background: var(--ink) var(--grain);
  color: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  overflow: hidden;
}
.motto blockquote { margin: 0; }
.motto blockquote p {
  font-weight: 800;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 85;
  margin: 14px 0 22px;
}
.motto blockquote p em { font-style: normal; color: var(--mustard); }
.motto cite { font-family: var(--f-hand); font-style: normal; font-size: 26px; color: var(--pink); }
.motto .kicker { color: rgba(251, 246, 236, 0.7); }
.motto .polaroid { --r: 4deg; max-width: 330px; justify-self: center; }

.facts { max-width: 820px; margin: 0 auto; padding: clamp(36px, 5vw, 56px) clamp(24px, 5vw, 56px) clamp(30px, 4vw, 44px) clamp(76px, 8vw, 100px); }
.facts h3 { font-family: var(--f-hand); font-size: clamp(40px, 4vw, 54px); font-weight: 700; color: var(--tomato); line-height: 1; margin-bottom: 18px; letter-spacing: 0; }
.facts ol { margin: 0; padding: 0; list-style: none; counter-reset: f; }
.facts li { counter-increment: f; position: relative; padding-left: 46px; line-height: 32px; margin-bottom: 0; font-size: clamp(17px, 0.6vw + 13px, 20px); }
.facts li::before {
  content: counter(f, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--tomato);
}
.facts .check { position: absolute; right: clamp(16px, 4vw, 40px); top: -24px; }


/* =========================================================
   WORK WITH ME
   ========================================================= */
.order-wrap { position: relative; padding: 30px 10px 20px; max-width: 420px; justify-self: center; width: 100%; }
.order-wrap .sticky-note { top: -14px; right: -18px; }
.order-slip {
  position: relative;
  padding: 30px 26px 26px;
  background: var(--card) var(--grain);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 6px 6px 0 var(--ink);
  rotate: -2deg;
}
.order-title { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 2px dashed rgba(29, 23, 19, 0.3); }
.order-title b { color: var(--tomato); }
.order-slip li { display: flex; align-items: center; gap: 12px; padding: 7px 0; font-weight: 600; border-bottom: 1px dashed rgba(29, 23, 19, 0.15); }
.order-slip .box {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  font-family: var(--f-hand);
  font-size: 24px;
  line-height: 1;
  color: var(--tomato);
}
.order-sign { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 0; }
.order-sign .hand { font-size: 30px; color: var(--blue); border-bottom: 1.5px solid var(--ink); padding: 0 30px 0 6px; }
.order-slip .stamp { position: absolute; right: -10px; bottom: 18px; font-size: 14px; }

/* service folders */
.svc-grid { display: grid; gap: clamp(22px, 3vw, 34px); }
.svc-grid--main { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.svc { display: flex; flex-direction: column; }
.svc-tab {
  align-self: flex-start;
  padding: 9px 20px 11px;
  background: var(--c);
  color: var(--on);
  border-radius: 12px 12px 0 0;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  top: 1px;
}
.svc-body {
  position: relative;
  flex: 1;
  padding: clamp(26px, 3vw, 36px) clamp(22px, 2.6vw, 32px);
  background-color: var(--c);
  background-image: var(--grain);
  color: var(--on);
  border-radius: 0 14px 14px 14px;
  box-shadow: 0 30px 60px -28px rgba(30, 15, 5, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.35s var(--ease-back), box-shadow 0.35s var(--ease);
}
.svc:hover .svc-body { transform: translateY(-6px) rotate(-0.6deg); box-shadow: 0 40px 70px -28px rgba(30, 15, 5, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.svc-emoji {
  position: absolute;
  top: -22px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--mustard);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 24px;
}
.svc:hover .svc-emoji { animation: wiggle 0.5s var(--ease); }
.svc h3 { font-size: clamp(34px, 3.2vw, 46px); font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 85; }
.svc-for { font-family: var(--f-hand); font-size: 25px; font-weight: 600; line-height: 1.15; margin: 8px 0 14px; opacity: 0.95; }
.svc-body > p:not(.svc-for) { font-size: 16px; opacity: 0.92; }
.svc-list { margin-top: 18px; padding-top: 14px; border-top: 1.5px dashed currentColor; }
.svc-list li { position: relative; padding-left: 24px; margin-bottom: 6px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.svc-list li::before { content: "✓"; position: absolute; left: 0; color: var(--mustard); font-weight: 800; }

.also { text-align: center; margin: clamp(50px, 7vw, 80px) 0 clamp(22px, 3vw, 34px); }
.svc-grid--more { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mini { transition: rotate 0.35s var(--ease-back), scale 0.35s var(--ease-back); }
.mini:hover { rotate: 0deg; scale: 1.04; }
.mini h4 { margin-bottom: 4px; }
.mini p { font-size: 15px; line-height: 28px; }

/* booking */
.book .section-head { margin-bottom: clamp(30px, 4vw, 50px); }
.book-sheet {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(14px, 3vw, 36px);
  background: var(--card) var(--grain);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 8px 8px 0 var(--ink);
}
.book-embed { position: relative; min-height: 560px; width: 100%; overflow: hidden; border-radius: 6px; }
.book-embed::before {
  /* shows while the calendar loads, then the iframe covers it */
  content: "loading the calendar…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--f-hand);
  font-size: 28px;
  color: var(--muted);
}
.book-embed .tidycal-embed { position: relative; z-index: 1; width: 100%; }
.book-embed iframe { display: block; width: 100% !important; max-width: 100%; border: 0; background: var(--card); }
.book-fallback { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.book-fallback a { font-weight: 700; color: var(--tomato); }

/* faq */
.faq h3 { margin-bottom: 10px; }
.faq details { border-bottom: 1.5px dashed rgba(29, 23, 19, 0.22); }
.faq summary {
  position: relative;
  padding: 12px 40px 12px 0;
  font-weight: 700;
  font-size: clamp(17px, 0.6vw + 13px, 20px);
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 8px;
  font-family: var(--f-mono);
  font-size: 24px;
  color: var(--tomato);
  transition: rotate 0.3s var(--ease-back);
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); line-height: 1.6; }


/* homepage freelance teaser */
.svc--link { text-decoration: none; color: inherit; }
.svc--link:focus-visible { outline-offset: 6px; }
.svc-more {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--mustard);
  transition: letter-spacing 0.25s var(--ease);
}
.svc--link:hover .svc-more { letter-spacing: 0.18em; }
.hire-also { text-align: center; margin: clamp(30px, 4vw, 44px) auto 0; max-width: 60ch; font-family: var(--f-hand); font-size: clamp(22px, 1.2vw + 14px, 28px); line-height: 1.2; color: var(--ink-2); }
.hire-also a { color: var(--tomato); font-weight: 700; }
.hire-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 26px; }
.status a { color: inherit; text-decoration: underline; text-decoration-color: #3f9b5a; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.status a:hover { color: var(--ink); }

/* =========================================================
   responsive
   ========================================================= */
@media (max-width: 960px) {
  .hero, .page-head, .now, .fun-hero, .entry, .motto, .desk-footer { grid-template-columns: 1fr; }
  .hero-side { max-width: 420px; margin: 10px auto 0; }
  .hero-side .sticky-note { left: -10px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .work-body { grid-template-columns: 1fr; min-height: 0; }
  .work-card:nth-child(n) { --tab-x: 0%; }
  .stops { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .skills { grid-template-columns: 1fr; }
  .edu { grid-template-columns: 1fr; }
  .entry--flip .entry-media { order: 0; }
  .entry-media { min-height: 0; }
  .foot-meta { text-align: left; }
  .foot-meta nav { justify-content: flex-start; }
  .idcard { max-width: 460px; }
  .svc-grid--main { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
  .svc-grid--more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-wrap { margin-top: 10px; }
  .tab-hint { display: none; }
}

@media (max-width: 640px) {
  .tab { padding-left: 12px; padding-right: 12px; }
  .tab small { display: none; }
  .hero-sheet { padding-left: 62px; }
  .sheet--lined { background-image: linear-gradient(90deg, transparent 40px, rgba(226, 81, 43, 0.38) 40px 41.5px, transparent 41.5px), repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px), var(--fiber), var(--grain); }
  .hero-sheet, .now-note, .facts { padding-left: 54px; }
  .clip { left: auto; right: 34px; }
  .job { grid-template-columns: 1fr; gap: 6px; padding-left: 26px; }
  .timeline { padding-left: 44px; }
  .timeline::before, .timeline-ink { left: 14px; }
  .job::after { left: -39px; }
  .stops { grid-template-columns: 1fr; }
  .work-card { position: relative; top: 0; }
  .work-tab { font-size: 11px; padding: 9px 16px 11px; }
  .pair { height: 420px; }
  .fan .polaroid:nth-child(1) { --fx: -48%; }
  .fan .polaroid:nth-child(2) { --fx: 46%; }
  .dock a { padding: 8px 10px; font-size: 11px; }
  .stat span { font-size: 13px; }
  .svc-grid--more { grid-template-columns: 1fr; }
  .faq { padding-left: 54px; }
  .order-wrap .sticky-note { top: -34px; right: -4px; width: 150px; padding: 16px 14px 14px; font-size: 19px; }
  .book-sheet { padding: 8px; box-shadow: 5px 5px 0 var(--ink); }
  .book-sheet .tape { width: 80px; }
  .dock { gap: 2px; }
  .dock a { padding: 8px 8px; }
}

@media (max-width: 480px) {
  .tab-more { display: none; }
  .tab { padding-left: 10px; padding-right: 10px; letter-spacing: 0.04em; }
}

/* motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal, .js .split .split-char { opacity: 1; transform: none; }
  .work-card { position: relative; top: 0; }
  .route { --rp: 1 !important; }
  .timeline { --tp: 1 !important; }
}

/* print the résumé nicely */
@media print {
  body { background: #fff; }
  .tabs, .dock, .progress, .desk-footer, .band, .contact-actions, .env-body, .env-back, .tape, .clip { display: none !important; }
  .folder { box-shadow: none; background: #fff; padding: 0; animation: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .env-letter { transform: none !important; }
  .sheet, .index-card, .stop, .idcard { box-shadow: none; border: 1px solid #ccc; rotate: 0deg !important; }
  .job, .skill-card { break-inside: avoid; }
}
