/* =====================================================================
   Portfolio stylesheet. Editorial and minimal.
   Header and hero from concept A, selected work from concept A3.
   Lime palette: light warm grey base, dark green ink, one bright lime accent.
   The bright green is for fills only. Green text uses --accent-strong.
   ===================================================================== */

:root {
  /* Type */
  --display: "Inter Tight", system-ui, sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 64px;
  --media-w: 780px;   /* max width of project images and text */
}

/* ---------- Palette: Lime ---------- */
:root {
  --bg: #f9f8f5; --alt: #f0efea; --ph: #e4e3dd; --surface: #fbfbfa; --white: #ffffff;
  --ink: #17332a; --muted: #43564e; --line: rgba(23, 51, 42, .14);
  --accent: #8ce35a;          /* fills only: too light for text */
  --accent-2: #a07dff;        /* lilac on the desk pieces (cursor, slider) (was #a68aff, before that #b8a4ff) */
  --accent-2-strong: #8b70ea; /* deeper lilac, for small icons on the light background */
  --desk-accent: #a0f53c;     /* bright lime for the desk toggle and checkbox (more yellow-green than the site lime #8ce35a) */
  --accent-3: #ffec00;        /* sunny yellow on the user puck: warmer than the old neon #fff01f, which leaned green and read muddy next to the lime */
  --accent-strong: #3f6a12;   /* AA-safe green for text, links and focus */
  --p1: #8ce35a; --p2: #b8a4ff; --p3: #ffad7a; --p4: #17332a; --p5: #c8ee5a;   /* confetti */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--sans); letter-spacing: -.011em; /* Inter's default spacing is loose at body sizes */ -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: .92rem; }

.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }
@media (min-width: 760px) { .wrap { width: min(1280px, 100% - 96px); } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; }
.skip:focus { left: 16px; }

.band { background: var(--bg); }
.band.work { background: var(--bg); }   /* same as the hero */

.label { display: flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.label::before { content: ""; width: 10px; height: 10px; background: var(--c, var(--accent)); transition: background .3s; flex: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20;
  /* coming back: a slow, soft glide in with a fade */
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), opacity .45s ease; }
/* going away: a smooth slide up with a gentle fade (no sudden snap at the end) */
.site-header.is-hidden { transform: translateY(-100%); opacity: 0; transition: transform .8s cubic-bezier(.4, 0, .2, 1), opacity .7s ease .1s; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: var(--header-h); }
.brand { font: 700 1.05rem/1 var(--display); letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.mark { position: relative; width: 22px; height: 14px; flex: none; }
.mark i { position: absolute; top: 0; width: 14px; height: 14px; border-radius: 50%; mix-blend-mode: multiply; transition: transform .35s var(--ease); }
.mark i:first-child { left: 0; background: var(--accent); }
.mark i:last-child { right: 0; background: var(--p4); }
.brand:hover .mark i:first-child { transform: translateX(4px); }
.brand:hover .mark i:last-child { transform: translateX(-4px); }
.nav ul { display: flex; gap: clamp(16px, 2.4vw, 28px); list-style: none; margin: 0; padding: 0; font-weight: 500; font-size: .95rem; }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--accent-strong); }

/* ---------- Hero (concept A) ---------- */
.hero { padding: clamp(48px, 8vw, 112px) 0 clamp(40px, 6vw, 72px); }
.hero-title { font: 600 clamp(2.8rem, 6.2vw, 6rem)/.95 var(--display); letter-spacing: -.045em; max-width: 13ch; }
.hero-title em { font-style: normal; color: var(--accent-strong); }
.page-title { margin-top: 20px; max-width: 16ch; }
.page-intro { margin-top: clamp(28px, 4vw, 48px); max-width: 36ch; font: 400 clamp(1.4rem, 2.6vw, 2.1rem)/1.3 var(--display); letter-spacing: -.02em; color: var(--ink); text-wrap: pretty; }

