/* truix.xyz. Hand-written, no build step. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/plexmono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../fonts/plexmono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* palette */
  --carbon: #0d0c0a;
  --carbon-2: #15130f;
  --bone: #ede8dc;
  --bone-2: #a39d90;
  --bone-3: #8a857c;
  --amber: #ffb21e;
  --err: #ff9a80;
  /* derived: every theme only sets the base colors above */
  --rule: color-mix(in srgb, var(--bone) 13%, transparent);
  --rule-strong: color-mix(in srgb, var(--bone) 28%, transparent);
  --gridline: color-mix(in srgb, var(--bone) 3.5%, transparent);
  --veil: color-mix(in srgb, var(--carbon) 82%, transparent);
  --glow: color-mix(in srgb, var(--amber) 16%, transparent);
  --glow-faint: color-mix(in srgb, var(--amber) 4%, transparent);
  --prose: color-mix(in srgb, var(--bone) 90%, var(--carbon));

  /* type */
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.1875rem, 1.05rem + 0.45vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem);
  --step-3: clamp(2.25rem, 1.6rem + 2.6vw, 4rem);
  --step-4: clamp(2.75rem, 1.5rem + 5.4vw, 6.5rem);

  /* layout */
  --gutter: clamp(20px, 4.4vw, 96px);
  --col-gap: clamp(16px, 2vw, 32px);
  --maxw: 1760px;
  --section: clamp(96px, 12vw, 184px);

  --ease-out: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--carbon);
  color: var(--bone);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-stretch: 100%;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* grain: a fixed SVG noise field, multiplied very lightly over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }
::selection { background: var(--amber); color: var(--carbon); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 2px;
}

.mono {
  font-family: var(--mono);
  font-size: var(--step--1);
  line-height: 1.5;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.semi { color: var(--amber); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: 12px 16px;
  background: var(--amber);
  color: var(--carbon);
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 500;
}
.skip:focus { top: 12px; }

/* text links inside prose and meta: hairline underline that thickens to amber */
.entry__desc a, .entry__links a, .more__list a, .contact__links a, .about__prose a {
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--amber), var(--amber));
  background-size: 100% 1px, 0% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.45s var(--ease-out), color 0.2s;
}
.entry__links a { background-image: linear-gradient(var(--rule-strong), var(--rule-strong)), linear-gradient(var(--amber), var(--amber)); }
.entry__desc a:hover, .entry__links a:hover, .more__list a:hover, .contact__links a:hover, .about__prose a:hover {
  background-size: 100% 1px, 100% 1px;
  color: var(--bone);
}

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--veil);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead__row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 60px;
}
.wordmark {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.wordmark .semi { margin-right: 1px; }
.nav {
  display: flex;
  gap: clamp(4px, 2vw, 28px);
  margin-left: auto;
}
.nav a, .masthead__cv {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--bone-2);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 6px;
  transition: color 0.2s;
}
.nav a:hover, .masthead__cv:hover { color: var(--bone); }
.masthead__cv {
  color: var(--bone);
  border-left: 1px solid var(--rule);
  padding-left: clamp(14px, 2vw, 28px);
  gap: 8px;
}
.mono-note { color: var(--bone-3); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
/* a faint column grid behind the hero only: structure you can almost see */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 12 - 1px), var(--gridline) calc(100% / 12 - 1px), var(--gridline) calc(100% / 12));
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  --name: clamp(5.5rem, min(21vw, 37vh), 21rem);
  padding-top: clamp(40px, 7vw, 112px);
  padding-bottom: clamp(48px, 7vw, 104px);
}
.hero__rail {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  color: var(--bone-2);
  margin-bottom: clamp(24px, 4vw, 48px);
}
/* wide screens: the location block tucks under "Jordan", on the baseline of "Hause" */
@media (min-width: 1081px) {
  .hero__grid { padding-top: clamp(40px, 5vw, 80px); }
  .hero__rail {
    grid-column: 1 / span 4;
    grid-row: 2;
    align-self: end;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 calc(var(--name) * 0.085);
    padding-left: 2px;
    position: relative;
    z-index: 1;
  }
}
.hero__rail span { display: block; }
.js-clock { color: var(--bone); }

