/* Design tokens. Components use only these variables. Light is the base; dark applies when the
   system prefers it (unless the visitor chose light) or when the visitor chose dark.

   The look: a black and white editorial gallery on liquid light. The interface is ink, paper
   and three greys. Nothing has a border or a hard corner: what needs a surface is glass, fully
   rounded, with a lit edge. Colour lives in one place only, the fluid behind the hero and the
   space. */

:root {
  color-scheme: light;

  /* Roobert is the face this look was drawn for; Inter is its free stand-in. */
  --font-sans: "Roobert", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 400;
  --fw-semibold: 600;
  --fs-label: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-md: 16px;
  --fs-prose: 18px;
  --fs-title: 29px;
  --fs-sub: clamp(26px, 3.4vw, 39px);
  --fs-heading: clamp(40px, 6.6vw, 78px);
  --fs-display: clamp(64px, 15.5vw, 225px);
  --fs-hero: var(--fs-heading);
  --lh-tight: 1.1;
  --lh-base: 1.5;
  --lh-prose: 1.58;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 28px;
  --space-8: 40px;
  --space-10: 48px;
  --space-12: 64px;
  --space-section: clamp(72px, 11vw, 152px);

  /* Always rounded: large tiles, pills for controls. */
  --radius-card: 28px;
  --radius-menu: 22px;
  --radius-sm: 10px;
  --radius-control: 999px;
  --radius-pill: 999px;

  --nav-width: 232px;
  --nav-rail: 60px;
  --nav-now: var(--nav-width);
  --topbar-height: 52px;
  --tabbar-height: 58px;
  --content-max: 1142px;
  --prose-max: 680px;
  --toc-width: 220px;
  --control-height: 32px;
  --control-height-sm: 28px;

  --z-sticky: 10;
  --z-nav: 20;
  --z-progress: 30;
  --z-float: 50;
  --z-tooltip: 400;

  /* Motion: the interface answers at once and stays under 300ms. Only what is seen once,
     the hero arriving and content coming into view, takes longer. */
  --dur-press: 140ms;
  --dur-fast: 160ms;
  --dur-base: 200ms;
  --dur-slow: 280ms;
  --dur-glide: 700ms;
  --ease: ease;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --surface-nav: #ffffff;
  --surface-canvas: #ffffff;
  --surface-card: transparent;
  --surface-sunken: rgba(0, 0, 0, 0.04);
  --surface-hover: rgba(0, 0, 0, 0.05);
  --surface-active: rgba(0, 0, 0, 0.09);
  --surface-float: #ffffff;
  --surface-bar: #ffffff;
  --surface-backdrop: rgba(0, 0, 0, 0.45);
  --surface-inverse: #000000;

  /* No lines. The names stay, so every component that drew one draws nothing. */
  --border-hairline: transparent;
  --border-soft: transparent;
  --border-strong: transparent;

  /* Glass: a faint fill, a blur for what floats, and the light on its edge. */
  --glass-fill: rgba(0, 0, 0, 0.035);
  --glass-fill-hover: rgba(0, 0, 0, 0.06);
  --glass-float: rgba(255, 255, 255, 0.78);
  --glass-lift: 0 18px 50px -24px rgba(0, 0, 0, 0.28);
  --edge-hi: rgba(0, 0, 0, 0.2);
  --edge-mid: rgba(0, 0, 0, 0.08);
  --edge-lo: rgba(0, 0, 0, 0.03);
  --edge-glow: rgba(0, 0, 0, 0.75);
  --glass-blur: blur(18px) saturate(140%);
  --glass-edge: transparent;
  --glass-sheen: transparent;
  --glass-sheen-low: transparent;
  --glass-glow: transparent;
  --glass-shadow: 0 0 0 0 transparent;
  --glass-shadow-lift: 0 0 0 0 transparent;
  --shadow-float: 0 0 0 0 transparent;
  --shadow-hover: 0 0 0 0 transparent;

  /* The iridescent fluid: sage into amber into oxblood. Media only, never a control. */
  --fluid-sage: rgb(160, 224, 171);
  --fluid-amber: rgb(255, 172, 46);
  --fluid-oxblood: rgb(165, 45, 37);

  --text-primary: #000000;
  --text-secondary: #6d6d6d;
  --text-tertiary: #6d6d6d;
  --text-inverse: #ffffff;
  --text-body: #181818;

  --accent: #000000;
  --number: #9a9a9a;
  --marker: transparent;
  --accent-fill: #000000;
  --accent-fill-hover: #181818;
  --accent-on: #ffffff;
  --accent-soft: rgba(0, 0, 0, 0.07);
  --focus-ring: #000000;

  /* Sections do not have a colour of their own any more. */
  --entity-home: currentColor;
  --entity-about: currentColor;
  --entity-projects: currentColor;
  --entity-writing: currentColor;
  --entity-tools: currentColor;
  --entity-contact: currentColor;
  --entity-ask: currentColor;

  --danger-fg: #a52d25;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-nav: #000000;
    --surface-canvas: #000000;
    --surface-sunken: rgba(255, 255, 255, 0.06);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --surface-active: rgba(255, 255, 255, 0.14);
    --surface-float: #000000;
    --surface-bar: #000000;
    --surface-backdrop: rgba(0, 0, 0, 0.7);
    --surface-inverse: #ffffff;
    --glass-fill: rgba(255, 255, 255, 0.055);
    --glass-fill-hover: rgba(255, 255, 255, 0.09);
    --glass-float: rgba(20, 20, 20, 0.72);
    --glass-lift: 0 18px 50px -24px rgba(0, 0, 0, 0.8);
    --edge-hi: rgba(255, 255, 255, 0.42);
    --edge-mid: rgba(255, 255, 255, 0.14);
    --edge-lo: rgba(255, 255, 255, 0.05);
    --edge-glow: rgba(255, 255, 255, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #9a9a9a;
    --text-tertiary: #808080;
    --text-inverse: #000000;
    --text-body: #ffffff;
    --accent: #ffffff;
    --number: #636363;
    --accent-fill: #ffffff;
    --accent-fill-hover: #ffffff;
    --accent-on: #000000;
    --accent-soft: rgba(255, 255, 255, 0.12);
    --focus-ring: #ffffff;
    --danger-fg: #ff8a80;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-nav: #000000;
  --surface-canvas: #000000;
  --surface-sunken: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --surface-active: rgba(255, 255, 255, 0.14);
  --surface-float: #000000;
  --surface-bar: #000000;
  --surface-backdrop: rgba(0, 0, 0, 0.7);
  --surface-inverse: #ffffff;
  --glass-fill: rgba(255, 255, 255, 0.055);
  --glass-fill-hover: rgba(255, 255, 255, 0.09);
  --glass-float: rgba(20, 20, 20, 0.72);
  --glass-lift: 0 18px 50px -24px rgba(0, 0, 0, 0.8);
  --edge-hi: rgba(255, 255, 255, 0.42);
  --edge-mid: rgba(255, 255, 255, 0.14);
  --edge-lo: rgba(255, 255, 255, 0.05);
  --edge-glow: rgba(255, 255, 255, 0.95);
  --text-primary: #ffffff;
  --text-secondary: #9a9a9a;
  --text-tertiary: #808080;
  --text-inverse: #000000;
  --text-body: #ffffff;
  --accent: #ffffff;
  --number: #636363;
  --accent-fill: #ffffff;
  --accent-fill-hover: #ffffff;
  --accent-on: #000000;
  --accent-soft: rgba(255, 255, 255, 0.12);
  --focus-ring: #ffffff;
  --danger-fg: #ff8a80;
}

/* Base --------------------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--space-6);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  position: relative;
  margin: 0;
  background: var(--surface-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
}
h1,
h2,
h3,
h4 {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
::selection {
  background: var(--accent-soft);
}
.icon {
  flex: none;
}
html:not(.js) .js-only {
  display: none !important;
}
.muted {
  color: var(--text-secondary);
}
.skip {
  position: fixed;
  left: var(--space-4);
  top: -60px;
  z-index: var(--z-tooltip);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  background: var(--surface-inverse);
  color: var(--text-inverse);
  font-weight: var(--fw-medium);
}
.skip:focus {
  top: var(--space-4);
}

/* Shell -------------------------------------------------------------------------------------- */
.shell {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar-col {
  background: transparent;
}
.sidebar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-3) var(--space-4);
  scrollbar-width: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.brand-mark {
  flex: none;
  width: 24px;
  height: 24px;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  height: 32px;
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  text-align: left;
  white-space: nowrap;
}
.nav-item {
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.nav-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.nav-item[aria-current] {
  background: var(--surface-card);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 0 0 1px var(--border-hairline), var(--glass-shadow);
}
.nav-list-profiles {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-hairline);
}
.nav-item[aria-current] .icon {
  color: var(--accent);
}
.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-meta {
  display: inline-flex;
  gap: 3px;
  margin-left: auto;
  color: var(--text-tertiary);
}
.sidebar-foot {
  margin-top: auto;
  padding-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.theme-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin: var(--space-1) 0;
  padding: 2px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control);
  background: var(--surface-sunken);
}
.theme-seg button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
}
.theme-seg button:hover {
  color: var(--text-primary);
}
:root:not([data-theme]) .theme-seg [data-theme-choice="system"],
:root[data-theme="light"] .theme-seg [data-theme-choice="light"],
:root[data-theme="dark"] .theme-seg [data-theme-choice="dark"] {
  background: var(--surface-card);
  border-color: var(--border-hairline);
  color: var(--text-primary);
}
.theme-cycle {
  display: none;
}
.theme-icon,
.collapse-icon {
  display: inline-flex;
}
.theme-icon .icon,
.collapse-icon .icon:last-child {
  display: none;
}
:root:not([data-theme]) .theme-icon .icon:nth-child(3),
:root[data-theme="light"] .theme-icon .icon:nth-child(1),
:root[data-theme="dark"] .theme-icon .icon:nth-child(2) {
  display: block;
}

