:root {
  --inline-code-background-color: #d4d4d4;
  --inline-code-background-color-dark: #333333;

  --code-block-copy-button-color: #1a1a1a;
  --code-block-copy-button-color-dark: #fafafa;

  --secondary-text-color: #5b5b5b;
  --secondary-text-color-dark: #b3b3b3;
}

section footer {
  margin-top: 2rem;
}

article img,
iframe {
  width: 100%;
  height: auto;
}

iframe {
  min-height: 200px;
}

article footer {
  margin-top: 1.5rem;
  border-top: 1px solid var(--section-border-color);
  padding-top: 1.5rem;
  margin-bottom: 1rem;
}

.blog {
  list-style-type: none;
  list-style-position: outside;
}

.post-item p {
  margin-bottom: 0.5rem;
}

.post-timestamp,
.reading-time {
  color: var(--secondary-text-color)
}

.reading-time {
  display: block;
}

article header + p {
  margin-top: 1.5rem;
}

pre {
  padding: 1rem;
  border-radius: 4px;
  overflow: auto;
  text-align: left;
  border: 1px solid #d4d4d4;
}

pre table td {
  padding: 0;
}

pre mark {
  /* If you want your highlights to take the full width. */
  display: block;
  /* The default background colour of a mark is bright yellow */
  background-color: rgba(254, 252, 232, 0.9);
}

pre table {
  width: 100%;
  border-collapse: collapse;
}

code {
  border-radius: 4px;
  background-color: var(--inline-code-background-color);
  padding: 0.125rem 0.25rem;
}

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

.code-block-wrapper {
  position: relative;
}

.code-copier {
  display: flex;
  border: 0;
  justify-content: center;
  align-items: center;
  position: absolute;
  padding: 1rem;
  bottom: 0;
  right: 0;
  width: auto;
  height: auto;
  background: transparent;
}

.code-copier svg {
  transition: opacity 0.3s ease;
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--code-block-copy-button-color);
  opacity: 0.3;
}

.code-copier:hover svg,
.code-copier:focus svg {
  opacity: 1;
}

.code-copier:active svg {
  opacity: 0.3;
}

.pagination {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  padding-right: 0.75rem;
  padding-bottom: 0.5rem;
}

.pagination a svg {
  width: 0.85rem;
  height: 0.85rem;
}

.pagination a:first-child svg {
  margin-right: 0.5rem;
}

.pagination a:last-child svg {
  margin-left: 0.5rem;
}

@media (min-width: 500px) {
  iframe {
    min-height: 300px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --inline-code-background-color: var(--inline-code-background-color-dark);
    --code-block-copy-button-color: var(--code-block-copy-button-color-dark);
  }

  pre {
    border: 1px solid #333333;
  }

  .post-timestamp,
  .reading-time {
    color: var(--secondary-text-color-dark);
  }
}

@media (prefers-reduced-motion: reduce) {
  .code-copier svg {
    transition: none;
  }
}