/* --- Blog listing --- */

.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-post-item {
  border-bottom: 1px solid rgba(38, 53, 170, 0.1);
  padding-bottom: 2rem;

  &:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  h2 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 500;
    margin: 0 0 0.25rem;
    text-align: left;
  }

  a:has(h2) {
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }

  time {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.6;
    margin-bottom: 0.75rem;
  }
}

.blog-post-excerpt p:last-child {
  margin-bottom: 0;
}

.blog-read-more {
  margin: 1.5rem 0 0;
  text-align: right;

  a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;

    &:hover {
      text-decoration: underline;
    }
  }
}

/* --- Blog post --- */

.blog-post-header {
  margin-top: 1rem;
  margin-bottom: 2rem;

  h1 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 600;
    margin: 0 0 0.25rem;
    line-height: 1.2;
  }

  time {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.6;
  }
}

.blog-post-body {
  font-weight: 325;

  h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 500;
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
  }

  h3 {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 500;
    text-align: left;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
  }

  ol, ul {
    padding-left: 1.5rem;
  }

  li {
    margin-bottom: 0.25rem;
  }

  li > ul,
  li > ol {
    margin-top: 0.25rem;
  }

  figure.center {
    text-align: center;
  }
}

.blog-post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(38, 53, 170, 0.1);

  a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;

    &:hover {
      text-decoration: underline;
    }
  }
}