/* Self-hosted static fonts (SIL OFL 1.1, see assets/fonts/OFL.txt); static files embed cleanly in the PDF. */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-400-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;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-400-italic.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;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-400-italic.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-500-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;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-500-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-600-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;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-700-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;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext-700-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-400-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;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-400-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #f8f6f1;
  --text: #292b28;
  --muted: #565c55;
  --link: #355a4d;
  --rule: #d8d5cc;
  --sans:
    "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --card: #fcfbf8;
  --chip: #edeae2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  font-kerning: normal;
}

main {
  max-width: 49rem;
  margin-inline: auto;
  padding: 3.5rem 2rem 4rem;
}

p,
ul,
ol {
  margin: 0;
}

p + p {
  margin-top: 0.55rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.06em;
  text-decoration-color: #9ba99e;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-color: currentcolor;
}

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

strong {
  font-weight: 600;
}

code {
  font:
    0.9em ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}

h1 {
  margin: 0 0 0.7rem;
  font: 400 2.65rem/1.15 var(--serif);
  letter-spacing: -0.025em;
}

h2 {
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--link);
}

h3 {
  margin: 0;
  font-size: 1em;
  line-height: 1.45;
  font-weight: 600;
}

.section-title {
  color: inherit;
  text-decoration: none;
}

.cv-header {
  border-top: 3px solid var(--link);
  padding-top: 1.3rem;
  margin-bottom: 2rem;
}

.cv-header > p:first-of-type {
  color: var(--muted);
  font-size: 0.94rem;
}

.cv-header > p + p {
  margin-top: 0.9rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-top: 1rem;
  font-size: 0.84rem;
}

.contact-links > *,
.contact-links a {
  min-width: 0;
  padding-block: 0.2rem;
}

.cv-section {
  border-top: 1px solid var(--rule);
  padding-top: 1.1rem;
  margin-top: 1.7rem;
}

.section-body > * + * {
  margin-top: 0.75rem;
}

.section-body > h3:not(:first-child) {
  margin-top: 1.1rem;
}

.section-body > .cv-entry + .cv-entry {
  margin-top: 1.1rem;
}

/* Dates follow the title and institution in both the DOM and PDF text stream. */
.entry-heading {
  margin-bottom: 0.35rem;
}

.entry-organization {
  color: var(--muted);
  font-size: 0.92em;
  line-height: 1.45;
}

.entry-date {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.82em;
  font-variant-numeric: tabular-nums;
}

ul,
ol {
  padding-left: 1.15rem;
}

li {
  padding-left: 0.15rem;
}

li + li {
  margin-top: 0.55rem;
}

li::marker {
  color: var(--muted);
}

.publication-list li + li {
  margin-top: 0.8rem;
}

.publication-title {
  display: block;
  font-weight: 500;
}

.publication-authors {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.85em;
  line-height: 1.5;
}

.publication-authors strong {
  color: var(--text);
  font-weight: 600;
}

.publication-details {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.85em;
  line-height: 1.5;
}

.teaching-meta {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.85em;
}

.teaching-description {
  margin-top: 0.3rem;
}

.usage,
.usage a {
  color: var(--muted);
  text-decoration-color: var(--rule);
}

.usage a:hover {
  text-decoration-color: currentcolor;
}

.usage-note {
  color: var(--muted);
  font-size: 0.85em;
}

/* Landing and events pages. */
.hero-actions {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.6rem;
  margin-top: 1.3rem;
}

.button {
  display: inline-block;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--link);
  border-radius: 4px;
  color: var(--link);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.button:hover,
.button-primary {
  color: var(--bg);
  background: var(--link);
}

.button-primary:hover {
  background: var(--text);
  border-color: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
  .button {
    transition:
      color 0.15s ease,
      background-color 0.15s ease,
      border-color 0.15s ease;
  }
}

