@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: local('Roboto Mono'), local('RobotoMono-Regular'),
      url(https://fonts.gstatic.com/s/robotomono/v5/L0x5DF4xlVMF-BfR8bXMIjhLq3-cXbKD.woff2) format('woff2');
}

html, html[data-theme="light"] {
  --main-text-color: #444;
  --pop-text-color: #000;
  --faint-text-color: #aaa;
  --main-background-color: #ffffff;
  --tint-background-color: #e6e5e2;
  --code-background-color: #e6e5e2;
  --link-color: #6275b4;
  --link-visited-color: #7a71e2;
  --accent-color: #2b3f60;
  --alt-accent-color: #344e77;
  --title-text-color: #fff;
}

html[data-theme="dark"] {
  --main-text-color: #bec7c7;
  --pop-text-color: #eff1ea;
  --faint-text-color: #9d9fa7;
  --main-background-color: #31313b;
  --tint-background-color: #4f5062;
  --code-background-color: #d5dbe3;
  --link-color: #9aaef8;
  --link-visited-color: #a196e2;
  --accent-color: #4a6da5;
  --alt-accent-color: #5682c5;
  --title-text-color: #fff;
}

@media (prefers-color-scheme: dark) {
  html, html[data-theme="dark"] {
    --main-text-color: #bec7c7;
    --pop-text-color: #eff1ea;
    --faint-text-color: #9d9fa7;
    --main-background-color: #31313b;
    --tint-background-color: #4f5062;
    --code-background-color: #d5dbe3;
    --link-color: #9aaef8;
    --link-visited-color: #a196e2;
    --accent-color: #4a6da5;
    --alt-accent-color: #5682c5;
    --title-text-color: #fff;
  }
  html[data-theme="light"] {
    --main-text-color: #444;
    --pop-text-color: #000;
    --faint-text-color: #aaa;
    --main-background-color: #f7f6f2;
    --tint-background-color: #e6e5e2;
    --code-background-color: #e6e5e2;
    --link-color: #6275b4;
    --link-visited-color: #7a71e2;
    --accent-color: #2b3f60;
    --alt-accent-color: #344e77;
    --title-text-color: #fff;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  background-color: var(--main-background-color);
  color: var(--main-text-color);
  height: 100%;
}

body {
  margin: 0;
  font: 18px "Open Sans", "Helvetica neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  width: 100%;
}


.theme-toggle {
  opacity: 0.4;
  position: fixed;
  top: 0;
  right: 0;
  cursor: pointer;
  padding: 8px;
  z-index: 999;
}

.theme-toggle:hover {
  opacity: 0.8;
}



a, a:link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: bold;
}

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

a:hover {
  text-decoration: underline;
}

a[target="_blank"]:not([href*="https://en.wikipedia.org/wiki/"]):after {
  content: url(/external_link.png);
  margin: -8px -2px 0 1px;
  vertical-align: super;
  display: inline-block;
}

a[href*="https://en.wikipedia.org/wiki/"]:after {
  content: url(/wiki.png);
  margin: -8px -2px 0 1px;
  vertical-align: super;
  display: inline-block;
}

h1, h2, h3, h4, h5 {
  font-weight: bold;
  margin-bottom: .7em;
  margin-top: 2em;
  color: var(--pop-text-color) !important;
}

h3, h4, h5 {
  margin-top: 1em;
}

h1 { font-size: 200%; }
h2 { font-size: 140%; }
h3 { font-size: 120%; }
h4 { font-size: 110%; }
h5 { font-size: 100%; }

h1 a, h2 a, h3 a, h4 a, h5 a {
  color: var(--pop-text-color) !important;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover {
  text-decoration: none;
}


.page-header {
  text-align: left;
  background-color: var(--accent-color);
  position: relative;
  padding: 0;
  margin: 0;
  display: flex;
}

  .header-title {
    margin-top: 5px;
    margin-left: 25px;
    margin-right: 145px;
    margin-bottom: 5px;
    display: block;
    text-align:left;
    font-weight: 700;
    color: var(--title-text-color);
    text-shadow: 2px 2px 5px #111;
    font-size: 28px;
  }
  
  .header-title a {
    color: var(--title-text-color);
  }
  
  .header-title a:hover {
    text-decoration: none;
    color: var(--title-text-color);
  }

  a.navlink {
    padding: 12px;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    display: inline-block;
    height: 100%;
  }

  a.navlink {
    color: var(--title-text-color);
  }

  a.navlink:hover {
    background-color: white;
    color: black;
    text-decoration: none;
  }


.content {
  padding: 0;
  position: relative;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: flex-end;
  max-width: 1350px;
}



.prev-next {
  display: flex;
  justify-content: space-between;
  font-style: italic;
  color: var(--faint-text-color);
  text-align: left;
  margin-top: 0px;
  margin-left: -8px;
  padding: 0;
}

  .prev-next a {
    color: var(--faint-text-color);
  }


iframe {
  border: none;
  /*box-shadow: 2px 2px 10px rgba(71, 51, 31, 0.4);*/
  padding: 15px;
  margin: 0;
  background: white;
  /*margin-bottom: 10px;*/
}


article {
  flex: 0 1 750px;
  max-width: 750px;
  padding: 8px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--faint-text-color);
}



