/* Styles for kjgpta.github.io
   Set in Newsreader (three optical registers) with Sometype Mono for technical marks. */

/* ---------------------------------------------------------------- tokens */

:root,
[data-theme="light"] {
  --paper: #f4f1e9;
  --paper-inset: #e9e4d7;
  --paper-mat: #ded7c6;
  --rule: #cfc7b4;
  --rule-strong: #b3a992;
  --ink: #1a1714;
  --ink-2: #57503f;
  --ink-3: #6f6757;
  --accent: #a33b22;
  --accent-ink: #f4f1e9;
  --accent-soft: rgba(163, 59, 34, 0.1);
  --accent-veil: rgba(163, 59, 34, 0.28);
  color-scheme: light;
}

/* Night press: warm brown-black stock, bone ink. Not an inversion. */
[data-theme="dark"] {
  --paper: #171512;
  --paper-inset: #201d18;
  --paper-mat: #262119;
  --rule: #3a342b;
  --rule-strong: #554c3e;
  --ink: #e8e1d2;
  --ink-2: #b5ac99;
  --ink-3: #8f8676;
  --accent: #d2673f;
  --accent-ink: #171512;
  --accent-soft: rgba(210, 103, 63, 0.14);
  --accent-veil: rgba(210, 103, 63, 0.35);
  color-scheme: dark;
}

:root {
  --face-text: "Newsreader", "Iowan Old Style", "Georgia", serif;
  --face-mono: "Sometype Mono", "IBM Plex Mono", ui-monospace, "Menlo", monospace;

  /* Irregular scale: ~1.28 by hand, not the 3 / 2.25 / 1.5 / 1 ladder. */
  --fs-micro: 0.6875rem;
  --fs-note: 0.8125rem;
  --fs-small: 0.9375rem;
  --fs-body: clamp(1.0625rem, 1.005rem + 0.26vw, 1.1875rem);
  --fs-lead: clamp(1.1875rem, 1.09rem + 0.44vw, 1.4375rem);
  --fs-h3: clamp(1.25rem, 1.16rem + 0.4vw, 1.5rem);
  --fs-h2: clamp(1.6875rem, 1.44rem + 1.1vw, 2.375rem);
  --fs-h1: clamp(2.5rem, 1.72rem + 3.5vw, 4.75rem);

  /* Tracking tightens as type grows — the optical-size signal. */
  --tr-display: -0.024em;
  --tr-h2: -0.018em;
  --tr-h3: -0.011em;
  --tr-body: 0em;
  --tr-note: 0.005em;
  --tr-caps: 0.13em;

  /* Spacing on a 5px base, modular rather than 4px-linear. */
  --sp-1: 0.3125rem;
  --sp-2: 0.625rem;
  --sp-3: 0.9375rem;
  --sp-4: 1.375rem;
  --sp-5: 2rem;
  --sp-6: 2.875rem;
  --sp-7: 4.25rem;

  --measure: 34rem;
  --margin-col: 14rem;
  --gutter: 2.5rem;
  --edge: 1.625rem;
  --head-h: 3.125rem;

  /* Two curves, used for different jobs. */
  --ease-ui: cubic-bezier(0.32, 0.72, 0.3, 1);
  --ease-drawer: cubic-bezier(0.2, 0.8, 0.25, 1);
}

/* ------------------------------------------------------------------ base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 1.25rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face-text);
  font-size: var(--fs-body);
  line-height: 1.58;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 16;
  font-variant-numeric: oldstyle-nums;
  hanging-punctuation: first last;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--sp-3);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  font-variation-settings: "opsz" 60;
  letter-spacing: var(--tr-display);
  line-height: 0.97;
}

h2 {
  font-size: var(--fs-h2);
  font-variation-settings: "opsz" 40;
  letter-spacing: var(--tr-h2);
}

h3 {
  font-size: var(--fs-h3);
  font-variation-settings: "opsz" 24;
  letter-spacing: var(--tr-h3);
  line-height: 1.22;
}

p {
  margin: 0 0 var(--sp-3);
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

code {
  font-family: var(--face-mono);
  font-size: 0.86em;
  font-variant-numeric: normal;
  background: var(--accent-soft);
  padding: 0.1em 0.34em;
  color: var(--ink);
  /* Keep the tint padded on both fragments when a snippet wraps. */
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ----------------------------------------------------------------- links */

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--accent-veil);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: text-decoration-color 140ms var(--ease-ui), color 140ms var(--ease-ui);
}

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

