@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Newsreader:ital,opsz,wght@0,6..72,400..800;1,6..72,400..800&display=swap");

/*
 * Site-local layer on top of The Proportional Web.
 * Newsreader is the house serif; the rest keeps generated site markup aligned
 * with the imported prose layout.
 */

:root {
  --font-family: "Newsreader", serif;
  --font-family-code: "IBM Plex Mono", monospace;
  --text-color: #111;
  --muted-color: #555;
  --faint-color: #777;
  --rule-color: #b8b8b8;
  --background-color: #fff;
  color-scheme: light dark;
}

html,
body {
  background: var(--background-color);
  color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #eee;
    --muted-color: #bbb;
    --faint-color: #999;
    --rule-color: #555;
    --background-color: #111;
  }
}

body h1,
h2,
h2#toc-title,
.canonical-name,
abbr,
blockquote .author,
figcaption .author,
.header-section-number,
header h1 {
  font-family: "Newsreader", serif;
}

body h1,
h2,
h2#toc-title,
.canonical-name,
abbr {
  font-variant: all-small-caps;
  letter-spacing: 0.12em;
}

.site-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2.25rem;
}

.site-title > * {
  margin-top: 0;
}

.site-title-mark {
  flex: 0 0 auto;
  width: 3.375rem;
  height: 3.375rem;
  object-fit: contain;
}

@media (prefers-color-scheme: dark) {
  .site-title-mark {
    filter: invert(1);
  }
}

article p + p,
.annotated-article p + p {
  margin-top: calc(var(--line-height) * 0.75);
  text-indent: 3ch;
}

.post-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.75ch;
  margin: calc(var(--line-height) * 2) 0 var(--line-height);
  padding-bottom: calc(var(--line-height) - var(--border-thickness));
  border-bottom: var(--border-thickness) solid var(--text-color);
}

.post-header h1.p-name {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border-bottom: 0;
  font-size: 1.25rem;
  line-height: var(--line-height);
}

.post-header .post-date {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border-bottom: 0;
  color: var(--muted-color);
  font-size: 1rem;
  line-height: var(--line-height);
  text-align: left;
  text-indent: 0;
}

.post-header .post-date span {
  margin-right: 0.75ch;
}

.post-header + p,
.post-header + img + p {
  margin-top: var(--line-height);
  text-align: justify;
  text-indent: 3ch;
}

main p + table {
  margin-top: var(--line-height);
}

caption {
  display: table-caption;
  caption-side: top;
  margin: 0 0 calc(var(--line-height) * 0.75);
  text-align: left;
}

article blockquote p + p,
.annotated-article blockquote p + p {
  text-indent: 0;
}

blockquote p:first-of-type::before,
blockquote p:last-of-type::after {
  content: none;
}

.mobile-footnotes {
  display: none;
}

.page-meta,
.source-meta,
.site-metrics p,
.post-footer p {
  color: var(--muted-color);
  font-size: 0.95rem;
  text-align: left;
  text-indent: 0;
}

.contact-info {
  color: var(--muted-color);
  font-size: 0.95rem;
  font-style: normal;
  line-height: var(--line-height);
  margin-top: var(--line-height);
}

.contact-info div {
  margin-top: 0;
}

.more-list {
  column-count: 2;
  column-gap: 3ch;
}

.more-list li {
  break-inside: avoid;
}

@media screen and (max-width: 480px) {
  .site-title {
    gap: 0.875rem;
    font-size: 2.25rem;
  }

  .site-title-mark {
    width: 3.375rem;
    height: 3.375rem;
  }

  .more-list {
    column-count: 1;
  }
}

.page-status {
  font-variant: all-small-caps;
  letter-spacing: 0.08em;
}

.annotated-list dt {
  font-weight: var(--font-weight-medium);
}

.annotated-list dd {
  margin: 0 0 var(--line-height) 0;
}

.annotated-list dd p {
  text-align: left;
  text-indent: 0;
}

.link-bibliography,
.post-footer {
  margin-top: calc(var(--line-height) * 2);
  border-top: var(--border-thickness) solid var(--rule-color);
  padding-top: var(--line-height);
}

.link-bibliography h2,
.post-footer h2 {
  margin-top: 0;
}

.post-nav ul,
.post-responses ul {
  margin-bottom: var(--line-height);
}

.site-search label,
.site-search input {
  display: block;
}

.site-search input {
  width: 100%;
  border: var(--border-thickness) solid var(--text-color);
  background: var(--background-color);
  color: var(--text-color);
  font: inherit;
  line-height: var(--line-height);
  padding: calc(var(--line-height) / 2) 1ch;
}
