footer {
  margin-top: 2em;
}

header {
  margin-bottom: 2em;
}

button#theme-toggle {
  background: none;
  border: none;
  box-shadow: none;
}

/* Blog index */

.blog-month > ul {
  padding: 0;
}

.blog-month > ul > li {
  list-style-type: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.blog-month > ul > li > a {
  grid-column: 1;
  max-width: fit-content;
}

.blog-month > ul > li > span {
  grid-column: 2;
  max-width: fit-content;
  justify-self: end;
}

/* Blog content */

article {
  --pico-card-box-shadow:
    0.0145rem 0.029rem 0.174rem rgba(129, 145, 181, 0.01698),
    0.0335rem 0.067rem 0.402rem rgba(129, 145, 181, 0.024),
    0.0625rem 0.125rem 0.75rem rgba(129, 145, 181, 0.03),
    0.1125rem 0.225rem 1.35rem rgba(129, 145, 181, 0.036);
}

article header {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: 'title date';
  align-items: center;
  margin-bottom: 2em;
}

article header h1 {
  grid-area: title;
  margin: 0;
  padding: 0;
}

article header h2 {
  grid-area: date;
  align-self: center;
  justify-self: right;
  font-size: 18px;
  margin: 0;
  padding: 0;
}

@media all and (max-width: 840px) {
  article {
    grid-template-rows: auto auto;
    grid-template-areas:
      'title'
      'date';
  }
  article header h2 {
    justify-self: left;
    margin-top: 0.7em;
  }
}

@media all {
  article p:has(img) {
    display: flex;
    justify-content: center;
  }

  article img {
    max-width: 70%;
  }
}

@media all and (max-width: 840px) {
  article img {
    max-width: 100%;
  }
}

div.blog-toc {
  margin-bottom: 2em;
}

/* Code blocks */

code[class*='language-'],
pre[class*='language-'] {
  font-size: calc(var(--pico-font-size) * 0.65);
}
