@font-face {
  font-family: "Crimson Pro";
  src: url("/fonts/CrimsonPro-VariableFont_wght.ttf");
}

:root {
  --bg-color: #ffffff;
  --fg-color: #000000;

  --content-width: 800px;

  --toc-width: 170px;
  --toc-bar-extension: 70px;

  --std-padding: 20px;
  --site-title-padding: 40px;
  --bottom-pad: 150px;

  font-family: "Crimson Pro", serif;
  font-optical-sizing: auto;
  font-style: normal;

  background-color: var(--bg-color);
  color: var(--fg-color);

  height: 100%;
}

body {
  display: flex;
  justify-content: center;

  margin: 0px;
}

.page-content {
  width: calc(100% - (2 * var(--std-padding)));
  max-width: var(--content-width);

  padding-bottom: var(--bottom-pad);
}

.vertical {
  display: grid;
  grid-auto-flow: row;

  height: fit-content;
  width: calc(100% - (2 * var(--std-padding)));

  padding-left: var(--std-padding);
  padding-right: var(--std-padding);

  /* allow code blocks to scroll in articles */
  pre {
    overflow-x: scroll;
  }
}

.horizontal {
  display: grid;
  grid-auto-flow: column;
}

.article-spread {
  grid-template-columns: var(--toc-width) 1fr;
  grid-auto-flow: row;
}
@media (max-width: 650px) {
  /* phone screen */
  .article-spread {
    grid-template-columns: 1fr;
  }

  .vertical {
    padding-right: 0;
    padding-left: 0;
    width: 100%;
  }
}

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

.site-title {
  text-decoration: none;
  margin-bottom: var(--site-title-padding);
  margin-top: var(--site-title-padding);
}

.title {
  margin-top: 0px;
}

.table-of-contents {
  border-right: 1px solid var(--fg-color);
  row-gap: calc(var(--std-padding) / 2);

  padding-left: 0px;
  width: calc(100% - var(--std-padding));

  /*
  extend the bar on the right edge of the
  table of contents
  */
  padding-bottom: var(--toc-bar-extension);
}

p,ul {
  margin-top: 10px;
  margin-bottom: 10px;
  line-height: 1.5em;
}

h1,h2,h3,h4,h5 {
  margin-top: 3px;
  margin-bottom: 3px;
}

.footnote-reference {
  position: absolute;
}

.footnote-reference a {
  position: relative;
  top: -0.5em;
}

.nodisplay {
  /* credit: https://spencermortensen.com/articles/email-obfuscation/ */
  display: none;
}