/* ---------------------------------------------------------------- craft */

::selection {
  background: var(--accent);
  color: var(--accent-ink);
  text-shadow: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: 200;
  padding: 0.55rem 0.9rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 140ms var(--ease-ui);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Small caps set the way print does it: wide tracking, mono, uppercase. */
.label {
  display: block;
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  font-variant-numeric: normal;
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--ink-3);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* Margin-column notes sit at the caption optical size. */
.aside {
  font-size: var(--fs-note);
  font-variation-settings: "opsz" 9;
  letter-spacing: var(--tr-note);
  line-height: 1.5;
  color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ----------------------------------------------------------------- sheet
   One reading column left of centre, one live margin for annotation. */

.sheet {
  display: grid;
  grid-template-columns:
    [edge-start] minmax(var(--edge), 1fr)
    [text-start] minmax(0, var(--measure)) [text-end]
    var(--gutter)
    [note-start] minmax(0, var(--margin-col)) [note-end]
    minmax(var(--edge), 1fr) [edge-end];
}

.sheet > * {
  grid-column: text;
  min-width: 0;
}

.sheet > .aside {
  grid-column: note;
  align-self: start;
}

/* An entry pairs a block of text with its own margin note on one row. */
.entry {
  grid-column: text-start / note-end;
  display: grid;
  grid-template-columns:
    [text-start] minmax(0, var(--measure)) [text-end]
    var(--gutter)
    [note-start] minmax(0, var(--margin-col)) [note-end];
}

.entry > * {
  grid-column: text;
  min-width: 0;
}

.entry > .aside {
  grid-column: note;
  grid-row: 1;
  align-self: start;
  padding-top: 0.4em;
}

/* Deliberately uneven section rhythm rather than one repeated value. */
.section {
  padding-block: var(--sp-7);
  border-top: 1px solid var(--rule);
}

#experience {
  padding-block: var(--sp-6) var(--sp-7);
}

#work {
  padding-block: var(--sp-7) calc(var(--sp-7) + var(--sp-4));
}

#publications {
  padding-block: var(--sp-6) var(--sp-7);
}

#writing,
#projects {
  padding-block: var(--sp-6);
}

#skills {
  padding-block: var(--sp-5) var(--sp-6);
}

#about {
  padding-block: var(--sp-7) var(--sp-6);
}

.section-head {
  margin-bottom: var(--sp-5);
}

.section-head .label {
  margin-bottom: var(--sp-2);
  color: var(--accent);
}

.section-head h2 {
  margin-bottom: var(--sp-2);
}

.section-lead {
  font-size: var(--fs-lead);
  font-variation-settings: "opsz" 20;
  line-height: 1.4;
  color: var(--ink-2);
  font-style: italic;
}

/* ------------------------------------------------------------ running head */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--head-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 180ms var(--ease-ui), border-color 180ms var(--ease-ui);
}

.site-nav.is-scrolled {
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom-color: var(--rule);
  backdrop-filter: saturate(1.1) blur(6px);
}

.nav-inner {
  height: 100%;
  width: min(100% - (var(--edge) * 2), calc(var(--measure) + var(--gutter) + var(--margin-col)));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.brand {
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.brand span {
  color: var(--accent);
}

.nav-links {
  list-style: none;
}

.nav-links-desktop {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-left: auto;
}

.nav-links-desktop a {
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.075em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--ink-3);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 140ms var(--ease-ui), border-color 140ms var(--ease-ui);
}

.nav-links-desktop a:hover {
  color: var(--ink);
}

.nav-links-desktop a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: var(--sp-4);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 140ms var(--ease-ui);
}

.icon-btn:hover {
  color: var(--accent);
}

.icon-btn svg {
  width: 1rem;
  height: 1rem;
}

.icon-sun {
  display: var(--theme-icon-sun, none);
}

.icon-moon {
  display: var(--theme-icon-moon, block);
}

[data-theme="light"] {
  --theme-icon-sun: none;
  --theme-icon-moon: block;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 15px;
  height: 1px;
  background: var(--ink);
  transition: transform 180ms var(--ease-ui), opacity 140ms var(--ease-ui);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

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

.masthead {
  padding-block: var(--sp-6) var(--sp-5);
}

.masthead-name {
  margin-bottom: var(--sp-3);
}

/* The UA gives hr auto inline margins, which collapse it to zero width
   as a grid item — reset the margins as well as the border. */
.masthead-rule {
  grid-column: text-start / note-end;
  margin: 0 0 var(--sp-2);
  border: 0;
  border-top: 2px solid var(--ink);
}

.masthead-line {
  grid-column: text-start / note-end;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--ink-3);
}

