/* One stylesheet, no JavaScript anywhere on this site.
   Serif body, monospace for anything that is data: dates, table headers,
   status labels, word counts. */

:root {
  --bg: #faf9f6;
  --fg: #22201c;
  --muted: #78736a;
  --rule: #ddd8cd;
  --rule-strong: #22201c;
  --link: #8a4b1f;
  --code-bg: #efece4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1815;
    --fg: #e8e3da;
    --muted: #9a9287;
    --rule: #35302a;
    --rule-strong: #e8e3da;
    --link: #d99a63;
    --code-bg: #242019;
  }
}

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

body {
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  max-width: 38rem;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.7 Charter, Georgia, Cambria, "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}

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

/* The monospace voice — used for data, never for prose. */
.site-name,
.site-header nav a,
.meta,
.status,
.entry-list time,
th,
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  padding-bottom: 0.9rem;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--rule-strong);
}

.site-name {
  display: inline-block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
}

.site-header nav {
  margin-top: 0.5rem;
}

.site-header nav a {
  margin-right: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Typography -------------------------------------------------------------- */

h1 {
  font-size: 1.8rem;
  line-height: 1.22;
  margin: 0 0 0.6rem;
  font-weight: 600;
}

h2 {
  font-size: 1.3rem;
  margin: 2.75rem 0 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

h3 {
  font-size: 1.0625rem;
  margin: 2rem 0 0.5rem;
  font-weight: 600;
}

p, ul, ol { margin: 0 0 1.25rem; }
li { margin-bottom: 0.35rem; }

blockquote {
  margin: 1.75rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

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

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

.tagline, .blurb {
  color: var(--muted);
  margin-bottom: 2.25rem;
}

/* Entry metadata ---------------------------------------------------------- */

.meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 1.8rem;
}

.status {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
  border-left: 3px solid var(--rule);
  padding: 0.2rem 0 0.2rem 0.8rem;
  margin: 0 0 1.8rem;
}

/* Entry lists ------------------------------------------------------------- */

.entry-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.entry-list li {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.35rem 0;
  margin-bottom: 0;
}

.entry-list time {
  flex: none;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* Code -------------------------------------------------------------------- */

code, pre { font-size: 0.875em; }

code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

pre {
  background: var(--code-bg);
  padding: 0.9rem 1rem;
  border-radius: 3px;
  overflow-x: auto;   /* long lines scroll here, never the page */
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

pre code {
  background: none;
  padding: 0;
}

/* Tables ------------------------------------------------------------------ */

/* Wide tables scroll inside themselves rather than the document. */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  display: block;
  overflow-x: auto;
}

th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 2px solid var(--rule-strong);
  white-space: nowrap;
}

th, td {
  text-align: left;
  padding: 0.45rem 0.9rem 0.45rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

td { font-variant-numeric: tabular-nums; }

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

/* Footer ------------------------------------------------------------------ */

.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Author, affiliation, ORCID. The path from the writing back to the person. */
.site-footer .identity {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.site-footer .identity-name { color: var(--fg); }
