:root {
  --paper: #ffffff;
  --ink: #000000;
  --muted: #000000;
  --c-url: #000000;
}

* {
  box-sizing: border-box;
}

/* Scale the whole rem-based layout up with the screen */
@media (min-width: 1440px) {
  html {
    font-size: 18px;
  }
}

@media (min-width: 1920px) {
  html {
    font-size: 21px;
  }
}

@media (min-width: 2560px) {
  html {
    font-size: 24px;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Computer Modern Serif", Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

.paper {
  width: min(44rem, calc(100% - 2.4rem));
  margin: 2.2rem auto 3rem;
}

.paper p {
  margin: 0.55rem 0 0;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ---- front matter ---- */

.title {
  margin: 2.1rem auto 0;
  max-width: 36rem;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.28;
  text-align: center;
}

.contact {
  margin: 0.55rem 0 0;
  text-align: center !important;
  font-family: "Computer Modern Typewriter", "Courier New", monospace;
  font-size: 0.88rem;
}

.contact.links {
  margin-top: 0.2rem;
  color: var(--muted);
}

.contact.links a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.intro {
  margin-top: 1.25rem;
}

.reachout {
  margin-top: 1.25rem !important;
}

/* ---- sections ---- */

section {
  margin-top: 0;
}

h2 {
  margin: 0.9rem 0 0;
  font-size: 1.16rem;
  font-weight: 400;
}

h3 {
  margin: 0.45rem 0 0;
  font-size: 1.03rem;
  font-weight: 400;
}

ul {
  margin: 0.25rem 0 0;
  padding-left: 1.5rem;
}

li {
  margin-top: 0.2rem;
}

/* ---- links, hyperref style: colored, no underline ---- */

a {
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  outline: none;
}

a.url {
  color: var(--c-url);
}

a.url i {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.intro-emphasis {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ---- small screens ---- */

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .paper {
    width: min(100%, calc(100% - 1.6rem));
    margin-top: 1.5rem;
  }

  .paper p {
    text-align: left;
  }

  .title {
    font-size: 1.32rem;
  }
}
