/* lookareyellow — one sky, one ink, one yellow. */

/* Fonts are served from this site (fonts/), not from Google: no visitor data
   leaves the server. Same families and axes as before, SIL Open Font License. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Headings of the professional look (the default) only: with the fun look on
   (?look=fun), the browser never downloads it. */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The terminal look only (?look=term): with any other look on, the browser
   never downloads them. Iosevka is a narrow monospace, so the pages keep
   fitting one screen; VT323 draws the big titles like an old screen. Both cut
   down to the characters the site uses (pyftsubset). */
@font-face {
  font-family: "Iosevka";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/iosevka-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2500-259F;
}

@font-face {
  font-family: "Iosevka";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/iosevka-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2500-259F;
}

@font-face {
  font-family: "Iosevka";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/iosevka-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2500-259F;
}

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vt323-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2500-259F;
}

:root {
  --sky: #E6EDFB;
  --paper: #F5F8FE;
  --ink: #1B2550;
  --ink-soft: #4A5580;
  --yellow: #FFC20E;
  --yellow-deep: #E9A800;
  --white: #FFFFFF;
  /* The background of the carousel pictures (assets/carousel/), also behind the look switch's thumb. */
  --picture: #E6EDFB;

  --display: "Bricolage Grotesque", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;

  /* Type and spacing grow with the window's width AND height, so every
     section page fills one screen without spilling over it. */
  --step--1: clamp(0.8125rem, 0.35rem + 0.25vw + 0.55vh, 0.9375rem);
  --step-0: clamp(0.9375rem, 0.35rem + 0.35vw + 0.85vh, 1.0625rem);
  --step-1: clamp(1.0625rem, 0.4rem + 0.45vw + 1.1vh, 1.3125rem);
  --step-2: clamp(1.375rem, 0.6rem + 0.6vw + 1.5vh, 1.75rem);
  --step-3: clamp(1.75rem, 0.4rem + 1.2vw + 2.6vh, 2.75rem);
  --step-4: clamp(2rem, 0.4rem + 1.6vw + 3.2vh, 3.5rem);

  --space: clamp(12px, 3vh - 6px, 40px);
  --line: 3px solid var(--ink);
  --gutter: clamp(16px, 4vw, 40px);
  /* Room taken by the header, footer and main padding: the home carousel
     uses it to keep its picture inside the window. */
  --chrome: clamp(190px, 120px + 14vh, 260px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--yellow-deep); }

:focus-visible {
  outline: 3px solid var(--yellow-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* ---------- Header ---------- */

.site-header { padding: clamp(10px, 2.2vh, 22px) 0 clamp(8px, 1.4vh, 14px); }

.site-header .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "mark nav lang";
  align-items: center;
  gap: 12px 10px;
}

.wordmark {
  grid-area: mark;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.625rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
  position: relative;
  margin-bottom: 10px;
}

.wordmark .eyes {
  display: inline-flex;
  gap: 1px;
  margin: 0 1px;
  transform: translateY(1px);
}

.wordmark .eye { width: 0.62em; height: 0.8em; overflow: visible; }
.wordmark .eye .pupil { transition: transform 120ms linear; }

/* "are yellow" in the accent yellow, outlined in ink like the eyes so it reads on the pale page. */
.wordmark .tail {
  color: var(--yellow);
  font-weight: 800;
  margin-left: 0.28em;
  -webkit-text-stroke: 0.07em var(--ink);
  paint-order: stroke fill;
}

/* A little tilted sticker under the wordmark: "since 1984" / "dal 1984". */
.wordmark .since {
  position: absolute;
  right: -0.3em;
  bottom: -1em;
  padding: 1px 5px 2px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  transform: rotate(-5deg);
  transition: transform 160ms ease;
}

.wordmark:hover .since { transform: rotate(4deg) scale(1.06); }

/* The menu lists every section of the site, numbered in reading order. */
.site-nav { grid-area: nav; justify-self: center; }

.site-nav ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 8px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav .num {
  font-family: var(--display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* A pair of dots between the "me" sections and the career ones. */
.site-nav .group-break {
  display: inline-flex;
  gap: 2px;
  margin: 0 4px;
}

.site-nav .group-break i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
}

/* The yellow pill behind the current section is its own element, so that on
   a page change it can slide from the old section to the new one. */
.site-nav a[aria-current="page"] { position: relative; isolation: isolate; }
.site-nav .nav-pill {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 999px;
  background: var(--yellow);
}
.site-nav a[aria-current="page"] .num { color: var(--ink); }
.site-nav a:not([aria-current]):hover { background: var(--sky); }
/* With four buttons in the look switch, the bold labels of the fun and
   Christmas looks take a little less room each, so the menu stays on one line. */
@media (min-width: 901px) {
  html:is([data-look="fun"], [data-look="xmas"]) .site-nav a { padding-inline: 6px; }
}

/* On phones the same menu folds into a "Menu" button. */
.menu-compact { display: none; grid-area: nav; justify-self: end; position: relative; }

.menu-compact summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  list-style: none;
}

.menu-compact summary::-webkit-details-marker { display: none; }
.menu-compact summary .dots { display: inline-flex; gap: 2px; }
.menu-compact summary .dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--yellow); }
.menu-compact[open] summary { background: var(--yellow); }

.menu-compact nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  min-width: 15rem;
  padding: 8px;
  border: var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(27, 37, 80, 0.15);
}

.menu-compact ol { list-style: none; margin: 0; padding: 0; }
.menu-compact li + li.group-start { margin-top: 6px; padding-top: 6px; border-top: 2px solid var(--sky); }

.menu-compact a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
}

.menu-compact .num { font-family: var(--display); font-size: 0.75rem; color: var(--ink-soft); }
.menu-compact a[aria-current="page"] { background: var(--yellow); }
.menu-compact a[aria-current="page"] .num { color: var(--ink); }
.menu-compact a:not([aria-current]):hover { background: var(--sky); }

/* Right of the header: the look switch (😊 / 👔) and the language switch. */
.header-tools {
  grid-area: lang;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Fun, professional or Christmas (js/look.js). Shown only once the script has run, since
   without it the buttons would do nothing. The thumb, in the pale blue-grey of
   the carousel pictures, slides under the look that is on. Each button is a
   square with its emoji centred in it, and the thumb is exactly one button. */
.look-switch {
  display: none;
  position: relative;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
}

html[data-look] .look-switch { display: flex; }

.look-switch button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 400 1rem/1 var(--body);
  cursor: pointer;
}

/* The emoji grows and tilts a little on hover, and settles back the same way:
   one gentle curve both ways, on its own compositing layer so it stays smooth. */
.look-switch button span {
  display: block;
  line-height: 1;
  will-change: transform;
  backface-visibility: hidden;
  transition: transform 380ms cubic-bezier(0.34, 1.35, 0.64, 1);
}
.look-switch button:hover span { transform: scale(1.14) rotate(-6deg); }
.look-switch button[aria-pressed="true"] { cursor: default; }
.look-switch button[aria-pressed="true"]:hover span { transform: none; }

.look-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--picture);
  transition: transform 420ms cubic-bezier(0.65, 0, 0.35, 1);
}

html[data-look="fun"] .look-thumb { transform: translateX(100%); }
html[data-look="term"] .look-thumb { transform: translateX(200%); }
html[data-look="xmas"] .look-thumb { transform: translateX(300%); }
/* The narrowest phones: four buttons a touch smaller, so the header fits. */
@media (max-width: 400px) {
  .look-switch button,
  .look-thumb { width: 1.45rem; height: 1.45rem; }
  .look-switch button { font-size: 0.9375rem; }
}