article .featured-image-wrapper {
  max-height: 150px;
  overflow: hidden;
  margin-top: 30px;
  margin-bottom: 0px;
  margin-left: 0px;
  margin-right: 0px;
  padding: 0;
}

article .featured-image {
  width: 100%;
}



article h1 {
  /*border-left: 12px solid #ed7670;*/
  /*padding-left: 10px;*/
  /*margin-left: -16px;*/
  margin-top: .3em;
}

article h2 {
  border-left: 12px solid var(--accent-color);
  padding-left: 10px;
  margin-left: -16px;
}



article img:not(.featured-image) {
  max-width: 80%;
  max-height: 60vh;
  margin-left: auto;
  margin-right: auto;
  display: block;
}



p {
  margin-top: 0;
  margin-bottom: 1.5em;
}

blockquote {
  font-style: italic;
  margin: 10px;
  padding: 10px;
  background: #f0f0f8;
  text-align: center;
}

blockquote p {
  margin-bottom: 0;
}


.author {
  color: var(--faint-text-color);
  margin-top: -1.5em;
  margin-bottom: 1em;
}

.date {
  color: var(--faint-text-color);
  margin-top: -1.3em;
  margin-bottom: 1em;
}


.asidebar {
  flex: 0 0 300px;
}

  aside {
    margin-top: .7em;
    margin-bottom: .7em;
    color: #868279;
    background-color: #f9f7f7;
    padding: 8px;
    box-shadow: 2px 2px 7px rgba(0,0,0,.2);
    position: absolute;
    width: 300px;
    border-left: 6px solid #B8B8B0;
    right: 0;
    z-index: 999;
  }


pre.sourceCode {
  background-color: var(--code-background-color);
  padding: 8px;
}

pre code {
  background-color: transparent;
  padding: 0;
  border: none;
}

code {
  background-color: var(--code-background-color);
  color: #444;
  padding: 2px;
  border-right: 2px solid #e0e0e0;
  border-bottom: 2px solid #e0e0e0;
}

code:not(.sourceCode) {
  padding-left: 4px;
  padding-right: 4px;
  border-radius: 2px;
}

td, th {
  margin: 0px;
  padding: 2px 12px 2px 12px;
}
th {
  background-color: var(--tint-background-color);
}
table, th, td {
  border: 1px solid var(--faint-text-color);
  border-collapse: collapse;
}

noscript {
  background: #af1703;
  color: white;
  padding: 5px;
  border-radius: 3px;
}



.next-page {
  margin-bottom: .7em;
  margin-top: .2em;
  font-size: 140%;
  text-align: center;
}



.page-footer {
  width: 100%;
  padding: 10px;
  text-align: center;
  color: var(--faint-text-color);
  font-style: italic;
}

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


.collapsed {
  display: none;
}

.collapsed:target {
  display: inline;
}

@media screen and (max-width: 1065px) {
  .content {
    display: block;
  }

  article {
    margin-left: auto;
    margin-right: auto;
  }

  .asidebar {
    display: none;
  }

  aside {
    position: relative;
    right: auto;
    left: auto;
    width: auto;
  }
}


@media screen and (max-width: 700px) {
  .page-header {
    flex-direction: column;
    text-align: center;
  }

  .header-title {
    margin-top: 0px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    font-size: 28px;
  }

  .navlinks {
    background-color: var(--alt-accent-color);
  }

  a.navlink {
    padding: 4px;
  }

  .prev-next {
    flex-direction: column;
    text-align: center;
    margin-top: 0;
  }

  h1, h2, h3, h4, h5 {
    margin-top: .2em;
  }

  article h2 {
    margin-left: -8px;
  }

  iframe {
    margin-bottom: 0px;
  }
}
