source/style/sidebar.scss
@import "variables";

.site-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  padding: 20px;
  background-color: lighten($dark-mode-light-background, 5%);
  text-align: center;
  overflow: hidden;
  transform: translate3d(280px, 0, 0);
  transition: all 0.24s ease;
  z-index: 1;

  .shortcuts {
    display: block;
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 20px;
    text-align: center;

    .dark-btn {
      display: inline-block;
      width: 36px;
      height: 36px;
      margin: 0 5px;
      padding: 0;
      font-size: 13px;
      cursor: pointer;

      .icon {
        line-height: 34px;
        font-size: 14px;
        margin: 0;
        padding: 0;
      }
    }
  }

  .sidebar-switch {
    width: 200px;
    margin: 0 auto 20px auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.24s ease;

    &.show {
      opacity: 1;
      visibility: visible;
    }
    .dark-btn {
      display: block;
      float: left;
      width: 100px;
      margin-left: -1px;
      cursor: pointer;
      font-size: 12px;

      &.active {
        color: darken($text-color, 10%);
        background-color: $brand-color;

        @media (prefers-color-scheme: dark) {
          background-color: $dark-mode-brand-color;
        }
      }
      .icon {
        line-height: 30px;
      }
      .text {
        line-height: 30px;
      }
    }
  }
}

.site-bio {
  position: relative;
  opacity: 0;
  transform: translate3d(0px, -20px, 0px);
  transition: all 0.24s ease;

  &.show {
    opacity: 1;
    transform: translate3d(0px, 0px, 0px);
  }
  .section {
    margin: 15px auto;
  }
  .menu {
    position: relative;
    width: 100%;

    ul {
      position: relative;
      width: 100%;
      list-style: none;
      padding: 0;

      li {
        width: 50%;
        margin-bottom: 10px;

        &.right {
          padding-left: 5px;
        }
        &.left {
          padding-right: 5px;
        }
      }
    }
    .dark-btn {
      display: block;
      width: 100%;
      font-size: 13px;
      padding: 5px 10px;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
    }
  }
  .about-me {
    padding: 12px 5px 15px 5px;
    background-color: rgba(0, 0, 0, 0.1);
    transition: background-color 0.24s, border-color 0.24s;

    &:hover {
      background-color: rgba(0, 0, 0, 0.2);
    }
    .avatar {
      display: block;
      width: 96px;
      height: 96px;
      margin: 4px auto;
      background-color: rgba(0,0,0,0.3);
      border-radius: 50%;
      border: 1px solid black;
      padding: 3px;
      overflow: hidden;

      img {
        display: block;
        width: 100%;
        height: 100%;
        border-radius: 50%;
      }
    }
    .dark-btn {
      padding: 5px 15px;
      font-size: 12px;

      &:hover {
        background-color: $brand-color;

        @media (prefers-color-scheme: dark) {
          background-color: $dark-mode-brand-color;
        }
      }
      .icon {
        margin-right: 0;
      }
    }
    .info {
      color: lighten($text-color, 40%);
      margin-top: 10px;
      line-height: 140%;
      padding: 0 15px;
      font-size: 12px;

      @media (prefers-color-scheme: dark) {
        color: darken($dark-mode-text-color, 25%);
      }
    }
  }
}

.site-toc {
  position: relative;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.1);
  max-height: 450px;
  overflow: auto;
  opacity: 0;
  transform: translate3d(0px, -20px, 0px);
  transition: all 0.24s ease;

  &.show {
    transform: translate3d(0px, 0px, 0px);
    opacity: 1;
  }
  & > ol {
    text-align: left;
    list-style: none;

    li {

      a {
        color: lighten($text-color, 100%);
        font-size: 14px;

        &:hover {
          color: $brand-color;

          @media (prefers-color-scheme: dark) {
            color: $dark-mode-brand-color;
          }
        }
      }
      ol {
        list-style: none;
        padding-left: 15px;
      }
    }
  }
}