.hero__name {
  grid-column: 1 / -1;
  grid-row: 2;
  font-weight: 760;
  font-stretch: 62%;
  font-size: var(--name);
  line-height: 0.8;
  letter-spacing: -0.02em;
  margin-left: -0.04em;
}
.hero__name .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero__name .line__in { display: inline-block; }
.hero__name .line--offset { text-align: right; margin-right: -0.03em; }

/* the lede sits in the open space to the right of "Jordan" */
.hero__lede {
  grid-column: 8 / -1;
  grid-row: 2;
  align-self: start;
  position: relative;
  z-index: 1;
  padding-top: 0.35em;
  font-size: clamp(1.1875rem, 0.85rem + 0.95vw, 1.75rem);
  line-height: 1.32;
  font-weight: 380;
  letter-spacing: 0;
  word-spacing: 0.02em;
  max-width: 30ch;
  text-wrap: pretty;
}
.hero__foot {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: clamp(28px, 3.5vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--bone);
}
.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--glow);
  flex: none;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--bone);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.btn:hover { border-color: var(--bone); }
.btn--solid {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--carbon);
}
.btn--solid:hover { background: var(--bone); border-color: var(--bone); }

/* load sequence: one orchestrated moment, nothing else animates on its own */
@media (prefers-reduced-motion: no-preference) {
  .reveal, .hero__name .line__in {
    animation: rise 1s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 90ms + 80ms);
  }
  .hero__name .line__in { animation-name: rise-mask; animation-duration: 1.1s; }
  .status__dot { animation: pulse 2.8s ease-in-out 1.6s infinite; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-mask {
  from { transform: translateY(105%); }
  to { transform: none; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--glow); }
  50% { box-shadow: 0 0 0 6px var(--glow-faint); }
}

/* ---------- sections ---------- */

.section { padding-block: var(--section) 0; }
[id] { scroll-margin-top: 64px; }
.section:last-of-type { padding-bottom: var(--section); }

.section__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: baseline;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.rail {
  grid-column: 1 / span 3;
  color: var(--bone-2);
}
.section__title {
  grid-column: 4 / span 6;
  font-size: var(--step-4);
  font-weight: 720;
  font-stretch: 70%;
  line-height: 0.95;
  letter-spacing: -0.015em;
}
.section__aside {
  grid-column: 10 / -1;
  color: var(--bone-2);
  max-width: 32ch;
  justify-self: end;
  text-align: left;
}

/* ---------- work index ---------- */

.index { border-top: 1px solid var(--rule-strong); counter-reset: none; }
.entry {
  position: relative;
  border-bottom: 1px solid var(--rule);
}
/* the amber rule draws across the top edge on hover */
.entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 1px;
  width: 100%;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.entry:hover::before, .entry:focus-within::before { transform: scaleX(1); }

.entry__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding-block: clamp(36px, 4.4vw, 64px);
}
.entry__num {
  grid-column: 1 / span 3;
  color: var(--bone-3);
  font-size: var(--step-0);
  transition: color 0.3s;
  padding-top: 0.5em;
}
.entry:hover .entry__num, .entry:focus-within .entry__num { color: var(--amber); }

.entry__main { grid-column: 4 / span 5; }
.entry__title {
  font-size: var(--step-3);
  font-weight: 700;
  font-stretch: 72%;
  line-height: 1;
  letter-spacing: -0.012em;
}
.entry__title a { transition: color 0.25s; }
.entry__title a:hover { color: var(--amber); }
.entry__role {
  color: var(--bone-2);
  margin-top: 14px;
}
.entry__desc {
  margin-top: 22px;
  color: var(--bone);
  max-width: 58ch;
  text-wrap: pretty;
}