/* Desk hero: the 3D desk (js/desk.js) fills the section, the text sits on top */
.desk-hero { position: relative; padding: 0; height: clamp(620px, calc(100vh - var(--header-h)), 900px); overflow: hidden; }
.desk-stage { position: absolute; inset: 0; }
.desk-stage canvas { display: block; touch-action: pan-y; }
.desk-stage canvas.is-over-piece { cursor: grab; }   /* only over a piece, not the empty desk or the text area */
.desk-stage canvas.is-dragging { cursor: grabbing; }
.desk-wrap { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; pointer-events: none; }
.desk-copy a, .desk-copy button { pointer-events: auto; }
.desk-hero .hero-title { max-width: none; text-wrap: balance; }
/* "Hi, I'm Mandy" with your photo, above the intro */
/* "Hi, I'm Mandy" sits above the headline, at the same size */
.desk-hi { color: var(--ink); }
.hi-avatar { display: inline-block; width: .9em; height: .9em; margin: 0 .22em 0 0; vertical-align: -.08em; border-radius: 50%; object-fit: cover; }   /* round photo just left of “Hi” */
.desk-lede { margin-top: 26px; }
.desk-prev { margin-top: 14px; font-size: clamp(1.15rem, 1.5vw, 1.35rem); font-weight: 500; color: var(--ink); }
.hero-ctas { margin-top: 30px; }

/* Your name in the intro, with a small round photo in front of it */
.me { color: var(--ink); font-weight: 600; white-space: nowrap; }
.me img { display: inline-block; width: 1.45em; height: 1.45em; margin: -.35em .3em -.35em .1em; vertical-align: -.38em; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--accent), 3px 4px 0 4px rgba(31, 38, 34, .12);
  transform: rotate(-4deg); transition: transform .35s var(--ease); }
.me:hover img { transform: rotate(4deg) scale(1.06); }

/* Pill buttons, styled like the pieces on the desk */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; font: 600 1rem/1 var(--sans); text-decoration: none; transition: background .2s, color .2s, transform .2s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--white)); }
.btn-ghost { background: var(--white); color: var(--ink); }
.btn-ghost:hover { background: color-mix(in srgb, var(--white) 85%, var(--ink)); }
@media (max-width: 759px) {
  .desk-hero { height: 860px; }
  .desk-wrap { align-items: flex-start; padding-top: 40px; }
}


/* clickable period (easter egg) */
.stop { all: unset; cursor: pointer; display: inline-block; color: var(--accent-strong); transition: transform .2s var(--ease); }
.stop:hover { transform: translateY(-.08em); }
.stop:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

.about-grid { display: grid; gap: 32px clamp(40px, 6vw, 96px); align-items: center; }
.about-text { color: var(--ink); text-wrap: pretty; }