.lang-switch {
  display: flex;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
}

.lang-switch a {
  display: block;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-decoration: none;
}

.lang-switch a[aria-current="true"] { background: var(--yellow); }
.lang-switch a:not([aria-current]):hover { background: var(--sky); }

/* ---------- One screen per page ---------- */

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space) 0;
}

/* Pages meant to be read top to bottom (privacy, 404) start at the top. */
.page-scroll main { justify-content: flex-start; }

.screen-title,
.section-title {
  margin: 0 0 calc(var(--space) * 0.6);
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.page-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 calc(var(--space) * 0.35);
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.kicker .dots { display: inline-flex; gap: 2px; }
.kicker .dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--yellow); }

.next-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space);
  padding: clamp(10px, 1.6vh, 14px) 22px;
  border: var(--line);
  border-radius: 999px;
  background: var(--yellow);
  font-weight: 700;
  text-decoration: none;
}

.next-link::after { content: "→"; font-family: var(--display); }
.next-link:hover { background: var(--white); }

/* ---------- Home: the carousel ---------- */

.carousel-layout {
  display: flex;
  gap: clamp(20px, 3vw, 36px);
  align-items: stretch;
}

.carousel-stage {
  position: relative;
  flex: 0 0 auto;
  width: min(64%, calc((100vh - var(--chrome)) * 1.6));
  width: min(64%, calc((100dvh - var(--chrome)) * 1.6));
  aspect-ratio: 1200 / 750;
  border: var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: var(--sky);
}
/* Sideways swipes on the photo change it (js/site.js), not the browser's page. */
.carousel-stage { touch-action: pan-y pinch-zoom; }

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 450ms ease, visibility 0s linear 450ms;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 450ms ease;
}

.slide img { width: 100%; height: 100%; object-fit: cover; }

/* Things shown in one look only, such as the carousel pictures: each slide
   holds one picture per look (.only-pro, .only-fun and .only-xmas, photos in
   assets/carousel/pro|fun|xmas/, and .only-term, the drawings in
   assets/carousel/term/), and every look hides the others.
   Hidden pictures are lazy, so a look's pictures are downloaded only when it is on. */
html:not([data-look="fun"]) .only-fun,
html:not([data-look="xmas"]) .only-xmas,
html:not([data-look="term"]) .only-term,
html:is([data-look="fun"], [data-look="xmas"], [data-look="term"]) .only-pro { display: none; }

.carousel-panel {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding: 8px 0 4px;
}

.caption-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.caption-text {
  margin: 12px 0 0;
  font-size: var(--step-1);
  color: var(--ink-soft);
}

/* Invisible copies of every caption, filled in by js/site.js: on phones they
   share one grid cell with the live caption so its box is always as tall as
   the longest one and the controls below don't jump between slides. */
.caption-ghost { display: none; }

.carousel-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.round-btn {
  width: 50px;
  height: 50px;
  border: var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font: 700 1.25rem/1 var(--body);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.round-btn:hover { background: var(--yellow); }
.round-btn svg { width: 22px; height: 22px; }

.pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 0 -8px;
  padding: 0;
}

.pair-btn {
  display: inline-flex;
  gap: 3px;
  padding: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.pair-btn span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--white);
}

.pair-btn[aria-current="true"] span { background: var(--yellow); }
.pair-btn:hover span { background: var(--sky); }
.pair-btn[aria-current="true"]:hover span { background: var(--yellow); }

/* ---------- About: the story ---------- */

.lead { font-size: var(--step-1); line-height: 1.45; margin: 0; max-width: 58rem; }

.story {
  margin-top: var(--space);
  columns: 2 20rem;
  column-gap: clamp(24px, 4vw, 56px);
}

.story p { margin: 0 0 0.75em; break-inside: avoid-column; line-height: 1.5; }
.story p:last-child { margin-bottom: 0; }

/* ---------- Lists of three (what I bring, what I'm proud of) ---------- */

.yellow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

/* Four items: four across on wide screens, two by two on smaller ones. */
.yellow-list.count-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.yellow-list li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(16px, 2.6vh, 28px) clamp(16px, 2vw, 26px);
  border: var(--line);
  border-radius: 24px;
  background: var(--white);
}

.yellow-list .dots { display: inline-flex; gap: 3px; }

.yellow-list .dots i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--ink);
}

.yellow-list strong {
  display: block;
  font-family: var(--display);
  font-size: var(--step-1);
  line-height: 1.25;
}

.yellow-list p { margin: 6px 0 0; color: var(--ink-soft); }

/* ---------- Career: four chapters ---------- */

.chapters-title {
  margin: var(--space) 0 calc(var(--space) * 0.5);
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--ink-soft);
}

.chapters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--line);
}

.chapters li { padding: clamp(12px, 2vh, 20px) 20px 0 0; }
.chapters li + li { padding-left: 20px; border-left: 2px solid var(--sky); }

.chapters .years {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink-soft);
}

.chapters h3 {
  margin: 4px 0 8px;
  font-family: var(--display);
  font-size: var(--step-1);
  line-height: 1.25;
}

.chapters p { margin: 0; font-size: var(--step--1); line-height: 1.5; color: var(--ink-soft); }

/* ---------- Year by year ---------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 0 0 calc(var(--space) * 0.7);
  color: var(--ink-soft);
}

.legend span { display: inline-flex; align-items: center; gap: 8px; }

.mark { display: inline-flex; gap: 3px; flex: none; }

.mark i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--white);
}

.mark.life i { background: var(--yellow); }

/* Two columns on wide screens, read top to bottom, then the second column. */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: clamp(24px, 4vw, 56px);
}

.timeline > li {
  display: grid;
  grid-template-columns: 64px 50px 1fr;
  align-items: start;
  padding: clamp(4px, 0.9vh, 9px) 0;
  position: relative;
  break-inside: avoid;
}

/* The line runs through the mark column of each row. */
.timeline > li::before {
  content: "";
  position: absolute;
  left: 73px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--sky);
}

.timeline .year {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1.3;
}

.timeline .mark { position: relative; z-index: 1; margin-top: 6px; background: var(--paper); padding: 0 2px; }

.timeline .events { list-style: none; margin: 0; padding: 0; }
.timeline .events li { display: flex; gap: 10px; align-items: baseline; padding: 1px 0; line-height: 1.4; }
/* A mark inside an event sits on the timeline line, in the mark column, level with its event. */
.timeline .events .mark { position: absolute; left: 64px; margin-top: 4px; }
.timeline .events .life-text { font-weight: 700; }

/* ---------- Reading pages (privacy, 404) ---------- */

.prose { max-width: 42rem; }
.prose p { margin: 0 0 1em; }
.prose h2 {
  margin: 1.8em 0 0.5em;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-2);
  line-height: 1.2;
}
.prose h3 {
  margin: 1.4em 0 0.3em;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.3;
}
.prose ul { margin: 0 0 1em; padding-left: 1.25em; }
.prose li { margin: 0 0 0.4em; }
.prose li::marker { color: var(--yellow-deep); }
.prose .note { color: var(--ink-soft); font-size: var(--step--1); }

