@charset "UTF-8";

:root {
    --foreground: #111;
    --secondary: #333;
    --background: #fefefe;
    transition: all 1s;
}

@media (prefers-color-scheme: dark) {
    :root {
        --foreground: #eee;
        --secondary: #ccc;
        --background: #000;
    }
}

* {
  box-sizing: border-box;
}

/* Tufte CSS styles */

body {
  overflow-wrap: break-word;
  font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
  background-color: var(--background);
  color: var(--foreground);
  counter-reset: sidenote-counter;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-weight: 400;
  margin: 0.75rem 0 0 0;
  font-size: 3.2rem;
}

h2 {
  font-style: italic;
  font-weight: 400;
  margin-top: 2.1rem;
  margin-bottom: 0;
  font-size: 2.2rem;
}

h3 {
  font-style: italic;
  font-weight: 400;
  font-size: 1.7rem;
  margin-top: 2rem;
  margin-bottom: 0;
}

p.subtitle {
  font-style: italic;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  display: block;
}

.numeral {
  font-family: et-book-roman-old-style;
}

.danger {
  color: red;
}

article {
  position: relative;
  padding: 5rem 0rem;
}

section {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

p,
ol,
ul {
  line-height: 140%;
  font-size: 1.3rem;
}

p {
  margin-top: 1.4rem;
  margin-bottom: 1.4rem;
  padding: 0 0.75rem;
  vertical-align: baseline;
}

@media screen and (min-width: 760px) {
  p {
    text-align: justify;
  }
}

h1,
h2,
h3 {
  padding: 0 0.5rem;
}

blockquote {
  font-size: 1.4rem;
  border-left: 1px solid var(--foreground);
  margin: 0;
}

blockquote footer {
  font-size: 1.1rem;
  text-align: right;
}

ol,
ul {
  -webkit-padding-start: 5%;
  padding-left: 2em;
}

li {
  padding: 0.5rem 0;
}

a,
a:link,
a:visited {
  color: inherit;
}

a:link {
  text-decoration: none;
  background: linear-gradient(var(--background), var(--background)), linear-gradient(var(--background), var(--background)), linear-gradient(var(--secondary), var(--secondary));
  background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
  background-repeat: no-repeat, no-repeat, repeat-x;
  background-position: 0% 93%, 100% 93%, 0% 93%;
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {
  a:link {
    background-position-y: 87%, 87%, 87%;
  }
}

::selection {
  background: #ff0000;
  color: #fff;
}


/* Sidenotes, margin notes, figures, captions */

img {
  max-width: 100%;
  object-fit: contain;
  display: block;
}

img.crisp-edges {
  image-rendering: crisp-edges;
}

.sidenote,
.marginnote {
  float: right;
  clear: right;
  margin-right: -60%;
  width: 50%;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1.1rem;
  line-height: 1.3;
  vertical-align: baseline;
  position: relative;
}

.table-caption {
  float: right;
  clear: right;
  margin-right: -60%;
  width: 50%;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1.0rem;
  line-height: 1.6;
}

.sidenote-number {
  counter-increment: sidenote-counter;
}

.sidenote-number:after,
.sidenote:before {
  content: counter(sidenote-counter) " ";
  font-family: et-book-roman-old-style;
  position: relative;
  vertical-align: baseline;
}

.sidenote-number:after {
  content: counter(sidenote-counter);
  font-size: 1rem;
  top: -0.5rem;
  left: 0.1rem;
}

.sidenote:before {
  content: counter(sidenote-counter) " ";
  top: -0.5rem;
}

.gist,
p,
footer,
table,
div.table-wrapper-small,
div.supertable-wrapper>p,
div.booktabs-wrapper,
figure {
  max-width: 760px;
}

div.fullwidth,
p.fullwidth,
table.fullwidth {
  width: 100%;
}

div.table-wrapper {
  overflow-x: auto;
  font-family: "Trebuchet MS", "Gill Sans", "Gill Sans MT", sans-serif;
}

table {
  border-collapse: collapse;
  border: 1px solid var(--foreground);
  margin: 0.75rem;
  font-variant-numeric: tabular-nums lining-nums;
}
table th, tr:nth-child(2n) {
  border-bottom: 1px solid var(--foreground);
}
table td, table th {
  border-right: 1px solid var(--foreground);
}

@media screen and (max-width: 760px) {
  body {
    padding-left: 0;
  }
  figure {
    max-width: 100%;
  }
  figcaption,
  figure.fullwidth figcaption {
    margin-right: 0%;
    max-width: none;
  }
  blockquote p,
  blockquote footer {
    width: 100%;
  }
}

.sans {
  font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
  letter-spacing: .03em;
}

pre {
  overflow-x: scroll;
  padding: 0 0.75rem;
}

pre::-webkit-scrollbar {
  display: none;
}

pre code,
.code {
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  line-height: 1.6;
  word-wrap: normal;
}

h1 .code,
h2 .code,
h3 .code {
  font-size: 0.80em;
}

.marginnote .code,
.sidenote .code {
  font-size: 1rem;
}

pre code,
pre.code {
  overflow-x: auto;
}

code {
  font-size: 0.8em;
}

.fullwidth {
  max-width: 100%;
  clear: both;
}

span.newthought {
  font-variant: small-caps;
  font-size: 1.2em;
}

input.margin-toggle {
  display: none;
}

label.sidenote-number {
  display: inline;
}

label.margin-toggle:not(.sidenote-number) {
  display: none;
}

@media (max-width: 760px) {
  label.margin-toggle:not(.sidenote-number) {
    display: inline;
  }
  .sidenote,
  .marginnote {
    display: none;
  }
  .margin-toggle:checked + .sidenote,
  .margin-toggle:checked + .marginnote {
    display: block;
    float: left;
    left: 1rem;
    clear: both;
    width: 95%;
    margin: 1rem 2.5%;
    vertical-align: baseline;
    position: relative;
  }
  label {
    cursor: pointer;
  }
  pre.code,
  pre code {
    width: 100%;
    padding: 0;
  }
  .table-caption {
    display: block;
    float: right;
    clear: both;
    width: 98%;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    margin-left: 1%;
    margin-right: 1%;
    vertical-align: baseline;
    position: relative;
  }
  div.table-wrapper {
    border-right: 1px solid var(--foreground);
  }
}

.container {
  display: flex;
  flex-direction: column;
}

.container>header>h2 {
  text-decoration: none;
  font-size: 69px;
  border-left: none;
}

.container>header a {
  display: block;
  color: inherit;
  font-weight: 700;
}

.container>header>h2 a {
  background: none;
}

.nav {
  padding-bottom: 1em;
}
nav {
  display: flex;
  justify-content: start;
  line-height: 40px;
}
nav>a {
  font-size: 28px;
  margin: 0 5px;
}

.content, header>h2,nav, .footer {
  max-width: 1100px;
  display: block;
  margin: 0 auto;
  width: 100%;
}
.footer {
  border-top: 1px solid var(--foreground);
}

ul.posts {
  list-style: none;
  padding-left: 0.5rem;
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--foreground);
}

.glslCanvas {
  width: 100vmin;
  height: 100vmin;
}
.book {
  border-left: 1px solid var(--foreground);
}
.book a:link {
  background: none;
}
