:root {
  --body-background: #FDFBFA;
  --body-foreground: #0A1E26;
  --selection-background: #E5B58B60;
  --link-foreground: #D97F30;
  --quote-border: #000000;
  --h1-underline: #424242;
  --tr-alt-background: #f5f5f5;
}

body {
  background: var(--body-background);
  color: var(--body-foreground);
  font-family: sans-serif;
  font-size: 1.2em;
  line-height: 1.62;
  margin: 1em auto;
  max-width: 40em;
  padding: 0 0.62em;
}

h1, h2, h3 {
  line-height: 1.2;
}

header h1::after {
  content: "";
  border-bottom: 2px solid var(--h1-underline);
  display: inline-flex;
  margin-bottom: -2px;
  width: 16px;
  animation-iteration-count: infinite;
  animation-name: blink;
  animation-timing-function: steps(2);
  animation-duration: 1.5s;
}

@keyframes blink {
  0% {
      opacity: 0
  }
}

a {
  font-weight: bold;
  text-decoration: none;
  color: var(--link-foreground);
}

img {
  border: 0;
  display: block;
  margin: 40px auto;
  max-width: 100%;
}

blockquote {
  border-left: 1px solid var(--quote-border);
  font-style: italic;
  padding-left: 16px;
}

pre {
  border: solid 1px;
  border-radius: 4px;
  font-size: 0.8em;
  overflow-x: auto;
  padding: 1ch;
  white-space: pre;
}

li p {
  margin-top: 0;
  margin-bottom: 0;
}

table {
  width: 100%;
}

th, td {
  padding: 4px;
}

tr:nth-child(even) {
    background-color: var(--tr-alt-background);
}

::selection {
  background-color: var(--selection-background);
}

@media (prefers-color-scheme: dark) {
  :root {
  --body-background: #0A1E26;
  --body-foreground: #FDFBFA;
  --selection-background: #D97F3060;
  --link-foreground: #F2AE72;
  --quote-border: #000000;
  --h1-underline: #EDEDED;
  --tr-alt-background: #212121;
  }
}

@media print {
  body {
    max-width: none;
  }
}
