$sidebar-width: 300px;
$page-width: 1280px;
$small-space: 8px;
$med-space: 16px;
$mobile-phone-max: 480px;

html {
  scroll-behavior: smooth;
  tab-size: 2;
  min-width: 320px;
}

#left {
  font-size: 14px;
  // padding-left: 8px;
  ol {
    padding: 0;
    margin: 0;
  }
  ol > ol {
    margin-left: $med-space;
  }
  li {
    margin-top: 8px;
    list-style: none;
  }
  .active a {
    color: #002b36;
    // font-weight: bold;
  }
}

pre {
  overflow: auto;
}

html {
  height: 100%;
  font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol';
  // font-family: 'Roboto', serif;
  line-height: 1.3;
  font-size: 16px;
  color: #586e75;
}

a {
  // color: #4078c0;
  color: #839496;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

p {
  margin: $med-space 0 0 0;
}

pre {
  margin: 8px 0 0 0;
}

h1 {
  margin: 32px 0 0 0;
  font-weight: 600;
}

h1,
h2,
h3,
.intro-header {
  color: #002b36;
}

h2 {
  margin: $med-space 0 0 0;
  font-weight: 400;
}

* {
  min-width: 0; /* Otherwise <pre> blocks take up more space then they should. Needed for flexbox. */
  box-sizing: border-box;
}

body {
  height: 100%;
  width: 100%;
  margin: 0px; /*removes default style*/
  box-sizing: border-box;
  position: relative;
}

#header {
  max-width: $page-width;
  position: relative;
  margin-left: auto;
  margin-right: auto;
  // height: 300px;
  margin-top: 16px;
  .header-inside {
    display: flex;
    justify-content: center;
    @media (max-width: $mobile-phone-max) {
      display: block;
    }
  }
  .title-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stetch;
  }
  .title-pic {
    width: 560px;
    height: 257px; // Hmm, Safari also needs height
    margin-left: 8px;
  }
  .title-wrapper {
    display: flex;
    justify-content: center;
    color: black;
    margin: 0 0;
    .title {
      font-size: 60px;
      @media (max-width: $mobile-phone-max) {
        font-size: 45px;
      }
    }
    .subtitle {
      font-size: 30px;
      @media (max-width: $mobile-phone-max) {
        font-size: 20px;
        margin-bottom: 16px;
      }
    }
  }
  .social-buttons {
    display: flex;
    justify-content: center;
  }
  .intro-buttons {
    display: flex;
    justify-content: space-between;
    flex-flow: row wrap;
    text-align: center;
    @media (max-width: $mobile-phone-max) {
      flex-direction: column;
      margin-bottom: 8px;
    }
    a:first-child {
      margin-right: 16px;
    }
    a {
      @media (max-width: $mobile-phone-max) {
        margin: 0 16px 8px 16px;
      }
      display: inline-block;
      background-color: #2aa198;
      // background-color: #AD00FF;
      color: white;
      font-size: 18px;
      padding: 16px 32px;
      border: 0px;
      border-radius: 8px;
      // box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
      cursor: pointer;
      margin: 20px 0px;
    }
    a:hover {
      background-color: #27968d;
      text-decoration: none;
    }
  }
}

.body-wrapper {
  max-width: $page-width;
  position: relative;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px 0 16px;
}

.social-buttons img {
  width: 25px;
  height: 25px;
  margin-right: 10px;
}

#left {
  top: 0;
  position: sticky;
  width: $sidebar-width;
  float: left;
  height: 100vh;
  display: flex;
  flex-direction: column;
  .sidebar-header {
    border-bottom: 1px solid #eee;
    box-shadow: -20px 0px 20px 0px white;
    z-index: 2;
    .social-buttons {
      display: flex;
      justify-content: left;
    }
    .sidebar-title a {
      display: flex;
      justify-content: left;
      font-size: 32px;
      color: black;
    }
    .sidebar-title a:hover {
      text-decoration: none;
    }
    .github-stars {
      margin-top: 3px;
    }
  }
  .toc {
    overflow-y: hidden;
    padding-bottom: 16px;
  }
  .toc:hover {
    overflow-y: auto;
  }
}

#right {
  margin-left: calc(32px + #{$sidebar-width});
  a {
    color: #2aa198;
  }
}

.content {
  padding-bottom: 36px; // Not sure why padding doesn't work
  ul {
    margin: 8px 0 0 32px;
    padding: 0;
    list-style: none;
    // list-style-position: inside;
  }
  ul li {
    line-height: 16px;
    margin-top: 8px;
  }
  ul li::before {
    content: '\2022'; /* Add content: \2022 is the CSS Code/unicode for a bullet */
    color: #c1c9d2; /* Change the color */
    font-weight: bold; /* If you want it to be bold */
    display: inline-block; /* Needed to add space between the bullet and the text */
    width: 24px; /* Also needed for space (tweak if needed) */
    margin-left: -24px; /* Also needed for space (tweak if needed) */
  }
}

.yt-video {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

code {
  color: #002b36;
  border-radius: 4px;
  background-color: #eef1f1;
  font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  padding: 0px 8px;
  font-size: 14px;
}

pre code {
  border-radius: 8px;
  font-size: 16px;
  padding: 0px;
  @media (max-width: $mobile-phone-max) {
    font-size: 12px;
  }
}

.center {
  display: flex;
  justify-content: center;
}

#header .social-buttons {
  display: none;
}

@media (max-width: 1020px) {
  .title-pic {
    display: none;
  }
  #left {
    display: none;
  }
  #right {
    margin-left: 0px;
  }
  #header .social-buttons {
    display: flex;
  }
}
