#blog-container {
  display: flex;
  width: 100%;
  gap: 2em;
  margin: auto;
  justify-content: space-around;
}

#blog-container > section {
  flex-grow: 1;
  max-width: 110ch;
}

#blog-container aside {
  padding-left: 1em;
  flex-basis: 500px;
}

#blog-container .blog {
  max-width: min(110ch, 100%);
}

#blog-container .image.main {
  display: block;
  margin: 0 0 3em 0;
  width: 100%;
}

#blog-container .post-date {
  color: var(--text);
  font-family: "Roboto Slab", serif;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 1em 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
}

#blog-container .post-tags {
  color: var(--text);
  font-family: "Roboto Slab", serif;
  margin: 0 0 1em 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
}

#blog-container p {
  margin: 0 0 2em 0;
}

#blog-container #syntax-error {
  display: flex;
  border-bottom: 1px solid #ccc;
  border-top: 1px solid #ccc;
  margin-bottom: 1em;
  padding: 1em 0;
  flex-direction: column;
}

#blog-container #syntax-error p {
  padding: 2em;
  font-size: 1.5em;
}

#blog-container #syntax-error img {
  flex-shrink: 0;
  max-width: 100%;
}

#blog-container ol,
#blog-container ul {
  margin-bottom: 2em;
}

#blog-container .post-tag:not(:last-child)::after {
  content: ", ";
}

#blog-container :is(h1, h2, h3, h4, h5) {
  margin-bottom: 1em;
}

#blog-container section.post {
  max-width: 90ch;
  padding-right: 2em;
}

.blog-comment {
  max-width: 80ch;
  display: flex;
  gap: 1em;
}

.blog-comment img {
  max-width: 100px;
  width: inherit;
  border-radius: 50%;
}

.blog-comment .author {
  word-break: break-all;
  font-weight: 700;
}

.blog-comment .comment-content {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.blog-comment .publish-date {
  font-size: 0.8em;
}

.comment-ingress {
  font-size: 0.8em;
  margin-bottom: 1.5em;
}

#comment-section h2 {
  margin-bottom: 0;
}

#comment-section {
  margin-bottom: 1em;
  padding: 1em 0;
  border-top: 1px solid #ccc;
}

.continue-discussion {
  display: flex;
  justify-content: end;
  font-style: italic;
  font-weight: 100;
  font-size: 0.8em;
}

.continue-discussion p {
  margin-bottom: 0;
}

.blog-comment {
  display: block;
}

.blog-comment:not(:first-child) {
  border-top: 1px solid var(--brand);
  padding-top: 1em;
}

.tags-date {
  display: inline-block;
  margin-right: 1em;
  min-width: 14ch;
  padding-bottom: 0.5em;
}

.blog-container img {
  margin: auto;
  margin-bottom: 2em;
}

.comment-meta {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
}

.comment-meta-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tags-post-list > li {
  display: flex;
  flex-direction: column;
  margin-bottom: 1em;
  border-bottom: 1px solid var(--brand);
}

.tags-post-list {
  padding-left: 0.5em;
}

.related-posts-mobile {
  display: none;
}

@media screen and (max-width: 1100px) {
  #blog-container aside {
    display: none;
  }

  .related-posts-mobile {
    display: block;
  }
}

@media screen and (min-width: 580px) {
  .blog-comment {
    max-width: 110ch;
    display: flex;
    gap: 1em;
    flex-direction: column;
  }

  .tags-post-list li {
    flex-direction: row;
    border-bottom: none;
  }

  #blog-container #syntax-error {
    flex-direction: row;
  }
}

.page-404 :is(h1, h2, h3) {
  text-align: center;
}

.page-404 > p {
  text-align: center;
}

.featured-404 {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: center;
}

.featured-post {
  max-width: 65ch;
  padding: 2em;
  box-shadow: 7px 7px 5px 0px var(--shadow);
}

.featured-post h2 {
  text-align: center;
  padding: 1em 0;
}

.featured-cta {
  width: 100%;
  display: flex;
  justify-content: end;
}

.blog img {
  margin: 1em auto;
}

.blog-comment.indent {
  margin-left: 2em;
}

.popular-posts {
  list-style: none;
}

#blog-post-list h3 {
  text-align: right;
  margin-bottom: 0;
}

#blog-post-list h2 {
  margin-bottom: 0;
}

#blog-post-list ul > li:last-child {
  margin-right: 0;
}

.blog-entry-container {
  display: flex;
  justify-content: space-between;
}

.blog-entry-container span {
  margin-left: 1em;
}

.blog-entry-container:hover {
  background: var(--hover-bg);
}

#blog-post-list ul {
  padding-left: 0;
}

#blog-stats {
  max-width: 100ch;
}

li.blog-stats-year {
  display: flex;
  gap: 1em;
  padding: 0.25em 0;
}

.blog-stats-section {
  margin-bottom: 1em;
}

.epg {
  color: var(--text);
  margin: 20px 0;
  font-size: 0.8em;
}

.epg__year {
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
}

.epg__months {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

@media (max-width: 410px) {
  .epg__months {
    display: none;
  }
}

.epg__squares {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  margin-bottom: 10px;
  grid-gap: 2px;
}

.epg__box {
  aspect-ratio: 1 / 1;
  background: var(--epg-box);
}

.epg__box--empty {
  background: none;
}

.epg__hasPost {
  background: var(--epg-box-highlight);
}

.blog-stats-highlight {
  background: var(--brand);
  padding: 0 0.25em;
  color: var(--color-background-primary);
}

#blog-container blockquote p:last-child {
  margin-bottom: 0;
}

ul.blogroll {
  padding-left: 0;
}

.sidenote-link {
  vertical-align: super;
  font-size: 0.75em;
}

.reach-out-cta {
  background: var(--brand);
  color: var(--color-background-primary);
  padding: 1em;
  border-radius: 5px;
}

.notion-callout {
  display: flex;
  gap: 1em;
  background: var(--brand);
  color: var(--color-background-primary);
  padding: 0.5em 1em;
  font-style: normal;
  font-weight: 400;
}

details:not([open]) {
  margin-bottom: 1em;
}
