/* JetBrains Mono, latin subset. SIL Open Font License: fonts/jetbrains-mono/OFL.txt */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --color-bg: #ffffff;
  --color-bg-panel: #fcfcfb;
  --color-text: #1a1a1a;
  --color-muted: #666666;
  --color-accent: #2563eb;
  --color-border: #e5e5e5;
  --grid-line-color: #e2e2df;
  --color-nav-pill: #f6f5f2;
  --color-nav-pill-border: #e6e4e0;
  --color-code-bg: #f3f2ef;
  --color-shadow: rgba(15, 15, 15, 0.06);
  --badge-neutral-bg: #f3f2ef;
  --badge-neutral-fg: #3f3f3c;
  --badge-accent-bg: #e8efff;
  --badge-accent-fg: #1e4fc7;
  --badge-green-bg: #e7f6ec;
  --badge-green-fg: #176b3a;
  --badge-teal-bg: #def4f1;
  --badge-teal-fg: #0f6f6a;
  --badge-amber-bg: #f8efd8;
  --badge-amber-fg: #8a5a10;
  --badge-red-bg: #fdecea;
  --badge-red-fg: #b42318;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-display: clamp(2rem, 4.5vw, 2.75rem);
  --text-title: clamp(1.35rem, 2.4vw, 1.65rem);
  --text-heading: 1.2rem;
  --text-lead: 1.125rem;
  --text-body: 1rem;
  --text-ui: 0.9375rem;
  --text-label: 0.75rem;
  --leading-display: 1.12;
  --leading-title: 1.22;
  --leading-body: 1.6;
  --leading-label: 1.35;
  --tracking-display: -0.03em;
  --tracking-title: -0.02em;
  --tracking-label: 0.08em;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --radius-code: 4px;
  --radius-control: 6px;
  --radius-ui: 8px;
  --radius-media: 10px;
  --radius-panel: 12px;
  --radius-menu: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --color-bg: #141413;
    --color-bg-panel: #1c1c1a;
    --color-text: #f2f1ee;
    --color-muted: #9a9893;
    --color-accent: #7aa2ff;
    --color-border: #2e2e2b;
    --grid-line-color: #3a3a36;
    --color-nav-pill: #252522;
    --color-nav-pill-border: #3a3a36;
    --color-code-bg: #252522;
    --color-shadow: rgba(0, 0, 0, 0.35);
    --badge-neutral-bg: #2a2a27;
    --badge-neutral-fg: #d8d6d1;
    --badge-accent-bg: #1c2c55;
    --badge-accent-fg: #b7cbff;
    --badge-green-bg: #163224;
    --badge-green-fg: #9cd4b0;
    --badge-teal-bg: #143432;
    --badge-teal-fg: #7ed4cc;
    --badge-amber-bg: #3a2d12;
    --badge-amber-fg: #efc97a;
    --badge-red-bg: #3a1614;
    --badge-red-fg: #f5b4ae;
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #141413;
  --color-bg-panel: #1c1c1a;
  --color-text: #f2f1ee;
  --color-muted: #9a9893;
  --color-accent: #7aa2ff;
  --color-border: #2e2e2b;
  --grid-line-color: #3a3a36;
  --color-nav-pill: #252522;
  --color-nav-pill-border: #3a3a36;
  --color-code-bg: #252522;
  --color-shadow: rgba(0, 0, 0, 0.35);
  --badge-neutral-bg: #2a2a27;
  --badge-neutral-fg: #d8d6d1;
  --badge-accent-bg: #1c2c55;
  --badge-accent-fg: #b7cbff;
  --badge-green-bg: #163224;
  --badge-green-fg: #9cd4b0;
  --badge-teal-bg: #143432;
  --badge-teal-fg: #7ed4cc;
  --badge-amber-bg: #3a2d12;
  --badge-amber-fg: #efc97a;
  --badge-red-bg: #3a1614;
  --badge-red-fg: #f5b4ae;
}

[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--leading-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.5rem;
  font-weight: var(--weight-semibold);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

h2 {
  font-size: var(--text-title);
  line-height: var(--leading-title);
  letter-spacing: var(--tracking-title);
}

h3 {
  font-size: var(--text-heading);
  line-height: var(--leading-title);
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 0.75rem;
}

.panel > :last-child,
.panel__body > :last-child {
  margin-bottom: 0;
}

/* Narrow alias kept for footer; same width as the grid system. */
.container {
  max-width: var(--max-width-wide);
  margin-inline: auto;
  padding-inline: calc(var(--grid-gutter) + var(--grid-frame-inset));
}

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

a:hover {
  text-decoration: underline;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  color: var(--color-text);
  font-size: var(--text-ui);
  font-weight: var(--weight-medium);
  background: var(--color-bg-panel);
}

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

/* Horizontal article row: hatched mark, meta, title, and a round arrow. */
.article-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  color: var(--color-text);
  text-decoration: none;
}

.article-card:hover {
  border-color: color-mix(in srgb, var(--color-text) 28%, var(--color-border));
  text-decoration: none;
}