.entry__meta {
  grid-column: 10 / -1;
  padding-top: 0.7em;
  display: grid;
  gap: 18px;
  align-content: start;
}
.entry__meta > div { display: grid; gap: 4px; }
.entry__meta dt { color: var(--bone-3); }
.entry__meta dd { font-size: 0.9375rem; line-height: 1.5; color: var(--bone); }
.entry__links { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.entry__links a { display: inline-block; padding-block: 4px; }

.more {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  margin-top: clamp(48px, 6vw, 88px);
}
.more__title { grid-column: 1 / span 3; color: var(--bone-2); font-weight: 400; padding-top: 4px; }
.more__list { grid-column: 4 / -1; }
.more__list li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 9fr);
  gap: 8px var(--col-gap);
  padding-block: 16px;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.more__list li:last-child { border-bottom: 1px solid var(--rule); }
.more__list li > :first-child { font-weight: 560; justify-self: start; }
.more__list li > span:last-child { color: var(--bone-2); }

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 64px;
}
.about__prose { grid-column: 4 / span 5; display: grid; gap: 1.1em; align-content: start; max-width: 60ch; }
.about__prose p { color: var(--bone-2); }
.about__prose .about__lead {
  font-size: var(--step-2);
  line-height: 1.25;
  font-weight: 400;
  color: var(--bone);
  letter-spacing: -0.01em;
  margin-bottom: 0.3em;
  text-wrap: pretty;
}
.about__side { grid-column: 10 / -1; }
.side__title {
  color: var(--bone-3);
  font-weight: 400;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-strong);
}
.side__title + dl { margin-bottom: 48px; }
.xp > div { padding-block: 14px; border-bottom: 1px solid var(--rule); }
.xp dt { font-weight: 560; line-height: 1.35; }
.xp dd { color: var(--bone-2); margin-top: 4px; font-size: 0.9375rem; }
.xp dd.mono { font-size: var(--step--1); color: var(--bone-3); }
/* toolbox: grouped columns under the about copy, same rail-and-index rhythm as the work list */
.toolbox {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 20px;
  margin-top: clamp(8px, 2vw, 32px);
}
.toolbox > .side__title { grid-column: 1 / span 3; border-bottom: 0; padding-top: 18px; }
.toolbox__grid {
  grid-column: 4 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px var(--col-gap);
}
.tgroup { border-top: 1px solid var(--rule-strong); padding-top: 16px; position: relative; }
.tgroup::before {
  content: "";
  position: absolute; left: 0; top: -1px; height: 1px; width: 32px;
  background: var(--amber);
}
.tgroup__title {
  font-size: var(--step-1);
  font-weight: 650;
  font-stretch: 80%;
  line-height: 1.15;
  letter-spacing: -0.005em;
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}
.tgroup__n { color: var(--bone-3); font-weight: 400; font-stretch: 100%; letter-spacing: 0.01em; }
.tgroup__list li {
  color: var(--bone-2);
  font-size: 0.9375rem;
  line-height: 1.45;
  padding-block: 9px;
  border-bottom: 1px solid var(--rule);
  text-wrap: pretty;
}

/* ---------- contact ---------- */

.contact { border-top: 1px solid var(--rule); margin-top: var(--section); }
.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 56px;
}
.form {
  grid-column: 4 / span 6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px var(--col-gap);
}
.field { display: grid; gap: 8px; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field label { color: var(--bone-2); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: var(--step-1);
  color: var(--bone);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--bone-3);
  border-radius: 0;
  padding: 8px 0 12px;
  min-height: 48px;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 9.5em; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: var(--bone); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--amber);
  box-shadow: 0 1px 0 0 var(--amber);
}
.field [aria-invalid="true"] { border-bottom-color: var(--err); }
.select { position: relative; }
.select::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--bone-2);
  border-bottom: 1.5px solid var(--bone-2);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}