/* Privacy details: one native <details> accordion, closed by default, no script, nothing stored. */
.prose .accordion {
  margin: 1.8em 0 1.2em;
  border-top: 2px solid var(--sky);
  border-bottom: 2px solid var(--sky);
}
.prose .accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.7em 0;
  cursor: pointer;
  list-style: none;
}
.prose .accordion summary::-webkit-details-marker { display: none; }
.prose .accordion summary h2 { margin: 0; }
.prose .accordion summary + h3 { margin-top: 0.4em; }
/* The + / − badge: a yellow dot, like the rest of the site. */
.prose .accordion summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  font-weight: 800;
  line-height: 1;
}
.prose .accordion summary:hover::after,
.prose .accordion[open] summary::after { background: var(--yellow); }
.prose .accordion[open] summary::after { content: "−"; }
.prose .accordion > :last-child { margin-bottom: 1.2em; }

.page-scroll .page-title { margin-bottom: calc(var(--space) * 1.6); }
.page-scroll .yellow-list { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); max-width: none; }

/* Kept for 404.html */
.page-intro { padding-top: 8px; }
.section { padding-top: var(--space); }

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

.site-footer {
  padding: clamp(10px, 1.8vh, 18px) 0 clamp(12px, 2.2vh, 22px);
  border-top: var(--line);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.site-footer p { margin: 0; }
.site-footer .emoji { font-size: 1.125rem; margin-right: 8px; }

/* ---------- Short windows: drop the extras before the content ---------- */

@media (max-height: 820px) and (min-width: 761px) {
  .kicker { display: none; }
  .wordmark .since { bottom: -0.9em; }
}

/* ---------- Medium screens: the menu moves under the logo ---------- */

@media (max-width: 1180px) {
  .site-header .wrap {
    grid-template-columns: auto 1fr;
    grid-template-areas: "mark lang" "nav nav";
  }
  .site-nav { justify-self: start; margin-left: -8px; }
  html:is([data-look="fun"], [data-look="xmas"]) .site-nav { margin-left: -6px; }
}

@media (max-width: 1100px) {
  .yellow-list.count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .site-nav a { padding: 6px 7px; font-size: 0.875rem; gap: 4px; }
  .site-nav .group-break { margin: 0 2px; }
  .site-nav { margin-left: -7px; }
  .chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapters li:nth-child(3) { padding-left: 0; border-left: 0; }
  .chapters li:nth-child(n+3) { border-top: 2px solid var(--sky); margin-top: 12px; }
}

/* ---------- Phones: the menu folds, pages may scroll ---------- */

@media (max-width: 760px) {
  .site-header .wrap {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "mark nav lang";
  }
  .site-nav { display: none; }
  .menu-compact { display: block; }
  /* A sideways swipe moves between sections (js/transitions.js) and, on the
     home photo, between pictures (js/site.js): keep the browser's own
     in-page swipe-to-go-back from firing on the same gesture. */
  html { overscroll-behavior-x: none; }
  /* The Menu button sits left of the look and language switches, so a panel
     hung from its right edge would run off the left of the screen: hang it
     from the header instead, lined up with the page's left margin. */
  .site-header .wrap { position: relative; }
  .menu-compact { position: static; }
  .menu-compact nav {
    left: var(--gutter);
    right: auto;
    top: calc(100% + 8px);
    min-width: 0;
    width: min(20rem, calc(100% - 2 * var(--gutter)));
  }

  .carousel-layout { flex-direction: column; gap: 16px; }
  .carousel-stage { width: 100%; }
  .carousel-panel { padding: 0; }
  .carousel-caption { display: grid; }
  .caption-live, .caption-ghost { grid-area: 1 / 1; }
  .caption-ghost { display: block; visibility: hidden; pointer-events: none; }

  .yellow-list, .yellow-list.count-4 { grid-template-columns: 1fr; }
  .yellow-list li { flex-direction: row; align-items: flex-start; gap: 14px; }
  .yellow-list .dots { padding-top: 5px; }

  .timeline { columns: 1; }
}

@media (max-width: 640px) {
  .carousel-stage { border-radius: 18px; }
  .round-btn { width: 44px; height: 44px; }
  .wordmark { font-size: 1.375rem; }
  .wordmark .tail { display: none; }
  .wordmark .since { right: auto; left: -0.1em; bottom: -1.45em; font-size: 0.5625rem; padding: 1px 4px; }
  .site-header .wrap { gap: 8px; }
  .chapters { grid-template-columns: 1fr; }
  .chapters li, .chapters li + li { padding-left: 0; border-left: 0; }
  .chapters li + li { border-top: 2px solid var(--sky); margin-top: 12px; }
  .timeline > li::before { left: 59px; }
  .timeline > li { grid-template-columns: 50px 46px 1fr; }
  .timeline .events .mark { left: 50px; }
}

/* Narrow phones (up to 374px): the header's gaps and paddings tighten a
   little, so the look and language switches keep the page margin. */
@media (max-width: 374px) {
  .site-header .wrap { column-gap: 6px; }
  .header-tools { gap: 4px; }
  .menu-compact summary { padding-inline: 12px; }
  .lang-switch a { padding-inline: 5px; }
}

/* The narrowest phones (320–359px): the Menu button keeps only its icon (the
   word stays for screen readers). */
@media (max-width: 359px) {
  .menu-compact summary { gap: 0; padding: 7px 10px; min-height: 2.5rem; }
  .menu-compact .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ---------- Page transitions ----------
   Moving between pages of the site, the header and footer stay put, the
   yellow pill slides along the menu and the content slides in the direction
   the menu reads (js/transitions.js says which). Browsers without
   cross-document view transitions change page as before. */

@view-transition { navigation: auto; }

main { view-transition-name: content; }
.site-nav .nav-pill { view-transition-name: nav-pill; }

::view-transition-group(*) {
  animation-duration: 370ms;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* The pill passes under the menu labels rather than over them. */
::view-transition-group(nav-pill) { mix-blend-mode: multiply; }

/* The old content leaves quickly, the new one arrives just after it, so the
   two pages barely overlap. */
html:active-view-transition-type(forward)::view-transition-old(content) { animation: 160ms cubic-bezier(0.4, 0, 1, 1) both lay-out-left; }
html:active-view-transition-type(forward)::view-transition-new(content) { animation: 280ms cubic-bezier(0, 0, 0.2, 1) 90ms both lay-in-right; }
html:active-view-transition-type(backward)::view-transition-old(content) { animation: 160ms cubic-bezier(0.4, 0, 1, 1) both lay-out-right; }
html:active-view-transition-type(backward)::view-transition-new(content) { animation: 280ms cubic-bezier(0, 0, 0.2, 1) 90ms both lay-in-left; }

@keyframes lay-out-left { to { opacity: 0; transform: translateX(-40px); } }
@keyframes lay-in-right { from { opacity: 0; transform: translateX(56px); } }
@keyframes lay-out-right { to { opacity: 0; transform: translateX(40px); } }
@keyframes lay-in-left { from { opacity: 0; transform: translateX(-56px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }

  .slide, .slide.is-active { transition: none; }
  .wordmark .eye .pupil { transition: none; }
  .wordmark .since { transition: none; }
}

/* ---------- Professional look (👔, the default) ----------
   The same pages and words, dressed for work: a dark blue page, light ink,
   hairline rules instead of thick outlines, square-ish corners, serif
   headings, and the yellow kept as a thin accent. --white is the raised
   surface (cards, buttons, the menu), --sky the hover and selected tint. It applies unless js/look.js has set
   html[data-look="fun"] (?look=fun in the address), and also without
   JavaScript: the rules above are the fun look (😊), these override them. */

html:not([data-look="fun"], [data-look="xmas"]) {
  --paper: #1A3260;
  --white: #223D70;
  --sky: #2B4A82;
  --picture: #2E4E87;
  --ink: #EEF2F9;
  --ink-soft: #AEB9CE;
  --yellow: #F2B705;
  --yellow-deep: #F6C744;
  --rule: #3A5688;
  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --line: 1px solid var(--rule);
  color-scheme: dark;
}

html:not([data-look="fun"], [data-look="xmas"]) ::selection { background: var(--yellow); color: var(--paper); }

html:not([data-look="fun"], [data-look="xmas"]) body { line-height: 1.6; }
html:not([data-look="fun"], [data-look="xmas"]) a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
html:not([data-look="fun"], [data-look="xmas"]) :focus-visible { outline: 2px solid var(--ink); border-radius: 3px; }

/* Header: the logo stays the logo, "are yellow" still yellow, without its sticker tilt. */
html:not([data-look="fun"], [data-look="xmas"]) .site-header { border-bottom: var(--line); }
html:not([data-look="fun"], [data-look="xmas"]) .wordmark { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 700; }
html:not([data-look="fun"], [data-look="xmas"]) .wordmark .tail { color: var(--yellow); -webkit-text-stroke: 0; font-weight: 500; }
html:not([data-look="fun"], [data-look="xmas"]) .wordmark .eye ellipse { stroke: var(--ink); }
html:not([data-look="fun"], [data-look="xmas"]) .wordmark .since,
html:not([data-look="fun"], [data-look="xmas"]) .wordmark:hover .since {
  border: 0;
  background: none;
  padding: 0;
  right: 0;
  bottom: -1.15em;
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: none;
}

html:not([data-look="fun"], [data-look="xmas"]) .site-nav a { font-weight: 400; color: var(--ink-soft); border-radius: 0; }
html:not([data-look="fun"], [data-look="xmas"]) .site-nav a:not([aria-current]):hover { background: none; color: var(--ink); }
html:not([data-look="fun"], [data-look="xmas"]) .site-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
html:not([data-look="fun"], [data-look="xmas"]) .site-nav .num { color: var(--yellow-deep); font-family: var(--body); font-weight: 400; }
/* The pill becomes a thin rule under the current section (it still slides). */
html:not([data-look="fun"], [data-look="xmas"]) .site-nav .nav-pill {
  inset: auto 8px -2px;
  height: 2px;
  border-radius: 0;
  background: var(--ink);
}
html:not([data-look="fun"], [data-look="xmas"]) .site-nav .group-break { width: 1px; height: 1.1em; margin: 0 8px; background: var(--rule); }
html:not([data-look="fun"], [data-look="xmas"]) .site-nav .group-break i { display: none; }

html:not([data-look="fun"], [data-look="xmas"]) .menu-compact summary { border: var(--line); border-radius: 4px; font-weight: 400; }
html:not([data-look="fun"], [data-look="xmas"]) .menu-compact summary .dots i { border: 0; border-radius: 0; width: 12px; height: 2px; background: var(--ink); }
html:not([data-look="fun"], [data-look="xmas"]) .menu-compact summary .dots { flex-direction: column; gap: 3px; }
html:not([data-look="fun"], [data-look="xmas"]) .menu-compact summary .dots i + i { display: block; }
html:not([data-look="fun"], [data-look="xmas"]) .menu-compact[open] summary { background: var(--sky); }
html:not([data-look="fun"], [data-look="xmas"]) .menu-compact nav { border-radius: 6px; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45); }
html:not([data-look="fun"], [data-look="xmas"]) .menu-compact a { border-radius: 3px; font-weight: 400; }
html:not([data-look="fun"], [data-look="xmas"]) .menu-compact a[aria-current="page"] { background: var(--sky); font-weight: 700; box-shadow: inset 3px 0 0 var(--ink); }
html:not([data-look="fun"], [data-look="xmas"]) .menu-compact .num { color: var(--yellow-deep); font-family: var(--body); }
html:not([data-look="fun"], [data-look="xmas"]) .menu-compact li + li.group-start { border-top: var(--line); }

html:not([data-look="fun"], [data-look="xmas"]) .look-switch,
html:not([data-look="fun"], [data-look="xmas"]) .lang-switch { border: var(--line); border-radius: 6px; padding: 2px; }
html:not([data-look="fun"], [data-look="xmas"]) .lang-switch a { border-radius: 4px; font-weight: 400; }
html:not([data-look="fun"], [data-look="xmas"]) .lang-switch a[aria-current="true"] { background: var(--ink); color: var(--paper); font-weight: 700; }
html:not([data-look="fun"], [data-look="xmas"]) .look-switch button { border-radius: 4px; }
html:not([data-look="fun"], [data-look="xmas"]) .look-thumb { top: 2px; left: 2px; border-radius: 4px; }

/* Titles and labels */
html:not([data-look="fun"], [data-look="xmas"]) .screen-title,
html:not([data-look="fun"], [data-look="xmas"]) .section-title,
html:not([data-look="fun"], [data-look="xmas"]) .page-title,
html:not([data-look="fun"], [data-look="xmas"]) .caption-title {
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

html:not([data-look="fun"], [data-look="xmas"]) .kicker { font-family: var(--body); font-weight: 700; letter-spacing: 0.14em; color: var(--yellow-deep); gap: 12px; }
html:not([data-look="fun"], [data-look="xmas"]) .kicker .dots i { width: 28px; height: 2px; border: 0; border-radius: 0; background: var(--yellow); }
html:not([data-look="fun"], [data-look="xmas"]) .kicker .dots i + i { display: none; }

html:not([data-look="fun"], [data-look="xmas"]) .lead { color: var(--ink-soft); }

html:not([data-look="fun"], [data-look="xmas"]) .next-link { border: 0; border-radius: 4px; background: var(--ink); color: var(--paper); }
html:not([data-look="fun"], [data-look="xmas"]) .next-link:hover { background: var(--yellow-deep); color: var(--paper); }

/* Home carousel: a framed picture and quiet controls. */
html:not([data-look="fun"], [data-look="xmas"]) .carousel-stage { border-radius: 6px; box-shadow: 0 22px 44px -24px rgba(0, 0, 0, 0.7); }
html:not([data-look="fun"], [data-look="xmas"]) .round-btn { border: var(--line); }
html:not([data-look="fun"], [data-look="xmas"]) .round-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
html:not([data-look="fun"], [data-look="xmas"]) .pair-btn span { width: 18px; height: 3px; border: 0; border-radius: 0; background: var(--rule); }
html:not([data-look="fun"], [data-look="xmas"]) .pair-btn span + span { display: none; }
html:not([data-look="fun"], [data-look="xmas"]) .pair-btn:hover span { background: var(--ink-soft); }
html:not([data-look="fun"], [data-look="xmas"]) .pair-btn[aria-current="true"] span,
html:not([data-look="fun"], [data-look="xmas"]) .pair-btn[aria-current="true"]:hover span { background: var(--ink); width: 32px; }

/* Lists of three or four: numbered cards with a yellow top rule. */
html:not([data-look="fun"], [data-look="xmas"]) .yellow-list { counter-reset: card; }
html:not([data-look="fun"], [data-look="xmas"]) .yellow-list li {
  counter-increment: card;
  border-radius: 6px;
  border-top: 3px solid var(--yellow);
  background: var(--white);
}
html:not([data-look="fun"], [data-look="xmas"]) .yellow-list .dots::before {
  content: counter(card, decimal-leading-zero);
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1;
  color: var(--yellow-deep);
}
html:not([data-look="fun"], [data-look="xmas"]) .yellow-list .dots i { display: none; }
html:not([data-look="fun"], [data-look="xmas"]) .yellow-list strong { font-weight: 600; }

/* Career chapters */
html:not([data-look="fun"], [data-look="xmas"]) .chapters { border-top: 1px solid var(--ink); }
html:not([data-look="fun"], [data-look="xmas"]) .chapters li + li { border-left: var(--line); }
html:not([data-look="fun"], [data-look="xmas"]) .chapters .years {
  font-family: var(--body);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow-deep);
}
html:not([data-look="fun"], [data-look="xmas"]) .chapters h3 { font-weight: 600; }
html:not([data-look="fun"], [data-look="xmas"]) .chapters-title { font-family: var(--body); font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; }

/* Year by year: a hairline with small marks. */
html:not([data-look="fun"], [data-look="xmas"]) .timeline > li::before { width: 1px; left: 74px; background: var(--rule); }
html:not([data-look="fun"], [data-look="xmas"]) .timeline .year { font-weight: 600; }
html:not([data-look="fun"], [data-look="xmas"]) .mark i { width: 11px; height: 11px; border-width: 1.5px; margin-top: 2px; }
html:not([data-look="fun"], [data-look="xmas"]) .mark.life i { background: var(--yellow); border-color: var(--yellow-deep); }
html:not([data-look="fun"], [data-look="xmas"]) .mark.life i + i { display: none; }
html:not([data-look="fun"], [data-look="xmas"]) .timeline .mark { padding: 0 6px; }
html:not([data-look="fun"], [data-look="xmas"]) .timeline .events .life-text { font-weight: 400; font-style: italic; }

/* Reading pages */
html:not([data-look="fun"], [data-look="xmas"]) .prose h2,
html:not([data-look="fun"], [data-look="xmas"]) .prose h3 { font-weight: 600; }
html:not([data-look="fun"], [data-look="xmas"]) .prose .accordion { border-color: var(--rule); border-width: 1px; }
html:not([data-look="fun"], [data-look="xmas"]) .prose .accordion summary::after { border: var(--line); border-radius: 4px; font-weight: 400; }
html:not([data-look="fun"], [data-look="xmas"]) .prose .accordion summary:hover::after,
html:not([data-look="fun"], [data-look="xmas"]) .prose .accordion[open] summary::after { background: var(--sky); }

/* The menu underline slides over a dark page: no multiply, or it would vanish. */
html:not([data-look="fun"], [data-look="xmas"])::view-transition-group(nav-pill) { mix-blend-mode: normal; }

/* Footer: plain text, no emoji. */
html:not([data-look="fun"], [data-look="xmas"]) .site-footer .emoji { display: none; }

@media (max-width: 1180px) {
  html:not([data-look="fun"], [data-look="xmas"]) .site-nav .nav-pill { inset: auto 8px -1px; }
}

@media (max-width: 900px) {
  html:not([data-look="fun"], [data-look="xmas"]) .site-nav .nav-pill { inset: auto 7px -1px; }
  html:not([data-look="fun"], [data-look="xmas"]) .chapters li:nth-child(n+3) { border-top: var(--line); }
}

@media (max-width: 640px) {
  html:not([data-look="fun"], [data-look="xmas"]) .timeline > li::before { left: 59px; }
  html:not([data-look="fun"], [data-look="xmas"]) .chapters li + li { border-left: 0; border-top: var(--line); }
  html:not([data-look="fun"], [data-look="xmas"]) .wordmark .since { left: 0; right: auto; bottom: -1.5em; }
}

/* ---------- Terminal look (💻) ----------
   The professional look on an old green-phosphor screen: it applies with
   html[data-look="term"] (?look=term in the address), which the professional
   rules above also match, so these only change what makes it a terminal. A
   narrow monospace (Iosevka) for the text and VT323 for the titles, green
   light on a black glass with the yellow turned amber, square corners,
   inverse video for the current section, faint scanlines and a slow refresh
   band over the window, the page title typed out with a blinking cursor, and
   the carousel drawings in green on the dark screen. Every animation
   stops with prefers-reduced-motion. */

html[data-look="term"] {
  --paper: #0B110D;
  --white: #101A14;
  --sky: #16271D;
  --picture: #101A14;
  --ink: #9CF5B4;
  --ink-soft: #62C483;
  --yellow: #FFB627;
  --yellow-deep: #FFC85A;
  --rule: #24502F;
  --display: "VT323", "Iosevka", ui-monospace, monospace;
  --body: "Iosevka", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --line: 1px solid var(--rule);
  color-scheme: dark;
}

html[data-look="term"] ::selection { background: var(--ink); color: var(--paper); text-shadow: none; }

/* Phosphor: every letter glows a little. */
html[data-look="term"] body {
  line-height: 1.55;
  text-shadow: 0 0 0.35em rgba(110, 255, 160, 0.28);
  font-variant-ligatures: none;
}
html[data-look="term"] :focus-visible { outline: 1px dashed var(--ink); outline-offset: 3px; border-radius: 0; }

/* The glass: scanlines and a darker rim, and a brighter band rolling down
   slowly like an old screen refreshing. Over everything, never in the way. */
html[data-look="term"] body::before,
html[data-look="term"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}
html[data-look="term"] body::before {
  background:
    radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, 0.45) 100%),
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.22) 2px 3px);
}
html[data-look="term"] body::after {
  top: -30vh;
  bottom: auto;
  height: 30vh;
  background: linear-gradient(to bottom, transparent, rgba(140, 255, 180, 0.045) 50%, transparent);
  animation: term-refresh 9s linear infinite;
}
@keyframes term-refresh { to { transform: translateY(160vh); } }