.article-card__mark {
  display: grid;
  place-items: center;
  width: 5.75rem;
  height: 4.25rem;
  border-radius: var(--radius-ui);
  background-color: var(--color-nav-pill);
  background-image: var(--hatch);
  color: var(--color-muted);
  font-size: 0.68rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.article-card__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.article-card__meta {
  display: inline-flex;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  color: var(--color-muted);
  font-size: 0.68rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: nowrap;
}

.article-card__title {
  font-size: 1.05rem;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.article-card__summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-muted);
  font-size: var(--text-ui);
  line-height: 1.45;
}

.article-card__go {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
}

.article-card__go svg {
  width: 1rem;
  height: 1rem;
}

.article-card:hover .article-card__go {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-bg);
}

.article-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .article-card {
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .article-card__mark {
    width: 4.5rem;
    height: 3.5rem;
  }
}

/* Header */
.site-header {
  position: relative;
  z-index: 20;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-block: 1rem;
}

.logo {
  font-size: var(--text-ui);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

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

.nav-end {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-ui);
  background: var(--color-bg-panel);
  color: var(--color-text);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--color-accent);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  margin: auto;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
}

.nav-links {
  --pill-x: 0px;
  --pill-w: 0px;
  --pill-o: 0;
  position: relative;
  list-style: none;
  display: flex;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
}

.nav-links::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: var(--pill-w);
  height: 100%;
  border-radius: var(--radius-ui);
  background: var(--color-nav-pill);
  box-shadow:
    0 0 0 1px var(--color-nav-pill-border),
    0 1px 2px var(--color-shadow);
  opacity: var(--pill-o);
  transform: translateX(var(--pill-x));
  pointer-events: none;
  transition:
    transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
    width 0.32s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.2s ease;
}

.nav-links > li > a {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0.4rem 0.85rem;
  color: var(--color-muted);
  font-size: var(--text-ui);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-ui);
}

.nav-links > li > a:hover,
.nav-links > li > a:focus-visible,
.nav-links > li > a[aria-current="page"] {
  color: var(--color-text);
  text-decoration: none;
}

.nav-item--dropdown {
  position: relative;
}

.nav-item--dropdown:hover > a,
.nav-item--dropdown:focus-within > a,
.nav-item--dropdown.is-open > a {
  color: var(--color-text);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 30;
  min-width: 16rem;
  padding-top: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0.16s ease;
}

.nav-item--dropdown:hover .nav-dropdown,
.nav-item--dropdown:focus-within .nav-dropdown,
.nav-item--dropdown.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown__panel {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-menu);
  box-shadow:
    0 0 0 3px var(--color-bg),
    0 0 0 4px var(--color-border),
    0 16px 40px var(--color-shadow);
  padding: 1.15rem;
}

.nav-dropdown__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-dropdown__list a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-ui);
  color: var(--color-text);
  font-size: var(--text-ui);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.nav-dropdown__list a:hover,
.nav-dropdown__list a:focus-visible,
.nav-dropdown__list a[aria-current="page"] {
  background: var(--color-nav-pill);
  text-decoration: none;
}

.nav-dropdown__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-ui);
  background: var(--color-bg);
  color: var(--color-accent);
}

.nav-dropdown__icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  .nav-links::before {
    transition: opacity 0.15s ease;
  }

  .nav-dropdown {
    transition: none;
  }

  .site-footer__status .badge::before {
    animation: none;
  }

  .trace > img,
  .trace-svg,
  .panel--split.contact-intro .contact-portrait img:first-of-type,
  .logo-cloud img {
    transition: none;
  }

  .logo-cloud__track {
    animation: none;
    width: auto;
  }

  .logo-cloud__list {
    flex-wrap: wrap;
    padding-right: 0;
  }

  .logo-cloud__list[aria-hidden="true"] {
    display: none;
  }
}

/* Hero */
.hero {
  text-align: center;
}

.hero .panel {
  padding-block: calc(var(--grid-gutter) * 1.75);
}

.hero__status {
  margin: 0 0 1rem;
}

.hero__hello {
  margin: 0 0 1.35rem;
  font-size: var(--text-lead);
  color: var(--color-muted);
}

.hero h1 {
  margin: 0;
}

.hero__kicker {
  display: block;
  margin-bottom: 0.85rem;
  font-size: var(--text-title);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-title);
  line-height: var(--leading-title);
}

.intersection {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: clamp(2.75rem, 8vw, 4.75rem);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.intersection__mark {
  display: block;
  margin-block: 0.06em;
  font-size: 0.62em;
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  line-height: 1;
  color: var(--color-accent);
}

.hero .subtitle {
  max-width: 36rem;
  margin: 1.5rem auto 0;
}

/* Full-viewport braid. The stage stays warm off-white in both themes. */
.hero-stage {
  position: relative;
  min-height: 100svh;
  background: #fafaf7;
  color: #1c1b19;
  overflow: hidden;
}

.hero-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}

.hero-stage__copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 6.5rem 1.5rem 4rem;
  pointer-events: none;
  text-align: center;
}

.hero-stage h1 {
  margin: 0;
}

