/* ==========================================================================
   websthetic.nl
   Palette from the websthetic logo: cream, charcoal and the coral heart.
   ========================================================================== */

:root {
  --cream: #faf1e6;
  --paper: #fdf8f1;
  --ink: #2b2c2c;
  --ink-2: #4b4844;
  --muted: #8b847b;
  --coral: #d85c45;
  --blush: #f3d6c7;
  --line: rgba(43, 44, 44, 0.16);
  --head: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 6vw, 96px);
  --ease: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; overflow-x: hidden;
  font-family: var(--body); font-size: 16px; line-height: 1.75; letter-spacing: .04em;
  color: var(--ink-2); background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--coral); color: var(--cream); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 200; padding: 10px 16px; background: var(--ink); color: var(--cream); }
.skip:focus { left: 16px; top: 16px; }

/* ---------- header, logo, burger ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(clamp(20px, 3.4vw, 48px) + env(safe-area-inset-top, 0px)) var(--pad) 0;
  pointer-events: none;
}
.header > * { pointer-events: auto; }
.header {
  transition: background-color .35s var(--ease), padding .35s var(--ease), box-shadow .35s var(--ease);
}
/* Scrolled: a light, slightly see-through bar so the logo and menu stay readable over the content */
body.is-scrolled:not(.menu-open) .header {
  padding-top: calc(14px + env(safe-area-inset-top, 0px)); padding-bottom: 14px;
  background: rgba(250, 241, 230, .95);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(43, 44, 44, .08);
  pointer-events: auto;
}
body.is-scrolled:not(.menu-open) .header__end { color: var(--ink); }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo__mark { height: 34px; width: auto; transition: transform .6s var(--ease-out); }
.logo__word {
  display: block; height: 19px; aspect-ratio: 1008 / 160; background: var(--ink);
  -webkit-mask: url("../img/wordmark-text.png") center / contain no-repeat;
          mask: url("../img/wordmark-text.png") center / contain no-repeat;
}
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.06); }