.smallcaps {
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-note {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.entry-note > * + * {
  margin-top: 0.35rem;
}

/* Landing software: the name in the margin, then what it does and where to get it. */
.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.4rem 2.2rem;
  padding: 0;
  list-style: none;
}

.works > li,
.works > li + li {
  margin: 0;
  padding: 0;
}

.work-name {
  display: block;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 600;
  text-decoration: none;
}

a.work-name:hover {
  color: var(--link);
}

.work-text {
  margin-top: 0.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.works-more {
  margin-top: 1.6rem;
}

.work-meta {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.works-also {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

/* Almanac: entries under a hanging year set in the display serif. */
.almanac-year {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
}

.almanac-year + .almanac-year {
  margin-top: 0.9rem;
}

.almanac-numeral {
  color: color-mix(in srgb, var(--link) 75%, var(--bg));
  font: 300 1.9rem/1 var(--serif);
  font-variant-numeric: oldstyle-nums;
  letter-spacing: -0.02em;
}

.almanac-entries {
  padding: 0;
  list-style: none;
}

.almanac-entries > li + li,
.almanac-entry + .almanac-entry {
  margin-top: 0.85rem;
}

.almanac-entry > * + * {
  margin-top: 0.12rem;
}

.almanac-entry > .entry-note {
  margin-top: 0.3rem;
}

.almanac-title {
  font-weight: 600;
  line-height: 1.4;
}

.almanac-title a {
  color: var(--text);
  text-decoration-color: var(--rule);
}

.almanac-place {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}

.almanac-role {
  color: var(--muted);
  font-size: 0.85rem;
}

.almanac-role .smallcaps {
  color: var(--link);
}

@media screen and (width <= 480px) {
  .almanac-year {
    grid-template-columns: 3.3rem minmax(0, 1fr);
    gap: 0.7rem;
  }

  .almanac-numeral {
    font-size: 1.5rem;
  }
}

/* Screen-only chrome: skip link, section navigation and anchor affordances. */
.screen-only {
  display: none;
}

@media screen {
  body {
    overflow-x: clip;
  }

  html {
    /* Clears the sticky section bar when jumping to a heading. */
    scroll-padding-top: 4rem;
  }

  /* Usage figures appear on screen only; the PDF keeps to the record. */
  .usage,
  .usage-note {
    display: inline;
  }

  .hero-actions {
    display: flex;
  }

  .contact-more {
    display: inline;
  }

  .more-links:popover-open {
    display: block;
  }

  .skip-link {
    display: block;
    position: fixed;
    z-index: 10;
    top: 0.5rem;
    left: 1rem;
    padding: 0.6rem 1rem;
    color: white;
    background: var(--text);
    transform: translateY(-180%);
  }

  .skip-link:focus {
    transform: none;
  }

  #main-content:focus {
    outline: none;
  }

  .page-footer {
    display: block;
    margin-top: 2.5rem;
    color: var(--muted);
    font-size: 0.8rem;
  }

  .section-title:hover {
    text-decoration: underline;
    text-underline-offset: 0.3em;
  }

  /* Compact bar: right under the header's buttons, then sticky; horizontally scrollable.
     Its background and rule reach the window edges once it sticks. */
  .sidebar {
    display: block;
    position: sticky;
    z-index: 5;
    top: 0;
    margin-top: -0.6rem;
    background: var(--bg);
  }

  .sidebar::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 calc(50% - 50vw);
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }

  .sidebar[data-at-top]::before {
    border-bottom-color: transparent;
  }

  .sidebar-profile,
  .sidebar-reveal {
    display: none;
  }

  .section-nav ol {
    display: flex;
    position: relative;
    gap: 0.15rem;
    margin-inline: -0.65rem;
    padding: 0.45rem 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    mask-image: linear-gradient(
      to right,
      transparent,
      #000 0.65rem,
      #000 calc(100% - 1.5rem),
      transparent
    );
  }

  .section-nav li,
  .section-nav li + li {
    margin: 0;
    padding: 0;
  }

  .section-nav ol a {
    display: block;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.075em;
    line-height: 1.4;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .section-nav a:hover,
  .section-nav a[aria-current] {
    color: var(--link);
  }

  .section-nav:not(.has-indicator) ol a[aria-current] {
    background: color-mix(in srgb, var(--link) 10%, transparent);
  }

  .section-nav ol a {
    position: relative;
    z-index: 1;
  }

  .section-nav-indicator {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--link) 12%, transparent);
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .section-nav a:focus-visible {
    outline-offset: -2px;
  }
}

@media screen and (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a {
    transition:
      text-decoration-color 0.15s ease,
      color 0.15s ease;
  }

  .sidebar,
  .sidebar a {
    transition:
      color 0.15s ease,
      background-color 0.15s ease,
      border-color 0.15s ease;
  }

  /* Settles in gently when shown; fades out quickly before hiding. */
  .sidebar-name,
  .sidebar-reveal {
    transition:
      opacity 0.4s ease,
      transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
      visibility 0s;
  }

  .sidebar-contact {
    transition-delay: 0.08s, 0.08s, 0s;
  }

  /* On arrival, the section list writes itself in, one label after another. */
  .section-nav li {
    animation: nav-enter 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.15s + var(--i, 0) * 0.055s);
  }

  .sidebar[data-header-visible] .sidebar-name,
  .sidebar[data-header-visible] .sidebar-reveal {
    transform: translateY(-0.4rem);
    transition:
      opacity 0.15s ease,
      transform 0.15s ease,
      visibility 0s 0.15s;
  }
}

@media screen and (width <= 760px) {
  main {
    padding: 2rem 1.5rem 3rem;
  }
}

@media screen and (width <= 480px) {
  body {
    font-size: 16px;
  }

  main {
    padding: 1.25rem 1.1rem 2.5rem;
  }

  h1 {
    font-size: 2.1rem;
  }

  .cv-header {
    padding-top: 1rem;
  }

  .contact-links {
    column-gap: 0.85rem;
  }

  .contact-links .contact-email {
    flex-basis: 100%;
  }
}

/* Wide screens: the navigation becomes a rail in the left margin. */
@media screen and (width >= 75rem) {
  html {
    scroll-padding-top: 2rem;
  }

  .sidebar {
    position: fixed;
    top: 3.5rem;
    left: max(1.5rem, calc(50% - 24.5rem - 12rem));
    width: 10.5rem;
    max-height: calc(100vh - 3.5rem);
    padding: 0 0 1.5rem;
    overflow-y: auto;
    background: none;
    border: 0;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .sidebar-profile,
  .sidebar-reveal {
    display: block;
  }

  .sidebar::before,
  .section-nav-indicator {
    display: none;
  }

  /* Profile and contacts repeat the page header, so they appear once it scrolls away. */
  .sidebar[data-header-visible] .sidebar-name,
  .sidebar[data-header-visible] .sidebar-reveal {
    opacity: 0;
    visibility: hidden;
  }

  .sidebar-profile {
    margin-bottom: 1.25rem;
    color: var(--muted);
  }

  /* Line height and tracking match the page heading, so one scales exactly onto the other. */
  .sidebar-name {
    display: block;
    width: fit-content;
    margin-bottom: 0.45rem;
    color: var(--text);
    font: 1.05rem/1.15 var(--serif);
    letter-spacing: -0.025em;
    text-decoration: none;
    white-space: nowrap;
  }

  .sidebar-profile p + p {
    margin-top: 0.3rem;
  }

  .sidebar-contact {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
  }

  .sidebar-contact ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.8rem;
    margin: 0.3rem 0 0;
    padding: 0;
    list-style: none;
  }

  .sidebar-contact li,
  .sidebar-contact li + li {
    margin: 0;
    padding: 0;
  }

  .sidebar-cv {
    display: block;
    margin-top: 0.9rem;
    font-weight: 700;
  }

  .sidebar-pdf {
    display: inline-block;
    margin-top: 0.8rem;
    font-weight: 600;
  }

  .section-nav ol {
    display: block;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--rule);
    overflow: visible;
    mask-image: none;
  }

  .section-nav ol a {
    margin-left: -1px;
    padding: 0.3rem 0 0.3rem 0.9rem;
    border-left: 2px solid transparent;
    border-radius: 0;
    white-space: normal;
  }

  .section-nav ol a:hover {
    border-left-color: var(--rule);
  }

  .section-nav ol a[aria-current] {
    border-left-color: var(--link);
    background: none;
  }
}