.hero-stage h1,
.hero-stage .hero__kicker,
.hero-stage .intersection {
  color: #1c1b19;
}

.hero-stage .intersection__mark {
  color: #8d8880;
}

.hero-strand {
  pointer-events: auto;
  cursor: default;
  border-radius: 0.12em;
}

.hero-strand:hover,
.hero-strand:focus-visible {
  outline: none;
}

/* Three featured pieces under the hero. The plugin shot is tall, so keep its top. */
.featured .post-card:first-child img {
  object-position: 38% 12%;
}

.subtitle {
  color: var(--color-muted);
  font-size: var(--text-lead);
  font-weight: var(--weight-regular);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* Explore list (heading + numbered rows) */
.panel.explore-list {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.explore-list__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.explore-list__items li {
  scroll-margin-top: 1.5rem;
}

.explore-list__items a {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding-block: var(--grid-gutter);
  padding-left: var(--grid-gutter);
  color: inherit;
  text-decoration: none;
}

.explore-list__items a:hover,
.explore-list__items a:focus-visible {
  text-decoration: none;
}

.explore-list__items a:hover .explore-list__title,
.explore-list__items a:focus-visible .explore-list__title {
  text-decoration: underline;
}

.explore-list__items li + li {
  border-top: 1px solid var(--color-border);
}

.explore-list__index {
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

.explore-list__title {
  margin: 0;
  font-size: var(--text-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-title);
  letter-spacing: -0.015em;
}

.explore-list__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  border-left: 1px solid var(--color-border);
  color: var(--color-accent);
}

.explore-list__arrow svg {
  width: 1rem;
  height: 1rem;
}

.explore-list__note {
  margin: 0;
  padding: var(--grid-gutter);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-ui);
  color: var(--color-muted);
}

/* Category index: a cover introduces the piece. Keep it short so the title stays with the image. */
.work-index .panel--figure img {
  height: 280px;
  min-height: 0;
  object-fit: cover;
}

/* Posts index: a featured lead, then a mosaic of image, text, and mixed cards. */
.post-index__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 var(--grid-gutter);
}

.post-index__filters button,
.post-index__pages button {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: var(--text-ui);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  cursor: pointer;
}

.post-index__filters button[aria-pressed="true"],
.post-index__pages button[aria-current="page"] {
  background: var(--color-text);
  color: var(--color-bg);
}

.post-index__filters button:hover,
.post-index__pages button:hover:not(:disabled) {
  color: var(--color-text);
}

.post-index__filters button[aria-pressed="true"]:hover,
.post-index__pages button[aria-current="page"]:hover {
  color: var(--color-bg);
}

.post-index__pages button:disabled {
  opacity: 0.4;
  cursor: default;
}

.post-index__list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: row;
  align-items: stretch;
  gap: var(--grid-gutter);
}

.post-index .post-card[data-span="2"] { grid-column: span 2; }
.post-index .post-card[data-span="3"] { grid-column: span 3; }
.post-index .post-card[data-span="4"] { grid-column: span 4; }
.post-index .post-card[data-span="5"] { grid-column: span 5; }
.post-index .post-card[data-span="6"] { grid-column: span 6; }

.post-card.panel {
  padding: 0;
  overflow: hidden;
  min-width: 0;
}

.post-card[hidden],
.post-index .post-card[hidden] {
  display: none;
}

.post-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.post-card__link:hover h2 {
  color: var(--color-accent);
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--grid-gutter);
}

.post-card__body h2,
.post-card__body p,
.post-card__body .eyebrow {
  margin: 0;
}

.post-card__body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-muted);
}

.post-index .post-card {
  display: flex;
  flex-direction: column;
}

.post-index .post-card__link {
  flex: 1 1 auto;
}

.post-index .post-card h2 {
  font-size: 1.2rem;
  line-height: 1.2;
}

.post-index .post-card.is-feature {
  grid-column: 1 / -1;
}

.post-index .post-card.is-feature h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  line-height: 1.15;
}

.post-index .post-card.is-feature .post-card__body p {
  -webkit-line-clamp: 4;
}

/* Picture with a real article: photo, then the summary. The lead is a split. */
.post-index .post-card--mixed .post-card__link > img,
.post-index .post-card--mixed .post-card__link > .trace {
  width: 100%;
  flex: 1 1 auto;
  aspect-ratio: 16 / 10;
  min-height: 160px;
  object-fit: cover;
}

.post-index .post-card--mixed .trace > img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.post-index .post-card.is-feature.post-card--mixed .post-card__link {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: stretch;
  min-height: 300px;
}

.post-index .post-card.is-feature.post-card--mixed .post-card__link > img,
.post-index .post-card.is-feature.post-card--mixed .post-card__link > .trace {
  height: 100%;
  min-height: 280px;
  aspect-ratio: auto;
}

.post-index .post-card.is-feature.post-card--mixed .post-card__body {
  justify-content: center;
}

/* Mostly pictures: the photo is the card. A short title sits on it. */
.post-index .post-card--image:not(.post-card--collage) .post-card__link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.post-index .post-card--wide:not(.post-card--collage) .post-card__link {
  aspect-ratio: 2.2 / 1;
}