.burger {
  position: relative; width: 46px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer;
  color: inherit;
}
.header__end { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); color: var(--ink); transition: color .4s; }
.langs { display: flex; gap: 4px; }
.langs a {
  position: relative; padding: 6px 7px; text-decoration: none; color: inherit; opacity: .55;
  font-weight: 600; font-size: .78rem; letter-spacing: .14em; transition: opacity .3s;
}
.langs a::after {
  content: ""; position: absolute; left: 7px; right: 7px; bottom: 1px; height: 1.5px; background: var(--coral);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.langs a:hover, .langs a.is-active { opacity: 1; }
.langs a:hover::after, .langs a.is-active::after { transform: scaleX(1); }
body.menu-open .langs { opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.burger span {
  position: absolute; right: 0; height: 2.5px; border-radius: 2px; background: currentColor;
  transition: transform .5s var(--ease), width .5s var(--ease), opacity .3s, top .5s var(--ease);
}
.burger span:nth-child(1) { top: 4px; width: 100%; }
.burger span:nth-child(2) { top: 15.5px; width: 62%; }
.burger span:nth-child(3) { top: 27px; width: 80%; }
.burger:hover span:nth-child(2) { width: 100%; }
.burger:hover span:nth-child(3) { width: 45%; }
body[data-page="home"] .header__end { color: var(--cream); }
body.menu-open .header__end { color: var(--ink); }
body.menu-open .burger span:nth-child(1) { top: 15.5px; width: 100%; transform: rotate(45deg); }
body.menu-open .burger span:nth-child(2) { width: 0; opacity: 0; }
body.menu-open .burger span:nth-child(3) { top: 15.5px; width: 100%; transform: rotate(-45deg); }

/* ---------- menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 48px;
  background: rgba(250, 241, 230, .62);
  backdrop-filter: blur(18px) saturate(.6); -webkit-backdrop-filter: blur(18px) saturate(.6);
  opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s;
}
body.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .5s var(--ease); }
.menu__links { list-style: none; margin: 0; padding: 0; text-align: center; }
.menu__links li { overflow: hidden; }
.menu__links a {
  display: inline-block; padding: 6px 4px; text-decoration: none;
  font: 400 clamp(1.8rem, 4vw, 2.6rem)/1.35 var(--head); letter-spacing: 0; color: var(--ink);
  transform: translateY(110%); transition: transform .7s var(--ease-out), color .3s;
  background: linear-gradient(var(--ink), var(--ink)) 50% 92% / 0 2px no-repeat;
}
.menu__links a.is-active { font-weight: 600; background-size: 100% 2px; }
.menu__links a:hover { color: var(--coral); }
body.menu-open .menu__links a { transform: none; }
body.menu-open .menu__links li:nth-child(2) a { transition-delay: .06s; }
body.menu-open .menu__links li:nth-child(3) a { transition-delay: .12s; }
body.menu-open .menu__links li:nth-child(4) a { transition-delay: .18s; }
.menu__langs { display: flex; gap: 18px; }
.menu__langs a { text-decoration: none; font-weight: 600; font-size: .85rem; letter-spacing: .14em; color: var(--muted); }
.menu__langs a.is-active, .menu__langs a:hover { color: var(--ink); }
.menu__langs a.is-active { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- loader + page transition ---------- */
.loader {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: var(--cream);
  animation: loaderFallback 0s 4s forwards;
}
@keyframes loaderFallback { to { visibility: hidden; } }
.loader__inner { display: grid; justify-items: center; gap: 22px; }
.loader__mark { position: relative; display: block; width: 120px; }
.loader__mark img { display: block; width: 100%; height: auto; }
.loader__mark .beat { position: absolute; inset: 0; transform-origin: 50% 25%; }
/* the heart beats: two quick pulses, then a rest */
.beat { animation: heartbeat 1.1s cubic-bezier(.3, 0, .3, 1) infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.22); }
  28% { transform: scale(.98); }
  42% { transform: scale(1.16); }
  64% { transform: scale(1); }
}
.loader__word { display: block; width: 200px; aspect-ratio: 1008 / 160; overflow: hidden; }
.loader__word span {
  display: block; width: 100%; height: 100%; background: var(--ink);
  -webkit-mask: url("../img/wordmark-text.png") center / contain no-repeat;
          mask: url("../img/wordmark-text.png") center / contain no-repeat;
}
.wipe { position: fixed; inset: 0; z-index: 110; pointer-events: none; }
.wipe__panel { position: absolute; inset: 0; transform: translateY(100%); }
.wipe__panel--a { background: var(--coral); }
.wipe__panel--b { background: var(--ink); display: grid; place-items: center; }
.wipe__panel--b img { width: 56px; height: auto; }

/* ---------- shared bits ---------- */
main { position: relative; min-height: 100svh; }
.title {
  margin: 0; color: var(--ink);
  font: 500 clamp(2.9rem, 6.2vw, 6.1rem)/.98 var(--head); letter-spacing: -.01em;
}
.title__line { display: block; overflow: hidden; padding: 0 .08em .1em 0; margin-bottom: -.1em; }
.title__inner { display: inline-block; white-space: nowrap; }
.title__line--em { font-style: italic; font-weight: 600; }
.title--plain .title__line--em { font-style: normal; font-weight: 500; }
.title--right { text-align: right; }
.ch { display: inline-block; }
@media (hover: hover) {
  .title--fun:hover .ch { animation: hop .7s var(--ease-out) calc(var(--i) * 32ms); }
}
@keyframes hop {
  30% { transform: translateY(-.16em) rotate(-5deg); color: var(--coral); }
  60% { transform: translateY(.03em) rotate(2deg); }
}
.lead { max-width: 30em; margin: 26px 0 0; font-size: 1rem; line-height: 1.8; }
.lead--right { margin-left: auto; text-align: right; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 16px; margin-top: 28px; text-decoration: none;
  font-weight: 600; font-size: .82rem; letter-spacing: .2em; color: var(--ink);
}
.arrow-link span {
  position: relative; width: 56px; height: 1.5px; background: currentColor; transition: width .4s var(--ease-out);
}
.arrow-link span::after {
  content: ""; position: absolute; right: 0; top: 50%; width: 9px; height: 9px;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translateY(-50%) rotate(45deg);
}
.arrow-link:hover span { width: 76px; }
.arrow-link:hover { color: var(--coral); }
.arrow-link--light { color: var(--cream); }
.back-link { display: inline-block; margin-top: 18px; font-size: .82rem; color: var(--muted); }

