/* Design tokens ------------------------------------------------------- */
:root {
  --bg: #fafafa;
  --fg: #111111;
  --muted: #555555;
  --line: #d4d4d8;
  --edge: #8a8a8a;
  --slot: #e3e3e3;
  --slot-fg: #555555;
  --accent: #f4ede3;
  --glow: #ddd0fb; /* soft lilac, the home default */
  --shelf: #ddd0fb; --shelf-edge: #c3b0f0; --purple: #7a49e0;
  --focus: #2a3f9e;
  --radius: 28px;
  --gutter: clamp(16px, 5vw, 72px);
  --font: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color-scheme: light;
}
[data-theme='dark'] {
  /* Soft dark, after Material 3: tinted surface, never pure black */
  --bg: #141218;
  --fg: #e6e0e9;
  --muted: #b5aebd;
  --line: #3a3640;
  --edge: #7d7886;
  --slot: #211f26;
  --slot-fg: #b5aebd;
  --accent: var(--accent-dark, #211f26);
  --glow: #3d3170;
  --shelf: #5d4c99; --shelf-edge: #483a7a; --purple: #b79cff;
  --s1: #1d1b20; --s2: #25232a; --s3: #2b2930; /* raised surfaces get lighter */
  --focus: #d0bcff;
  color-scheme: dark;
}

/* Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.soft { color: color-mix(in srgb, var(--fg) 82%, var(--bg)); }
.underline { text-decoration: underline; text-underline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; z-index: 10; }
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px var(--gutter) 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
main { display: flex; flex-direction: column; gap: var(--section, 104px); flex: 1; }

/* Header + footer ---------------------------------------------------- */
.top { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; letter-spacing: -.01em; }
.logo {
  width: 48px; height: 48px; object-fit: cover; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fg); color: var(--bg); font-size: 15px; font-weight: 600; letter-spacing: -.02em;
}
.top-right { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.top nav { display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 22px; letter-spacing: -.01em; }
.top nav a { transition: opacity .2s; }
.top nav a:hover { opacity: .55; }
.top nav a[aria-current='page'] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.tools { display: flex; gap: 8px; }

.round {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--edge); background: transparent;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  transition: background-color .2s, transform .2s;
}
.round:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.round:active { transform: scale(.94); }
.round.sm { width: 40px; height: 40px; }
/* icon swaps */
#theme-toggle .ico-sun { display: none; }
[data-theme='dark'] #theme-toggle .ico-moon { display: none; }
[data-theme='dark'] #theme-toggle .ico-sun { display: block; }
[data-copy] .ico-check { display: none; }
[data-copy].copied .ico-copy { display: none; }
[data-copy].copied .ico-check { display: block; }

