:root {
  --bg: #fcfbf8;
  --ink: #1b1a17;
  --muted: #5f5c55;
  --accent: #9b2c2c;
  --paper-link: #1b1a17;
  --meta-link: #9b2c2c;
  --rule: #dedbd3;
  --code-bg: #f1efe9;

  --font-text: "Libertinus Serif", Georgia, "Times New Roman", serif;
  --font-display: "Libertinus Serif Display", "Libertinus Serif", Georgia, "Times New Roman", serif;
  --font-mono: "Libertinus Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-math: "Libertinus Math", "STIX Two Math", "Cambria Math", serif;

  --rail: 7rem;
  --gap: 1.5rem;
  --measure: 35rem;
  --page-x: 1.5rem;
}

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

[hidden] { display: none !important; }

html { background: var(--bg); }
body {
  margin: 0; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: 0 var(--page-x);
  background: var(--bg); color: var(--ink);
  font-family: var(--font-text); font-size: 1.0625rem; line-height: 1.55;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-variant-ligatures: common-ligatures;
  font-kerning: normal;
  -webkit-hyphens: auto; hyphens: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; padding-top: 3rem; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  font-variant-caps: all-small-caps; letter-spacing: .05em; font-size: .85rem;
}
.skip-link:focus {
  left: .5rem; top: .5rem;
  background: var(--bg); color: var(--ink);
  padding: .6rem 1rem; text-decoration: none;
  outline: 2px solid var(--accent); outline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
}
main:focus { outline: none; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
a:hover { text-decoration-thickness: 2px; }
.ext::after { content: "\00A0\2197"; font-size: .7em; color: var(--accent); }

.page { width: 100%; max-width: calc(var(--rail) + var(--gap) + var(--measure)); margin-inline: auto; }
/* The home page trades gutter width for a portrait you can actually see a face in. Setting
   --rail on the column itself rather than at :root means .row, .portrait and this element's
   own max-width all resolve against the wider value, so the photograph, the section labels
   and the header rule stay on one edge. */
.page-home { --rail: 16rem; }
.row {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--gap);
}
.rail {
  grid-column: 1; margin: 0;
  text-align: right;
  font-variant-caps: all-small-caps; letter-spacing: .05em;
  font-size: .8rem; line-height: 1.4;
  color: var(--muted);
  -webkit-hyphens: manual; hyphens: manual;
}
.rail .note { display: block; }
.rail .year {
  display: block;
  font-family: var(--font-display);
  font-variant-caps: normal; letter-spacing: 0;
  font-size: 1.35rem; line-height: 1; font-weight: 400;
  color: var(--ink);
  margin: 0 0 .4rem;
}
.rail.label {
  font-variant-caps: small-caps; letter-spacing: .06em;
  font-size: .85rem; font-weight: 400;
  color: var(--accent);
  padding-top: .2rem;
}
.txt { grid-column: 2; min-width: 0; }