.field select { padding-right: 28px; cursor: pointer; }
.field select option { background: var(--carbon-2); color: var(--bone); }
.field__hint { color: var(--amber); font-size: 0.9375rem; }
.field__err { min-height: 1.5em; font-size: 0.875rem; color: var(--err); }
.field__err:empty { min-height: 1.5em; }
.field__row { display: flex; justify-content: space-between; gap: 16px; }
.field__count { color: var(--bone-3); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 8px;
}
.form .btn { cursor: pointer; font: inherit; font-family: var(--mono); font-size: var(--step--1); font-weight: 500; }
.form .btn[disabled] { opacity: 0.6; cursor: progress; }
.form__status { font-size: 0.9375rem; color: var(--bone-2); max-width: 46ch; }
.form__status:focus { outline: none; }
.form__status[data-state="ok"] { color: var(--bone); }
.form__status[data-state="ok"]::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  margin-right: 10px;
  vertical-align: 0.1em;
}
.form__status[data-state="error"] { color: var(--err); }
.form__noscript { grid-column: 1 / -1; color: var(--bone-2); }
.form.is-sent .field { opacity: 0.45; }
.form.is-sent .btn--solid[disabled] {
  opacity: 1;
  cursor: default;
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--bone-2);
}

.contact__side { grid-column: 10 / -1; }
.contact__links { margin-bottom: 28px; }
.contact__links li { border-bottom: 1px solid var(--rule); }
.contact__links a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-block: 12px;
  background: none !important;
  transition: color 0.2s;
  overflow-wrap: anywhere;
}
.contact__links a:hover { color: var(--amber); }
.contact__links .mono { color: var(--bone-3); }
.contact__note { color: var(--bone-2); font-size: 0.9375rem; }

.text-link {
  background-image: linear-gradient(var(--rule-strong), var(--rule-strong)), linear-gradient(var(--amber), var(--amber));
  background-size: 100% 1px, 0% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.45s var(--ease-out);
}
.text-link:hover { background-size: 100% 1px, 100% 1px; }

/* ---------- github repos ---------- */

.repos-wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.repos {
  grid-column: 4 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: calc(var(--col-gap) * 2);
  border-top: 1px solid var(--rule-strong);
}
.repo { border-bottom: 1px solid var(--rule); }
.repo__link {
  display: grid;
  gap: 12px;
  padding: 24px 0 28px;
  height: 100%;
  align-content: start;
}
.repo__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.repo__name {
  font-size: var(--step-1);
  font-weight: 620;
  font-stretch: 85%;
  letter-spacing: -0.005em;
  transition: color 0.25s;
  overflow-wrap: anywhere;
}
.repo__lang { color: var(--bone-3); flex: none; }
.repo__desc { color: var(--bone-2); font-size: 0.9375rem; line-height: 1.55; max-width: 46ch; }
.repo__link:hover .repo__name { color: var(--amber); }

/* ---------- latest writing / archive rows ---------- */

.posts { border-top: 1px solid var(--rule-strong); }
.post-row { border-bottom: 1px solid var(--rule); position: relative; }
.post-row::before {
  content: "";
  position: absolute; left: 0; top: -1px; height: 1px; width: 100%;
  background: var(--amber);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.post-row:hover::before, .post-row:focus-within::before { transform: scaleX(1); }
.post-row a {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding-block: clamp(24px, 3vw, 40px);
  align-items: baseline;
}
.post-row time { grid-column: 1 / span 3; color: var(--bone-3); }
.post-row__title {
  grid-column: 4 / span 5;
  font-size: var(--step-2);
  font-weight: 650;
  font-stretch: 78%;
  line-height: 1.1;
  letter-spacing: -0.01em;
  transition: color 0.25s;
}
.post-row__sum { grid-column: 9 / -1; color: var(--bone-2); font-size: 0.9375rem; }
.post-row a:hover .post-row__title { color: var(--amber); }

/* ---------- article (blog post, privacy) ---------- */

.article-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding-top: clamp(48px, 8vw, 128px);
  padding-bottom: clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--rule);
}
.article-head .rail { padding-top: 0.6em; }
.article-head__main { grid-column: 4 / span 8; }
.article-head h1 {
  font-size: var(--step-4);
  font-weight: 740;
  font-stretch: 66%;
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.article-head__sum {
  margin-top: 24px;
  font-size: var(--step-1);
  color: var(--bone-2);
  max-width: 52ch;
  line-height: 1.45;
}
.article-head__meta { margin-top: 24px; color: var(--bone-3); display: flex; flex-wrap: wrap; gap: 4px 24px; }

.article {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding-block: clamp(40px, 5vw, 72px) var(--section);
}
.prose {
  grid-column: 4 / span 7;
  max-width: 65ch;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--prose);
}
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  margin-top: 2.4em;
  font-size: var(--step-2);
  font-weight: 650;
  font-stretch: 80%;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--bone);
}
.prose h3 { margin-top: 2em; font-size: var(--step-1); font-weight: 620; color: var(--bone); }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose strong { color: var(--bone); font-weight: 620; }
.prose a {
  color: var(--bone);
  background-image: linear-gradient(var(--amber), var(--amber));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 1px;
  transition: color 0.2s;
}
.prose a:hover { color: var(--amber); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: -1.15em;
  top: 0.8em;
  width: 0.5em;
  height: 1px;
  background: var(--amber);
}
.prose ol { list-style: decimal; }
.prose ol > li::marker { font-family: var(--mono); font-size: 0.85em; color: var(--bone-3); }
.prose li + li { margin-top: 0.5em; }
.prose blockquote {
  margin-left: 0;
  padding-left: 1.2em;
  border-left: 1px solid var(--amber);
  color: var(--bone-2);
}
.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--carbon-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.08em 0.36em;
  color: var(--bone);
}
.prose pre {
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  background: var(--carbon-2);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--amber);
  padding: 18px 20px;
  overflow-x: auto;
  tab-size: 2;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: var(--bone); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2.4em; }
