/* ==========================================================================
   Simon Lutter — Portfolio
   Calm, typographic, lots of white space.
   Palette: Midnight Black #02070A · Electric Blue #0297DE · Cantaloupe Orange #FC734D
   ========================================================================== */

:root {
  --black: #02070A;
  --blue: #0297DE;
  --orange: #FC734D;

  --bg: #EEEDE8;
  --ink: #15191C;
  --ink-2: #4A5054;
  --ink-3: #64696C;
  --line: #DAD9D2;
  --soft: #E3E2DB;
  --link: #02679A;          /* blue darkened for AA text contrast */

  --font: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;

  --t-sm: 0.875rem;
  --t-base: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --t-lg: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
  --t-xl: clamp(1.5rem, 1.25rem + 1vw, 2.1rem);
  --t-2xl: clamp(2rem, 1.5rem + 2.4vw, 3.4rem);
  --t-hero: clamp(2.8rem, 1.6rem + 6vw, 7.2rem);

  --max: 1240px;
  --text: 680px;
  --gutter: clamp(20px, 5vw, 64px);
  --space: clamp(96px, 14vw, 200px);
  --radius: 4px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1316; --ink: #ECEBE6; --ink-2: #A8ADB0; --ink-3: #878D91;
    --line: #20282D; --soft: #161D21; --link: #4FB8EC; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1316; --ink: #ECEBE6; --ink-2: #A8ADB0; --ink-3: #878D91;
  --line: #20282D; --soft: #161D21; --link: #4FB8EC; color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-base)/1.65 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p a, .link { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
p a:hover, .link:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--orange); color: #fff; }
.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--ink); color: var(--bg); z-index: 99; }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--text); }
.label { font-size: var(--t-sm); color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.section { padding-top: var(--space); }
.section-title { font-size: var(--t-2xl); margin-bottom: clamp(40px, 6vw, 80px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-weight: 600; letter-spacing: -0.01em; }
.brand span { font-size: 0.78rem; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); font-size: 0.97rem; }
.nav a { color: var(--ink-2); position: relative; padding: 4px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: var(--blue); }
.icon-btn { background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: 6px; display: grid; place-items: center; }
.icon-btn:hover { color: var(--ink); }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .nav { position: fixed; inset: 76px 0 auto 0; background: var(--bg); flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px var(--gutter) 32px; display: none; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { font-size: 1.6rem; color: var(--ink); padding: 6px 0; }
  .nav a[aria-current="page"]::after { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: center; padding: 64px 0 96px; overflow: hidden; isolation: isolate; }
.hero-grain { position: absolute; inset: 0; z-index: -1; opacity: .05; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero h1 { font-size: var(--t-hero); font-weight: 600; letter-spacing: -0.045em; line-height: 0.98; max-width: 11ch; }
.hero h1 .serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.02em; }
.hero p { margin-top: clamp(24px, 3vw, 40px); font-size: var(--t-lg); color: var(--ink-2); max-width: 34ch; line-height: 1.5; }
.hero-cta { margin-top: clamp(40px, 5vw, 64px); display: inline-flex; align-items: center; gap: 18px; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.hero-cta .circle { width: 64px; height: 64px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; transition: background .25s, color .25s; }
.hero-cta:hover .circle { background: var(--ink); color: var(--bg); }

/* ---------- Facts (quiet numbers) ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 5vw, 80px); padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact .n { font-size: var(--t-2xl); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.fact .n sup { font-size: 0.4em; color: var(--ink-3); vertical-align: top; margin-left: 2px; font-weight: 500; letter-spacing: 0; }
.fact p { margin-top: 14px; color: var(--ink-2); font-size: 0.97rem; max-width: 30ch; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Work grid (A.B. style) ---------- */
.work { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(20px, 3vw, 40px); row-gap: clamp(56px, 7vw, 96px); }
.work .item.wide { grid-column: 1 / -1; }
.item .media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); border-radius: var(--radius); }
.item.wide .media { aspect-ratio: 16 / 7; }
.item .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.item:hover .media img { transform: scale(1.025); }
.item .meta { margin-top: 18px; }
.item h3 { font-size: var(--t-xl); margin-top: 4px; letter-spacing: -0.03em; }
.item .sub { color: var(--ink-2); margin-top: 8px; max-width: 52ch; }
.item:hover h3 { color: var(--link); }
@media (max-width: 760px) { .work { grid-template-columns: 1fr; } .item.wide .media { aspect-ratio: 4/3; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 8vw, 140px); align-items: start; }
.about img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); background: var(--soft); filter: grayscale(1); }
.about .lead { font-size: var(--t-xl); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; }
.about .body { margin-top: 28px; color: var(--ink-2); max-width: 56ch; }
.about .body p + p { margin-top: 14px; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about img { max-width: 320px; } }