.post-index .post-card--portrait:not(.post-card--collage) .post-card__link {
  aspect-ratio: 3 / 4;
}

.post-index .post-card.is-feature.post-card--image:not(.post-card--collage) .post-card__link {
  aspect-ratio: 2.4 / 1;
}

.post-index .post-card--image:not(.post-card--collage) .post-card__link > img,
.post-index .post-card--image:not(.post-card--collage) .post-card__link > .trace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.post-index .post-card--image:not(.post-card--collage) img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.post-index .post-card--image:not(.post-card--collage) .post-card__body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  gap: 0.2rem;
  padding: 2.75rem var(--grid-gutter) var(--grid-gutter);
  background: linear-gradient(to top, rgba(12, 12, 11, 0.82), rgba(12, 12, 11, 0.15) 62%, transparent);
}

.post-index .post-card--image:not(.post-card--collage) .eyebrow,
.post-index .post-card--image:not(.post-card--collage) h2 {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.post-index .post-card--image:not(.post-card--collage) .eyebrow {
  color: rgba(255, 255, 255, 0.8);
}

/* Several stills: a contact sheet, title underneath so the art stays clear. */
.post-index .post-card--collage .post-card__link {
  display: flex;
  flex-direction: column;
}

.post-index .post-card__shots {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-height: 180px;
  aspect-ratio: 5 / 4;
  background: var(--color-border);
}

.post-index .post-card--portrait .post-card__shots {
  aspect-ratio: 4 / 5;
}

.post-index .post-card.is-feature.post-card--collage .post-card__shots {
  aspect-ratio: 2.2 / 1;
  min-height: 240px;
}

.post-index .post-card__shots--2 {
  grid-template-columns: 1fr 1fr;
}

.post-index .post-card__shots--3 {
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.post-index .post-card__shots--3 > :first-child {
  grid-row: 1 / span 2;
}

.post-index .post-card__shots--4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.post-index .post-card__shots > * {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.post-index .post-card__shots img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

/* Mostly writing: no empty image slot. Notes stay small; essays read wider. */
.post-index .post-card--text .post-card__body {
  flex: 1 1 auto;
  justify-content: flex-start;
  gap: 0.85rem;
  min-height: 11rem;
  padding: calc(var(--grid-gutter) * 1.5);
}

.post-index .post-card--text .post-card__body p {
  margin-top: auto;
  -webkit-line-clamp: 4;
}

.post-index .post-card--text h2 {
  font-size: clamp(1.25rem, 1.7vw, 1.55rem);
}

.post-index .post-card--essay .post-card__body {
  min-height: 13rem;
  padding: calc(var(--grid-gutter) * 2);
}

.post-index .post-card--essay h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

.post-index .post-card--essay .post-card__body p {
  -webkit-line-clamp: 5;
  font-size: var(--text-lead);
  line-height: 1.45;
}

.post-index__empty {
  margin: 0;
}

.post-index__pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-top: var(--grid-gutter);
}

@media (max-width: 800px) {
  .post-index__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-index .post-card[data-span] {
    grid-column: span 1;
  }

  .post-index .post-card.is-feature[data-span],
  .post-index .post-card--essay[data-span],
  .post-index .post-card--wide[data-span],
  .post-index .post-card--collage[data-span],
  .post-index .post-card--mixed[data-span],
  .post-index .post-card--image[data-span],
  .post-index .post-card--text[data-span]:last-child {
    grid-column: span 2;
  }

  .post-index .post-card.is-feature.post-card--mixed .post-card__link {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .post-index .post-card.is-feature.post-card--mixed .post-card__link > img,
  .post-index .post-card.is-feature.post-card--mixed .post-card__link > .trace {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .post-index .post-card.is-feature.post-card--image:not(.post-card--collage) .post-card__link {
    aspect-ratio: 16 / 10;
  }

  .post-index .post-card.is-feature.post-card--collage .post-card__shots {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }
}

/* Entry (blog / project pages) */
.entry-intro {
  padding: var(--grid-gutter);
}

.entry-intro .subtitle {
  margin: 0;
}

.entry-intro .subtitle:empty {
  display: none;
}

.entry-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.25rem;
  font-size: var(--text-ui);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li + li::before {
  content: "/";
  margin-inline: 0.4rem;
  color: var(--color-muted);
}

.breadcrumb [aria-current="page"] {
  color: var(--color-muted);
}

.entry-bar__all {
  flex: none;
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .breadcrumb [aria-current="page"] {
    display: none;
  }
}

.entry__title {
  margin: 0 0 0.6rem;
}

a.post-nav {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.post-nav:hover {
  text-decoration: none;
}

a.post-nav:hover h2 {
  text-decoration: underline;
}

.post-nav h2 {
  margin: 0;
}

.post-nav--next {
  text-align: end;
}

.prose {
  align-self: start;
  padding: var(--grid-gap);
}

.prose p {
  margin: 0;
}

.prose > * + * {
  margin-top: 1rem;
}

.prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.35rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose > .prose-block + .prose-block {
  margin-top: 2rem;
}

.prose-block {
  position: relative;
}

.prose-block h2 {
  margin: 0 0 0.35rem;
}

.prose h3,
.prose h4 {
  margin: 0;
  font-weight: var(--weight-semibold);
}

.prose h3 {
  font-size: var(--text-heading);
  line-height: var(--leading-title);
  letter-spacing: -0.015em;
}

.prose h4 {
  font-size: 1.05rem;
  line-height: var(--leading-title);
  letter-spacing: -0.01em;
}

.prose-block > :not(.prose-anchor) + :not(.prose-anchor) {
  margin-top: 1rem;
}

.prose-block > :is(h2, h3, h4):not(.prose-anchor) + :not(.prose-anchor) {
  margin-top: 0.35rem;
}

.prose-block > :not(.prose-anchor) + :is(h3, h4):not(.prose-anchor) {
  margin-top: 1.5rem;
}

.prose strong {
  font-weight: var(--weight-semibold);
}

.prose em {
  font-style: italic;
}

.prose mark {
  padding: 0.05em 0.2em;
  border-radius: 0.15em;
  background: var(--badge-amber-bg);
  color: inherit;
}

.prose small {
  font-size: 0.85em;
  color: var(--color-muted);
}

.prose del {
  color: var(--color-muted);
}

.prose ins {
  text-decoration: none;
  background: var(--badge-green-bg);
}

.prose abbr {
  text-decoration: underline dotted;
  text-underline-offset: 0.18em;
}

.prose kbd {
  padding: 0.08em 0.4em;
  border: 1px solid var(--color-border);
  border-bottom-width: 2px;
  border-radius: var(--radius-code);
  background: var(--color-bg-panel);
  font-family: inherit;
  font-size: 0.85em;
}

.prose sub,
.prose sup {
  font-size: 0.75em;
}

.prose blockquote {
  margin: 0;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 2px solid var(--color-text);
  color: var(--color-text);
}

.prose blockquote p {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.prose blockquote p + p {
  margin-top: 0.65rem;
}

.prose blockquote footer {
  margin-top: 0.75rem;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
}

.prose blockquote cite {
  font-style: normal;
}

/* The text sits inside the column. The line runs out to the dashed
   rules on either side, in the same dash as those rules. */
.prose hr {
  height: 1px;
  margin: 0 calc((var(--grid-gutter) + var(--grid-gap)) * -1);
  border: 0;
  background: var(--dash-x);
}

.prose figure {
  margin: 0;
}

.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-media);
}

.prose figcaption {
  margin-top: 0.5rem;
  color: var(--color-muted);
  font-size: var(--text-ui);
  line-height: var(--leading-body);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-ui);
}

.prose th,
.prose td {
  padding: 0.55rem 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: baseline;
}

.prose th {
  color: var(--color-muted);
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  line-height: var(--leading-label);
  text-transform: uppercase;
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose pre {
  margin: 0;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  background: var(--color-code-bg);
  border-radius: var(--radius-ui);
  font-size: 0.85rem;
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  background: transparent;
  font-size: inherit;
}

/* Sits on the left dashed rule. The section hover reveals the bar;
   hovering the bar itself reveals the #. */
.prose-anchor {
  position: absolute;
  z-index: 2;
  top: 0.28rem;
  left: calc((var(--grid-gap) + var(--grid-gutter)) * -1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.65rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  transform: translateX(-50%);
  cursor: pointer;
}

.prose-anchor::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 1.4rem;
  border-radius: inherit;
  background: color-mix(in srgb, var(--color-text) 24%, var(--color-bg));
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width 0.15s ease, height 0.15s ease, opacity 0.15s ease;
}

.prose-block:hover > .prose-anchor::before,
.prose-block:focus-within > .prose-anchor::before {
  opacity: 1;
}

.prose-anchor:hover::before,
.prose-anchor:focus-visible::before,
.prose-anchor.is-copied::before {
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--color-text) 10%, var(--color-bg));
}

.prose-anchor__mark {
  position: relative;
  z-index: 1;
  opacity: 0;
  font-size: 0.85rem;
  line-height: 1;
}

.prose-anchor:hover .prose-anchor__mark,
.prose-anchor:focus-visible .prose-anchor__mark,
.prose-anchor.is-copied .prose-anchor__mark {
  opacity: 1;
}

@media (hover: none) {
  .prose-anchor::before {
    width: 100%;
    height: 100%;
    opacity: 1;
    background: color-mix(in srgb, var(--color-text) 10%, var(--color-bg));
  }

  .prose-anchor__mark {
    opacity: 1;
  }
}

.prose code {
  font-size: 0.9em;
  background: var(--color-code-bg);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-code);
}

.gallery {
  display: grid;
  gap: var(--grid-gutter);
}

.gallery__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gutter);
}

