/* ------------------------------------------------------------------
   Site design tokens. Every colour on the site comes from these.
   Light scheme first, dark (Material "slate") second.
   ------------------------------------------------------------------ */
:root,
[data-md-color-scheme="default"] {
  --st-bg: #f5f7fa;
  --st-ink: #0f172a;
  --st-muted: #4e5a70;
  --st-line: #d8dee8;
  --st-card: #ffffff;
  --st-soft: #edf1f6;
  --st-accent: #1e3a8a;
  --st-accent-dark: #93b4ff;
  --st-highlight: #c2410c;
  --st-mono: var(--md-code-font-family, "IBM Plex Mono", ui-monospace, monospace);
}

[data-md-color-scheme="slate"] {
  --st-bg: #0b1220;
  --st-ink: #e6ebf4;
  --st-muted: #9ba8bf;
  --st-line: #222e45;
  --st-card: #111a2c;
  --st-soft: #17223a;
  --st-accent: #93b4ff;
  --st-accent-dark: #93b4ff;
  --st-highlight: #fb923c;
}

/* Map the tokens onto Material's own variables. */
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --md-default-bg-color: var(--st-bg);
  --md-default-fg-color: var(--st-ink);
  --md-default-fg-color--light: var(--st-muted);
  --md-default-fg-color--lighter: var(--st-line);
  --md-default-fg-color--lightest: var(--st-soft);
  --md-primary-fg-color: var(--st-bg);
  --md-primary-fg-color--light: var(--st-bg);
  --md-primary-fg-color--dark: var(--st-bg);
  --md-primary-bg-color: var(--st-ink);
  --md-primary-bg-color--light: var(--st-muted);
  --md-accent-fg-color: var(--st-accent);
  --md-accent-fg-color--transparent: color-mix(in srgb, var(--st-accent) 10%, transparent);
  --md-accent-bg-color: var(--st-bg);
  --md-typeset-color: var(--st-ink);
  --md-typeset-a-color: var(--st-accent);
  --md-code-bg-color: var(--st-soft);
  --md-footer-bg-color: var(--st-bg);
  --md-footer-bg-color--dark: var(--st-bg);
  --md-footer-fg-color: var(--st-ink);
  --md-footer-fg-color--light: var(--st-muted);
  --md-footer-fg-color--lighter: var(--st-muted);
}

/* ------------------------------------------------------------------
   Header, tabs, footer
   ------------------------------------------------------------------ */
/* Solid header: Zensical's modern look makes it translucent and blurred, which
   lets the banner's white icons show through as blobs while scrolling. */