.masthead-line span + span::before {
  content: "·";
  margin-right: var(--sp-3);
  color: var(--rule-strong);
}

/* ---------------------------------------------------------------- drawer */

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: color-mix(in srgb, var(--ink) 42%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease-drawer);
}

.nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  width: min(84vw, 20rem);
  padding: var(--sp-5) var(--sp-4);
  background: var(--paper);
  border-left: 1px solid var(--rule);
  overflow-y: auto;
  transform: translateX(100%);
  /* visibility keeps the closed drawer out of the tab order and the a11y
     tree, but is delayed so the panel can slide out before it disappears. */
  visibility: hidden;
  transition: transform 260ms var(--ease-drawer), visibility 0s linear 260ms;
}

.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 260ms var(--ease-drawer), visibility 0s linear 0s;
}

.drawer-label {
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--rule);
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav-links-mobile {
  display: flex;
  flex-direction: column;
}

.nav-links-mobile a {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding-block: var(--sp-2);
  font-size: var(--fs-h3);
  font-variation-settings: "opsz" 22;
  letter-spacing: var(--tr-h3);
  text-decoration: none;
  color: var(--ink);
}

.nav-links-mobile a:hover {
  color: var(--accent);
}

.nav-index {
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

/* --------------------------------------------------------- narrow sheets */

@media (max-width: 899px) {
  :root {
    --gutter: 0rem;
  }

  .sheet {
    grid-template-columns:
      [edge-start] var(--edge)
      [text-start note-start] minmax(0, 1fr) [text-end note-end]
      var(--edge) [edge-end];
  }

  .entry {
    grid-column: text;
    grid-template-columns: [text-start note-start] minmax(0, 1fr) [text-end note-end];
  }

  /* Margin notes fold in beneath their referent, set off by a rule. */
  .entry > .aside,
  .sheet > .aside {
    grid-row: auto;
    padding-top: var(--sp-2);
    margin-bottom: var(--sp-3);
    border-top: 1px solid var(--rule);
  }

  .nav-links-desktop {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav-inner {
    width: calc(100% - (var(--edge) * 2));
  }
}

@media (min-width: 900px) {
  .mobile-drawer {
    display: none;
  }
}

/* ------------------------------------------------------------ standfirst */

.masthead-kicker {
  margin-bottom: var(--sp-3);
  color: var(--accent);
}

.masthead-name {
  margin-bottom: var(--sp-2);
}

.edition {
  grid-column: text-start / note-end;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-3);
  margin-block: var(--sp-5) var(--sp-4);
  padding-block: var(--sp-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.edition-label {
  color: var(--ink-3);
}

/* The buttons carry a dotted underline and darker ink than the label beside
   them, so the label does not read as a fourth, broken option. */
.edition-btn {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px dotted var(--rule-strong);
  background: none;
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 140ms var(--ease-ui), border-color 140ms var(--ease-ui);
}

.edition-btn:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.edition-btn.is-active {
  color: var(--accent);
  border-bottom-style: solid;
  border-bottom-color: var(--accent);
}

.standfirst {
  max-width: 30rem;
  margin-bottom: var(--sp-4);
  font-size: var(--fs-lead);
  font-variation-settings: "opsz" 28;
  line-height: 1.33;
  letter-spacing: -0.008em;
  color: var(--ink);
}

.masthead-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-4);
  margin-bottom: var(--sp-6);
  font-family: var(--face-mono);
  font-size: var(--fs-note);
}

.masthead-links a {
  text-decoration-color: var(--rule-strong);
}

/* --------------------------------------------------------- selected list */

.selected-label {
  grid-column: text-start / note-end;
  margin-bottom: 0;
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
}

.proof-strip {
  grid-column: text-start / note-end;
}

.proof-row {
  display: grid;
  grid-template-columns:
    2.5rem
    minmax(0, calc(var(--measure) - 2.5rem))
    var(--gutter)
    minmax(0, var(--margin-col));
  align-items: baseline;
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background-color 140ms var(--ease-ui);
}

.proof-row:hover {
  background-color: var(--accent-soft);
}

.proof-idx {
  font-family: var(--face-mono);
  font-size: var(--fs-note);
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.proof-name {
  display: block;
  font-size: var(--fs-h3);
  font-variation-settings: "opsz" 24;
  letter-spacing: var(--tr-h3);
  line-height: 1.2;
  transition: color 140ms var(--ease-ui);
}

.proof-row:hover .proof-name {
  color: var(--accent);
}

.proof-meta {
  display: block;
  margin-top: 0.15em;
  font-size: var(--fs-note);
  font-variation-settings: "opsz" 10;
  color: var(--ink-2);
}

.proof-kicker {
  grid-column: 4;
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------- cv */

.cv-item {
  padding-block: var(--sp-4);
  border-top: 1px solid var(--rule);
}

.cv-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.cv-date {
  font-family: var(--face-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
}

.cv-role {
  margin-bottom: 0.1em;
}

.cv-org {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-small);
  font-style: italic;
  color: var(--ink-2);
}

.cv-list {
  list-style: none;
}

.cv-list li {
  position: relative;
  padding-left: 1.15em;
  margin-bottom: 0.28em;
}

.cv-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--rule-strong);
}

/* Statistics want lining figures; running prose keeps oldstyle. */
.cv-list b {
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
}

.cv-foot {
  margin-top: var(--sp-4);
  font-family: var(--face-mono);
  font-size: var(--fs-note);
}

@media (max-width: 899px) {
  .proof-row {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    row-gap: var(--sp-1);
  }

  .proof-kicker {
    grid-column: 2;
  }

  .cv-date {
    white-space: normal;
  }
}

/* ---------------------------------------------------------------- plate */

.plate {
  margin-block: var(--sp-2) var(--sp-5);
}

/* A mat and a hairline frame so the dark screenshot sits on the paper
   rather than punching a hole in it. */
.plate img {
  width: 100%;
  padding: var(--sp-2);
  background: var(--paper-mat);
  border: 1px solid var(--rule-strong);
}

.fig-num {
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--accent);
}