/* Titles in VT323, which is small for its size: a little bigger. */
html[data-look="term"] .screen-title,
html[data-look="term"] .section-title,
html[data-look="term"] .page-title,
html[data-look="term"] .caption-title {
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
  font-size: calc(var(--step-4) * 1.1);
}
html[data-look="term"] .section-title { font-size: calc(var(--step-3) * 1.1); }
/* A monospace is wider than the fun and professional type: a hair less
   spacing keeps the longest pages on one screen. */
html[data-look="term"] main p { letter-spacing: -0.015em; }
html[data-look="term"] .lead { line-height: 1.4; }
html[data-look="term"] .prose h2 { font-weight: 400; font-size: 1.3em; }
html[data-look="term"] .chapters h3,
html[data-look="term"] .yellow-list strong,
html[data-look="term"] .prose h3 { font-family: var(--body); font-weight: 700; }

/* The page title is typed out, after a prompt, and the cursor blinks after it. */
html[data-look="term"] .screen-title::before,
html[data-look="term"] .page-title::before,
html[data-look="term"] .caption-title::before {
  content: "$ " / "";
  color: var(--yellow);
}
html[data-look="term"] .screen-title::after,
html[data-look="term"] .page-title::after,
html[data-look="term"] .caption-title::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.78em;
  margin-left: 0.12em;
  vertical-align: -0.04em;
  background: var(--ink);
  box-shadow: 0 0 0.3em rgba(110, 255, 160, 0.5);
  animation: term-blink 1.06s steps(1) infinite;
}
/* The title's box is as wide as its text, so the typing runs over the words
   and not over the empty rest of the line: a short title takes as long to
   type as a long one, instead of appearing all at once. */