.md-header,
.md-header--shadow {
  box-shadow: none;
  border-bottom: 1px solid var(--st-line);
  background-color: var(--st-bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.md-header__topic:first-child {
  font-weight: 600;
  letter-spacing: 0.01em;
}
.md-header__button.md-logo {
  color: var(--st-ink);
}
.md-header__button.md-logo .st-mark-dot {
  fill: var(--st-accent);
}
.md-search__form {
  background: var(--st-soft);
}
/* Zensical's search dialog lives in a shadow root and colours matched words
   with --md-accent-fg-color, the site's navy, which reads almost like body
   text. Give the dialog its own warm accent instead. Its host is the fixed
   div that the search script appends to <body>; custom properties reach
   into the shadow root through it. */
body > div[style*="position: fixed"] {
  --md-accent-fg-color: var(--st-highlight);
}
.md-tabs {
  background: var(--st-bg);
  color: var(--st-muted);
  border-bottom: 1px solid var(--st-line);
}
.md-tabs__link {
  font-family: var(--st-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 1;
  color: var(--st-muted);
  margin-top: 0.75rem;
}
.md-tabs__item {
  height: 2.6rem;
}
.md-tabs__item--active .md-tabs__link,
.md-tabs__link:hover {
  color: var(--st-ink);
}
.md-tabs__item--active .md-tabs__link {
  box-shadow: inset 0 -1px 0 currentColor;
  padding-bottom: 0.25rem;
}
/* The site name already links home, so the Home tab is hidden. */
.md-tabs__item:first-child {
  display: none;
}
.md-footer-meta {
  border-top: 1px solid var(--st-line);
  padding-bottom: 3.2rem; /* room for the Top button below the footer icons */
}
.md-footer__inner {
  border-top: 1px solid var(--st-line);
}
.md-copyright {
  color: var(--st-muted);
}

/* ------------------------------------------------------------------
   Typography inside pages
   ------------------------------------------------------------------ */
.md-typeset h1 {
  color: var(--st-ink);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.md-typeset h2 {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.md-typeset h3 {
  font-weight: 600;
}
.md-typeset a {
  text-decoration: none;
}
/* Hover keeps the navy and adds an underline, instead of switching hue. */
.md-typeset a:hover {
  color: var(--st-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.md-typeset a.st-card:hover,
.md-typeset a.st-tool:hover,
.md-typeset a.st-cover:hover,
.md-typeset a.st-btn:hover {
  text-decoration: none;
}
.md-typeset figure img {
  border: 1px solid var(--st-line);
  background: #ffffff;
}
.md-typeset figcaption {
  font-family: var(--st-mono);
  font-size: 0.6rem;
  line-height: 1.6;
  color: var(--st-muted);
  max-width: 40rem;
}

/* Shared small parts */
.st-kicker {
  margin: 0 !important;
  font-family: var(--st-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--st-accent);
}
.st-label {
  margin: 0 !important;
  font-family: var(--st-mono);
  font-size: 0.65rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase;
  color: var(--st-ink) !important;
}
.st-more {
  font-family: var(--st-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--st-muted) !important;
}
.st-more:hover {
  color: var(--st-accent) !important;
}
.md-typeset ul.st-chips,
.st-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
.md-typeset .st-chips li {
  margin: 0;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--st-line);
  background: var(--st-card);
  font-family: var(--st-mono);
  font-size: 0.6rem;
  color: var(--st-muted);
  list-style: none;
}
.st-tags {
  margin: 0 !important;
  font-family: var(--st-mono);
  font-size: 0.575rem;
  color: var(--st-accent);
}
.st-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: 0 1.1rem;
  border: 1px solid var(--st-ink);
  font-family: var(--st-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--st-ink) !important;
}
.st-btn--primary {
  background: var(--st-ink);
  color: var(--st-bg) !important;
}
.st-btn:hover {
  border-color: var(--st-accent);
  color: var(--st-accent) !important;
}
.st-btn--primary:hover {
  background: var(--st-accent);
  color: var(--st-bg) !important;
}
.st-page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.2rem;
  padding-bottom: 1.6rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--st-line);
}
.st-page-head > div {
  max-width: 34rem;
}
.md-typeset .st-page-head h1 {
  margin: 0.6rem 0 0.7rem;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
}
.md-typeset .st-page-head p:not(.st-kicker) {
  margin: 0;
  font-size: 0.85rem;
  color: var(--st-muted);
}

/* ------------------------------------------------------------------
   Home
   ------------------------------------------------------------------ */
/* Home banner, pill navigation and introduction */
.st-banner {
  background-color: #14275c;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1.4px),
    linear-gradient(180deg, #1e3a8a 0%, #0f1f4d 100%);
  background-size: 18px 18px, 100% 100%;
  color: #ffffff;
}
[data-md-color-scheme="slate"] .st-banner {
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.4px),
    linear-gradient(180deg, #172d6b 0%, #0b1220 100%);
}
.st-banner__inner {
  max-width: 38rem;
  margin: 0 auto;
  padding: 2.4rem 1rem 3.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}
.st-banner__photo {
  width: 6.8rem;
  height: 6.8rem;
  box-sizing: border-box;
  border-radius: 50%;
  border: 4px solid #ffffff;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.st-banner__photo--placeholder {
  background: #2c4fa3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.st-banner .st-banner__name {
  margin: 0.4rem 0 0;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #ffffff;
}
.st-banner__role {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}
.st-banner__icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 0.6rem;
}
.st-banner__icons a {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: #ffffff;
  color: #14275c;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.st-banner__icons a:hover,
.st-banner__icons a:focus-visible {
  background: #dbe4ff;
}
.st-banner__icons svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}
.st-pill {
  position: sticky;
  top: 2.8rem;
  z-index: 3;
  display: flex;
  justify-content: center;
  margin-top: -1.35rem;
  padding: 0 0.8rem;
  pointer-events: none;
}
.st-pill > div {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.2rem;
  padding: 0.15rem 0.6rem;
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}
.st-pill a {
  padding: 0.6rem 0.7rem;
  font-size: 0.75rem;
  color: var(--st-muted);
}
.st-pill a:hover {
  color: var(--st-accent);
}
.st-pill a[aria-current="page"] {
  color: var(--st-ink);
  font-weight: 600;
}

/* Top button: hidden until the reader scrolls well past the page's top (nav.js).
   visibility keeps it out of the tab order while it is hidden. */
.st-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.8rem 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.7rem;
  color: var(--st-ink);
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.4rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.st-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.st-top:hover {
  color: var(--st-accent);
  border-color: var(--st-accent);
}
.st-top:focus-visible {
  outline: 2px solid var(--st-accent);
  outline-offset: 2px;
}
.st-top svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
}
@media screen and (max-width: 44.9375em) {
  .st-top {
    right: 0.8rem;
    bottom: 0.8rem;
  }
}
/* Under Zensical, narrow screens show a round table-of-contents button in the
   same corner on pages that have a table of contents. Sit above it there. */
@media screen and (max-width: 59.984375em) {
  body:has(.md-sidebar--secondary .md-sidebar-button) .st-top {
    bottom: 4.2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .st-top {
    transition: none;
  }
}
.st-intro {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0.4rem 0 2.2rem;
  font-size: 0.85rem;
  line-height: 1.7;
}
.md-typeset .st-intro p {
  margin: 0 0 0.9rem;
}
.st-section--top {
  border-top: 1px solid var(--st-line);
}
.st-panel__grid.st-panel__grid--row {
  grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));
  gap: 0.6rem;
}
@media (max-width: 44em) {
  .st-pill > div {
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .st-pill a {
    flex-shrink: 0;
    padding: 0.6rem 0.5rem;
  }
}
.st-section {
  padding: 3.2rem 0;
  border-bottom: 1px solid var(--st-line);
}
.st-section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}
.st-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
  gap: 2.4rem;
  align-items: center;
  padding: clamp(2.4rem, 7vw, 4.4rem) 0;
  border-bottom: 1px solid var(--st-line);
}
.st-hero__text {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.md-typeset .st-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7.4vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.md-typeset .st-hero p {
  margin: 0;
}
.st-lede {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 34em;
}
.st-meta {
  font-size: 0.75rem;
  color: var(--st-muted);
}
.st-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 0.3rem;
}
.st-profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  font-family: var(--st-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.st-profiles a {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  color: var(--st-muted) !important;
}
.st-profiles a:hover {
  color: var(--st-accent) !important;
}
.st-panel {
  margin: 0 auto;
  width: 100%;
  max-width: 23rem;
}
.st-panel__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.st-tile {
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  min-width: 0;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--st-card);
  border: 1px solid var(--st-line);
}
.md-typeset .st-tile p {
  display: flex;
  gap: 0.4rem;
  font-family: var(--st-mono);
  font-size: 0.525rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--st-muted);
}
.st-tile p span:first-child {
  color: var(--st-accent);
}
.st-tile .st-svg {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
}
.md-typeset .st-panel figcaption {
  margin: 0.6rem auto 0;
  text-align: center;
}
.st-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
  border-bottom: 1px solid var(--st-line);
}
.st-split > div {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 2.4rem 2.4rem 2.4rem 0;
}
.st-split > div + div {
  padding: 2.4rem 0 2.4rem 2.4rem;
  border-left: 1px solid var(--st-line);
}
.md-typeset .st-split h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.2;
}
.md-typeset .st-split p {
  margin: 0;
}
.st-split p.st-body {
  color: var(--st-muted);
  max-width: 32em;
}
.st-split .st-more {
  align-self: flex-start;
  color: var(--st-ink) !important;
  border-bottom: 1px solid var(--st-ink);
  padding: 0.3rem 0;
}
@media (max-width: 44em) {
  .st-split > div,
  .st-split > div + div {
    padding: 2rem 0;
    border-left: 0;
  }
  .st-split > div + div {
    border-top: 1px solid var(--st-line);
  }
}
.st-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  gap: 1rem;
}
.st-card {
  display: flex;
  flex-direction: column;
  background: var(--st-card);
  border: 1px solid var(--st-line);
  color: var(--st-ink) !important;
}
.st-card:hover {
  border-color: var(--st-accent);
}
.st-card__fig {
  background: var(--st-soft);
  border-bottom: 1px solid var(--st-line);
  padding: 0.7rem;
}
.st-card__fig .st-svg {
  width: 100%;
  height: auto;
  display: block;
}
.st-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}
.md-typeset .st-card h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
}
.md-typeset .st-card p {
  margin: 0;
  font-size: 0.725rem;
  line-height: 1.55;
  color: var(--st-muted);
}
.md-typeset .st-card .st-card__meta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: var(--st-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.st-latest {
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem 3.2rem;
  align-items: flex-start;
}
.st-latest > div {
  flex: 999 1 26rem;
  min-width: 0;
}
.md-typeset ol.st-news {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.md-typeset ol.st-news li {
  margin: 0;
  padding-left: 1.4rem;
  position: relative;
}
.st-news li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--st-accent);
}
.md-typeset .st-news p {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--st-muted);
  max-width: 40em;
}
.md-typeset .st-news .st-date {
  margin: 0;
  font-family: var(--st-mono);
  font-size: 0.6rem;
  color: var(--st-accent);
}
.md-typeset .st-news h3 {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  line-height: 1.3;
}
.md-typeset .st-news h3 a {
  color: var(--st-ink);
}
.md-typeset .st-news h3 a:hover {
  color: var(--st-accent);
}
.st-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 0 2rem;
}
.st-tool {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--st-line);
  color: var(--st-ink) !important;
}
.st-tool__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
}
.md-typeset .st-tool h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.3;
}
.st-tool__link {
  flex-shrink: 0;
  font-family: var(--st-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--st-muted);
}
.md-typeset .st-tool p {
  margin: 0;
  font-size: 0.725rem;
  line-height: 1.55;
  color: var(--st-muted);
}
.st-tool:hover h3 {
  color: var(--st-accent);
}