.foot {
  display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center;
  font-size: 16px; color: var(--muted); padding-top: 24px; border-top: 1px solid var(--line);
}
.foot nav { display: flex; gap: 24px; }
.foot nav a:hover { color: var(--fg); }
.foot-right { display: inline-flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.foot .email { font-size: 18px; color: var(--fg); }

/* Type --------------------------------------------------------------- */
.display {
  font-size: clamp(48px, 9vw, 120px);
  line-height: 1; letter-spacing: -.045em; font-weight: 500;
  overflow-wrap: anywhere;
}
.title { font-size: clamp(48px, 9vw, 120px); line-height: 1; letter-spacing: -.045em; font-weight: 500; overflow-wrap: anywhere; }
h2 { font-size: clamp(30px, 4vw, 40px); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.lede { display: flex; flex-direction: column; gap: 20px; max-width: 960px; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; letter-spacing: -.01em; }
.hero { display: flex; flex-direction: column; gap: 40px; }

/* Media -------------------------------------------------------------- */
.media {
  width: 100%; border-radius: var(--radius); overflow: hidden;
  background: var(--slot); position: relative;
}
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media-accent { background: var(--accent); }
.media-ph {
  display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; text-align: center;
  padding: 24px; color: var(--slot-fg); font-size: 15px; line-height: 1.5;
}
.media-hero { height: clamp(300px, 46vw, 600px); }
.media-wide { height: clamp(300px, 48vw, 640px); }
.media-motion { height: clamp(280px, 44vw, 600px); }
.media-half { height: clamp(260px, 38vw, 520px); }
.media-portrait { height: clamp(380px, 48vw, 640px); }
.media-square-photo { aspect-ratio: 1 / 1; width: 100%; height: auto; }
.media-cover { aspect-ratio: 2 / 3; width: 100%; height: auto; }
.media-square { height: clamp(280px, 34vw, 420px); }

/* Case cards --------------------------------------------------------- */
.cards { display: flex; flex-direction: column; gap: 120px; }
.card { display: flex; flex-direction: column; gap: 20px; }
.card .media { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.card:hover .media { transform: scale(.992); }
.card-text { display: flex; flex-wrap: wrap; gap: 16px 48px; justify-content: space-between; align-items: flex-start; }
.card-copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.card-copy p { font-size: 22px; line-height: 1.4; color: color-mix(in srgb, var(--fg) 85%, var(--bg)); max-width: 760px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chips li { background: var(--chip, var(--slot)); color: var(--chip-text, #1c1b22); border-radius: 999px; padding: 8px 16px; font-size: 15px; }
[data-theme='dark'] .chips li { background: var(--chip-dark, var(--slot)); color: var(--fg); }

/* Rows (earlier work, contact) -------------------------------------- */
.earlier { display: flex; flex-direction: column; gap: 24px; }
.rows { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; border-top: 1px solid var(--line); font-size: 22px; letter-spacing: -.01em;
  transition: padding .25s ease, opacity .2s;
}
.row:hover { padding-left: 12px; }
.row .year { margin-left: auto; color: var(--muted); font-size: 16px; }
.row .ico { flex: none; }
.row.static:hover { padding-left: 0; }

/* AI strip ---------------------------------------------------------- */
.ai { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 64px; }
.ai-head { display: flex; flex-direction: column; gap: 16px; }
.ai-head p { color: var(--muted); font-size: 18px; max-width: 420px; }
.ai-list li { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr; gap: 8px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.ai-list li:last-child { border-bottom: 1px solid var(--line); }
.ai-tool { font-size: 20px; letter-spacing: -.01em; }
.ai-use { color: var(--muted); }
@media (max-width: 800px) { .ai { grid-template-columns: 1fr; } .ai-list li { grid-template-columns: 1fr; } }

/* Case study --------------------------------------------------------- */
article { display: flex; flex-direction: column; gap: var(--section, 104px); }
.cs-head { display: flex; flex-direction: column; gap: 48px; }
.meta { display: flex; flex-wrap: wrap; gap: 32px 48px; font-size: 20px; }
.meta div { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.meta dt { font-size: 17px; color: var(--muted); }
.block { display: flex; flex-direction: column; gap: 28px; }
.caption { max-width: 760px; margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.caption h3 { font-size: 24px; font-weight: 500; letter-spacing: -.015em; }
.caption p { color: var(--muted); font-size: 20px; line-height: 1.5; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.two figure { display: flex; flex-direction: column; gap: 12px; }
.two figcaption { color: var(--muted); font-size: 18px; margin-top: 12px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 32px 24px; display: flex; flex-direction: column; gap: 8px; }
.stat:first-child { padding-left: 0; }
.stat-n { font-size: clamp(48px, 6vw, 72px); letter-spacing: -.04em; line-height: 1; font-weight: 500; }
.stat-l { font-size: 18px; color: var(--muted); max-width: 280px; }

.move-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.move-list li, .believe-list li { display: flex; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.move-n { color: var(--muted); font-size: 16px; font-variant-numeric: tabular-nums; padding-top: 6px; }
.move-list h3 { font-size: 26px; font-weight: 500; letter-spacing: -.02em; margin-bottom: 8px; }
.move-list p { color: var(--muted); }
@media (max-width: 760px) { .move-list { grid-template-columns: 1fr; } }

.figma {
  display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center;
  padding: 32px; border: 1px solid var(--edge); border-radius: var(--radius); transition: background-color .2s;
}
.figma:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.figma-text { display: flex; flex-direction: column; gap: 8px; }
.figma-h { font-size: 32px; letter-spacing: -.02em; }
.figma-cta { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; }

.plain li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 22px; letter-spacing: -.01em; }
.plain li:last-child { border-bottom: 1px solid var(--line); }

.next { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: baseline; padding: 40px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: opacity .2s; }
.next:hover { opacity: .6; }
.next .muted { font-size: 20px; }
.next-logo { height: clamp(36px, 6vw, 72px); width: auto; max-width: 70%; }
.next-name { font-size: clamp(40px, 6vw, 80px); letter-spacing: -.04em; line-height: 1; }

/* About + contact + buttons ----------------------------------------- */
.about-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.about-copy { font-size: 24px; line-height: 1.4; letter-spacing: -.005em; }
@media (max-width: 860px) { .about-top, .life-grid { grid-template-columns: 1fr; } }
.experience, .believe, .life { display: flex; flex-direction: column; gap: 16px; }
.exp { display: flex; flex-wrap: wrap; gap: 20px 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.exp:first-of-type { border-top: 0; padding-top: 4px; }
.exp:last-of-type { border-bottom: 1px solid var(--line); }
.exp-logo { width: 72px; height: 72px; border-radius: 16px; background: var(--slot); color: var(--slot-fg); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.exp-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.exp-h { font-size: 22px; letter-spacing: -.01em; }
.exp-cta { padding-top: 24px; }
.btn, .pill {
  display: inline-block; border-radius: 999px; font-size: 20px; padding: 16px 32px; border: 1px solid var(--fg);
  background: var(--fg); color: var(--bg); transition: opacity .2s, transform .2s;
}
.btn:hover, .pill:hover { opacity: .8; }
.pill { padding: 10px 20px; font-size: 18px; background: transparent; color: var(--fg); border-color: var(--edge); }
.life-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.believe-list li { font-size: 24px; letter-spacing: -.01em; }
.believe-list li:last-child { border-bottom: 1px solid var(--line); }

.contact-rows { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.row.big, .row .big { font-size: clamp(24px, 3vw, 40px); letter-spacing: -.02em; }
.row.big { padding: 28px 0; }
.row.static { padding: 28px 0; }
[data-copy].pill .pill-b { display: none; }
[data-copy].pill.copied .pill-a { display: none; }
[data-copy].pill.copied .pill-b { display: inline; }

/* CV ---------------------------------------------------------------- */
.cv-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 16px; color: var(--muted); }
.cv {
  background: #fff; color: #111; width: 100%; max-width: 794px; margin: 0 auto; padding: 56px; gap: 24px;
  border-radius: 12px; box-shadow: 0 1px 0 var(--line), 0 20px 50px -30px rgba(0, 0, 0, .35);
  font-size: 14px; line-height: 1.5;
}
.cv .muted { color: #555; }
.cv hr { border-top-color: #d4d4d8; }
.cv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; align-items: flex-start; }
.cv h1 { font-size: 44px; line-height: 1; letter-spacing: -.04em; font-weight: 500; margin-bottom: 6px; }
.cv-head .muted { font-size: 16px; }
.cv-contact { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #555; text-align: right; }
.cv-summary { font-size: 15px; color: #222; }
.cv h2 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #555; font-weight: 500; margin-bottom: 14px; }
.cv section { display: block; margin-top: 4px; }
.cv-row { display: flex; gap: 20px; margin-bottom: 16px; }
.cv-dates { flex: 0 0 110px; font-size: 13px; color: #555; }
.cv-title { display: block; font-size: 16px; margin-bottom: 4px; }
.cv-line { display: block; font-size: 13px; color: #444; }
.cv p { font-size: 13px; color: #444; line-height: 1.6; }
@media (max-width: 640px) { .cv { padding: 28px 20px; } .cv-contact { text-align: left; } .cv-row { flex-direction: column; gap: 4px; } }
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  .top, .foot, .no-print, .skip { display: none !important; }
  .wrap { padding: 0; gap: 0; min-height: 0; }
  .cv { box-shadow: none; border-radius: 0; max-width: none; width: 210mm; min-height: 297mm; margin: 0; padding: 14mm 16mm; }
}

/* Motion ------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .top nav { font-size: 20px; gap: 8px 24px; }
  .row { font-size: 20px; }
  .figma { padding: 24px; }
  .foot nav { gap: 16px; }
}

/* Linked titles, card links ---------------------------------------- */
a.ext { display: inline-flex; align-items: baseline; gap: .15em; }
a.ext .ico { width: .5em; height: .5em; opacity: .55; transition: transform .2s, opacity .2s; align-self: flex-start; margin-top: .15em; }
a.ext:hover .ico { transform: translate(2px, -2px); opacity: 1; }
a.ext:hover { text-decoration: underline; text-underline-offset: .12em; text-decoration-thickness: 1px; }
.card-media { display: block; }
.more { display: inline-block; margin-top: 12px; font-size: 18px; border-bottom: 1px solid var(--edge); }
.more:hover { border-color: var(--fg); }
.exp-logo { object-fit: contain; }
img.exp-logo { background: var(--slot); padding: 10px; }

/* Books + music ----------------------------------------------------- */
.shelf, .music { display: flex; flex-direction: column; gap: 20px; }
.shelf-intro { font-size: 20px; max-width: 560px; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px 24px; margin-top: 8px; }
.book { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.book .media { border-radius: 8px; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .5); transition: transform .3s; }
.book:hover .media { transform: translateY(-4px) rotate(-1deg); }
.book-t { font-size: 18px; line-height: 1.25; letter-spacing: -.01em; }
.badge { display: inline-block; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--edge); color: var(--muted); }
.badge-audio { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.on-repeat { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; padding: 28px; border-radius: var(--radius); background: var(--slot); transition: transform .3s; }
.on-repeat:hover { transform: scale(.995); }
.on-repeat-text { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; flex: 1 1 280px; }
.on-repeat-t { font-size: clamp(24px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.1; }
.on-repeat-cta { display: inline-flex; gap: 6px; align-items: center; font-size: 18px; }
.play-ico { display: inline-flex; color: var(--fg); }
.more { align-self: flex-start; }

/* Page glow: a soft colour that builds towards the footer --------- */
html { background: var(--bg); }
body {
  background-image:
    radial-gradient(120% 100% at 50% 100%, var(--glow) 0%, transparent 70%);
  background-repeat: no-repeat;
  background-size: 100% min(60vh, 600px);
  background-position: bottom center;
}
body.page-case { --glow: var(--glow-light); }
[data-theme='dark'] body.page-case { --glow: var(--glow-dark); }
body.page-case { background-image:
    radial-gradient(120% 100% at 50% 100%, var(--glow) 0%, transparent 70%),
    radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--glow) 20%, transparent) 0%, transparent 70%);
  background-size: 100% min(60vh, 600px), 100% 40vh;
  background-position: bottom center, top center; }
@media print { body { background: none !important; } }

/* Recommendations ---------------------------------------------------- */
.quote { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.quote blockquote { margin: 0; }
.quote p { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; letter-spacing: -.015em; }
.quote.big p { font-size: clamp(30px, 4.6vw, 64px); line-height: 1.08; letter-spacing: -.03em; max-width: 1100px; }
.quote figcaption { font-size: 18px; }
.quote-band { padding: 24px 0; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; border-top: 1px solid var(--line); padding-top: 32px; }
.kind { display: flex; flex-direction: column; gap: 16px; }
.underline { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

/* Avatar logo: glasses off by default, on when hovered. Each click swaps which is the default. */
.brand { display: grid; width: 52px; height: 52px; }
.face { grid-area: 1 / 1; width: 52px; height: 52px; display: block; transition: opacity .15s, transform .25s cubic-bezier(.2, .7, .2, 1); }
.face-on { opacity: 0; }
.brand:focus-visible .face-on { opacity: 1; }
.brand:focus-visible .face-off { opacity: 0; }

[data-theme='dark'] .face { filter: invert(1); } /* TODO: replace with dedicated dark-mode artwork */

/* Logos I've designed: a loose rainbow arc that fans out on hover --- */
.designed { display: flex; flex-direction: column; gap: 28px; }
.designed-head { display: grid; grid-template-columns: 1fr 2fr; gap: 16px 48px; align-items: end; }
.designed-head p { color: var(--muted); font-size: 18px; max-width: 420px; }
@media (max-width: 860px) { .designed-head { grid-template-columns: 1fr; } }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; padding: 24px 24px 56px; }
.tile { position: relative; margin: 0 -3px; transform: translateY(var(--y)) rotate(var(--r)); transition: margin .45s cubic-bezier(.2, .7, .2, 1), transform .45s cubic-bezier(.2, .7, .2, 1); }
.tiles:hover .tile, .tiles:focus-within .tile { margin: 0 12px; transform: translateY(0) rotate(0); }
.tile > a, .tile > .tile-in {
  display: flex; align-items: center; justify-content: center;
  width: 116px; height: 108px; padding: 14px 16px; border-radius: 30px;
  background: #fff; box-shadow: 0 14px 26px -16px rgba(20, 10, 40, .45);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s;
}
.tile img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.tile-text { color: #111; font-size: 14px; font-weight: 600; text-align: center; letter-spacing: -.02em; line-height: 1.1; }
.tile-name { position: absolute; left: 50%; top: calc(100% + 12px); transform: translateX(-50%); white-space: nowrap; font-size: 17px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.tile { z-index: var(--z, 0); }
.tile:hover, .tile:focus-within { z-index: 30; }
.tile:hover > a, .tile:hover > .tile-in, .tile:focus-within > a, .tile:focus-within > .tile-in { transform: translateY(-8px) scale(1.14); box-shadow: 0 24px 40px -20px rgba(20, 10, 40, .55); }
.tile:hover .tile-name, .tile:focus-within .tile-name { opacity: 1; }
@media (hover: none) { .tiles { gap: 28px 8px; padding-bottom: 8px; } .tile { margin: 0; transform: none; } .tile-name { position: static; transform: none; opacity: 1; display: block; text-align: center; margin-top: 8px; font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .tile, .tile > a, .tile > .tile-in, .tile-name, .face { transition: none; } .brand:hover .face { transform: none; } }

/* Small visit link, logo plates, bookshelf ------------------------- */
.visit { font-size: 15px; color: var(--muted); }
.visit a { color: inherit; display: inline-flex; gap: 4px; align-items: center; }
.visit a:hover { color: var(--fg); }
.visit .ico { width: 14px; height: 14px; }
.plate { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 22px; padding: 14px 22px; }
.plate.sm { padding: 8px; border-radius: 14px; }
.plate.sm img { height: 34px; width: auto; display: block; }
.next-logo { height: clamp(40px, 6vw, 72px); width: auto; max-width: 100%; display: block; }
.card-title { display: flex; align-items: center; gap: 14px; }
.quote-note { display: block; margin-top: 6px; font-size: 16px; max-width: 640px; }

.bookshelf { position: relative; padding: 130px 0 0; margin-top: -60px; overflow-x: auto; overflow-y: visible; }
.shelf-inner { min-width: max-content; padding: 0 56px 12px; }
.shelf-books { display: flex; align-items: flex-end; justify-content: center; gap: 0; margin: 0; padding: 0; }
.sbook { position: relative; width: 112px; height: var(--h); margin-left: -8px; background: var(--c); border-radius: 4px 6px 3px 3px; transform: rotate(var(--r)); transform-origin: bottom center; box-shadow: 0 10px 18px -12px rgba(0, 0, 0, .55), inset -3px 0 0 rgba(0, 0, 0, .08); transition: transform .3s cubic-bezier(.2, .7, .2, 1); outline-offset: 4px; }
.sbook:first-child { margin-left: 0; }
.sbook img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.spine { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 12px 10px; color: #1a1a1a; font-size: 13px; line-height: 1.2; }
.spine span { font-weight: 600; letter-spacing: -.01em; }
.spine em { font-style: normal; font-size: 11px; opacity: .7; }
.audible { position: absolute; top: 6px; right: 6px; font-size: 10px; padding: 2px 6px; border-radius: 999px; background: #111; color: #fff; }
.sbook:hover, .sbook:focus-visible { transform: translateY(-18px) rotate(-2deg); z-index: 3; }
.tip { display: none; }
.book-tip { position: fixed; z-index: 1000; left: 0; top: 0; display: flex; flex-direction: column; gap: 2px; min-width: 210px; padding: 12px 16px; border-radius: 18px; background: var(--bg); color: var(--fg); box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .15s; width: max-content; max-width: min(300px, calc(100vw - 24px)); }
.book-tip.on { opacity: 1; }
.book-tip strong { font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.book-tip span { color: var(--muted); }
.book-tip .state { color: var(--purple); }
.tip strong { font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.tip span { color: var(--muted); }
.tip .state { color: var(--purple); }
.board { height: 14px; background: var(--shelf); border-radius: 3px; box-shadow: none; position: relative; z-index: 2; }
.thumb { position: relative; display: block; flex: 0 0 auto; width: 220px; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--bg); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .play-ico { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0, 0, 0, .25); }
.thumb .play-ico svg { width: 44px; height: 44px; }

.on-repeat { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 20px; border-radius: var(--radius); background: var(--slot); }
.on-repeat-text { flex: none; }
.on-repeat-t { font-size: clamp(22px, 2.4vw, 32px); }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; }
.player iframe, .player-btn { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.player-btn { padding: 0; background: #000; cursor: pointer; }
.player-btn img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.player-btn:hover img { transform: scale(1.03); }
.player-btn .play-ico { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0, 0, 0, .2); }
.player-btn .play-ico svg { width: 72px; height: 72px; }
.on-repeat-cta { margin-top: 8px; font-size: 17px; }
@media (max-width: 860px) { .on-repeat { grid-template-columns: 1fr; } }

img.exp-logo { padding: 0; object-fit: cover; border-radius: 16px; }
img.exp-logo[style] { padding: 8px; object-fit: contain; }
.plate.sm img { border-radius: 6px; }

.tile > [style*='overflow'] img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.lede a.ext { color: var(--fg); }
.lede a.ext .ico { width: .55em; height: .55em; margin-top: .2em; }

.sbook.has-cover { height: auto; align-self: flex-end; background: transparent; }
.sbook.has-cover img { height: auto; }
.tip strong { max-width: 280px; }
.sbook { flex: 0 0 auto; width: 120px; margin-left: -14px; }
.sbook:first-child { margin-left: 0; }
.shelf-books { gap: 0; }

/* Mobile: tighter, calmer, more room to breathe ---------------------- */
@media (max-width: 640px) {
  :root { --gutter: 24px; --radius: 20px; }
  body { font-size: 16px; line-height: 1.55; }
  .wrap { padding-top: 16px; padding-bottom: 32px; }
  :root { --section: 72px; }
  .cards { gap: 80px; }
  hr { margin: 0; }

  /* One compact row: logo, small menu, theme toggle */
  .top { flex-wrap: nowrap; gap: 10px; align-items: center; }
  .brand, .face { width: 38px; height: 38px; }
  .brand { height: 38px; }
  .top-right { flex-wrap: nowrap; gap: 10px; margin-left: auto; }
  .top nav { flex-wrap: nowrap; gap: 14px; font-size: 15px; white-space: nowrap; }
  .top nav a[aria-current='page'] { text-underline-offset: 4px; }
  .tools { gap: 6px; }
  .round { width: 34px; height: 34px; }
  .round svg { width: 18px; height: 18px; }

  /* Type: a notch smaller */
  .display, .title { font-size: clamp(34px, 10.5vw, 44px); line-height: 1.04; }
  .lede { font-size: 20px; line-height: 1.4; gap: 14px; }
  .about-copy { font-size: 18px; }
  h2 { font-size: 26px; }
  .card-title h2 { font-size: 24px; }
  .card-copy p { font-size: 16px; }
  .quote p { font-size: 20px; }
  .quote.big p { font-size: clamp(34px, 10.5vw, 44px); line-height: 1.04; }
  .on-repeat-t { font-size: 20px; }
  .stat-n { font-size: 40px; }
  .next-name { font-size: 40px; }
  .caption h3 { font-size: 19px; }
  .caption p { font-size: 16px; }
  .exp-h, .book-t { font-size: 16px; }
  .plain li { font-size: 18px; }

  /* Contact: email on top, full-width actions under it */
  .row { font-size: 18px; padding: 20px 0; }
  .row.big, .row .big { font-size: 20px; }
  .row.static { flex-direction: column; align-items: stretch; gap: 14px; padding: 22px 0; }
  .row.static .big { overflow-wrap: anywhere; }
  .pill, .btn { display: flex; justify-content: center; width: 100%; padding: 14px 20px; font-size: 16px; }
  .exp-cta .btn { width: 100%; }

  .wrap { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .foot { flex-direction: column; align-items: flex-start; gap: 14px; position: relative; z-index: 5; }
  .foot nav { width: 100%; justify-content: space-between; gap: 0; }
  .foot nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 6px; margin: 0 -6px; -webkit-tap-highlight-color: rgba(122, 73, 224, .15); }
  .foot .email { font-size: 16px; }
  .foot-right { column-gap: 24px; }
}

/* Audio deck ---------------------------------------------------------- */
.deck { display: flex; justify-content: center; }
.deck-art { position: relative; width: min(100%, 340px); aspect-ratio: 1; }
.sleeve { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; display: block; box-shadow: 0 24px 40px -22px rgba(20, 10, 40, .6); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.vinyl { position: absolute; z-index: 1; top: 4%; left: 4%; width: 92%; height: 92%; transform: translateX(0); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.disc { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle, #e0457a 0 11%, #111 12% 38%, #222 39% 40%, #111 41% 62%, #222 63% 64%, #111 65%); animation: spin 9s linear infinite paused; }
.playing .vinyl { transform: translateX(26%); }
.playing .disc { animation-play-state: running; }
.playing .sleeve { transform: translateX(-8%); }
@keyframes spin { to { transform: rotate(360deg); } }
.ctrl { display: flex; align-items: center; gap: 14px; margin: 10px 0 6px; }
.play { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; background: var(--fg); color: var(--bg); display: grid; place-items: center; transition: transform .2s; }
.play:hover { transform: scale(1.06); }
.play .i-pause { display: none; } .playing .play .i-play { display: none; } .playing .play .i-pause { display: block; }
.seek { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 6px; border-radius: 99px; cursor: pointer; background: linear-gradient(to right, var(--purple) var(--p, 0%), var(--line) var(--p, 0%)); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--fg); border: 0; }
.seek::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--fg); border: 0; }
.time { flex: none; font-size: 14px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .disc { animation: none; } }
.artist { display: inline-flex; gap: 4px; align-items: center; width: fit-content; font-size: 17px; }
.artist .ico { width: 14px; height: 14px; }

/* Mobile: logos scroll across the page, overlapping */
@media (max-width: 640px) {
  .tiles { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity; gap: 0; margin: 0 calc(var(--gutter) * -1); padding: 44px calc(100% - 180px) 96px 56px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tiles::-webkit-scrollbar { display: none; }
  .tile { flex: 0 0 auto; margin: 0 -14px 0 0; transform: scale(var(--s, 1)); transform-origin: center; z-index: var(--z, 0); scroll-snap-align: start; transition: none; }
  .tile:last-child { margin-right: 0; }
  .tile-name { display: block; position: absolute; left: 50%; top: calc(100% + 18px); transform: translateX(-50%); opacity: var(--o, 0); margin: 0; font-size: 18px; transition: none; }
  .tiles:hover .tile, .tiles:focus-within .tile { margin: 0 -14px 0 0; transform: scale(var(--s, 1)); }
  .tile:hover > .tile-in, .tile:focus-within > .tile-in { transform: none; }
  .tile > a, .tile > .tile-in { width: 124px; height: 116px; }
  /* Centred nav: logo left, menu centred, toggle right */
  .top { display: grid; grid-template-columns: 1fr auto 1fr; }
  .top-right { display: contents; }
  .top nav { justify-self: center; grid-column: 2; }
  .tools { grid-column: 3; justify-self: end; }
  .brand { grid-column: 1; justify-self: start; }
  .tiles { scroll-padding-left: 56px; }
  /* Shelf scrolls with the books */
  .bookshelf { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
  .sbook { width: 101px; height: calc(var(--h) * 1.2); margin-left: -12px; }
  .shelf-inner { padding: 0 48px 12px; }
}

@media (max-width: 640px) { .chips { gap: 8px; } .chips li { padding: 5px 11px; font-size: 13px; } }
.on-repeat { overflow: hidden; }
@media (max-width: 860px) { .deck-art { width: 74%; } .playing .sleeve { transform: translateX(-6%); } .playing .vinyl { transform: translateX(22%); } }

/* Player: red, to match the artwork */
.deck-art { aspect-ratio: 1716 / 1490; cursor: pointer; width: min(100%, 380px); }
.sleeve { height: 100%; object-fit: contain; }
.vinyl { height: 92%; width: auto; aspect-ratio: 1; left: 6%; }
.play { background: linear-gradient(135deg, #ff8a4c 0%, #e8352b 55%, #b81d1a 100%); color: #000; box-shadow: 0 10px 20px -10px rgba(216, 40, 30, .7); }
.seek { background: linear-gradient(to right, #ff8a4c, #d9281f) 0 0 / var(--p, 0%) 100% no-repeat, var(--line); }
.seek::-webkit-slider-thumb { background: #d9281f; }
.seek::-moz-range-thumb { background: #d9281f; }
.on-repeat-text { gap: 12px; flex: 1 1 280px; }
.on-repeat-text .badge { margin-bottom: 4px; }
.on-repeat-t { line-height: 1.1; }
.on-repeat-text .ctrl { margin-top: 10px; }
@media (max-width: 860px) { .deck-art { width: 74%; } .on-repeat-text { gap: 10px; } }

/* Player v3: no card, play button on the cover ------------------------- */
.on-repeat { background: none; padding: 0; border-radius: 0; overflow: visible; gap: 56px; }
.deck-art { width: min(100%, 304px); }
.deck { justify-content: flex-start; }
.vinyl { height: 92%; top: 4%; left: 6%; }
.disc { object-fit: cover; background: none; animation: spin 9s linear infinite paused; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .55); border-radius: 50%; }
.playing .disc { animation-play-state: running; }
.sleeve { border-radius: 14px; }
.play { position: absolute; z-index: 3; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ff8a4c 0%, #e8352b 55%, #b81d1a 100%); color: #000; box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .6); transition: transform .25s, opacity .25s; pointer-events: none; }
.deck-art:hover .play { transform: scale(1.07); }
.playing .deck-art .play { opacity: .0; transform: scale(.9); }
.playing .deck-art:hover .play, .playing .deck-art:focus-visible .play { opacity: 1; transform: scale(1); }
.on-repeat-text .seek { width: 100%; max-width: 360px; margin-top: 8px; }
.round[hidden] { display: none; }
#bgm-toggle { background: linear-gradient(135deg, #ff8a4c, #d9281f); border-color: transparent; color: #000; }
@media (max-width: 860px) { .on-repeat { gap: 28px; } .deck { justify-content: center; } .deck-art { width: 66%; } .on-repeat-text .seek { max-width: none; } }
@media (hover: none) { .playing .deck-art .play { opacity: .0; } }

.on-repeat { display: flex; align-items: center; gap: 96px; }
.deck { flex: none; }
.on-repeat-text { flex: 1 1 0; min-width: 0; }
.playing .vinyl { transform: translateX(40%); }
.playing .sleeve { transform: none; }
@media (max-width: 860px) { .on-repeat { flex-direction: column; align-items: stretch; gap: 28px; } .deck { width: 100%; padding-right: 0; } .deck-art { width: 62%; margin-right: 0; } .playing .vinyl { transform: translateX(34%); } }
.deck { flex: 0 0 304px; width: 304px; }
.deck-art { width: 100%; }
@media (max-width: 860px) { .deck { flex: none; width: 100%; justify-content: flex-start; } .deck-art { width: 74%; margin: 0; } }
.on-repeat { gap: 140px; } @media (max-width: 860px) { .on-repeat { gap: 28px; } }

/* Player v4: centred, white play button, no loader ---------------------- */
.on-repeat { justify-content: center; }
.play { background: #fff; color: #000; box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .55); }
.seek { display: none; }
#bgm-toggle .n-play { display: none; }
#bgm-toggle.is-paused .n-play { display: block; }
#bgm-toggle.is-paused .n-pause { display: none; }
.on-repeat-text { flex: 0 1 auto; max-width: 460px; } .on-repeat { gap: 120px; } @media (max-width: 860px) { .on-repeat-text { max-width: none; } .on-repeat { gap: 28px; } }
#bgm-toggle { position: relative; padding: 0; background: none; border: 0; color: #fff; overflow: visible; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .6); border-radius: 50%; }
#bgm-toggle .n-disc { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; animation: spin 6s linear infinite; }
#bgm-toggle.is-paused .n-disc { animation-play-state: paused; }
#bgm-toggle svg { position: relative; z-index: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55)); }
@media (prefers-reduced-motion: reduce) { #bgm-toggle .n-disc { animation: none; } }

/* Dark mode lifts, badge with repeat icon -------------------------------- */
.badge-repeat { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border: 0; background: #ddd0fb; color: #2a1f4d; font-weight: 500; }
[data-theme='dark'] .badge-repeat { background: #8a73d6; color: #fff; }
[data-theme='dark'] .chips li { color: #fff; }
[data-theme='dark'] .pill { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* More breathing room, one rhythm across the site -------------------------- */
.experience, .believe, .life, .kind { gap: 28px; }
.music .on-repeat { margin-top: 62px; }
.badge-repeat { padding: 9px 18px 9px 14px; background: #f1ecfe; }
.on-repeat-text { gap: 14px; }
@media (max-width: 860px) { .music .on-repeat { margin-top: 37px; } }

/* How I Work ---------------------------------------------------------- */
.how-body { display: flex; flex-direction: column; gap: 48px; }
.how-steps { display: flex; flex-direction: column; }
.how-steps > li { display: flex; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.how-steps > li:last-child { border-bottom: 1px solid var(--line); }
.how-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.how-text h3, .how-also h3 { font-size: 22px; font-weight: 400; letter-spacing: -.01em; }
.how-text p { color: var(--muted); max-width: 560px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.tool { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px 10px 10px; border-radius: 999px; background: color-mix(in srgb, var(--slot) 50%, transparent); font-size: 16px; }
.tool img, .tool .mono { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; flex: none; }
.tool .mono { display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: -.02em; }
.how-also { display: flex; flex-direction: column; gap: 14px; }
.row-t { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tag { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: #f1ecfe; color: #2a1f4d; letter-spacing: 0; }
[data-theme='dark'] .tag { background: #3e2e7d; color: #d6c8ff; }

/* Featured quote: diagonal purple gradient through the letters */
.quote.big blockquote p, .kind .quote blockquote p { background: linear-gradient(120deg, #1c0e4e 0%, #4b24b8 45%, #9a78f5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
[data-theme='dark'] .quote.big blockquote p, .kind .quote blockquote p { background: linear-gradient(120deg, #8a6cf0 0%, #c3aeff 50%, #f4efff 100%); -webkit-background-clip: text; background-clip: text; }
@media (max-width: 640px) { .how-steps li { gap: 16px; } }

/* About: quotes at intro size, semibold; experience tag; purple repeat badge */
.kind .quote p { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; font-weight: 500; letter-spacing: -.01em; }
.exp-h .tag { margin-left: 10px; vertical-align: middle; }
.badge-repeat { color: #4a2aa6; }
[data-theme='dark'] .badge-repeat { background: #3e2e7d; color: #d6c8ff; }
@media (max-width: 640px) { .kind .quote p { font-size: 18px; } }

.tool .logo-tile { background: #fff; padding: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.tool .mono.emoji { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); font-size: 15px; }
.how-steps > li:first-child { border-top: 0; padding-top: 0; }
.quote.big blockquote p, .kind .quote blockquote p { background-size: 240% 240%; animation: quote-shift 12s ease-in-out infinite alternate; }
@keyframes quote-shift { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }
@media (prefers-reduced-motion: reduce) { .quote.big blockquote p, .kind .quote blockquote p { animation: none; } }

/* Logos I've Designed: title left, logos top-right */
@media (min-width: 861px) {
  .designed { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px 48px; align-items: start; }
  .designed .tiles { flex-wrap: nowrap; justify-content: flex-end; align-items: flex-start; padding: 0 12px 56px 0; min-width: 0; }
  .designed .tile { flex: 0 1 auto; min-width: 0; }
}

/* Dark purple actions: View My CV, Copy Email */
.btn, .pill[data-copy] { background: #2a1f4d; border-color: #2a1f4d; color: #fff; }
[data-theme='dark'] .btn, [data-theme='dark'] .pill[data-copy] { background: #4a3a8f; border-color: #4a3a8f; color: #fff; }
[data-theme='dark'] 
/* Experience: tighter rhythm */
.experience { gap: 0; }
.experience > h2 { margin-bottom: 16px; }
.exp { padding: 22px 0; }
.exp:first-of-type { padding-top: 6px; }
.exp-cta { padding-top: 20px; }
/* Alex quote: one weight up */
.quote.big p { font-weight: 500; }
/* About photo: cartoon glasses on hover / tap */
.photo-swap { position: relative; cursor: pointer; }
.photo-swap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-swap img.on { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
.photo-swap:hover img.on, .photo-swap:focus-visible img.on, .photo-swap.on img.on { opacity: 1; }

/* Dark theme: raised surfaces are lighter, not shadowed */
[data-theme='dark'] .book-tip { background: var(--s3); box-shadow: 0 0 0 1px #3a3640, 0 14px 30px -14px rgba(0, 0, 0, .7); }
[data-theme='dark'] .tool { background: var(--s2); }
[data-theme='dark'] .exp-logo, [data-theme='dark'] img.exp-logo { background: var(--s2); }
[data-theme='dark'] .card-text .chips li { box-shadow: none; }

/* Footer copy button: white circle, black icon in light mode */
.round.sm[data-copy] { background: #fff; color: #111; border-color: var(--edge); }
.round.sm[data-copy]:hover { background: #f1f1f1; }
[data-theme='dark'] .round.sm[data-copy] { background: transparent; color: var(--fg); border-color: var(--edge); }
[data-theme='dark'] .round.sm[data-copy]:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.kind .quote blockquote p { background-size: 170% 170%; }
:root:not([data-theme='dark']) .kind .quote blockquote p { background-image: linear-gradient(120deg, #1c0e4e 0%, #3a1c94 50%, #5d33c9 100%); }

/* Home hero name: purple gradient with lots of motion, starting dark */
.hero .display { background: linear-gradient(100deg, #0f0630 0%, #1c0e4e 18%, #4b24b8 45%, #9a78f5 68%, #4b24b8 85%, #1c0e4e 100%); background-size: 320% 100%; background-position: 0% 50%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: hero-shift 7s ease-in-out infinite alternate; padding-bottom: .14em; margin-bottom: -.14em; }
[data-theme='dark'] .hero .display { background-image: linear-gradient(100deg, #5b3fc4 0%, #8a6cf0 25%, #c3aeff 55%, #f4efff 72%, #8a6cf0 100%); }
@keyframes hero-shift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .hero .display { animation: none; } }

/* About photo: lilac strip in light mode, violet in dark mode */
.photo-theme img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-theme .ph-dark { display: none; }
[data-theme='dark'] .photo-theme .ph-light { display: none; }
[data-theme='dark'] .photo-theme .ph-dark { display: block; }

/* Quotes share the hero name's gradient and motion */
.quote.big blockquote p, .kind .quote blockquote p,
:root:not([data-theme='dark']) .kind .quote blockquote p { background-image: linear-gradient(100deg, #0f0630 0%, #1c0e4e 18%, #4b24b8 45%, #9a78f5 68%, #4b24b8 85%, #1c0e4e 100%); background-size: 320% 100%; background-position: 0% 50%; animation: hero-shift 7s ease-in-out infinite alternate; }
[data-theme='dark'] .quote.big blockquote p, [data-theme='dark'] .kind .quote blockquote p { background-image: linear-gradient(100deg, #5b3fc4 0%, #8a6cf0 25%, #c3aeff 55%, #f4efff 72%, #8a6cf0 100%); }
@media (prefers-reduced-motion: reduce) { .quote.big blockquote p, .kind .quote blockquote p { animation: none; } }

.tile-name .ico { width: 14px; height: 14px; vertical-align: -1px; margin-left: 2px; }

/* Record: hidden in the sleeve, slides out on hover, same distance when playing */
.vinyl { transform: translateX(0); transition: transform .6s cubic-bezier(.2, .8, .2, 1.2); }
.vinyl .disc { filter: none; transition: filter .4s; }
[data-audio] .deck-art:not(.hush):hover .vinyl, [data-audio] .deck-art:not(.hush):focus-visible .vinyl, [data-audio].playing .vinyl { transform: translateX(45.6%); }
[data-audio] .deck-art:not(.hush):hover .vinyl .disc, [data-audio] .deck-art:not(.hush):focus-visible .vinyl .disc, [data-audio].playing .vinyl .disc { filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .5)); }
@media (max-width: 860px) {
  [data-audio] .deck-art:not(.hush):hover .vinyl, [data-audio] .deck-art:not(.hush):focus-visible .vinyl, [data-audio].playing .vinyl { transform: translateX(38.4%); }
}
@media (prefers-reduced-motion: reduce) { .vinyl { transition: none; } }

/* Mobile: big one-line name (~80% of screen width) and compact case-study meta (two columns, small labels) */
@media (max-width: 640px) {
  .hero .display { font-size: calc((100vw - 48px) / 6.6); white-space: nowrap; letter-spacing: -0.02em; }
  .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; font-size: 16px; line-height: 1.3; }
  .meta div { flex: none; gap: 2px; }
  .meta dt { font-size: 13px; }
  .meta div:last-child { grid-column: 1 / -1; }
  .meta + hr { margin: 20px 0; }
}

/* Logo: glasses and tilt on real hover only (never sticky on touch); no tap highlight box */
.brand, .brand * { -webkit-tap-highlight-color: transparent; }
.brand:focus:not(:focus-visible) { outline: none; }
@media (hover: hover) {
  .brand:hover .face-on { opacity: 1; }
  .brand:hover .face-off { opacity: 0; }
  .brand:hover .face { transform: rotate(-6deg) scale(1.06); }
}
a, button { -webkit-tap-highlight-color: transparent; }

[data-face='on'] .face-on { opacity: 1; }
[data-face='on'] .face-off { opacity: 0; }
@media (hover: hover) {
  [data-face='on'] .brand:hover .face-on { opacity: 0; }
  [data-face='on'] .brand:hover .face-off { opacity: 1; }
}
@media (max-width: 640px) {
  .title, .display { font-size: calc((100vw - 48px) / 6.6); letter-spacing: -0.02em; }
}
@media (max-width: 860px) { .deck-art { width: 74%; } }
.cs-head { padding-bottom: 8px; }

/* How I Work: dividers end where the copy ends */
.how-steps { max-width: 608px; }
.how-steps .move-n { min-width: 24px; }

/* Flow State Record (desktop): title on the left, the record piece beside it, left aligned */
@media (min-width: 861px) {
  .music { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px 48px; align-items: start; }
  .music .on-repeat { margin-top: 0; justify-content: flex-start; gap: 64px; }
  .music .on-repeat-text { max-width: 420px; }
  .music .deck { flex: 0 0 280px; width: 280px; }
}
@media (min-width: 861px) { .music .on-repeat { justify-content: flex-end; } }

.book-tip.has-link.on { pointer-events: auto; }
.book-tip .tip-link, .tip-link { margin-top: 8px; align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: #2a1f4d; color: #fff !important; font-size: 14px; text-decoration: none; }
[data-theme='dark'] .book-tip .tip-link { background: #4a3a8f; }
@media (min-width: 861px) {
  .music > h2, .music > .shelf-intro { grid-column: 1; }
  .music > .on-repeat { grid-column: 2; grid-row: 1 / span 2; }
  .music { row-gap: 20px; }
}
@media (min-width: 861px) { .music { grid-template-rows: auto 1fr; row-gap: 12px; align-content: start; } .music > .shelf-intro { align-self: start; } }

/* The Balrog stands straight and still, with a little room either side (design on one side, fun on the other) */
.sbook.straight { transform: translateY(5px); margin-left: -3px; box-shadow: none; }
.sbook.straight:hover, .sbook.straight:focus-visible { transform: translateY(5px); z-index: 3; }
.sbook.straight + .sbook { margin-left: -5px; }

/* Real images: show the whole picture; on phones scroll sideways so screens stay readable */
.media-fit { height: auto; background: #28103a; }
.media-accent.media-fit { background: #28103a; }
.media-fit img { height: auto; display: block; object-fit: contain; }
@media (max-width: 640px) {
  .media-fit { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .media-fit::-webkit-scrollbar { display: none; }
  .media-fit img { width: auto; max-width: none; height: 440px; }
  .media-wide.media-fit img { height: 320px; }
}

/* Fixed image shapes (so you can mock them up): hero 16:9, motion 16:9, two-up 4:3 */
.media-hero { aspect-ratio: 16 / 9; height: auto; }
.media-hero.media-fit img { height: 100%; object-fit: cover; }
.media-motion { aspect-ratio: 16 / 9; height: auto; }
.media-half { aspect-ratio: 4 / 3; height: auto; }
@media (max-width: 640px) {
  .media-hero.media-fit { overflow: hidden; }
  .media-hero.media-fit img { width: 100%; height: 100%; max-width: 100%; }
}

/* One divider only: the footer's */
.next { border-bottom: 0; }

/* Wide images are 2:1 (2600 x 1300) */
.media-wide { aspect-ratio: 2 / 1; height: auto; }
@media (max-width: 640px) { .media-wide.media-ph { aspect-ratio: auto; min-height: 220px; } }
.row-soon { cursor: default; }
.row-soon .soon { color: var(--muted); font-size: 16px; }

/* Image pattern: Large 1600x900 (16:9) | Small 784x550 | XLarge 1600x1200 (4:3). Two smalls + gap = one large width. */
.gal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 32px); }
.gal > .full { grid-column: 1 / -1; }
.media-sm { aspect-ratio: 784 / 550; height: auto; }
.media-xl { aspect-ratio: 4 / 3; height: auto; }


/* Auto-scrolling tall screenshot */
.media-scroll{position:relative;overflow:hidden;container-type:size;background:#FBF4FF;display:block}
:root[data-theme="dark"] .media-scroll{background:#2b2236}
.media-scroll img{display:block;width:46%;height:auto;margin:0 auto;border-radius:0 0 18px 18px;box-shadow:0 8px 30px rgba(0,0,0,.14);animation:tests-scroll 50s ease-in-out infinite alternate;will-change:transform}
.media-scroll:hover img{animation-play-state:paused}
@keyframes tests-scroll{from{transform:translateY(0)}to{transform:translateY(calc(-100% + 100cqh))}}
@media (prefers-reduced-motion:reduce){.media-scroll img{animation:none}}

/* CV polish: match the site, fit one A4 page */
.cv { font-family: inherit; }
.cv h1 { font-size: 48px; }
.cv-head .muted { color: #6a5aa8; font-weight: 500; }
.cv h2 { color: #6a5aa8; margin-bottom: 10px; }
.cv-summary { font-size: 16px; line-height: 1.55; letter-spacing: -.01em; }
.cv-dates { flex: 0 0 128px; color: #6a5aa8; }
.cv-title { font-weight: 500; letter-spacing: -.01em; margin-bottom: 3px; }
.cv-line { line-height: 1.45; margin-bottom: 1px; }
.cv-row { margin-bottom: 13px; }
@media print {
  .cv { min-height: 0; height: 297mm; padding: 12mm 15mm; gap: 14px; overflow: hidden; font-size: 12.5px; }
  .cv h1 { font-size: 40px; }
  .cv-summary { font-size: 14px; }
  .cv-row { margin-bottom: 9px; }
  .cv-title { font-size: 14.5px; }
  .cv-line, .cv p { font-size: 11.5px; }
  .cv-dates { font-size: 11.5px; flex-basis: 128px; white-space: nowrap; }
}

/* CV, landscape A4 (matches the original CV) ------------------------- */
.cv2 { --mint: #e6f9e9; --serif: 'Fraunces', 'Cooper Black', Georgia, serif; background: #fff; color: #111; width: 100%; max-width: 1123px; margin: 0 auto; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 20px 50px -30px rgba(0,0,0,.35); font-family: 'Helvetica Neue', Helvetica, 'Inter Tight', Arial, sans-serif; font-weight: 300; }
.cv2-band { background: var(--mint); height: 68px; display: flex; align-items: center; justify-content: flex-end; padding: 0 48px; font: 600 14px var(--serif); }
.cv2-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; padding: 44px 48px 20px; }
.cv2-name { grid-column: span 2; }
.cv2 h1 { font: 600 40px/1.05 var(--serif); letter-spacing: -.01em; margin: 0 0 4px; }
.cv2 h2, .cv2 h3 { font: 600 17px/1.25 var(--serif); margin: 0; color: #111; text-transform: none; letter-spacing: 0; }
.cv2 h3 span { font-size: 14px; font-weight: 600; }
.cv2-sub { font: 500 14px/1.4 var(--serif); color: #777; margin: 3px 0 0; }
.cv2-name .cv2-sub { font-size: 26px; line-height: 1.1; margin-top: 0; }
.cv2-top { align-self: start; }
.cv2-role { margin-top: 48px; }
.cv2-top + .cv2-top { }
.cv2-gap { margin-top: 18px !important; }
.cv2-url { font: 600 12px var(--serif); margin: 12px 0 10px; color: #111; }
.cv2-body { font-size: 12px; line-height: 1.5; color: #222; margin: 10px 0 0; }
.cv2-role ul { margin: 12px 0 0; padding-left: 16px; }
.cv2-role li { font-size: 12px; line-height: 1.45; color: #222; margin-bottom: 8px; }
.cv2-foot { display: flex; justify-content: space-between; gap: 16px; padding: 0 48px 28px; font-size: 12px; color: #777; }
.cv2-foot b { color: #111; font-weight: 600; font-family: var(--serif); }
.cv2-right { display: flex; gap: 22px; }
@media screen and (max-width: 900px) { .cv2-grid { grid-template-columns: 1fr 1fr; } .cv2-name { grid-column: 1 / -1; } .cv2-role { margin-top: 28px; } }
@media screen and (max-width: 560px) { .cv2-grid { grid-template-columns: 1fr; padding: 28px 20px; } .cv2-band, .cv2-foot { padding-left: 20px; padding-right: 20px; } .cv2-foot { flex-direction: column; } .cv2 h1 { font-size: 32px; } }
@page { size: A4 landscape; margin: 0; }
@media print {
  .cv2 { width: 297mm; height: 210mm; max-width: none; border-radius: 0; box-shadow: none; margin: 0; display: flex; flex-direction: column; }
  .cv2-band { height: 16mm; padding: 0 12mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cv2-grid { flex: 1; padding: 11mm 12mm 0; gap: 0 8mm; }
  .cv2 h1 { font-size: 32px; } .cv2-name .cv2-sub { font-size: 20px; }
  .cv2-role { margin-top: 12mm; }
  .cv2-body, .cv2-role li { font-size: 10px; } .cv2-role li { margin-bottom: 5px; }
  .cv2-foot { padding: 0 12mm 8mm; font-size: 10px; }
}
.cv2 h3 span { display: block; font: 500 13px/1.3 var(--serif); color: #555; margin-top: 2px; }
.cv2 h2 { font-size: 16px; }
@media print {
  .cv2-grid { padding-top: 9mm; }
  .cv2-role { margin-top: 9mm; }
  .cv2-body, .cv2-role li { font-size: 10.8px; line-height: 1.45; }
  .cv2-role li { margin-bottom: 6px; }
  .cv2-url { margin: 9px 0 8px; }
}
@media print {
  .cv2-band, .cv2-foot { flex: none; }
  .cv2-grid { flex: 1 1 auto; min-height: 0; align-content: start; padding-top: 8mm; }
  .cv2-role { margin-top: 7mm; }
}
.cv2 h1, .cv2 h2, .cv2 h3, .cv2 section, .cv2 header { margin-top: 0; padding-top: 0; }
.cv2-role { margin-top: 48px; }
.cv2 .cv2-gap { margin-top: 18px; }
@media print { .cv2-role { margin-top: 8mm; } .cv2-grid { padding-top: 10mm; } }
.cv2 { gap: 0; row-gap: 0; } @media print { .cv2 { gap: 0; } }
@media print { .cv2-role { margin-top: 15mm; } .cv2-body, .cv2-role li { font-size: 11.3px; } .cv2-sub { font-size: 14px; }  }
.cv2 section.cv2-role { margin-top: 48px; } @media print { .cv2 section.cv2-role { margin-top: 16mm; } }

/* Mobile: small images stay side by side */
@media (max-width: 480px) { .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Tap to enlarge, scroll through */
.media img.zoomable { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(12, 10, 16, .92); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 72px 0 48px; opacity: 0; transition: opacity .2s ease; cursor: zoom-out; }
.lb.in { opacity: 1; }
.lb-fig { margin: 0 auto 18px; width: min(1100px, 94vw); border-radius: 14px; overflow: hidden; background: #1c1a22; cursor: default; }
.lb-fig img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lb-fig.tall { width: min(560px, 92vw); }
.lb-x { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .lb { transition: none; } }

/* Chat group: hand mockups run full width, the two screens sit side by side */
.media-full { aspect-ratio: 784 / 550; height: auto; }

/* Tests group: tall animated strip left, two images stacked right */
.gt { display: grid; grid-template-columns: 30fr 70fr; grid-template-rows: auto auto; gap: clamp(10px, 2vw, 32px); }
.gt-tall { grid-row: 1 / 3; min-height: 0; }
.gt-tall .media { height: 100%; aspect-ratio: auto; }
.gt-top .media, .gt-bot .media { height: auto; }
.gt-top .media { aspect-ratio: 1.22 / 1; }
.gt-bot .media { aspect-ratio: 1.75 / 1; }
@media (max-width: 600px) { .gt { grid-template-columns: 36fr 64fr; } }
.media-tall.media-scroll img { width: 78%; border-radius: 0; box-shadow: 0 8px 30px rgba(0,0,0,.14); animation: tests-scroll 70s ease-in-out infinite alternate; }
.media-tall.media-scroll::before, .media-tall.media-scroll::after { content: ''; position: absolute; left: 0; right: 0; height: 20%; z-index: 1; pointer-events: none; }
.media-tall.media-scroll::before { top: 0; background: linear-gradient(#FBF4FF, rgba(251,244,255,0)); }
.media-tall.media-scroll::after { bottom: 0; background: linear-gradient(rgba(251,244,255,0), #FBF4FF); }
:root[data-theme="dark"] .media-tall.media-scroll::before { background: linear-gradient(#2b2236, rgba(43,34,54,0)); }
:root[data-theme="dark"] .media-tall.media-scroll::after { background: linear-gradient(rgba(43,34,54,0), #2b2236); }
@keyframes tests-scroll { from { transform: translateY(-9%); } to { transform: translateY(calc(-95% + 100cqh)); } }
.media-scroll img.zoomable { cursor: default; }

/* Still of the Tests screen: phone runs off the bottom of the lilac card */
.media-tall { background: #FBF4FF; position: relative; overflow: hidden; }
:root[data-theme="dark"] .media-tall { background: #2b2236; }
.media-tall img { position: absolute; left: 10%; top: 5%; width: 80%; height: auto; border-radius: 22px 22px 0 0; box-shadow: 0 8px 30px rgba(0,0,0,.14); object-fit: unset; }

/* CV uses the site font (Inter Tight) */
.cv2 { --serif: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif; font-family: var(--serif); font-weight: 400; letter-spacing: -.005em; }
.cv2 h1 { font-weight: 500; letter-spacing: -.035em; }
.cv2 h2, .cv2 h3, .cv2-url, .cv2-band, .cv2-foot b { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
.cv2-sub { font-family: var(--serif); font-weight: 400; letter-spacing: -.005em; }
.cv2 section.cv2-role { margin-top: 32px; }
@media print { .cv2 section.cv2-role { margin-top: 7mm; } .cv2-sub { font-size: 13px; } .cv2-top .cv2-sub { line-height: 1.35; } }
@media print { .cv2-body, .cv2-role li { font-size: 12.2px; } .cv2-role li { margin-bottom: 8px; } .cv2-url { font-size: 12.5px; } .cv2 h3 { font-size: 19px; } .cv2 h3 span { font-size: 14px; } .cv2-sub { font-size: 14px; } .cv2 section.cv2-role { margin-top: 9mm; } }
@media print { .cv2-top .cv2-sub { font-size: 12.5px; line-height: 1.4; } .cv2-top h2 { font-size: 17px; } }

/* CV: same look as the site (lilac band, gradient name, soft glow) */
.cv2 { background: radial-gradient(120% 55% at 50% 118%, #ddd0fb 0%, rgba(221,208,251,0) 70%), #fbfbfc; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cv2-band { background: linear-gradient(100deg, #e9e0fe 0%, #ddd0fb 100%); justify-content: space-between; -webkit-print-color-adjust: exact; print-color-adjust: exact; color: #1c0e4e; }
.cv2-logo { width: 44px; height: 44px; display: block; }
@media print { .cv2-logo { width: 11mm; height: 11mm; } .cv2-band { height: 20mm; } .cv2 { background: radial-gradient(120% 55% at 50% 118%, #ddd0fb 0%, rgba(221,208,251,0) 70%), #fbfbfc; } }
.cv2 .cv2-gn { display: block; width: 251px; height: 54px; margin: 0 0 -6px -1px; }
@media print { .cv2 .cv2-gn { width: 200px; height: 43px; } }

/* CV: no bottom glow, larger type, more air */
.cv2 { background: #fbfbfc; }
@media print {
  .cv2 { background: #fbfbfc; }
  .cv2-band { height: 20mm; }
  .cv2-grid { padding-top: 11mm; gap: 0 8mm; }
  .cv2 .cv2-gn { width: 420px; height: 90px; margin-bottom: -12px; }
  .cv2-name .cv2-sub { font-size: 22px; margin-top: 4px; }
  .cv2-body, .cv2-role li { font-size: 13.5px; line-height: 1.42; } .cv2-role li { margin-bottom: 7px; }
  .cv2-url { font-size: 13px; }
  .cv2 h3 { font-size: 20px; } .cv2 h3 span { font-size: 14.5px; }
  .cv2-sub { font-size: 14.5px; } .cv2-top .cv2-sub { font-size: 13.5px; }
  .cv2-top h2 { font-size: 18px; }
  .cv2 section.cv2-role { margin-top: 13mm; }
  .cv2-foot { font-size: 11px; padding-bottom: 9mm; }
}

/* CV: interactive on screen, clean in print; skills spans two columns, aligned with the name */
.cv2-logo { position: relative; display: inline-block; width: 44px; height: 44px; flex: none; }
.cv2-logo img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .15s; }
.cv2-logo .on { opacity: 0; }
.cv2-logo:hover .on, .cv2-band:hover .cv2-logo .on { opacity: 1; }
.cv2-logo:hover .off, .cv2-band:hover .cv2-logo .off { opacity: 0; }
.cv2 .cv2-gn { display: none; }
.cv2 .cv2-live { display: inline-block; font: 500 67px/1.1 'Inter Tight', system-ui, sans-serif; letter-spacing: -.035em; padding: 0 .06em .1em 0; background: linear-gradient(100deg, #0f0630 0%, #1c0e4e 18%, #4b24b8 45%, #9a78f5 68%, #4b24b8 85%, #1c0e4e 100%); background-size: 320% 100%; background-position: 0% 50%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: hero-shift 7s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .cv2 .cv2-live { animation: none; } }
.cv2-grid { align-items: start; }
.cv2-top { grid-column: 3 / span 2; }
@media screen and (max-width: 900px) { .cv2-top { grid-column: 1 / -1; } .cv2 .cv2-live { font-size: 48px; } }
@media print {
  .cv2 .cv2-live { display: none; }
  .cv2 .cv2-gn { display: block; margin-top: -9px; }
  .cv2-logo { width: 11mm; height: 11mm; } .cv2-logo .on { display: none; }
  .cv2-top { padding-top: 0; }
}
.cv2-top .cv2-sub { max-width: 21em; }
@media print { .cv2 .cv2-gn { margin-top: -24px; margin-bottom: -4px; } }

/* View CV buttons */
.top-cv { padding: 9px 18px; font-size: 16px; white-space: nowrap; }
.hero-cta { margin-top: 28px; }
@media (max-width: 760px) { .top-cv { display: none; } }
@media (min-width: 761px) { .hero-cta { display: none; } }
.hero-cta .btn { display: inline-flex; width: auto; }

/* View CV pills (match the nav pill) */
.cv-pill { padding: 9px 18px; font-size: 16px; white-space: nowrap; }
.row-pills { display: inline-flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-pills .pill { white-space: nowrap; }
/* Record (desktop): shift the whole sleeve left so the record clears the text */
@media (min-width: 861px) { .music .on-repeat { gap: 104px; } }
.exp-logo[data-border] { border: 1px solid #e3e3e8; }
[data-theme='dark'] .exp-logo[data-border] { border-color: #3a3a44; }
.exp-cta .cv-pill { padding: 14px 28px; font-size: 20px; }
.plate.sm[style*='#ffffff'] { border: 1px solid #e3e3e8; }

/* Secondary case studies: compact, text only, with the app icon */
.earlier .rows { display: flex; flex-direction: column; gap: 8px; }
.e-card { padding: 28px 0; border-top: 1px solid var(--line); }
.e-card:first-child { border-top: 0; padding-top: 8px; }
.e-card .card-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.e-card .card-title h3 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.05; letter-spacing: -.03em; font-weight: 500; }
.e-card .year { color: var(--muted); font-size: 18px; }
.e-card .card-copy p { font-size: 20px; }
/* View CV on the Contact page: phones only (desktop has it in the nav) */
.cv-mobile { display: none; }
@media (max-width: 760px) { .cv-mobile { display: block; margin-top: 24px; } .hero-cta { display: none; } }
/* Contact: no line above the first row */
.contact-rows > :first-child { border-top: 0; }
.earlier .rows { border-bottom: 0; }
@media (max-width: 760px) { .cv-mobile { margin-top: -28px; margin-bottom: 40px; } .cv-mobile .cv-pill { display: inline-flex; width: auto; } }
@media (max-width: 760px) { .cv-mobile .cv-pill { display: flex; width: 100%; justify-content: center; } }

.media-sq{aspect-ratio:1/1;height:auto}

.media-hero.media-natural{aspect-ratio:1600/1117;height:auto}

.e-card + .e-card { margin-top: 40px; padding-top: 56px; }
.cards + .earlier { margin-top: clamp(48px, 7vw, 96px); }
.earlier > h2 { font-size: clamp(38px, 5.4vw, 60px); letter-spacing: -.03em; line-height: 1.05; }
.cards + .earlier { margin-top: 0; }
.earlier { gap: 0; }
.earlier > h2 { margin: var(--e-gap) 0; }
.earlier .e-card:first-child { padding-top: 0; }
:root { --e-gap: clamp(56px, 7vw, 88px); }
.cards + .earlier { margin-top: calc(-1 * var(--section, 104px)); }
.exp-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.exp-h .tag { margin-left: auto; flex: none; align-self: center; }
.more { display: inline-flex; align-items: center; gap: 8px; }
.more .more-arrow { width: 18px; height: 18px; transition: transform .2s ease; }
.more:hover .more-arrow { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .more:hover .more-arrow { transform: none; } }
.figma-text .figma-logo { margin-bottom: 4px; }
.figma-cta .figma-logo { flex: none; }
/* Meta row: spread across the width, text left aligned inside each item */
@media (min-width: 761px) {
  .cs-head .meta { justify-content: space-between; flex-wrap: nowrap; }
  .cs-head .meta div { flex: 0 0 auto; align-items: flex-start; text-align: left; }
}

@media (min-width: 1120px) { .card .card-copy { flex: 1 1 600px; } .card .card-copy p { max-width: 640px; } }
@media (min-width: 1120px) { .card .chips { max-width: 380px; justify-content: flex-end; } }
/* Mobile: the Side Project tag sits level with the logo, on the right */
@media (max-width: 620px) {
  .exp { position: relative; }
  .exp-h .tag { position: absolute; right: 0; top: calc(28px + 36px - 15px); margin: 0; }
  .exp:first-of-type .exp-h .tag { top: calc(4px + 36px - 15px); }
}
@media screen and (max-width: 900px) { .cv2-top { margin-top: 32px !important; } .cv2-foot { justify-content: flex-start; } }

.media-xl.media-flow{aspect-ratio:3200/1269;height:auto}

.ai-intro{font-size:clamp(20px,2vw,26px);line-height:1.3;letter-spacing:-.01em;max-width:760px;margin:0 0 32px}
.ai-notes{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin-top:40px;padding-top:28px;border-top:1px solid var(--line)}
.ai-notes h3{font-size:16px;font-weight:500;margin:0 0 8px}
.ai-notes p{margin:0;color:var(--muted,inherit);line-height:1.45}
@media (max-width:760px){.ai-notes{grid-template-columns:1fr;gap:24px}}
.stat-n{white-space:nowrap}

/* Image slots: no dark flash before load; images fade in */
.media-fit { background: transparent; }
.media-accent.media-fit { background: var(--accent); }
.media:not(.media-ph):not(.media-accent) { background: color-mix(in srgb, var(--fg) 5%, var(--bg, transparent)); }
.media img { transition: opacity .4s ease; }
.media img.img-wait { opacity: 0; }
/* Test user flow: image sits inside a grey frame */
.media.flow-box { background: #f2f1f3; display: flex; align-items: center; justify-content: center; }
[data-theme='dark'] .media.flow-box { background: #232228; }
.media.flow-box img { width: 100%; height: 100%; object-fit: contain; padding: 4% 6%; box-sizing: border-box; }
@media (max-width: 640px) { .media.flow-box { height: auto; aspect-ratio: 4 / 3; } .media.flow-box img { padding: 6% 3%; } }
/* Quotes in case studies share the About page gradient and motion, one weight up */
.block.kind .quote p { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; font-weight: 500; letter-spacing: -.01em; }
.block.kind .quote blockquote p { background-size: 320% 100%; background-position: 0% 50%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: hero-shift 7s ease-in-out infinite alternate; }
:root:not([data-theme='dark']) .block.kind .quote blockquote p { background-image: linear-gradient(100deg, #0f0630 0%, #1c0e4e 18%, #4b24b8 45%, #9a78f5 68%, #4b24b8 85%, #1c0e4e 100%); }
[data-theme='dark'] .block.kind .quote blockquote p { background-image: linear-gradient(100deg, #5b3fc4 0%, #8a6cf0 25%, #c3aeff 55%, #f4efff 72%, #8a6cf0 100%); }
@media (max-width: 640px) { .block.kind .quote p { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .block.kind .quote blockquote p { animation: none; } }
/* CV */
.cv-bar .back { display: inline-flex; align-items: center; gap: 6px; }
.cv2-role ul { list-style: disc; }
.cv2-skills { grid-column: 3 / span 1; }
.cv2-fact { grid-column: 4 / span 1; }
.cv2-skills ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 7px; }
.cv2-skills li { font-size: 12px; line-height: 1.4; color: #222; }
.cv2-skills b { display: block; font-weight: 500; color: #777; font-size: 11px; letter-spacing: 0; }
.cv2-fact .cv2-sub { font-size: 12.5px; line-height: 1.45; color: #222; max-width: none; }
.cv2-foot { justify-content: space-between; }
.cv2-foot .cv2-left, .cv2-foot .cv2-right { display: block; }
@media screen and (max-width: 900px) { .cv2-skills, .cv2-fact { grid-column: 1 / -1; } .cv2-fact { margin-top: 20px !important; } .cv2-foot { justify-content: space-between !important; } }
@media print { .cv2-skills li { font-size: 11px; } .cv2-fact .cv2-sub { font-size: 11.5px; } .cv2-skills b { font-size: 10px; } }
.media.flow-box img { padding: 2.5% 4%; }

/* Key Screens: two on top, three below */
.gal.g5 { grid-template-columns: repeat(6, 1fr); }
.gal.g5 > .media { grid-column: span 3; }
.gal.g5 > .g5-3 { grid-column: span 2; }
@media (max-width: 760px) { .gal.g5 { grid-template-columns: 1fr 1fr; } .gal.g5 > .media, .gal.g5 > .g5-3 { grid-column: span 1; } }
/* CV skills: one block */
.cv2-skills .cv2-sub { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: #222; max-width: none; }
@media print { .cv2-skills .cv2-sub { font-size: 11.5px; } }
/* Case-study meta with 4 items on mobile */
@media (max-width: 640px) { .meta div:last-child { grid-column: auto; } .meta div:nth-child(odd):last-child { grid-column: 1 / -1; } }

/* Flow frame matches the image background */
.media.flow-box, [data-theme="dark"] .media.flow-box, :root:not([data-theme="light"]) .media.flow-box { background: #d5d5d5; }
.media.flow-box:not(.media-ph):not(.media-accent), [data-theme] .media.flow-box:not(.media-ph):not(.media-accent) { background: #d5d5d5; }
/* Key Screens: two on top, bottom row of 3 at equal height with a narrow phone at the end */
.gal.g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gal.g5 > .media { grid-column: auto; }
.g5-row { display: grid; grid-template-columns: 1.425fr 1.425fr .591fr; gap: clamp(12px, 2vw, 32px); margin-top: clamp(12px, 2vw, 32px); }
.g5-row > .media { height: auto; }
.g5-row > .media-phone { aspect-ratio: 650 / 1100; }
.g5-row > .media-phone img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .g5-row { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; } .g5-row > .media-phone { grid-column: 1 / -1; width: 50%; justify-self: center; } }
/* Key Screens bottom row: taller tiles, slightly wider phone */
.g5-row { grid-template-columns: 1.08fr 1.08fr .6fr; }
.g5-row > .media-sm { aspect-ratio: 1.08 / 1; }
.g5-row > .media-sm img { object-fit: cover; }
.g5-row > .media-phone { aspect-ratio: 0.6 / 1; }
.g5-row > .media-phone img { object-position: center top; }
.g5-row > .media-sm:first-child, .g5-row > .media-sm:first-child:not(.media-ph):not(.media-accent) { background: #d1e5dc; }
.g5-row > .media-sm:first-child img { object-fit: contain; }
.media-hero.media-natural.media-flatchart { aspect-ratio: 3000 / 834; background: #fff; }
.media-flatchart img { object-fit: contain; }
/* Native flowchart */
.fc-intro { max-width: 46ch; margin: 0 0 clamp(20px, 3vw, 36px); font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.5; color: var(--fg); }
.fc-wrap { border-radius: 20px; background: color-mix(in srgb, var(--fg) 4%, var(--bg, transparent)); padding: clamp(12px, 2vw, 28px); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fc { display: block; width: 100%; min-width: 980px; height: auto; font-family: inherit; }
.fc-e { fill: none; stroke: color-mix(in srgb, var(--fg) 45%, transparent); stroke-width: 2.4; stroke-linejoin: round; }
.fc-ah { fill: color-mix(in srgb, var(--fg) 45%, transparent); }
.fc-n rect, .fc-n polygon { stroke-width: 2; fill: #fff; stroke: #8a8a90; }
.fc-g rect { fill: #e7f1e1; stroke: #7da86b; }
.fc-o rect { fill: #f7eedd; stroke: #d3b17a; }
.fc-p polygon { fill: #ebe3f2; stroke: #9a7bb5; }
.fc-b rect { fill: #e3ebf3; stroke: #7b9cc0; }
.fc-r rect { fill: #f3e2e2; stroke: #c07b7b; }
.fc-t { font-size: 17px; fill: #1a1a1c; }
.fc-l { font-size: 15px; fill: var(--fg); opacity: .75; }
:root[data-theme='dark'] .fc-n rect, :root[data-theme='dark'] .fc-n polygon { fill: #2a2a30; stroke: #77777f; }
:root[data-theme='dark'] .fc-g rect { fill: #243322; stroke: #5d8a52; }
:root[data-theme='dark'] .fc-o rect { fill: #38301f; stroke: #a58850; }
:root[data-theme='dark'] .fc-p polygon { fill: #30263b; stroke: #8a6aa6; }
:root[data-theme='dark'] .fc-b rect { fill: #222f3d; stroke: #5f83a8; }
:root[data-theme='dark'] .fc-r rect { fill: #3a2424; stroke: #a86262; }
:root[data-theme='dark'] .fc-t { fill: #f1f1f3; }
.fc-box { max-width: 1000px; }
.fc-wrap { padding: clamp(10px, 1.6vw, 20px); }
.fc-hint { display: none; margin: 0 0 10px; font-size: .9rem; color: var(--fg); opacity: .6; text-align: right; transition: opacity .3s; }
.fc-hint span { display: inline-block; animation: fc-nudge 1.4s ease-in-out infinite; }
@keyframes fc-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@media (max-width: 760px) { .fc-hint { display: block; } .fc { min-width: 1100px; } .fc-box.scrolled .fc-hint { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fc-hint span { animation: none; } }
/* Mobile: image groups stack one after another, full width, so they can be read */
@media (max-width: 760px) {
  .gal, .gal.g5 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .gal > .media, .gal.g5 > .media, .gal > .full { grid-column: 1 / -1; }
  .g5-row { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
  .g5-row > .media-sm { aspect-ratio: 784 / 550; }
  .g5-row > .media-phone { grid-column: auto; width: 62%; justify-self: center; }
}
.two.stack { grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); }
.media-hero.media-r1610 { aspect-ratio: 16 / 10; }
@media (max-width: 760px) {
  .media-strip { aspect-ratio: auto !important; height: auto !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .media-strip::-webkit-scrollbar { display: none; }
  .media-strip img { width: auto !important; max-width: none !important; height: 330px !important; object-fit: contain !important; display: block; }
  .strip-box.scrolled .fc-hint { opacity: 0; }
}
.media-hero.media-ob1 { aspect-ratio: 3008 / 1200; }
.media-hero.media-ob2 { aspect-ratio: 3008 / 1248; }
@media (max-width: 760px) { .media-strip img { height: 420px !important; } }