.gallery__shot {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-media);
  overflow: hidden;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.gallery__shot img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery__shot:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1.25rem;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: #fff;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgba(12, 12, 11, 0.86);
}

.lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-media);
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-ui);
  background: rgba(20, 20, 19, 0.55);
  color: #fff;
  cursor: pointer;
}

.lightbox__close svg {
  width: 1.1rem;
  height: 1.1rem;
}

.lightbox__close:hover {
  border-color: #fff;
}

.lightbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.stack.entry-aside {
  align-self: start;
  height: auto;
}

.entry-meta {
  display: grid;
  margin: 0;
}

.entry-meta div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
  margin: 0;
  padding-block: 0.7rem;
}

.entry-meta div + div {
  border-top: 1px solid var(--color-border);
}

.entry-meta div:first-child {
  padding-top: 0;
}

.entry-meta div:last-child {
  padding-bottom: 0;
}

.entry-meta dt {
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

.entry-meta dd {
  margin: 0;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.entry-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-control);
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-fg);
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  line-height: var(--leading-label);
}

/* Traced photo placeholder. The SVG sits under the image until it fades in. */
.trace {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.trace > img {
  position: relative;
  z-index: 1;
  transition: opacity 0.5s ease;
}

.trace > img.is-tracing {
  opacity: 0;
}

.trace-svg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.trace.is-loaded > .trace-svg,
.contact-portrait.is-loaded > .trace-svg {
  opacity: 0;
}

/* Photograph on the left, traced SVG on the right. Drag the handle. */
.trace.compare {
  --compare: 50%;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}

.trace.compare > .compare__trace {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  background: var(--color-bg-panel);
  clip-path: inset(0 0 0 var(--compare));
}

.trace.compare > .compare__trace > .trace-svg,
.trace.compare.is-loaded > .compare__trace > .trace-svg {
  opacity: 1;
}

.compare__handle {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: var(--compare);
  width: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1c1c1a;
  transform: translateX(-50%);
  cursor: ew-resize;
  touch-action: none;
}

.compare__handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
}