/* Collapsed sidebar: an icon rail with tooltips. */
@media (min-width: 761px) {
  :root[data-nav="collapsed"] .shell {
    grid-template-columns: var(--nav-rail) minmax(0, 1fr);
  }
  :root[data-nav="collapsed"] .sidebar {
    padding-inline: var(--space-2);
    align-items: center;
  }
  :root[data-nav="collapsed"] .brand {
    padding: 0;
    justify-content: center;
    width: 36px;
  }
  :root[data-nav="collapsed"] .sidebar .nav-label,
  :root[data-nav="collapsed"] .sidebar .nav-meta,
  :root[data-nav="collapsed"] .theme-seg {
    display: none;
  }
  :root[data-nav="collapsed"] .nav-list {
    align-items: center;
  }
  :root[data-nav="collapsed"] .sidebar .nav-item {
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
  }
  :root[data-nav="collapsed"] .theme-cycle {
    display: flex;
  }
  :root[data-nav="collapsed"] .collapse-icon .icon:first-child {
    display: none;
  }
  :root[data-nav="collapsed"] .collapse-icon .icon:last-child {
    display: block;
  }
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar,
.tabbar {
  display: none;
}
.page {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-8);
}
#content {
  flex: 1;
  padding-bottom: var(--space-10);
}
#content:focus {
  outline: none;
}

/* Building blocks ---------------------------------------------------------------------------- */
.card {
  position: relative;
  min-width: 0;
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: transform 500ms var(--ease-out), box-shadow var(--dur-slow) var(--ease), border-color var(--dur-slow) var(--ease);
}
/* The lit edge: a sheen ring from the top left, and a glow that follows the pointer. */
.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card::before {
  background: linear-gradient(155deg, var(--glass-sheen), var(--glass-sheen-low) 22%, transparent 45%, transparent 70%, var(--glass-sheen-low));
}
.card::after {
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--glass-glow), transparent 65%);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
}
.card.is-lit::after {
  opacity: 1;
}
.card.is-lit {
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow-lift);
}
.card-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border-hairline);
}
.card-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
}
.card-body {
  padding: var(--space-4);
}
.list-card .row-list > li:first-child > .row {
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.list-card .row-list > li:last-child > .row {
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.list-card .row-list > li:only-child > .row {
  border-radius: var(--radius-card);
}
.entity {
  display: inline-flex;
}
.entity[data-entity="home"] { color: var(--entity-home); }
.entity[data-entity="ask"] { color: var(--entity-ask); }
.entity[data-entity="about"] { color: var(--entity-about); }
.entity[data-entity="projects"] { color: var(--entity-projects); }
.entity[data-entity="writing"] { color: var(--entity-writing); }
.entity[data-entity="tools"] { color: var(--entity-tools); }
.entity[data-entity="contact"] { color: var(--entity-contact); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: transform var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.btn:active,
.icon-btn:active {
  transform: translateY(0) scale(0.97);
}
.btn .icon {
  color: var(--text-secondary);
}
.btn-primary {
  border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-fill) 82%, #fff), var(--accent-fill));
  color: var(--accent-on);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 20px -8px color-mix(in srgb, var(--accent-fill) 70%, transparent);
}
.btn-primary .icon {
  color: inherit;
}
.btn-primary:hover {
  border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-fill-hover) 82%, #fff), var(--accent-fill-hover));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 26px -8px color-mix(in srgb, var(--accent-fill) 80%, transparent);
}
.btn-sm {
  height: var(--control-height-sm);
  padding: 0 10px;
  font-size: var(--fs-sm);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height);
  height: var(--control-height);
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  transition: transform var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.icon-btn-bordered {
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.icon-btn-bordered:hover {
  border-color: var(--border-strong);
  background: var(--surface-card);
  color: var(--accent);
  transform: translateY(-1px);
}
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--fw-medium);
  line-height: 1;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  background: var(--surface-sunken);
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease);
}
.chip:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.chip[aria-pressed="true"] {
  border-color: var(--surface-inverse);
  background: var(--surface-inverse);
  color: var(--text-inverse);
}

.row-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.row-list > li + li {
  border-top: 1px solid var(--border-hairline);
}
.row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
}
a.row {
  transition: background-color var(--dur-base) var(--ease);
}
a.row:hover {
  background: var(--surface-hover);
}
a.row .row-end {
  transition: transform var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
a.row:hover .row-end {
  color: var(--accent);
  transform: translateX(3px);
}
.row-icon {
  display: inline-flex;
  color: var(--text-secondary);
}
.row-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.row-title {
  color: var(--text-primary);
  font-weight: var(--fw-medium);
}
.row-sub {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}
.row-end {
  display: inline-flex;
  color: var(--text-tertiary);
}
.empty {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  color: var(--text-secondary);
}
.empty[hidden],
[hidden] {
  display: none !important;
}

/* Home --------------------------------------------------------------------------------------- */
.hero {
  padding: var(--space-12) 0 var(--space-6);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 var(--space-3);
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.hero-title {
  font-size: var(--fs-hero);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}
.typed-wrap {
  display: inline-block;
  color: var(--accent);
}
.caret {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  margin-left: 2px;
  background: currentColor;
  vertical-align: -0.08em;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.hero-ask {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 560px;
  margin-top: var(--space-6);
  padding: 6px 6px 6px var(--space-3);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: border-color var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease);
}
.hero-ask:focus-within {
  border-color: color-mix(in srgb, var(--focus-ring) 60%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 0 0 4px color-mix(in srgb, var(--focus-ring) 14%, transparent), var(--glass-shadow-lift);
}
.hero-ask-icon {
  display: inline-flex;
  color: var(--entity-ask);
}
.hero-ask input {
  flex: 1;
  min-width: 0;
  height: var(--control-height-sm);
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: var(--fs-md);
}
.hero-ask input::placeholder {
  color: var(--text-tertiary);
}
.hero-ask .btn {
  border-radius: var(--radius-pill);
  padding: 0 var(--space-4);
}
.hero-ask + .hero-actions {
  margin-top: var(--space-3);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.section {
  padding-top: var(--space-10);
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin-bottom: var(--space-4);
}
.section-head .lede {
  flex-basis: 100%;
}
.section-link {
  margin-left: auto;
}
.section-text-link {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  text-decoration: none;
}
.section-text-link:hover {
  color: var(--text-primary);
}
.section-link:hover .icon {
  color: var(--accent);
}
.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-title);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
  line-height: var(--lh-tight);
}
.lede {
  max-width: 62ch;
  margin: var(--space-1) 0 0;
  color: var(--text-secondary);
}
.group-label {
  margin: var(--space-4) 0 0;
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}
.card-body > .group-label:first-child {
  margin-top: 0;
}

.about-grid {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}
/* /ask and /admin: the island fills the main column. The chat is exactly one screen high
   and scrolls inside; the admin scrolls with the page. */
.page-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}
#content.page-app-ask {
  flex: none;
  height: 100dvh;
  padding-bottom: 0;
}
.page-app > .app-root {
  flex: 1;
  min-height: 0;
}
.role-when {
  font-variant-numeric: tabular-nums;
}

.about-main {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}
.roles {
  margin: 0;
  padding: 0 var(--space-4) var(--space-2);
  list-style: none;
}
.role {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-hairline);
}
.role:first-child {
  border-top: 0;
}
.role-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.role-title {
  font-weight: var(--fw-medium);
}
.role-when {
  flex: none;
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
}
.role-text {
  margin: var(--space-1) 0 0;
  color: var(--text-secondary);
}
.bio p {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.65;
}
.bio p + p {
  margin-top: var(--space-3);
}
#skills .lede {
  margin: 0 0 var(--space-1);
}

.feature-list {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.feature {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
}
.kicker {
  margin: 0 0 var(--space-1);
  color: var(--entity-projects);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}
.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
}
.title-row h3 {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
}
.feature .title-row h3 {
  font-size: 17px;
}
.date {
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.feature-copy .muted,
.project-row .muted {
  margin: var(--space-2) 0 0;
  max-width: 62ch;
}

.project-row {
  padding: var(--space-4);
  scroll-margin-top: var(--space-6);
}
.project-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}
.project-grid-compact {
  margin-bottom: var(--space-2);
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  scroll-margin-top: var(--space-6);
}
.project-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.project-name {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
}
.project-name a {
  color: inherit;
  text-decoration: none;
}
.project-name a:hover {
  color: var(--accent);
}
.project-summary {
  margin: 0;
  max-width: 62ch;
}
.project-type {
  margin: 0;
  font-size: var(--fs-sm);
}
.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--entity-projects) 16%, transparent);
  color: var(--entity-projects);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.35;
}
.badge-muted {
  background: var(--surface-hover);
  color: var(--text-secondary);
}
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
}
.project-links .btn {
  margin-top: 0;
}
.project-links {
  align-items: center;
}
.project-meta {
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
}
.project-links-end {
  display: inline-flex;
  gap: var(--space-2);
  margin-left: auto;
}
.empty-state {
  margin: 0;
  padding: var(--space-4);
  border: 1px dashed var(--border-hairline);
  border-radius: var(--radius-card);
  color: var(--text-secondary);
  text-align: center;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.page-head {
  padding-bottom: 0;
}
.highlights {
  margin: var(--space-2) 0 0;
  padding-left: 1.1rem;
  color: var(--text-secondary);
}
.highlights li + li {
  margin-top: 2px;
}
.highlights a,
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.18em;
}
.highlights a:hover,
.prose a:hover {
  text-decoration-color: currentColor;
}

