:root {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --background-color: #fff;
  --color: #303030;
}
* {
  scroll-behavior: smooth;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dark-mode {
  --background-color: #212538;
  --color: #cef0e6;
}

body {
  margin: 50px;
  background-color: var(--background-color);
  color: var(--color);
  position: relative;
}

header {
  width: 20%;
  height: 100%;
  position: fixed;
}

main {
  position: absolute;
  top: 0;
  left: 25%;
  z-index: -1;
  width: 75%;
}

h1 {
  text-align: center;
}

a {
  color: var(--color);
}

#logo {
  display: block;
  max-width: 150px;
  margin: 0 auto 0 auto;
}

#table-of-contents {
  background-color: #f9f9f9;
  color: #1a4885;
  padding: 10px;
  margin: 0 auto;
  padding-left: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-width: 250px;
  font-size: 0.9em;
}

#table-of-contents a {
  display: block;
  text-decoration: none;
  color: #1a4885;
  margin-left: 10px;
}

#table-of-contents a:hover {
  font-weight: bold;
}

#table-of-contents hr {
  width: 90%;
  margin: 10px 0;
  border: 1px solid rgb(98, 85, 214);
}

#light-dark-container {
  text-align: center;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

#light {
  color: #212538;
  padding-bottom: 5px;
}

#dark {
  color: #fff;
}

#theme-toggle {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid rgb(98, 85, 214);
}

/*constrain image  */
#theme-toggle img {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.example {
  background-color: rgb(229, 232, 247);
  color: rgb(148, 17, 180);
  padding: 10px;
  margin: 10px 0 10px 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  border: 1px solid #9c9fbe;
  border-radius: 5px;
  width: 95%;
}

section {
  position: relative;
  z-index: 0;
  width: 100%;
  border: 1px solid red;
  height: 40px;
  overflow: hidden;

  transition: opacity 1s ease, height 1s ease;

  padding: 0 15px 15px 15px;
  margin: 5px 0;

  border: 1px solid #a0d9e0;
  border-radius: 5px;
}

section.open {
  overflow-y: scroll;
  height: 700px;
  transition: opacity 2s ease, height 0.5s ease;
}

.example p {
  margin: 3px;
}

.note-section {
  visibility: hidden;
  position: absolute;
  border: 1px solid #ddd;
  border-radius: 5px;

  padding: 0 30px 0 30px;
  margin: 10px 0 30px 0;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.5s ease;
  width: 95%;
}

.open-tab {
  visibility: inherit;
  opacity: 1;
  transition: opacity 0.2s ease, visibility 0.5s ease;
}

.note-section li {
  padding: 10px;
  margin-left: 15px;
}

#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--color);
  width: 1px;
  height: 20px;
  z-index: 1;
  transition: width 1s ease-out;
}

.toggle-arrow {
  content: url(images/arrow.png);
  display: inline-block;
  width: 18px;
  margin-left: 10px;
  cursor: pointer;
  opacity: 1;
}

.toggle-arrow:active {
  width: 15px;
  margin-bottom: 1px;
  margin-right: 3px;
}

.toggle-arrow:hover {
  transform: rotate(90deg);
  transition: transform 200ms ease;
}

h2 {
  display: inline-block;
  margin-bottom: 7px;
}

.section-tabs a {
  background: #e9e9eb;
  padding: 10px;
  margin: 0px -1px 7px -1px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #1a4885;
}

.section-tabs a.selected {
  background: var(--background-color);
  border-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  color: var(--color);
}

.favIcon {
  position: absolute;
  right: 20px;
  width: 18px;
  cursor: pointer;
}

#reset {
  cursor: pointer;
  width: auto;
}

#reset:hover {
  text-decoration: underline;
}

#attribution {
  font-size: .75rem;
  
  text-align: center;
}


@media (max-width: 800px) {
  body {
    margin: 20px;
  }

  header {
    width: 100%;
    height: auto;
    position: relative;
  }

  main {
    position: relative;
    top: 10px;
    left: 0;
    width: 100%;
    z-index: 0;
  }

  section {
    padding: 0 10px 10px 10px;
  }

  section.open {
    height: 500px;
  }

  .note-section {
    padding: 0 15px 0 15px;
    margin: 5px 0 5px 0;
    width: 90%;
  }

  .section-tabs a {
    padding: 10px;
    margin: 0px -1px;
    border-radius: 4px;
  }

  .section-tabs a.selected {
    border-bottom: 1px solid #ddd;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
  }

  h2 {
    font-size: 1.4em;
    margin-bottom: 9px;
  }
}

.triangle{
  width: 0;
  height: 0;
  border-top: 50px solid var(--color);
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
}

.my-image-container {
  overflow: hidden;
  height: 150px;
  width: 95%;
  background-color: var(--color);
  opacity: 0.7;
}

.my-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.5;
}