.site-header { padding-top: 2.5rem; }
.site-header .page { border-bottom: 1px solid var(--rule); }
.masthead {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: .5rem 1.5rem; padding-bottom: .9rem;
}
.wordmark {
  font-family: var(--font-display); font-size: 1.15rem; line-height: 1.3;
  color: var(--ink); text-decoration: none;
}
.wordmark:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.site-nav {
  display: flex; gap: 1.4rem; margin-left: auto;
  font-variant-caps: all-small-caps; letter-spacing: .06em; font-size: .85rem;
}
.site-nav a { color: var(--ink); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

.nav-menu { display: none; }
.nav-menu > summary {
  list-style: none;
  position: fixed; top: 1.1rem; right: 1rem; z-index: 60;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  cursor: pointer;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::before,
.nav-menu[open] > summary::after {
  content: "";
  grid-area: 1 / 1; place-self: center;
  width: 22px; height: 2px; background: var(--ink);
}
.nav-menu > summary::before { box-shadow: 0 -7px 0 var(--ink), 0 7px 0 var(--ink); }
.nav-menu[open] > summary::before { box-shadow: none; rotate: 45deg; }
.nav-menu[open] > summary::after { rotate: -45deg; }
@media (prefers-reduced-motion: no-preference) {
  .nav-menu > summary::before,
  .nav-menu > summary::after { transition: rotate .15s ease, box-shadow .15s ease; }
}
.nav-panel {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2.5rem; padding: var(--page-x);
}
.nav-panel-name { font-family: var(--font-display); font-size: 1.15rem; margin: 0; }
.nav-panel nav { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.nav-panel a {
  font-family: var(--font-display);
  font-size: 1.5rem; line-height: 1.3;
  color: var(--ink); text-decoration: none;
  padding: .3rem 1rem;
}
.nav-panel a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .18em; }
.nav-panel-colophon { margin: 0; font-size: .75rem; color: var(--muted); text-align: center; }

.page-title {
  font-family: var(--font-display);
  font-size: 1.7rem; line-height: 1.15; font-weight: 400; letter-spacing: -.005em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
.empty { color: var(--muted); }

.hero .rail { padding-top: .35rem; }
/* The rail is the only column narrow enough to hold a face without it becoming the page.
   Square, small, and aligned to the same right edge as every other rail item. */
.portrait {
  display: block; margin: 0 0 .7rem auto;
  width: 100%; max-width: var(--rail); height: auto;
  aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 2px;
}
.portrait-role { margin: 0; }
.home-name {
  font-family: var(--font-display);
  font-size: 2.1rem; line-height: 1.15; font-weight: 400; letter-spacing: -.01em;
  margin: 0 0 1rem;
  text-wrap: balance;
}
.home-actions {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem;
  margin: 1.25rem 0 0;
  font-variant-caps: all-small-caps; letter-spacing: .05em; font-size: .9rem;
}
.home-actions a { color: var(--ink); text-decoration: none; padding: .2rem 0; }
.home-actions a:hover,
.home-actions a.primary { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.home-actions a + a::before { content: "\00B7"; display: inline-block; margin-right: .6rem; color: var(--muted); }

.home-section { margin-top: 4rem; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list > li { margin: 0 0 1.1rem; }
.date {
  font-variant-caps: all-small-caps; letter-spacing: .05em;
  font-size: .8rem; color: var(--muted);
  margin-right: .6rem;
}
.more { margin: .25rem 0 0; font-variant-caps: all-small-caps; letter-spacing: .05em; font-size: .85rem; }
.more a { color: var(--ink); text-decoration: none; }
.more a::after { content: "\00A0\2192"; color: var(--accent); }
.more a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

.paper-title { color: var(--paper-link); text-decoration: none; }
a.paper-title:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.paper-ref {
  color: var(--meta-link); text-decoration: none;
  font-variant-caps: all-small-caps; letter-spacing: .04em; font-size: .8rem;
  margin-left: .35rem; white-space: nowrap;
}
.paper-ref::before { content: "["; }
.paper-ref::after, .paper-ref.ext::after { content: "]"; font-size: inherit; color: inherit; }
.paper-ref:hover { text-decoration: underline; }

.entries { list-style: none; margin: 0; padding: 0; }
.entries > li { margin-bottom: 1.25rem; }
.entries .title { margin: 0; }
.entries .authors { font-size: .95em; margin: .1rem 0 .15rem; }
.entries .authors p { margin: 0; }
.entries .authors strong { font-weight: 400; font-variant-caps: small-caps; letter-spacing: .03em; }
.entries .refs { margin: .1rem 0 0; }
.entries .refs .paper-ref:first-child { margin-left: 0; }
.year-group { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.year-group:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

.post-title { font-family: var(--font-text); font-size: 1.1rem; line-height: 1.35; font-weight: 600; margin: 0; }
.post-title a { text-decoration: none; }
.post-title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.excerpt { color: var(--muted); margin: .15rem 0 0; }
.byline {
  margin: .1rem 0 0;
  font-variant-caps: all-small-caps; letter-spacing: .05em; font-size: .8rem; color: var(--muted);
}
.article .rail { padding-top: .95rem; }

.site-footer { margin-top: 5rem; }
.site-footer .page {
  border-top: 1px solid var(--rule);
  padding: 1.1rem 0 2.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  font-variant-caps: all-small-caps; letter-spacing: .05em; font-size: .85rem;
  color: var(--muted);
}
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.site-footer a { color: var(--ink); text-decoration: none; padding: .3rem 0; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.colophon { width: 100%; font-variant-caps: normal; letter-spacing: 0; font-size: .75rem; }

@media (max-width: 900px) {
  :root { --rail: 6rem; --gap: 1.15rem; }
}
@media (max-width: 767px) {
  :root { --rail: 0rem; --measure: 100%; --page-x: 1.25rem; }
  .page-home { --rail: 0rem; }
  .site-nav { display: none; }
  .nav-menu { display: block; }

  .nav-menu[open] ~ .site-header,
  .nav-menu[open] ~ main,
  .nav-menu[open] ~ .site-footer { display: none; }

  .row { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .rail, .txt { grid-column: 1; }
  .rail { text-align: left; margin-bottom: .3rem; }
  .rail .note { display: inline; }
  .rail .note + .note::before { content: " · "; }
  .rail .year { margin-bottom: .2rem; }
  .hero .rail, .article .rail { padding-top: 0; }
  /* The rail is full width once it stacks, so the portrait needs its own size and has to
     come back to the left edge with the text under it. */
  .portrait { width: 8rem; max-width: 8rem; margin: 0 0 .55rem; }
  .rail.label { margin-bottom: .6rem; }

  .site-header { padding-top: 1.25rem; }
  .masthead { padding-right: 3rem; min-height: 2.75rem; }
  main { padding-top: 2rem; }
  .home-name { font-size: 1.9rem; }
  .page-title { font-size: 1.55rem; }
  .home-section { margin-top: 2.75rem; }
  .site-footer { margin-top: 3.5rem; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .home-name { font-size: 1.75rem; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; padding: 0; }
  .site-nav, .nav-menu, .skip-link, .footer-links, .more, .colophon { display: none; }
  .page { max-width: none; }
  a { color: #000; text-decoration: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
  .ext::after { content: none; }
  .site-footer { margin-top: 2rem; }
}
