@font-face {
  font-family: "Google Sans";
  src: url("assets/fonts/GoogleSans-VariableFont_GRAD,opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; text-decoration: none; }
.skip:focus { top: 12px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 20px; font-size: 15px; font-weight: 600;
  transition: opacity .25s, transform .25s; pointer-events: none;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .hero .reveal { opacity: 1; transform: none; transition: none; animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero .reveal:nth-child(2) { animation-delay: .08s; }
.js .hero .reveal:nth-child(3) { animation-delay: .16s; }
.js .hero .reveal:nth-child(4) { animation-delay: .24s; }
.js .hero .reveal:nth-child(n+5) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .hero .reveal { opacity: 1; transform: none; transition: none; animation: none; }
}

:root {
  --wrap: 1300px; --gutter: clamp(18px, 4.5vw, 64px); --section: clamp(96px, 12vw, 168px);
  --radius: 0px; --nav-h: 72px;
}
html { scroll-padding-top: calc(var(--nav-h) + 8px); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--on-accent, #000); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip, .toast { background: var(--accent); color: var(--on-accent, #000); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.topbar { position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.brand { font-family: var(--display); font-weight: 800; font-size: 19px; text-decoration: none; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 15px; }
.lang-toggle { display: inline-flex; }
.lang-toggle button { font: 700 12.5px var(--font); letter-spacing: .06em; min-width: 40px; height: 32px; border: 0; background: none; color: inherit; cursor: pointer; }

.hero-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.hero-name { font-family: var(--display); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 26px; font: 700 16px var(--font); text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, transform .2s, border-color .2s; }
.hero-photo { position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
.hero-photo img { position: absolute; left: 50%; bottom: 0; width: 100%; max-width: none; transform: translateX(-50%); filter: grayscale(1) contrast(1.1); }

.section { padding-top: var(--section); }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 32px; margin-bottom: clamp(40px, 5vw, 72px); }
.sec-title { font-family: var(--display); }
.sec-note { margin-left: auto; max-width: 32ch; }

.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); }
.project-media { aspect-ratio: 1; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.project:hover .project-media img { transform: scale(1.035); }
.project-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.project-title { font-family: var(--display); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags li { font-size: 13.5px; font-weight: 600; }
.project-link { display: inline-block; margin-top: 18px; font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; }
.project-link::after { content: " →"; }

.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.skill { display: flex; flex-direction: column; gap: 4px; }
.skill-name { font-family: var(--display); }

.contact { margin-top: var(--section); }
.contact-title { font-family: var(--display); }
.contact-email { display: inline-block; text-decoration: none; overflow-wrap: anywhere; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { font: 700 14.5px var(--font); color: inherit; background: none; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; height: 42px; padding: 0 18px; }

@media (max-width: 1000px) { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { max-width: 360px; width: 100%; }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .sec-note { margin-left: 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  :root { --nav-h: 62px; }
  .nav-links { display: none; }
  .lang-toggle { margin-left: auto; }
  .skills { grid-template-columns: minmax(0, 1fr); }
}

.ln { display: block; overflow: hidden; padding-block: .06em .22em; margin-block: -.06em -.22em; } /* room for descenders (the j in Björn) */
.ln > span { display: block; animation: ln-up 1s cubic-bezier(.2, .75, .15, 1) both; }
.ln + .ln > span { animation-delay: .09s; }
@keyframes ln-up { from { transform: translateY(108%); } }
.u-link { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s cubic-bezier(.2, .7, .2, 1); }
.u-link:hover { background-size: 100% 1.5px; }
@supports (animation-timeline: view()) {
  .media-in img { animation: media-in linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  @keyframes media-in { from { scale: 1.14; opacity: .35; } to { scale: 1; opacity: 1; } }
  .progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: var(--accent); transform-origin: 0 50%; animation: progress linear both; animation-timeline: scroll(root); }
  @keyframes progress { from { transform: scaleX(0); } }
}
@media (prefers-reduced-motion: reduce) {
  .ln > span, .media-in img, .progress { animation: none !important; }
}

.topbar { background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.brand { font-weight: 700; font-size: 17px; }
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover, .nav-links a.is-active { color: var(--fg); }
.btn { height: 50px; padding: 0 24px; font-size: 15px; border-radius: var(--btn-r, 999px); }
.btn .arr { display: inline-block; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--fg); color: var(--bg); }
.btn-ghost { color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line-strong, var(--line)); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.hero-k { color: var(--muted); font-weight: 500; }
.hero-name { font-weight: 700; letter-spacing: -0.055em; line-height: .98; }
.hero-role { margin-top: 22px; font-family: var(--display); font-weight: 600; color: var(--accent); font-size: clamp(19px, 1.8vw, 24px); letter-spacing: -0.015em; }
.hero-lede { margin-top: 14px; max-width: 46ch; color: var(--soft); font-size: clamp(17px, 1.3vw, 19px); }
.hero-actions { margin-top: 32px; }
.hero-photo img { filter: grayscale(1) contrast(1.05) brightness(1.35); mix-blend-mode: multiply; }
.sec-title { font-weight: 700; letter-spacing: -0.045em; line-height: .95; font-size: clamp(40px, 5.4vw, 84px); }
.sec-n { color: var(--accent); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.sec-note { color: var(--muted); }
.project-n { color: var(--accent); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.project-kind { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.project-title { font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.project-meta { font-weight: 600; }
.project-desc { color: var(--soft); }
.tags li { color: var(--soft); font-weight: 500; }
.project-link { color: var(--accent); border-bottom: 0; }
.skill-n { color: var(--accent); font-weight: 600; font-size: 13px; }
.skill-name { font-weight: 700; letter-spacing: -0.02em; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.2; }
.skill span:last-child { color: var(--muted); font-size: 15px; }
.contact-title { font-weight: 700; letter-spacing: -0.05em; line-height: .95; font-size: clamp(40px, 6.4vw, 104px); max-width: 14ch; }
.contact-email { margin-top: 32px; font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.6vw, 36px); letter-spacing: -0.02em; }
.contact-links { margin-top: 26px; }
.pill { border-radius: var(--btn-r, 999px); box-shadow: inset 0 0 0 1.5px currentColor; font-weight: 600; transition: background-color .2s, color .2s; }
.copyright { margin-top: clamp(64px, 8vw, 112px); padding-block: 20px 32px; font-size: 14px; opacity: .7; }

.hero { padding-block: clamp(40px, 6vw, 96px) 0; }
.hero-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: end; }
.hero-text { padding-bottom: clamp(8px, 2vw, 32px); }
.hero-k { font-size: 17px; }
.hero-name { font-size: clamp(60px, 7.8vw, 128px); letter-spacing: -0.05em; }
.hero-role { margin-top: 22px; color: var(--soft); font-family: var(--font); font-weight: 500; font-size: clamp(20px, 1.9vw, 26px); letter-spacing: -0.01em; }
.hero-actions { margin-top: 36px; }
.hero-photo { border-radius: var(--r-photo, 28px); background: var(--photo-bg); width: 100%; max-width: 520px; justify-self: end; }
.hero-photo img { filter: grayscale(1) contrast(1.03); mix-blend-mode: normal; }
.intro { padding-top: var(--section); }
.intro-inner { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); gap: 20px 48px; }
.intro-k { padding-top: .55em; color: var(--accent); font-weight: 600; font-size: 15px; }
.intro-text { max-width: 32ch; font-size: clamp(24px, 2.7vw, 40px); line-height: 1.22; letter-spacing: -0.022em; font-weight: 500; }
.intro-facts { display: flex; flex-wrap: wrap; gap: 16px 56px; margin-top: clamp(28px, 3vw, 44px); }
.intro-facts dt { color: var(--muted); font-size: 14px; }
.intro-facts dd { margin-top: 2px; font-weight: 600; }
.sec-n { display: none; }
.sec-head { align-items: flex-end; }
.stack { display: block; }
.stack > .project {
  position: sticky; top: calc(var(--nav-h) + 20px);
  display: grid; grid-template-columns: minmax(0, 1fr) min(48%, calc(100svh - var(--nav-h) - 150px));
  gap: clamp(24px, 4vw, 64px); margin-bottom: 40px; padding: clamp(18px, 2.4vw, 32px);
  border-radius: var(--r-card, 32px); background: var(--c); color: var(--t);
  scale: calc(1 - var(--p, 0) * .05); transform-origin: 50% 0;
}
.stack > .project:nth-child(2) { top: calc(var(--nav-h) + 36px); }
.stack > .project:nth-child(3) { top: calc(var(--nav-h) + 52px); }
.stack > .project:nth-child(4) { top: calc(var(--nav-h) + 68px); }
.stack > .project::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #000; opacity: calc(var(--p, 0) * .2); pointer-events: none; }
.js .stack > .project.reveal { transform: none; }
.project-media { border-radius: calc(var(--r-card, 32px) - 10px); }
.project-body { display: flex; flex-direction: column; padding: clamp(4px, 1vw, 16px); }
.tags li { padding: 4px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 35%, transparent); color: inherit; font-size: 13px; }
.project-title { margin-top: clamp(20px, 2.6vw, 36px); font-size: clamp(44px, 5.4vw, 84px); }
.project-desc { margin-top: 14px; max-width: 34ch; color: var(--m); font-size: clamp(17px, 1.4vw, 20px); line-height: 1.45; }
.pb { margin-top: auto; padding-top: 32px; }
.pfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.pfacts dt { color: var(--m); font-size: 13px; }
.pfacts dd { margin-top: 2px; font-weight: 600; font-size: 15px; }
.project-link { color: var(--a, var(--accent)); }
.skills { gap: 12px; }
.skill { padding: 24px; border-radius: 20px; background: var(--tile); transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.skill:hover { transform: translateY(-3px); }
.skill-n { display: none; }
.skill-name { margin-bottom: 4px; }
.contact { padding-inline: var(--gutter); padding-bottom: 24px; }
.contact .wrap { max-width: var(--wrap); padding: clamp(36px, 6vw, 88px); border-radius: 36px; background: var(--panel); color: var(--on-panel); }
.contact .sec-n { display: none; }
.contact-email { color: var(--panel-accent); }
.pill:hover { background: var(--on-panel); color: var(--panel); }
.copyright { border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hero-photo, .hero-win { order: -1; }
  .hero-photo { justify-self: start; max-width: 420px; }
  .intro-inner { grid-template-columns: minmax(0, 1fr); }
  .stack > .project { position: relative; top: 0 !important; grid-template-columns: minmax(0, 1fr); scale: none; }
  .stack > .project::after { display: none; }
  .project-media { order: -1; }
  .contact .wrap { padding-inline: 24px; }
}
@media (prefers-reduced-motion: reduce) { .stack > .project { scale: none; } .stack > .project::after { display: none; } }

/* Version AV — Windows: AR's app-window cards, toned down — fine outlines, soft depth, one tangerine accent. */
/* Colours: matched to the CV (greige paper, charcoal type, brick red) */
:root { --bg: #e7dfd4; --fg: #2f2f2f; --soft: #4a4640; --muted: #6f685f; --line: #2f2f2f; --line-strong: #2f2f2f;
  --accent: #a8323a; --on-accent: #fff; --btn-r: 12px; --photo-bg: #d9cfc2; --tile: #fbf8f3; --r-card: 18px; --r-photo: 0; --bar: 42px;
  --win: #fbf8f3; --band: #ddd4c7; --hover: #f0d6d3; --card-muted: #6a645c; --edge: #2f2f2f;
  --panel: #2f2f2f; --on-panel: #f0eae2; --panel-accent: #e0646b; --display: "Google Sans", system-ui, sans-serif; --font: "Google Sans", system-ui, sans-serif; color-scheme: light; }
.lang-toggle { border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--fg); overflow: hidden; }
.lang-toggle button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.win-bar { display: flex; align-items: center; gap: 12px; height: var(--bar); padding: 0 16px; border-bottom: 1.5px solid var(--edge, var(--fg)); }
.dots { display: flex; gap: 6px; }
.win-name { font: 600 13px ui-monospace, "SF Mono", Menlo, monospace; opacity: .7; }
.hero-win { width: 100%; max-width: 500px; justify-self: end; border: 1.5px solid var(--edge, var(--fg)); border-radius: 18px; overflow: hidden; background: var(--win, #fff); box-shadow: 0 30px 60px -36px rgb(0 0 0 / .45); }
.hero-win .hero-photo { max-width: none; border-radius: 0; }
.stack > .project.win { display: block; padding: 0; border: 1.5px solid var(--edge, var(--fg)); overflow: hidden; box-shadow: 0 30px 60px -40px rgb(0 0 0 / .5); }
.stack > .project.win:nth-child(2) { top: calc(var(--nav-h) + 20px + var(--bar)); }
.stack > .project.win:nth-child(3) { top: calc(var(--nav-h) + 20px + var(--bar) * 2); }
.stack > .project.win:nth-child(4) { top: calc(var(--nav-h) + 20px + var(--bar) * 3); }
.win-main { display: grid; grid-template-columns: minmax(0, 1fr) min(48%, calc(100svh - var(--nav-h) - var(--bar) * 4 - 80px)); }
.win-main .project-body { padding: clamp(22px, 3vw, 44px); }
.win-main .project-media { border-radius: 0; border-left: 1.5px solid var(--edge, var(--fg)); }
.skill { border: 1.5px solid var(--edge, var(--fg)); border-radius: 14px; }
@media (max-width: 860px) {
  .hero-win { justify-self: start; max-width: 400px; }
  .win-main { grid-template-columns: minmax(0, 1fr); }
  .win-main .project-media { border-left: 0; border-bottom: 1.5px solid var(--edge, var(--fg)); }
}

/* =========================================================
   Logos & project buttons
   ========================================================= */
.ico { width: 1.15em; height: 1.15em; flex: none; }
.btn .ico, .pill .ico { width: 18px; height: 18px; }

/* "View project" button on every card */
.btn-sm { height: 44px; padding: 0 18px; font-size: 14.5px; gap: 8px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.card-actions .btn-primary .ico { transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.card-actions .btn-primary:hover .ico { transform: translateX(3px); }

/* Skills: a discipline icon plus the tools' logos */
.skill { gap: 0; }
.skill-name { margin-bottom: 8px; }
.skill .skill-desc { color: var(--muted); font-size: 15px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tools li { display: inline-flex; align-items: center; gap: 8px; }
.skill .tools li span { color: var(--soft); font-size: 14.5px; font-weight: 500; }
.tools .ico { width: 22px; height: 22px; color: var(--fg); transition: color .25s; }
.skill:hover .tools .ico { color: var(--brand, var(--fg)); }
.skill { transition: transform .3s cubic-bezier(.2, .7, .2, 1), background-color .25s; }
.skill:hover { background: var(--hover, #ffd2d5); }

/* Contact: mail, LinkedIn and GitHub logos */
.contact-email { display: inline-flex; align-items: center; gap: .45em; text-decoration: none; }
.contact-email .ico { width: .85em; height: .85em; }
.contact-email:hover .u-link { background-size: 100% 1.5px; }
.contact-links .pill { gap: 9px; border: 0; }
.contact-links .pill .ico { width: 17px; height: 17px; }

/* =========================================================
   Project pages (projects/*.html)
   ========================================================= */
.pj { padding-top: clamp(28px, 4vw, 56px); }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; font-size: 15px; text-decoration: none; transition: color .2s; }
.back .ico { width: 18px; height: 18px; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.back:hover { color: var(--fg); }
.back:hover .ico { transform: translateX(-3px); }
.pj-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: end; margin-top: clamp(28px, 4vw, 56px); }
.pj-text { padding-bottom: 8px; }
.pj .tags li { padding: 4px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 35%, transparent); font-size: 13px; }
.pj-title { margin-top: 24px; font-weight: 700; font-size: clamp(56px, 7.4vw, 120px); letter-spacing: -0.05em; line-height: .9; }
.pj-desc { margin-top: 22px; max-width: 34ch; color: var(--soft); font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; }
.pj-facts { max-width: 520px; margin-top: 36px; }
.pj-win { border: 1.5px solid var(--edge, var(--fg)); border-radius: 18px; overflow: hidden; background: var(--win, #fff); box-shadow: 0 30px 60px -40px rgb(0 0 0 / .5); }
.pj-media { aspect-ratio: 1; background: var(--photo-bg); }
.pj-media img { width: 100%; height: 100%; object-fit: cover; }
.pj-note { padding-top: var(--section); }
.pj-note p { max-width: 36ch; color: var(--soft); font-size: clamp(22px, 2.2vw, 32px); line-height: 1.3; letter-spacing: -0.02em; }
.pj-next { padding-top: var(--section); }
.pj-next a { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; padding-top: 24px; border-top: 1.5px solid var(--fg); text-decoration: none; }
.pj-next-k { color: var(--muted); font-size: 15px; font-weight: 500; }
.pj-next-title { display: inline-flex; align-items: center; gap: .25em; font-weight: 700; font-size: clamp(44px, 6vw, 96px); letter-spacing: -0.045em; line-height: 1; transition: color .25s; }
.pj-next-title .ico { width: .6em; height: .6em; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.pj-next a:hover .pj-next-title { color: var(--accent); }
.pj-next a:hover .pj-next-title .ico { transform: translateX(6px); }
@media (max-width: 860px) {
  .pj-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .pj-next a { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   Polish round: highlights, tints, rhythm, logos, hover details
   ========================================================= */

/* 1. About: key phrases get a marker highlight that sweeps in on scroll */
.intro-text mark {
  color: inherit; padding: 0 .06em; margin: 0 -.06em;
  background: linear-gradient(color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent) 20%, transparent)) 0 88% / 0% 42% no-repeat;
  transition: background-size 1.1s cubic-bezier(.2, .7, .2, 1) .35s;
}
.intro .is-visible .intro-text mark, html:not(.js) .intro-text mark { background-size: 100% 42%; }
.intro .is-visible .intro-text mark + mark { transition-delay: .6s; }

/* 2. Each project window carries a tint taken from its image */
.project.win .win-bar { background: color-mix(in srgb, var(--tint, var(--accent)) 9%, var(--win, #fff)); }
.project.win .tags li, .pj .tags li {
  color: color-mix(in srgb, var(--tint, var(--accent)) 75%, var(--fg));
  background: color-mix(in srgb, var(--tint, var(--accent)) 8%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint, var(--accent)) 40%, transparent);
}
.pj-win .win-bar { background: color-mix(in srgb, var(--tint, var(--accent)) 9%, var(--win, #fff)); }

/* 3. Rhythm: the work section sits on a slightly deeper band */
#work { margin-top: var(--section); padding-block: var(--section); background: var(--band, #ebe6dd); }

/* 4. Logo strip under the About text: grey until hovered */
.clients { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px; margin-top: clamp(36px, 4vw, 56px); padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); }
.clients-k { color: var(--muted); font-size: 14px; }
.clients-list { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 44px; }
.clients-list img { height: var(--h, 24px); width: auto; filter: grayscale(1) brightness(0); opacity: .5; transition: filter .35s, opacity .35s; }
.clients-list li:hover img { filter: none; opacity: 1; }


/* 6. Tighter project cards: a slightly smaller image column, less empty space */
.win-main { grid-template-columns: minmax(0, 1fr) min(44%, calc(100svh - var(--nav-h) - var(--bar) * 4 - 80px)); }
.win-main .project-body { padding: clamp(22px, 2.6vw, 40px); }

@media (max-width: 860px) {
  .win-main { grid-template-columns: minmax(0, 1fr); }
  .clients { gap: 14px 28px; }
  .clients-list { gap: 16px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-text mark { transition: none; background-size: 100% 42%; }
}

/* Like the CV: skill names and the About label in brick red */
.skill-name, .intro-k { color: var(--accent); }

/* Hero portrait: the image files are already cropped to head and shoulders */
.hero-win .hero-photo img { width: 100%; bottom: 0; }

/* Hero text: centred against the portrait instead of sitting at its bottom edge */
@media (min-width: 861px) {
  .hero-inner { align-items: center; }
  .hero-text { padding-bottom: 0; }
}

/* Hover the portrait (or tap / focus it) and Björn winks */
.hero-photo .wink { opacity: 0; pointer-events: none; }
.hero-photo:hover .wink, .hero-photo.is-winking .wink, .hero-photo:has(.wink-btn:focus-visible) .wink { opacity: 1; }
.wink-btn { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.wink-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

/* Window traffic lights: close / minimise / maximise.
   Icons are drawn shapes (not text), so they sit exactly in the centre. */
.dots > * {
  position: relative; display: grid; place-items: center; flex: none;
  width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor;
}
.dots > :first-child { background: var(--tint, var(--accent)); box-shadow: none; }
.dots > *::after {
  content: ""; width: 8px; height: 8px; background: var(--fg); opacity: 0; transition: opacity .15s;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.dots > :nth-child(1) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.5 3.5l5 5M8.5 3.5l-5 5' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.dots > :nth-child(1)::after { background: #fff; }
.dots > :nth-child(2) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6h6' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.dots > :nth-child(3) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6h6M6 3v6' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.win:hover .dots > *::after, .hero-win:hover .dots > *::after, .dots:focus-within > *::after { opacity: .9; }
/* Clickable dots get a larger, invisible hit area */
button.dot { cursor: pointer; }
button.dot::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; }
button.dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* =========================================================
   Case study pages (projects/*.html with body.case)
   ========================================================= */
.case { --cs-ink: color-mix(in srgb, var(--tint, var(--accent)) 72%, #000); }
.cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; max-width: 560px; }

/* key numbers */
.cs-stats { padding-top: clamp(56px, 7vw, 96px); }
.cs-stat-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cs-stat-list li { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border: 1.5px solid var(--edge, var(--fg)); border-radius: 16px; background: var(--win, #fff); color: var(--soft); font-size: 15px; line-height: 1.35; }
.cs-stat-list strong { color: var(--cs-ink); font-size: clamp(44px, 4.6vw, 64px); font-weight: 700; letter-spacing: -0.05em; line-height: 1; }

/* section grid: small label left, content right */
.cs-sec { padding-top: var(--section); }
.cs-grid { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 20px 48px; }
.cs-grid + .cs-wide, .cs-wide + .cs-grid, .cs-grid + .cs-pair, .cs-pair + .cs-grid { margin-top: clamp(32px, 4vw, 56px); }
.cs-k { display: flex; align-items: baseline; gap: 10px; padding-top: .55em; color: var(--cs-ink); font-weight: 600; font-size: 15px; }
.cs-n { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.cs-body { max-width: 860px; }
.cs-h { max-width: 18ch; font-size: clamp(32px, 3.8vw, 54px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; }
.cs-p { max-width: 62ch; margin-top: 20px; color: var(--soft); font-size: clamp(17px, 1.35vw, 19px); line-height: 1.6; }
.cs-p em { font-style: normal; color: var(--fg); font-weight: 600; }
.cs-note { padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); margin-top: 32px; }
.cs-rq { max-width: 40ch; margin-top: 28px; padding-left: 22px; border-left: 3px solid var(--tint, var(--accent)); font-size: clamp(21px, 2vw, 28px); font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; }

/* research findings */
.cs-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.cs-card { display: flex; flex-direction: column; padding: 24px; border: 1.5px solid var(--edge, var(--fg)); border-radius: 16px; background: var(--win, #fff); }
.cs-card-n { color: var(--cs-ink); font-size: 13px; font-weight: 600; }
.cs-card h3 { margin-top: 14px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.cs-card > p { margin-top: 8px; color: var(--soft); font-size: 15.5px; line-height: 1.5; }
.cs-card .cs-quote { margin-top: auto; padding-top: 20px; }

/* quotes */
.cs-quote blockquote { margin: 0; }
.cs-quote blockquote p { font-size: 15.5px; font-style: italic; line-height: 1.5; color: var(--fg); }
.cs-quote figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; }
.cs-body > .cs-quote { margin-top: 40px; padding: 28px 32px; border-radius: 16px; background: color-mix(in srgb, var(--tint, var(--accent)) 10%, var(--win, #fff)); }
.cs-body > .cs-quote blockquote p { font-size: clamp(20px, 1.9vw, 26px); font-style: normal; font-weight: 500; letter-spacing: -0.015em; line-height: 1.35; }

/* process steps */
.cs-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 36px; counter-reset: step; }
.cs-step { position: relative; display: flex; flex-direction: column; padding: 24px; border-top: 3px solid var(--tint, var(--accent)); background: var(--win, #fff); border-radius: 0 0 16px 16px; }
.cs-step-k { color: var(--cs-ink); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.cs-step h3 { margin-top: 10px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.cs-step > p:not(.cs-tools) { margin-top: 8px; color: var(--soft); font-size: 15.5px; line-height: 1.5; }
.cs-tools { margin-top: auto; padding-top: 16px; color: var(--muted); font: 500 12.5px ui-monospace, "SF Mono", Menlo, monospace; }

/* screens */
.cs-win { border: 1.5px solid var(--edge, var(--fg)); border-radius: 18px; overflow: hidden; background: var(--win, #fff); box-shadow: 0 30px 60px -40px rgb(0 0 0 / .5); }
.cs-win .win-bar { background: color-mix(in srgb, var(--tint, var(--accent)) 9%, var(--win, #fff)); }
.cs-img { display: block; width: 100%; height: auto; }
.cs-cap { max-width: 70ch; margin-top: 14px; color: var(--muted); font-size: 14.5px; }
/* module viewer: tabs on the left, one app window on the right */
.cs-grid + .cs-modview, .cs-grid + .cs-modscroll, .cs-wide + .cs-modscroll { margin-top: clamp(48px, 6vw, 88px); }
/* scroll-driven: the viewer pins below the nav while scrolling advances the modules (enabled by script.js) */
.cs-modscroll.is-scrolly { height: calc(var(--steps, 5) * 55svh + 45svh); }
.cs-modscroll.is-scrolly > .cs-modview { position: sticky; top: calc(var(--nav-h) + 32px); }
.cs-modview { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 40px; align-items: start; }
.cs-mods { display: grid; }
.cs-mod button { display: block; width: 100%; padding: 16px 0 16px 18px; border: 0; border-top: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; position: relative; }
.cs-mod:last-child button { border-bottom: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); }
.cs-mod button::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--tint, var(--accent)); transform: scaleY(0); transition: transform .3s ease; }
.cs-mod button[aria-selected="true"]::before { transform: scaleY(1); }
.cs-mod h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; color: var(--muted); transition: color .2s; }
.cs-mod button:hover h3, .cs-mod button[aria-selected="true"] h3 { color: var(--fg); }
.cs-mod p { max-height: 0; margin-top: 0; color: var(--soft); font-size: 15.5px; line-height: 1.5; overflow: hidden; opacity: 0; transition: max-height .35s ease, opacity .35s ease, margin-top .35s ease; }
.cs-mod button[aria-selected="true"] p { max-height: 12em; margin-top: 6px; opacity: 1; }
.cs-mod button:focus-visible { outline: 2px solid var(--tint, var(--accent)); outline-offset: 2px; }
.cs-shots { display: grid; }
.cs-shots > .cs-img { grid-area: 1 / 1; opacity: 0; transition: opacity .35s ease; }
.cs-shots > .cs-img.is-on { opacity: 1; }
/* phone mockups: no window, the phone (transparent PNG with shadow) stands on the page */
.cs-modview.is-phone { grid-template-columns: minmax(240px, 420px) minmax(0, 1fr); align-items: center; }
.cs-phone-stage { display: grid; justify-items: center; }
.cs-shots.is-phone { height: min(78svh, 780px); aspect-ratio: 760 / 1141; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.cs-shots.is-phone > .cs-img { width: 100%; height: 100%; object-fit: contain; }
/* native window screenshots (macOS window with its own chrome and transparent shadow) */
.cs-modview.is-native { grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); align-items: center; }
.cs-native-stage { display: grid; justify-items: center; }
.cs-shots.is-native { width: min(100%, calc((100svh - var(--nav-h) - 72px) * 1600 / 1134)); aspect-ratio: 1600 / 1134; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.cs-shots.is-native > .cs-img { width: 100%; height: 100%; object-fit: contain; }
/* small screens: stack list and screenshot, like the default viewer (these variants out-specify the generic rule) */
@media (max-width: 860px) {
  .cs-modview.is-phone, .cs-modview.is-native { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cs-shots.is-phone { height: min(70svh, 560px); max-width: 100%; }
  .cs-shots.is-native { width: 100%; }
  /* the phone's shadow falls to the right inside the image; shift so the phone itself is centred */
  .cs-shots.is-phone { translate: 18% 0; }

  /* scroll-driven on phones: screenshot on top, only the active module below it, with a progress bar */
  .cs-modscroll.is-scrolly > .cs-modview { top: calc(var(--nav-h) + 12px); gap: 18px; }
  .is-scrolly .cs-modview > [role="tabpanel"] { order: -1; }
  .is-scrolly .cs-mods { position: relative; padding-top: 14px; }
  .is-scrolly .cs-mods::before, .is-scrolly .cs-mods::after { content: ""; position: absolute; top: 0; left: 0; height: 3px; border-radius: 2px; }
  .is-scrolly .cs-mods::before { right: 0; background: color-mix(in srgb, var(--fg) 14%, transparent); }
  .is-scrolly .cs-mods::after { width: calc((var(--active, 0) + 1) / var(--steps, 5) * 100%); background: var(--tint, var(--accent)); transition: width .35s ease; }
  .is-scrolly .cs-mod:not(:has([aria-selected="true"])) { display: none; }
  .is-scrolly .cs-mod { animation: mod-in .35s ease both; }
  .is-scrolly .cs-mod button { padding: 0; border: 0 !important; cursor: default; }
  .is-scrolly .cs-mod button::before { display: none; }
  .is-scrolly .cs-mod p { transition: none; }
  .is-scrolly .cs-shots.is-phone { height: min(48svh, 440px); }
}
@keyframes mod-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .is-scrolly .cs-mod { animation: none; } }
@media (prefers-reduced-motion: reduce) { .cs-mod p, .cs-shots > .cs-img, .cs-mod button::before { transition: none; } }
.cs-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* evaluation */
.cs-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.cs-list { padding: 24px 26px; border-radius: 16px; background: var(--win, #fff); border: 1.5px solid var(--edge, var(--fg)); }
.cs-list-h { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; }
.cs-list-h::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.cs-list-h.good::before { background: var(--tint, var(--accent)); }
.cs-list-h.bad::before { background: var(--accent); }
.cs-list ul { margin-top: 14px; display: grid; gap: 10px; }
.cs-list li { position: relative; padding-left: 18px; color: var(--soft); font-size: 15.5px; line-height: 1.5; }
.cs-list li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }

/* learnings */
.cs-lessons { margin-top: 32px; display: grid; gap: 0; }
.cs-lesson { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding-block: 20px; border-top: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); }
.cs-lesson:last-child { border-bottom: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); }
.cs-lesson-n { color: var(--cs-ink); font-size: 30px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.cs-lesson h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.cs-lesson p { margin-top: 4px; color: var(--soft); font-size: 15.5px; line-height: 1.5; }
.cs-credit { margin-top: 24px; color: var(--muted); font-size: 14px; }

@media (max-width: 1000px) {
  .cs-stat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-cards, .cs-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .cs-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cs-grid > div:empty { display: none; }
  .cs-pair, .cs-split, .cs-facts, .cs-modview { grid-template-columns: minmax(0, 1fr); }
  .cs-modview { gap: 24px; }
}

/* Logo strip on case study pages; the HvA logo follows the page language */
.cs-orgs { margin-top: 28px; max-width: 560px; }
.lg-nl, html[lang="nl"] .lg-en { display: none; }
html[lang="nl"] .lg-nl { display: block; }

/* Case study: sub-heading, process flow and bar chart */
.cs-sub { margin-top: 48px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.cs-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 18px; counter-reset: flow; }
.cs-flow li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 20px; border-radius: 14px; background: var(--win, #fff); border: 1.5px solid var(--edge, var(--fg)); counter-increment: flow; }
.cs-flow li::before { content: counter(flow); color: var(--cs-ink); font-size: 13px; font-weight: 700; }
.cs-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -10px; top: 50%; z-index: 1; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--bg); color: var(--cs-ink); font-size: 13px; line-height: 18px; text-align: center; }
.cs-flow strong { font-size: 16px; line-height: 1.25; }
.cs-flow span { color: var(--soft); font-size: 14px; line-height: 1.45; }
.cs-chart { margin-top: 32px; padding: 26px 28px; border-radius: 16px; background: var(--win, #fff); border: 1.5px solid var(--edge, var(--fg)); }
.cs-chart figcaption { font-size: 17px; font-weight: 700; }
.cs-chart ul { display: grid; gap: 12px; margin-top: 18px; }
.cs-chart li { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr) 44px; align-items: center; gap: 14px; color: var(--soft); font-size: 15px; }
.cs-bar { height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--fg) 8%, transparent); overflow: hidden; }
.cs-bar i { display: block; height: 100%; width: calc(var(--v) * 1% / .26); max-width: 100%; border-radius: inherit; background: var(--tint, var(--accent)); transform-origin: 0 50%; transition: transform 1s cubic-bezier(.2, .7, .2, 1) .2s; }
.js .cs-chart:not(.is-visible) .cs-bar i { transform: scaleX(0); }
.cs-chart li:last-child .cs-bar i { background: color-mix(in srgb, var(--fg) 30%, transparent); }
.cs-chart b { color: var(--fg); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) {
  .cs-flow { grid-template-columns: minmax(0, 1fr); }
  .cs-flow li:not(:last-child)::after { content: "↓"; right: auto; left: 24px; top: auto; bottom: -15px; margin-top: 0; }
}
@media (max-width: 600px) { .cs-chart li { grid-template-columns: minmax(0, 1fr) 44px; } .cs-bar { grid-column: 1 / -1; grid-row: 2; } }
@media (prefers-reduced-motion: reduce) { .cs-bar i { transition: none; } .js .cs-chart:not(.is-visible) .cs-bar i { transform: none; } }

/* =========================================================
   Page transitions (home <-> project pages)
   vt.js names only the clicked project's image and title, so just
   those morph between the card and the project page. The rest of
   the page fades out quickly and the new page rises in. Browsers
   without support simply navigate as before.
   ========================================================= */
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; }
/* tight boxes around the titles, so the morph scales text instead of stretching a full-width box */
.project-title, .pj-title { width: fit-content; }
::view-transition-group(*) { animation-duration: .6s; animation-timing-function: cubic-bezier(.25, .8, .2, 1); }
::view-transition-old(*), ::view-transition-new(*) { height: 100%; object-fit: cover; animation-duration: .6s; animation-timing-function: cubic-bezier(.25, .8, .2, 1); }
/* the rest of the page: fade the old page out fast, then let the new one rise in (no double exposure) */
::view-transition-old(root) { animation: .2s cubic-bezier(.4, 0, 1, 1) both vt-out; }
::view-transition-new(root) { animation: .45s cubic-bezier(.2, .7, .2, 1) .1s both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
/* arriving through a transition: what is on screen is already part of the fade, so skip its own entrance */
.vt-entry .pj .reveal, .vt-entry .stack > .project.reveal { opacity: 1; transform: none; transition: none; }
.vt-entry .pj .ln > span { animation: none; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
.cs-stat-list.cs-stat-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .cs-stat-list.cs-stat-3 { grid-template-columns: minmax(0, 1fr); } }
.cs-cards.cs-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-flow.cs-flow-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .cs-cards.cs-cards-2, .cs-flow.cs-flow-4 { grid-template-columns: minmax(0, 1fr); } }