.blob {
  position: absolute; z-index: -1; width: clamp(240px, 30vw, 420px); aspect-ratio: 1; border-radius: 50%;
  background: var(--blush); pointer-events: none;
}

.pagenum {
  position: absolute; left: var(--pad); bottom: clamp(24px, 5vh, 56px); z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
}
.pagenum__n { writing-mode: vertical-rl; font: 300 1.5rem/1 var(--head); letter-spacing: .06em; }
.pagenum__arrow { position: relative; width: 1.5px; height: 56px; background: currentColor; transition: height .4s var(--ease-out); }
.pagenum__arrow::after {
  content: ""; position: absolute; bottom: 0; left: 50%; width: 9px; height: 9px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateX(-50%) rotate(45deg);
}
.pagenum:hover .pagenum__arrow { height: 76px; }
.pagenum:hover { color: var(--coral); }
body[data-page="project"] .pagenum, body[data-page="notfound"] .pagenum { display: none; }

.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity 1s var(--ease-out) var(--d, 0s), transform 1s var(--ease-out) var(--d, 0s); }

/* ---------- home ---------- */
.home {
  --l: 55fr; --r: 45fr; --photo-x: 47%;
  position: relative; min-height: 100svh; display: grid; grid-template-columns: var(--l) var(--r); overflow: hidden; isolation: isolate;
  transition: grid-template-columns .9s var(--ease);
}
/* Hover a side: it opens up, the photo slides out of the way and the other side fades back. */
@media (hover: hover) and (min-width: 821px) {
  .home.is-dev { --l: 68fr; --r: 32fr; --photo-x: 74%; }
  .home.is-design { --l: 32fr; --r: 68fr; --photo-x: 22%; }
  .home__side > *, .pagenum { transition: opacity .5s var(--ease), visibility 0s; }
  .home.is-dev .home__side--design > *,
  .home.is-design .home__side--dev > *,
  main:has(.home.is-design) .pagenum { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s var(--ease), visibility 0s .4s; }
}
.home__side { position: relative; min-width: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 140px var(--pad) 120px; }
.home__side--dev { background: var(--cream); }
.home__side--design { background: var(--ink); color: rgba(250, 241, 230, .82); align-items: flex-end; }
.home__side--design .title { color: var(--cream); }
.home__side--design .arrow-link { position: absolute; right: var(--pad); bottom: clamp(28px, 6vh, 64px); margin: 0; }
.blob--home { left: -9%; top: 26%; }
.home__photo {
  position: absolute; z-index: 1; bottom: 0; left: var(--photo-x); transform: translateX(-50%);
  transition: left .9s var(--ease);
  height: min(74svh, 760px, 52vw); width: auto; max-width: none; pointer-events: none;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .18));
}
.home__side .title, .home__side .lead { position: relative; z-index: 2; }
.home__side .arrow-link { z-index: 2; }
.home__side--design .title { font-size: clamp(2.6rem, 4.8vw, 5.2rem); }
.home__side--dev .title { font-size: clamp(2.8rem, 5.4vw, 5.8rem); }
.home__side--dev .lead { max-width: 24em; }
.home__side--design .lead { max-width: 22em; }

