.sidebar-nav-item {
  border-radius: 0.5rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  max-width: fit-content;
  padding-right: 1rem;
}

.sidebar-nav-item-active {
  background-color: #eee;
}

.sidebar-nav-item::before {
  content: '';
  display: inline-block;
  background-position: bottom left;
  background-repeat: no-repeat;
  background-size: contain;
  width: 1rem;
  height: 1rem;
  margin-left: 1rem;
  margin-top: 0;
  margin-bottom: 0;
  padding-right: 0.5rem;
  vertical-align: top;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.sidebar-nav-item[href="/"]::before {
  background-image: url('../img/posts.svg');
}

.sidebar-nav-item[href^="/projects/"]::before {
  background-image: url('../img/all-projects.svg');
}

.sidebar-nav-item[href^="/about/"]::before {
  background-image: url('../img/about-me.svg');
}

.sidebar-nav-item[href^="https://github.com"]::before {
  background-image: url('../img/github.svg');
}

.sidebar-nav-item[href*=atom\.xml]::before {
  background-image: url('../img/rss.svg');
}

.sidebar-nav-item[href*=creativecommons\.org]::before {
  background-image: url('../img/license.svg');
}

@media (min-width: 48em) {
  .sidebar-nav-item {
    max-width: none;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

@media (prefers-color-scheme: dark) {
  .sidebar-nav-item-active {
    background-color: #333;
  }

  .sidebar-nav-item::before {
    filter: invert(100%);
  }
}

.sidebar-nav-item-other {
  opacity: 0.5;
}

img, video, iframe {
  border-radius: 1rem;
}

video {
  background: #000;
}

details {
  background-color: #f8f8f8;
}

@media (prefers-color-scheme: dark) {
  details {
    background-color: #212121;
  }
}

details:first-of-type {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}
details:last-of-type {
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

summary {
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-left: 1rem;
  font-weight: bold;
  cursor: pointer;
}

details > :not(summary) {
  padding-left: 1rem;
  padding-right: 1rem;
}

details > :not(summary):last-of-type {
  margin-bottom: -1rem;
  padding-bottom: 1rem;
}

/*
For some reason there is a whitespace of 0.4rem between iframes.
We normalise it and add the same margin that exists between the page margins
*/
iframe + iframe {
margin-top: calc(-0.4rem + 1rem);
}
@media only screen and (min-width: 48em) {
  iframe + iframe {
  margin-top: calc(-0.4rem + 2rem);
  }
}

.theme-base .content a.post-preview {
  display: block;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: #000;
  color: #FFF;
}

.theme-base .content a.post-preview:last-child {
  margin-bottom: 0;
}

@media only screen and (min-width: 48em) {
  .theme-base .content a.post-preview {
    margin-bottom: 2rem;
  }
}

@media only screen and (min-width: 64em) {
  .theme-base .content a.post-preview {
    margin-bottom: 2rem;
  }
}

.theme-base .content .post-preview-text {
  padding: 1rem;
}

@media only screen and (min-width: 32em) {
  .theme-base .content .post-preview-text {
    padding: 2rem;
  }
}

.theme-base .content .post-preview-title {
  color: inherit;
  margin-top: 0;
}

.theme-base .content .post-preview-metadata {
  display: block;
  color: inherit;
  margin-top: -.5rem;
}

.theme-base .content .post-preview-image {
  width: 100%;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

sup {
  font-size: 0.7rem;
}

.footnotes {
  font-size: smaller;
}

.footnotes li:target {
  outline: auto;
}