.compare__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.25rem;
  height: 2.25rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.16),
    0 2px 6px rgba(0, 0, 0, 0.22);
}

.compare__grip::before,
.compare__grip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.4rem;
  height: 0.4rem;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.compare__grip::before {
  left: 0.55rem;
  transform: translateY(-50%) rotate(-135deg);
}

.compare__grip::after {
  right: 0.55rem;
  transform: translateY(-50%) rotate(45deg);
}

.compare__handle:focus-visible .compare__grip {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Contact */
.panel--split.contact-intro {
  grid-template-columns: 14rem minmax(0, 1fr);
  align-items: center;
}

.contact-portrait {
  position: relative;
  width: 14rem;
  max-width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-media);
}

.panel--split.contact-intro .contact-portrait img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 0;
  object-fit: cover;
  object-position: center 16%;
  opacity: 0;
}

.panel--split.contact-intro .contact-portrait img:first-of-type,
.panel--split.contact-intro .contact-portrait img.is-shown {
  opacity: 1;
}

.panel--split.contact-intro .contact-portrait img:first-of-type {
  transition: opacity 0.5s ease;
}

.panel--split.contact-intro .contact-portrait img:first-of-type.is-tracing {
  opacity: 0;
}

.panel--split.contact-intro .contact-portrait img.is-shown {
  z-index: 1;
}

.contact-portrait > .trace-svg {
  object-fit: cover;
  object-position: center 16%;
}

.contact-intro .panel__body {
  align-self: center;
}

@media (max-width: 800px) {
  .panel--split.contact-intro {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.contact-form__intro > :last-child {
  margin-bottom: 0;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  line-height: var(--leading-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

.field input,
.field textarea {
  width: 100%;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-ui);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-ui);
  line-height: var(--leading-body);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-color: var(--color-accent);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--badge-red-fg);
}

.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.contact-form__note {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-ui);
}

button.btn {
  font-family: inherit;
  cursor: pointer;
}

.contact-aside {
  display: grid;
  align-content: start;
  gap: var(--grid-gutter);
}

.contact-elsewhere {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.contact-list {
  list-style: none;
  margin: 0.35rem calc(var(--grid-gutter) * -1) 0;
  padding: 0;
  border-top: 1px solid var(--color-border);
}

.contact-list li + li {
  border-top: 1px solid var(--color-border);
}

.contact-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--grid-gutter);
  color: var(--color-text);
  font-weight: var(--weight-medium);
}

.contact-list a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.contact-list a span {
  font-weight: var(--weight-regular);
  color: var(--color-muted);
  font-size: var(--text-ui);
}

.panel h3 a,
.panel h2 a {
  color: inherit;
}

