/* ---------- font (self-hosted, Archivo with weight + width axes) ---------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo-latin-wdth-normal.e3a28eade2.woff2") format("woff2-variations");
  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: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo-latin-ext-wdth-normal.5717f37059.woff2") format("woff2-variations");
  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;
}

/* ---------- tokens: black and white only ----------
   Light mode is white end to end, dark mode is black end to end.
   Thin lines mark where the hero and the contact section begin and end. */
:root {
  --bg: #ffffff;
  --ink: #000000;
  --muted: #5c5c5c;
  --line: #e2e2e2;
  --cell: #e6e6e6;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --ink: #ffffff;
  --muted: #a3a3a3;
  --line: #2c2c2c;
  --cell: #232323;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --ink: #ffffff;
    --muted: #a3a3a3;
    --line: #2c2c2c;
    --cell: #232323;
    color-scheme: dark;
  }
}

:root {
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.1rem + 2.2vw, 2.75rem);
  --step-4: clamp(3.5rem, 2rem + 6vw, 7.5rem);
  --step-hero: clamp(2.6rem, 0.4rem + 9.6vw, 10rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --radius: 0;
  --motion-150: 150ms;
  --motion-200: 200ms;
  --motion-300: 300ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--space-8);
  scroll-padding-bottom: 6rem;
  background: var(--bg);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  padding-bottom: 6rem; /* room for the dock */
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
.panel {
  background: var(--bg);
  color: var(--ink);
}
::selection {
  background: var(--ink);
  color: var(--bg);
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-weight: 650;
  text-wrap: balance;
}
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}
p {
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--muted);
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
code {
  font-size: 0.92em;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.wrap {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
.skip {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  z-index: 20;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}
.skip:focus {
  top: var(--space-2);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-stretch: 105%;
  font-size: var(--step-0);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn.quiet {
  border-color: transparent;
  padding-inline: var(--space-2);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 0.22em;
}
.btn.quiet:hover {
  background: transparent;
  color: var(--ink);
  text-decoration-color: currentColor;
}
.linklike {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 0.22em;
}
.linklike:hover {
  text-decoration-color: currentColor;
}
.tool {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  font-size: var(--step--1);
  font-stretch: 110%;
  text-decoration: none;
  cursor: pointer;
}
.tool:hover {
  border-color: var(--ink);
}

/* theme icon shows the theme you switch to */
.theme .i-sun {
  display: none;
}
:root[data-theme="dark"] .theme .i-sun {
  display: block;
}
:root[data-theme="dark"] .theme .i-moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .i-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme .i-moon {
    display: none;
  }
}

/* ---------- slab: the dock's visual language, reused for key surfaces ---------- */
.slab {
  background: var(--bg);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
/* tactile press for controls that live on a slab */
.slab .tool:active,
.slab .btn:active,
.dock a:active,
.dock .tool:active {
  transform: translate(1px, 1px);
}

/* ---------- live items: the one at the reading line gets the dock treatment ----------
   A frame + offset shadow fades in and the item lifts by 2px, just like the
   dock's active entry moves with the page. Only opacity and transform animate. */
.live {
  position: relative;
  isolation: isolate;
  transition: transform var(--motion-200) var(--ease-out);
}
.live::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(var(--space-3) * -1) calc(var(--space-4) * -1);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-200) var(--ease-out);
}
@media (max-width: 40rem) {
  .live::before {
    inset: calc(var(--space-3) * -1) calc(var(--space-3) * -1);
  }
}
.live-tight::before {
  inset: -1px;
}
.live.is-active {
  transform: translate(-2px, -2px);
}
.live.is-active::before {
  opacity: 1;
}
/* a clicked item is focused; its frame is the focus indicator */
.live:focus {
  outline: none;
}
.gh-row {
  width: fit-content;
}

/* ---------- navigation dock (bottom, centred) ---------- */
.dock {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  max-width: calc(100vw - 1.5rem);
  padding: var(--space-1);
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: var(--step--1);
}
.dock-links {
  display: flex;
  gap: 2px;
  min-width: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.dock-links::-webkit-scrollbar {
  display: none;
}
.dock-links a {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding-inline: var(--space-4);
  color: var(--muted);
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}
.dock-links a:hover {
  color: var(--ink);
}
.dock-links a[aria-current="true"] {
  background: var(--ink);
  color: var(--bg);
}
.dock-sep {
  flex: none;
  width: 1px;
  height: 24px;
  margin-inline: var(--space-1);
  background: var(--line);
}
.dock-tools {
  flex: none;
  display: flex;
}
@media (max-width: 40rem) {
  .dock {
    left: 0.75rem;
    right: 0.75rem;
    transform: none;
    max-width: none;
  }
  .dock-links {
    flex: 1;
  }
  /* fade only the side where more links are hidden */
  .dock-links[data-more="right"] {
    mask-image: linear-gradient(to right, #000 80%, transparent);
  }
  .dock-links[data-more="left"] {
    mask-image: linear-gradient(to left, #000 80%, transparent);
  }
  .dock-links[data-more="both"] {
    mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent);
  }
  .dock-links a {
    padding-inline: var(--space-3);
  }
}

/* ---------- hero: a console that answers questions about me, like kAIser ----------
   Same language as the dock: a slab with segmented tabs (active = filled),
   a sources bar along the bottom, and an index of the whole page whose
   squares fill in for the entries an answer cites. */
.hero {
  padding-block: clamp(3rem, 8vw, 7rem) var(--space-6);
}
.console {
  display: flex;
  flex-direction: column;
}

/* tabs: the questions, styled exactly like the dock links */
.console-tabs {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: var(--space-1);
  list-style: none;
  border-bottom: 1px solid var(--ink);
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.console-tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  min-height: 44px;
  padding-inline: var(--space-4);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover {
  color: var(--ink);
}
.tab[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}
.tab:active {
  transform: translate(1px, 1px);
}
@media (max-width: 40rem) {
  .console-tabs[data-more="right"] {
    mask-image: linear-gradient(to right, #000 80%, transparent);
  }
  .console-tabs[data-more="left"] {
    mask-image: linear-gradient(to left, #000 80%, transparent);
  }
  .console-tabs[data-more="both"] {
    mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent);
  }
}

.console-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem);
  gap: var(--space-8) clamp(2rem, 5vw, 4rem);
  padding: clamp(1.25rem, 4vw, 3rem);
}
@media (max-width: 64rem) {
  .console-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

.q {
  max-width: 13ch;
  min-height: 1.9em; /* two lines reserved: switching questions never shifts the page */
  font-size: clamp(2.25rem, 0.6rem + 5.4vw, 5.75rem);
  font-weight: 800;
  font-stretch: 115%;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-inline-start: -0.04em;
}
.caret {
  display: inline-block;
  width: 0.08em;
  height: 0.78em;
  margin-inline-start: 0.06em;
  background: currentColor;
  vertical-align: -0.02em;
  opacity: 0;
}
.is-typing .caret {
  opacity: 1;
}
.answer,
.console-sources {
  transition: opacity var(--motion-150) var(--ease-in);
}
.answer.is-out,
.console-sources.is-out {
  opacity: 0;
}
.answer {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.a {
  max-width: 42ch;
  min-height: calc(4 * 1.4em);
  font-size: clamp(1.125rem, 0.85rem + 1.1vw, 1.75rem);
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.a a:not(.cite) {
  text-decoration-color: var(--ink);
}
.cite {
  display: inline-grid;
  place-items: center;
  min-width: 1.4em;
  height: 1.4em;
  margin-inline-start: 0.3em;
  padding-inline: 0.2em;
  border: 1px solid var(--ink);
  font-size: 0.55em;
  font-weight: 650;
  line-height: 1;
  vertical-align: 0.5em;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.cite:hover,
.cite:focus-visible {
  background: var(--ink);
  color: var(--bg);
}

/* index of the page: one row per section, one square per entry */
.index {
  align-self: start;
  padding-inline-start: clamp(1.5rem, 3vw, 2.5rem);
  border-inline-start: 1px solid var(--line);
  font-size: var(--step--1);
}
.index-title {
  margin-bottom: var(--space-4);
  color: var(--muted);
}
.index ul {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.index li {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
}
.index-label {
  color: var(--muted);
}
.index-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cell {
  position: relative;
  width: 20px;
  height: 20px;
  background: var(--cell);
}
.cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity var(--motion-150) var(--ease-out) var(--d, 0ms),
    transform var(--motion-300) var(--ease-out) var(--d, 0ms);
}
.cell.is-hit::after {
  opacity: 1;
  transform: none;
}
.cell:hover,
.cell:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}
@media (max-width: 64rem) {
  .index {
    padding-inline-start: 0;
    padding-top: var(--space-6);
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }
}
@media (pointer: coarse) {
  .cell {
    width: 24px; /* WCAG 2.2 minimum target size */
    height: 24px;
  }
  .index-cells {
    gap: 5px;
  }
  .index li {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }
}

/* sources: a segmented bar along the bottom of the console */
.console-sources {
  border-top: 1px solid var(--ink);
}
.sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}
.sources li + li {
  border-inline-start: 1px solid var(--line);
}
.sources a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-2) var(--space-4);
  color: var(--ink);
  text-decoration: none;
}
.sources strong {
  font-weight: 650;
}
.sources .n {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.sources a:hover,
.console:has(.cite[data-n="1"]:hover) .sources [data-n="1"] a,
.console:has(.cite[data-n="2"]:hover) .sources [data-n="2"] a,
.console:has(.cite[data-n="3"]:hover) .sources [data-n="3"] a,
.console:has(.cite[data-n="4"]:hover) .sources [data-n="4"] a {
  background: var(--ink);
  color: var(--bg);
}
.sources a:hover .n,
.console:has(.cite[data-n="1"]:hover) .sources [data-n="1"] .n,
.console:has(.cite[data-n="2"]:hover) .sources [data-n="2"] .n,
.console:has(.cite[data-n="3"]:hover) .sources [data-n="3"] .n,
.console:has(.cite[data-n="4"]:hover) .sources [data-n="4"] .n {
  color: var(--bg);
  border-color: var(--bg);
}
@media (max-width: 40rem) {
  .sources {
    grid-template-columns: minmax(0, 1fr);
  }
  .sources li + li {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }
}

/* the one orchestrated load moment: sentences, then sources */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.s,
.sources li {
  animation: rise var(--motion-300) var(--ease-out) both;
}
.s:nth-child(1) { animation-delay: 150ms; }
.s:nth-child(2) { animation-delay: 450ms; }
.s:nth-child(3) { animation-delay: 750ms; }
.s:nth-child(4) { animation-delay: 1050ms; }
.sources li { animation-delay: 1050ms; }
.sources li:nth-child(2) { animation-delay: 1150ms; }
.sources li:nth-child(3) { animation-delay: 1250ms; }
.sources li:nth-child(4) { animation-delay: 1350ms; }

.note {
  max-width: 64ch;
  margin-top: var(--space-6);
  color: var(--muted);
  font-size: var(--step--1);
}

/* ---------- sections ---------- */
.sec {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--space-6) var(--space-12);
  padding-block: var(--space-8) var(--space-24);
  border-top: 1px solid var(--ink);
}
.sec:first-child {
  margin-top: var(--space-24);
}
.sec > h2 {
  font-size: var(--step-3);
  font-weight: 750;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  line-height: 1;
}
.sec-body {
  display: grid;
  gap: var(--space-8);
  max-width: 46rem;
}
.intro {
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}
@media (max-width: 48rem) {
  .sec {
    grid-template-columns: minmax(0, 1fr);
    padding-block: var(--space-6) var(--space-16);
  }
  .sec:first-child {
    margin-top: var(--space-16);
  }
}

/* experience + education */
.entries {
  display: grid;
  gap: var(--space-12);
  padding: 0;
  list-style: none;
}
.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
}
.entry h3 {
  font-size: var(--step-2);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.015em;
}
.time {
  color: var(--muted);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.role {
  color: var(--muted);
  margin-top: var(--space-1);
}
.points {
  margin-top: var(--space-4);
  padding-inline-start: 1.1em;
  display: grid;
  gap: var(--space-2);
  list-style-type: square;
}
.points li::marker {
  color: var(--ink);
}

/* the 390 feature: one square per migrated entity */
.feature {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-12);
}
.feature figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-6);
}
.feature-num {
  font-size: var(--step-4);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.8;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.feature-cap {
  max-width: 14rem;
  font-size: var(--step-1);
  font-weight: 550;
  line-height: 1.25;
}
.cells {
  display: grid;
  grid-template-columns: repeat(26, 1fr);
  grid-template-rows: repeat(15, auto);
  grid-auto-flow: column;
  gap: 3px;
}
.cells i {
  position: relative;
  aspect-ratio: 1;
  background: var(--cell); /* the empty slot in the target */
}
.cells i::after {
  /* the entity itself: flies in from the source and lands in its slot */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
}
/* Scroll-scrubbed: JS sets --p (0..1) on the grid from the scroll position,
   and each cell has its own start --s and flight path --x/--y/--r.
   Scrolling back up runs the migration in reverse. */
.cells.is-scrub i {
  --q: clamp(0, (var(--p, 1) - var(--s, 0)) * 5, 1);
  --e: calc(var(--q) * (2 - var(--q)));
}
.cells.is-scrub i::after {
  opacity: clamp(0, var(--q) * 4, 1);
  transform: translate(calc(var(--x, 0px) * (1 - var(--e))), calc(var(--y, 0px) * (1 - var(--e))))
    rotate(calc(var(--r, 0deg) * (1 - var(--e)))) scale(calc(0.45 + 0.55 * var(--e)));
}
/* when the last one lands, one wave runs through the grid */
@keyframes wave {
  45% {
    transform: scale(0.35);
  }
}
.cells.is-done i::after {
  animation: wave 450ms var(--ease-out) var(--w, 0ms);
}
.feature-foot {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
}
.progress {
  flex: 1;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: left;
}
.pct {
  min-width: 4.5ch;
  text-align: right;
  font-size: var(--step--1);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* employer and client logos: one-colour stencils filled with the text colour */
.mark {
  display: inline-block;
  flex: none;
  background: currentColor;
  mask: var(--logo) center / contain no-repeat;
  -webkit-mask: var(--logo) center / contain no-repeat;
}
.mark-rhi-magnesita {
  --logo: url("/logos/rhi-magnesita.png");
  height: 1.5em;
  aspect-ratio: 400 / 237;
}
.mark-bmlv {
  --logo: url("/logos/bmlv.svg");
  display: block;
  height: 2.5rem;
  aspect-ratio: 324 / 68.5;
  margin-block: var(--space-2);
}
.entry h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

/* projects */
.projects {
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.project {
  position: relative;
  display: grid;
  gap: var(--space-2);
  margin-inline: calc(var(--space-4) * -1);
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--line);
}
.project h3 {
  font-size: var(--step-2);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.015em;
}
.project h3 a {
  text-decoration: none;
}
.project h3 a::after {
  /* the whole row is the link */
  content: "";
  position: absolute;
  inset: 0;
}
.project h3 svg {
  display: inline-block;
  margin-inline-start: 0.3em;
  vertical-align: -0.05em;
  transition: transform var(--motion-150) var(--ease-out);
}
.project > p {
  color: var(--muted);
}
.project > .project-label {
  color: var(--ink);
  font-weight: 550;
}
.project.is-featured {
  margin: var(--space-4) 0 var(--space-8);
  padding: var(--space-6);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.project.is-featured + .project:not(.is-featured) {
  border-top-color: var(--line);
}
.is-featured h3 {
  font-size: var(--step-3);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}
.stack li {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  line-height: 1.4;
}
.entry .stack {
  margin-top: var(--space-4);
}
.defs .stack {
  margin-top: 0;
  color: var(--ink);
}
.defs-note {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--step--1);
}

/* logos: monochrome, inherit the text colour so they follow the theme */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.logo {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
}
.tool .logo {
  width: 20px;
  height: 20px;
}
.gh {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
@media (hover: hover) {
.project.is-link:hover {
  background: var(--ink);
  color: var(--bg);
  border-top-color: var(--ink);
}
.project.is-link:hover > p {
  color: var(--bg);
  opacity: 0.72;
}
.project.is-link:hover .stack li {
  border-color: currentColor;
}
.project.is-link:hover h3 svg {
  transform: translate(3px, -3px);
}
}
.project:has(:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.project h3 a:focus-visible {
  outline: none;
}

/* definition lists */
.defs > div {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: var(--space-1) var(--space-6);
  padding-block: var(--space-4);
  border-top: 1px solid var(--line);
}
.defs > div:first-child {
  border-top: 0;
}
.defs > div.is-active,
.defs > div.is-active + div {
  border-top-color: transparent;
}
.defs dt {
  font-weight: 650;
}
.defs dd {
  color: var(--muted);
}
@media (max-width: 36rem) {
  .defs > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* contact (inverted panel) */
.contact-panel {
  border-top: 1px solid var(--line);
}
.contact-panel .sec {
  border-top: 0;
  padding-block: var(--space-24);
  margin-top: 0;
}
.mail-box {
  border: 1px solid var(--ink);
  display: flex;
  align-items: stretch;
  max-width: 100%;
  width: fit-content;
}
.mail {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: var(--space-3) clamp(0.75rem, 2vw, 1rem);
  font-size: clamp(1.0625rem, 0.5rem + 2.6vw, 3rem);
  font-weight: 750;
  font-stretch: 112%;
  letter-spacing: -0.03em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
  text-decoration-color: var(--ink);
}
.mail:hover {
  text-decoration-color: var(--muted);
}
.copy {
  flex: none;
  width: auto;
  height: auto;
  min-width: 48px;
  border: 0;
  border-left: 1px solid var(--ink);
}
.copy:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.copy-status {
  color: var(--muted);
  font-size: var(--step--1);
}

/* ---------- legal pages ---------- */
.prose {
  max-width: 46rem;
  padding-block: var(--space-16) var(--space-24);
}
.prose h1 {
  font-size: clamp(2.25rem, 1rem + 4vw, 4.5rem);
  overflow-wrap: break-word;
  hyphens: auto;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: var(--space-12);
}
.prose h2 {
  font-size: var(--step-1);
  font-weight: 700;
  margin-top: var(--space-12);
  margin-bottom: var(--space-3);
}
.prose p + p {
  margin-top: var(--space-4);
}
.prose table {
  display: block;
  overflow-x: auto;
  margin-block: var(--space-4);
  border-collapse: collapse;
  font-size: var(--step--1);
}
.prose th,
.prose td {
  padding: var(--space-2) var(--space-4) var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th {
  font-weight: 650;
  border-bottom-color: var(--ink);
}

/* ---------- footer ---------- */
.foot {
  color: var(--muted);
  font-size: var(--step--1);
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3) var(--space-8);
  padding-block: var(--space-6);
  position: relative;
}
.foot-inner::before {
  /* divider aligned to the content column, not the padded box */
  content: "";
  position: absolute;
  top: 0;
  inset-inline: clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  padding: 0;
  list-style: none;
}
.foot li {
  display: flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- consent ---------- */
.consent {
  position: fixed;
  z-index: 30;
  inset-inline: var(--space-4) auto;
  bottom: calc(var(--space-4) + 4.5rem);
  width: min(28rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 7rem);
  overflow-y: auto;
  padding: var(--space-6);
  display: grid;
  gap: var(--space-3);
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: var(--step--1);
  transition:
    opacity var(--motion-200) var(--ease-out),
    transform var(--motion-200) var(--ease-out);
}
.consent.is-entering {
  opacity: 0;
  transform: translateY(8px);
}
.consent.is-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition-duration: var(--motion-150);
  transition-timing-function: var(--ease-in);
}
.consent h2 {
  font-size: var(--step-1);
  font-weight: 750;
  font-stretch: 112%;
}
.consent p {
  color: var(--muted);
}
.consent-options {
  display: grid;
  gap: var(--space-3);
  padding-block: var(--space-2);
}
.opt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
}
.opt input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
}
.opt label {
  display: grid;
  gap: 2px;
}
.opt label span {
  color: var(--muted);
}
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
.consent-actions .btn {
  font-size: var(--step--1);
  min-height: 44px;
  padding-inline: var(--space-4);
}
.consent-actions .btn:not(.quiet) {
  flex: 1 1 auto;
  justify-content: center;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
    animation: none !important;
  }
}
