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

.dark-btn {
  display: inline-block;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid black;
  padding: 0 15px;
  font-size: 13px;
  font-family: $base-font-family;
  text-align: center;
  color: lighten(#8f8f8f, 20%);

  &:hover {
    color: $black;
    background-color: $accent-color;
  }
  .icon {
    position: relative;
    margin-right: 3px;
    font-size: 16px;
    vertical-align: middle;
    line-height: 44px;
  }
  .text {
    vertical-align: middle;
    line-height: 44px;
  }
}


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

  @media (prefers-color-scheme: dark) {
    background: lighten($dark-mode-post-background, 5%);
  }
  .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;

      &.active {
        color: lighten(#8f8f8f, 40%);
        background-color: $accent-color;

        @media (prefers-color-scheme: dark) {
          color: $black;
        }
      }
      .icon {
        line-height: 30px;
        top: 1px;
      }
      .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);
  }
  .window-nav {
    width: 125px;
    padding: 0 0 0 15px;
    text-align: left;
  }
  .about-me {
    padding: 12px 5px 15px 5px;
    transition: background 0.24s, border-color 0.24s;

    .avatar {
      display: block;
      width: 96px;
      height: 96px;
      margin: 0 auto;
      background: 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;
      margin: 5px 0;

      &:hover {
        background-color: $brand-color;
        color: rgba(0, 0, 0, 0.7);
      }
      .icon {
        margin-right: 0;
      }
    }
    .info {
      color: lighten(#8f8f8f, 10%);
      margin-top: 10px;
      line-height: 140%;
      padding: 0 15px;
      font-size: 13px;
    }
  }
  .social {
    position: relative;
    margin: 15px 0;
    padding: 0;

    a {
      display: inline-block;
      color: $white;
      font-size: 14px;
      text-transform: uppercase;
      text-align: center;
      line-height: 46px;
      vertical-align: middle;
      width: 46px;
      height: 46px;
      background-color: rgba(0,0,0,0.3);
      border: 1px solid black;
      margin: 5px 2px;

      &.feed {
        &:hover {
          background-color: $material-orange;
        }

      }
      &.github {
        &:hover {
          background-color: $github-color;
        }
      }
      &.twitter {
        &:hover {
          background-color: $twitter-color;
        }
      }
      &.facebook {
        &:hover {
          background-color: $facebook-color;
        }
      }
      &.google {
        &:hover {
          background-color: $google-color;
        }
      }
      &.dribbble {
        &:hover {
          background-color: $dribbble-color;
        }
      }
      &.pinterest {
        &:hover {
          background-color: $pinterest-color;
        }
      }
      &.weibo {
        &:hover {
          background-color: $weibo-color;
        }
      }
      &.tumblr {
        &:hover {
          background-color: $tumblr-color;
        }
      }
      &.instagram {
        &:hover {
          background-color: $instagram-color;
        }
      }
      &.linkedin {
        &:hover {
          background-color: $linkedin-color;
        }
      }
      &.behance {
        &:hover {
          background-color: $behance-color;
        }
      }
      &:hover {
        background: $brand-color;

        .icon {
          color: lighten(#8f8f8f, 40%);
        }
      }
      .avatar,
      .icon {
        transition: all 0.24s;
      }
      .avatar {
        display: block;
        width: 30px;
        height: 30px;
        margin: 7px;
        border-radius: 50%;
      }
      .icon {
        font-size: 18px;
        color: lighten(#8f8f8f, 10%);
        line-height: 46px;
      }
    }
  }
}

.site-toc {
  position: relative;
  padding: 12px 10px 15px 10px;
  background: rgba(0,0,0,0.1);
  border: 1px solid lighten(black, 15%);
  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: darken(white, 10%);
        font-size: 15px;

        &:hover {
          color: $brand-color;
        }
      }
      ol {
        list-style: none;
        padding-left: 15px;
      }
    }
  }
}