/* Footer */
.site-footer {
  position: relative;
  flex: none;
  margin-top: auto;
  padding-top: var(--grid-gutter);
  color: var(--color-muted);
  font-size: var(--text-ui);
  background-color: var(--color-bg);
  background-image: var(--hatch);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.site-footer .container--wide:not(.grid-row__bg) {
  position: relative;
  z-index: 1;
}

.site-footer .panel {
  background: var(--color-bg);
}

.site-footer p {
  margin: 0;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: var(--grid-gap);
  padding-block: 0.5rem var(--grid-gutter);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

.site-footer__ident {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.site-footer__brand .logo {
  display: inline-block;
  margin: 0;
}

.site-footer__note {
  max-width: 16rem;
  line-height: var(--leading-body);
}

.site-footer__status {
  margin: 0;
}

.site-footer__status .badge {
  gap: 0.5rem;
  padding: 0.28rem 0.75rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--badge-teal-fg) 30%, transparent);
  font-size: 0.8125rem;
  color: var(--badge-teal-fg);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #fff 18%, transparent),
      transparent 58%
    ),
    linear-gradient(
      100deg,
      color-mix(in srgb, var(--badge-teal-fg) 8%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--badge-teal-fg) 22%, var(--color-bg)) 100%
    );
}

.site-footer__status .badge::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--badge-teal-fg) 38%, transparent),
    0 0 0 2px color-mix(in srgb, var(--badge-teal-fg) 28%, transparent);
  animation: status-pulse 2.2s ease-out infinite;
}

@keyframes status-pulse {
  0% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--badge-teal-fg) 38%, transparent),
      0 0 0 2px color-mix(in srgb, var(--badge-teal-fg) 32%, transparent);
  }
  70% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--badge-teal-fg) 38%, transparent),
      0 0 0 7px color-mix(in srgb, var(--badge-teal-fg) 0%, transparent);
  }
  100% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--badge-teal-fg) 38%, transparent),
      0 0 0 7px transparent;
  }
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: start;
  gap: 1.75rem 2rem;
  text-align: left;
}

.site-footer__heading {
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: var(--weight-medium);
  font-variant-ligatures: none;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--color-muted);
}

.site-footer__cols ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.site-footer__cols a {
  color: var(--color-text);
  font-size: var(--text-ui);
  font-weight: var(--weight-regular);
}

.site-footer__cols a:hover {
  color: var(--color-accent);
}

.site-footer__meta {
  position: relative;
  margin-top: var(--grid-gutter);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.site-footer__meta .grid-row__bg {
  background-image: var(--dash-y), var(--dash-y);
  background-position: 0% 0, 100% 0;
}

.site-footer__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: var(--grid-gutter);
  text-align: center;
}

@media (max-width: 800px) {
  .nav {
    padding-block: 0.85rem;
    flex-wrap: wrap;
  }

  .nav-links > li > a {
    padding: 0.35rem 0.65rem;
  }

  .nav-dropdown {
    left: auto;
    right: 0;
    min-width: min(16rem, calc(100vw - 2rem));
    transform: translateY(6px);
  }

  .nav-item--dropdown:hover .nav-dropdown,
  .nav-item--dropdown:focus-within .nav-dropdown,
  .nav-item--dropdown.is-open .nav-dropdown {
    transform: translateY(0);
  }

  .explore-list__title {
    font-size: 1.05rem;
  }

  .explore-list__items a {
    grid-template-columns: 2rem 1fr 2.25rem;
    gap: 0.5rem;
  }

  .site-footer > .container--wide {
    padding-inline: var(--grid-frame-inset);
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .site-footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.experience {
  align-items: stretch;
}

.experience-copy {
  min-width: 0;
}

.experience-title {
  margin: 0;
  font-size: var(--text-display);
}

.experience-copy .eyebrow {
  margin: 0.75rem 0 0;
}

@media (max-width: 800px) {
  .experience.grid-cols-2,
  .grid-cols-2-1:has(> .entry-aside) {
    row-gap: calc(var(--grid-gutter) * 2);
  }

  /* The logo row has no card, so the footer was sitting on it.
     Match the gap above the logos. */
  #experience .grid-row__inner {
    padding-bottom: calc(var(--grid-gutter) * 2);
  }

  .experience-copy,
  .grid-cols-2-1:has(> .entry-aside) > .prose {
    position: relative;
  }

  .entry-aside {
    order: -1;
  }

  /* Full-width dash in the stack gap, same clearance as a column rule. */
  .experience-copy::after,
  .grid-cols-2-1:has(> .entry-aside) > .prose::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: calc((var(--grid-gutter) + var(--grid-frame-inset)) * -1);
    right: calc((var(--grid-gutter) + var(--grid-frame-inset)) * -1);
    height: 1px;
    background: var(--dash-x);
    pointer-events: none;
  }

  .experience-copy::after {
    bottom: calc(var(--grid-gutter) * -1);
  }

  .grid-cols-2-1:has(> .entry-aside) > .prose::before {
    top: calc(var(--grid-gutter) * -1);
  }
}

.logo-cloud {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.logo-cloud__viewport {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}

.logo-cloud__track {
  display: flex;
  width: max-content;
  animation: logo-cloud 28s linear infinite;
}

.logo-cloud.is-driven .logo-cloud__track {
  animation: none;
}

.logo-cloud__list {
  list-style: none;
  display: flex;
  flex: none;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0 2rem 0 0;
}

.logo-cloud__list a {
  display: block;
  line-height: 0;
  color: inherit;
  text-decoration: none;
}

.logo-cloud__list a:hover {
  text-decoration: none;
}

.logo-cloud__list a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 8px;
}

