/*
 * The blog on merely.fsk.im.
 */

:root {
  --background-color: #fede00;
  --text-color: #0b0404;
  --date-color: #64644b;
  --date-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--background-color);
  color: var(--text-color);
  font-family: "Noto Serif HK", STSong, Simsun, serif;
  margin: 0;
  padding: 40px 20px 80px;
  line-height: 1.5;
  font-size: 16px;
}

ul.nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;

  a {
    padding: 4.375px 8.75px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 17.5px;
    transition: opacity 0.125s ease-in-out;

    &:focus {
      outline: 1px dashed var(--text-color);
    }
  }
}

ul.posts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;

  @media (min-width: 768px) {
    width: 480px;
    margin: 0 auto;
  }

  .post {
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    text-decoration: none;
    padding: 5px;
    transition: opacity 0.125s ease-in-out;

    &:focus {
      outline: 1px dashed var(--text-color);
    }

    @media (min-width: 768px) {
      flex-direction: row;
      justify-content: space-between;
      gap: 48px;
    }

    .post-date {
      color: var(--date-color);
      font-size: var(--date-size);
      flex-shrink: 0;

      @media (min-width: 768px) {
        padding-top: 2px;
      }
    }

    .post-title {
      font-size: 20px;
      color: var(--text-color);
    }
  }
}

article {
  margin-top: 48px;

  @media (min-width: 768px) {
    width: 576px;
    margin-left: auto;
    margin-right: auto;
  }

  h1 {
    font-size: 32px;
    text-align: center;
    margin: 0;
    font-weight: normal;
    text-wrap: balance;
  }

  .post-body {
    p {
      font-size: 18px;
      line-height: 1.7em;

      @media (min-width: 768px) {
        font-size: 20px;
      }
    }

    blockquote {
      opacity: 0.8;
    }

    img {
      max-width: 100%;
    }

    .footnote-ref {
      color: var(--text-color);
      font-size: 0.9em;
      margin-left: 4px;
    }

    .footnotes {
      .footnote-backref {
        color: var(--text-color);
      }

      &::before {
        content: "";
        display: block;
        width: 152px;
        height: 12px;
        background: url("/assets/divider-d8c2a651.svg") no-repeat top center;
        margin: 3em auto;
      }
    }
  }

  time.post-date {
    display: block;
    color: var(--date-color);
    text-align: right;
    font-size: var(--date-size);
    margin-top: 40px;
  }
}

.divider {
  width: 152px;
  height: 12px;
  background: url("/assets/divider-d8c2a651.svg") no-repeat top center;
  margin: 10px auto;

  &.main-divider {
    margin-top: 30px;
    margin-bottom: 70px;
  }

  &.post-divider {
    margin-top: 16px;
    margin-bottom: 60px;
  }
}