/* ---------- Selected work: title on top, images left, summary and impact right ---------- */
.work-title { margin-bottom: clamp(32px, 4vw, 56px); }
.work-title:has(+ .work-note) { margin-bottom: 12px; }
.work-note { margin-bottom: clamp(32px, 4vw, 56px); color: var(--muted); font-size: 1.05rem; }
.work-note a { color: var(--ink); text-underline-offset: 3px; }
.work-note a:hover { color: var(--accent-strong); }
.e-grid { display: grid; gap: 24px clamp(32px, 4vw, 64px); align-items: start; }
@media (min-width: 900px) { .e-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.e-grid .strip { max-width: none; }
.e-grid .e-body { margin-top: 0; max-width: 46ch; }

.work, .games { --c: var(--accent); }
.work { padding: clamp(64px, 9vw, 128px) 0; }
.side-title { font: 600 clamp(1.6rem, 2.6vw, 2.2rem)/1 var(--display); letter-spacing: -.03em; }
.list { grid-column: 4 / -1; display: grid; }
@media (max-width: 900px) {
  .list { grid-column: 1 / -1; }
}

.entry { padding-bottom: clamp(40px, 5vw, 64px); }
.entry + .entry { padding-top: clamp(40px, 6vw, 80px); }
.e-top { display: grid; gap: 6px; margin-bottom: 20px; }
.e-title { font: 600 clamp(1.8rem, 3.6vw, 3rem)/1 var(--display); letter-spacing: -.035em; }
.e-meta { color: var(--muted); font-size: .95rem; }

.strip { max-width: var(--media-w); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip.single { grid-auto-columns: 100%; }
@media (max-width: 640px) { .strip { grid-auto-columns: 86%; } .strip.single { grid-auto-columns: 100%; } }
.strip > * { scroll-snap-align: start; }
.ph { position: relative; overflow: hidden; display: grid; place-items: center; background: var(--ph); border-radius: 16px; }
.ph span { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
/* Screenshots: inset on a soft gradient panel made from their own colors */
.ph.shot { padding: 8% 8% 0; align-items: start; justify-items: center; background: var(--shot-bg, var(--ph)); }
.ph.shot.plain img { border-radius: 0; box-shadow: none; }
.ph.shot.fill { padding: 0; }
.ph.shot.fill img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; }
/* two screenshots on one panel, staggered */
.ph.shot.duo { display: block; padding: 0; }
.ph.shot.duo img { position: absolute; height: auto; border-radius: 10px; }
.ph.shot.duo img:last-child { z-index: 1; box-shadow: 0 1px 2px rgba(23, 51, 42, .1), 0 24px 50px -18px rgba(23, 51, 42, .45); }
/* screenshots shown whole get all four corners rounded */
.ph.shot.whole img { border-radius: 10px; }
.ph.shot.free { padding: 4%; align-items: center; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.ph.shot.free img { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 0; box-shadow: none; }
/* the screenshot starts a little below the top and runs off the bottom edge */
.ph.shot img { width: 100%; height: auto; max-width: none; object-fit: fill; border-radius: 10px 10px 0 0;
  box-shadow: 0 1px 2px rgba(23, 51, 42, .08), 0 18px 40px -20px rgba(23, 51, 42, .35); }

.e-body { max-width: var(--media-w); display: grid; row-gap: 20px; margin-top: 20px; }
.e-sum { font-size: .96rem; }
.e-contrib { margin-top: 10px; font-size: .82rem; color: var(--muted); }
.e-impact { font-size: .96rem; font-weight: 400; }
.e-impact b { display: block; margin-bottom: 4px; font-size: inherit; font-weight: 700; color: var(--ink); }
/* a small four-petal flower above "Impact" */
.e-impact b::before { content: ""; display: block; width: 15px; height: 15px; margin-bottom: 12px; background: var(--accent-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='5' rx='3' ry='4.5'/%3E%3Cellipse cx='12' cy='19' rx='3' ry='4.5'/%3E%3Cellipse cx='5' cy='12' rx='4.5' ry='3'/%3E%3Cellipse cx='19' cy='12' rx='4.5' ry='3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='5' rx='3' ry='4.5'/%3E%3Cellipse cx='12' cy='19' rx='3' ry='4.5'/%3E%3Cellipse cx='5' cy='12' rx='4.5' ry='3'/%3E%3Cellipse cx='19' cy='12' rx='4.5' ry='3'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- Contact: one big line with your email, and a copy button ---------- */
.contact-cols { display: grid; gap: 24px clamp(40px, 6vw, 96px); align-items: start; }
@media (min-width: 900px) { .contact-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.contact-big { max-width: 16ch; font: 600 clamp(1.7rem, 2.8vw, 2.6rem)/1.15 var(--display); letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
.contact-line { font: 500 clamp(1.15rem, 1.6vw, 1.4rem)/1.4 var(--sans); color: var(--muted); }
.contact-line a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: .12em; overflow-wrap: anywhere; }
.contact-line a:hover { color: var(--accent-strong); }
.copy-email { margin-top: 20px; background: var(--ph); }
.copy-email:hover { background: color-mix(in srgb, var(--ph) 80%, var(--ink)); }

.contact { padding: clamp(56px, 8vw, 112px) 0; }
.send { justify-self: start; display: inline-flex; align-items: center; gap: 8px; font: 600 1rem var(--sans); padding: 14px 26px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; transition: background .2s; }
.send:hover { background: var(--accent-strong); }
.send:disabled { opacity: .7; cursor: progress; }

/* ---------- Play page ---------- */
.games { display: grid; gap: 48px clamp(24px, 3vw, 40px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.game { display: flex; flex-direction: column; }
.game-body { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; flex: 1; }
.game-title { font: 600 1.6rem/1.1 var(--display); letter-spacing: -.03em; }
.game-note { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); background: transparent; border: 1px solid rgba(23, 51, 42, .2); padding: 3px 11px; border-radius: 999px; margin-bottom: 14px; }
.small-btn { padding: 10px 18px; font-size: .9rem; margin-top: auto; align-self: flex-start; }
.soon { align-self: flex-start; margin-top: auto; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border: 1.5px dashed var(--line); border-radius: 999px; }

/* ---------- Footer ---------- */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px 0; font-size: .9rem; color: var(--muted); }
.foot-links { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- Small touches ---------- */
.toast { position: fixed; z-index: 60; left: 50%; top: calc(var(--header-h) + 12px); transform: translate(-50%, -12px); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 999px;
  background: var(--white); color: var(--ink); border: 1px solid rgba(23, 51, 42, .1); box-shadow: 0 1px 2px rgba(23, 51, 42, .08), 0 12px 32px -12px rgba(23, 51, 42, .35);
  font: 500 .9rem/1.4 var(--sans); opacity: 0; pointer-events: none; transition: opacity .25s, transform .35s var(--ease); }   /* white, just under the nav bar; slides down into place */
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.burst { position: fixed; z-index: 70; pointer-events: none; display: block; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Case studies: vertical layout (SITE.workLayout = "vertical") ----------
   Each case study reads top to bottom in one column: a small label, the title, the text, then a wide image. */
.list-vertical { max-width: 760px; }
.list-vertical .entry + .entry { border-top: 1px solid var(--line, rgba(31,38,34,.12)); }
.list-vertical .e-top { margin-bottom: 14px; gap: 10px; }
.list-vertical .e-meta { order: -1; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.list-vertical .e-title { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.list-vertical .e-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 28px; }
.list-vertical .e-grid .e-body { order: -1; max-width: 62ch; }
.list-vertical .e-sum { font-size: 1.1rem; line-height: 1.6; }

/* Split case studies, tuned to scan at a glance: image column ~15% narrower (7:5 → 6:5.5) and smaller titles */
.list:not(.list-vertical) .e-top { margin-bottom: 16px; }

/* "Hi, I'm Mandy" a size smaller now that a bio sits under it */
.desk-hero .hero-title { font-size: clamp(2.2rem, 3.6vw, 3.6rem); }
@media (max-width: 640px) { .desk-hero .hero-title { font-size: 2.1rem; } }

.about-grid { grid-template-columns: minmax(0, 1fr) !important; }
.about-text { font: 400 clamp(1.3rem, 2.2vw, 1.8rem)/1.4 var(--display); }
.about-text p + p { margin-top: .8em; }

/* Company logos above the hero buttons */
.hero-logos { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.hero-logos img { display: block; height: 26px; width: auto; }
.hero-logos .logo-text { font: 600 1.15rem/1 var(--display); letter-spacing: -.02em; color: var(--muted); }
.hero-logos + .hero-ctas { margin-top: 26px; }

/* Hero: View work button, then email · LinkedIn · CV as quiet text links */
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.hero-links { list-style: none; padding: 0; align-items: center; font-size: 1rem; }
.hero-links li { display: flex; align-items: center; }
.hero-links li + li::before { margin: 0 12px; color: var(--muted); }
.hero-links a, .hero-email { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 4px; }
.hero-links a:hover, .hero-email:hover { color: var(--accent-strong); text-decoration-color: currentColor; }
.hero-email { padding: 0; border: 0; background: none; font: inherit; cursor: copy; }
/* Shorter hero: about 72% of the screen height (520–720px) instead of the full screen */
@media (min-width: 761px) { .desk-hero { height: clamp(520px, calc(72vh - var(--header-h) / 2), 720px); } }

/* Hero contact details: small labels over each value, then the View work button underneath */
.hero-links { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 26px 0 0; }
.hero-links div { display: grid; gap: 4px; }
.hero-links dt { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero-links dd { margin: 0; font-size: 1.05rem; }
.hero-links li + li::before { content: none; }
.hero-links + .hero-ctas { margin-top: 28px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* no greeting above it now, so the intro leads the hero */
.desk-copy > .desk-lede:first-of-type { margin-top: 0; }

/* About: text on the left, hand-drawn doodles on the right */
.about-art { display: block; height: auto; justify-self: end; }
@media (max-width: 899px) { .about-art { justify-self: start; } }
/* About: doodles on the left, text on the right */
@media (min-width: 900px) {
  .about-grid:has(.about-art) { grid-template-columns: minmax(0, 6fr) minmax(0, 5.5fr) !important; column-gap: clamp(32px, 4vw, 64px); }   /* same columns as the case studies below, so the text lines up with theirs */
  .about-grid .about-art { order: -1; justify-self: start; }
}
/* Case study titles a step below the "Selected work" heading (which tops out at 2.2rem) */
.list:not(.list-vertical) .e-title { font-size: clamp(1.3rem, 2vw, 1.7rem); letter-spacing: -.025em; }
.about-art { width: auto; max-width: 100%; max-height: 420px; }   /* the stacked shapes are tall, so cap by height */

/* Hero intro + About text together, all at the same reading size, above the contact details */
.desk-lede { letter-spacing: 0; }
.desk-lede + .desk-lede { margin-top: .8em; }
.desk-copy { max-width: min(640px, calc(36vw + 200px)); }

/* Hero below 1024px: the text is long now, so the hero grows with it and keeps a band
   underneath for the desk pieces (they move below the text when there's no room beside it). */
@media (max-width: 1023px) {
  .desk-hero { height: auto; min-height: 0; }
  .desk-wrap { height: auto; align-items: flex-start; padding-top: 48px; }
}
.work-title { font-size: clamp(1.8rem, 3vw, 2.6rem); }   /* "Selected work" a touch bigger (was up to 2.2rem) */

.about-text { font-size: clamp(1.05rem, 1.45vw, 1.25rem); line-height: 1.55; max-width: 52ch; }
#work.band, .band.about { background: var(--bg); }   /* Selected work (and the lead-in text above it) back on the cream background */

/* About photo: a printed photo with a white border, a slight tilt and a soft shadow, to the right of the text */
@media (min-width: 900px) {
  .about-grid:has(.about-photo) { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr) !important; column-gap: clamp(40px, 6vw, 96px); align-items: center; }
}
.about-photo { margin: 0; justify-self: center; width: 100%; padding: 12px 12px 44px; background: var(--white);
  box-shadow: 0 1px 2px rgba(23, 51, 42, .08), 0 18px 40px -16px rgba(23, 51, 42, .35); transform: rotate(2.5deg); }
.about-photo img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 659; object-fit: cover; }
@media (max-width: 899px) { .about-photo { justify-self: start; margin-top: 8px; } }
@media (prefers-reduced-motion: no-preference) { .about-photo { transition: transform .4s var(--ease); } .about-photo:hover { transform: rotate(0deg); } }
/* Second section (About text + photo) on white, with its own top and bottom space; photo a bit smaller */
.band.about { background: var(--white); }
.about { padding: clamp(56px, 7vw, 96px) 0; }
#work.band { padding-top: calc(clamp(64px, 9vw, 128px) - 20px); }
.about-photo { max-width: 340px; }
.desk-lede { font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.45; max-width: 34ch; }   /* hero intro bigger now it is a single paragraph (was up to 1.25rem) */

/* About illustration: line drawing of a person, to the right of the text. Kept small because the file is only 239px wide. */
@media (min-width: 900px) {
  .about-grid:has(.about-person) { align-items: center; }
}
.about-person { width: 220px; max-width: 100%; max-height: none; height: auto; }
/* About: drawing on the left, text on the right (text column lines up with the case study text below) */
@media (min-width: 900px) {
  .about-grid:has(.about-person) { column-gap: clamp(32px, 4vw, 64px); }
  .about-grid .about-person { order: -1; justify-self: center; }
}
.page-intro { font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.45; }   /* Playground intro at the same size as the homepage hero text */

/* Portrait framed by two flat props in the hero's style: a sticky note behind the head, a pencil across the bottom */
.about-figure { position: relative; justify-self: center; width: 220px; isolation: isolate; }
@media (min-width: 900px) { .about-grid .about-figure { order: -1; } }
.about-figure .about-person { position: relative; z-index: 1; display: block; }
.about-figure .deco { position: absolute; pointer-events: none; }
.deco-note { z-index: 0; }
@media (max-width: 899px) { .about-figure { justify-self: start; margin: 24px 0 0 70px; } }
.deco-note, .deco-pencil { transform: none; }   /* pixel art stays square to the page: rotating it makes the pixels look smeared */
/* Back to the smooth, hero-style props (pixel versions kept in images/web): slight tilts, pencil tucked under her elbow */
.about-figure .deco { image-rendering: auto; }
.deco-note { width: 100px; top: -10px; right: -46px; transform: rotate(8deg); }
.deco-pencil { width: 176px; bottom: -14px; left: -64px; transform: rotate(-8deg); z-index: 0; }

/* Option: generic shapes behind the portrait. A lilac circle sits behind her head and shoulders,
   and a yellow halftone overlaps it from the top right, like two riso ink layers. */
.deco-shapes .deco-circle { width: 210px; top: -6px; left: 50%; margin-left: -105px; z-index: 0; }
.deco-shapes .deco-halftone { width: 160px; top: -30px; right: -70px; mix-blend-mode: normal; z-index: 0; }   /* round halftone, plain yellow so it stays bright where it crosses the lilac */

/* Portrait as an instant photo, drawn in the hero's outline style: white card, ink outline, flat offset shadow, slight tilt */
.polaroid { width: 250px; padding: 12px 12px 52px; background: var(--white); border: 2.4px solid var(--ink); border-radius: 6px;
  box-shadow: 10px 12px 0 rgba(23, 51, 42, .13); transform: rotate(-3deg); }
.pol-photo { aspect-ratio: 1 / 1; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; border: 2px solid var(--ink); border-radius: 2px; }
@media (prefers-reduced-motion: no-preference) { .polaroid { transition: transform .4s var(--ease); } .polaroid:hover { transform: rotate(0deg); } }
/* Top nav a little more see-through (was 90% opaque), with a touch more blur so text behind it stays soft */
.site-header { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
/* Phones: the nav fit got tight with "Playground", so drop "Home" (the name/photo already links home) and tighten the gaps */
@media (max-width: 520px) {
  .nav li:first-child { display: none; }
  .nav ul { gap: 14px; }
  .nav a { font-size: .9rem; }
}
.pol-photo { background: #fdf7c9; }   /* pale yellow photo backdrop */
.work-title { color: #446d09; }   /* "Selected work" in deep olive #446D09 */
/* A paperclip holding the polaroid, clipped over the top edge */
.pol-clip { position: absolute; top: -30px; left: 38px; width: 26px; transform: rotate(-6deg); z-index: 3; pointer-events: none; }
.about-text { font-family: var(--sans); letter-spacing: 0; }   /* About text in the regular Inter like the hero, not the tighter display face */
.page-title { font-size: clamp(2.2rem, 4.4vw, 3.8rem); }   /* "Personal projects" a step smaller (was up to 6rem) */

/* Image protection: stops dragging images out and the iPhone long-press "Save to Photos" menu */
img, canvas { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* Portrait in a big outlined circle, with a sticky note overlapping it on the left, in front */
.avatar-circle { width: 300px; }
.ac-disc { position: relative; width: 300px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #fdf7c9; border: 2.4px solid var(--ink);
  box-shadow: 10px 12px 0 rgba(23, 51, 42, .13); display: flex; align-items: flex-end; justify-content: center; }
.ac-disc .about-person { width: 82%; }
.ac-note { position: absolute; width: 104px; left: -44px; top: 34px; transform: rotate(-8deg); z-index: 2; pointer-events: none; }
@media (max-width: 899px) { .avatar-circle, .ac-disc { width: 240px; } .avatar-circle { margin-left: 40px; } }
.ac-disc .about-person { margin-bottom: -26px; }   /* run the shirt off the bottom of the circle so its cut-off edge never shows */

/* Real photo in a big outlined circle, sitting behind the polaroid and peeking out on the left */
.pol-wrap { position: relative; width: 250px; justify-self: center; }
@media (min-width: 900px) { .about-grid .pol-wrap { order: -1; } }
.pol-wrap .polaroid { position: relative; z-index: 1; }
.pol-avatar { position: absolute; z-index: 0; width: 220px; height: 220px; border-radius: 50%; object-fit: cover;
  border: 2.4px solid var(--ink); box-shadow: 10px 12px 0 rgba(23, 51, 42, .13); }
.pol-avatar { left: -158px; top: -30px; object-position: 40% 50%; }   /* show more of the face from behind the polaroid */
@media (min-width: 900px) { .about-grid .pol-wrap { margin-left: 130px; } }

/* Below 900px: centre the photo + polaroid pair (the photo sticks out 96px on the left, so nudge right by half that) */
@media (max-width: 899px) { .pol-wrap { justify-self: center; margin: 40px 0 0 48px; } }
@media (max-width: 640px) { .wrap { width: min(1280px, 100% - 48px); } }   /* phones: 24px side margins (was 16px) so text isn't near the screen edges */
/* Case study images about 12% smaller: image column 6fr → 5.2fr (text column unchanged).
   The About section uses the same split so its text still lines up with the case study text. */
@media (min-width: 900px) {
  .list:not(.list-vertical) .e-grid { grid-template-columns: minmax(0, 5.2fr) minmax(0, 5.5fr); }
  .about-grid:has(.about-person) { grid-template-columns: minmax(0, 5.2fr) minmax(0, 5.5fr) !important; }
}

/* Helper line under the bottom-right of the desk pieces; fades in after the first tidy */
.desk-note { position: absolute; margin: 0; text-align: right; font-size: .9rem; line-height: 1.35;
  pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.desk-note.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .desk-note { transition: none; } }
.desk-note { max-width: none; white-space: nowrap; }   /* two set lines, no awkward wrap */
.desk-note { color: color-mix(in srgb, var(--muted) 70%, var(--bg)); }   /* a bit lighter, so it reads as a quiet aside */
/* Never let anything push the page sideways */
html, body { overflow-x: clip; }
/* Stacked hero (below 1024px): a taller band under the text so the pieces AND the helper note under them fit */
@media (max-width: 1023px) { .desk-wrap { padding-bottom: clamp(380px, 70vw, 500px); } }

/* Phones: give the real photo more room so the polaroid doesn't cover the face (photo further out, polaroid a bit narrower) */
@media (max-width: 899px) {
  .pol-wrap { width: 220px; }   /* centred pair: margin = the photo's overhang (half of it shifts the pair) */
  .pol-wrap .polaroid { width: 220px; }
}
/* The real photo gives a little wiggle on hover, like the polaroid straightening */
@media (prefers-reduced-motion: no-preference) {
  @keyframes avatar-wiggle { 0% { transform: rotate(0) } 25% { transform: rotate(-7deg) scale(1.04) } 50% { transform: rotate(4deg) scale(1.04) } 75% { transform: rotate(-5deg) scale(1.03) } 100% { transform: rotate(-4deg) scale(1.03) } }
}
/* Polaroid a touch smaller so it balances the photo circle (desktop 250 → 226px, phones 220 → 204px) */
.pol-wrap, .pol-wrap .polaroid { width: 226px; }
.pol-wrap .polaroid { padding: 11px 11px 46px; }
/* Softer, slower avatar wiggle: longer, gentler swings that ease into a small tilt */
@media (prefers-reduced-motion: no-preference) {
  .pol-avatar { transition: transform .6s cubic-bezier(.33, 1, .68, 1); }
  @keyframes avatar-wiggle-soft {
    0% { transform: rotate(0) scale(1); }
    30% { transform: rotate(-4deg) scale(1.02); }
    60% { transform: rotate(2deg) scale(1.02); }
    100% { transform: rotate(-3deg) scale(1.02); }
  }
}
/* Photo + polaroid keep the desktop proportions on smaller screens (circle ≈ polaroid width, ~70% of the circle peeking out).
   Centred as a pair: margin-left equals the photo's overhang, which shifts the pair right by half of it. */
@media (max-width: 899px) {
  .pol-wrap, .pol-wrap .polaroid { width: 226px; }
  .pol-wrap .polaroid { padding: 11px 11px 46px; }
  .pol-wrap { margin-left: 158px; }
  .pol-avatar { width: 220px; height: 220px; left: -158px; top: -30px; object-position: 40% 50%; }
}
@media (max-width: 599px) {
  .pol-wrap, .pol-wrap .polaroid { width: 182px; }
  .pol-wrap .polaroid { padding: 9px 9px 38px; }
  .pol-wrap { margin-left: 128px; }
  .pol-avatar { width: 176px; height: 176px; left: -128px; top: -24px; }
}
.pol-photo .about-person { margin-bottom: 0; }   /* mandy-peep is trimmed tight, so smaller and sitting on the bottom edge */
.pol-photo .about-person { width: 66%; }   /* a little headroom above her hair */
/* Photo + polaroid hover: one shared motion. Same length (0.7s) and the same soft, slightly springy ease,
   so both settle with a small bounce. The polaroid straightens; the photo tips the other way. */
@media (prefers-reduced-motion: no-preference) {
  .pol-avatar, .pol-wrap .polaroid { animation: none; transition: transform .7s cubic-bezier(.34, 1.45, .64, 1); }
  .pol-avatar:hover { animation: none; transform: rotate(-5deg) scale(1.03); }
  .pol-wrap .polaroid:hover { transform: rotate(0deg) scale(1.02); }
}

/* 760–1023px: if the pieces fit beside the text, no empty band underneath; the band only appears when they move below */
@media (min-width: 760px) and (max-width: 1023px) {
  .desk-wrap { padding-bottom: 96px; }
  .desk-hero.is-below .desk-wrap { padding-bottom: clamp(380px, 70vw, 500px); }
}
.desk-note.is-left { text-align: left; }   /* phones: the note sits on the text's left edge, under the pieces */
/* Contact + footer: one dark ink closing section (same ink as the "View work" button), off-white text, lime copy button */
.band.contact, .site-footer { background: #1d3b31; color: var(--bg); }   /* a touch lighter than --ink so it feels less heavy */
.band.contact .contact-big { color: var(--bg); }
.band.contact .contact-line { color: #e6dccb; }   /* warm oatmeal (same family as the toast): softer than the heading by hue, not by greying it (9:1) */
.band.contact .contact-line a { color: var(--bg); }
.band.contact .contact-line a:hover { color: var(--desk-accent); }
.band.contact .copy-email { background: var(--desk-accent); color: var(--ink); }
.band.contact .copy-email:hover { background: color-mix(in srgb, var(--desk-accent) 82%, var(--white)); }
.site-footer .foot { color: var(--bg); border-top: 1px solid color-mix(in srgb, var(--bg) 14%, transparent); }
.site-footer .foot a { color: var(--bg); }   /* same off-white as the contact email link */
.site-footer .foot a:hover { color: var(--desk-accent); }
.band.contact :focus-visible, .site-footer :focus-visible { outline-color: var(--desk-accent); }

/* Highlighter stroke behind *words* in the hero intro: a hand-drawn marker shape (wobbly edges, rough ends,
   a darker second pass, a slight upward slant). A paper-coloured layer on top slides off to the right to "draw" it (left half see-through, right half paper). */
.desk-lede .hl { color: var(--ink); padding: .14em .3em; margin: 0 -.3em;   /* vertical padding makes the stroke taller than the letters without moving the lines */
  background: linear-gradient(90deg, transparent 47%, var(--bg) 53%) no-repeat 100% 0 / 200% 100%,
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'><path fill='%23a0f53c' fill-opacity='.62' d='M5 10C40 5 92 8 132 5S186 3 197 6L194 14L199 21L195 31C152 35 108 32 70 36S22 35 7 38L9 29L2 21L7 15Z'/><path fill='%23a0f53c' fill-opacity='.3' d='M14 15C64 11 124 14 191 10L188 29C128 31 70 29 16 33Z'/></svg>") no-repeat 0 calc(60% + 2px) / 100% 96%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: hl-sweep .9s .6s cubic-bezier(.65, 0, .25, 1) forwards; }
@keyframes hl-sweep { to { background-position: 0 0, 0 calc(60% + 2px); } }
@media (prefers-reduced-motion: reduce) { .desk-lede .hl { background-position: 0 0, 0 calc(60% + 2px); } }
#work.band { background: #fcfbf9; }   /* Selected work a shade lighter than the cream hero (between it and the white About) */
/* Playground: the cards sit in their own white section under the cream intro (like About on the home page) */
.band.games-band { background: var(--white); }
.work.games-band { padding-top: clamp(32px, 4vw, 52px); }   /* same as the cream space under the intro */
@media (min-width: 1100px) { .page-intro { max-width: none; } }   /* Playground intro on one line on wide screens; it wraps normally on smaller ones */
/* Playground cards: the screenshot and title open the game too. Hover: the screenshot zooms in a touch, the title takes the accent. */
.game-media { display: block; border-radius: 16px; }
.game-media .ph img { transition: transform .5s var(--ease); }
.game.has-link:has(.game-media:hover, .game-title a:hover) .ph img { transform: scale(1.03); }
.game-title a { color: inherit; text-decoration: none; transition: color .2s; }
.game.has-link:has(.game-media:hover, .game-title a:hover) .game-title a { color: var(--accent-strong); }
@media (prefers-reduced-motion: reduce) { .game.has-link .ph img { transform: none !important; } }
.band.hero:has(+ .games-band) { padding-top: clamp(32px, 5vw, 72px); padding-bottom: clamp(32px, 4vw, 52px); }   /* Playground intro: less cream above and under the text */
.band.hero:has(+ .games-band) .page-intro { margin-top: clamp(20px, 2.6vw, 32px); }   /* and a smaller gap between the title and the intro line */
/* Playground is short: the white cards section stretches so the dark footer sits at the bottom of the window (no cream strip under it) */
body[data-page="play"] { min-height: 100vh; display: flex; flex-direction: column; }
body[data-page="play"] #main { flex: 1; display: flex; flex-direction: column; }
body[data-page="play"] .games-band { flex: 1; }
html { overscroll-behavior-y: none; }   /* no rubber-band past the dark footer (it showed a strip of the cream page colour under it) */
.e-sum .e-link { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: 3px; }
.e-sum .e-link:hover { color: var(--accent-strong); text-decoration-color: currentColor; }
