/* Literata (SIL Open Font License, see /fonts/OFL.txt) — variable weight, self-hosted */
@font-face {
  font-family: Literata;
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/literata-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Literata;
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/literata-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Literata;
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/literata-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Literata;
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/literata-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;

  /* Primitives */
  --paper-100: #f7f3ec;
  --paper-200: #ece4d6;
  --paper-300: #e6ddcf;
  --paper-400: #d8cdba;
  --paper-500: #a89c8c;
  --coffee-600: #5f574a;
  --coffee-800: #3d352a;
  --coffee-900: #2e2820;
  --coffee-950: #221d18;
  --rust-200: #e8a87e;
  --rust-300: #d98a5f;
  --rust-600: #9c4221;
  --rust-700: #7c3116;

  /* Semantic tokens */
  --bg: var(--paper-100);
  --text: var(--coffee-900);
  --text-muted: var(--coffee-600);
  --surface-muted: var(--paper-200);
  --border: var(--paper-400);
  --link: var(--rust-600);
  --link-hover: var(--rust-700);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--coffee-950);
    --text: var(--paper-300);
    --text-muted: var(--paper-500);
    --surface-muted: var(--coffee-900);
    --border: var(--coffee-800);
    --link: var(--rust-300);
    --link-hover: var(--rust-200);
  }
}

body {
  max-width: 65ch;
  margin: 0 auto;
  padding: 1rem;
  font-family: Literata, Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.65;
  background-color: var(--bg);
  color: var(--text);
}

a {
  color: var(--link);
}

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

.site-header {
  margin-bottom: 2rem;
  font-family: system-ui, sans-serif;
}

.site-header a {
  color: var(--text);
  text-decoration: none;
}

.site-header a:hover {
  text-decoration: underline;
}

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

/* Modular type scale, ratio 1.25 from the body size */
h1 {
  font-size: 1.95em;
}

h2 {
  font-size: 1.55em;
}

h3 {
  font-size: 1.25em;
}

/* More space above a heading than below binds it to its section */
h2,
h3 {
  margin-block: 2em 0.6em;
}

article {
  hyphens: auto;
  hyphenate-limit-chars: 6 3 2;
}

article .meta {
  font-family: system-ui, sans-serif;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

blockquote {
  margin-inline: 0;
  padding-inline-start: 1rem;
  border-inline-start: 3px solid var(--border);
}

pre {
  padding: 0.75rem 1rem;
  overflow-x: auto;
  background-color: var(--surface-muted);
  border-radius: 4px;
}

code {
  font-size: 0.875em;
  background-color: var(--surface-muted);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

pre code {
  padding: 0;
  background-color: transparent;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
}

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

.publication-list .author {
  font-size: 0.8125rem;
  font-family: system-ui, sans-serif;
  color: var(--text-muted);
}

.publication-list li {
  margin-block-end: 0.75rem;
}

.publication-list .description {
  margin-block: 0.1rem 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