/* ------------------------------------------------------------------
   Publications and talks: filters and entries
   ------------------------------------------------------------------ */
.st-filters {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.st-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.st-filter-row > span {
  width: 4.4rem;
  font-family: var(--st-mono);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--st-muted);
}
.st-filter-row button {
  min-height: 2.2rem;
  padding: 0 0.8rem;
  border: 1px solid var(--st-line);
  background: var(--st-card);
  color: var(--st-ink);
  font-family: var(--st-mono);
  font-size: 0.6rem;
  cursor: pointer;
}
.st-filter-row button[aria-pressed="true"] {
  background: var(--st-ink);
  border-color: var(--st-ink);
  color: var(--st-bg);
}
.st-filter-row button[data-key="theme"][aria-pressed="true"] {
  background: var(--st-accent);
  border-color: var(--st-accent);
}
.st-filter-row input[type="search"] {
  flex: 1 1 16rem;
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border: 1px solid var(--st-line);
  background: var(--st-card);
  color: var(--st-ink);
  font: inherit;
  font-size: 0.75rem;
}
.st-count {
  font-family: var(--st-mono);
  font-size: 0.6rem;
  color: var(--st-muted);
}
.st-pub {
  display: grid;
  grid-template-columns: 3.8rem minmax(0, 1fr);
  gap: 0 1rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--st-line);
}
.st-pub[hidden],
.st-talk[hidden] {
  display: none;
}
.md-typeset .st-pub p {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
}
.md-typeset .st-pub p.st-kicker,
.md-typeset .st-talk p.st-kicker {
  font-size: 0.6rem;
}
.md-typeset .st-pub .st-pub__year {
  margin: 0;
  font-family: var(--st-mono);
  font-size: 1rem;
  line-height: 1.3;
  color: var(--st-muted);
}
.md-typeset .st-pub h2,
.md-typeset .st-talk h2 {
  margin: 0.3rem 0 0;
  font-size: 1rem;
  line-height: 1.3;
}
.st-pub .st-venue {
  font-style: italic;
  color: var(--st-muted);
}
.st-pub .st-summary {
  color: var(--st-muted);
}
.st-pub strong {
  font-weight: 600;
  border-bottom: 1px solid var(--st-accent);
}
.st-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  margin-top: 0.4rem;
}
.st-links a {
  font-family: var(--st-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--st-line);
}
.st-talk {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: 1.2rem 2.2rem;
  padding: 1.8rem 0;
  border-top: 1px solid var(--st-line);
  align-items: start;
}
.st-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #14171d;
  overflow: hidden;
}
.st-cover .st-svg,
.st-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.st-cover img {
  filter: grayscale(1);
  transition: filter 0.2s;
}
.st-cover:hover img {
  filter: none;
}
.st-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3rem;
  height: 3rem;
  margin: -1.5rem 0 0 -1.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-duration {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0.1rem 0.35rem;
  background: rgba(0, 0, 0, 0.78);
  color: #ffffff;
  font-family: var(--st-mono);
  font-size: 0.6rem;
}
.md-typeset .st-talk p {
  margin: 0.4rem 0 0;
}
.md-typeset .st-talk .st-talk__meta {
  font-family: var(--st-mono);
  font-size: 0.625rem;
  line-height: 1.6;
  color: var(--st-muted);
}

