/* Show it is fixed to the top */
body {
  padding-top: 4.5rem;
}

@supports (position: sticky) {
  .sticky-top.top-aligned {
    top: 4rem;
  }
}

article table.article-table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  border-collapse: collapse;
  thead {
    tr {
      background-color: rgba(0, 0, 0, 0.05);
    }
  }
  tbody {
    tr {
      &:nth-of-type(even) {
        background-color: rgba(0, 0, 0, 0.05);
      }
    }
  }
}

.navbar-slash::after {
  content: "/";
}

.img-avatar {
  max-width: 120px;
  max-height: 120px;
  border-radius: 100%;
}

@media (max-width: 1200px) {
  .img-avatar {
    max-width: 100px;
    max-height: 100px;
  }

  .bio-name {
    font-size: 1.5em !important;
  }
}

.img-icon {
  width: 60px;
  max-height: 60px;
  border-radius: 5px;
}

.img-icon-pico {
  width: 30px;
  max-height: 30px;
  border-radius: 2px;
}

.bio-name {
  font-size: 1.7em;
  font-weight: 300;
}

.bio-right {
  padding-left: 0.8em;
}

td.narrow-col {
  width: 100px;
}

table.table-fixed {
  table-layout: fixed;
}

.bio-box__top {
  margin-bottom: 0;
  padding-bottom: 10px !important;
}

.sidebar.shadow {
  box-shadow: 0 0.8rem 1rem rgba(0, 0, 0, 0.15) !important;
}

blockquote {
  border-left: 3px solid rebeccapurple;
  padding: 0.75rem 0.5rem 0.1rem;
  background-color: #e9eff6;
}

.bio-expand {
  overflow-y: hidden;
  max-height: 4em;
  box-shadow: inset 0 -75px 30px -45px #ccc;
  cursor: pointer;
  border-bottom: 3px solid #447283;
}

.bio-expand:focus {
  overflow-y: none !important;
  max-height: none !important;
  cursor: auto !important;
  box-shadow: none !important;
  border-bottom: none !important;
}

.bio-expand:before {
  width: 100%;
  text-align: center;
  position: relative;
  display: block;
  content: "click to expand";
  font-weight: bold;
  font-size: 11pt;
  margin-top: -3px;
}

.bio-expand:focus:before {
  display: none;
}

.katex {
  font-size: 1.15em !important;
}

.anchor-link {
  font-size: 0.7em;
  margin-right: 10px;
}

.anchor-link__source {
  scroll-margin-top: 4.5rem;
}

.toc-nav {
  max-height: min(60vh, 100vh - 145px);
  overflow-y: scroll;
}

@media (max-width: 992px) {
  .sidebar__mobile {
    position: fixed;
    top: 3.5rem;
    left: -100vw;
    z-index: 1000;
    width: min(75vw, 400px);
  }

  .sidebar__mobile.expanded {
    left: 0;
  }

  .sidebar_toggle {
    display: block !important;
    position: fixed;
    right: 15px;
    top: 3.5rem !important;
    font-size: 2.7em;
    color: #555;

    background-color: none;
  }

  .bio-box__top {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
  }
}

.sidebar_toggle {
  display: none;
}

.toc-nav::-webkit-scrollbar {
  width: 5px;
}
.toc-nav::-webkit-scrollbar-thumb {
  background-color: #aaa;
  border-radius: 5px;
}

.toc-nav li.active {
  font-weight: bold;
  text-decoration: underline;
  scroll-margin-top: 4.5rem;
  scroll-margin-bottom: 4.5rem;
}

.toc-level-2 {
  margin-left: 10px;
}
.toc-level-3 {
  margin-left: 20px;
}
.toc-level-4 {
  margin-left: 30px;
}
.toc-level-5 {
  margin-left: 40px;
}
.toc-level-6 {
  margin-left: 50px;
}

.row.sidebar-collapsed .col-lg-4 {
  display: none;
}

@media (min-width: 992px) {
  .row.sidebar-collapsed .col-lg-8 {
    flex: 0 0 90%;
    max-width: 90%;
  }
}
@media (min-width: 1200px) {
  .row.sidebar-collapsed .col-lg-8 {
    flex: 0 0 80%;
    max-width: 80%;
  }
}

.toc_toggle {
  display: block !important;
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 1.5em;
  color: #555;
  cursor: pointer;
}

.sidebar_expander {
  display: none;
  position: fixed;
  left: 15px;
  top: 5rem;
  font-size: 2.7em;
  color: #555;
  cursor: pointer;
  z-index: 1001;
}

.sidebar-collapsed .sidebar_expander {
  display: block !important;
}