.prose .table-wrap { overflow-x: auto; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.prose th, .prose td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: var(--step--1); font-weight: 400; color: var(--bone-3); border-bottom-color: var(--rule-strong); }
.article-foot {
  grid-column: 4 / span 7;
  max-width: 65ch;
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-strong);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.archive { padding-block: clamp(40px, 5vw, 72px) var(--section); }
.archive__title { color: var(--bone-3); font-weight: 400; margin-bottom: 20px; }
.archive-year + .archive-year { margin-top: 48px; }
.archive-year__label { color: var(--bone-2); font-weight: 400; margin-bottom: 12px; }
.article-head .rail a { transition: color 0.2s; }
.article-head .rail a:hover { color: var(--bone); }
.nav a[aria-current="page"] { color: var(--bone); }

.footer a { transition: color 0.2s; display: inline-block; padding-block: 12px; margin-block: -12px; }
.section__aside .text-link { display: inline-block; padding-block: 10px 2px; margin-top: -8px; }
.footer a:hover { color: var(--bone); }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--rule); }
.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px 36px;
  color: var(--bone-3);
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero__grid { --name: clamp(5.5rem, 30vw, 21rem); }
  .hero__foot { grid-row: 4; }
  .hero__name .line--offset { text-align: left; padding-left: 22%; }
  .hero__lede { grid-column: 1 / span 10; grid-row: 3; padding-top: 0; margin-top: clamp(28px, 4vw, 48px); font-size: var(--step-2); max-width: 32ch; }
  .entry__num { grid-column: 1 / -1; padding-top: 0; margin-bottom: 18px; }
  .entry__main { grid-column: 1 / span 7; }
  .entry__meta { grid-column: 9 / -1; }
  .section__head .rail { grid-column: 1 / -1; margin-bottom: 14px; }
  .section__title { grid-column: 1 / span 7; }
  .section__aside { grid-column: 8 / -1; }
  .more__title { grid-column: 1 / -1; margin-bottom: 14px; }
  .more__list { grid-column: 1 / -1; }
  .about__prose { grid-column: 1 / span 7; }
  .about__side { grid-column: 9 / -1; }
  .toolbox > .side__title { grid-column: 1 / -1; padding-top: 0; }
  .toolbox__grid { grid-column: 1 / -1; }
  .form { grid-column: 1 / span 8; }
  .contact__side { grid-column: 9 / -1; }
  .repos { grid-column: 1 / -1; }
  .post-row time { grid-column: 1 / -1; margin-bottom: 8px; }
  .post-row__title { grid-column: 1 / span 6; }
  .post-row__sum { grid-column: 7 / -1; }
  .article-head .rail { grid-column: 1 / -1; padding-top: 0; margin-bottom: 18px; }
  .article-head__main { grid-column: 1 / -1; }
  .prose, .article-foot { grid-column: 1 / -1; }
}

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

