*, *:before, *:after {
  box-sizing: border-box;
}

/* make sure to update website footer when adding new colors */
:root {
  --bgColor: #f1e5fc;
  --bodyColor: #440e74;
  --strongColor: #69408d;
  --fadeColor: #8359a2;
  --faintFadeColor: rgb(248.4251279812, 244.415059761, 251.384940239);
  --accentColor: #e6e632;
  --faintAccentColor: rgb(253.8869565217, 253.8869565217, 128.1130434783);
}

::selection {
  background-color: var(--accentColor);
}

html {
  font-size: 15pt;
  min-height: 100%;
  position: relative;
}

body {
  height: 100%;
  background-color: var(--bgColor);
  font-family: "Nunito", sans-serif;
  margin: 0;
  color: var(--bodyColor);
}

.grid {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 5000;
  background-image: linear-gradient(transparent 93%, rgba(0, 0, 0, 0.3) 93%, rgba(0, 0, 0, 0.3));
  background-size: 0.75rem 0.75rem;
  pointer-events: none;
}
.grid.hidden {
  display: none;
}

header {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 60rem;
  max-width: 100%;
  margin: 0 auto;
}
header h1.title {
  margin: 0;
  line-height: 4.5rem;
  color: var(--strongColor);
  font-size: 1.8rem;
  padding: 0 1.5rem;
}
header h1.title a {
  text-decoration: none;
  color: var(--strongColor);
  text-decoration: none;
  background-image: linear-gradient(transparent 72.5%, var(--accentColor) 72.5%, var(--accentColor) 92.5%, transparent 92.5%);
}
header h1.title a:hover {
  background-image: linear-gradient(transparent 0%, var(--accentColor) 0%, var(--accentColor) 92.5%, transparent 92.5%);
}
header h2.subtitle {
  font-size: 1.4rem;
  font-weight: 300;
  font-style: italic;
  color: var(--fadeColor);
  line-height: 1.5rem;
  padding: 0 1.5rem;
}
header img {
  height: 80%;
  margin: 0 0.75rem;
}

main {
  width: 60rem;
  max-width: 100%;
  margin: 6rem auto 3rem;
}

article {
  padding: 3rem;
  border-radius: 0.3rem;
  margin: 1.5rem 0 0;
}
article date {
  font-size: 0.9rem;
  height: 1.5rem;
  line-height: 1.5rem;
  display: block;
  font-weight: 400;
}
article date a {
  color: var(--strongColor);
  text-decoration: none;
  background-image: linear-gradient(transparent 72.5%, var(--accentColor) 72.5%, var(--accentColor) 92.5%, transparent 92.5%);
}
article date a:hover {
  background-image: linear-gradient(transparent 0%, var(--accentColor) 0%, var(--accentColor) 92.5%, transparent 92.5%);
}
article date a {
  color: inherit;
  background-image: none;
}
article date a:hover {
  background-image: linear-gradient(transparent 72.5%, var(--accentColor) 72.5%, var(--accentColor) 92.5%, transparent 92.5%);
}
article h1 {
  font-size: 2.6rem;
  margin: 1.5rem 0 0;
  line-height: 3rem;
  color: var(--strongColor);
}
article h1 a {
  color: var(--strongColor);
  text-decoration: none;
  background-image: linear-gradient(transparent 72.5%, var(--accentColor) 72.5%, var(--accentColor) 92.5%, transparent 92.5%);
}
article h1 a:hover {
  background-image: linear-gradient(transparent 0%, var(--accentColor) 0%, var(--accentColor) 92.5%, transparent 92.5%);
}
article h1 a {
  background-image: none;
}
article h1 a:hover {
  background-image: linear-gradient(transparent 72.5%, var(--accentColor) 72.5%, var(--accentColor) 92.5%, transparent 92.5%);
}
article h2 {
  font-size: 1.4rem;
  font-weight: 300;
  font-style: italic;
  color: var(--fadeColor);
  line-height: 1.5rem;
  margin: 0.75rem 0 1.5rem;
}
article h3 {
  line-height: 1.5rem;
  margin: 1.5rem 0;
  font-size: 1.3rem;
  color: var(--strongColor);
}
article h4 {
  line-height: 1.5rem;
  margin: 0.75rem 0;
  font-size: 1rem;
  color: var(--strongColor);
}
article p {
  line-height: 1.5rem;
  margin: 0.75rem 0 0;
  color: var(--bodyColor);
}
article p sup {
  height: 0.75rem;
  margin-top: -1.5rem;
  display: inline-block;
}
article blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.5rem;
  border-left: 0.2rem solid var(--fadeColor);
  color: var(--fadeColor);
  font-style: italic;
}
article blockquote p {
  margin: 0;
}
article code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
  color: var(--strongColor);
  word-wrap: break-word;
}
article pre {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
  line-height: 1.5rem;
  max-width: 100%;
  overflow-x: auto;
  margin: calc(1.5rem - 2px) 0;
  border: 2px solid var(--fadeColor);
  padding: 0.75rem 1.5rem;
  /* override the background color set by goldmark/chroma */
  /* remember to update dark mode with invert() of this */
  background-color: var(--faintFadeColor) !important;
}
article pre code {
  font-size: 1em;
  line-height: 1.5rem;
  display: block;
  color: inherit;
  width: fit-content;
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
}
article figure {
  margin: calc(1.5rem - 2px) auto calc(1.5rem - 2px);
  border: 2px solid var(--fadeColor);
  padding: calc(0.75rem - 2px);
  padding-bottom: 0;
  width: fit-content;
  max-width: 100%;
  background: var(--faintFadeColor);
}
article figure img {
  width: 100%;
  display: block;
  max-width: 30rem;
  object-fit: contain;
  margin: 0 auto 0.75rem;
  border: 2px solid var(--fadeColor);
}
article figure .twitter-tweet {
  margin-left: auto;
  margin-right: auto;
}
article figure figcaption {
  margin: 0.75rem 0;
  line-height: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}
