.blog-previews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-bottom: 2rem;
}

@container main-page (width < 768px) {
  .blog-previews {
    grid-template-columns: 1fr;
  }
}

.blog-preview {
  border: var(--border, var(--default-border));
  display: flex;
  position: relative;
  background-color: var(--bg);

  a {
    width: 100%;
    height: 100%;
    padding: 1rem;

    color: var(--fg);

    &:hover {
      color: var(--fg);
      text-decoration: none;
    }
  }

  .top-split {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .title {
    font-size: 1.5rem;
    font-weight: bold;
  }

  .date {
    font-size: 0.75rem;
    color: var(--fg-lighter);
  }

  .description {
    font-size: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .tags {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
  }

  &::before, &::after {
    content: "";
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    position: absolute;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 500ms;
    pointer-events: none;
  }

  &::before {
    background: radial-gradient(800px circle at var(--x) var(--y), rgb(from var(--fg) r g b / 0.1), transparent 40%);
    z-index: 3;
  }

  &::after {
    background: radial-gradient(500px circle at var(--x) var(--y), rgb(from var(--fg) r g b / 0.1), transparent 40%);
    z-index: 2;
  }

  &:hover::before {
    opacity: 1;
  }
}

.blog-previews:hover > .blog-preview::after {
  opacity: 1;
}