/* ------------------------------------------------------------------
   Software, research and CV pages
   ------------------------------------------------------------------ */
.st-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--st-line);
}
.st-group > .st-label {
  flex: 1 1 10rem;
}
.st-group > .st-group__body {
  flex: 999 1 28rem;
  min-width: 0;
}
.st-group .st-tool:first-child {
  padding-top: 0;
}
.md-typeset .st-group .st-tool h3 {
  font-family: var(--st-mono);
  font-weight: 500;
  font-size: 0.8rem;
}
.md-typeset ol.st-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.md-typeset ol.st-timeline li {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 0.2rem 1rem;
  margin: 0;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--st-line);
}
.md-typeset ol.st-timeline li:first-child {
  padding-top: 0;
}
.md-typeset .st-timeline .st-when {
  margin: 0;
  font-family: var(--st-mono);
  font-size: 0.65rem;
  color: var(--st-accent);
}
.md-typeset .st-timeline h3 {
  margin: 0;
  font-size: 0.85rem;
}
.md-typeset .st-timeline p {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: var(--st-muted);
}
.st-theme {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: 1.2rem 2.4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--st-line);
  align-items: start;
}
.st-theme__fig {
  background: var(--st-soft);
  border: 1px solid var(--st-line);
  padding: 0.9rem;
}
.st-theme__fig .st-svg {
  width: 100%;
  height: auto;
  display: block;
}
.md-typeset .st-theme h2 {
  margin: 0.3rem 0 0.6rem;
  font-size: 1.25rem;
}
.md-typeset .st-theme p {
  margin: 0 0 0.6rem;
}