.cv { margin-top: clamp(56px, 7vw, 96px); }
.cv li { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); align-items: baseline; }
.cv li:last-child { border-bottom: 1px solid var(--line); }
.cv .org { font-weight: 600; }
.cv .role { color: var(--ink-2); }
.cv .when { color: var(--ink-3); font-size: var(--t-sm); }
@media (max-width: 700px) { .cv li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Quiet AI teaser ---------- */
.teaser { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.teaser h2 { font-size: var(--t-xl); max-width: 26ch; font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; }
.teaser h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
@media (max-width: 700px) { .teaser { grid-template-columns: 1fr; } }

.arrow-link { display: inline-flex; align-items: center; gap: 14px; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.arrow-link .circle { width: 48px; height: 48px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; transition: background .25s, color .25s; }
.arrow-link:hover .circle { background: var(--ink); color: var(--bg); }

/* ---------- Contact ---------- */
.contact { padding: var(--space) 0; }
.contact h2 { font-size: var(--t-hero); letter-spacing: -0.045em; line-height: 0.98; }
.contact h2 .serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.02em; }
.contact .mail { display: inline-block; margin-top: clamp(32px, 4vw, 56px); font-size: var(--t-xl); border-bottom: 2px solid var(--orange); padding-bottom: 4px; letter-spacing: -0.02em; }
.contact .mail:hover { color: var(--link); }
.contact .links { margin-top: 28px; display: flex; gap: 28px; color: var(--ink-2); flex-wrap: wrap; }
.contact .links a:hover { color: var(--ink); }

.site-footer { padding: 28px 0 40px; font-size: var(--t-sm); color: var(--ink-3); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; }
.site-footer a:hover { color: var(--ink); }
.site-footer nav { display: flex; gap: 24px; }

/* ---------- Case study ---------- */
.cs-head { padding: clamp(56px, 9vw, 140px) 0 clamp(40px, 5vw, 64px); }
.back { font-size: var(--t-sm); color: var(--ink-3); display: inline-block; margin-bottom: clamp(32px, 5vw, 56px); }
.back:hover { color: var(--ink); }
.cs-head h1 { font-size: var(--t-2xl); max-width: 18ch; margin-top: 10px; letter-spacing: -0.035em; }
.cs-head .lead { margin-top: clamp(20px, 3vw, 32px); font-size: var(--t-lg); color: var(--ink-2); max-width: 46ch; line-height: 1.5; }
.cover { aspect-ratio: 16 / 8; overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .cover { aspect-ratio: 4/3; } }

.meta-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: clamp(32px, 4vw, 48px) 0; border-bottom: 1px solid var(--line); }
.meta-row dt { font-size: var(--t-sm); color: var(--ink-3); margin-bottom: 6px; }
.meta-row dd { margin: 0; font-size: 0.97rem; }
@media (max-width: 860px) { .meta-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .meta-row { grid-template-columns: 1fr; gap: 20px; } }

.cs { padding-bottom: var(--space); }
.cs-section { margin-top: clamp(72px, 10vw, 140px); }
.cs-section .text { max-width: var(--text); }
.cs-section h2 { font-size: var(--t-xl); letter-spacing: -0.03em; margin-bottom: 20px; }
.cs-section .text > p { color: var(--ink-2); }
.cs-section .text > p + p { margin-top: 14px; }
.steps { margin-top: 28px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; padding: 20px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); color: var(--blue); font-size: var(--t-sm); font-weight: 500; padding-top: 3px; }
.steps b { font-weight: 600; display: block; }
.steps span { color: var(--ink-2); }
.pull { font-family: var(--serif); font-style: italic; font-size: var(--t-2xl); line-height: 1.15; letter-spacing: -0.01em; max-width: 22ch; margin: 8px 0; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px 40px; margin-top: 28px; }
.kv b { display: block; font-weight: 600; margin-bottom: 4px; }
.kv span { color: var(--ink-2); font-size: 0.97rem; }
.fig { margin: clamp(40px, 5vw, 64px) 0 0; }
.fig .frame { overflow: hidden; border-radius: var(--radius); background: var(--soft); }
.fig img, .fig video { width: 100%; }
.fig.small .frame { max-width: 480px; margin: 0 auto; }
.fig figcaption { margin-top: 12px; font-size: var(--t-sm); color: var(--ink-3); }
.fig-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.5vw, 32px); margin-top: clamp(40px, 5vw, 64px); }
.fig-row .fig { margin: 0; }
@media (max-width: 700px) { .fig-row { grid-template-columns: 1fr; } }
.note { margin-top: 24px; font-size: var(--t-sm); color: var(--ink-3); }
.aside { margin-top: 32px; }
.proto { aspect-ratio: 16/9; width: 100%; border: 0; display: block; background: #000; }

.next { display: block; padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.next .t { font-size: var(--t-2xl); letter-spacing: -0.035em; font-weight: 600; margin-top: 6px; display: block; max-width: 20ch; }
.next:hover .t { color: var(--link); }

/* ---------- Approach page ---------- */
.page-head { position: relative; overflow: hidden; isolation: isolate; padding: clamp(72px, 12vw, 180px) 0 clamp(56px, 8vw, 120px); }
.page-head .page-head h1 { font-size: var(--t-2xl); max-width: 16ch; letter-spacing: -0.035em; margin-top: 10px; }
.page-head h1 .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.page-head .lead { margin-top: 28px; font-size: var(--t-lg); color: var(--ink-2); max-width: 46ch; line-height: 1.5; }

.flow { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); }
.flow-tab { appearance: none; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: var(--ink-3); text-align: left; padding: 20px 16px 20px 0; cursor: pointer; position: relative; }
.flow-tab .n { display: block; font-size: var(--t-sm); margin-bottom: 6px; }
.flow-tab .t { font-size: 1.1rem; font-weight: 600; color: var(--ink-2); }
.flow-tab:hover .t { color: var(--ink); }
.flow-tab[aria-selected="true"] .t { color: var(--ink); }
.flow-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 16px; bottom: -1px; height: 2px; background: var(--blue); }
.flow-panel { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 96px); padding: clamp(32px, 4vw, 56px) 0 0; }
.flow-panel h3 { font-size: var(--t-xl); letter-spacing: -0.03em; }
.flow-panel p { color: var(--ink-2); margin-top: 14px; max-width: 52ch; }
.flow-panel dl { display: grid; gap: 20px; align-content: start; }
.flow-panel dt { font-size: var(--t-sm); color: var(--ink-3); margin-bottom: 4px; }
.flow-panel dd { margin: 0; }
.lead-by { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--ink-3); margin-bottom: 14px; }
.lead-by::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.lead-by.ai::before { background: var(--blue); }
.lead-by.both::before { background: linear-gradient(90deg, var(--blue) 50%, var(--orange) 50%); }
@media (max-width: 860px) {
  .flow { grid-template-columns: repeat(3, 1fr); }
  .flow-panel { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .flow { grid-template-columns: repeat(2, 1fr); } }

.list-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 96px); }
.list-2 > div { padding: 24px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 160px 1fr; gap: 20px; }
.list-2 b { font-weight: 600; }
.list-2 small { display: block; color: var(--ink-3); font-size: var(--t-sm); margin-top: 2px; }
.list-2 span { color: var(--ink-2); }
@media (max-width: 860px) { .list-2 { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .list-2 > div { grid-template-columns: 1fr; gap: 6px; } }

.pairs li { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); }
.pairs li:last-child { border-bottom: 1px solid var(--line); }
.pairs .arr { color: var(--orange); }
.pairs small { display: block; color: var(--ink-3); font-size: var(--t-sm); }
@media (max-width: 600px) { .pairs li { grid-template-columns: 1fr; } .pairs .arr { display: none; } .pairs .to { margin-top: 6px; } }