@keyframes logo-cloud {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.logo-cloud img {
  display: block;
  width: auto;
  height: 80px;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.logo-cloud img:hover {
  opacity: 1;
}

[data-theme="dark"] .logo-cloud img {
  filter: invert(1);
}

/* Resume */
.resume-intro {
  padding-bottom: 0;
}

.resume-status {
  margin: 0 0 0.85rem;
}

.resume-intro .subtitle {
  max-width: 40rem;
}

.resume-layout {
  align-items: start;
}

.resume-company > h2 {
  margin-bottom: 1rem;
}

.resume-role + .resume-role {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.resume-role__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 1rem;
  margin-bottom: 0.5rem;
}

.resume-role__head h3,
.resume-role > h3 {
  margin: 0 0 0.5rem;
}

.resume-role__head h3 {
  margin-bottom: 0;
}

.resume-role__dates {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-ui);
}

.resume-role ul {
  margin: 0;
  padding-left: 1.15rem;
}

.resume-role li + li {
  margin-top: 0.4rem;
}

.resume-facts {
  display: grid;
  gap: 0.9rem;
  margin: 0.35rem 0 0;
}

.resume-facts div {
  display: grid;
  gap: 0.15rem;
}

.resume-facts dt {
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  line-height: var(--leading-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

.resume-facts dd {
  margin: 0;
}

.resume-school + .resume-school,
.resume-note + .resume-note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.resume-school h3,
.resume-note h3 {
  margin-bottom: 0.2rem;
}

.resume-school p,
.resume-note p {
  margin: 0;
}

.resume-meta {
  margin: 0.15rem 0 0;
  color: var(--color-muted);
  font-size: var(--text-ui);
}

.resume-school p + p,
.resume-note p + p {
  margin-top: 0.35rem;
}

@media print {
  .page-resume .site-header,
  .page-resume .site-footer,
  .page-resume .grid-row__bg {
    display: none;
  }

  .page-resume {
    background: #fff;
    color: #111;
  }

  .page-resume .panel {
    break-inside: avoid;
    background: #fff;
    border-color: #ccc;
  }

  .page-resume a {
    color: inherit;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-cloud img {
    filter: invert(1);
  }
}

/* Short post: a note, then reaction pills. */
.short-post {
  display: grid;
  gap: 1rem;
  width: min(100%, 27.5rem);
  margin-inline: auto;
  padding: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--color-text) 14%, var(--color-border));
  border-radius: 2.125rem;
  background: var(--color-bg-panel);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.short-post__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.short-post__avatar {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  object-fit: cover;
}

.short-post__byline {
  display: grid;
  min-width: 0;
}

.short-post__name {
  font-size: 0.875rem;
  font-weight: var(--weight-medium);
  line-height: 1.4;
}

.short-post__meta,
.short-post__summary {
  color: var(--color-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.short-post__copy {
  display: grid;
  gap: 0.5rem;
}

.short-post__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: var(--weight-medium);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.short-post__body {
  margin: 0;
  color: color-mix(in srgb, var(--color-text) 72%, var(--color-muted));
  font-size: 0.875rem;
  line-height: 1.4;
}

.short-post__footer {
  display: grid;
  gap: 0.75rem;
  padding-top: 1rem;
}

.short-post__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.375rem;
}

.short-post__pill,
.short-post__add {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--color-text) 18%, var(--color-border));
  border-radius: 999px;
  background: var(--color-bg-panel);
  color: var(--color-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.01em;
  cursor: pointer;
  appearance: none;
}

.short-post__pill {
  gap: 0.375rem;
  padding: 0 0.7rem 0 0.55rem;
}

.short-post__pill:hover,
.short-post__add:hover {
  border-color: color-mix(in srgb, var(--color-text) 32%, var(--color-border));
  color: var(--color-text);
}

.short-post__pill[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--color-text) 42%, var(--color-border));
  background: color-mix(in srgb, var(--color-text) 12%, var(--color-bg-panel));
  color: var(--color-text);
}

.short-post__pill:focus-visible,
.short-post__add:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.short-post__icon,
.short-post__add svg {
  display: block;
  width: 1rem;
  height: 1rem;
  flex: none;
}

.short-post__add {
  width: 2rem;
  padding: 0;
}

.short-post__add[hidden],
.short-post__picker[hidden] {
  display: none;
}

.short-post__picker {
  display: flex;
  gap: 0.25rem;
  justify-self: end;
  width: max-content;
  padding: 0.3rem;
  border: 1px solid color-mix(in srgb, var(--color-text) 16%, var(--color-border));
  border-radius: 999px;
  background: var(--color-bg);
}

.short-post__pill--option {
  width: 2rem;
  padding: 0;
}

.short-post__pill--option .short-post__count {
  display: none;
}

.short-post__summary {
  margin: 0;
}

.short-post__tip {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 50%;
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 0.6875rem;
  font-weight: var(--weight-medium);
  line-height: 1.3;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.short-post__pill:hover .short-post__tip,
.short-post__pill:focus-visible .short-post__tip {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .short-post__tip {
    transition: none;
  }
}