/* ---------- portfolio ---------- */
.portfolio { display: grid; grid-template-columns: minmax(340px, 36%) 1fr; min-height: 100svh; align-items: center; }
.portfolio__intro { position: relative; padding: 140px var(--pad) 140px; isolation: isolate; }
.blob--portfolio { left: -18%; top: 46%; }
.portfolio__intro .title, .about__intro .title, .contact__intro .title { font-size: clamp(2.6rem, 4.6vw, 5.2rem); }
.track {
  position: relative; z-index: 1;
  display: flex; align-items: flex-start; gap: 0; overflow-x: auto; overscroll-behavior-x: contain;
  padding: clamp(96px, 14svh, 140px) var(--pad) clamp(40px, 7svh, 90px) 0; scrollbar-width: none; cursor: grab;
}
.track::-webkit-scrollbar { display: none; }
/* Fade the edge where cards are cut off, so it's clear the row goes on. */
.track.can-left, .track.can-right {
  --fl: 0px; --fr: 0px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
}
.track.can-left { --fl: 60px; }
.track.can-right { --fr: clamp(80px, 10vw, 160px); }
.track-nav { margin-top: 44px; max-width: 22em; }
.track-nav[hidden] { display: none; }
.track-nav__hint { margin: 0 0 14px; font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.track-nav__row { display: flex; align-items: center; gap: 16px; }
.track-nav__bar { position: relative; flex: 1; height: 2px; background: rgba(43, 44, 44, .14); overflow: hidden; }
.track-nav__bar span { position: absolute; inset: 0; background: var(--coral); transform-origin: left; transform: scaleX(var(--p, .2)); transition: transform .2s linear; }
.track-nav__btn {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink); cursor: pointer; transition: background-color .3s, color .3s, opacity .3s, transform .3s var(--ease-out);
}
.track-nav__btn::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translate(-70%, -50%) rotate(45deg);
}
.track-nav__btn--prev::after { transform: translate(-30%, -50%) rotate(-135deg); }
.track-nav__btn:hover:not(:disabled) { background: var(--ink); color: var(--cream); }
.track-nav__btn:disabled { opacity: .25; cursor: default; }
/* Until the visitor has scrolled the row, the "next" arrow nudges to the right. */
.track-nav.is-fresh .track-nav__btn:not(.track-nav__btn--prev) { animation: nudge 1.8s var(--ease-out) 1.2s infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .track-nav.is-fresh .track-nav__btn { animation: none; } }
.track.is-dragging { cursor: grabbing; }
.track.is-dragging a { pointer-events: none; }
.track__empty { font-size: 1.1rem; color: var(--muted); }
/* card width also follows the screen height, so the whole row always fits without scrolling down */
.card { flex: 0 0 clamp(210px, min(24vw, calc((100svh - 480px) * .75)), 360px); padding: 0 clamp(20px, 2.6vw, 40px); border-left: 2px solid var(--blush); }
.card:first-child { border-left: 0; padding-left: 0; }
.card:nth-child(even) { margin-top: clamp(36px, 9svh, 110px); }
.card__num { display: block; margin-bottom: 14px; font: 300 1.9rem/1 var(--head); color: var(--ink); letter-spacing: .04em; }
.card__media { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--paper); }
.card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top;
  filter: grayscale(1) contrast(.95); opacity: 0; transform: scale(1.04);
  transition: opacity .8s var(--ease), filter .6s var(--ease), transform 1.2s var(--ease-out);
}
.card__media img.is-on { opacity: 1; transform: none; }
.card__media:hover img, .card__media.is-color img { filter: none; }
.card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; font: italic 600 1.4rem var(--head); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 4px 11px; border: 1px solid currentColor; border-radius: 999px; color: var(--coral);
  font-weight: 600; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5;
}
.card .tags { margin-top: 20px; }
.card .tags + .card__title { margin-top: 12px; }
.project__intro .tags { margin-top: 26px; }
.project__intro .tags + .lead { margin-top: 18px; }
.card__title { margin: 22px 0 6px; font: 600 1.15rem/1.3 var(--head); color: var(--ink); letter-spacing: .01em; }
.card__text { margin: 0; font-size: .92rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.card .arrow-link { margin-top: 18px; }

/* ---------- project ---------- */
.project { display: grid; grid-template-columns: minmax(300px, 32%) 1fr; gap: 0 clamp(20px, 3vw, 48px); padding: 0 var(--pad); }
.project__intro { position: relative; align-self: start; position: sticky; top: 0; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 140px 0 80px; isolation: isolate; }
.blob--project { left: -40%; top: 48%; }
.project__intro { --title-room: 30vw; }
.project__intro .title { font-size: min(clamp(2.6rem, 5vw, 5.2rem), calc(var(--title-room) / (var(--len, 8) * .6))); }
.project__grid { column-count: 3; column-gap: clamp(20px, 2.4vw, 36px); padding: 160px 0 100px; }
.project__img, .project__text, .project__contact { break-inside: avoid; margin: 0 0 clamp(20px, 2.4vw, 36px); }
.project__img img { width: 100%; height: auto; filter: grayscale(1); transition: filter .6s var(--ease); }
.project__img:hover img { filter: none; }
.project__text { font-size: .98rem; }
.project__contact { display: flex; justify-content: flex-end; }

/* ---------- about ---------- */
.about { position: relative; display: grid; grid-template-columns: 1fr 1fr minmax(260px, .95fr); gap: clamp(24px, 4vw, 64px); align-items: center; min-height: 100svh; padding: 140px 0 0 var(--pad); overflow: hidden; isolation: isolate; }
.about__intro { position: relative; align-self: center; padding-bottom: 100px; }
.blob--about { left: 22%; top: -12%; }
.about__text p, .about__body p { margin: 22px 0 0; }
.about__body { align-self: center; padding-bottom: 100px; }
.about__photo { align-self: end; justify-self: end; width: 100%; height: min(84svh, 860px); max-width: 100%; object-fit: contain; object-position: bottom right; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 38fr 62fr; min-height: 100svh; }
.contact__intro { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 140px var(--pad) 140px; background: var(--cream); isolation: isolate; }
.blob--contact { left: -12%; top: 30%; }
.contact__details { margin: 30px 0 0; line-height: 2; }
.contact__details a { text-decoration: none; }
.contact__details a:hover { color: var(--coral); }
.socials { display: flex; gap: 12px; margin-top: 22px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--cream); transition: transform .3s var(--ease-out), background-color .3s; }
.socials a:hover { transform: translateY(-3px); background: var(--coral); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }
.contact__form { display: grid; align-items: center; padding: 140px var(--pad); background: var(--ink); color: var(--cream); }
.form { width: min(100%, 640px); margin: 0 auto; display: grid; gap: 34px; }
.field { position: relative; display: block; }
.field input, .field textarea {
  width: 100%; padding: 26px 18px 12px; border: 0; border-bottom: 1.5px solid rgba(250, 241, 230, .7); border-radius: 0;
  background: transparent; color: var(--cream); font: 1rem/1.6 var(--body); letter-spacing: .04em; resize: vertical;
  transition: border-color .3s;
}
.field textarea { min-height: 58px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--coral); }
.field span {
  position: absolute; left: 18px; top: 24px; font-weight: 600; font-size: .95rem; letter-spacing: .08em; color: var(--cream);
  pointer-events: none; transform-origin: left; transition: transform .3s var(--ease-out), color .3s;
}
.field input:focus + span, .field input:not(:placeholder-shown) + span,
.field textarea:focus + span, .field textarea:not(:placeholder-shown) + span { transform: translateY(-20px) scale(.78); color: var(--blush); }
.hp { position: absolute; left: -9999px; }
.form__send {
  margin-top: 14px; padding: 12px; border: 0; cursor: pointer; background: var(--cream); color: var(--ink);
  font: 600 .9rem var(--body); letter-spacing: .24em; transition: background-color .3s, color .3s, letter-spacing .4s var(--ease-out);
}
.form__send:hover { background: var(--coral); color: var(--cream); letter-spacing: .32em; }
.form__send[disabled] { opacity: .6; pointer-events: none; }
.form__status { min-height: 1.6em; margin: 0; font-size: .92rem; }
.form__status.is-ok { color: #9fd7b4; }
.form__status.is-error { color: #ffb4a6; }
body[data-page="contact"] .header__end { color: var(--cream); }
body[data-page="contact"].menu-open .header__end { color: var(--ink); }

/* ---------- 404 ---------- */
.notfound { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 140px var(--pad); isolation: isolate; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .about { grid-template-columns: 1fr 1fr; padding-right: var(--pad); }
  .about__photo { grid-column: 1 / -1; justify-self: center; height: auto; width: min(100%, 520px); }
  .project__grid { column-count: 2; }
}
@media (max-width: 820px) {
  body[data-page="home"]:not(.menu-open) .langs { color: var(--ink); }
  .header__end { gap: 14px; }
  .langs a { padding: 6px 5px; font-size: .74rem; letter-spacing: .1em; }
  body { font-size: 15px; }
  .logo__mark { height: 28px; }
  .logo__word { height: 15px; }
  .title { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .pagenum { position: relative; left: auto; bottom: auto; margin: 40px var(--pad) 32px; align-items: flex-start; flex-direction: row; }
  .pagenum__n { writing-mode: horizontal-tb; font-size: 1.1rem; }
  .pagenum__arrow { display: none; }

  .home { grid-template-columns: 1fr; min-height: auto; }
  .home__side--dev { order: 1; padding: 120px calc(18vw + 20px) 10px var(--pad); background: linear-gradient(90deg, var(--cream) calc(100% - 18vw), var(--ink) 0); justify-content: flex-start; }
  .home__side--dev .title { padding-top: 10px; }
  .home__side--design { order: 3; align-items: flex-start; padding: 60px var(--pad) 90px; }
  .home__side--design .title, .home__side--design .lead { text-align: left; margin-left: 0; }
  .home__side--design .arrow-link { position: static; margin-top: 28px; }
  .home__photo {
    order: 2; position: static; transform: none; width: 100%; height: min(54svh, 440px);
    object-fit: contain; object-position: right bottom; filter: none;
    background: linear-gradient(90deg, var(--cream) calc(100% - 18vw), var(--ink) 0);
  }
  .blob--home { left: 40%; top: 18%; }

  .portfolio { grid-template-columns: 1fr; }
  .portfolio__intro { padding: 120px var(--pad) 20px; }
  .track { flex-direction: column; overflow: visible; padding: 20px var(--pad) 40px; cursor: auto; gap: 56px; -webkit-mask-image: none; mask-image: none; }
  .track-nav { display: none; }
  .card { flex: none; width: 100%; padding: 0; border: 0; }
  .card:nth-child(even) { margin-top: 0; }
  .card__media { aspect-ratio: 4 / 3; }

  .project { grid-template-columns: 1fr; }
  .project__intro { position: relative; min-height: auto; padding: 120px 0 30px; --title-room: 88vw; }
  .project__grid { column-count: 1; padding-top: 20px; }

  .about { grid-template-columns: 1fr; padding: 120px var(--pad) 0; gap: 10px; }
  .about__intro, .about__body { padding-bottom: 0; }
  .about__photo { width: 100%; max-width: 420px; height: auto; border-radius: 0 0 50% 50% / 0 0 40% 40%; background: radial-gradient(circle at 55% 62%, var(--blush) 0 46%, transparent 46.5%); }

  .contact { grid-template-columns: 1fr; }
  .contact__intro { padding: 120px var(--pad) 50px; }
  .contact__form { padding: 50px var(--pad) 60px; }
  body[data-page="contact"] .header__end { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* "Dark mode" is the normal design: this rule tells Samsung Internet the site handles dark mode
   itself, so it doesn't invert the colours. Form controls and scrollbars stay light. */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
}