/* ------------------------------------------------------------------
   Blog
   ------------------------------------------------------------------ */
.md-post--excerpt {
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--st-line);
}
.md-post__meta,
.md-meta {
  font-family: var(--st-mono);
  font-size: 0.6rem;
  color: var(--st-muted);
}
.md-typeset .md-post__action a {
  font-family: var(--st-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Blog list: text on the left, cover on the right. The list is rendered
   outside .md-typeset, so these rules set their own type and link colours. */
.st-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem;
  gap: 1.4rem;
  align-items: start;
  margin: 0;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--st-line);
}
.st-post.st-post--plain {
  grid-template-columns: minmax(0, 1fr);
}
.st-post .st-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  font-family: var(--st-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--st-muted);
}
.st-post .st-post__meta span::before {
  content: "·";
  margin-right: 0.6rem;
}
.st-post .st-post__title {
  margin: 0.4rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.st-post .st-post__title a {
  color: var(--st-accent);
}
.st-post .st-post__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
}
.st-post .st-post__topics a {
  color: var(--st-muted);
}
.st-post .st-post__topics a + a::before {
  content: "|";
  margin-right: 0.5rem;
  color: var(--st-line);
}
.st-post .st-post__summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--st-ink);
}
.st-post .st-post__cover {
  display: block;
  overflow: hidden;
  border: 1px solid var(--st-line);
  border-radius: 0.25rem;
}
.st-post .st-post__cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.st-post .st-post__cover:hover img {
  transform: scale(1.03);
}
.st-post .st-post__title a:hover,
.st-post .st-post__topics a:hover {
  color: var(--st-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
@media screen and (max-width: 44.9375em) {
  .st-post {
    grid-template-columns: minmax(0, 1fr) 6.5rem;
    gap: 0.9rem;
  }
  .st-post .st-post__title {
    font-size: 0.95rem;
  }
}