@media (max-width: 760px) {
  .masthead__cv .mono-note { display: none; }
  .nav { gap: 0; }
  .hero__grid { --name: clamp(5.5rem, 39vw, 14rem); }
  .hero__name .line--offset { padding-left: 12%; }
  .hero__lede { grid-column: 1 / -1; }
  .entry__main, .entry__meta { grid-column: 1 / -1; }
  .entry__meta {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px dashed var(--rule);
    grid-template-columns: 1fr 1fr;
  }
  .entry__meta > div:last-child { grid-column: 1 / -1; }
  .section__title, .section__aside { grid-column: 1 / -1; }
  .section__aside { justify-self: start; margin-top: 18px; }
  .about__prose, .about__side { grid-column: 1 / -1; }
  .toolbox__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px var(--col-gap); }
  .more__list li { grid-template-columns: 1fr; }
  .form, .contact__side { grid-column: 1 / -1; }
  .form { grid-template-columns: 1fr; }
  .repos { grid-template-columns: 1fr; }
  .post-row__title, .post-row__sum { grid-column: 1 / -1; }
  .post-row__sum { margin-top: 10px; }
  .prose { font-size: 1.0625rem; }
  .footer__row { flex-direction: column; }
}

@media (max-width: 560px) {
  .masthead__cv { display: none; }
}

@media (max-width: 480px) {
  .toolbox__grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .wordmark { font-size: 0.875rem; }
  .masthead__row { gap: 8px; }
  .nav a { padding-inline: 7px; }
  .masthead__cv { padding-left: 10px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; }
}

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

/* ---------- hidden themes (picked from the theme easter egg, stored in localStorage) ---------- */

html[data-theme="phosphor"] {
  --carbon: #040b06; --carbon-2: #0a160d;
  --bone: #c9ffd2; --bone-2: #6fdc88; --bone-3: #4fb867;
  --amber: #39ff7a; --err: #ffb38f;
}
html[data-theme="phosphor"] body { text-shadow: 0 0 6px color-mix(in srgb, var(--amber) 28%, transparent); }
html[data-theme="phosphor"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 101;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgb(0 0 0 / 0.22) 0 1px, transparent 1px 3px);
}

html[data-theme="paper"] {
  color-scheme: light;
  --carbon: #f4efe3; --carbon-2: #ebe4d3;
  --bone: #1c1a16; --bone-2: #4a453c; --bone-3: #625c51;
  --amber: #a8430b; --err: #a3271b;
}

html[data-theme="blueprint"] {
  --carbon: #0a1f3d; --carbon-2: #0f2749;
  --bone: #e6f2ff; --bone-2: #a9c8ea; --bone-3: #8db1d8;
  --amber: #6fe3ff; --err: #ffb3a3;
}
html[data-theme="blueprint"] body {
  background-image:
    linear-gradient(color-mix(in srgb, var(--bone) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--bone) 7%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--bone) 3%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--bone) 3%, transparent) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-attachment: fixed;
}