html[data-look="term"] .screen-title,
html[data-look="term"] .page-title {
  width: fit-content;
  max-width: 100%;
  animation: term-type 1.5s steps(30, end) both;
}
@keyframes term-type { from { clip-path: inset(-0.3em 100% -0.3em -0.5em); } to { clip-path: inset(-0.3em -1em -0.3em -0.5em); } }
@keyframes term-blink { 50% { opacity: 0; } }

/* Header: the logo in screen type, the current section in inverse video. */
html[data-look="term"] .site-header { border-bottom: 1px dashed var(--rule); }
html[data-look="term"] .wordmark { font-family: "VT323", var(--body); font-weight: 400; letter-spacing: 0.02em; }
html[data-look="term"] .wordmark .tail { color: var(--yellow); }
html[data-look="term"] .wordmark .eye ellipse { fill: var(--paper); stroke: var(--ink); }
html[data-look="term"] .wordmark .eye .pupil { fill: var(--ink); }
html[data-look="term"] .wordmark .since,
html[data-look="term"] .wordmark:hover .since { font-family: var(--body); letter-spacing: 0.08em; }

html[data-look="term"] .site-nav a[aria-current="page"] { color: var(--paper); text-shadow: none; }
html[data-look="term"] .site-nav a[aria-current="page"] .num { color: var(--paper); }
html[data-look="term"] .site-nav .num { font-family: var(--body); color: var(--yellow); }
html[data-look="term"] .site-nav .nav-pill {
  inset: 3px 2px;
  height: auto;
  border-radius: 0;
  background: var(--ink);
  box-shadow: 0 0 0.6em rgba(110, 255, 160, 0.35);
}
html[data-look="term"] .site-nav .group-break { width: auto; height: auto; background: none; margin: 0 4px; }
html[data-look="term"] .site-nav .group-break::before { content: "|"; color: var(--rule); }

