/* Ioana, portfolio. Colours sampled from my paintings: midnight navy, gilt gold, crimson, pearl blue, sage, with peony and mint kept for small moments. */

:root {
  --paper: #f3eee6;
  --paper-2: #eae3d6;
  --card: #faf7f1;
  --ink: #1b1c2e;
  --ink-2: #3a3b52;
  --muted: #5e5a6e;
  --line: #dcd3c4;
  --accent: #b28d57;
  --accent-ink: #1b1c2e;
  --accent-soft: #ede0c6;
  --accent-text: #73541f;
  --sage: #6e8b5e;
  --crimson: #942017;
  --pearl: #7a90b0;
  --mint: #70e09d;
  --pink: #e07a9b;
  --ok: #2f7a55;
  --warn: #b7791f;
  --shadow: 0 1px 0 rgba(29, 26, 23, .04), 0 18px 40px -24px rgba(29, 26, 23, .35);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --read: 680px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.read { max-width: var(--read); }

/* ---------- Top bar ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  transition: background .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.bar.is-scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.bar__name { font: 600 15px/1 var(--sans); text-decoration: none; letter-spacing: -.01em; display: inline-flex; gap: 8px; align-items: center; }
.bar__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }
.bar nav { display: flex; gap: 22px; align-items: center; }
.bar nav a { font-size: 14px; text-decoration: none; color: var(--ink-2); }
.bar nav a:hover { color: var(--ink); }
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Type ---------- */
.eyebrow {
  font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; margin: 0; font-variation-settings: "opsz" 144, "SOFT" 50; }
.display { font-size: clamp(44px, 8.6vw, 128px); line-height: .95; letter-spacing: -.035em; }
.h2 { font-size: clamp(32px, 4.6vw, 60px); line-height: 1.02; }
.h3 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.12; }
.lede { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; color: var(--ink-2); }
em.hl { font-style: italic; color: var(--accent-text); }
p { margin: 0 0 1.05em; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em .06em .26em; margin: -.04em -.06em -.26em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); }
.split.is-in .w > span { transform: none; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: grid; align-content: end; padding-block: 120px 72px; position: relative; isolation: isolate; }
.hero__inner { position: relative; z-index: 2; }
.hero__lede { max-width: 620px; margin-top: 36px; }
.hero__meta { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 44px; color: var(--muted); font-size: 14px; }
.hero__meta strong { color: var(--ink); font-weight: 500; }
.hero__scroll { margin-top: 56px; display: inline-flex; gap: 10px; align-items: center; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.hero__scroll i { width: 26px; height: 40px; border: 1.5px solid var(--line); border-radius: 20px; position: relative; }
.hero__scroll i::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(14px); opacity: 0 } 100% { opacity: 0 } }

/* Hero tangle: lines that untangle as you scroll */
.tangle { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.tangle svg { position: absolute; right: -6vw; top: 8vh; width: min(70vw, 900px); height: auto; opacity: .9; }
.tangle path { fill: none; stroke: var(--line); stroke-width: 1.4; }
.tangle path.lead { stroke: var(--accent); stroke-width: 2; }

/* ---------- Section heads ---------- */
.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section__head { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(40px, 6vw, 72px); }
/* The label always sits above its heading */

/* ---------- Work index ---------- */
.work { display: grid; gap: clamp(72px, 10vw, 140px); }
.proj { display: grid; gap: 28px; align-items: center; text-decoration: none; color: inherit; }
@media (min-width: 960px) {
  .proj { grid-template-columns: 5fr 7fr; gap: 56px; }
  .proj:nth-child(even) { grid-template-columns: 7fr 5fr; }
  .proj:nth-child(even) .proj__text { order: 2; }
}
.proj__num { font: 500 13px/1 var(--mono); color: var(--accent-text); }
.proj__client { font-size: 14px; color: var(--muted); margin-top: 14px; }
.proj__title { margin-top: 10px; transition: color .3s; }
.proj__q { margin-top: 18px; color: var(--ink-2); font-size: 18px; max-width: 460px; }
.proj__foot { margin-top: 24px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.proj__go { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.proj__go span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ink); transition: background .3s, color .3s, transform .4s var(--ease); }
.proj:hover .proj__go span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: rotate(-45deg); }
.proj:hover .proj__title { color: var(--accent-text); }