html[data-theme="synthwave"] {
  --carbon: #15102a; --carbon-2: #1d1638;
  --bone: #f5ecff; --bone-2: #c3b3e0; --bone-3: #a593c7;
  --amber: #ff6ec7; --err: #ffa58f;
}
html[data-theme="synthwave"] .section__title,
html[data-theme="synthwave"] .entry__title { text-shadow: 0 0 22px color-mix(in srgb, var(--amber) 28%, transparent); }
html[data-theme="synthwave"] .hero::after {
  background-image:
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), color-mix(in srgb, var(--amber) 9%, transparent) calc(100% / 12 - 1px) calc(100% / 12)),
    repeating-linear-gradient(0deg, transparent 0 47px, color-mix(in srgb, var(--amber) 7%, transparent) 47px 48px);
  -webkit-mask-image: linear-gradient(0deg, #000 0%, transparent 70%);
  mask-image: linear-gradient(0deg, #000 0%, transparent 70%);
}

html[data-theme="terminal-white"] {
  color-scheme: light;
  --carbon: #ffffff; --carbon-2: #f1f1f1;
  --bone: #0a0a0a; --bone-2: #3a3a3a; --bone-3: #565656;
  --amber: #0a0a0a; --err: #b3261e;
  --sans: var(--mono);
}
html[data-theme="terminal-white"] body::before { display: none; }
html[data-theme="terminal-white"] .hero__name { font-size: calc(var(--name) * 0.56); font-weight: 500; letter-spacing: -0.04em; line-height: 0.95; }
html[data-theme="terminal-white"] :is(.section__title, .entry__title, .article-head h1, .about__lead, .tgroup__title, .post-row__title, .prose h2, .repo__name) { font-weight: 500; letter-spacing: -0.02em; }
html[data-theme="terminal-white"] .section__title,
html[data-theme="terminal-white"] .article-head h1 { font-size: calc(var(--step-4) * 0.62); line-height: 1.05; }
html[data-theme="terminal-white"] .entry__title { font-size: calc(var(--step-3) * 0.7); line-height: 1.1; }

/* light themes: the grain field is white noise, so flip it */
html[data-theme="paper"] body::before { filter: invert(1); opacity: 0.045; }

/* ---------- easter eggs ---------- */

.egg-dot {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 12px 10px;
  margin: -12px -10px -12px -9px;
  cursor: pointer;
}
.egg-dot:hover { color: var(--amber); }

dialog.egg {
  color: var(--bone);
  background: var(--carbon-2);
  border: 1px solid var(--rule-strong);
  padding: 0;
}
dialog.egg::backdrop { background: color-mix(in srgb, var(--carbon) 55%, transparent); }

.themes {
  width: min(360px, calc(100vw - 2 * var(--gutter)));
  margin: auto var(--gutter) var(--gutter) auto;
  border-radius: 14px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--bone) 8%, transparent) inset, 0 24px 48px -12px rgb(0 0 0 / 0.5), 0 8px 16px -8px rgb(0 0 0 / 0.4);
}
.themes__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--rule); }
.themes__head h2 { font-size: var(--step-1); font-weight: 650; font-stretch: 80%; line-height: 1.1; }
.themes__head p { color: var(--bone-3); }
.themes__list { padding: 8px; display: grid; gap: 2px; }
.themes__opt {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 6px 10px;
  font: inherit;
  text-align: left;
  color: var(--bone);
  background: none;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
.themes__opt:hover { background: color-mix(in srgb, var(--bone) 6%, transparent); }
.themes__opt:focus-visible { outline-offset: -2px; }
.themes__opt[aria-checked="true"] { background: color-mix(in srgb, var(--amber) 12%, transparent); }
.themes__opt[aria-checked="true"] .themes__tick { visibility: visible; }
.themes__tick { visibility: hidden; color: var(--amber); font-family: var(--mono); }
.themes__name { font-weight: 560; line-height: 1.2; display: block; }
.themes__note { color: var(--bone-2); font-size: 0.8125rem; display: block; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: linear-gradient(135deg, var(--s-bg) 0 50%, var(--s-ink) 50% 100%);
  position: relative;
}
.swatch::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--s-acc); border: 2px solid var(--carbon-2); }
.themes__foot { padding: 10px 18px 14px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--bone-3); }
.egg-close {
  font-family: var(--mono); font-size: var(--step--1);
  color: var(--bone); background: none;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  min-height: 40px; padding: 0 16px; cursor: pointer;
}
.egg-close:hover { border-color: var(--bone); }