.browser {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 200px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-menu);
  background: var(--surface-sunken);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 var(--space-3);
  border-bottom: 1px solid var(--border-hairline);
  background: var(--surface-nav);
}
.browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
}
.browser-bar p {
  margin: 0 0 0 var(--space-2);
  overflow: hidden;
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-load,
.browser iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
}
.preview-load {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  background: transparent;
  color: var(--text-primary);
}
.preview-load .icon {
  margin-bottom: var(--space-1);
  color: var(--text-tertiary);
}
.preview-load span {
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
}
.preview-load:hover {
  background: var(--surface-hover);
}
.preview-load.is-loading {
  opacity: 0.7;
}
.preview-close {
  position: absolute;
  top: 4px;
  right: var(--space-2);
}

.post-row .row-sub {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px var(--space-3);
  margin: var(--space-1) 0 0;
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}
.post-meta > * {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-3);
}
.tool img {
  flex: none;
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: transform 500ms var(--ease-out);
}
.tool:hover img {
  transform: scale(1.08) rotate(-4deg);
}
.tool-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.site-footer {
  padding: var(--space-6) 0 var(--space-8);
  scroll-margin-top: var(--space-6);
}
.fineprint {
  margin: var(--space-4) 0 0;
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
}
.missing {
  padding: var(--space-12) 0;
}
.missing .lede {
  margin-top: var(--space-2);
}
.standalone .brand {
  display: inline-flex;
  margin: 0 0 var(--space-8) calc(-1 * var(--space-2));
}

/* Post --------------------------------------------------------------------------------------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-progress);
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}
.post-layout {
  max-width: var(--prose-max);
  margin: 0 auto;
  padding-top: var(--space-8);
}
.post {
  position: relative;
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: calc(-1 * var(--space-2));
  padding: 4px var(--space-2);
  border-radius: var(--radius-control);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}
.crumbs a:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.post-title {
  margin: var(--space-4) 0 var(--space-2);
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}
.post .post-meta {
  font-size: var(--fs-sm);
}
.post .post-meta a:hover {
  color: var(--text-primary);
}
.audio {
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4) var(--space-4);
  scroll-margin-top: var(--space-6);
}
.audio audio {
  display: block;
  width: 100%;
  margin-top: var(--space-3);
}
.toc {
  margin-top: var(--space-5);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: inset 0 1px 0 var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.toc summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  min-height: 40px;
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  cursor: pointer;
  list-style: none;
}
.toc summary::-webkit-details-marker {
  display: none;
}
.toc ol {
  margin: 0;
  padding: 0 var(--space-2) var(--space-3);
  list-style: none;
}
.toc a {
  display: block;
  padding: 5px var(--space-2) 5px var(--space-3);
  border-left: 2px solid var(--border-hairline);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.35;
}
.toc a:hover {
  color: var(--text-primary);
}
.toc .toc-sub a {
  padding-left: var(--space-6);
}
.toc a[aria-current] {
  border-left-color: var(--accent);
  color: var(--text-primary);
}
@media (min-width: 1200px) {
  .post-layout.has-toc {
    max-width: calc(var(--prose-max) + var(--toc-width) + var(--space-10));
    padding-right: calc(var(--toc-width) + var(--space-10));
  }
  /* The contents float into the right margin and stick while the post scrolls. */
  .has-toc .toc {
    position: sticky;
    top: var(--space-6);
    float: right;
    width: var(--toc-width);
    max-height: calc(100dvh - var(--space-12));
    overflow-y: auto;
    margin: 0 calc(-1 * (var(--toc-width) + var(--space-10))) 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .js .has-toc .toc summary {
    display: none;
  }
  .has-toc .toc ol {
    padding: 0;
  }
  .has-toc .toc ol::before {
    content: "On this page";
    display: block;
    margin-bottom: var(--space-2);
    color: var(--text-tertiary);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
  }
}

.prose {
  margin-top: var(--space-6);
  font-size: var(--fs-prose);
  line-height: var(--lh-prose);
  overflow-wrap: break-word;
}
.prose > * {
  margin: 0;
}
.prose > * + * {
  margin-top: var(--space-4);
}
.prose h2,
.prose h3 {
  scroll-margin-top: var(--space-6);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.prose h2 {
  margin-top: var(--space-10);
  font-size: 21px;
}
.prose h3 {
  margin-top: var(--space-8);
  font-size: 17px;
}
.prose ul,
.prose ol {
  padding-left: 1.3rem;
}
.prose li + li {
  margin-top: var(--space-1);
}
.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: var(--space-1) var(--space-4);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-control);
  background: var(--surface-sunken);
  color: var(--text-secondary);
}
.prose code {
  padding: 0.12em 0.35em;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: 0.86em;
}
.prose pre {
  position: relative;
  overflow-x: auto;
  padding: var(--space-4);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-menu);
  background: var(--surface-sunken);
}
.prose pre code {
  padding: 0;
  background: none;
  font-size: 13px;
  line-height: 1.6;
}
.copy-code {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  opacity: 0;
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
}
.prose pre:hover .copy-code,
.copy-code:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .copy-code {
    opacity: 1;
  }
}
.prose img {
  display: block;
  width: 100%;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-menu);
}
.prose figure {
  margin-inline: 0;
}
.prose figcaption {
  margin-top: var(--space-2);
  color: var(--text-tertiary);
  font-size: var(--fs-sm);
  text-align: center;
}
.prose table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: var(--fs-base);
}
.prose th,
.prose td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-hairline);
  text-align: left;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--border-hairline);
}
.related {
  margin-top: var(--space-10);
}
.related .group-label {
  margin-bottom: var(--space-2);
}
.post-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
}

.post-nav .older {
  text-align: right;
}

/* Floating: dialogs, palette, tooltip, filter -------------------------------------------------- */
dialog.dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: 72dvh;
  padding: 0;
  border: 1px solid var(--border-hairline);
  border-radius: calc(var(--radius-card) + 4px);
  background: var(--surface-float);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow-float);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
}
dialog.dialog::backdrop {
  background: var(--surface-backdrop);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
@media (prefers-reduced-motion: no-preference) {
  dialog.dialog[open] {
    animation: pop-in 260ms var(--ease-out);
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}
.dialog-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) 0 var(--space-4);
}
.dialog-title {
  flex: 1;
  outline: none;
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
}
.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2) var(--space-6);
  margin: 0;
  padding: var(--space-3) var(--space-4) var(--space-4);
}
.shortcut-grid dt {
  color: var(--text-primary);
}
.shortcut-grid dd {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin: 0;
}
.shortcut-grid .or {
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
}

dialog.palette {
  width: min(580px, calc(100vw - 24px));
  margin-top: 14vh;
  overflow: hidden;
}
dialog.palette[open] {
  display: flex;
  flex-direction: column;
}
.palette-input {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--border-hairline);
  color: var(--text-tertiary);
}
.palette-input input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--fs-md);
  outline: none;
}
.palette-list {
  flex: 1;
  max-height: 380px;
  overflow-y: auto;
  padding: var(--space-1);
  overscroll-behavior: contain;
}
.menu-label {
  padding: 8px var(--space-2) 2px;
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 6px var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}
.menu-item[aria-selected="true"] {
  background: var(--surface-hover);
}
.menu-item .glyph {
  display: inline-flex;
  color: var(--text-secondary);
}
.menu-item .glyph img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.menu-item .glyph[data-entity="home"] { color: var(--entity-home); }
.menu-item .glyph[data-entity="ask"] { color: var(--entity-ask); }
.menu-item .glyph[data-entity="about"] { color: var(--entity-about); }
.menu-item .glyph[data-entity="projects"] { color: var(--entity-projects); }
.menu-item .glyph[data-entity="writing"] { color: var(--entity-writing); }
.menu-item .glyph[data-entity="tools"] { color: var(--entity-tools); }
.menu-item .glyph[data-entity="contact"] { color: var(--entity-contact); }
.menu-item .label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-item .meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
  white-space: nowrap;
}
.palette-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-3);
  color: var(--text-secondary);
}
.palette-foot {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border-top: 1px solid var(--border-hairline);
  color: var(--text-tertiary);
  font-size: var(--fs-xs);
}
.palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-tooltip);
  max-width: 260px;
  padding: 5px 8px;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--surface-inverse) 88%, transparent);
  color: var(--text-inverse);
  box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.35;
  pointer-events: none;
}
.tooltip .kbd {
  margin-left: 6px;
  min-width: 16px;
  height: 16px;
  border-color: transparent;
  background: color-mix(in srgb, var(--text-inverse) 16%, transparent);
  color: inherit;
}

.filter-clear {
  position: fixed;
  left: 50%;
  bottom: var(--space-4);
  z-index: var(--z-float);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: calc(100% - 32px);
  height: 36px;
  padding: 0 var(--space-3) 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-inverse);
  color: var(--text-inverse);
  box-shadow: var(--shadow-float);
  font-weight: var(--fw-medium);
  transform: translateX(-50%);
}

/* Wider screens ------------------------------------------------------------------------------ */
@media (min-width: 1100px) {
  .about-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    padding: var(--space-5);
  }
}