html[data-look="term"] .menu-compact summary,
html[data-look="term"] .menu-compact nav,
html[data-look="term"] .menu-compact a,
html[data-look="term"] .look-switch,
html[data-look="term"] .lang-switch,
html[data-look="term"] .lang-switch a,
html[data-look="term"] .look-switch button,
html[data-look="term"] .look-thumb { border-radius: 0; }
html[data-look="term"] .menu-compact nav { border: var(--line); background: var(--paper); }
html[data-look="term"] .menu-compact a[aria-current="page"] { background: var(--ink); color: var(--paper); box-shadow: none; text-shadow: none; }
html[data-look="term"] .menu-compact a[aria-current="page"] .num { color: var(--paper); }
html[data-look="term"] .menu-compact .num { color: var(--yellow); }
html[data-look="term"] .menu-compact summary .dots i { background: var(--ink); }
html[data-look="term"] .lang-switch a[aria-current="true"] { background: var(--ink); color: var(--paper); text-shadow: none; }
html[data-look="term"] .look-thumb { background: var(--ink-soft); }

/* Labels and links */
html[data-look="term"] .kicker { color: var(--yellow); letter-spacing: 0.1em; }
html[data-look="term"] .kicker .dots i { background: var(--yellow); }
html[data-look="term"] a { text-decoration-style: dotted; text-underline-offset: 4px; }
html[data-look="term"] .next-link { border: 1px solid var(--ink); border-radius: 0; background: none; color: var(--ink); }
html[data-look="term"] .next-link:hover { background: var(--ink); color: var(--paper); text-shadow: none; }

/* Cards: windows on the screen, numbered [01], [02]... */
html[data-look="term"] .yellow-list li {
  border: var(--line);
  border-top: 1px solid var(--ink-soft);
  border-radius: 0;
  background: var(--white);
}
html[data-look="term"] .yellow-list .dots::before {
  content: "[" counter(card, decimal-leading-zero) "]";
  font-family: var(--body);
  font-size: var(--step-0);
  font-weight: 700;
  color: var(--yellow);
}

/* Home carousel: its own pictures (assets/carousel/term/), green line art on
   dark glass with the yellow things kept yellow. */
html[data-look="term"] .carousel-stage { border: var(--line); border-radius: 0; box-shadow: 0 0 2.4em -0.6em rgba(110, 255, 160, 0.25); }
html[data-look="term"] .round-btn { border-radius: 0; }
html[data-look="term"] .round-btn:hover { text-shadow: none; }
html[data-look="term"] .pair-btn[aria-current="true"] span,
html[data-look="term"] .pair-btn[aria-current="true"]:hover span { background: var(--yellow); }

/* Career, timeline and reading pages */
html[data-look="term"] .chapters .years,
html[data-look="term"] .chapters-title { color: var(--yellow); }
html[data-look="term"] .timeline .year { font-family: "VT323", var(--body); font-weight: 400; font-size: 1.3em; color: var(--yellow); }
html[data-look="term"] .mark i { border-radius: 0; }
html[data-look="term"] .mark.life i { background: var(--yellow); border-color: var(--yellow); }
html[data-look="term"] .prose .accordion summary::after { border-radius: 0; }

@media (prefers-reduced-motion: reduce) {
  html[data-look="term"] body::after,
  html[data-look="term"] .screen-title,
  html[data-look="term"] .page-title,
  html[data-look="term"] .screen-title::after,
  html[data-look="term"] .page-title::after,
  html[data-look="term"] .caption-title::after { animation: none; }
}

/* ---------- Christmas look (🎅) ----------
   The fun look dressed for the season, on a pine-green night: snow falling
   behind the page, string lights twinkling under the header, the pairs of
   dots turned into red and gold baubles that swing, a Santa hat on the logo's
   first eye and snow settled on the cards and the carousel. It applies with
   html[data-look="xmas"] (?look=xmas in the address) over the fun rules; the
   carousel shows its own Christmas photos. Every animation stops with
   prefers-reduced-motion. --red is the season's accent: the pill of the
   current section, the language and the buttons. */

html[data-look="xmas"] {
  --paper: #0F3A2C;
  --white: #164A3A;
  --sky: #1F5C48;
  --ink: #FFF8EC;
  --ink-soft: #CFE2D6;
  --yellow: #F7C548;
  --yellow-deep: #FFD978;
  --red: #C81E35;
  color-scheme: dark;
}

html[data-look="xmas"] ::selection { background: var(--red); color: var(--ink); }

/* Snow: two layers of flakes (small and slow, big and quicker) on the whole
   window, behind the text and the cards. Each layer is a repeating tile that
   slides down by exactly one tile per loop, so it never jumps. */