.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.principles b { display: block; font-size: 1.1rem; margin-bottom: 8px; }
.principles span { color: var(--ink-2); font-size: 0.97rem; }
@media (max-width: 960px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .principles { grid-template-columns: 1fr; } }

.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.stages .lvl { font-size: var(--t-sm); color: var(--ink-3); }
.stages h3 { font-size: 1.2rem; margin: 6px 0 8px; }
.stages p { color: var(--ink-2); font-size: 0.97rem; }
.stages .now { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink); }
.stages .now b { color: var(--link); font-weight: 600; }
@media (max-width: 760px) { .stages { grid-template-columns: 1fr; } }

.log { counter-reset: l; }
.log li { counter-increment: l; display: grid; grid-template-columns: 48px 1fr auto; padding: 16px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.log li::before { content: counter(l, decimal-leading-zero); color: var(--ink-3); font-size: var(--t-sm); padding-top: 2px; }
.log .who { font-size: var(--t-sm); color: var(--ink-3); }
.log .who.me { color: var(--orange); }

/* ---------- Reveal ---------- */
@media (prefers-reduced-motion: reduce) {  }

[hidden] { display: none !important; }

/* ---------- Legal ---------- */
.legal { max-width: var(--text); padding: clamp(56px, 9vw, 140px) 0 var(--space); }
.legal h1 { font-size: var(--t-2xl); margin-bottom: 40px; }
.legal h2 { font-size: var(--t-lg); margin: 36px 0 10px; }
.legal p { color: var(--ink-2); margin-bottom: 10px; }

/* ---------- Refinements ---------- */
.hero .wrap { width: 100%; }
.page-head #workflow { padding-top: clamp(24px, 4vw, 48px); }
.cv li { grid-template-columns: 1fr 1.4fr 56px; }
.cv .when { text-align: right; }
.site-footer .wrap { border-top: 0; padding-top: 0; }
.site-footer .inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; width: 100%; }
@media (max-width: 760px) { .hero { min-height: auto; padding: 72px 0 88px; } }
.page-head 
/* ---------- Language switch ---------- */
.lang { display: inline-flex; gap: 2px; font-size: var(--t-sm); }
.lang a { color: var(--ink-3); padding: 4px 6px; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.lang a[aria-current="true"]::after { display: none; }
@media (max-width: 760px) { .lang { margin-top: 12px; gap: 8px; } .lang a { font-size: 1rem !important; padding: 4px 0; } }

/* ---------- Four facts ---------- */
.facts { grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 960px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }
.facts-src { margin-top: 14px; font-size: 0.78rem; color: var(--ink-3); }
.principles { grid-template-columns: repeat(3, 1fr); gap: 48px 56px; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .principles { grid-template-columns: 1fr; } }
.cv li { grid-template-columns: 1fr 1.4fr 130px; }
.cv .when { white-space: nowrap; }
@media (max-width: 700px) { .cv li { grid-template-columns: 1fr; } .cv .when { text-align: left; } }

/* ==========================================================================
   Motion
   One authored moment (the living colour field + headline), quiet feedback
   everywhere else. transform/opacity only; every loop pauses off-screen.
   ========================================================================== */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Colour field ---------- */
.hero-blob {
  position: absolute; z-index: -1; top: 0; bottom: 0; right: -10vw;
  width: min(80vw, 1200px); pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent);
          mask-image: radial-gradient(closest-side, #000 62%, transparent);
}
.page-head .hero-blob { width: min(64vw, 900px); right: -12vw; }
.orb { position: absolute; border-radius: 50%; filter: blur(64px); will-change: transform; animation: 1.4s var(--ease-expo) both orb-in; }
.orb-a { inset: 12% 40% 30% 14%; background: var(--blue); opacity: .55; }
.orb-b { inset: 36% 12% 14% 44%; background: var(--orange); opacity: .62; animation-delay: .12s; }
.orb-c { inset: 52% 46% 18% 30%; background: var(--blue); opacity: .28; animation-delay: .24s; }
.motion-ok .orb-a { animation: 1.4s var(--ease-expo) both orb-in, 19s ease-in-out 1.4s infinite alternate float-a; }
.motion-ok .orb-b { animation: 1.4s var(--ease-expo) .12s both orb-in, 23s ease-in-out 1.5s infinite alternate float-b; }
.motion-ok .orb-c { animation: 1.4s var(--ease-expo) .24s both orb-in, 17s ease-in-out 1.6s infinite alternate float-c; }
.paused .orb { animation-play-state: paused !important; }
@keyframes orb-in { from { opacity: 0; transform: scale(.86); } }
@keyframes float-a { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(6%, 7%) scale(1.06); } 100% { transform: translate(-5%, 3%) scale(.97); } }
@keyframes float-b { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-8%, -5%) scale(1.08); } 100% { transform: translate(4%, -8%) scale(1); } }
@keyframes float-c { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(10%, -6%) scale(1.12); } 100% { transform: translate(-4%, 4%) scale(.94); } }
.hero-grain { -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 92%); mask-image: linear-gradient(to bottom, #000 45%, transparent 92%); }

/* ---------- Headline entrance ---------- */
.hero-title .w { display: inline-block; animation: word-in .9s var(--ease-expo) both; }
.hero-title .w:nth-child(2) { animation-delay: .06s; }
.hero-title .w:nth-child(3) { animation-delay: .12s; }
.hero-title .w:nth-child(4) { animation-delay: .18s; }
.hero p, .hero-cta { animation: fade-up .9s var(--ease-expo) .3s both; }
.hero-cta { animation-delay: .38s; }
@keyframes word-in { from { opacity: 0; transform: translateY(.35em); filter: blur(6px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Scroll reveal (only when JS is present, content visible otherwise) ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Feedback ---------- */
.hero-cta .circle svg, .arrow-link .circle svg { transition: transform .25s var(--ease-out); }
.hero-cta .circle, .arrow-link .circle { transition: background-color .25s ease, color .25s ease, transform .16s var(--ease-out); }
.hero-cta:active .circle, .arrow-link:active .circle { transform: scale(.94); }
.next .t { transition: color .2s ease; }
p a, .link { text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: text-decoration-color .25s ease, color .2s ease; }
.icon-btn svg { transition: transform .5s var(--ease-out); }
.theme-spin svg { transform: rotate(180deg); }
.lang a { transition: color .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .hero-cta:hover .circle svg { transform: translate(2px, 2px); }
  .arrow-link:hover .circle svg { transform: translateX(3px); }
  p a:hover, .link:hover { text-decoration-color: currentColor; }
  .item .media img { transition: transform .9s var(--ease-out); }
  .item:hover .media img { transform: scale(1.03); }
  .item h3 { transition: color .2s ease, transform .35s var(--ease-out); }
  .item:hover h3 { transform: translateX(4px); }
  .next:hover .t { transform: translateX(6px); }
  .next .t { transition: color .2s ease, transform .35s var(--ease-out); }
}

/* Mobile menu */
@media (max-width: 760px) {
  .nav.open { animation: menu-in .28s var(--ease-out) both; }
  .nav.open > * { animation: fade-up .4s var(--ease-out) both; }
  .nav.open > *:nth-child(2) { animation-delay: .03s; } .nav.open > *:nth-child(3) { animation-delay: .06s; }
  .nav.open > *:nth-child(4) { animation-delay: .09s; } .nav.open > *:nth-child(5) { animation-delay: .12s; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }

/* AI workflow tabs: one sliding indicator + panel crossfade */
.flow { position: relative; }
.flow-indicator { position: absolute; left: 0; bottom: -1px; height: 2px; width: 1px; background: var(--blue); transform-origin: 0 0; transition: transform .45s var(--ease-out); pointer-events: none; }
.js .flow-tab[aria-selected="true"]::after { display: none; }
.flow-panel:not([hidden]) { animation: panel-in .45s var(--ease-out) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Page transitions (cross-document View Transitions) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in .42s var(--ease-out) both; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: var(--ease-out); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .orb, .motion-ok .orb-a, .motion-ok .orb-b, .motion-ok .orb-c { animation: none; }
  .hero-title .w, .hero p, .hero-cta { animation: fade .4s ease both; }
  .js .reveal { transform: none; transition: opacity .4s ease; }
  .flow-indicator { transition: none; }
  ::view-transition-group(*), ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
@keyframes fade { from { opacity: 0; } }

/* ---------- Browser surfaces & a11y ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html { caret-color: var(--orange); scrollbar-color: color-mix(in srgb, var(--ink) 25%, transparent) transparent; }
.fact .n, .cv .when { font-variant-numeric: tabular-nums; }
.cs-meta { margin-top: 14px; color: var(--ink-3); font-size: var(--t-sm); }
.contact h2 { margin-top: 0; }

/* ---------- Where I've worked (logo wall) ---------- */
.logos-section { display: grid; grid-template-columns: 1fr 3fr; gap: 32px; padding-top: clamp(24px, 4vw, 48px); }
.side-title { font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); letter-spacing: 0; display: flex; align-items: center; gap: 10px; align-self: start; padding-top: 6px; }
.side-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.logos { display: grid; grid-template-columns: repeat(3, 1fr); }
.logos li { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 28px; padding: clamp(28px, 4vw, 48px) 16px clamp(18px, 2vw, 24px); border-bottom: 1px dotted color-mix(in srgb, var(--ink) 25%, transparent); text-align: center; }
.logos li:nth-last-child(-n+3) { border-bottom: 0; }
.logo-mark { min-height: 64px; display: grid; place-items: center; }
.logo-mark img { max-height: 56px; max-width: 180px; width: auto; filter: grayscale(1); }
:root[data-theme="dark"] .logo-mark img { filter: grayscale(1) invert(1); }
.wordmark { font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; transition: color .25s ease; }
.logo-cap { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 860px) { .logos-section { grid-template-columns: 1fr; } .logos { grid-template-columns: 1fr 1fr; } .logos li:nth-last-child(-n+3) { border-bottom: 1px dotted color-mix(in srgb, var(--ink) 25%, transparent); } .logos li:nth-last-child(-n+2) { border-bottom: 0; } }

/* ---------- Selected work as story rows (image + outcome) ---------- */
.stories { display: grid; }
.story { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 4vw, 56px); padding: clamp(32px, 4vw, 48px) 0; border-top: 1px solid var(--line); }
.story:last-child { border-bottom: 1px solid var(--line); }
.story-media { background: var(--black); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 11; display: grid; place-items: center; }
.story-frame { width: 82%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 2px; box-shadow: 0 20px 50px rgba(0,0,0,.45); transition: transform .65s var(--ease-expo); }
.story-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-expo); }
.story-body { display: flex; flex-direction: column; padding-top: 4px; }
.story h3 { font-size: var(--t-xl); letter-spacing: -0.03em; margin-top: 6px; transition: color .2s ease; }
.story-desc { color: var(--ink-2); margin-top: 12px; max-width: 40ch; font-size: var(--t-lg); line-height: 1.4; }
.story-metric { margin-top: auto; padding-top: 40px; }
.chip { display: inline-block; font-size: var(--t-xl); font-weight: 500; letter-spacing: -0.03em; line-height: 1; padding: 10px 14px; border-radius: 6px; background: var(--soft); font-variant-numeric: tabular-nums; }
.story-metric p { margin-top: 12px; max-width: 30ch; font-weight: 500; line-height: 1.35; }
.story-link { margin-top: 28px; font-size: var(--t-sm); color: var(--ink-2); display: inline-flex; gap: 8px; }
.story-link span { transition: transform .35s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .story:hover .story-frame { transform: scale(1.03); }
  .story:hover .story-frame img { transform: scale(1.04); }
  .story:hover h3 { color: var(--link); }
  .story:hover .story-link span { transform: translateX(4px); }
  .logos li:hover .wordmark { color: var(--blue); }
}
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } .story-metric { padding-top: 24px; } }
.facts-src { margin-top: 16px; font-size: 0.78rem; color: var(--ink-3); }