/* Run-in heads, print fashion: the head sits on the same line as its text. */
.case-line b {
  margin-right: 0.55em;
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--accent);
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-4);
  margin-top: var(--sp-4);
  font-family: var(--face-mono);
  font-size: var(--fs-note);
}

.work-tech {
  margin-top: var(--sp-2);
  font-size: var(--fs-note);
  font-variation-settings: "opsz" 10;
  color: var(--ink-3);
}

/* --------------------------------------------------------------- listing
   Shared row structure for the bibliography and the contents list. */

.listing {
  grid-column: text-start / note-end;
  list-style: none;
}

.listing > li {
  display: grid;
  grid-template-columns:
    minmax(0, var(--measure))
    var(--gutter)
    minmax(0, var(--margin-col));
  padding-block: var(--sp-4);
  border-top: 1px solid var(--rule);
}

.listing > li:first-child {
  border-top-color: var(--ink);
}

.listing > li > * {
  grid-column: 1;
  min-width: 0;
}

.listing > li > .aside {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  padding-top: 0.3em;
}

.listing-foot {
  margin-top: var(--sp-4);
  font-family: var(--face-mono);
  font-size: var(--fs-note);
}

/* Hanging indent: the reference number hangs, the citation stays flush. */
.biblio-cite {
  margin-bottom: 0;
  padding-left: 1.9em;
  text-indent: -1.9em;
  color: var(--ink-2);
}

.biblio-num {
  margin-right: 0.4em;
  font-family: var(--face-mono);
  font-size: var(--fs-note);
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.biblio-title {
  color: var(--ink);
  font-weight: 600;
  text-decoration-color: var(--rule-strong);
}

.biblio-id {
  font-family: var(--face-mono);
  font-size: 0.82em;
  font-variant-numeric: normal;
  white-space: nowrap;
}

.contents-title {
  margin-bottom: 0.2em;
}

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

.contents-note {
  margin-bottom: 0;
  font-size: var(--fs-small);
  color: var(--ink-2);
}

@media (max-width: 899px) {
  .listing > li {
    grid-template-columns: minmax(0, 1fr);
  }

  .listing > li > .aside {
    grid-column: 1;
    grid-row: auto;
    padding-top: 0;
    margin-bottom: var(--sp-2);
  }
}

/* ------------------------------------------------------------ index list */

.index-list {
  grid-column: text-start / note-end;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  column-gap: var(--gutter);
}

.index-list li {
  padding-block: var(--sp-2);
  border-top: 1px solid var(--rule);
}

.index-list a {
  display: block;
  text-decoration-color: var(--rule-strong);
}

.index-tag {
  display: block;
  font-size: var(--fs-note);
  font-variation-settings: "opsz" 10;
  color: var(--ink-3);
}

@media (min-width: 640px) {
  .index-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------- run-in lists */

.run-in > div {
  padding-block: var(--sp-3);
  border-top: 1px solid var(--rule);
}

.run-in > div:first-child {
  border-top-color: var(--ink);
}

.run-in dt {
  display: inline;
  margin-right: 0.55em;
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--accent);
}

.run-in dd {
  display: inline;
  margin: 0;
  color: var(--ink-2);
}

.principles dd {
  color: var(--ink);
}

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

.about-lead {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-lead);
  font-variation-settings: "opsz" 28;
  line-height: 1.35;
  letter-spacing: -0.008em;
}

