:root {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --border-color: #e0e0e0;
  --link-color: #0066cc;
  --link-hover: #004499;
  --link-visited: #551a8b;
  --syntax-datatype: #8f4e8b;
  --syntax-comment: #6a737d;
  --syntax-keyword: #1a1a1a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #000000;
    --text-color: #e8e8e8;
    --border-color: #404040;
    --link-color: #6eb5ff;
    --link-hover: #9fcdff;
    --link-visited: #d4a5ff;
    --syntax-datatype: #c792ea;
    --syntax-comment: #b0b0b0;
    --syntax-keyword: #e8e8e8;
  }
}

body {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding: 0 5vw;
  font-family: "Libre Baskerville", serif;
  background-color: var(--bg-color);
  color: var(--text-color);
}

.sitenav {
  display: flex;
  justify-content: space-between;
}

p {
  text-align: justify;
}

pre, code {
  font-family: "Fira Code", monospace;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  margin-left: auto;
  margin-right: auto;
  column-gap: 2rem;
}

.code {
  padding-bottom: 1rem;
  max-width: 100%;
  overflow: auto;
}

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

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

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

code span.dt { color: var(--syntax-datatype); }
code span.co { color: var(--syntax-comment); font-style: italic; }
code span.kw { color: var(--syntax-keyword); font-weight: bold; }

@media (max-width: 768px) {
  body {
    max-width: 100%;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 0.0rem;
    margin-bottom: 1rem;
  }

  .row > p {
    margin-bottom: 0;
  }

  .code {
    padding: 0;
  }
}