/* Phones: compact top bar ---------------------------------------------------- */
@media (max-width: 760px) {
  :root {
    --tabbar-height: 0px;
  }
  .tabbar {
    display: none !important;
  }
  /* Full height below the top bar, without page scroll. */
  #content.page-app-ask {
    height: calc(100dvh - var(--topbar-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  body:has(#content.page-app-ask) {
    padding-bottom: 0;
  }
  body:has(#content.page-app-ask) .shell {
    min-height: 0;
  }
  html {
    scroll-padding-top: calc(var(--topbar-height) + env(safe-area-inset-top) + var(--space-3));
  }
  body {
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  }
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar-col {
    display: none;
  }
  .page {
    padding-left: max(var(--space-4), env(safe-area-inset-left));
    padding-right: max(var(--space-4), env(safe-area-inset-right));
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    height: calc(var(--topbar-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(var(--space-3), env(safe-area-inset-right)) 0 max(var(--space-3), env(safe-area-inset-left));
    border-bottom: 1px solid var(--border-hairline);
    background: var(--surface-bar);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
  }
  .topbar .brand {
    margin: 0;
  }
  .topbar-actions {
    display: flex;
    gap: 2px;
  }
  .topbar .icon-btn {
    width: 40px;
    height: 40px;
  }
  .topbar .topbar-linkedin {
    color: var(--text-secondary);
  }
  .hero {
    padding-top: var(--space-8);
  }
  .section {
    padding-top: var(--space-8);
  }
  .feature {
    padding: var(--space-3);
  }
  .browser {
    display: none;
  }
  .tools {
    grid-template-columns: minmax(0, 1fr);
  }
  .post-layout {
    padding-top: var(--space-5);
  }
  .site-footer,
  .project-row,
  .audio,
  .prose h2,
  .prose h3 {
    scroll-margin-top: calc(var(--topbar-height) + env(safe-area-inset-top) + var(--space-3));
  }
  .read-progress {
    top: calc(var(--topbar-height) + env(safe-area-inset-top) - 2px);
  }
  .filter-clear {
    bottom: calc(env(safe-area-inset-bottom) + var(--space-3));
  }
  .topbar .brand-mark {
    filter: none;
  }
  dialog.dialog {
    margin-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
    margin-top: auto;
  }
  dialog.palette {
    margin-top: calc(var(--space-3) + env(safe-area-inset-top));
    margin-bottom: auto;
    max-height: calc(100dvh - var(--space-8) - env(safe-area-inset-top));
  }
  .palette-foot {
    display: none;
  }
  .post-nav .older {
    text-align: left;
  }
}

/* Hints, motion and the chat dock ------------------------------------------------------------ */
/* Explanations sit behind an info icon on devices that hover, and stay inline on touch. */
.hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  color: var(--text-tertiary);
  cursor: help;
  transition: color var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease);
}
.hint:hover,
.hint:focus-visible {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.card-head .hint {
  margin-left: auto;
}
@media (hover: hover) and (pointer: fine) {
  .lede-tip,
  .tool .row-sub {
    display: none;
  }
}
@media (hover: none), (pointer: coarse) {
  .hint {
    display: none;
  }
}

.hero-sep {
  width: 1px;
  height: 20px;
  margin: 0 var(--space-1);
  background: var(--border-strong);
}

/* Tilt: app.js sets the rotation on cards under a fine pointer. */
.card.is-tilting {
  transition: transform 140ms linear, box-shadow var(--dur-slow) var(--ease), border-color var(--dur-slow) var(--ease);
}

/* Entrance: the hero on load, everything below the fold as it scrolls in. */
@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    animation: rise 700ms var(--ease-out) both;
  }
  .hero > :nth-child(2) { animation-delay: 60ms; }
  .hero > :nth-child(3) { animation-delay: 120ms; }
  .hero > :nth-child(4) { animation-delay: 180ms; }
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
    transition-delay: var(--delay, 0ms);
  }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}
@media print {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  body::before,
  .ask-dock {
    display: none !important;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* Floating chat, bottom right, on desktops only. app.js loads the chat on first open. */
.ask-dock {
  display: none;
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .js .ask-dock {
    display: block;
    position: fixed;
    right: var(--space-6);
    bottom: var(--space-6);
    z-index: var(--z-float);
  }
}
.ask-launch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-left: auto;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  background: var(--surface-float);
  color: var(--entity-ask);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 0 0 6px color-mix(in srgb, var(--accent) 6%, transparent), var(--glass-shadow-lift);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: transform 400ms var(--ease-out), box-shadow var(--dur-slow) var(--ease), color var(--dur-base) var(--ease);
}
.ask-launch:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 0 0 8px color-mix(in srgb, var(--accent) 10%, transparent), var(--glass-shadow-lift);
}
.ask-launch::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--spin, 0deg), transparent 0 60%, var(--glass-glow), transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@media (prefers-reduced-motion: no-preference) {
  .ask-launch::before {
    animation: spin 6s linear infinite;
  }
}
@keyframes spin {
  to {
    --spin: 360deg;
  }
}
.ask-launch-icon {
  display: inline-flex;
}
.ask-launch-icon .icon:last-child,
.ask-dock[data-open] .ask-launch-icon .icon:first-child {
  display: none;
}
.ask-dock[data-open] .ask-launch-icon .icon:last-child {
  display: block;
}
.ask-dock[data-open] .ask-launch {
  color: var(--text-secondary);
}
.ask-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  display: flex;
  flex-direction: column;
  width: 410px;
  height: min(660px, calc(100dvh - 120px));
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  border-radius: 22px;
  background: var(--surface-float);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow-float), var(--glass-shadow-lift);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  backdrop-filter: blur(30px) saturate(170%);
  transform-origin: calc(100% - 27px) calc(100% + 40px);
}
.ask-panel > * {
  flex: 1;
  min-height: 0;
}
.ask-panel:empty::after {
  content: "";
  width: 22px;
  height: 22px;
  margin: auto;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: var(--radius-pill);
  animation: spin-plain 800ms linear infinite;
  flex: none;
}
@keyframes spin-plain {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .ask-panel:not([hidden]) {
    animation: dock-in 380ms var(--ease-out);
  }
}
@keyframes dock-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
  }
}

/* The chat's empty state: a small glass orb with a soft glow. */
.ask-orb {
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 22%, transparent), var(--accent-soft));
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 0 0 1px var(--border-hairline), 0 10px 30px -10px color-mix(in srgb, var(--accent) 55%, transparent);
}

/* The bio streams in like a model's answer: tokens arrive in small bursts, fade in from a
   blur in the accent colour, and a pulsing dot rides on the newest token. Until app.js has
   split the text, it stays hidden, with a fail-safe in case the script never runs. */
.js [data-stream="wait"] p {
  opacity: 0;
  animation: stream-failsafe 0s linear 2.5s forwards;
}
@keyframes stream-failsafe {
  to {
    opacity: 1;
  }
}
.tok {
  position: relative;
  opacity: 0;
  filter: blur(6px);
}
.tok.on {
  opacity: 1;
  filter: none;
  transition: opacity 420ms var(--ease-out), filter 420ms var(--ease-out), color 900ms var(--ease);
}
.tok.fresh {
  color: var(--accent);
}
.tok.head::after {
  content: "";
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  width: 0.5em;
  height: 0.5em;
  margin-top: -0.25em;
  border-radius: var(--radius-pill);
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent);
  animation: stream-dot 900ms ease-in-out infinite;
}
@keyframes stream-dot {
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-stream] p,
  .tok {
    opacity: 1;
    filter: none;
    animation: none;
  }
}

/* Popovers and menus in the islands get the same glass. */
[data-slot="dropdown-menu-content"],
[data-slot="popover-content"],
[data-slot="dialog-content"],
[data-slot="sheet-content"] {
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
}

/* The look -----------------------------------------------------------------------------------
   Everything above is structure. This part is the surface: black on white, with large light
   type; the glass and its lit edge follow in the next part. Two bands invert it, the hero and the footer, and the hero alone has
   colour: a slow fluid of sage, amber and oxblood behind the words. */