article figure figcaption p {
  margin: 0;
  font: inherit;
  color: inherit;
}
article section.content a {
  color: var(--strongColor);
  text-decoration: none;
  background-image: linear-gradient(transparent 72.5%, var(--accentColor) 72.5%, var(--accentColor) 92.5%, transparent 92.5%);
}
article section.content a:hover {
  background-image: linear-gradient(transparent 0%, var(--accentColor) 0%, var(--accentColor) 92.5%, transparent 92.5%);
}
article section.content ul, article section.content ol {
  color: var(--bodyColor);
  margin: 1.5rem 0;
  padding: 0 0 0 1.5rem;
  line-height: 1.5rem;
}
article section.content ul ul, article section.content ul ol, article section.content ol ul, article section.content ol ol {
  margin: 0;
}
article section.content ul li {
  list-style: none;
  position: relative;
}
article section.content ul li:before {
  content: "·";
  height: 1.5rem;
  width: 1.5rem;
  display: block;
  position: absolute;
  top: 0;
  left: -1.5rem;
  text-align: center;
  line-height: 1.5rem;
  font-weight: bold;
  color: var(--strongColor);
}
article li pre {
  margin: 1.5rem 0;
}
article a.load-content {
  display: block;
  height: 1.5rem;
  margin: 1.5rem 0;
  width: fit-content;
  line-height: 1.5rem;
  color: var(--strongColor);
  text-decoration: none;
  background-image: linear-gradient(transparent 72.5%, var(--accentColor) 72.5%, var(--accentColor) 92.5%, transparent 92.5%);
}
article a.load-content:hover {
  background-image: linear-gradient(transparent 0%, var(--accentColor) 0%, var(--accentColor) 92.5%, transparent 92.5%);
}
article a.load-content {
  font-weight: 500;
  text-align: center;
  text-decoration: none;
}
article a.load-content.back-home {
  margin: 1.5rem auto;
}
article hr {
  margin: calc(3rem - 2px) 1.5rem 1.5rem;
  border: 2px solid var(--fadeColor);
}
article .mastodon-embed, article .youtube-embed {
  display: block;
  border: 2px solid var(--fadeColor);
  margin: 0 0 calc(0.75rem - 2px);
  max-width: 100%;
  width: 30rem !important;
}
article .youtube-embed {
  aspect-ratio: 16/9;
}

aside {
  border: 2px solid var(--accentColor);
  background-color: var(--faintAccentColor);
  margin: 0.75rem 0;
  padding: calc(0.75rem - 2px) 1.5rem;
  line-height: 1.5rem;
}
aside p:first-child {
  margin-top: 0;
}

footer {
  text-align: center;
  padding: 0;
}
footer p {
  margin: 0.75rem 0;
}
footer p a {
  color: var(--strongColor);
  text-decoration: none;
  background-image: linear-gradient(transparent 72.5%, var(--accentColor) 72.5%, var(--accentColor) 92.5%, transparent 92.5%);
}
footer p a:hover {
  background-image: linear-gradient(transparent 0%, var(--accentColor) 0%, var(--accentColor) 92.5%, transparent 92.5%);
}
footer p a {
  display: inline-block;
  margin: 0 0.375rem;
}
footer .colors {
  margin: 0.75rem 0 1.5rem;
  height: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
footer .colors div {
  height: 1.125rem;
  width: 1.125rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bgColor: #40304d;
    --bodyColor: #ba9ed3;
    --strongColor: #f1e5fc;
    --fadeColor: #99b;
    --faintFadeColor: rgb(85, 85, 127.5);
    --accentColor: #96960a;
    --faintAccentColor: rgb(69.93125, 69.93125, 13.56875);
  }
  article pre {
    filter: invert(100%);
    color: #0e1a03;
    /* override the background color set by goldmark/chroma */
    background-color: rgb(170, 170, 127.5) !important;
    border-color: #666644;
  }
  article pre::selection, article pre ::selection {
    background-color: #45612c;
    color: #bfcfb2;
  }
  article pre span {
    filter: brightness(80%);
  }
}
@media (max-width: 500px) {
  html {
    font-size: 13pt;
  }
  header {
    height: 9rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    text-align: center;
  }
  main {
    margin: 1.5rem 0;
  }
  article {
    padding: 1.5rem;
  }
  article date {
    font-size: 0.75rem;
  }
  article h1 {
    font-size: 1.5rem;
    line-height: 1.5rem;
    margin: 1.5rem 0 0;
  }
  article h2 {
    font-size: 1rem;
  }
  article pre {
    margin: 1.5rem 0;
    padding: 0.75rem 1.125rem;
  }
}
body.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  font-size: 20px;
  text-align: center;
}
body.error-page a {
  color: var(--strongColor);
  text-decoration: none;
  background-image: linear-gradient(transparent 72.5%, var(--accentColor) 72.5%, var(--accentColor) 92.5%, transparent 92.5%);
}
body.error-page a:hover {
  background-image: linear-gradient(transparent 0%, var(--accentColor) 0%, var(--accentColor) 92.5%, transparent 92.5%);
}
body.error-page p {
  /*  Since we're in a flexbox, margins don't collapse. */
  margin-top: 0;
}