html[data-look="xmas"] body::before,
html[data-look="xmas"] body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}
html[data-look="xmas"] body::before {
  top: -310px;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='310' height='310'%3E%3Ccircle cx='141' cy='173' r='1.8' fill='%23fff' fill-opacity='0.61'/%3E%3Ccircle cx='157' cy='182' r='1.0' fill='%23fff' fill-opacity='0.63'/%3E%3Ccircle cx='194' cy='244' r='0.9' fill='%23fff' fill-opacity='0.54'/%3E%3Ccircle cx='31' cy='249' r='1.6' fill='%23fff' fill-opacity='0.42'/%3E%3Ccircle cx='302' cy='296' r='1.5' fill='%23fff' fill-opacity='0.68'/%3E%3Ccircle cx='51' cy='8' r='1.4' fill='%23fff' fill-opacity='0.43'/%3E%3Ccircle cx='61' cy='77' r='0.8' fill='%23fff' fill-opacity='0.61'/%3E%3Ccircle cx='137' cy='259' r='1.4' fill='%23fff' fill-opacity='0.69'/%3E%3Ccircle cx='155' cy='204' r='1.3' fill='%23fff' fill-opacity='0.53'/%3E%3Ccircle cx='306' cy='306' r='1.7' fill='%23fff' fill-opacity='0.72'/%3E%3Ccircle cx='99' cy='73' r='1.1' fill='%23fff' fill-opacity='0.43'/%3E%3Ccircle cx='236' cy='125' r='1.7' fill='%23fff' fill-opacity='0.57'/%3E%3Ccircle cx='294' cy='261' r='0.8' fill='%23fff' fill-opacity='0.49'/%3E%3Ccircle cx='280' cy='146' r='1.9' fill='%23fff' fill-opacity='0.58'/%3E%3Ccircle cx='25' cy='194' r='1.7' fill='%23fff' fill-opacity='0.52'/%3E%3Ccircle cx='29' cy='104' r='1.9' fill='%23fff' fill-opacity='0.74'/%3E%3Ccircle cx='39' cy='78' r='0.9' fill='%23fff' fill-opacity='0.43'/%3E%3Ccircle cx='245' cy='57' r='1.4' fill='%23fff' fill-opacity='0.60'/%3E%3Ccircle cx='61' cy='225' r='0.9' fill='%23fff' fill-opacity='0.69'/%3E%3Ccircle cx='38' cy='131' r='1.0' fill='%23fff' fill-opacity='0.52'/%3E%3Ccircle cx='298' cy='247' r='1.1' fill='%23fff' fill-opacity='0.80'/%3E%3Ccircle cx='67' cy='123' r='1.7' fill='%23fff' fill-opacity='0.69'/%3E%3C/svg%3E") repeat 0 0 / 310px 310px;
  animation: xmas-snow-small 19s linear infinite;
}
html[data-look="xmas"] body::after {
  top: -530px;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='530' height='530'%3E%3Ccircle cx='56' cy='521' r='2.3' fill='%23fff' fill-opacity='0.60'/%3E%3Ccircle cx='408' cy='175' r='2.4' fill='%23fff' fill-opacity='0.53'/%3E%3Ccircle cx='50' cy='308' r='2.3' fill='%23fff' fill-opacity='0.74'/%3E%3Ccircle cx='198' cy='240' r='3.3' fill='%23fff' fill-opacity='0.69'/%3E%3Ccircle cx='304' cy='457' r='2.3' fill='%23fff' fill-opacity='0.56'/%3E%3Ccircle cx='479' cy='432' r='2.3' fill='%23fff' fill-opacity='0.58'/%3E%3Ccircle cx='390' cy='496' r='2.3' fill='%23fff' fill-opacity='0.88'/%3E%3Ccircle cx='465' cy='319' r='2.6' fill='%23fff' fill-opacity='0.54'/%3E%3Ccircle cx='23' cy='507' r='2.3' fill='%23fff' fill-opacity='0.78'/%3E%3C/svg%3E") repeat 90px 0 / 530px 530px;
  animation: xmas-snow-big 13s linear infinite;
}
@keyframes xmas-snow-small { to { transform: translate3d(0, 310px, 0); } }
@keyframes xmas-snow-big { to { transform: translate3d(0, 530px, 0); } }

/* String lights under the header: two strings of bulbs on the same wire,
   twinkling out of step. */
html[data-look="xmas"] .site-header { position: relative; }
html[data-look="xmas"] .site-header::before,
html[data-look="xmas"] .site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -16px;
  height: 24px;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: 112px 24px;
  animation: xmas-twinkle 1.8s ease-in-out infinite alternate;
}
html[data-look="xmas"] .site-header::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='24'%3E%3Cpath d='M0 3 Q14 11 28 11 Q42 11 56 3 Q70 11 84 11 Q98 11 112 3' fill='none' stroke='%230A2A1F' stroke-width='1.6'/%3E%3Crect x='25.8' y='9.5' width='4.4' height='3.4' rx='1' fill='%23C9B37A'/%3E%3Cellipse cx='28' cy='17.0' rx='3.6' ry='5' fill='%23E23B4E'/%3E%3Cellipse cx='26.9' cy='15.3' rx='1' ry='1.6' fill='%23fff' fill-opacity='0.6'/%3E%3Crect x='81.8' y='9.5' width='4.4' height='3.4' rx='1' fill='%23C9B37A'/%3E%3Cellipse cx='84' cy='17.0' rx='3.6' ry='5' fill='%23F7C548'/%3E%3Cellipse cx='82.9' cy='15.3' rx='1' ry='1.6' fill='%23fff' fill-opacity='0.6'/%3E%3C/svg%3E"); }
html[data-look="xmas"] .site-header::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='24'%3E%3Cpath d='M0 3 Q14 11 28 11 Q42 11 56 3 Q70 11 84 11 Q98 11 112 3' fill='none' stroke='%230A2A1F' stroke-width='1.6'/%3E%3Crect x='1.8' y='3.5' width='4.4' height='3.4' rx='1' fill='%23C9B37A'/%3E%3Cellipse cx='4' cy='11.0' rx='3.6' ry='5' fill='%234CC38A'/%3E%3Cellipse cx='2.9' cy='9.3' rx='1' ry='1.6' fill='%23fff' fill-opacity='0.6'/%3E%3Crect x='57.8' y='3.5' width='4.4' height='3.4' rx='1' fill='%23C9B37A'/%3E%3Cellipse cx='60' cy='11.0' rx='3.6' ry='5' fill='%235AA9F0'/%3E%3Cellipse cx='58.9' cy='9.3' rx='1' ry='1.6' fill='%23fff' fill-opacity='0.6'/%3E%3C/svg%3E"); animation-delay: -0.9s; }
@keyframes xmas-twinkle {
  from { opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 230, 150, 0.75)); }
  to { opacity: 0.45; filter: none; }
}

/* The logo: a Santa hat on the first eye, which wobbles on hover. */
html[data-look="xmas"] .wordmark .eyes { position: relative; }
html[data-look="xmas"] .wordmark .eyes::before {
  content: "";
  position: absolute;
  left: -0.22em;
  top: -0.6em;
  z-index: 1;
  width: 0.98em;
  height: 0.8em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 36'%3E%3Cpath d='M5 27 C7 14 15 4 26 4 C33 4 38 10 39 18 C35 14 31 13 28 14 C32 18 33 23 34 27 Z' fill='%23D7263D' stroke='%230A2A1F' stroke-width='1.6' stroke-linejoin='round'/%3E%3Crect x='2' y='24' width='35' height='9' rx='4.5' fill='%23FFF8EC' stroke='%230A2A1F' stroke-width='1.6'/%3E%3Ccircle cx='39' cy='19' r='4.6' fill='%23FFF8EC' stroke='%230A2A1F' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: rotate(-16deg);
  transform-origin: 40% 90%;
  pointer-events: none;
}
html[data-look="xmas"] .wordmark:hover .eyes::before { animation: xmas-hat 700ms ease-in-out; }
@keyframes xmas-hat {
  0%, 100% { transform: rotate(-16deg); }
  30% { transform: rotate(-4deg) translateY(-2px); }
  60% { transform: rotate(-22deg); }
}
html[data-look="xmas"] .wordmark .tail { -webkit-text-stroke-color: var(--paper); }
html[data-look="xmas"] .wordmark .since { background: var(--red); border-color: var(--ink); color: var(--ink); }

/* Red where the fun look is yellow behind text: the current section, the
   language, the menu and the buttons. */
