:root {
  --color-background: #ffffff;
  --color-text: #000000;
  --color-link: #006bbd;
  --color-block-background: #f8f8f8;
  --color-block-border: #ddd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #1d1f21;
    --color-text: #c5c8c6;
    --color-link: #81a2be;
    --color-block-background: #282a2e;
    --color-block-border: #373b41;
  }
}

body, nav {
  /*
   * system-ui is not supported by all browsers, but should be enough in the future.
   * Reference: https://github.com/jonathantneal/system-font-css
   * Currently following GitHub fonts configuration.
   * Reference: http://markdotto.com/2018/02/07/github-system-fonts/
   * Bootstrap is another good source.
   * Reference: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
   */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

code {
  font-family: "SFMono-Regular", Menlo, Consolas, "Roboto Mono", "Liberation Mono", Courier, monospace;
  font-size: 85%;
}

body {
  color: var(--color-text);
  background-color: var(--color-background);
  /* Maintain typography measure: https://en.wikipedia.org/wiki/Line_length */
  max-width: 50em;
  margin: auto;
  line-height: 1.5;
  /* Provide spacing for width lesser than maximum width. */
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 20px;
  hanging-punctuation: first last;
}

.menu-left {
  float: left;
  padding-right: 1em;
}

.menu-right {
  float: right;
  padding-left: 1em;
}

nav {
  margin-top: 20px;
  margin-bottom: 20px;
  font-size: 90%;
}

nav ul, nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta {
  margin-top: 30px;
  margin-bottom: 30px;
  text-align: center;
}

.title {
  font-size: 110%;
}

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

a:hover {
  text-decoration: underline;
}

pre, code {
  background: var(--color-block-background);
  border: 1px solid var(--color-block-border);
}

pre {
  border-radius: 4px;
  padding: 1em;
  overflow-x: auto;
}

code {
  border-radius: 3px;
  padding-right: 4px;
  padding-left: 4px;
  padding-top: 2px;
  padding-bottom: 2px;
}

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

blockquote {
  background: var(--color-block-background);
  border-left: 5px solid var(--color-block-border);
  padding: 3px 1em 3px;
}

table, th, td {
  border-collapse: collapse;
  border: 1px solid var(--color-block-border);
}

th, td {
  padding-left: 1em;
  padding-right: 1em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}

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

footer {
  margin-bottom: 64px;
}