.stage {
  position: relative; border-radius: 22px; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--paper-2);
  perspective: 1200px;
  border: 1px solid var(--line);
}
.stage__tilt { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s var(--ease); will-change: transform; }
.stage__layer { position: absolute; will-change: transform; }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 11.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--card);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.chip--shipped::before { background: var(--ok); }
.chip--tested::before { background: var(--accent); }
.chip--proposal::before { background: transparent; border: 1.5px solid var(--muted); width: 5px; height: 5px; }
.chip--ready::before { background: var(--warn); }

/* ---------- Mini UI (used inside stages and demos) ---------- */
.ui { font-family: var(--sans); color: #1d1a17; }
.phone {
  width: 210px; height: 430px; border-radius: 30px; background: #fff;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.45), 0 0 0 7px #1d1a17;
  overflow: hidden; position: relative;
}
.phone__notch { width: 70px; height: 18px; background: #1d1a17; border-radius: 0 0 12px 12px; margin: 0 auto; }
.phone__body { padding: 14px 14px; font-size: 11px; }
.ui-card { background: #f4f1ec; border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.ui-k { font-size: 9.5px; color: #7a7268; text-transform: uppercase; letter-spacing: .06em; }
.ui-score { font: 400 44px/1 var(--serif); letter-spacing: -.03em; }
.ui-pill { display: inline-block; padding: 3px 7px; border-radius: 999px; font-size: 9px; background: #e7f2ec; color: #2f7a55; font-weight: 600; }
.ui-pill--hi { background: #1d1a17; color: #fff; }
.ui-pill--mid { background: #ddd5f6; color: #3d2e8a; }
.ui-btn { display: block; text-align: center; background: #1d1a17; color: #fff; border-radius: 10px; padding: 9px; font-size: 11px; font-weight: 600; }
.ui-line { height: 6px; border-radius: 3px; background: #e5dfd5; margin: 6px 0; }
.ui-line.s { width: 55%; }
.ui-line.m { width: 75%; }

.browser {
  width: 100%; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.4); border: 1px solid #e3ddd2;
}
.browser__bar { height: 26px; background: #f1ece4; display: flex; gap: 6px; align-items: center; padding: 0 10px; }
.browser__bar i { width: 8px; height: 8px; border-radius: 50%; background: #d8d0c3; }

/* ---------- Things I'm trying ---------- */
.notes { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .notes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .notes { grid-template-columns: repeat(3, 1fr); } }
.note {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 24px; position: relative; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.note:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: var(--shadow); }
.note__tag { font: 500 11px/1 var(--mono); color: var(--accent-text); text-transform: uppercase; letter-spacing: .08em; }
.note h3 { font-size: 24px; line-height: 1.15; margin: 14px 0 12px; }
.note p { color: var(--ink-2); font-size: 15.5px; margin: 0; }
.note__doodle { position: absolute; right: -10px; bottom: -10px; width: 90px; height: 90px; opacity: .12; color: var(--ink); transition: transform .8s var(--ease), opacity .4s; }
.note:hover .note__doodle { transform: rotate(18deg) scale(1.08); opacity: .25; color: var(--accent-text); }

/* ---------- About / footer ---------- */
.about { display: grid; gap: 40px; }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1fr; gap: 80px; } }
.about ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.about li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--ink-2); }
.about li span:first-child { color: var(--ink); }
.foot { padding: 60px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.big-link { font-family: var(--serif); font-size: clamp(36px, 6vw, 84px); line-height: 1; text-decoration: none; letter-spacing: -.03em; display: inline-block; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat; transition: background-size .6s var(--ease); }
.big-link:hover { background-size: 100% 3px; }

/* ---------- Case study ---------- */
.cs-hero { padding-block: 140px 60px; }
.cs-hero__top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cs-hero h1 { margin-top: 26px; max-width: 14ch; }
.cs-hero .lede { margin-top: 30px; max-width: 640px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts div { padding: 18px 18px 18px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 10px 0 0; font-size: 15px; }

.cs-cover { margin: 20px auto 0; }
.cs-cover .stage { aspect-ratio: 16 / 8; }

/* Story layout: chapter rail + column + margin notes */
.story { display: grid; gap: 40px; padding: clamp(60px, 9vw, 120px) 0; }
@media (min-width: 1100px) { .story { grid-template-columns: 200px minmax(0, var(--read)) 1fr; gap: 56px; } }
.rail { display: none; }
@media (min-width: 1100px) {
  .rail { display: block; position: sticky; top: 96px; align-self: start; }
  .rail ol { list-style: none; margin: 0; padding: 0; counter-reset: ch; }
  .rail li { counter-increment: ch; }
  .rail a { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 8px 0; font-size: 13px; line-height: 1.35; color: var(--muted); text-decoration: none; transition: color .3s; }
  .rail a::before { content: counter(ch, decimal-leading-zero); font: 500 11px/1.6 var(--mono); }
  .rail a.is-active { color: var(--ink); }
  .rail a.is-active::before { color: var(--accent-text); }
}
.col h2 { margin: 0 0 22px; }
.chapter { padding-top: 8px; margin-bottom: clamp(72px, 9vw, 120px); scroll-margin-top: 100px; }
.chapter__kicker { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.col p { color: var(--ink-2); }
.col p strong { color: var(--ink); font-weight: 600; }

/* "What I noticed" notes */
.noticed {
  position: relative; margin: 36px 0; padding: 22px 24px 22px 26px;
  border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 12px 12px 0;
}
.noticed .eyebrow { color: var(--accent-text); }
.noticed p { font-family: var(--serif); font-size: 23px; line-height: 1.3; color: var(--ink); margin: 10px 0 0; letter-spacing: -.01em; }
@media (min-width: 1320px) {
  .noticed.is-margin { position: absolute; left: calc(100% + 56px); width: 260px; margin: 0; background: none; border-left-width: 2px; padding: 4px 0 4px 18px; }
  .noticed.is-margin p { font-size: 19px; }
}
.anchor { position: relative; }

/* Demo panels */
.demo { margin: 40px 0 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper-2); overflow: hidden; }
.demo__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--card); }
.demo__title { font-size: 14px; font-weight: 500; }
.demo__hint { font: 400 12px/1.3 var(--mono); color: var(--muted); }
.demo__body { padding: clamp(18px, 3vw, 32px); }
.demo__cap { padding: 12px 18px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); background: var(--card); }
@media (min-width: 1100px) { .demo.is-wide { margin-right: calc(-1 * (100% - 0px) * .35); } }

.btn {
  font: 500 13px/1 var(--sans); padding: 10px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  transition: background .25s, border-color .25s, color .25s, transform .2s;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(.97); }
.btn.is-on, .btn--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Unfolding flow (tree) */
.flow { display: grid; gap: 10px; }
.flow__row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.node {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.3; min-width: 120px; max-width: 190px; text-align: left;
  opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .3s, background .3s;
}
.node b { display: block; font-weight: 600; font-size: 12.5px; }
.node small { color: var(--muted); font-size: 12px; display: block; margin-top: 4px; }
.node.is-in { opacity: 1; transform: none; }
.node--root { border-color: var(--ink); }
.node--fail b { color: var(--accent-text); }
.node--fix { border-style: dashed; }
.node.is-hot { border-color: var(--accent); background: var(--accent-soft); }
.flow__arrow { text-align: center; color: var(--muted); font: 400 12px/1 var(--mono); opacity: 0; transition: opacity .6s; }
.flow__arrow.is-in { opacity: 1; }

/* Outcome strip */
.outcome { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 32px 0; }
@media (min-width: 700px) { .outcome { grid-template-columns: repeat(2, 1fr); } }
.outcome > div { background: var(--card); padding: 20px 22px; }
.outcome h4 { margin: 12px 0 6px; font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: -.01em; }
.outcome p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* Next project */
.next { display: block; text-decoration: none; padding-block: clamp(80px, 12vw, 160px); border-top: 1px solid var(--line); }
.next .eyebrow { margin-bottom: 18px; }
.next h2 { transition: color .3s, letter-spacing .6s var(--ease); }
.next:hover h2 { color: var(--accent-text); letter-spacing: -.01em; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .split .w > span, .node, .flow__arrow { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero__scroll i::after { animation: none; }
  .stage__tilt, .stage__layer { transform: none !important; }
}

button.node { font: inherit; color: inherit; cursor: pointer; }
button.node:hover { border-color: var(--accent); }

/* Small screens */
.bar__name { white-space: nowrap; }
@media (max-width: 640px) {
  .bar nav { gap: 14px; }
  .bar nav > a { display: none; }
  .tangle svg { width: 120vw; right: -30vw; top: 10vh; opacity: .6; }
  .hero { padding-block-start: 100px; }
  .stage { aspect-ratio: 3 / 4; }
  .proj:nth-child(5) .stage__layer { transform: scale(.82); transform-origin: top left; }
}
html, body { overflow-x: clip; }
.hero { overflow-x: clip; }
h1, h2, h3 { text-wrap: balance; }
.lede, .proj__q { text-wrap: pretty; }
.note { padding-bottom: 64px; }
.note__doodle { width: 64px; height: 64px; right: 14px; bottom: 12px; opacity: .1; }

/* Also: smaller projects without a case study yet */
.more { margin-top: clamp(80px, 10vw, 140px); }
.more__list { margin-top: 18px; border-top: 1px solid var(--line); }
.more__row { display: grid; gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
@media (min-width: 900px) { .more__row { grid-template-columns: 260px 1fr auto; } }
.more__client { font-family: var(--serif); font-size: 24px; letter-spacing: -.01em; }
.more__what { color: var(--ink-2); font-size: 16px; max-width: 620px; }

/* Quotes */
.quotes { display: grid; gap: 18px; margin-top: 28px; }
@media (min-width: 760px) { .quotes { grid-template-columns: repeat(2, 1fr); } }
.quote { margin: 0; padding: 28px 26px; border-top: 2px solid var(--ink); background: var(--card); border-radius: 0 0 var(--radius) var(--radius); }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(21px, 2vw, 27px); line-height: 1.25; letter-spacing: -.01em; }
.quote figcaption { margin-top: 16px; font: 500 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.quote:nth-child(2) { border-top-color: var(--accent); }

/* ---------- Pinned intro ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.intro { position: relative; height: 420vh; }
.intro__stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.intro__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.thread { fill: none; stroke: var(--ink); stroke-opacity: .2; stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.thread--lead { stroke: var(--accent); stroke-opacity: 1; stroke-width: var(--lead-width, 1.6); }
.intro__beats { position: absolute; left: 0; right: 0; bottom: calc(41.25% + 30px); margin: 0 auto; }
.beat {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; margin: 0;
  font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; line-height: .98;
  font-size: clamp(44px, 8.4vw, 132px); font-variation-settings: "opsz" 144, "SOFT" 50;
  opacity: 0; will-change: opacity, transform; text-wrap: balance;
}
.beat--hello { opacity: 1; }
.beat--hello .eyebrow { display: block; font-size: 12px; letter-spacing: .08em; margin-bottom: 22px; font-family: var(--mono); }
.beat--end { font-family: var(--sans); font-size: inherit; letter-spacing: 0; line-height: 1.5; max-width: 640px; }
.beat--end .lede { margin: 0; }
.beat--end .hero__meta { margin-top: 22px; }
.intro__cta {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 28px;
  font: 500 15px/1 var(--sans); text-decoration: none; padding: 14px 20px; border-radius: 999px;
  background: var(--ink); color: var(--paper); transition: background .3s, transform .3s var(--ease);
}
.intro__cta:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.intro__cta span { display: inline-block; animation: nudge-down 1.8s var(--ease) infinite; }
@keyframes nudge-down { 0%, 100% { transform: none } 50% { transform: translateY(3px) } }
.intro__hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); margin: 0; display: flex; gap: 10px; align-items: center; color: var(--muted); font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.intro__hint i { width: 22px; height: 34px; border: 1.5px solid var(--line); border-radius: 12px; position: relative; }
.intro__hint i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: nudge 1.8s var(--ease) infinite; }
/* Reduced motion: no pinning, everything visible at once */
.intro.is-static { height: auto; }
.intro.is-static .intro__stick { position: relative; height: auto; min-height: 100svh; padding: 120px 0 80px; display: flex; flex-direction: column; justify-content: center; }
.intro.is-static .intro__beats { position: relative; bottom: auto; }
.intro.is-static .beat { position: relative; left: 0; right: 0; opacity: 1 !important; transform: none !important; margin-bottom: 8px; padding: 0 var(--gutter); }
.intro.is-static .intro__svg { opacity: .5; }
.intro.is-static .intro__hint { display: none; }
@media (max-width: 640px) { .beat { font-size: clamp(40px, 11.5vw, 60px); } .intro__beats { bottom: calc(41.25% + 22px); } }

/* ---------- How my role grew ---------- */
.arc { margin-top: 56px; opacity: 1 !important; transform: none !important; }
.arc__label { display: flex; gap: 10px; align-items: center; }
.arc__steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 28px; position: relative; }
@media (min-width: 860px) { .arc__steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.arc__step { position: relative; padding-top: 30px; opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.arc.is-in .arc__step { opacity: 1; transform: none; }
.arc.is-in .arc__step:nth-child(2) { transition-delay: .35s; }
.arc.is-in .arc__step:nth-child(3) { transition-delay: .7s; }
/* the thread: thickens at each stage */
.arc__step::before {
  content: ""; position: absolute; left: 0; top: 9px; height: var(--w, 1.5px); width: 100%;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform .9s var(--ease);
  border-radius: 4px; margin-top: calc(var(--w, 1.5px) / -2);
}
.arc.is-in .arc__step::before { transform: scaleX(1); }
.arc.is-in .arc__step:nth-child(2)::before { transition-delay: .35s; }
.arc.is-in .arc__step:nth-child(3)::before { transition-delay: .7s; }
.arc__step:nth-child(1) { --w: 1.5px; }
.arc__step:nth-child(2) { --w: 3.5px; }
.arc__step:nth-child(3) { --w: 6px; }
.arc__step::after { content: ""; position: absolute; left: 0; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.arc__when { font: 500 11.5px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.arc__role { font-family: var(--serif); font-size: 23px; line-height: 1.15; letter-spacing: -.01em; margin: 8px 0 8px; }
.arc__what { font-size: 15px; color: var(--ink-2); margin: 0; }
@media (prefers-reduced-motion: reduce) { .arc__step, .arc__step::before { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* Real screens from Figma and the coded prototype */
.phone--shot {
  --w: 200px; width: var(--w); height: calc(var(--w) * 2.05);
  border-radius: calc(var(--w) * .15); background: #fff;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.45), 0 0 0 calc(var(--w) * .03) #1d1a17;
}
.phone--shot img { display: block; width: 100%; height: auto; will-change: transform; }
.browser--shot .browser__view { aspect-ratio: var(--r, 16/10); overflow: hidden; background: #fff; }
.browser--shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
@media (max-width: 640px) {
  .phone--shot { --w: 150px !important; }
  .stage__layer:has(> .phone--shot:not([data-scrollshot])) { display: none; }
  .stage__layer:has(> [data-scrollshot]) { left: 50% !important; margin-left: -75px !important; top: 50% !important; margin-top: -154px !important; }
  .cs-cover .stage:has(.phone--shot) { aspect-ratio: 1 / 1; }
  .cs-cover .stage:has(.browser--shot) { aspect-ratio: 4 / 3; }
}

/* About the project */
.ctx { display: grid; gap: 22px 40px; margin-top: 40px; padding: 26px 0 6px; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .ctx { grid-template-columns: 1fr 1fr; } }
.ctx__k { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); margin: 0 0 10px; }
.ctx__item p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 46ch; }

/* Before and after compare */
.cmp { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; touch-action: pan-y; }
.cmp--cover { aspect-ratio: 16 / 9; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.cmp__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.cmp::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; }
.cmp::before { content: "↔"; position: absolute; z-index: 2; top: 50%; left: var(--x); width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 15px; pointer-events: none; box-shadow: 0 6px 16px -6px rgba(0,0,0,.4); }
.cmp__tag { position: absolute; z-index: 2; top: 10px; font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: rgba(16,17,15,.78); color: #fff; padding: 6px 8px; border-radius: 6px; pointer-events: none; }
.cmp__tag--b { left: 10px; } .cmp__tag--a { right: 10px; }
.cmp input { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cmp:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Design at each stage of the SDLC */
.sdlc { list-style: none; margin: 28px 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
@media (min-width: 760px) { .sdlc { grid-template-columns: repeat(5, 1fr); } }
.sdlc li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px; position: relative; }
.sdlc li::before { content: "0" counter(s); display: block; font: 500 11px/1 var(--mono); color: var(--accent-text); margin-bottom: 10px; }
.sdlc b { display: block; font: 400 22px/1.1 var(--serif); margin-bottom: 8px; }
.sdlc span { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.sdlc__more { display: block; margin-top: 28px; padding: 22px 24px; border-radius: 16px; background: var(--ink); color: var(--paper); text-decoration: none; }
.sdlc__more .eyebrow { color: var(--accent-text); }
.sdlc__more b { display: block; font: 400 clamp(22px, 2.6vw, 30px)/1.15 var(--serif); margin-top: 8px; }
@media (max-width: 640px) { .cs-cover .stage:has(.cmp) { aspect-ratio: 4 / 3; } .cs-cover .stage__layer:has(.cmp) { left: 4% !important; right: 4% !important; } }

/* Locked project cards */
.lockcard { border-radius: 16px; overflow: hidden; }
.lockcard__blur { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 10px; padding: 14px; background: var(--card); filter: blur(7px); opacity: .9; }
.lockcard__blur i { border-radius: 10px; background: color-mix(in srgb, var(--ink) 14%, var(--card)); }
.lockcard__msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; color: var(--ink); }
.lockcard__msg .ic { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--accent-text); margin-bottom: 4px; }
.lockcard__msg b { font: 400 24px/1.1 var(--serif); }
.lockcard__msg small { font-size: 13px; color: var(--ink-2); }
.chip--lock { display: inline-flex; align-items: center; gap: 5px; }
.chip--lock .ic { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Work menu */
.navdd { position: relative; }
.navdd summary { list-style: none; cursor: pointer; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.navdd summary::-webkit-details-marker { display: none; }
.navdd summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease); }
.navdd[open] summary::after { transform: translateY(1px) rotate(225deg); }
.navdd summary:hover, .navdd[open] summary { color: var(--ink); }
.navdd summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.navdd__menu { position: absolute; right: -12px; top: calc(100% + 14px); width: 320px; max-width: calc(100vw - 32px); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: 0 24px 48px -24px rgba(0,0,0,.45); display: grid; gap: 2px; z-index: 60; animation: navddIn .22s var(--ease); }
@keyframes navddIn { from { opacity: 0; transform: translateY(-6px); } }
.bar nav .navdd__menu a { display: grid; grid-template-columns: 28px 1fr; gap: 6px; align-items: start; padding: 10px 10px; border-radius: 10px; color: var(--ink); font-size: 14.5px; line-height: 1.25; }
.bar nav .navdd__menu a:hover, .bar nav .navdd__menu a:focus-visible { background: var(--card); outline: none; }
.bar nav .navdd__menu a[aria-current="page"] { background: var(--card); box-shadow: inset 2px 0 0 var(--accent); }
.navdd__n { font: 500 11px/1.6 var(--mono); color: var(--accent-text); }
.navdd__t small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.navdd__lock { display: inline-block; width: 11px; height: 11px; margin-left: 6px; vertical-align: -1px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bar nav .navdd__menu a.navdd__all { display: block; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 10px 8px; }
@media (prefers-reduced-motion: reduce) { .navdd__menu { animation: none; } }
@media (max-width: 640px) { .navdd__menu { position: fixed; left: 16px; right: 16px; top: 58px; width: auto; max-width: none; } }

/* Drafts: visible while editing, removed by tools/build.mjs */
.draft { outline: 2px dashed var(--accent); outline-offset: 10px; position: relative; }
.draft::before { content: "Draft, hidden on the live site"; position: absolute; top: -12px; right: 0; transform: translateY(-100%); font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: 5px 7px; border-radius: 5px; }

/* Every case study title at the same, calmer size on wider screens */
@media (min-width: 1000px) { .cs-hero .display { font-size: clamp(44px, 4.8vw, 80px); max-width: 16ch; } .cs-hero__intro .display { max-width: 13ch; } }

/* Slideshow inside a demo frame: principles, colours, buttons */
.slides__view { position: relative; aspect-ratio: 1320 / 890; background: #f9f9f7; outline: none; }
.slides__view:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.slides__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .6s ease; }
.slides__slide.is-on { opacity: 1; }
.slides__slide[hidden] { display: block; visibility: hidden; }
.slides__slide img { width: 100%; height: 100%; object-position: center top; display: block; }
.slides__nav { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.slides__dots { display: flex; gap: 8px; flex: 1; }
.slides__dot { all: unset; cursor: pointer; width: 28px; height: 4px; border-radius: 2px; background: rgba(27, 28, 46, .18); transition: background .3s, width .3s; }
.slides__dot[aria-current="true"] { background: var(--accent); width: 44px; }
.slides__dot:focus-visible, .slides__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.slides__count { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: .06em; }
.slides__count b { color: var(--ink); font-weight: 500; }
.slides__btn { all: unset; cursor: pointer; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); transition: background .2s, border-color .2s; }
.slides__btn:hover { background: var(--card); border-color: var(--ink-2); }
.slides__btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .slides__slide { transition: none; } }

/* Cover rows of phones: each grows by 20% on hover (MoneySuperMarket, GoSkippy) */
.cs-cover .stage__layer:has(> .phone--shot) > .phone--shot,
.cs-cover .gsc__l > img { transition: transform .4s cubic-bezier(.2, .8, .2, 1); transform-origin: 50% 50%; }
.cs-cover .stage__layer:has(> .phone--shot):hover,
.cs-cover .gsc__l:hover { z-index: 5; }
.cs-cover .stage__layer:has(> .phone--shot):hover > .phone--shot,
.cs-cover .gsc__l:hover > img { transform: scale(1.2); }
@media (prefers-reduced-motion: reduce) { .cs-cover .stage__layer > .phone--shot, .cs-cover .gsc__l > img { transition: none; } }

/* Previous / next case study, at the top of each case study */
.csnav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-top: 84px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.csnav a { color: var(--ink-2); text-decoration: none; transition: color .2s; }
.csnav a:hover, .csnav a:focus-visible { color: var(--accent-text); }
.csnav__link { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.csnav__link--next { justify-self: end; }
.csnav__n { font: 500 11px/1 var(--mono); letter-spacing: .08em; color: var(--muted); }
.csnav__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csnav__arrow { transition: transform .25s var(--ease); }
.csnav__link--prev:hover .csnav__arrow { transform: translateX(-3px); }
.csnav__link--next:hover .csnav__arrow { transform: translateX(3px); }
.csnav__all { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.csnav + .cs-hero, .csnav + .cs-hero:has(.cs-hero__intro) { padding-top: 56px; }
@media (max-width: 560px) { .csnav__t { display: none; } .csnav { font-size: 15px; } }

/* Name in the header, set in the title serif */
.bar__name { font: 500 21px/1 var(--serif); letter-spacing: -.02em; color: var(--ink); }

/* Phones: the header covers the top safe area and always has a background */
.bar { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
@media (max-width: 640px) {
  .bar { background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: var(--line); }
}

/* Language switch in the top bar */
.lang { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.bar nav .lang a { padding: 5px 8px; border-radius: 999px; font: 500 11.5px/1 var(--mono); letter-spacing: .06em; color: var(--ink-2); text-decoration: none; }
.bar nav .lang a:hover { color: var(--ink); }
.bar nav .lang a[aria-current] { background: var(--ink); color: var(--paper); }