/* The older sheen and shadows are off. The glass below draws its own edge. */
body::before,
.card::before,
.card::after,
.ask-launch::before {
  display: none;
}
.card,
.btn,
.icon-btn-bordered,
.hero-ask,
.toc,
.topbar,
.tabbar,
.ask-launch,
.ask-panel,
.tooltip,
dialog.dialog,
dialog.dialog::backdrop {
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.shell {
  /* The hero and the footer run from edge to edge, under the sidebar. */
  overflow-x: clip;
}
@media (min-width: 761px) {
  :root[data-nav="collapsed"] {
    --nav-now: var(--nav-rail);
  }
}
@media (max-width: 760px) {
  :root {
    --nav-now: 0px;
  }
}
body {
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}
::selection {
  background: var(--surface-inverse);
  color: var(--text-inverse);
}

/* Type. Large sizes whisper at 300 or speak at 400. Small labels are 11px capitals. */
.hero-title,
.section-title,
.post-title,
.contact .card-title,
.bio p,
.post-row .row-title,
.project-name {
  font-family: var(--font-display);
  font-weight: var(--fw-light);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.card-title,
.eyebrow,
.group-label,
.fineprint,
.hero-meta,
.menu-label,
.badge,
.role-when,
.project-meta,
.post-meta,
.crumbs a,
.toc summary,
.has-toc .toc ol::before,
.nav-item,
.tab {
  font-size: var(--fs-label);
  font-weight: var(--fw-regular);
  letter-spacing: 0.04em;
  line-height: 1.36;
  text-transform: uppercase;
}
.card-title .entity,
.section-title > .entity {
  display: none;
}

/* Navigation: a wordmark and a stack of small capitals. No fills; ink marks where you are. */
.brand {
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  letter-spacing: -0.01em;
  text-transform: lowercase;
}
.brand-mark {
  filter: none;
}
.tool img,
.prose img {
  filter: grayscale(1) contrast(1.05);
  transition: filter var(--dur-slow) var(--ease);
}
.tool:hover img,
.prose img:hover {
  filter: none;
}
.sidebar {
  gap: 0;
  padding: var(--space-5) var(--space-5) var(--space-5);
}
:root[data-theme="dark"] .sidebar {
  --text-primary: #ffffff;
  --text-secondary: #b4b4b4;
  --text-tertiary: #b4b4b4;
  --text-inverse: #000000;
  --surface-inverse: #ffffff;
  --glass-fill: rgba(255, 255, 255, 0.14);
  --focus-ring: #ffffff;
  color: var(--text-primary);
  mix-blend-mode: difference;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sidebar {
    --text-primary: #ffffff;
    --text-secondary: #b4b4b4;
    --text-tertiary: #b4b4b4;
    --text-inverse: #000000;
    --surface-inverse: #ffffff;
    --glass-fill: rgba(255, 255, 255, 0.14);
    --focus-ring: #ffffff;
    color: var(--text-primary);
    mix-blend-mode: difference;
  }
}
:root[data-theme="light"] .sidebar {
  mix-blend-mode: normal;
  color: var(--text-primary);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .sidebar {
    mix-blend-mode: normal;
    color: var(--text-primary);
  }
}
.sidebar .brand-mark,
.sidebar .nav-item-profile .icon,
.topbar .brand-mark {
  mix-blend-mode: normal;
  filter: none;
}
:root[data-theme="dark"] .sidebar .brand,
:root[data-theme="dark"] .sidebar .nav-item-profile {
  mix-blend-mode: normal;
  isolation: isolate;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sidebar .brand,
  :root:not([data-theme="light"]) .sidebar .nav-item-profile {
    mix-blend-mode: normal;
    isolation: isolate;
  }
}
.sidebar .brand {
  height: 28px;
  margin-bottom: var(--space-8);
  padding: 0;
}
.nav-list {
  gap: 0;
}
.nav-item {
  height: 30px;
  padding: 0;
  border-radius: 0;
  transition: color var(--dur-base) var(--ease), letter-spacing var(--dur-slow) var(--ease-out);
}
.nav-item:hover,
.nav-item[aria-current] {
  background: transparent;
  box-shadow: none;
  color: var(--text-primary);
}
.nav-item:hover {
  letter-spacing: 0.09em;
}
.nav-item[aria-current] .nav-label::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-right: var(--space-2);
  background: currentColor;
  vertical-align: 0.32em;
}
.nav-item[aria-current] .icon {
  color: inherit;
}
.nav-list-profiles {
  margin-top: var(--space-8);
  padding-top: 0;
  border-top: 0;
}
.nav-meta .kbd {
  text-transform: none;
}
.theme-seg {
  width: fit-content;
  margin: var(--space-3) 0 var(--space-2);
  padding: 0;
  gap: 0;
  border-color: var(--border-soft);
  background: transparent;
  overflow: hidden;
}
.theme-seg button {
  width: 34px;
  border: 0;
  border-radius: 0;
}
:root:not([data-theme]) .theme-seg [data-theme-choice="system"],
:root[data-theme="light"] .theme-seg [data-theme-choice="light"],
:root[data-theme="dark"] .theme-seg [data-theme-choice="dark"] {
  background: var(--surface-inverse);
  color: var(--text-inverse);
}
/* Wide: words only. The icons are for the rail. */
:root:not([data-nav="collapsed"]) .sidebar .nav-item > .icon,
:root:not([data-nav="collapsed"]) .sidebar .nav-item > .collapse-icon {
  display: none;
}
:root:not([data-nav="collapsed"])
  .sidebar
  .nav-list-profiles
  .nav-item-profile
  > .icon {
  display: inline-flex;
}
.sidebar .nav-list-profiles .nav-label {
  display: none;
}
.sidebar .nav-list-profiles .nav-item-profile[data-profile="github"] {
  color: #181717;
}
.sidebar .nav-list-profiles .nav-item-profile[data-profile="linkedin"] {
  color: #0a66c2;
}
:root[data-theme="dark"] .sidebar .nav-list-profiles .nav-item-profile[data-profile="github"] {
  color: #f0f6fc;
}
@media (min-width: 761px) {
  :root[data-nav="collapsed"] .sidebar {
    padding-inline: var(--space-2);
  }
  :root[data-nav="collapsed"] .sidebar .brand {
    width: 36px;
  }
  :root[data-nav="collapsed"] .sidebar .nav-item {
    border-radius: var(--radius-pill);
  }
  :root[data-nav="collapsed"] .sidebar .nav-item:hover,
  :root[data-nav="collapsed"] .sidebar .nav-item[aria-current] {
    box-shadow: inset 0 0 0 1px var(--border-soft);
  }
  :root[data-nav="collapsed"] .sidebar .nav-item[aria-current] {
    box-shadow: inset 0 0 0 1px var(--border-strong);
  }
}

/* Controls: pills of glass. */
.btn {
  height: 44px;
  padding: 0 33px;
  border: 1px solid var(--border-soft);
  background: transparent;
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  transition: border-color var(--dur-slow) var(--ease-out), letter-spacing var(--dur-slow) var(--ease-out), translate var(--dur-base) var(--ease-out);
}
.btn:hover,
.btn-primary:hover {
  border-color: var(--border-strong);
  background: transparent;
  box-shadow: none;
  letter-spacing: 0.03em;
  transform: none;
}
.btn .icon {
  display: none;
}
.btn-primary {
  border-color: var(--border-strong);
  background: transparent;
  box-shadow: none;
  color: var(--text-primary);
}
.btn-sm {
  height: 32px;
  padding: 0 20px;
  font-size: var(--fs-xs);
}
.icon-btn {
  transition: color var(--dur-base) var(--ease), border-color var(--dur-slow) var(--ease-out), background-color var(--dur-base) var(--ease);
}
.icon-btn-bordered {
  border: 1px solid var(--border-soft);
  background: transparent;
}
.icon-btn-bordered:hover {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text-primary);
  transform: none;
}
.magnetic {
  transition: translate var(--dur-base) var(--ease-out), border-color var(--dur-slow) var(--ease-out), letter-spacing var(--dur-slow) var(--ease-out);
}
.kbd {
  background: transparent;
}
.chip {
  height: 28px;
  padding: 0 14px;
  border-color: var(--border-soft);
  background: transparent;
  color: var(--text-primary);
  font-weight: var(--fw-regular);
  transition: border-color var(--dur-slow) var(--ease-out), background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.chip:hover {
  border-color: var(--border-strong);
  transform: none;
}
.badge,
.badge-muted {
  padding: 3px 10px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-primary);
}
.badge-muted {
  color: var(--text-secondary);
}
.hint:hover,
.hint:focus-visible {
  background: transparent;
}

/* Cards are content, not containers. */
.card {
  background: transparent;
  border: 0;
  border-radius: 0;
  transition: none;
}
.card-head {
  min-height: 0;
  padding: 0 0 var(--space-3);
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-secondary);
}
.card-body {
  padding: var(--space-5) 0 0;
}
.row {
  min-height: 0;
  padding: var(--space-5) 0;
}
a.row:hover {
  background: transparent;
}
a.row .row-main,
a.row .row-end {
  transition: transform var(--dur-glide) var(--ease-out), color var(--dur-base) var(--ease);
}
a.row:hover .row-main {
  transform: translateX(14px);
}
a.row:hover .row-end {
  color: var(--text-primary);
  transform: translateX(-6px);
}
.row-title {
  font-size: var(--fs-md);
}
.row-sub {
  font-size: var(--fs-base);
}
.empty,
.empty-state {
  border: 0;
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  border-radius: 0;
  padding: var(--space-5) 0;
  text-align: left;
}