html[data-look="xmas"] .site-nav .nav-pill { background: var(--red); }
html[data-look="xmas"] .site-nav a[aria-current="page"] .num { color: var(--ink); }
html[data-look="xmas"] .site-nav .group-break i:first-child { background: var(--red); }
html[data-look="xmas"] .lang-switch a[aria-current="true"],
html[data-look="xmas"] .menu-compact[open] summary,
html[data-look="xmas"] .menu-compact a[aria-current="page"] { background: var(--red); }
html[data-look="xmas"] .menu-compact a[aria-current="page"] .num { color: var(--ink); }
html[data-look="xmas"] .menu-compact nav { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
html[data-look="xmas"] .next-link { background: var(--red); }
html[data-look="xmas"] .next-link:hover,
html[data-look="xmas"] .round-btn:hover { background: var(--red); color: var(--ink); }
html[data-look="xmas"] .next-link:hover { background: var(--white); }
html[data-look="xmas"] .prose .accordion summary:hover::after,
html[data-look="xmas"] .prose .accordion[open] summary::after { background: var(--red); }
html[data-look="xmas"] .pair-btn[aria-current="true"] span:first-child,
html[data-look="xmas"] .pair-btn[aria-current="true"]:hover span:first-child { background: var(--red); }

/* Baubles: every pair of dots is a red and a gold Christmas ball with a little
   cap; on the cards and the page labels they swing gently. */
html[data-look="xmas"] .dots i,
html[data-look="xmas"] .mark.life i { position: relative; overflow: visible; }
html[data-look="xmas"] .dots i:first-child,
html[data-look="xmas"] .mark.life i:first-child {
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.7) 0 16%, transparent 18%), var(--red);
}
html[data-look="xmas"] .dots i:last-child,
html[data-look="xmas"] .mark.life i:last-child {
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.75) 0 16%, transparent 18%), var(--yellow);
}
html[data-look="xmas"] .dots i::before,
html[data-look="xmas"] .mark.life i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -34%;
  width: 42%;
  height: 26%;
  border-radius: 1px 1px 0 0;
  background: #C9B37A;
  transform: translateX(-50%);
}
html[data-look="xmas"] .yellow-list .dots i,
html[data-look="xmas"] .kicker .dots i {
  transform-origin: 50% -60%;
  animation: xmas-swing 2.8s ease-in-out infinite alternate;
}
html[data-look="xmas"] .yellow-list .dots i:last-child,
html[data-look="xmas"] .kicker .dots i:last-child { animation-delay: -1.4s; }
html[data-look="xmas"] .yellow-list li:hover .dots i { animation-duration: 0.9s; }
@keyframes xmas-swing {
  from { transform: rotate(-9deg); }
  to { transform: rotate(9deg); }
}

/* Snow settled on top of the cards and the carousel: a drift with a flat base
   resting on the top border (its base on the border's inner edge, so the white
   border and the snow join), bumps rising above it and ends thinning out
   where the corners start to curve. The carousel frame stops clipping (the
   photos are rounded instead) so its drift can sit outside it too. */
html[data-look="xmas"] .yellow-list li { position: relative; }
html[data-look="xmas"] .yellow-list li::before,
html[data-look="xmas"] .carousel-stage::after {
  content: "";
  position: absolute;
  bottom: 100%;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16' preserveAspectRatio='none' viewBox='0 0 120 16'%3E%3Cpath d='M0 16 C3 13 7 10 12 9 C16 4 24 3 30 7 C36 1 46 1 52 6 C58 2 68 2 74 6 C80 1 92 2 98 7 C104 4 110 6 112 10 C115 12 118 14 120 16 Z' fill='%23FFFFFF'/%3E%3C/svg%3E") no-repeat center bottom / 100% 100%;
}
html[data-look="xmas"] .yellow-list li::before { left: 16px; right: 16px; height: 11px; }
html[data-look="xmas"] .carousel-stage { overflow: visible; }
html[data-look="xmas"] .carousel-stage .slide { border-radius: 25px; overflow: hidden; }
html[data-look="xmas"] .carousel-stage::after { left: 20px; right: 20px; height: 17px; z-index: 2; }
@media (max-width: 640px) {
  html[data-look="xmas"] .carousel-stage .slide { border-radius: 15px; }
  html[data-look="xmas"] .carousel-stage::after { left: 12px; right: 12px; height: 13px; }
}

/* Presents: one falls on every page and piles up on the line above the
   footer until there are ten (js/gifts.js, which also sets the layer's height to the
   page's). Their own layer, in front of the page but under the phone menu,
   never in the way of a click, and still between pages (its own
   view-transition name). */
.gifts { display: none; }
html[data-look="xmas"] .gifts {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  view-transition-name: gifts;
}
html[data-look="xmas"] .gift {
  position: absolute;
  transform: rotate(var(--tilt, 0deg));
  transform-origin: 50% 100%;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}
html[data-look="xmas"] .gift svg { display: block; }
/* Where pages scroll anyway (phones, the privacy page), leave the gifts room
   above the footer's line, so they don't stand on the last words of the page;
   the one-screen pages already have it. */
html[data-look="xmas"] .page-scroll main { padding-bottom: 72px; }
@media (max-width: 760px) {
  html[data-look="xmas"] main { padding-bottom: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-look="xmas"] body::before,
  html[data-look="xmas"] body::after,
  html[data-look="xmas"] .site-header::before,
  html[data-look="xmas"] .site-header::after,
  html[data-look="xmas"] .yellow-list .dots i,
  html[data-look="xmas"] .kicker .dots i,
  html[data-look="xmas"] .wordmark:hover .eyes::before { animation: none; }
}

/* ---------- Look switch: the animation ----------
   With view transitions (js/look.js adds .look-switching for the length of
   it), the page is taken as one picture and the new look opens over the old
   one in a circle centred on the button pressed (--look-x, --look-y, radius
   --look-r). The switch itself stays live on top, so its thumb is seen
   sliding. Without view transitions, colours, borders and corners fade
   (.look-fading). Instant with prefers-reduced-motion. */

html.look-switching main,
html.look-switching .gifts,
html.look-switching .site-nav .nav-pill { view-transition-name: none; }
html.look-switching .look-switch { view-transition-name: look-switch; }

html.look-switching::view-transition-old(root) { animation: 700ms cubic-bezier(0.65, 0, 0.35, 1) both look-recede; }
html.look-switching::view-transition-new(root) {
  animation: 700ms cubic-bezier(0.65, 0, 0.35, 1) both look-reveal;
  mix-blend-mode: normal;
}
html.look-switching::view-transition-old(look-switch) { display: none; }
html.look-switching::view-transition-new(look-switch) { animation: none; }
html.look-switching::view-transition-group(look-switch) { animation: none; }

@keyframes look-reveal {
  from { clip-path: circle(0 at var(--look-x, 100%) var(--look-y, 0)); }
  to { clip-path: circle(var(--look-r, 150vmax) at var(--look-x, 100%) var(--look-y, 0)); }
}

@keyframes look-recede { to { transform: scale(0.985); } }

html.look-fading *,
html.look-fading *::before,
html.look-fading *::after {
  transition: background-color 550ms ease, color 550ms ease, border-color 550ms ease,
    border-radius 550ms ease, box-shadow 550ms ease, opacity 550ms ease !important;
}

@media (prefers-reduced-motion: reduce) {
  .look-thumb, .look-switch button span { transition: none; }
}
html.look-fading .look-thumb { transition: transform 420ms cubic-bezier(0.65, 0, 0.35, 1) !important; }
