source/style/layout.scss
@import './variables';

#site-main {
  position: relative;
  width: 100%;
  padding: 20px 0;

  .page-header {
    text-align: center;
    margin-bottom: 20px;
    color: lighten($black, 30%);
    font-size: 15px;
  }
}

/* Post list */

.post-list {
  position: relative;
  list-style: none;
  margin: 0 auto;
  width: 1280px;
  opacity: 1;
  transition: opacity 0.4s;

  @media (max-width: 1300px) {
    width: 960px;
  }
  @media (max-width: 960px) {
    width: 640px;
  }
  @media (max-width: 640px) {
    width: 100%;
    padding: 0 20px;
  }
  &.show {
    opacity: 1;
  }
  & .post-item {
    position: relative;
    float: left;
    width: 300px;
    height: 300px;
    margin: 0 10px 20px 10px;

    @media (max-width: 640px) {
      width: 100%;
      margin: 0 0 20px 0;
    }
    .post-link {
      position: relative;
      display: block;
      width: 100%;
      height: 100%;
      border: 3px solid $black;
      padding: 20px;

      @media (prefers-color-scheme: dark) {
        background-color: $dark-mode-post-background;
        border-color: lighten($dark-mode-post-background, 5%);
      }
      &:hover {
        border-color: $accent-color;

        .post-title {
          color: $accent-color;
        }
        .post-meta {
          background-color: $accent-color;
          color: $black;
        }
      }
    }
    .post-title {
      position: absolute;
      bottom: 15px;
      right: 20px;
      padding-left: 50px;
      text-align: right;
      font-size: 20px;
      font-weight: 500;
      transition: all 0.24s;

      @media (prefers-color-scheme: dark) {
        color: white;
      }
    }
    .post-meta {
      position: absolute;
      top: -2px;
      left: -2px;
      background-color: $black;
      padding: 2px 14px 2px 10px;
      font-family: $base-font-family;
      font-size: 14px;
      font-weight: 700;
      color: white;
      transition: all 0.24s;

      @media (prefers-color-scheme: dark) {
        background-color: lighten($dark-mode-post-background, 5%);
      }
    }
  }
}

.treat-block {
  margin: 30px auto;
  width: 100%;

  &.treat-block-footer {
    max-width: $article-width;

    img {
      width: 100%;
    }
  }
}
