:root{
  --page-background: #1d1d20;
  --page-text: #d2d8e1;
  --code-text: #dfac74;
  --code-background: #232328;
  --code-border: #454555;
  --link: #A793F0;
  --link-hover: #C47500;
  --heading: #d2d8e1;
  --heading-link: #d2d8e1;
  --heading-link-hover: #D0AC1F;
  --bullet: #8d8e9d;
  --footer-text: #8d8e9d;
  --table-border: #2e2c31;
  --table-header-background: #232328;
  --table-header-border: #363646;
  --post-info-text: #8d8e9d;
  --fig-caption-text: #aaafb7;
  --admonition-background: #24242b;
  --admonition-border: #707582;
  --admonition-text: #cac9c9;
}

@media (prefers-color-scheme:light) {  
  :root{
    --page-background: #f3f2f1;
    --page-text: #444;
    --code-text: #000;
    --code-background: #f6f6f6;
    --code-border: #bbb;
    --link: #004B6B;
    --link-hover: #6D4100;
    --heading: #222;
    --heading-link: #004B6B;
    --heading-link-hover: #6D4100;
    --bullet: #888;
    --footer-text: #888;
    --table-border: black;
    --table-header-background: #eee;
    --post-info-text: #555;
    --fig-caption-text: #585858;
    --admonition-background: #eaeaea;
    --admonition-border: #ccc;
    --admonition-text: #444;
  }
}

body {
  font-family: serif;
  font-size: 17px;
  color: var(--page-text);
  background: var(--page-background);
}

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

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

a.headerlink {
  color: var(--heading-link);
  text-decoration: none;
}
a.headerlink:hover {
  color: var(--heading-link-hover);
  text-decoration: underline;
}

main {
  max-width: 780px;
  margin: 30px auto;
}

h1, h2, h3, h4 {
  font-family: serif;
  font-weight: bold;
  color: var(--heading);
}

h1 {
  margin: 0 0 30px 0;
}

h2 {
  font-size: 26px;
  margin: 38px 0 10px 0;
}

h3 {
  font-size: 20px;
  margin: 24px 0 5px 0;
}

h4 {
  font-size: 19px;
  margin: 36px 0 5px 0;
}

.banner {
  font-size: 75px;
  margin: 30px 0 5px 0;
  text-align: center;
}

.banner a {
  text-decoration: none;
}

hr {
  color: var(--code-border);
  clear: both;
}

textarea, code, tt, pre {
  font-family: monospace;
  font-size: 14px;
  background: var(--code-background);
}
tt.docutils-literal {
  color: var(--code-text);
}

pre {
  padding: 8px 14px;
  margin: 15px 0;
  line-height: 1.3;
  border-style: solid;
  border-width: 1px;
  border-color: var(--code-border);
  overflow-x: scroll;
  scrollbar-width: none;
}

code, tt {
  padding: 1px 4px 1px 4px;
  border-style: solid;
  border-width: 1px;
  border-color: var(--code-border);
}

article img {
  margin: 15px 0 5px 0;
  max-width: 100%;
}
.figure img {
  margin: 0;
}
img.align-left {
  margin: 5px 10px 5px 0;
}
img.align-right {
  margin: 5px 0 5px 10px;
}
img.crisp {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

p {
  line-height: 1.5;
  margin: 17px 0 17px 0;
}

header.site-title {
  text-align: center;
  font-size: 24px;
  margin-bottom: 12px;
  /* font-weight: bolder; */
  color: var(--post-info-text);
}
header.site-title a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 15px 0;
  line-height: 1.4;
}
ul ul {
  margin: 0;
}
li {
  margin: 8px 0;
}

ol {
  line-height: 1.4;
  margin: 18px 0 15px 30px;
  padding: 0;
}


/* blockquote {
  margin: 0;
  font-style: italic;
  color: #444;
} */

footer {
  font-size: 13px;
  color: var(--footer-text);
  text-align: center;
  margin-top: 50px;
}

nav {
  text-align: center;
}

nav a {
  /* font-style: italic; */
  text-decoration: none;
  /* font-size: 20px; */
  padding: 10px;
}

nav ul {
  margin: 0;
  padding: 0;
}

nav li {
  list-style: none;
  display: inline;
  padding: 0;
  content: none;
}

table {
  border: 1px solid var(--table-border);
  border-collapse: collapse;
  margin: 15px 0;
}

td, th {
  border: 1px solid var(--table-border);
  padding: 4px 10px;
  text-align: left;
}

th {
  background: var(--table-header-background);
  border-color: var(--table-header-border);
  font-weight: normal;
}

td input {
  border: none;
  padding: 0;
}

table.archives, .archives td, .archives th {
  border: none;
}

.post-info {
  font-size: 15px;
  color: var(--post-info-text);
  font-style: italic;
}

time.modified {
  font-size: 0.8em;
}

article .archive {
  margin-top: 10px;
  margin-bottom: 10px;
}

.entry-content {
  margin-top: 20px;
  margin-bottom: 40px;
}

.entry-title a {
  text-decoration: none;
  margin: 15px 0 0 0;
}

.entry-title {
  font-family: serif;
  font-weight: bold;
  color: var(--heading);
  font-size: 30px;
  margin-bottom: 8px;
}

.entry-content h2 {
  margin: 40px 0 5px 0;
  color: var(--link);
}

.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.align-right {
  display: block;
  float: right;
}
.align-left {
  display: block;
  float: left;
}

figure, .figure {
  text-align: center;
  margin: 25px 0;
}

caption, .caption {
  font-size: 80%;
  color: var(--fig-caption-text);
  margin-top: 8px;
}

.admonition {
  background-color: var(--admonition-background);
  color: var(--admonition-text);
  font-style: italic;
  font-size: 90%;
  padding: 2px 12px;
  padding-bottom: 3px;
  margin: 8px 0;
  border-left: 2px solid var(--admonition-border);
}

.admonition > * {
  margin: 10px 0;
}

.admonition-title {
  border-bottom: 1px solid var(--admonition-border);
  padding-bottom: 2px;
}

aside, .aside {
  font-size: 0.85em;
  font-style: italic;
  color: rgb(237, 106, 237);  /*so I don't forget to turn these into footnotes.*/
}

.topic-title {
  font-weight: bold;
}
.contents ul {
  margin: 0;
}
.contents a {
  text-decoration: none;
}

table.archive {
  border: none;
}
table.archive td, table.archive th {
  border: none;
  padding: 2px 5px;
}
td.archive-date {
  text-align: right;
}
td.archive-category {
  font-size: 70%;
  color: var(--post-info-text);
  font-weight: bold;
  overflow: hidden;
}

footer a {
  color: var(--footer-text);
}

blockquote {
  color: var(--post-info-text);
  font-style: italic;
}

iframe {
  border: none;
}

a.footnote-reference {
  text-decoration: none;
  padding-left: 1px;
}
a.footnote-reference sup {
  text-decoration: underline;
}
sup, sub {
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
}
sub { 
  top: 0.4em; 
}

:target > :first-child {
  border: 2px dotted var(--code-border);
  padding: 2px;
}


.footnotes {
  font-size: 85%;
}
.footnotes dt {
  float: left;
}
.footnotes dd {
  margin-top: 10px;
  margin-bottom: 8px;
}

/* .footnotes dt a {
  position: relative;
  top: 23px;
} */
/* .footnotes dd {
  position: relative;
  top: -23px;
} */