/* radar scope */
dialog.scope {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; border: 0;
  background: #030806;
  color: #9dffb5;
  --scope: #57ff8f;
}
.scope::backdrop { background: #030806; }
.scope canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scope__hud {
  position: absolute; inset: 0;
  pointer-events: none;
  padding: clamp(16px, 3vw, 32px);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  font-family: var(--mono);
  font-size: var(--step--1);
  text-shadow: 0 0 6px rgb(87 255 143 / 0.35);
}
.scope__hud h2 { font-family: var(--mono); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 500; letter-spacing: 0.32em; color: #c8ffd6; }
.scope__tl { grid-column: 1; grid-row: 1; display: grid; gap: 4px; align-content: start; }
.scope__tr { grid-column: 2; grid-row: 1; text-align: right; display: grid; gap: 4px; align-content: start; }
.scope__bl { grid-column: 1; grid-row: 3; align-self: end; color: #7fd99a; }
.scope__br { grid-column: 2; grid-row: 3; align-self: end; pointer-events: auto; }
.scope .egg-close { color: #c8ffd6; border-color: rgb(87 255 143 / 0.45); background: rgb(3 8 6 / 0.7); }
.scope .egg-close:hover { border-color: #c8ffd6; }
.scope .egg-close:focus-visible { outline-color: #57ff8f; }

/* footer hex dump */
.hexdump {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 120;
  max-width: calc(100vw - 2 * var(--gutter));
  margin: 0;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.55;
  white-space: pre;
  overflow-x: auto;
  color: var(--bone-2);
  background: var(--carbon-2);
  border: 1px solid var(--rule-strong);
  border-left: 2px solid var(--amber);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.hexdump b { color: var(--amber); font-weight: 500; }

/* konami rain */
.rain { position: fixed; inset: 0; z-index: 150; pointer-events: none; width: 100%; height: 100%; }
.egg-toast {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 151;
  font-family: var(--mono); font-size: var(--step--1);
  padding: 10px 16px; border-radius: 999px;
  background: var(--amber); color: var(--carbon);
  pointer-events: none;
}

/* ---------- table of contents (blog posts, privacy) ---------- */

.toc--side {
  grid-column: 1 / span 3;
  grid-row: 1 / span 2;
  align-self: start;
  position: sticky;
  top: 88px;
  padding-right: clamp(12px, 2vw, 32px);
  max-height: calc(100vh - 112px);
  overflow-y: auto;
}
.article > .prose { grid-row: 1; }
.article > .article-foot { grid-row: 2; }
.toc__label { color: var(--bone-3); padding-bottom: 10px; border-bottom: 1px solid var(--rule-strong); }
.toc__item { border-bottom: 1px solid var(--rule); }
.toc__item a {
  display: block;
  position: relative;
  padding: 9px 0 9px 14px;
  color: var(--bone-2);
  line-height: 1.4;
  transition: color 0.2s;
}
.toc__item--h3 a { padding-left: 28px; color: var(--bone-3); }
.toc__item a::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 1px;
  background: var(--rule-strong);
  transition: background-color 0.2s, width 0.3s var(--ease-out);
}
.toc__item--h3 a::before { left: 14px; }
.toc__item a:hover { color: var(--bone); }
.toc__item a[aria-current="location"] { color: var(--bone); }
.toc__item a[aria-current="location"]::before { background: var(--amber); width: 10px; }
.toc--top { display: none; }

@media (max-width: 1080px) {
  .toc--side { display: none; }
  .toc--top { display: block; grid-column: 1 / -1; grid-row: auto; margin-bottom: 36px; }
  .article > .prose, .article > .article-foot { grid-row: auto; }
  .toc--top details { border-bottom: 1px solid var(--rule); }
  .toc--top summary {
    list-style: none;
    cursor: pointer;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--bone);
  }
  .toc--top summary::-webkit-details-marker { display: none; }
  .toc--top summary::after {
    content: "";
    width: 8px; height: 8px;
    border-right: 1.5px solid var(--bone-2);
    border-bottom: 1.5px solid var(--bone-2);
    transform: translateY(-25%) rotate(45deg);
    margin-right: 4px;
    transition: transform 0.25s var(--ease-out);
  }
  .toc--top details[open] summary::after { transform: translateY(25%) rotate(-135deg); }
  .toc--top .toc__list { padding-bottom: 8px; }
  .toc--top .toc__item:last-child { border-bottom: 0; }
}

/* ---------- 404 ---------- */
.notfound { border-bottom: 0; padding-bottom: var(--section); min-height: calc(100vh - 160px); align-content: start; }
.notfound__code { color: var(--bone-3); margin-bottom: 28px; overflow-wrap: anywhere; }
