:root {
  --paper-bg: #f8f6f1;
  --ink: #1c1c1c;
  --ink-muted: #3d3d3d;
  --rule: #c4c0b8;
  --accent: #6b2f2a;
  --accent-tint: rgba(107, 47, 42, 0.07);
  --ink-faint: #7a756c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper-bg: #171614;
    --ink: #e8e3d8;
    --ink-muted: #b9b2a5;
    --rule: #3d3a35;
    --accent: #d08a80;
    --accent-tint: rgba(208, 138, 128, 0.12);
    --ink-faint: #85806f;
  }
}

/* faint paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.32 0 0 0 0 0.28 0 0 0 0.09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main {
  position: relative;
  z-index: 1;
}

::selection {
  background: var(--accent);
  color: var(--paper-bg);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background: var(--paper-bg);
  color: var(--ink);
  font-family: "Old Standard TT", "Times New Roman", Times, serif;
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: oldstyle-nums;
}

main {
  min-height: 100vh;
}

.page {
  position: relative;
}

.page {
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  padding: 2.5rem 2.5rem;
}

h1,
h2,
p {
  margin: 0;
}

.mark {
  position: absolute;
  right: 0;
  top: 0.35rem;
  width: 3.4rem;
  height: auto;
  color: var(--rule);
  opacity: 0.95;
}

.masthead:hover .mark {
  color: var(--accent);
}

.masthead {
  position: relative;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 3px double var(--rule);
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.affiliation {
  margin-top: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.9em;
  line-height: 1.5;
}

.latex-section {
  margin-top: 1.5em;
  margin-bottom: 0.4em;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.latex-section::before {
  content: "\00a7";
  margin-right: 0.45em;
  color: var(--accent);
  font-weight: 400;
}

.latex-link {
  color: var(--accent);
  border-bottom: 1px solid rgba(107, 47, 42, 0.45);
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.latex-link:hover {
  border-bottom-color: var(--accent);
  background-color: var(--accent-tint);
}

.latex-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sep {
  margin: 0 0.5rem;
  color: var(--ink-muted);
}

.links {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.links nav {
  font-size: 17px;
  line-height: 1.625;
}

.bio {
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
}

.bio p + p {
  margin-top: 1.25rem;
}

.lead {
  font-weight: 700;
}


.more {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.more nav {
  font-size: 16px;
  line-height: 1.625;
}

.colophon {
  margin-top: 2rem;
  color: var(--ink-faint);
  font-size: 0.78em;
  font-style: italic;
  letter-spacing: 0.01em;
}

@media (min-width: 768px) {
  .page {
    padding: 4rem 5rem;
  }

  h1 {
    font-size: 2.75rem;
  }

  .links nav {
    font-size: 18px;
  }

  .bio {
    font-size: 19px;
  }

  .more nav {
    font-size: 17px;
  }
}
