/* Modelled on pgreddy.com's essay pages: system sans, 16px/1.6, 640px column, side nav on wide screens. */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "avenir next", avenir, helvetica, "helvetica neue", ubuntu, roboto, noto,
    "segoe ui", arial, sans-serif;
}

html {
  background: #fff;
}

body {
  margin: 0 auto;
  color: #111;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: #000;
  text-decoration: underline;
  text-decoration-skip-ink: auto;
}

a:visited {
  color: #333;
}

a:focus-visible,
main:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

p {
  margin: 1rem 0;
}

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

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

h1,
h2 {
  font-weight: 600;
  line-height: 1.25;
}

h1 {
  margin: 1rem 0 0.5rem;
  font-size: 1.5rem;
  letter-spacing: 0.009em;
}

h2 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1rem;
}

article h2 {
  margin-top: 2rem;
}

article strong {
  font-weight: 600;
}

h2 + p,
h2 + ul,
h2 + ol {
  margin-top: 0.25rem;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  padding: 0.25rem 0.5rem;
  background: #fff;
}

.skip:focus {
  top: 0.5rem;
}

.page {
  position: relative;
  padding: 9px 0 20px;
}

.limiter {
  max-width: 640px;
  padding-left: 20px;
  padding-right: 20px;
  margin-left: auto;
  margin-right: auto;
}

.content {
  padding-top: 9px;
  padding-bottom: 20px;
}

.header .name {
  margin: 0 0 0.25em;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: normal;
}

.header .name a {
  color: #111;
  text-decoration: none;
}

.header .name a:hover,
.header .name a:focus-visible {
  text-decoration: underline;
}

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

.header li {
  margin: 0;
}

.file {
  color: #666;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.meta {
  margin-top: 0;
  color: #555;
  font-size: 14px;
}

.meta + .source-note {
  margin-top: -0.75rem;
  color: #767676;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.year-header {
  margin: 1rem 0 0.7rem;
  border-bottom: 1px solid #000;
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.6;
}

.content > h1 + .year-header {
  margin-top: 22px;
}

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

.writing li {
  display: grid;
  grid-template-columns: 60% 30%;
  column-gap: 5px;
  margin-bottom: 5px;
}

.writing li > * {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.writing a {
  font-weight: 500;
  letter-spacing: -0.015em;
}

.writing time {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.012em;
}

@media screen and (max-width: 639px) {
  .writing li {
    grid-template-columns: 1fr max-content;
    column-gap: 1rem;
  }

  .writing li > a {
    white-space: normal;
  }
}

article > h1 {
  margin-top: 0.83em;
}

figure {
  margin: 1.5rem 0;
}

figure img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0 auto;
}

figure.tall img {
  max-width: 480px;
}

figure.narrow img {
  max-width: 360px;
}

.stat-number {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.framework dl {
  margin: 0;
}

.framework dl > div {
  padding-top: 0.5rem;
  border-top: 2px solid #111;
}

.framework dl > div + div {
  margin-top: 1rem;
}

.framework dt {
  font-weight: 700;
}

.framework dd {
  margin: 0;
}

@media screen and (min-width: 640px) {
  .framework dl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .framework dl > div + div {
    margin-top: 0;
  }
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
}

sup,
sub {
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
}

sub {
  top: 0.4em;
}

.footnote-ref,
.footnote-backref {
  color: inherit;
  text-decoration: none;
}

.footnote-ref:hover,
.footnote-ref:focus-visible,
.footnote-backref:hover,
.footnote-backref:focus-visible {
  text-decoration: underline;
}

#notes {
  margin: 1rem 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

.footnote ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: note;
}

.footnote li {
  margin: 1rem 0;
  counter-increment: note;
}

.footnote li > p:first-child::before {
  content: "[" counter(note) "] ";
}

.footnote p {
  margin: 0;
}

.related {
  margin-top: 1.5rem;
}

.project h2 {
  margin-bottom: 0;
}

.project .meta {
  margin: 0;
}

.project .meta + p {
  margin-top: 0.25rem;
}

@media screen and (min-width: 640px) {
  .nu a {
    text-decoration: none;
  }

  .nu a:hover,
  .nu a:focus-visible {
    text-decoration: underline;
  }
}

@media screen and (max-width: 1024px) {
  .header-wrap {
    border-bottom: 1px solid #000;
    padding-bottom: 20px;
  }
}

@media screen and (min-width: 1025px) {
  .header {
    position: absolute;
    top: 40px;
    right: 50%;
    margin-right: 340px !important;
    letter-spacing: -0.009em;
  }

  .content > h1:first-child {
    margin-top: 1rem;
  }
}

@media print {
  .header-wrap,
  .skip {
    display: none;
  }

  .limiter {
    max-width: none;
    margin: 0;
  }
}

figure.slim img {
  max-width: 220px;
}

figure picture {
  display: block;
}

@media screen and (min-width: 700px) {
  figure.wide img,
  figure.wide.tall img,
  figure.wide.slim img {
    max-width: 640px;
  }
}