@media print {
  :root {
    --bg: #fff;
    --text: #20221f;
    --muted: #51564e;
    --link: #293d33;
    --rule: #cccfc7;
  }

  @page {
    size: A4;
    margin: 14mm 16mm 18mm;
  }

  body {
    font-size: 10pt;
    line-height: 1.3;
  }

  main {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  h1 {
    font-size: 25pt;
    margin-bottom: 5pt;
  }

  h2 {
    font-size: 8.5pt;
    margin-bottom: 7pt;
    break-after: avoid;
  }

  h3 {
    font-size: 10pt;
    break-after: avoid;
  }

  .cv-header {
    border-top-width: 2pt;
    padding-top: 9pt;
    margin-bottom: 12pt;
  }

  .cv-header > p:first-of-type {
    font-size: 9pt;
  }

  .cv-header > p + p {
    margin-top: 6pt;
  }

  .contact-links {
    font-size: 8.5pt;
    gap: 2pt 10pt;
    margin-top: 6pt;
  }

  .contact-links a {
    padding: 0;
  }

  .cv-section {
    margin-top: 8pt;
    padding-top: 6pt;
  }

  .section-body > * + * {
    margin-top: 5pt;
  }

  .section-body > h3:not(:first-child) {
    margin-top: 9pt;
  }

  .section-body > .cv-entry + .cv-entry {
    margin-top: 7pt;
  }

  .entry-heading {
    margin-bottom: 3pt;
    break-after: avoid;
  }

  .entry-date {
    font-size: 8.5pt;
    margin-top: 1pt;
  }

  .publication-authors {
    font-size: 8.5pt;
    line-height: 1.35;
    margin-top: 1pt;
  }

  .publication-details {
    font-size: 8.5pt;
    line-height: 1.35;
    margin-top: 1pt;
  }

  li + li,
  .publication-list li + li {
    margin-top: 3pt;
  }

  /* Sections flow continuously; entries and headings never straddle pages. */
  .cv-entry,
  li,
  .section-education,
  .section-languages {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
  }
}

/* Concept pages: what a thing is, what it states, and what points to it. */
.concept-kind {
  color: var(--link);
  font-size: 0.85rem;
  font-weight: 600;
}

.concept-header h1 {
  margin-top: 0.2rem;
}

.cv-header > .concept-alternate {
  color: var(--muted);
}

.concept-description {
  max-width: 40rem;
}

.cv-header > .concept-identity {
  color: var(--muted);
  font-size: 0.9rem;
}

.facts {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0.7rem 1.5rem;
  margin: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.facts dd {
  margin: 0;
}

.facts ul {
  padding: 0;
  list-style: none;
}

.facts li,
.facts li + li {
  margin: 0;
  padding: 0;
}

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

.concept-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

/* A paper cited where it is mentioned (an event, a software entry), as in the publication list. */
.citation {
  display: block;
  margin-top: 0.35rem;
}

.citation .publication-title {
  color: inherit;
  font-weight: 500;
}

.concept-citation {
  display: block;
  margin-top: 0.3rem;
}

.facts li + li:has(.publication-title) {
  margin-top: 0.7rem;
}

.concept-note {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* More of the person's profiles, behind one quiet button at the end of the contact links. */
.contact-more {
  padding: 0.2rem 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 0.18em;
}

.more-links {
  width: min(22rem, calc(100vw - 2rem));
  padding: 1rem 1.2rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 12px 32px rgb(0 0 0 / 10%);
}

.more-links::backdrop {
  background: rgb(0 0 0 / 6%);
}

.more-links-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.more-links-head button {
  padding: 0 0.3rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.more-links ul {
  padding: 0;
  list-style: none;
}

.more-links li,
.more-links li + li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.35rem 0;
  border-top: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
}

.more-links-via {
  color: var(--muted);
  font-size: 0.82rem;
}

/* Content page: the whole graph as one table, grouped by category. */
.content-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.content-toolbar[hidden] {
  display: none;
}

.content-filter {
  flex: 1 1 auto;
  max-width: 22rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}

.content-filter:focus {
  outline: 2px solid color-mix(in srgb, var(--link) 45%, transparent);
  outline-offset: 1px;
  border-color: var(--link);
}

.content-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.content-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.content-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  padding: 0.5rem 0.6rem;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: left;
}

.content-table td {
  padding: 0.42rem 0.6rem;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
  vertical-align: baseline;
}

.content-table td:first-child,
.content-table th:first-child {
  padding-left: 0;
}

.content-table tbody tr:not(.content-group-head):hover td {
  background: color-mix(in srgb, var(--link) 4%, transparent);
}

.content-table td a {
  text-decoration-color: color-mix(in srgb, currentcolor 30%, transparent);
}

.content-table .num {
  width: 4.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.content-kind {
  width: 11rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.content-group-head th {
  padding: 1.5rem 0 0.45rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
}

.content-group-head th a {
  color: var(--text);
  text-decoration: none;
}

.content-group-head th a:hover {
  color: var(--link);
}

.content-group-count {
  margin-left: 0.3rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

@media screen and (width <= 600px) {
  .content-table thead th:last-child,
  .content-table td:last-child {
    display: none;
  }

  .content-kind {
    width: auto;
  }
}

/* Names on the other pages that lead to a concept page: quiet until pointed at. */
.concept-link {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: color-mix(in srgb, currentcolor 35%, transparent);
}

.concept-link:hover {
  color: var(--link);
  text-decoration-style: solid;
}

@media print {
  .concept-link {
    text-decoration: none;
  }
}

@media screen and (width <= 600px) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .facts dd + dt {
    margin-top: 0.8rem;
  }
}

/* Until the page and its fonts have loaded (see _includes/site-assets.html), nothing shows and
   nothing moves; then the page fades in at once, in its own fonts. */
@media screen {
  html.is-loading body {
    opacity: 0;
  }

  html.is-loading *,
  html.is-loading *::before,
  html.is-loading *::after {
    animation-play-state: paused !important;
  }
}

@media screen and (prefers-reduced-motion: no-preference) {
  body {
    transition: opacity 0.18s ease;
  }
}

/* The header stays put between pages; the sections below it settle in on arrival, one after
   another. Subdued, and off for readers who prefer less motion. */
@media screen and (prefers-reduced-motion: no-preference) {
  body:not([data-page="events"]) .cv > section {
    animation: page-enter 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: 0.45s;
  }

  body:not([data-page="events"]) .cv > section:nth-of-type(1) {
    animation-delay: 0.1s;
  }

  body:not([data-page="events"]) .cv > section:nth-of-type(2) {
    animation-delay: 0.2s;
  }

  body:not([data-page="events"]) .cv > section:nth-of-type(3) {
    animation-delay: 0.3s;
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
}

/* Events page: on arrival the entries unfold one after another, like the CV's section list,
   each year appearing with its first entry. */
@media screen and (prefers-reduced-motion: no-preference) {
  [data-page="events"] .almanac-entry,
  [data-page="events"] .almanac-numeral {
    animation: entry-unfold 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.1s + var(--i, 0) * 0.07s);
  }
}

@keyframes entry-unfold {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
    clip-path: inset(0 0 100% 0);
  }

  60% {
    clip-path: inset(0 0 0 0);
  }

  /* Ends unclipped, so focus outlines and descenders are never cut off. */
  to {
    opacity: 1;
    transform: none;
    clip-path: none;
  }
}

@keyframes nav-enter {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
}

/* On wide screens the rail line draws down as the labels arrive. */
@media screen and (width >= 75rem) and (prefers-reduced-motion: no-preference) {
  .section-nav ol {
    animation: rail-draw 0.8s cubic-bezier(0.3, 0.6, 0.2, 1) 0.1s both;
  }
}

@keyframes rail-draw {
  from {
    clip-path: inset(0 0 100% -1rem);
  }

  to {
    clip-path: inset(0 0 0 -1rem);
  }
}

/* On screen the page stays plain: one typeface, sentence-case headings, no ornaments.
   The printed CV keeps its own typography (see @media print). */
@media screen {
  :root {
    --bg: #fdfdfc;
  }

  main {
    padding-top: 2.2rem;
  }

  @media (width <= 760px) {
    .site-nav {
      width: calc(100% - 3rem);
    }
  }

  @media (width <= 480px) {
    .site-nav {
      width: calc(100% - 2.2rem);
      margin-top: 1rem;
    }

    main {
      padding-top: 1.6rem;
    }
  }

  h1 {
    font: 600 2.2rem/1.2 var(--sans);
    letter-spacing: -0.015em;
  }

  h2 {
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }

  .cv-header {
    border-top: 0;
    padding-top: 0;
  }

  .smallcaps {
    font-size: inherit;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }

  .almanac-numeral {
    color: var(--muted);
    font: 600 1.05rem/1.4 var(--sans);
    font-variant-numeric: normal;
    letter-spacing: 0;
  }

  .almanac-place {
    font-style: normal;
  }

  .section-nav ol a {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
  }

  .sidebar-name {
    font: 600 1rem/1.2 var(--sans);
    letter-spacing: -0.015em;
  }

  /* Above the CV's section bar, aligned with the text column. */
  .site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.4rem;
    width: calc(100% - 4rem);
    max-width: 45rem;
    margin: 1.4rem auto 0;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--rule);
    font-size: 0.95rem;
    font-weight: 500;
  }

  /* The content page's link sits at the far end of the bar. */
  .site-nav-end {
    margin-left: auto;
  }

  .site-nav a {
    position: relative;
    color: var(--muted);
    text-decoration: none;
  }

  /* The underline marks the current page and grows in when the page loads. */
  .site-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -0.3rem;
    left: 0;
    height: 2px;
    border-radius: 1px;
    background: var(--link);
    transform: scaleX(0);
  }

  .site-nav a[aria-current]::after {
    transform: scaleX(1);
  }

  .site-nav a:hover,
  .site-nav a[aria-current] {
    color: var(--text);
  }

  @media (prefers-reduced-motion: no-preference) {
    .site-nav a[aria-current]::after {
      animation: underline-in 0.45s cubic-bezier(0.3, 0.7, 0.3, 1) 0.1s
        backwards;
    }
  }
}

@keyframes underline-in {
  from {
    transform: scaleX(0);
  }
}