.about-body {
  margin-top: var(--sp-4);
  color: var(--ink-2);
}

.signature-rule {
  width: 6rem;
  margin-block: var(--sp-5) var(--sp-3);
  border-top-color: var(--ink);
}

.signature {
  font-style: italic;
  line-height: 1.4;
}

.signature a {
  font-style: normal;
  font-family: var(--face-mono);
  font-size: var(--fs-note);
}

/* -------------------------------------------------------------- colophon */

.site-footer {
  padding-block: var(--sp-6) var(--sp-7);
  border-top: 2px solid var(--ink);
}

.colophon-label {
  margin-bottom: var(--sp-3);
  color: var(--accent);
}

.colophon-note {
  color: var(--ink-2);
}

.colophon-note b {
  font-weight: 600;
  color: var(--ink);
}

.colophon-machine {
  padding-top: 0.3em;
}

.colophon-elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-4);
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
  font-family: var(--face-mono);
  font-size: var(--fs-note);
}

.colophon-copy {
  margin-top: var(--sp-3);
  font-family: var(--face-mono);
  font-size: var(--fs-micro);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--ink-3);
}

/* The bracketed reference number is already a hanging indent; letting Safari
   hang the bracket too would double the offset. */
.biblio-cite {
  hanging-punctuation: none;
}

/* ----------------------------------------------------------------- print
   The sheet prints as a plain CV: one column, one ink, every edition shown. */

@media print {
  :root,
  [data-theme="light"],
  [data-theme="dark"] {
    --paper: #fff;
    --paper-inset: #fff;
    --paper-mat: #fff;
    --rule: #b8b8b8;
    --rule-strong: #8a8a8a;
    --ink: #000;
    --ink-2: #222;
    --ink-3: #444;
    --accent: #000;
    --accent-soft: transparent;
    --accent-veil: transparent;
  }

  @page {
    margin: 18mm 16mm;
  }

  body {
    font-size: 10pt;
    line-height: 1.45;
    background: #fff;
  }

  /* Screen furniture has no business on paper. */
  .site-nav,
  .mobile-drawer,
  .nav-backdrop,
  .skip-link,
  .edition,
  .colophon-elsewhere {
    display: none !important;
  }

  /* Print the complete record regardless of the edition on screen. Block
     rather than revert, since reverting an anchor would restore it inline. */
  [data-tracks].is-track-hidden {
    display: block !important;
  }

  /* The selected-list numerals are renumbered live by the edition filter, so
     they would collide once the filtered-out rows are printed back in. */
  .proof-idx {
    display: none;
  }

  .sheet,
  .entry,
  .listing > li,
  .proof-row,
  .index-list {
    display: block !important;
  }

  .aside {
    margin-bottom: 3pt;
    font-size: 8.5pt;
    font-style: italic;
    color: #333;
    border: 0 !important;
    padding-top: 0 !important;
  }

  .section {
    padding-block: 10pt !important;
  }

  h1 {
    font-size: 26pt;
  }

  h2 {
    font-size: 14pt;
  }

  h3 {
    font-size: 11pt;
  }

  .standfirst,
  .section-lead,
  .about-lead {
    font-size: 11pt;
  }

  .cv-item,
  .listing > li,
  .plate,
  .run-in > div {
    break-inside: avoid;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  .plate img {
    max-width: 11cm;
    padding: 0;
    border: 1px solid #999;
  }

  a {
    text-decoration: none;
    color: #000;
  }

  /* Spell out destinations that a printed page cannot click. */
  .biblio-title[href]::after,
  .contents-title a[href]::after,
  .index-list a[href]::after,
  .work-links a[href]::after,
  .masthead-links a[href]::after {
    content: " <" attr(href) ">";
    font-family: var(--face-mono);
    font-size: 7.5pt;
    color: #555;
    word-break: break-all;
  }
}