/* ---------- Footer: local time + ask AI ---------- */
.ask-ai { color: var(--ink-3); }
.ask-ai a { margin-left: 10px; color: var(--ink-2); }
.ask-ai a:hover { color: var(--ink); }
.site-footer .inner { align-items: baseline; }
[data-clock] { font-variant-numeric: tabular-nums; }

/* ---------- Living grain (stops off-screen and with reduced motion) ---------- */
.motion-ok .hero-grain { inset: -50%; animation: grain .6s steps(4) infinite; }
.paused .hero-grain { animation-play-state: paused; }
@keyframes grain { 0% { transform: translate(0,0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(1%, 3%); } }

/* ==========================================================================
   Paper & grain: warm paper instead of white, softened ink instead of black,
   and one fine film grain over the whole page.
   ========================================================================== */
:root { --panel: #1B2124; --grain-opacity: .075; --grain-blend: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --panel: #172024; --grain-opacity: .06; --grain-blend: screen; } }
:root[data-theme="dark"] { --panel: #172024; --grain-opacity: .06; --grain-blend: screen; }

body::after {
  content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1.6 0 0 0 -.3  1.6 0 0 0 -.3  1.6 0 0 0 -.3  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.motion-ok body::after { animation: grain .5s steps(4) infinite; }

/* Story frames sit on a deep graphite panel, never pure black */
.story-media { background: var(--panel); }
.story-frame { box-shadow: 0 24px 60px rgba(8, 12, 14, .5); }
.chip { background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }

/* Real logos: drop their white boxes into the paper, monochrome, invert in dark mode */
.logo-mark img { mix-blend-mode: multiply; filter: grayscale(1) contrast(1.2); opacity: .9; transition: opacity .25s ease; }
:root[data-theme="dark"] .logo-mark img { mix-blend-mode: screen; filter: grayscale(1) invert(1) contrast(1.2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-mark img { mix-blend-mode: screen; filter: grayscale(1) invert(1) contrast(1.2); } }
@media (hover: hover) and (pointer: fine) { .logos li:hover .logo-mark img { opacity: 1; } }

::selection { background: var(--orange); color: var(--bg); }
.hero-cta .circle, .arrow-link .circle { border-color: color-mix(in srgb, var(--ink) 70%, transparent); }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

/* Logos supplied in white (e.g. on transparent): dark on paper, white in dark mode */
.logo-mark img.light-logo { mix-blend-mode: normal; filter: invert(1) grayscale(1); }
:root[data-theme="dark"] .logo-mark img.light-logo { mix-blend-mode: normal; filter: grayscale(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-mark img.light-logo { mix-blend-mode: normal; filter: grayscale(1); } }
.logo-mark img { max-height: 64px; max-width: 200px; }

/* ---------- Story frame v2: slimmer, glass rim ---------- */
.story-media {
  aspect-ratio: 16 / 10.6; padding: clamp(10px, 1.4vw, 18px); border-radius: 14px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 92%, white) 0%, var(--panel) 55%, color-mix(in srgb, var(--panel) 85%, black) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.07), 0 30px 60px -30px rgba(10,14,16,.55);
  position: relative;
}
.story-media::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 32%); }
.story-frame { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 12px 30px rgba(0,0,0,.35); }
.cv li { grid-template-columns: 1fr 1.4fr 170px; }
.logo-mark img[src*="hfg"] { max-height: 76px; max-width: 230px; }

/* Glass rim: frosted and light on paper, smoked in dark mode */
:root { --rim-a: rgba(255,255,255,.75); --rim-b: rgba(255,255,255,.28); --rim-edge: rgba(255,255,255,.9); --rim-line: rgba(21,25,28,.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rim-a: rgba(255,255,255,.10); --rim-b: rgba(255,255,255,.02); --rim-edge: rgba(255,255,255,.16); --rim-line: rgba(255,255,255,.06); } }
:root[data-theme="dark"] { --rim-a: rgba(255,255,255,.10); --rim-b: rgba(255,255,255,.02); --rim-edge: rgba(255,255,255,.16); --rim-line: rgba(255,255,255,.06); }
.story-media {
  background: linear-gradient(150deg, var(--rim-a), var(--rim-b));
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: inset 0 1px 0 var(--rim-edge), inset 0 0 0 1px var(--rim-line), 0 24px 50px -28px rgba(10,14,16,.45);
}
.story-media::before { background: linear-gradient(115deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 30%); mix-blend-mode: soft-light; }
.story-frame { box-shadow: 0 0 0 1px var(--rim-line), 0 10px 24px rgba(10,14,16,.18); }

/* ---------- Logos in one row ---------- */
.logos-section { grid-template-columns: 1fr; gap: 20px; }
.logos.logos-row { grid-template-columns: repeat(6, 1fr); border-top: 1px dotted color-mix(in srgb, var(--ink) 22%, transparent); border-bottom: 1px dotted color-mix(in srgb, var(--ink) 22%, transparent); }
.logos-row li, .logos-row li:nth-last-child(-n+3) { border-bottom: 0; padding: clamp(24px, 3vw, 36px) 10px clamp(16px, 2vw, 22px); gap: 20px; }
.logos-row .logo-mark { min-height: 56px; }
.logos-row .logo-mark img { max-height: 40px; max-width: 150px; }
.logos-row .logo-mark img[src*="porsche"], .logos-row .logo-mark img[src*="mercedes"] { max-height: 52px; }
.logos-row .logo-mark img[src*="hfg"] { max-height: 52px; max-width: 160px; }
.logos-row .wordmark { font-size: clamp(1.2rem, 0.9rem + 0.8vw, 1.6rem); }
.logos-row .logo-cap { font-size: 0.66rem; line-height: 1.5; }
@media (max-width: 900px) {
  .logos.logos-row { grid-template-columns: repeat(3, 1fr); }
  .logos-row li:nth-child(-n+3) { border-bottom: 1px dotted color-mix(in srgb, var(--ink) 22%, transparent); }
}

/* ---------- Stories: zig-zag with air ---------- */
:root { --tone-blue: #0284C7; --tone-orange: #D4532C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tone-blue: #4FB8EC; --tone-orange: #FC734D; } }
:root[data-theme="dark"] { --tone-blue: #4FB8EC; --tone-orange: #FC734D; }
.story, .story:last-child { border: 0; padding: clamp(56px, 8vw, 120px) 0; align-items: center; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); }
.stories .story:first-child { padding-top: 0; }
.story.flip { grid-template-columns: 5fr 7fr; }
.story.flip .story-media { order: 2; }
.story-body { padding-top: 0; }

/* ---------- KPI: oversized, counting, with a coloured orb ---------- */
.kpi { position: relative; isolation: isolate; margin-top: clamp(28px, 4vw, 48px); }
.kpi-orb { position: absolute; z-index: -1; left: -28px; top: -14px; width: clamp(120px, 14vw, 190px); aspect-ratio: 1; border-radius: 50%; filter: blur(34px); opacity: .45; transition: transform .8s var(--ease-expo), opacity .4s ease; }
.kpi-blue .kpi-orb { background: var(--blue); }
.kpi-orange .kpi-orb { background: var(--orange); }
.motion-ok .kpi-blue .kpi-orb { animation: float-a 14s ease-in-out infinite alternate; }
.motion-ok .kpi-orange .kpi-orb { animation: float-b 16s ease-in-out infinite alternate; }
.kpi-num { display: flex; align-items: baseline; font-size: clamp(4.2rem, 2.6rem + 5.4vw, 8.4rem); font-weight: 600; letter-spacing: -0.055em; line-height: .88; font-variant-numeric: tabular-nums; }
.kpi-pre { font-size: .42em; font-weight: 500; color: var(--ink-2); margin-right: .14em; letter-spacing: 0; align-self: center; }
.kpi-suf { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; margin-left: .03em; }
.kpi-blue .kpi-suf { color: var(--tone-blue); }
.kpi-orange .kpi-suf { color: var(--tone-orange); }
.kpi-label { margin-top: 18px; max-width: 30ch; font-weight: 500; line-height: 1.35; }
.kpi-label::before { content: ""; display: inline-block; width: 22px; height: 2px; margin: 0 10px 4px 0; vertical-align: middle; border-radius: 2px; background: currentColor; }
.kpi-blue .kpi-label::before { background: var(--tone-blue); }
.kpi-orange .kpi-label::before { background: var(--tone-orange); }
@media (hover: hover) and (pointer: fine) { .story:hover .kpi-orb { opacity: .65; } }
@media (max-width: 860px) {
  .story.flip { grid-template-columns: 1fr; }
  .story.flip .story-media { order: 0; }
}
@media (prefers-reduced-motion: reduce) { .kpi-orb { animation: none !important; } }
@media (max-width: 860px) {
  .story, .story:last-child, .story.flip { grid-template-columns: 1fr; padding: 48px 0; }
  .story-media { order: 0 !important; }
}
.logos-row li { min-width: 0; }
.logos-row .logo-mark img { max-width: 100%; }
@media (max-width: 520px) { .logos-row .logo-cap { font-size: 0.6rem; letter-spacing: 0.04em; } }
.logos-row .logo-mark { width: 100%; }
.logos-row .logo-mark img { width: auto; height: auto; max-width: min(150px, 100%) !important; object-fit: contain; }