/* Hero: one phrase that owns the screen, in white, on the fluid. */
.hero,
.site-footer {
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-tertiary: rgba(255, 255, 255, 0.6);
  --text-body: #ffffff;
  --glass-fill: rgba(255, 255, 255, 0.08);
  --glass-fill-hover: rgba(255, 255, 255, 0.14);
  --edge-hi: rgba(255, 255, 255, 0.42);
  --edge-mid: rgba(255, 255, 255, 0.14);
  --edge-lo: rgba(255, 255, 255, 0.07);
  --edge-glow: rgba(255, 255, 255, 0.95);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --surface-inverse: #ffffff;
  --text-inverse: #000000;
  --focus-ring: #ffffff;
  --accent: #ffffff;
  color: var(--text-primary);
}
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: var(--space-5) 0 var(--space-8);
}
/* The band behind it, as wide as the screen: it runs under the sidebar. */
.hero::before,
.hero .blobs,
.hero-fluid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  translate: calc(-50% - var(--nav-now) / 2) 0;
}
.hero::before {
  content: "";
  z-index: -3;
  background: #000000;
}
/* Without WebGL the fluid is five soft shapes that drift and morph. */
.hero .blobs {
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.blobs i {
  position: absolute;
  width: var(--s, 40vmax);
  aspect-ratio: 1;
  border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%;
  background: var(--c);
  filter: blur(70px);
  opacity: 0.55;
  translate: calc(var(--px, 0) * var(--d, 30) * 1px) calc(var(--py, 0) * var(--d, 30) * 1px);
  transition: translate 1.6s var(--ease-out);
  will-change: transform, translate;
}
.blobs i:nth-child(1) { --c: var(--fluid-sage); --s: 40vmax; --d: 40; left: -10vmax; top: -16vmax; }
.blobs i:nth-child(2) { --c: var(--fluid-amber); --s: 36vmax; --d: -55; right: 6vmax; top: 2vmax; }
.blobs i:nth-child(3) { --c: var(--fluid-oxblood); --s: 46vmax; --d: 70; right: -14vmax; bottom: -20vmax; opacity: 0.8; }
.blobs i:nth-child(4) { --c: var(--fluid-oxblood); --s: 30vmax; --d: -35; left: 8%; bottom: -12vmax; opacity: 0.6; }
.blobs i:nth-child(5) { --c: var(--fluid-amber); --s: 20vmax; --d: 90; left: 40%; top: 30%; opacity: 0.35; }
.blobs .blob-cursor {
  left: 0;
  top: 0;
  width: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 172, 46, 0.5), transparent 68%);
  filter: none;
  opacity: 0;
  translate: none;
  transform: translate3d(var(--cx, -999px), var(--cy, -999px), 0) translate(-50%, -50%);
  transition: opacity 800ms var(--ease);
  animation: none;
  mix-blend-mode: screen;
}
.blobs.has-cursor .blob-cursor {
  opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .blobs i:nth-child(1) { animation: morph 26s ease-in-out infinite alternate, float 34s ease-in-out infinite alternate; }
  .blobs i:nth-child(2) { animation: morph 22s ease-in-out -6s infinite alternate, float 28s ease-in-out -10s infinite alternate-reverse; }
  .blobs i:nth-child(3) { animation: morph 30s ease-in-out -12s infinite alternate, float 38s ease-in-out -4s infinite alternate; }
  .blobs i:nth-child(4) { animation: morph 24s ease-in-out -3s infinite alternate, float 30s ease-in-out -16s infinite alternate-reverse; }
  .blobs i:nth-child(5) { animation: morph 20s ease-in-out -9s infinite alternate, float 26s ease-in-out -7s infinite alternate; }
}
@keyframes morph {
  33% { border-radius: 63% 37% 41% 59% / 52% 63% 37% 48%; }
  66% { border-radius: 38% 62% 55% 45% / 35% 45% 55% 65%; }
  100% { border-radius: 55% 45% 35% 65% / 60% 38% 62% 40%; }
}
@keyframes float {
  50% { transform: translate3d(6vmax, 4vmax, 0) rotate(25deg) scale(1.08); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) rotate(-15deg) scale(0.95); }
}
/* With WebGL, app.js paints the fluid here and the shapes rest. */
.hero-fluid {
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-glide) var(--ease);
}
.hero.has-fluid .hero-fluid {
  opacity: 1;
}
.hero.has-fluid .blobs i:not(.blob-cursor) {
  display: none;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-6);
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text-primary);
}
.hero-meta span:last-child {
  margin-left: auto;
}
.hero-title {
  max-width: none;
  margin: auto 0;
  padding: var(--space-10) 0 var(--space-6);
  color: var(--text-primary);
  font-size: var(--fs-display);
  font-weight: var(--fw-regular);
  letter-spacing: -0.055em;
  line-height: 1;
  text-transform: none;
  text-wrap: nowrap;
}
.hero-title .hero-line {
  display: block;
}
.hero-title .hero-line + .hero-line {
  width: auto;
  padding-left: 0.62em;
  background: none;
}
/* Letters: app.js thins the ones near the pointer. */
.hero-title .ch {
  display: inline-block;
  transition: font-weight var(--dur-slow) var(--ease-out);
}
.hero-lede {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: var(--fs-sub);
  font-weight: var(--fw-light);
  letter-spacing: -0.03em;
  line-height: 1.19;
  text-transform: none;
}
.typed-wrap {
  color: var(--text-primary);
}
.caret {
  width: 1px;
}
.hero-ask {
  max-width: 520px;
  margin-top: var(--space-6);
  padding: 5px 5px 5px var(--space-5);
  border-color: var(--border-soft);
  background: transparent;
  transition: border-color var(--dur-slow) var(--ease-out);
}
.hero-ask:focus-within {
  border-color: var(--border-strong);
  box-shadow: none;
}
.hero-ask-icon {
  color: var(--text-primary);
}
.hero-ask input {
  height: 34px;
}
.hero-ask input::placeholder {
  color: var(--text-secondary);
}
.hero-ask .btn {
  height: 34px;
  padding: 0 var(--space-5);
  border-color: transparent;
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-ask .btn:hover {
  border-color: var(--border-soft);
  letter-spacing: 0.1em;
}
.hero-ask + .hero-actions,
.hero-actions {
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.hero-actions .icon-btn {
  width: 44px;
  height: 44px;
  color: var(--text-primary);
}
.hero-sep {
  height: 14px;
  background: var(--border-soft);
}
/* The one ornament: a ring of text that turns slowly. */
.hero-badge {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 112px;
  width: 132px;
  height: 132px;
  color: var(--text-primary);
  pointer-events: none;
  translate: calc(var(--px, 0) * -14px) calc(var(--py, 0) * -14px);
  transition: translate var(--dur-glide) var(--ease-out);
}
.hero-badge::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 22px;
  margin: -11px 0 0;
  background: currentColor;
}
.hero-badge::after {
  content: "";
  position: absolute;
  top: calc(50% + 4px);
  left: calc(50% - 3.5px);
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  rotate: 45deg;
}
.hero-badge svg {
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: var(--fw-regular);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-badge svg {
    animation: turn 36s linear infinite;
  }
  .hero > :not(.blobs, .hero-fluid, .hero-badge) {
    animation: rise var(--dur-glide) var(--ease-out) both;
  }
  .hero > .hero-title { animation-delay: 80ms; }
  .hero > .hero-lede { animation-delay: 200ms; }
  .hero > .hero-ask { animation-delay: 280ms; }
  .hero > .hero-actions { animation-delay: 360ms; }
  .hero > .blobs,
  .hero > .hero-fluid,
  .hero > .hero-badge {
    animation: none;
  }
  .js .reveal {
    transform: translateY(28px);
    transition: opacity var(--dur-glide) var(--ease-out), transform var(--dur-glide) var(--ease-out);
    transition-delay: var(--delay, 0ms);
  }
  .js .reveal.is-in {
    transform: none;
  }
}
@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

/* Sections: a heading that is spoken, not shouted, and a small number. Lots of air. */
#content {
  counter-reset: chapter;
}
.section {
  counter-increment: chapter;
  padding-top: var(--space-section);
}
.section-head {
  position: relative;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-10);
  padding: 0;
  border: 0;
}
.section-title {
  color: var(--text-primary);
  font-size: var(--fs-heading);
  line-height: var(--lh-tight);
  text-transform: none;
}
.hero ~ .section > .section-head::after {
  content: counter(chapter, decimal-leading-zero);
  order: 5;
  margin-left: auto;
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
/* Every other chapter swaps sides. */
.hero ~ .section:nth-of-type(odd) > .section-head {
  flex-direction: row-reverse;
}
.hero ~ .section:nth-of-type(odd) > .section-head::after {
  margin-left: 0;
  margin-right: auto;
}
.section-head .lede {
  order: 6;
}
.section-head .hint,
.section-head .section-link {
  align-self: center;
}
.section-link {
  margin-left: 0;
}
.lede {
  font-size: var(--fs-md);
}
.page-head .section-title {
  font-size: var(--fs-heading);
}

/* About: the bio is the manifesto. */
.about-grid,
.about-main {
  gap: var(--space-12) 46px;
}
.bio.card-body {
  padding: 0;
}
.bio p {
  color: var(--text-primary);
  text-wrap: pretty;
  font-size: clamp(20px, 2.5vw, 29px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.bio p + p {
  margin-top: var(--space-5);
}
.roles {
  padding: 0;
}
.role {
  padding: var(--space-5) 0;
}
.role-title {
  font-size: var(--fs-prose);
}
.role-text {
  margin-top: var(--space-2);
  font-size: var(--fs-base);
}
.role .muted a:hover {
  color: var(--text-primary);
}
.group-label {
  margin-top: var(--space-6);
  color: var(--text-secondary);
}

/* Work: one project per row, the name on the left, the rest on the right. */
.project-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border-hairline);
}
.project-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-3) 46px;
  align-items: start;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border-hairline);
}
.project-card:first-child {
  border-top-color: var(--border-strong);
}
.project-card-head {
  grid-row: 1 / span 4;
  flex-direction: column;
  gap: var(--space-3);
}
.project-card > :not(.project-card-head) {
  grid-column: 2;
}
.project-name {
  font-size: var(--fs-sub);
  line-height: 1.19;
}
.project-name a {
  transition: opacity var(--dur-base) var(--ease);
}
.project-name a:hover {
  color: inherit;
  opacity: 0.55;
}
.project-summary {
  color: var(--text-body);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
}
.project-card .pills {
  margin-top: var(--space-1);
}
.project-links {
  margin-top: 0;
  padding-top: var(--space-1);
}
.project-links:empty {
  display: none;
}
/* The project's picture: the content itself, no frame. It prints in black and white until you
   look closer, and comes a little nearer. */
.project-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: var(--space-3);
  background: var(--surface-sunken);
}
.project-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(1) contrast(1.05);
  transition: filter var(--dur-slow) var(--ease), transform var(--dur-glide) var(--ease-out);
}
.project-card:hover .project-thumb img {
  filter: none;
  transform: scale(1.03);
}

/* Writing and the other lists: big titles, hairlines, room. */
.list-card {
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-hairline);
}
.post-row {
  padding: var(--space-6) 0;
}
.post-row .row-main {
  gap: var(--space-2);
}
.post-row .row-title {
  font-size: var(--fs-title);
  line-height: 1.19;
}
.post-row .row-sub {
  max-width: 68ch;
  font-size: var(--fs-md);
}
.post-meta {
  margin-top: var(--space-1);
}
.post-meta .icon {
  display: none;
}
.tools {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0 46px;
  border-bottom: 1px solid var(--border-hairline);
}
.tool {
  padding: 14px 0;
  border-top: 1px solid var(--border-hairline);
}
.tool img {
  width: 28px;
  height: 28px;
}
.tool:hover img {
  transform: none;
}
.tool .row-title,
.tool-text {
  transition: transform var(--dur-glide) var(--ease-out);
}
.tool:hover .tool-text {
  transform: translateX(8px);
}

