/* gravi.dev, every page: Junked!'s plates of scrap metal, in a light and a dark mode that are both easy on the eyes.
   Plates as in Junked!'s MenuPlates.uss and JunkPlate.cs. The Messagyre and Welcomin! parts wear their apps' own rounded look instead (.theme-messagyre, .theme-welcomin). */

@font-face {
  font-family: "Utendo";
  src: url("/assets/fonts/Utendo-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Utendo";
  src: url("/assets/fonts/Utendo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Utendo";
  src: url("/assets/fonts/Utendo-Black.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

@view-transition {
  navigation: auto;
}

/* Registered so that a pointer over a plate fades its colour. */
@property --plate-fill {
  syntax: "<color>";
  inherits: true;
  initial-value: transparent;
}

:root {
  color-scheme: light dark;
  --mono: Consolas, "SF Mono", Menlo, "DejaVu Sans Mono", monospace;
  /* Clear of a notch when a phone is on its side. */
  --gutter: max(clamp(16px, 2.4vw, 36px), env(safe-area-inset-left), env(safe-area-inset-right));
  --pad: max(24px, env(safe-area-inset-left), env(safe-area-inset-right));
  /* The top bar's height, with the part under a notch or a Dynamic Island. */
  --bar: calc(48px + env(safe-area-inset-top));
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --rivet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Ccircle cx='4.5' cy='4.5' r='3.6' fill='%23060e11'/%3E%3Ccircle cx='4.5' cy='4.5' r='2.2' fill='%238c9ea6'/%3E%3Ccircle cx='3.8' cy='3.8' r='.9' fill='%23fff' fill-opacity='.7'/%3E%3C/svg%3E");
}

:root[data-now="light"] {
  color-scheme: light;
  --prop-shadow: 0.2;
}

:root[data-now="dark"] {
  color-scheme: dark;
  --prop-shadow: 0.45;
}

/* The colours, on body too so that a section can redefine them for what is inside it.
   gravi.dev itself: quiet greys, ink and the blue of the cube's sides. */
body {
  --bg: light-dark(#f6f7f9, #0b1116);
  --burst: transparent;
  --glow: light-dark(rgba(34, 81, 209, 0.07), rgba(91, 140, 255, 0.09));
  --fg: light-dark(#111827, #e8edf2);
  --soft: light-dark(rgba(17, 24, 39, 0.78), rgba(232, 237, 242, 0.8));
  --quiet: light-dark(rgba(17, 24, 39, 0.62), rgba(232, 237, 242, 0.62));
  --line: light-dark(rgba(17, 24, 39, 0.11), rgba(255, 255, 255, 0.1));
  --glass: light-dark(#fff, #121a21);
  --solid: light-dark(#fff, #121a21);
  --lip: transparent;
  --outline: light-dark(rgba(17, 24, 39, 0.16), rgba(255, 255, 255, 0.14));
  --edge: transparent;
  --sheen: transparent;
  --btn: light-dark(#fff, #18222b);
  --btn-hover: light-dark(#f1f3f6, #1f2b35);
  --btn-down: light-dark(#e8ebef, #141d24);
  --btn-lip: transparent;
  --slot: light-dark(rgba(17, 24, 39, 0.05), rgba(255, 255, 255, 0.06));
  --accent: light-dark(#2251d1, #6b96ff);
  --accent-hover: light-dark(#1b45b8, #86a9ff);
  --accent-down: light-dark(#173a9b, #5582f0);
  --accent-lip: transparent;
  --on-accent: light-dark(#fff, #0b1116);
  --accent-text: light-dark(#1f4fd1, #8fb0ff);
  --accent-soft: light-dark(rgba(34, 81, 209, 0.08), rgba(107, 150, 255, 0.12));
  --shadow: light-dark(rgba(17, 24, 39, 0.08), rgba(0, 0, 0, 0.3));
  --elev: 0 1px 2px light-dark(rgba(17, 24, 39, 0.04), rgba(0, 0, 0, 0.2)), 0 8px 24px light-dark(rgba(17, 24, 39, 0.05), rgba(0, 0, 0, 0.18));
}

/* Junked!: the game's plates of scrap metal, and its yellow. */
.theme-junked,
.theme-messagyre {
  --bg: light-dark(#eceee8, #0d1c22);
  --burst: light-dark(rgba(21, 37, 44, 0.018), rgba(255, 255, 255, 0.018));
  --glow: light-dark(rgba(255, 255, 255, 0.8), rgba(40, 92, 108, 0.36));
  --fg: light-dark(#15252c, #e9edef);
  --soft: light-dark(rgba(21, 37, 44, 0.82), rgba(233, 237, 239, 0.8));
  --quiet: light-dark(rgba(21, 37, 44, 0.68), rgba(233, 237, 239, 0.64));
  --line: light-dark(rgba(21, 37, 44, 0.16), rgba(255, 255, 255, 0.14));
  --glass: light-dark(rgba(255, 255, 255, 0.76), rgba(20, 44, 52, 0.66));
  --solid: light-dark(#fbfbf8, #152d36);
  --lip: light-dark(#bfc7c4, #0a181d);
  --outline: light-dark(#1b2c33, #060e11);
  --edge: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.12));
  --sheen: light-dark(rgba(21, 37, 44, 0.025), rgba(255, 255, 255, 0.04));
  --btn: light-dark(#dfe4e1, #2e4c58);
  --btn-hover: light-dark(#cdd6d2, #3e6472);
  --btn-down: light-dark(#c2ccc7, #223841);
  --btn-lip: light-dark(#a8b2ae, #142228);
  --slot: light-dark(rgba(21, 37, 44, 0.07), rgba(4, 10, 13, 0.5));
  --accent: light-dark(#ffc000, #f2bb14);
  --accent-hover: light-dark(#ffcf33, #ffcc33);
  --accent-down: light-dark(#ecb000, #d9a500);
  --accent-lip: light-dark(#b98100, #9c6c00);
  --on-accent: #281a00;
  --accent-text: light-dark(#7a5800, #f2bb14);
  --shadow: light-dark(rgba(21, 37, 44, 0.16), rgba(0, 0, 0, 0.3));
}

/* Messagyre: the colours in the app's AppColors. */
.theme-messagyre {
  --bg: light-dark(#f2f2f7, #101922);
  --glow: light-dark(rgba(171, 12, 179, 0.06), rgba(171, 12, 179, 0.16));
  --burst: transparent;
  --fg: light-dark(#1c1c1e, #e5e5ea);
  --soft: light-dark(rgba(60, 60, 67, 0.92), rgba(229, 229, 234, 0.8));
  --quiet: light-dark(rgba(60, 60, 67, 0.74), rgba(229, 229, 234, 0.64));
  --line: light-dark(rgba(0, 0, 0, 0.12), rgba(255, 255, 255, 0.14));
  --glass: light-dark(rgba(255, 255, 255, 0.86), rgba(24, 31, 48, 0.88));
  --solid: light-dark(#fff, #181f30);
  --btn: light-dark(#e8e8ed, #202936);
  --btn-hover: light-dark(#dfdfe4, #363d4e);
  --btn-down: light-dark(#d0d0d6, #181f30);
  --slot: light-dark(#e8e8ed, #202936);
  --accent: #ab0cb3;
  --accent-hover: #bd1dc5;
  --accent-down: #900a97;
  --accent-lip: #5f0464;
  --on-accent: #fff;
  --accent-text: light-dark(#8f0a96, #e08ee6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Junked! keeps the game's lettering. */
.theme-junked {
  font-family: "Utendo", "Trebuchet MS", Verdana, sans-serif;
  line-height: 1.5;
}

/* The light of the cube's hit may reach past the edge of the screen: never a sideways scroll for it. */
body > main {
  flex: 1 0 auto;
  overflow-x: clip;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}

.dark-only {
  display: none;
}

:root[data-now="dark"] .dark-only {
  display: block;
}

:root[data-now="dark"] .light-only {
  display: none;
}

/* ---------- Backdrop ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 20%, var(--glow), transparent 70%),
    repeating-conic-gradient(from 0deg at 50% 20%, var(--burst) 0deg 7.5deg, transparent 7.5deg 15deg),
    var(--bg);
}

/* A scene from the game, washed out behind the windows. */
.backdrop--scene {
  background: url("/assets/img/map-lounge.jpg?v=2") center / cover no-repeat var(--bg);
}

.backdrop--scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: light-dark(rgba(236, 238, 232, 0.86), rgba(8, 18, 23, 0.76));
}

/* The chat wallpaper of the app, as faint line art. */
.backdrop--doodle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-text);
  opacity: 0.09;
  -webkit-mask: url("/assets/messagyre/doodle.webp") 0 0 / 640px auto;
  mask: url("/assets/messagyre/doodle.webp") 0 0 / 640px auto;
}

/* ---------- Plates ---------- */

.card,
.button,
.mode,
.menu-button,
.tagline,
.icon-tile,
.shot,
.tally {
  --plate-fill: var(--solid);
  --plate-lip: var(--lip);
  --plate-edge: var(--edge);
  --plate-sheen: var(--sheen);
  --plate-stripes: none;
  --plate-lip-size: 5px;
  --plate-line: 2.5px;
  --plate-cut-tl: 0px;
  --plate-cut-tr: 0px;
  --plate-cut-br: 0px;
  --plate-cut-bl: 0px;
  --plate-rivet-tl: none;
  --plate-rivet-tr: none;
  --plate-rivet-br: none;
  --plate-rivet-bl: none;
  position: relative;
  isolation: isolate;
  transition: --plate-fill 160ms;
}

/* Every surface: a plain face with a hairline edge. */
.card::before,
.button::before,
.mode::before,
.menu-button::before,
.tagline::before,
.icon-tile::before,
.shot::before,
.tally::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--plate-fill);
  border: 1px solid var(--plate-border, var(--line));
  border-radius: var(--r, 12px);
  box-shadow: var(--plate-shadow, none);
}

.card::after,
.button::after,
.mode::after,
.menu-button::after,
.tagline::after,
.icon-tile::after,
.shot::after,
.tally::after {
  content: none;
}

.theme-junked .card::after,
.theme-junked .button::after,
.theme-junked .mode::after,
.theme-junked .menu-button::after,
.theme-junked .tagline::after,
.theme-junked .icon-tile::after,
.theme-junked .shot::after,
.theme-junked .tally::after {
  content: "";
}

/* The face, the lip and the outline are layers of one shape cut at the corners: a gradient across the square of a cut
   runs exactly along its diagonal, so the lip can follow the cuts without showing through a see-through face. */
.theme-junked .card::before,
.theme-junked .button::before,
.theme-junked .mode::before,
.theme-junked .menu-button::before,
.theme-junked .tagline::before,
.theme-junked .icon-tile::before,
.theme-junked .shot::before,
.theme-junked .tally::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  clip-path: polygon(
    var(--plate-cut-tl) 0,
    calc(100% - var(--plate-cut-tr)) 0,
    100% var(--plate-cut-tr),
    100% calc(100% - var(--plate-cut-br)),
    calc(100% - var(--plate-cut-br)) 100%,
    var(--plate-cut-bl) 100%,
    0 calc(100% - var(--plate-cut-bl)),
    0 var(--plate-cut-tl)
  );
  background:
    /* Rivets, only in corners that are not cut. */
    var(--plate-rivet-tl) left 2.5px top 2.5px / 9px 9px no-repeat,
    var(--plate-rivet-tr) right 2.5px top 2.5px / 9px 9px no-repeat,
    var(--plate-rivet-br) right 2.5px bottom calc(var(--plate-lip-size) + 1.5px) / 9px 9px no-repeat,
    var(--plate-rivet-bl) left 2.5px bottom calc(var(--plate-lip-size) + 1.5px) / 9px 9px no-repeat,
    /* Light catching the top edge. */
    linear-gradient(var(--plate-edge), var(--plate-edge)) calc(var(--plate-cut-tl) + 3px) 2.5px /
      calc(100% - var(--plate-cut-tl) - var(--plate-cut-tr) - 6px) 1.5px no-repeat,
    /* The outline: the four sides, then the four cuts. */
    linear-gradient(var(--outline), var(--outline)) top / 100% var(--plate-line) no-repeat,
    linear-gradient(var(--outline), var(--outline)) bottom / 100% var(--plate-line) no-repeat,
    linear-gradient(var(--outline), var(--outline)) left / var(--plate-line) 100% no-repeat,
    linear-gradient(var(--outline), var(--outline)) right / var(--plate-line) 100% no-repeat,
    linear-gradient(315deg, transparent calc(50% - var(--plate-line) - 0.4px), var(--outline) calc(50% - var(--plate-line))) left top /
      var(--plate-cut-tl) var(--plate-cut-tl) no-repeat,
    linear-gradient(45deg, transparent calc(50% - var(--plate-line) - 0.4px), var(--outline) calc(50% - var(--plate-line))) right top /
      var(--plate-cut-tr) var(--plate-cut-tr) no-repeat,
    linear-gradient(135deg, transparent calc(50% - var(--plate-line) - 0.4px), var(--outline) calc(50% - var(--plate-line))) right bottom /
      var(--plate-cut-br) var(--plate-cut-br) no-repeat,
    linear-gradient(225deg, transparent calc(50% - var(--plate-line) - 0.4px), var(--outline) calc(50% - var(--plate-line))) left bottom /
      var(--plate-cut-bl) var(--plate-cut-bl) no-repeat,
    /* The lip: along the bottom and up each cut. */
    linear-gradient(135deg, transparent calc(50% - 0.4px), var(--plate-lip) 50%) right bottom /
      calc(var(--plate-cut-br) + var(--plate-lip-size)) calc(var(--plate-cut-br) + var(--plate-lip-size)) no-repeat,
    linear-gradient(225deg, transparent calc(50% - 0.4px), var(--plate-lip) 50%) left bottom /
      calc(var(--plate-cut-bl) + var(--plate-lip-size)) calc(var(--plate-cut-bl) + var(--plate-lip-size)) no-repeat,
    linear-gradient(var(--plate-lip), var(--plate-lip)) bottom / 100% var(--plate-lip-size) no-repeat,
    /* A broad diagonal sheen across the left of the face. */
    linear-gradient(105deg, var(--plate-sheen) min(42%, 150px), transparent 0) top left / 100% calc(100% - var(--plate-lip-size)) no-repeat,
    var(--plate-stripes) top left / 100% calc(100% - var(--plate-lip-size)) no-repeat,
    var(--plate-fill);
}

/* The shadow: a band below the plate and not a shape under it, so a frosted face does not show it. */
.theme-junked .card::after,
.theme-junked .button::after,
.theme-junked .mode::after,
.theme-junked .menu-button::after,
.theme-junked .tagline::after,
.theme-junked .icon-tile::after,
.theme-junked .shot::after,
.theme-junked .tally::after {
  content: "";
  position: absolute;
  inset: 0 0 -4px;
  z-index: -1;
  pointer-events: none;
  background: var(--shadow);
  clip-path: polygon(
    0 calc(100% - 4px - var(--plate-cut-bl)),
    var(--plate-cut-bl) calc(100% - 4px),
    calc(100% - var(--plate-cut-br)) calc(100% - 4px),
    100% calc(100% - 4px - var(--plate-cut-br)),
    100% calc(100% - var(--plate-cut-br)),
    calc(100% - var(--plate-cut-br)) 100%,
    var(--plate-cut-bl) 100%,
    0 calc(100% - var(--plate-cut-bl))
  );
}

/* Windows, which cannot be clicked, are frosted. */
.theme-junked .card::before {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* ---------- Top bar ---------- */

/* A frosted bar with a hairline under it. Its ::before reaches above the screen, under a phone's status bar. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  isolation: isolate;
  padding-top: env(safe-area-inset-top);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: -80px 0 0;
  z-index: -1;
  pointer-events: none;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}

.site-header .wrap {
  max-width: 1160px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}

/* Without JavaScript nothing measures the bar: the links go to a second line when they do not fit. */
html:not(.js) .site-header .wrap {
  flex-wrap: wrap;
  padding-block: 6px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  color: var(--fg);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand img {
  flex: none;
  width: 30px;
  height: 30px;
}

.brand:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
}

.nav a {
  padding: 7px 12px;
  color: var(--soft);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    color 120ms,
    background-color 120ms;
}

.nav a:hover {
  color: var(--fg);
  background: var(--slot);
  text-decoration: none;
}

.nav a[aria-current="page"],
.nav a[aria-current="page"]:hover {
  color: var(--accent-text);
  background: var(--accent-soft, var(--slot));
}

.bar-tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}

.mode,
.menu-button {
  --plate-fill: var(--btn);
  --r: 10px;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--fg);
  background: none;
  border: 0;
  cursor: pointer;
}

.mode:hover,
.menu-button:hover {
  --plate-fill: var(--btn-hover);
}

.mode svg,
.menu-button svg {
  display: block;
}

.mode .moon,
:root[data-now="dark"] .mode .sun {
  display: none;
}

:root[data-now="dark"] .mode .moon {
  display: block;
}

html:not(.js) .mode,
html:not(.js) .menu-button {
  display: none;
}

/* The menu button: a face like the other two, only there when the links do not fit. */
.menu-button {
  display: none;
}

.menu-button .close,
.menu-button[aria-expanded="true"] .open {
  display: none;
}

.menu-button[aria-expanded="true"] .close {
  display: block;
}

/* Compact: set by gravi.js whenever brand, links and buttons would not fit on one line, whatever the cause (a narrow
   screen, a long translation, large text). The links then live in a panel under the bar. */
.site-header.compact .menu-button {
  display: grid;
}

.site-header.compact .nav {
  position: absolute;
  top: 100%;
  right: var(--pad);
  left: var(--pad);
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  max-height: calc(100dvh - var(--bar) - 24px);
  margin-top: 8px;
  padding: 8px;
  overflow-y: auto;
  background: var(--solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px var(--shadow);
}

.site-header.compact .nav.open {
  display: flex;
}

.site-header.compact .nav a {
  padding: 12px 14px;
  font-size: 17px;
}

/* Even the name does not fit beside the buttons: the cube alone stands for it (the text stays for screen readers). */
.site-header.tight .brand span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Languages ---------- */

/* Until the page is translated, or the visitor would read a flash of English. */
html.i18n-wait body {
  visibility: hidden;
}

.lang-box {
  position: relative;
  display: flex;
  flex: none;
}

.lang-menu {
  --plate-fill: var(--solid);
  --plate-cut-br: 10px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1;
  width: max-content;
  min-width: 190px;
  max-height: calc(100dvh - var(--bar) - 16px);
  margin: 0;
  padding: 8px 8px 13px;
  overflow-y: auto;
  list-style: none;
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu button {
  display: block;
  width: 100%;
  padding: 7px 10px 6px;
  color: var(--fg);
  background: none;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.lang-menu button:hover {
  background: var(--slot);
}

.lang-menu button[aria-current] {
  color: var(--on-accent);
  background: var(--accent);
}

/* Manrope has no Japanese, Korean or Chinese: it stays first for the names, each script then gets its system's own face. */
body:lang(ru),
.lang-menu button:lang(ru) {
  font-family: "Manrope", "Segoe UI", -apple-system, Roboto, "Noto Sans", Arial, sans-serif;
}

body:lang(ja),
.lang-menu button:lang(ja) {
  font-family: "Manrope", "Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans CJK JP", "Noto Sans JP", sans-serif;
}

body:lang(ko),
.lang-menu button:lang(ko) {
  font-family: "Manrope", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", sans-serif;
  word-break: keep-all;
}

body:lang(zh-Hans),
.lang-menu button:lang(zh-Hans) {
  font-family: "Manrope", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
}

/* ---------- Layout and type ---------- */

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

main > .wrap {
  padding-top: 56px;
  padding-bottom: 72px;
}

section + section,
.hero + .wrap > section:first-child {
  margin-top: 72px;
}

.hero + .wrap {
  padding-top: 0;
}

.hero + .wrap > section:first-child {
  margin-top: 24px;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 800;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(25px, 2.8vw, 32px);
  font-weight: 800;
}

h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.theme-junked h1,
.theme-junked h2,
.theme-junked h3 {
  letter-spacing: 0;
}

.theme-junked h1,
.theme-junked h2 {
  font-weight: 900;
}

section > h2 {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.theme-junked section > h2 {
  padding-bottom: 8px;
  border-bottom-width: 2px;
}

.theme-junked .kicker,
.theme-junked .meta,
.theme-junked .chip,
.theme-junked .facts dt,
.hint,
.when {
  font-family: var(--mono);
}

/* A small label over a title. */
.kicker {
  margin-bottom: 8px;
  color: var(--accent-text);
  font-size: 14.5px;
  font-weight: 700;
}

/* The same, in spaced capitals, for a word or two. */
.eyebrow {
  margin-bottom: 10px;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lead {
  max-width: 640px;
  margin-top: 16px;
  color: var(--soft);
  font-size: 19px;
  line-height: 1.5;
  text-wrap: pretty;
}

.prose {
  max-width: 720px;
  color: var(--soft);
  line-height: 1.6;
  text-wrap: pretty;
}

.prose + .prose {
  margin-top: 14px;
}

.prose strong {
  color: var(--fg);
  font-weight: 700;
}

.meta {
  margin-top: 4px;
  color: var(--quiet);
  font-size: 14.5px;
}

.note {
  margin-top: 14px;
  color: var(--quiet);
  font-size: 15px;
}

/* ---------- Buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  --plate-fill: var(--btn);
  --plate-lip: var(--btn-lip);
  --plate-cut-br: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  --r: 10px;
  gap: 10px;
  min-height: 46px;
  padding: 10px 20px;
  color: var(--fg);
  background: none;
  border: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition:
    --plate-fill 160ms,
    translate 140ms var(--ease),
    scale 120ms ease-out;
}

.button:hover {
  --plate-fill: var(--btn-hover);
  text-decoration: none;
  translate: 0 -1px;
}

.theme-junked .button {
  min-height: 48px;
  padding: 8px 22px 12px;
  font-size: 17px;
}

.theme-junked .button:hover {
  translate: 0 -2px;
}

.button:active {
  --plate-fill: var(--btn-down);
  scale: 0.97;
}

.button--primary {
  --plate-fill: var(--accent);
  --plate-lip: var(--accent-lip);
  --plate-edge: rgba(255, 255, 255, 0.5);
  --plate-lip-size: 7px;
  --plate-cut-tl: 12px;
  --plate-cut-br: 12px;
  --plate-stripes: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.12) 0 28px, transparent 28px 56px);
  --plate-border: transparent;
  color: var(--on-accent);
}

.theme-junked .button--primary {
  min-height: 56px;
  padding-bottom: 15px;
  font-size: 18px;
  font-weight: 900;
}

.button--primary:hover {
  --plate-fill: var(--accent-hover);
}

.button--primary:active {
  --plate-fill: var(--accent-down);
}

/* ---------- Windows ---------- */

.card {
  --plate-fill: var(--glass);
  --plate-cut-br: 16px;
  --plate-cut-bl: 16px;
  --plate-rivet-tl: var(--rivet);
  --plate-rivet-tr: var(--rivet);
  --plate-shadow: var(--elev);
  --r: 16px;
  padding: 24px;
}

.theme-junked .card {
  padding: 22px 22px 28px;
}

.card > h2 {
  margin-bottom: 18px;
  font-size: 23px;
}

.card p {
  color: var(--soft);
}

.card h3 + p {
  margin-top: 8px;
}

.card .kicker {
  color: var(--accent-text);
}

.card .meta {
  color: var(--quiet);
}

/* A window that opens something: says so with a button at its foot, the only windows with one, and lifts as a whole. */
a.card {
  display: flex;
  flex-direction: column;
  color: inherit;
  transition:
    --plate-fill 160ms,
    translate 260ms var(--ease);
}

a.card:hover {
  --plate-border: var(--outline);
  text-decoration: none;
  translate: 0 -3px;
}

.card .go {
  align-self: flex-start;
  margin-top: auto;
}

a.card > p:last-of-type {
  margin-bottom: 18px;
}

a.card:hover .go {
  --plate-fill: var(--accent-hover);
}

.arrow {
  flex: none;
  transition: translate 200ms var(--ease);
}

a:hover > .arrow,
a:hover > .go > .arrow,
a:hover > .media-go > .arrow {
  translate: 3px 0;
}

/* A picture that opens the project, with the tape that says it: always there, as a phone has no hover. */
.media-link {
  display: block;
  position: relative;
  color: inherit;
}

.media-link:hover {
  text-decoration: none;
}

.media-go {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  color: var(--fg);
  background: color-mix(in srgb, var(--solid) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 4px 14px var(--shadow);
  font-size: 14px;
  font-weight: 700;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: scale 160ms var(--ease);
}

.media-link:hover .media-go {
  scale: 1.04;
}

.phones.media-link {
  display: flex;
}

.phones .media-go {
  left: 50%;
  bottom: 0;
  translate: -50% 0;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* A window's cut faces the middle of the screen. */
.grid--2 > :nth-child(odd),
.grid--3 > :nth-child(3n + 1) {
  --plate-cut-bl: 0px;
  --plate-rivet-bl: var(--rivet);
}

.grid--2 > :nth-child(even),
.grid--3 > :nth-child(3n) {
  --plate-cut-br: 0px;
  --plate-rivet-br: var(--rivet);
}

.callout {
  --plate-lip: var(--accent);
  --plate-lip-size: 6px;
  --plate-cut-br: 20px;
  --plate-cut-bl: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 28px 28px 36px;
}

.callout .actions {
  margin-top: 0;
}

.callout h2 {
  margin: 0;
}

/* ---------- Small parts ---------- */

/* A slot recessed into the plate. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 12px;
  color: var(--soft);
  background: var(--slot);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.theme-junked .chip {
  padding: 2px 10px;
  border-radius: 3px;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.1);
  font-weight: 500;
}

.card .chips {
  margin-top: 16px;
}

/* Tape: a small label is not a plate. */
.badge {
  display: inline-block;
  padding: 2px 8px 1px;
  color: var(--on-accent);
  background: var(--accent);
  border: 2px solid var(--outline);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  rotate: -2deg;
}

.tagline {
  --plate-lip: var(--accent);
  --plate-cut-br: 10px;
  display: inline-block;
  padding: 8px 18px 13px;
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.tagline em {
  color: var(--accent-text);
  font-style: normal;
}

.icon-tile {
  --plate-fill: var(--accent);
  --plate-lip: var(--accent-lip);
  --plate-edge: rgba(255, 255, 255, 0.5);
  --plate-lip-size: 4px;
  --plate-cut-br: 8px;
  --plate-line: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 48px;
  margin-bottom: 14px;
  padding-bottom: 4px;
  color: var(--on-accent);
}

/* A picture framed by a plate, with its corner cut along. */
.shot {
  --plate-lip: var(--accent);
  --plate-lip-size: 6px;
  --plate-cut-br: 22px;
  --plate-rivet-tl: var(--rivet);
  --plate-rivet-tr: var(--rivet);
  padding: 3px 3px 7px;
}

.shot {
  --r: 14px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
}

.shot img,
.shot video {
  display: block;
  width: 100%;
  height: auto;
}

.theme-junked .shot {
  padding: 3px 3px 7px;
  overflow: visible;
  border-radius: 0;
}

.theme-junked .shot img,
.theme-junked .shot video {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--plate-cut-br)), calc(100% - var(--plate-cut-br)) 100%, 0 100%);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  --plate-rivet-tl: none;
  --plate-rivet-tr: none;
  padding: 0 0 8px;
}

.facts > div {
  padding: 18px 20px;
}

.facts > div + div {
  border-left: 2px solid var(--line);
}

.facts dt {
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 700;
}

.facts dd {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.maps .card {
  padding: 3px 3px 8px;
}

.maps img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.maps figcaption {
  padding: 12px 15px;
}

.maps figcaption p {
  margin-top: 4px;
  font-size: 15px;
}

/* ---------- The hero of every page with things to throw ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Up behind the bar: what falls is seen going out of focus through it, not cut off along its lower edge. */
  margin-top: calc(var(--bar) * -1);
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--bar) var(--gutter) clamp(20px, 2.8vw, 36px);
  overflow: clip;
  touch-action: pan-y;
}

/* ---------- The home page's opening ---------- */

/* Name, what I do and how to reach me, all there from the first frame; the cube beside it (above it on a phone). */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "text cube";
  align-items: center;
  gap: 24px clamp(32px, 6vw, 96px);
  padding-block: clamp(40px, 9vh, 112px) clamp(32px, 6vh, 72px);
}

.intro-text {
  grid-area: text;
  min-width: 0;
}

.intro h1 {
  font-size: clamp(42px, 6.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.intro .role {
  margin-top: 14px;
  color: var(--fg);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.intro .lead {
  margin-top: 18px;
  max-width: 34em;
}

.intro .actions {
  margin-top: 28px;
}

.intro .socials {
  margin-top: 28px;
}

/* The cube: the still logo, and over it the video of it solving itself when the browser can play it (cube.js). */
.intro-cube {
  --mark: clamp(200px, 26vw, 300px);
  grid-area: cube;
  position: relative;
  z-index: 0;
  display: block;
  width: calc(var(--mark) * 0.984);
  height: var(--mark);
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: default;
}

.intro-cube img {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 450ms;
}

/* The video's frame is wider than the cube, to hold the light of the hit: the cube fills 45% of it. */
.intro-cube canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--mark) / 0.45);
  height: calc(var(--mark) / 0.45);
  translate: -50% -50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 450ms;
}

/* Kept on screen (a hidden video is not played on an iPhone), but not seen. */
.intro-cube video {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.01;
  pointer-events: none;
}

.intro-cube.playing canvas {
  opacity: 1;
  transition: none;
}

.intro-cube.playing img,
.intro-cube.waiting img {
  opacity: 0;
  transition: none;
}

.intro-cube.replayable {
  cursor: pointer;
}

/* Whatever happens to the script, the logo turns up. */
html.js .intro-cube.waiting img {
  animation: logo-safety 1ms 1.6s forwards;
}

@keyframes logo-safety {
  to {
    opacity: 1;
  }
}

/* Profiles: an icon and the handle, as a row of small buttons. */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 14px 7px 11px;
  color: var(--fg);
  background: var(--btn);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  transition:
    background-color 140ms,
    border-color 140ms;
}

.socials a:hover {
  background: var(--btn-hover);
  border-color: var(--outline);
  text-decoration: none;
}

.socials svg {
  flex: none;
  width: 18px;
  height: 18px;
}

/* Icons only, where the names would take too much room. */
.socials--icons a {
  justify-content: center;
  width: 40px;
  padding: 0;
}

/* Contacts on the home page: a list of profiles with what each one is for. */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.contact-grid a {
  --plate-fill: var(--solid);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px;
  color: var(--fg);
}

.contact-grid a:hover {
  --plate-border: var(--outline);
  text-decoration: none;
}

.contact-grid .ico {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 12px;
}

.contact-grid .ico svg {
  width: 21px;
  height: 21px;
}

.contact-grid b {
  display: block;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.3;
}

.contact-grid small {
  display: block;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.35;
}

.section-lead {
  max-width: 40em;
  margin: -6px 0 22px;
  color: var(--soft);
  text-wrap: pretty;
}

/* Home page projects: a card with a picture on top. */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project {
  --r: 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  color: inherit;
  border-radius: 18px;
}

a.project:hover {
  text-decoration: none;
}

.project-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slot);
  border-bottom: 1px solid var(--line);
}

.project-media > img,
.project-media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 500ms var(--ease);
}

a.project:hover .project-media > img,
a.project:hover .project-media > video {
  scale: 1.03;
}

.project-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 20px 22px 22px;
}

.project-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.project-head img {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 22%;
}

.project-head h3 {
  font-size: 21px;
}

.project-head .meta {
  margin-top: 1px;
}

.project-body > p {
  color: var(--soft);
}

.project .more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--accent-text);
  font-weight: 700;
}

/* Phone screenshots inside a project picture, on the colour of the app. */
.project-media--phones {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4%;
  padding-top: 7%;
  background: var(--tint-bg, var(--slot));
}

.project-media--phones img {
  width: 34%;
  height: auto;
  border: 5px solid #16181b;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  object-fit: initial;
}

.project-media--phones img + img {
  margin-top: 9%;
}

/* A browser window around a screenshot of a website. */
.browser {
  overflow: hidden;
  background: var(--solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--elev);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: var(--slot);
  border-bottom: 1px solid var(--line);
}

.browser-bar i {
  width: 9px;
  height: 9px;
  background: var(--outline);
  border-radius: 50%;
}

.browser-bar span {
  flex: 1 1 auto;
  max-width: 260px;
  margin-left: 10px;
  padding: 2px 10px;
  overflow: hidden;
  color: var(--quiet);
  background: var(--solid);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser img {
  width: 100%;
}

.project-media--site {
  padding: 7% 7% 0;
  background: var(--tint-bg, var(--slot));
}

.project-media--site .browser {
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.project-media--site img {
  height: auto;
  object-fit: initial;
}

/* Smaller things built along the way: a plain list. */
.minor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.minor .card {
  padding: 18px 20px;
}

.minor h3 {
  font-size: 18px;
}

.tools {
  margin-top: 20px;
}

/* The shadow is on the whole title and not on its letters: a knocked letter turns, its shadow stays below it. */
.name {
  position: relative;
  color: var(--fg);
  font-size: clamp(44px, 8vw, 92px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  filter: drop-shadow(0 0.035em 0 var(--lip));
}

.name .line + .line {
  margin-left: 0.24em;
}

.ch {
  display: inline-block;
  transform-origin: 50% 50%;
  will-change: transform;
}

/* The game's logo: yellow letters, blue bang, a dark outline in both modes. */
.title-junked {
  color: #ffc000;
  letter-spacing: 0.01em;
  -webkit-text-stroke: 0.05em #0a181d;
  paint-order: stroke fill;
  filter: drop-shadow(0 0.035em 0 #0a181d);
}

.title-junked .ch:last-child {
  color: #2896ff;
}

/* Letters drop in on load, one after the other. */
.dropping .ch {
  animation: drop 720ms cubic-bezier(0.3, 0, 0.25, 1) both;
  animation-delay: calc(var(--i) * 34ms);
}

@keyframes drop {
  0% {
    translate: 0 -130vh;
    rotate: calc(var(--r) * 1deg);
  }
  68% {
    translate: 0 0;
    rotate: 0deg;
  }
  82% {
    translate: 0 -0.035em;
  }
  100% {
    translate: 0 0;
  }
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-top: clamp(14px, 2vw, 26px);
}

.hero-foot .lead {
  margin-top: 0;
  max-width: 44em;
}

.hero-foot .tagline + .lead {
  margin-top: 14px;
}

.hero-foot .actions {
  margin-top: 0;
  justify-content: flex-end;
}

.hint {
  max-width: 24em;
  color: var(--quiet);
  font-size: 14.5px;
  line-height: 1.3;
  text-align: right;
  transition: opacity 400ms;
}

.hint.gone,
html:not(.js) .hint {
  opacity: 0;
}

.prop {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  user-select: none;
  -webkit-user-drag: none;
  cursor: grab;
  touch-action: none;
  will-change: transform;
}

.prop:active {
  cursor: grabbing;
}

/* A black copy of a prop, kept straight below it by throw.js: a drop-shadow on the prop would turn with it. */
.prop-shadow {
  z-index: 2;
  cursor: default;
  pointer-events: none;
  filter: brightness(0) opacity(var(--prop-shadow));
}

.put-back {
  position: absolute;
  z-index: 4;
  right: var(--gutter);
  top: calc(var(--bar) + 14px);
  min-height: 42px;
  padding: 6px 16px 10px;
  font-size: 15px;
  translate: 0 -200px;
}

.put-back.show,
.put-back.show:hover {
  translate: 0 0;
}

/* What a hit says, on the Junked! page. */
.burst {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  color: #281a00;
  background: #ffc000;
  clip-path: polygon(50% 0, 60% 22%, 82% 8%, 76% 32%, 100% 36%, 80% 52%, 96% 74%, 70% 72%, 66% 98%, 50% 78%, 30% 96%, 30% 72%, 4% 76%, 20% 52%, 0 34%, 24% 32%, 18% 8%, 40% 22%);
  font-size: 23px;
  font-weight: 900;
  pointer-events: none;
  rotate: var(--r);
  animation: burst 620ms var(--ease) both;
}

@keyframes burst {
  from {
    scale: 0.2;
    opacity: 1;
  }
  55% {
    scale: 1;
    opacity: 1;
  }
  to {
    scale: 1.14;
    opacity: 0;
  }
}

/* The score kept by a page's throws. */
.tally {
  --plate-cut-br: 12px;
  --plate-rivet-tl: var(--rivet);
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  top: calc(var(--bar) + 14px);
  padding: 8px 18px 13px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
}

.tally b {
  color: var(--accent-text);
  font-family: "Utendo", sans-serif;
  font-size: 24px;
  font-weight: 900;
}

.tally--ko {
  translate: 0 -200px;
  transition:
    --plate-fill 160ms,
    translate 300ms var(--ease);
}

.tally--ko.show {
  translate: 0 0;
}

/* ---------- Project rows on the home page ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px;
  align-items: center;
}

.feature > .card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature--flip {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.strip-window {
  overflow: clip;
  margin-top: 24px;
  margin-inline: calc((min(100vw, 1160px) - var(--pad) * 2 - 100vw) / 2);
}

.strip {
  display: flex;
  gap: 14px;
  width: max-content;
  padding-inline: var(--gutter);
  will-change: transform;
}

.strip figure {
  width: clamp(230px, 27vw, 400px);
  flex: none;
}

.strip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.strip figcaption {
  margin-top: 8px;
  color: var(--soft);
  font-size: 14.5px;
  font-weight: 600;
}

.ribbon {
  margin-top: 72px;
  margin-inline: calc((min(100vw, 1160px) - var(--pad) * 2 - 100vw) / 2);
  padding: 10px 0 8px;
  overflow: hidden;
  background: var(--solid);
  border-block: 2.5px solid var(--outline);
  rotate: -0.8deg;
}

.ribbon-track {
  display: flex;
  width: max-content;
  animation: slide 46s linear infinite;
}

.ribbon:hover .ribbon-track {
  animation-play-state: paused;
}

.ribbon span {
  flex: none;
  padding-right: 0.5em;
  font-family: var(--mono);
  font-size: clamp(18px, 1.9vw, 24px);
  font-weight: 700;
  white-space: nowrap;
}

.ribbon span::after {
  content: " /";
  color: var(--accent-text);
}

@keyframes slide {
  to {
    translate: -50% 0;
  }
}

.mailto {
  display: inline-block;
  color: var(--fg);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.2;
}

.mailto:hover {
  color: var(--accent-text);
  text-decoration: none;
}

/* ---------- CV ---------- */

.cv-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-top: 40px;
  align-items: start;
}

.cv-layout section + section {
  margin-top: 24px;
}

.cv-side {
  display: grid;
  gap: 24px;
}

.cv-side > section + section {
  margin-top: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 22px 24px;
  border-left: 2px solid var(--line);
}

.timeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--solid);
  border: 3px solid var(--accent);
  border-radius: 50%;
}

.timeline h3 {
  font-size: 19px;
}

.timeline p + p {
  margin-top: 6px;
}

.langs {
  display: grid;
  gap: 13px;
}

.langs li {
  display: grid;
  gap: 6px;
}

.langs .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}

.langs .row span {
  color: var(--quiet);
  font-size: 14.5px;
  font-weight: 500;
}

.level {
  height: 8px;
  overflow: hidden;
  background: var(--slot);
  border-radius: 999px;
}

.level i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact-list li {
  display: grid;
  gap: 1px;
}

.contact-list span {
  color: var(--quiet);
  font-size: 14px;
}

.contact-list a {
  overflow-wrap: anywhere;
  font-weight: 700;
}

/* ---------- Messagyre: the app's rounded cards instead of plates ---------- */

.theme-messagyre .card,
.theme-messagyre .button,
.theme-messagyre .tally,
.theme-messagyre .shot {
  --plate-cut-br: 0px;
  --plate-cut-bl: 0px;
  --plate-cut-tl: 0px;
  --plate-rivet-tl: none;
  --plate-rivet-tr: none;
  --plate-rivet-br: none;
  --plate-rivet-bl: none;
}

.theme-messagyre .card::before,
.theme-messagyre .tally::before,
.theme-messagyre .shot::before {
  clip-path: none;
  background: var(--plate-fill);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.theme-messagyre .card::after,
.theme-messagyre .tally::after,
.theme-messagyre .shot::after,
.theme-messagyre .button::after {
  display: none;
}

.theme-messagyre .card {
  padding: 22px;
}

.theme-messagyre .button {
  padding: 8px 24px;
}

.theme-messagyre .button::before {
  clip-path: none;
  background: var(--plate-fill);
  border-radius: 999px;
}

.theme-messagyre .shot {
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
}

.theme-messagyre .shot img {
  clip-path: none;
}

.theme-messagyre .tally {
  padding: 8px 16px 8px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-messagyre .name {
  color: var(--accent-text);
  filter: none;
}

.theme-messagyre .name .ch {
  letter-spacing: -0.005em;
}

.slogan {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 900;
  line-height: 1.15;
}

.app-id {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-id img {
  width: 58px;
  height: 58px;
  border-radius: 22%;
}

/* The grade ring from the app. */
.ring {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: var(--size, 64px);
  height: var(--size, 64px);
  font-weight: 900;
  font-size: calc(var(--size, 64px) * 0.32);
}

.ring svg {
  position: absolute;
  inset: 0;
  rotate: -90deg;
}

.ring circle {
  fill: none;
  stroke-width: 9;
  stroke: var(--slot);
}

.ring b {
  font: inherit;
  color: inherit;
}

.ring circle + circle {
  stroke: var(--ring, #34c759);
  stroke-linecap: round;
  stroke-dasharray: var(--f) 100;
  transition:
    stroke-dasharray 500ms var(--ease),
    stroke 300ms;
}

html.js .rv:not(.in) .ring circle + circle {
  stroke-dasharray: 0 100;
}

.m-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 7vw, 96px);
  align-items: center;
}

.m-row--flip > :first-child {
  order: 2;
}

.m-row h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.m-row .widget {
  margin-top: 24px;
}

/* Everything on a phone is a share of its own width (--w), so a small one is the same phone, not a thicker one. */
.phones {
  container-type: inline-size;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.phone {
  --w: min(46cqw, 280px);
  position: relative;
  flex: none;
  width: var(--w);
  padding: calc(var(--w) * 0.03);
  background: #16181b;
  border-radius: calc(var(--w) * 0.153);
  box-shadow:
    0 0 0 calc(var(--w) * 0.0067) #41454b,
    0 calc(var(--w) * 0.073) calc(var(--w) * 0.147) var(--shadow);
  will-change: transform;
}

.phone::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--w) * 0.06);
  width: calc(var(--w) * 0.28);
  height: calc(var(--w) * 0.08);
  margin-left: calc(var(--w) * -0.14);
  background: #000;
  border-radius: calc(var(--w) * 0.047);
}

.phone > div {
  padding-top: calc(var(--w) * 0.14);
  overflow: hidden;
  background: var(--screen, #f2f2f7);
  border-radius: calc(var(--w) * 0.123);
}

.phone img {
  width: 100%;
}

.phones .phone + .phone {
  margin: calc(var(--w) * 0.157) 0 0 -8cqw;
}

/* Short of the full width: it tilts as it scrolls, and its corners must stay on a small screen. */
.phones--one .phone {
  --w: min(84cqw, 300px);
}

.branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.branch {
  padding: 12px 14px;
  background: var(--solid);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.branch div {
  display: flex;
  justify-content: space-between;
  font-weight: 900;
  font-size: 20px;
}

.branch span {
  font-weight: 700;
  font-size: 16px;
}

.branch i {
  display: block;
  height: 7px;
  margin-top: 8px;
  background: linear-gradient(var(--c), var(--c)) 0 0 / var(--f) 100% no-repeat var(--slot);
  border-radius: 4px;
  transition: background-size 900ms var(--ease) 120ms;
}

html.js .rv:not(.in) .branch i {
  background-size: 0 100%;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 12px;
  background: var(--solid);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.week div {
  padding: 8px 0 6px;
  text-align: center;
  background: var(--slot);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.2;
}

.week b {
  display: block;
  font-size: 18px;
}

.week .today {
  color: var(--accent-text);
  outline: 2px solid var(--accent-text);
  outline-offset: -2px;
}

.week i {
  display: block;
  width: 6px;
  height: 6px;
  margin: 4px auto 0;
  background: var(--c, transparent);
  border-radius: 50%;
}

.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  color: #fff;
  background: var(--c);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 900;
}

.todo {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.todo li {
  padding: 10px 14px;
  background: var(--solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
}

/* The mascot stands behind the card's bottom edge: his cut legs end there, and only that side is clipped. */
.callout--guy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "guy id actions";
  padding: 22px;
}

.guy-slot {
  grid-area: guy;
  align-self: end;
  width: 130px;
  margin-top: -70px;
  margin-bottom: -21px;
  clip-path: inset(-120px -120px 0 -120px);
}

.callout--guy .app-id {
  grid-area: id;
}

.callout--guy .actions {
  grid-area: actions;
}

/* 10px sink below the edge, so the wave never lifts the cut into view. */
.guy {
  display: block;
  width: 100%;
  margin-bottom: -10px;
  transform-origin: 50% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .guy {
    animation: wave 3.4s ease-in-out infinite;
  }

  @keyframes wave {
    50% {
      rotate: 2.5deg;
      translate: 0 -5px;
    }
  }
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, var(--solid));
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding-top: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  color: var(--quiet);
  font-size: 14.5px;
}

.foot-id {
  display: flex;
  align-items: center;
  gap: 10px;
}

.foot-id img {
  flex: none;
  width: 26px;
  height: 26px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.site-footer nav a {
  color: var(--soft);
  font-weight: 600;
}

.site-footer .socials a {
  color: var(--soft);
}

/* ---------- Motion ---------- */

html.js .rv {
  opacity: 0;
  translate: 0 26px;
  transition:
    opacity 620ms var(--ease) calc(var(--d, 0) * 70ms),
    translate 720ms var(--ease) calc(var(--d, 0) * 70ms);
}

html.js .rv.in {
  opacity: 1;
  translate: 0 0;
}

/* Changing the opacity of a window would cut its frost off from the scene: those only move. */
html.js .card.rv,
html.js .shot.rv {
  opacity: 1;
  translate: 0 46px;
  transition:
    --plate-fill 160ms,
    translate 680ms var(--ease) calc(var(--d, 0) * 80ms);
}

html.js .card.rv.in,
html.js .shot.rv.in {
  translate: 0 0;
}

/* After arriving a window reacts at once, whatever delay it came in with. */
html.js a.card.rv.in,
html.js a.shot.rv.in {
  transition:
    --plate-fill 160ms,
    translate 260ms var(--ease);
}

html.js a.card.rv.in:hover,
html.js a.shot.rv.in:hover {
  translate: 0 -6px;
}

/* The language bars fill as they reach the screen. */
html.js .rv .level i {
  transition: scale 1100ms var(--ease) calc(var(--n, 0) * 120ms + 150ms);
  transform-origin: 0 50%;
}

html.js .rv:not(.in) .level i {
  scale: 0 1;
}

/* The timeline's diamonds pop on one after the other. */
html.js .rv .timeline li::before {
  transition: scale 420ms cubic-bezier(0.3, 1.5, 0.5, 1) calc(var(--n, 0) * 110ms + 200ms);
}

html.js .rv:not(.in) .timeline li::before {
  scale: 0;
}

/* Big titles come up letter by letter out of a slot. */
.slot {
  display: inline-block;
  overflow: clip;
  overflow-clip-margin: 0.1em;
  vertical-align: top;
  padding-block: 0.06em 0.24em;
  margin-block: -0.06em -0.24em;
}

html.js .slot > .ch {
  translate: 0 130%;
  transition: translate 760ms var(--ease) calc(var(--i, 0) * 26ms);
}

html.js .in .slot > .ch,
html.js .slot.in > .ch {
  translate: 0 0;
}

::view-transition-old(root) {
  animation: none;
}

::view-transition-new(root) {
  animation: wipe 520ms cubic-bezier(0.7, 0, 0.2, 1) both;
}

@keyframes wipe {
  from {
    clip-path: inset(100% 0 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js .rv,
  html.js .card.rv,
  html.js .shot.rv,
  html.js .slot > .ch {
    opacity: 1;
    translate: none;
    transition: none;
  }

  html.js .rv:not(.in) .level i,
  html.js .rv:not(.in) .timeline li::before {
    scale: none;
  }

  html.js .rv:not(.in) .ring circle + circle {
    stroke-dasharray: var(--f) 100;
  }

  html.js .rv:not(.in) .branch i {
    background-size: var(--f) 100%;
  }

  .dropping .ch {
    animation: none;
  }

  .ribbon-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }

  ::view-transition-new(root) {
    animation: none;
  }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
  .cv-layout,
  .feature,
  .feature--flip,
  .m-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature--flip > :first-child {
    order: 2;
  }

  .m-row--flip > :first-child {
    order: 0;
  }

  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--3 > :nth-child(n) {
    --plate-cut-bl: 16px;
    --plate-cut-br: 16px;
    --plate-rivet-bl: none;
    --plate-rivet-br: none;
  }

  .grid--3 > :nth-child(odd) {
    --plate-cut-bl: 0px;
    --plate-rivet-bl: var(--rivet);
  }

  .grid--3 > :nth-child(even) {
    --plate-cut-br: 0px;
    --plate-rivet-br: var(--rivet);
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts > div:nth-child(3) {
    border-left: 0;
  }

  .facts > div:nth-child(n + 3) {
    border-top: 2px solid var(--line);
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --pad: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  }

  main > .wrap {
    padding-top: 36px;
  }

  section + section {
    margin-top: 56px;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid--2 > :nth-child(n),
  .grid--3 > :nth-child(n) {
    --plate-cut-bl: 16px;
    --plate-cut-br: 16px;
    --plate-rivet-bl: none;
    --plate-rivet-br: none;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "cube" "text";
    padding-top: 28px;
  }

  .intro-cube {
    --mark: 132px;
    justify-self: start;
  }

  .projects,
  .minor {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Title and buttons no longer fit on one line beside the mascot. */
@media (max-width: 1180px) {
  .callout--guy {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "guy id" "guy actions";
  }
}

@media (max-width: 520px) {
  .name .line {
    display: block;
  }

  .name .line + .line {
    margin-left: 0;
  }

  .hero-foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .hero-foot .actions {
    justify-content: flex-start;
  }

  .hint {
    position: absolute;
    top: calc(var(--bar) + 10px);
    left: var(--gutter);
    right: var(--gutter);
    max-width: none;
    text-align: left;
  }

  .tally,
  .put-back {
    top: calc(var(--bar) + 44px);
  }

  /* Its hint takes two or three lines. */
  .theme-messagyre .tally,
  .theme-messagyre .put-back {
    top: calc(var(--bar) + 72px);
  }

  .callout--guy {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "id" "actions" "guy";
  }

  .guy-slot {
    justify-self: center;
    margin-top: 0;
  }

  .actions .button {
    flex: 1 1 100%;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .intro .actions .button:not(.button--primary) {
    flex: 1 1 0;
  }

  .lead {
    font-size: 17px;
  }

  .phones--two .phone {
    margin-top: 0;
  }

  /* Two side by side use nearly the whole width here; they tilt, so not all of it. */
  .phones:not(.phones--one) .phone {
    --w: 50cqw;
  }
}

/* ---------- Print: the CV on one page ---------- */

@media print {
  @page {
    margin: 10mm 12mm;
  }

  :root[data-now] {
    color-scheme: light;
  }

  body {
    font-size: 9.6pt;
    line-height: 1.26;
    background: #fff;
    color: #000;
    --fg: #000;
    --soft: #222;
    --quiet: #444;
    --accent: #e0a800;
    --accent-down: #c99600;
    --accent-text: #000;
    --line: #bbb;
    --slot: #eee;
    --outline: #333;
  }

  .backdrop,
  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }

  main > .wrap {
    padding: 0;
    max-width: none;
  }

  h1 {
    font-size: 26pt;
  }

  .lead {
    margin-top: 3pt;
    font-size: 10pt;
    line-height: 1.25;
    max-width: none;
  }

  .card,
  html.js .card.rv {
    padding: 0;
    translate: none !important;
    break-inside: avoid;
  }

  .card::before,
  .card::after {
    display: none;
  }

  .card > h2 {
    margin-bottom: 4pt;
    padding-bottom: 1pt;
    font-size: 12pt;
    border-bottom: 1pt solid #000;
  }

  .cv-layout {
    grid-template-columns: minmax(0, 1fr) 55mm;
    gap: 7mm;
    margin-top: 8pt;
  }

  .cv-layout section + section {
    margin-top: 7pt;
  }

  .cv-side {
    gap: 7pt;
  }

  .timeline li {
    padding: 0 0 4.5pt 10pt;
    break-inside: avoid;
  }

  .timeline h3 {
    font-size: 10.2pt;
  }

  .timeline li::before {
    left: -5px;
    top: 3px;
    width: 8px;
    height: 8px;
    border-width: 1px;
    scale: 1 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .meta {
    margin-top: 0;
    font-size: 8.6pt;
  }

  .timeline p + p {
    margin-top: 1pt;
  }

  .level {
    height: 7px;
    border-width: 1px;
  }

  .level i,
  html.js .rv .level i {
    scale: 1 !important;
    transition: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .langs {
    gap: 4pt;
  }

  .langs li {
    gap: 1pt;
  }

  .langs .row span,
  .contact-list span {
    font-size: 8.6pt;
  }

  .chips {
    gap: 3pt;
  }

  .chip {
    min-height: 0;
    padding: 0 4pt;
    font-size: 8.4pt;
    color: #000;
    box-shadow: none;
    border: 0.5pt solid #999;
    background: none;
  }

  .contact-list {
    gap: 2pt;
  }

  .contact-list a {
    color: #000;
  }

  html.js .rv {
    opacity: 1 !important;
    translate: none !important;
    transition: none !important;
  }

  html.js .slot > .ch {
    translate: none !important;
    transition: none !important;
  }

  .slot {
    overflow: visible;
  }
}

/* ---------- Welcomin!: the app's paper, white cards and sea blue instead of plates ---------- */

/* The app's own fonts (SIL OFL, licences in /assets/fonts): Parisienne for the titles, Manrope inside the app's parts. */
@font-face {
  font-family: "Parisienne";
  src: url("/assets/fonts/Parisienne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

/* The colours in the app's AppColors. */
.theme-welcomin {
  --bg: light-dark(#f4f2ee, #0f1012);
  --glow: light-dark(rgba(31, 91, 122, 0.06), rgba(140, 198, 227, 0.08));
  --burst: transparent;
  --fg: light-dark(#151515, #f4f2ee);
  --soft: light-dark(rgba(21, 21, 21, 0.84), rgba(244, 242, 238, 0.82));
  --quiet: light-dark(#5e5b55, #b3afa8);
  --line: light-dark(#e4e0d8, #2c2d31);
  --glass: light-dark(rgba(255, 255, 255, 0.9), rgba(27, 28, 31, 0.9));
  --solid: light-dark(#fff, #1b1c1f);
  --btn: light-dark(#fff, #242529);
  --btn-hover: light-dark(#f6f4f0, #2c2d31);
  --btn-down: light-dark(#ece9e3, #1b1c1f);
  --slot: light-dark(#f6f4f0, #242529);
  --accent: light-dark(#151515, #f4f2ee);
  --accent-hover: light-dark(#2b2b2b, #fff);
  --accent-down: light-dark(#000, #e4e0d8);
  --accent-lip: light-dark(#000, #b3afa8);
  --on-accent: light-dark(#fff, #151515);
  --accent-text: light-dark(#1f5b7a, #8cc6e3);
  --sea: light-dark(#1f5b7a, #8cc6e3);
  --sea-soft: light-dark(#e3eef3, #1c2e38);
  --card-shadow: 0 1px 2px light-dark(rgba(0, 0, 0, 0.04), transparent), 0 8px 24px light-dark(rgba(0, 0, 0, 0.06), transparent);
  --screen: #f4f2ee;
}

/* The five tints of the app's icon badges, light and dark. */
.tint-sea {
  --tint: light-dark(#e3eef3, #1c2e38);
  --tint-on: light-dark(#1f5b7a, #8cc6e3);
}

.tint-sage {
  --tint: light-dark(#e2eee5, #1c2e22);
  --tint-on: light-dark(#3b6548, #a2d3b0);
}

.tint-terracotta {
  --tint: light-dark(#f7e6de, #3a231a);
  --tint-on: light-dark(#9a4428, #f0a98e);
}

.tint-ochre {
  --tint: light-dark(#f5ecd5, #33291a);
  --tint-on: light-dark(#7d5a10, #e6c47a);
}

.tint-plum {
  --tint: light-dark(#efe5f1, #2e2233);
  --tint-on: light-dark(#6a4174, #d3aedb);
}

.theme-welcomin .card,
.theme-welcomin .button,
.theme-welcomin .shot {
  --plate-cut-br: 0px;
  --plate-cut-bl: 0px;
  --plate-cut-tl: 0px;
  --plate-rivet-tl: none;
  --plate-rivet-tr: none;
  --plate-rivet-br: none;
  --plate-rivet-bl: none;
}

.theme-welcomin .card::before,
.theme-welcomin .shot::before {
  clip-path: none;
  background: var(--plate-fill);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* In the dark theme and with more contrast the app's cards take an edge. */
:root[data-now="dark"] .theme-welcomin .card::before {
  border: 1px solid var(--line);
}

@media (prefers-contrast: more) {
  .theme-welcomin .card::before {
    border: 1px solid var(--quiet);
  }
}

.theme-welcomin .card::after,
.theme-welcomin .shot::after,
.theme-welcomin .button::after {
  display: none;
}

.theme-welcomin .card {
  padding: 24px;
}

/* The app's pill buttons: black, or white with an edge. */
.theme-welcomin .button {
  min-height: 50px;
  padding: 8px 26px;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 700;
  font-variation-settings: "wght" 700;
}

.theme-welcomin .button::before {
  clip-path: none;
  background: var(--plate-fill);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.theme-welcomin .button--primary::before {
  border-color: transparent;
}

.theme-welcomin .button--primary {
  color: var(--on-accent);
}

/* Titles in Parisienne, as on every page of the app. A script looks smaller at the same size, so it is set larger. */
.theme-welcomin h2 {
  color: var(--accent-text);
  font-family: "Parisienne", "Snell Roundhand", cursive;
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
}

.theme-welcomin .m-row h2 {
  font-size: clamp(38px, 4.4vw, 52px);
}

/* The screenshots run up under the island, as the app does. */
.theme-welcomin .phone > div {
  padding-top: 0;
}

/* The page: the photo of the app's welcome screen, washed out behind it. */
.backdrop--welcome {
  background: url("/assets/welcomin/welcome.webp") center 30% / cover no-repeat var(--bg);
}

.backdrop--welcome::after {
  content: "";
  position: absolute;
  inset: 0;
  background: light-dark(rgba(244, 242, 238, 0.88), rgba(15, 16, 18, 0.88));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* The hero: the name and what it is beside two phones, not a field of things to throw. */
.w-hero {
  justify-content: center;
  min-height: min(100svh, 980px);
  padding-top: calc(var(--bar) + clamp(24px, 4vw, 56px));
}

.w-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: 32px clamp(24px, 5vw, 72px);
  width: 100%;
  max-width: 1112px;
  margin: 0 auto;
}

.w-name {
  color: var(--accent-text);
  font-family: "Parisienne", "Snell Roundhand", cursive;
  font-size: clamp(76px, 11vw, 150px);
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;
}

.w-hero .slogan {
  margin-top: 8px;
}

.w-hero .actions {
  margin-top: 28px;
}

.w-hero .note {
  margin-top: 16px;
}

/* ---------- Pieces of the app, drawn in HTML ---------- */

.w-ui {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 500;
  font-variation-settings: "wght" 500;
}

.w-ui b {
  font-weight: 700;
  font-variation-settings: "wght" 700;
}

.w-box {
  padding: 16px 18px;
  background: var(--solid);
  border-radius: 22px;
  box-shadow: var(--card-shadow);
}

:root[data-now="dark"] .w-box {
  border: 1px solid var(--line);
}

.m-row .w-ui {
  margin-top: 24px;
}

.w-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  color: var(--tint-on, var(--sea));
  background: var(--tint, var(--sea-soft));
  border-radius: 50%;
}

.w-badge svg {
  width: 20px;
  height: 20px;
}

/* The quick cards at the top of a stay. */
.w-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.w-tiles .w-box {
  display: grid;
  gap: 10px;
  align-content: start;
}

.w-tiles b {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.w-tiles small {
  display: block;
  margin-top: 2px;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.35;
}

/* A row with a badge, as in the app's lists. */
.w-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.w-row > div {
  flex: 1 1 auto;
  min-width: 0;
}

.w-row small {
  display: block;
  color: var(--quiet);
  font-size: 14px;
}

.w-stack {
  display: grid;
  gap: 10px;
}

.w-code {
  font-size: 26px;
  font-weight: 800;
  font-variation-settings: "wght" 800;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.w-pill {
  flex: none;
  padding: 6px 14px;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-variation-settings: "wght" 700;
}

.w-pill--soft {
  color: var(--quiet);
  background: var(--slot);
}

/* The same sentence before and after the phone has translated it. */
.w-translate p + p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.w-translate small {
  display: block;
  margin-bottom: 2px;
  color: var(--quiet);
  font-size: 13px;
  font-weight: 700;
  font-variation-settings: "wght" 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.w-translate .w-link {
  display: block;
  margin-top: 6px;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 700;
  font-variation-settings: "wght" 700;
}

.w-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.w-langs span {
  padding: 4px 12px;
  background: var(--solid);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
}

/* The essentials of the guide and how far along they are. */
.w-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: 10px 0 14px;
}

.w-progress i {
  height: 6px;
  background: var(--sea);
  border-radius: 3px;
  transition: background-color 400ms;
  transition-delay: calc(var(--n) * 140ms + 200ms);
}

.w-progress i.todo,
html.js .rv:not(.in) .w-progress i {
  background: var(--slot);
  box-shadow: inset 0 0 0 1px var(--line);
}

.w-checks {
  display: grid;
  gap: 8px;
}

.w-checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.w-checks svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--sea);
}

.w-checks .todo,
.w-checks .todo svg {
  color: var(--quiet);
}

/* Label and value, as the app's card rows. */
.w-rows {
  padding: 4px 18px;
}

.w-rows div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  font-size: 15px;
}

.w-rows div + div {
  border-top: 1px solid var(--line);
}

.w-rows dt {
  color: var(--quiet);
}

.w-rows dd {
  font-weight: 700;
  font-variation-settings: "wght" 700;
  text-align: right;
}

@media (max-width: 900px) {
  .w-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .w-hero {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .w-name {
    font-size: clamp(64px, 20vw, 96px);
  }
}

/* A piece of the app standing in for a phone. */
.m-row .w-big {
  justify-self: center;
  width: min(100%, 400px);
  margin-top: 0;
  padding: 26px 26px 24px;
  rotate: -1.5deg;
}

.w-big > b {
  font-size: 19px;
}

.w-big .w-checks li {
  font-size: 16px;
}


/* ---------- Swiss Atelier: the shop's paper, ink and brick ---------- */

.theme-atelier {
  --bg: light-dark(#f6f1e9, #15120f);
  --glow: light-dark(rgba(180, 71, 43, 0.06), rgba(224, 122, 95, 0.07));
  --fg: light-dark(#1c1915, #f1ebe1);
  --soft: light-dark(rgba(28, 25, 21, 0.8), rgba(241, 235, 225, 0.8));
  --quiet: light-dark(rgba(28, 25, 21, 0.62), rgba(241, 235, 225, 0.6));
  --line: light-dark(rgba(28, 25, 21, 0.12), rgba(241, 235, 225, 0.11));
  --outline: light-dark(rgba(28, 25, 21, 0.2), rgba(241, 235, 225, 0.2));
  --glass: light-dark(#fffdf9, #1f1b17);
  --solid: light-dark(#fffdf9, #1f1b17);
  --btn: light-dark(#fffdf9, #26211c);
  --btn-hover: light-dark(#f1ebe1, #2f2923);
  --btn-down: light-dark(#e9e1d4, #1f1b17);
  --slot: light-dark(rgba(28, 25, 21, 0.05), rgba(241, 235, 225, 0.06));
  --accent: light-dark(#1c1915, #f1ebe1);
  --accent-hover: light-dark(#35302a, #fff);
  --accent-down: light-dark(#000, #e3dacb);
  --on-accent: light-dark(#fffdf9, #1c1915);
  --accent-text: light-dark(#a63f25, #e58b70);
  --accent-soft: light-dark(rgba(180, 71, 43, 0.08), rgba(229, 139, 112, 0.12));
  --sea: var(--accent-text);
  --screen: #f6f1e9;
}

/* The shop's buttons are pills. */
.theme-atelier .button {
  --r: 999px;
  padding-inline: 24px;
}

.theme-atelier h1,
.theme-atelier h2,
.theme-atelier .slogan {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.theme-atelier .eyebrow {
  font-family: var(--mono);
  letter-spacing: 0.16em;
}

.sa-hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 40px clamp(32px, 5vw, 72px);
  padding-block: clamp(24px, 5vh, 64px) 8px;
}

.sa-hero h1 {
  font-size: clamp(46px, 6vw, 76px);
  line-height: 1;
}

.sa-hero .slogan {
  margin-top: 16px;
  font-size: clamp(21px, 2.2vw, 27px);
  line-height: 1.25;
}

.sa-hero .lead {
  font-size: 17.5px;
}

/* The desktop page, and the phone in front of its corner. */
.sa-shots {
  position: relative;
  padding: 0 clamp(36px, 7%, 72px) clamp(56px, 9%, 90px) 0;
}

.sa-phone {
  --w: clamp(120px, 26%, 190px);
  position: absolute;
  right: 0;
  bottom: 0;
}

.sa-list {
  align-self: center;
  padding: 26px;
}

.sa-list .w-checks {
  gap: 14px;
}

.sa-list .w-checks li {
  align-items: flex-start;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
}

.sa-list .w-checks svg {
  margin-top: 1px;
}

.sa-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.sa-swatches span {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 3 / 4;
  padding: 10px 12px;
  color: #fff;
  background: var(--c);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.sa-swatches span:first-child {
  color: #1c1915;
  text-shadow: none;
}

.theme-atelier .m-row .prose + .prose {
  margin-top: 14px;
}

.theme-atelier .m-row h2 {
  margin-bottom: 14px;
  padding: 0;
  border: 0;
}

.theme-atelier .w-langs {
  margin-top: 18px;
}

.minor-title {
  margin-top: 40px;
  color: var(--quiet);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.minor-title + .minor {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .sa-hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .sa-swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- The home page, second take: quiet chrome, and each project in its own colours and motion ---------- */

/* The opening fills the first screen: the cube, the name, one line, where to go. Everything is there from the first
   frame and only moves into place; nothing waits for the cube's video. */
.opening {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--bar));
  min-height: calc(100svh - var(--bar));
  padding: 24px var(--pad) 84px;
  text-align: center;
}

.opening > * {
  animation: come-up 800ms var(--ease) both;
  animation-delay: calc(var(--o, 0) * 90ms + 80ms);
}

.opening > .eyebrow { --o: 1; }
.opening > h1 { --o: 2; animation-name: none; }
.opening > .role { --o: 4; }
.opening > .actions { --o: 5; }
.opening > .socials { --o: 6; }

@keyframes come-up {
  from {
    opacity: 0;
    translate: 0 18px;
  }
}

.opening .intro-cube {
  --mark: clamp(150px, min(30vh, 44vw), 290px);
  flex: none;
  margin-bottom: clamp(18px, 4vh, 40px);
  animation-name: cube-in;
  animation-duration: 900ms;
}

@keyframes cube-in {
  from {
    opacity: 0;
    scale: 0.86;
  }
}

.opening .eyebrow {
  margin-bottom: 12px;
  letter-spacing: 0.14em;
}

.opening h1 {
  font-size: clamp(40px, 10.4vw, 112px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}

.opening .role {
  max-width: 30em;
  margin-top: clamp(14px, 2.4vh, 22px);
  color: var(--soft);
  font-size: clamp(17px, 1.9vw, 22px);
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

.opening .actions {
  justify-content: center;
  margin-top: clamp(20px, 3.4vh, 32px);
}

.opening .socials {
  justify-content: center;
  margin-top: 18px;
}

.socials--icons a > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.socials--icons a {
  position: relative;
  transition:
    background-color 140ms,
    border-color 140ms,
    color 140ms,
    translate 200ms var(--ease);
}

.socials--icons a:hover {
  color: var(--accent-text);
  translate: 0 -3px;
}

/* The cube's colours, out of focus and drifting slowly behind it. */
.opening-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: clip;
  pointer-events: none;
  animation: none;
}

.opening-glow i {
  position: absolute;
  left: 50%;
  top: 34%;
  width: min(62vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.13;
  animation: drift 16s ease-in-out infinite alternate;
}

.opening-glow i:first-child {
  background: #2f6bff;
  translate: -92% -50%;
}

.opening-glow i:last-child {
  background: #ff3b30;
  translate: -8% -40%;
  opacity: 0.08;
  animation-duration: 21s;
  animation-direction: alternate-reverse;
}

:root[data-now="dark"] .opening-glow i:first-child {
  opacity: 0.26;
}

:root[data-now="dark"] .opening-glow i:last-child {
  opacity: 0.16;
}

@keyframes drift {
  from {
    transform: translate(-6%, -5%) scale(0.92);
  }
  to {
    transform: translate(9%, 8%) scale(1.12);
  }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  color: var(--quiet);
  --o: 9;
}

.scroll-cue svg {
  animation: nod 1.9s ease-in-out infinite;
}

@keyframes nod {
  50% {
    translate: 0 7px;
  }
}

/* Room between the projects, and their names large. */
.home main > .wrap {
  padding-top: clamp(24px, 5vw, 64px);
}

.home section + section {
  margin-top: clamp(96px, 13vw, 168px);
}

.home section > h2 {
  margin-bottom: clamp(20px, 3vw, 34px);
  padding-bottom: 0;
  border-bottom: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
}

.home .theme-welcomin > h2 {
  font-size: clamp(54px, 8.4vw, 96px);
}

.home .theme-atelier > h2 {
  letter-spacing: -0.02em;
}

/* A project's name slides in from its side. */
html.js .home section > h2.rv {
  translate: -34px 0;
}

html.js .home section > h2.rv.in {
  translate: 0 0;
}

.home .feature {
  gap: clamp(24px, 4vw, 56px);
}

.home .feature .card {
  align-self: center;
  padding: clamp(22px, 3vw, 34px);
}

.home .feature .card > p:not(.kicker) {
  font-size: 18px;
  line-height: 1.55;
}

.home .feature .chips {
  margin-top: 18px;
}

/* A website's picture: its window, and the same page on a phone in front of its corner. */
.site-shot {
  container-type: inline-size;
  padding: 0 0 9cqw 0;
}

.site-shot .browser {
  width: 92cqw;
  will-change: transform;
}

.site-shot .phone {
  --w: 25cqw;
  position: absolute;
  right: 0;
  bottom: 0;
}

.site-shot .media-go {
  left: 14px;
  bottom: 4px;
}

.home .ribbon {
  margin-top: clamp(56px, 8vw, 96px);
  padding: 14px 0 12px;
  background: none;
  border-block: 1px solid var(--line);
  rotate: none;
}

.home .ribbon span {
  padding-right: 0.7em;
  color: var(--soft);
  font-family: inherit;
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.home .ribbon span::after {
  content: "  ·";
  white-space: pre;
}

/* The way to reach me closes the page, as large as the name that opened it. */
.reach {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: clamp(8px, 3vw, 40px);
  text-align: center;
}

.reach .kicker {
  margin-bottom: 10px;
  font-size: clamp(16px, 1.6vw, 19px);
}

.reach .mailto {
  font-size: clamp(31px, 8.6vw, 92px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.reach .socials {
  justify-content: center;
  margin-top: clamp(22px, 3vw, 34px);
}

@media (max-width: 900px) {
  /* The picture first, then what it is. */
  .home .feature--flip > :first-child {
    order: 2;
  }
}

@media (max-width: 520px) {
  .opening .actions .button {
    flex: 0 1 auto;
  }

  .home .feature .card > p:not(.kicker) {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .opening > *,
  .opening-glow i,
  .scroll-cue svg {
    animation: none;
  }

  html.js .home section > h2.rv {
    translate: none;
  }
}

/* "See my work" glides down, and a section stops below the bar. */
.home section {
  scroll-margin-top: calc(var(--bar) + 20px);
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.home) {
    scroll-behavior: smooth;
  }
}

/* ---------- Third take: menus that open with a movement, Messagyre's own lettering ---------- */

/* The panels under the bar drop into place and leave the same way. Where a browser cannot animate towards
   display: none they simply go. */
.site-header.compact .nav,
.lang-menu {
  transform-origin: top right;
  transition:
    opacity 150ms ease,
    translate 150ms ease,
    scale 150ms ease,
    display 150ms allow-discrete;
}

.site-header.compact .nav:not(.open),
.lang-menu[hidden] {
  opacity: 0;
  translate: 0 -8px;
  scale: 0.97;
}

.site-header.compact .nav.open,
.lang-menu:not([hidden]) {
  animation: menu-in 200ms var(--ease) backwards;
}

@keyframes menu-in {
  from {
    opacity: 0;
    translate: 0 -10px;
    scale: 0.96;
  }
}

.site-header.compact .nav.open a {
  animation: menu-item 260ms var(--ease) backwards;
  animation-delay: calc(var(--n, 0) * 28ms + 40ms);
}

.site-header.compact .nav a:nth-child(2) { --n: 1; }
.site-header.compact .nav a:nth-child(3) { --n: 2; }
.site-header.compact .nav a:nth-child(4) { --n: 3; }
.site-header.compact .nav a:nth-child(5) { --n: 4; }
.site-header.compact .nav a:nth-child(6) { --n: 5; }
.site-header.compact .nav a:nth-child(7) { --n: 6; }

@keyframes menu-item {
  from {
    opacity: 0;
    translate: 0 -6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header.compact .nav,
  .lang-menu {
    transition: none;
  }

  .site-header.compact .nav.open,
  .site-header.compact .nav.open a,
  .lang-menu:not([hidden]) {
    animation: none;
  }
}

/* On the game's page the panel of links is a plate too, like the list of languages beside it. */
body.theme-junked .site-header.compact .nav {
  background: var(--solid);
  border: var(--plate-line, 2.5px) solid var(--outline);
  border-radius: 0;
  box-shadow:
    inset 0 -5px 0 var(--lip),
    0 4px 0 var(--shadow);
  padding-bottom: 13px;
}

body.theme-junked .site-header.compact .nav a {
  border-radius: 0;
}

/* Welcomin!: room between the line about the app and its name. */
.w-hero .app-id {
  margin-bottom: clamp(18px, 3vw, 34px);
}

/* Messagyre: the app's two typefaces. Fredoka for names, numbers and buttons, Nunito for what is read. */
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka-700.ttf") format("truetype");
  font-weight: 700 900;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-500.ttf") format("truetype");
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-700.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-800.ttf") format("truetype");
  font-weight: 800 900;
  font-display: swap;
}

body.theme-messagyre main,
.home .theme-messagyre {
  font-family: "Nunito", "Manrope", system-ui, sans-serif;
}

.theme-messagyre :is(h1, h2, h3, .name, .slogan, .button, .kicker, .chip, .tally, .media-go) {
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  letter-spacing: 0;
}

.theme-messagyre :is(h2, h3, .slogan, .button, .kicker) {
  font-weight: 600;
}

.theme-messagyre .name {
  font-weight: 700;
}

.theme-messagyre .name .ch {
  letter-spacing: 0;
}