/* Footer: the second dark band. */
.site-footer {
  margin-top: var(--space-section);
  margin-left: calc(-1 * var(--nav-now));
  padding: var(--space-section) 0 var(--space-8) var(--nav-now);
  background: #000000;
  border-top: 1px solid var(--border-hairline);
}
.contact .card-head {
  padding: 0;
  border: 0;
}
.contact .card-title {
  color: var(--text-primary);
  font-size: var(--fs-heading);
  line-height: var(--lh-tight);
  text-transform: none;
}
.contact .row-list {
  margin-top: var(--space-10);
  border-top: 1px solid var(--border-strong);
}
.contact .row {
  padding: var(--space-5) 0;
}
.contact .row-icon {
  display: none;
}
.contact .row-main {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-6);
}
.contact .row-title {
  font-size: var(--fs-sub);
  font-weight: var(--fw-light);
  letter-spacing: -0.03em;
}
.contact .row-sub {
  color: var(--text-tertiary);
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fineprint {
  margin-top: var(--space-12);
  color: var(--text-tertiary);
}
.missing {
  padding: var(--space-section) 0;
}
.missing .hero-title {
  font-size: var(--fs-heading);
  font-weight: var(--fw-light);
  letter-spacing: -0.03em;
  line-height: var(--lh-tight);
  padding: 0;
  text-wrap: balance;
}

/* The spine: a vertical line of text on the right edge of wide screens, in a grey that reads
   on paper and on the bands. */
.spine {
  display: none;
}
@media (min-width: 1400px) {
  .spine {
    position: fixed;
    top: var(--space-5);
    right: var(--space-3);
    z-index: var(--z-sticky);
    display: block;
    margin: 0;
    color: #808080;
    font-size: var(--fs-label);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    pointer-events: none;
  }
  .spine b {
    font-weight: var(--fw-regular);
  }
  /* The chat and the admin use that edge for their own controls. */
  body:has(.page-app) .spine {
    display: none;
  }
  .hero-meta span:last-child {
    margin-right: var(--space-5);
  }
}

/* Post: a quiet column. */
.read-progress {
  height: 1px;
  background: var(--text-primary);
}
.post-layout {
  padding-top: var(--space-10);
}
.crumbs a {
  margin-left: 0;
  padding: 0;
  border-radius: 0;
  transition: color var(--dur-base) var(--ease), letter-spacing var(--dur-slow) var(--ease-out);
}
.crumbs a:hover {
  background: transparent;
  letter-spacing: 0.09em;
}
.post-title {
  margin: var(--space-6) 0 var(--space-4);
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: var(--lh-tight);
}
.post .post-meta {
  font-size: var(--fs-label);
}
.post .post-meta .icon {
  display: block;
}
.audio {
  margin-top: var(--space-6);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-hairline);
}
.audio audio {
  filter: grayscale(1);
}
.toc {
  border-color: var(--border-hairline);
  border-inline: 0;
  background: transparent;
}
.toc summary {
  padding-inline: 0;
}
.toc ol {
  padding-inline: 0;
}
.toc a {
  border-left-width: 1px;
  transition: color var(--dur-base) var(--ease);
}
.toc a[aria-current] {
  border-left-color: var(--text-primary);
}
.prose {
  margin-top: var(--space-8);
  color: var(--text-body);
}
.prose > * + * {
  margin-top: var(--space-5);
}
.prose h2,
.prose h3 {
  color: var(--text-primary);
  font-family: var(--font-display);
  line-height: 1.19;
}
.prose h2 {
  margin-top: var(--space-12);
  font-size: 30px;
  font-weight: var(--fw-regular);
  letter-spacing: -0.02em;
}
.prose h3 {
  margin-top: var(--space-10);
  font-size: var(--fs-prose);
  font-weight: var(--fw-semibold);
  letter-spacing: 0;
}
.highlights a,
.prose a {
  text-decoration-thickness: 1px;
  text-decoration-color: currentColor;
  transition: opacity var(--dur-base) var(--ease);
}
.highlights a:hover,
.prose a:hover {
  opacity: 0.55;
}
.prose blockquote {
  padding: 0 0 0 var(--space-5);
  border: 0;
  border-left: 1px solid var(--border-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: var(--fw-light);
  line-height: 1.36;
}
.prose img {
  border-color: var(--border-hairline);
}
.prose figcaption {
  font-size: var(--fs-xs);
  text-align: left;
}
.copy-code {
  border-color: var(--border-soft);
  background: var(--surface-canvas);
}
.related {
  margin-top: var(--space-section);
}
.related .row-icon {
  display: none;
}
.related .row-title {
  font-size: var(--fs-prose);
}
.post-nav {
  gap: var(--space-3) 46px;
  margin-top: var(--space-10);
}
.post-nav a {
  gap: var(--space-2);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border-strong);
}
.post-nav .row-sub {
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.post-nav .row-title {
  font-size: var(--fs-prose);
  transition: opacity var(--dur-base) var(--ease);
}
.post-nav a:hover .row-title {
  opacity: 0.55;
}

/* Floating things. */
dialog.dialog {
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--surface-float);
}
.dialog-head {
  padding: var(--space-4) var(--space-4) 0 var(--space-5);
}
.dialog-title {
  font-family: var(--font-display);
  font-size: var(--fs-prose);
  font-weight: var(--fw-regular);
  letter-spacing: -0.01em;
}
.shortcut-grid {
  padding: var(--space-4) var(--space-5) var(--space-5);
}
.palette-input {
  padding: 0 var(--space-5);
}
.palette-input input {
  height: 56px;
  font-size: var(--fs-prose);
}
.palette-list {
  padding: var(--space-2) 0;
}
.menu-label {
  padding: var(--space-3) var(--space-5) var(--space-1);
}
.menu-item {
  padding: 6px var(--space-5);
  border-radius: 0;
}
.palette-foot {
  padding: var(--space-3) var(--space-5);
}
.tooltip {
  padding: 6px 10px;
  border-radius: 0;
  background: var(--surface-inverse);
  font-size: var(--fs-label);
  letter-spacing: 0.02em;
}
.ask-launch {
  border-color: var(--border-strong);
  background: var(--surface-canvas);
  color: var(--text-primary);
  transition: translate var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.ask-launch:hover {
  background: var(--surface-inverse);
  box-shadow: none;
  color: var(--text-inverse);
  transform: none;
}
.ask-dock[data-open] .ask-launch {
  color: var(--text-primary);
}
.ask-dock[data-open] .ask-launch:hover {
  color: var(--text-inverse);
}
.ask-panel {
  border-color: var(--border-strong);
  border-radius: 0;
  background: var(--surface-canvas);
}
.ask-panel:empty::after {
  border-width: 1px;
  border-top-color: var(--text-primary);
}
.ask-orb {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: transparent;
  box-shadow: none;
}
.tok.fresh {
  color: var(--text-secondary);
}
.tok.head::after {
  box-shadow: none;
}

@media (max-width: 760px) {
  .topbar,
  .tabbar {
    background: var(--surface-bar);
  }
  .topbar .brand {
    height: auto;
  }
  .tab {
    font-size: 10px;
  }
  .tab[aria-current] .icon {
    color: inherit;
  }
  .hero {
    min-height: calc(100svh - var(--topbar-height) - var(--tabbar-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: var(--space-4) 0 var(--space-6);
  }
  .hero-meta span:last-child {
    margin-left: 0;
  }
  .hero-title {
    padding: var(--space-6) 0;
    font-size: clamp(64px, 23vw, 120px);
  }
  .hero-title .hero-line + .hero-line {
    padding-left: 0;
  }
  .hero-badge {
    top: var(--space-10);
    right: -6px;
    bottom: auto;
    width: 92px;
    height: 92px;
  }
  .hero-badge svg {
    font-size: 10.5px;
  }
  .hero-actions .btn {
    padding: 0 22px;
  }
  .project-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .project-card-head {
    grid-row: auto;
  }
  .project-card > :not(.project-card-head) {
    grid-column: 1;
  }
  .post-row .row-title {
    font-size: 22px;
  }
  .contact .row-main {
    flex-direction: column;
  }
}

/* Glass -----------------------------------------------------------------------------------------
   No borders, no boxes, no hard corners. What needs a surface is glass: a faint fill, fully
   rounded, with a lit edge. The edge is a 1px ring of light, drawn with a mask and never a
   border. It is brighter at the top left; under a fine pointer a glow follows the pointer along
   it, and on the main tiles and buttons a light travels around it while they are hovered.
   Motion follows a few rules: press feedback on everything pressable (scale 0.97, 140ms),
   interface transitions under 300ms on a strong ease-out, hover effects only for a pointer
   that hovers, and movement only on transform and opacity. */

@property --lit-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* Lines that were here before are gone: every hairline token is clear. */
.card-head,
.empty,
.empty-state,
.project-grid,
.project-card,
.project-card:first-child,
.list-card,
.row-list > li + li,
.tools,
.tool,
.site-footer,
.contact .row-list,
.audio,
.toc,
.toc a,
.post-nav a,
.prose blockquote,
.prose pre,
.prose img,
.prose th,
.prose td,
.role,
.nav-list-profiles,
.palette-input,
.palette-foot,
.topbar,
.tabbar,
.kbd,
.chip,
.badge,
.badge-muted,
.btn,
.btn-primary,
.icon-btn-bordered,
.hero-ask,
.theme-seg,
.ask-launch,
.ask-panel,
.copy-code,
dialog.dialog {
  border: 0;
}

/* The lit edge. Keep this list in step with LIT in app.js, which feeds the pointer's place. */
.project-card,
.tool,
.audio,
.post-nav a,
.btn,
.icon-btn-bordered,
.hero-ask,
.chip,
.empty,
.empty-state,
.prose blockquote,
.row,
.ask-launch,
.ask-panel,
dialog.dialog {
  position: relative;
  border-radius: var(--radius-card);
  background: var(--glass-fill);
}
.project-card::before,
.tool::before,
.audio::before,
.post-nav a::before,
.btn::before,
.icon-btn-bordered::before,
.hero-ask::before,
.chip::before,
.empty::before,
.empty-state::before,
.prose blockquote::before,
.row::before,
.ask-launch::before,
.ask-panel::before,
dialog.dialog::before,
.project-card::after,
.tool::after,
.audio::after,
.post-nav a::after,
.btn::after,
.icon-btn-bordered::after,
.hero-ask::after,
.chip::after,
.row::after,
.ask-launch::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* At rest: light from the top left. */
.project-card::before,
.tool::before,
.audio::before,
.post-nav a::before,
.btn::before,
.icon-btn-bordered::before,
.hero-ask::before,
.chip::before,
.empty::before,
.empty-state::before,
.prose blockquote::before,
.row::before,
.ask-launch::before,
.ask-panel::before,
dialog.dialog::before {
  background: linear-gradient(150deg, var(--edge-hi), var(--edge-lo) 28%, var(--edge-lo) 72%, var(--edge-mid));
}
/* Under the pointer: a glow that follows it along the edge. */
.project-card::after,
.tool::after,
.audio::after,
.post-nav a::after,
.btn::after,
.icon-btn-bordered::after,
.hero-ask::after,
.chip::after,
.row::after,
.ask-launch::after {
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 0%), var(--edge-glow), transparent 65%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}
/* A plain row has no surface until it is pointed at. */
.row {
  background: transparent;
}
.row::before {
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}

.project-card,
.tool,
.audio,
.post-nav a,
.row,
.chip,
.btn,
.icon-btn-bordered,
.ask-launch {
  transition: background-color var(--dur-base) var(--ease), transform var(--dur-press) var(--ease-out), translate var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .project-card:hover,
  .tool:hover,
  .post-nav a:hover,
  a.row:hover,
  .chip:hover,
  .btn:hover,
  .icon-btn-bordered:hover,
  .hero-ask:focus-within {
    background: var(--glass-fill-hover);
  }
  .project-card:hover::after,
  .tool:hover::after,
  .audio:hover::after,
  .post-nav a:hover::after,
  .btn:hover::after,
  .icon-btn-bordered:hover::after,
  .hero-ask:hover::after,
  .hero-ask:focus-within::after,
  .chip:hover::after,
  a.row:hover::after,
  a.row:hover::before,
  .ask-launch:hover::after {
    opacity: 1;
  }
}
/* A light that travels around the edge while a main tile or button is hovered. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .project-card:hover::before,
  .tool:hover::before,
  .post-nav a:hover::before,
  .btn:hover::before,
  .hero-ask:focus-within::before,
  .ask-launch::before {
    background:
      conic-gradient(from var(--lit-angle), transparent 0 62%, var(--edge-glow) 84%, transparent 100%),
      linear-gradient(150deg, var(--edge-hi), var(--edge-lo) 28%, var(--edge-lo) 72%, var(--edge-mid));
    animation: lit-turn 2.4s linear infinite;
  }
  .ask-launch::before {
    animation-duration: 7s;
  }
}
@keyframes lit-turn {
  to {
    --lit-angle: 360deg;
  }
}

/* Press: the interface hears you. */
.btn:active,
.icon-btn:active,
.chip:active,
.ask-launch:active,
.theme-seg button:active,
.tab:active,
a.row:active,
a.tool:active,
.post-nav a:active,
.nav-item:active {
  transform: scale(0.97);
}

/* Controls. */
.btn,
.btn:hover,
.btn-primary:hover {
  border-radius: var(--radius-pill);
  letter-spacing: 0;
}
.btn-primary,
.btn-primary:hover {
  background: var(--surface-inverse);
  color: var(--text-inverse);
}
.btn-primary::before {
  display: none;
}
.icon-btn-bordered,
.chip,
.ask-launch {
  border-radius: var(--radius-pill);
}
.chip[aria-pressed="true"],
.chip[aria-pressed="true"]:hover {
  background: var(--surface-inverse);
}
.chip[aria-pressed="true"]::before {
  opacity: 0;
}
.badge,
.badge-muted,
.kbd,
.theme-seg {
  background: var(--glass-fill);
}
.kbd {
  border-radius: 7px;
}
.hero-ask {
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.hero-ask .btn,
.hero-ask .btn:hover {
  background: transparent;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.hero-ask .btn::before,
.hero-ask .btn::after {
  display: none;
}
.hero .btn:not(.btn-primary),
.hero .icon-btn-bordered {
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.hero-sep {
  display: none;
}
.nav-item:hover,
.crumbs a:hover {
  letter-spacing: 0.04em;
}
.nav-item {
  transition: color var(--dur-base) var(--ease), transform var(--dur-press) var(--ease-out);
}
/* Where you are: a dot, not a line. */
.nav-item[aria-current] .nav-label::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  vertical-align: 0.14em;
}
@media (min-width: 761px) {
  :root[data-nav="collapsed"] .sidebar .nav-item:hover,
  :root[data-nav="collapsed"] .sidebar .nav-item[aria-current] {
    box-shadow: none;
    background: rgba(255, 255, 255, 0.16);
  }
}

/* Tiles and rows. */
.project-grid {
  gap: var(--space-4);
}
.project-card {
  padding: var(--space-6);
}
.project-thumb {
  border-radius: 20px;
}
.list-card .row-list,
.contact .row-list,
.related .row-list {
  display: grid;
  gap: var(--space-1);
}
.row,
.post-row {
  padding: var(--space-5) var(--space-6);
}
.list-card .row-list > li > .row {
  border-radius: var(--radius-card);
}
.list-card,
.related .card,
.contact .row-list {
  margin-inline: calc(-1 * var(--space-6));
}
a.row:hover .row-main {
  transform: none;
}
a.row .row-end {
  transition: transform var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  a.row:hover .row-end {
    transform: translateX(4px);
  }
}
.tools {
  gap: var(--space-3);
}
.tool {
  padding: var(--space-3) var(--space-5) var(--space-3) var(--space-4);
  border-radius: var(--radius-pill);
}
.tool:hover .tool-text {
  transform: none;
}
.empty,
.empty-state {
  padding: var(--space-5) var(--space-6);
}
.role {
  padding: var(--space-4) 0;
}
.audio {
  padding: var(--space-4) var(--space-5);
}
.audio audio {
  border-radius: var(--radius-pill);
}
.post-nav a {
  padding: var(--space-5) var(--space-6);
}
.toc {
  border-radius: var(--radius-menu);
  background: var(--glass-fill);
}
.toc summary {
  padding-inline: var(--space-5);
}
.toc ol {
  padding-inline: var(--space-3);
}
.toc a {
  border-radius: var(--radius-pill);
  transition: color var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease);
}
.toc a[aria-current] {
  background: var(--glass-fill-hover);
}
@media (min-width: 1200px) {
  .has-toc .toc {
    background: transparent;
  }
}
.read-progress {
  height: 2px;
  border-radius: 2px;
}

/* Prose. */
.prose blockquote {
  padding: var(--space-5) var(--space-6);
}
.prose pre {
  border-radius: 20px;
  background: var(--glass-fill);
}
.prose code {
  border-radius: 7px;
}
.prose img {
  border-radius: 20px;
}
.prose th,
.prose td {
  padding: var(--space-3);
}
.prose tbody tr:nth-child(odd) td {
  background: var(--glass-fill);
}
.prose td:first-child,
.prose th:first-child {
  border-radius: 12px 0 0 12px;
}
.prose td:last-child,
.prose th:last-child {
  border-radius: 0 12px 12px 0;
}
.prose hr {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--edge-lo) 20%, var(--edge-lo) 80%, transparent);
}
.copy-code {
  border-radius: var(--radius-pill);
  background: var(--surface-float);
}

/* Floating things: more of the same glass, with what is behind them blurred. */
dialog.dialog,
.ask-panel,
.ask-launch {
  background: var(--glass-float);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-lift);
}
dialog.dialog::backdrop {
  background: var(--surface-backdrop);
}
.ask-launch:hover {
  background: var(--glass-float);
  color: var(--text-primary);
}
.ask-dock[data-open] .ask-launch:hover {
  color: var(--text-primary);
}
.ask-panel {
  transform-origin: calc(100% - 27px) calc(100% + 40px);
}
.menu-item {
  margin-inline: var(--space-2);
  padding-inline: var(--space-3);
  border-radius: var(--radius-pill);
}
.tooltip {
  border-radius: 10px;
}
.theme-seg {
  border-radius: var(--radius-pill);
}
.theme-seg button {
  border-radius: var(--radius-pill);
  transition: transform var(--dur-press) var(--ease-out), color var(--dur-base) var(--ease);
}
.ask-orb {
  border: 0;
  background: var(--glass-fill);
}
@media (prefers-reduced-motion: no-preference) {
  /* A dialog opened by a click comes forward. The search is opened from the keyboard, many
     times a day, so it is simply there. */
  dialog.dialog[open] {
    animation: pop-in 220ms var(--ease-out);
  }
  dialog.palette[open] {
    animation: none;
  }
  .ask-panel:not([hidden]) {
    animation: dock-in 260ms var(--ease-out);
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}
@keyframes dock-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
}

@media (max-width: 760px) {
  .topbar,
  .tabbar {
    background: var(--glass-float);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
  }
  .list-card,
  .related .card,
  .contact .row-list {
    margin-inline: calc(-1 * var(--space-3));
  }
  .row,
  .post-row {
    padding: var(--space-4) var(--space-3);
  }
  .project-card {
    padding: var(--space-5);
  }
}

/* Motion ------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .caret {
    display: none;
  }
}
