@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
  --navbar-color: rgb(13, 13, 13);
  --line-color: #696969;
  --hover-color: #75e688;
  --background-color: #212121;
  --accent-color: #647b17;
  --text-color: #dcdcdc;
  --panel-color: rgba(0, 0, 0, 0.718);
  --icon-color: rgba(213, 213, 213, 0.49);
  --font-family: 'Open Sans', sans-serif;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


html {
  font-family: var(--font-family);
  line-height: 1.5rem; 
  font-family: var(--font-family);
  line-height: 1.5rem;
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  width: 100vw;
  background-color: var(--background-color);
  color: var(--text-color); 
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

#toggle-btn{
  rotate: 180deg;}

#sidebar{
 height: 100vh;
  width: 50px;
  padding: 0;
  position: sticky;
  top: 0;
  align-self: start;
  transition: 300ms ease-in-out;
  overflow: hidden;
  text-wrap: nowrap;
   background-color: var(--panel-color);

}

#sidebar-trigger {
  display: none;
}

#sidebar.open{
  box-sizing: border-box;
  height: 100vh;
  width: 250px;
  padding: 0;
  background-color: var(--panel-color);
  
  position: sticky;
  top: 0;
  align-self: start;
  transition: 300ms ease-in-out;
  overflow: hidden;
  text-wrap: nowrap;
}


@media (min-width: 801px) {
  #sidebar-trigger {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 50px;
    height: 100vh;
  }

  #sidebar,
  #sidebar.open {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    transition: width 300ms ease-in-out, opacity 300ms ease-in-out, transform 300ms ease-in-out;
  }

  #sidebar.auto-hide {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
  }

  #sidebar-trigger:hover + #sidebar.auto-hide,
  #sidebar.auto-hide:hover,
  #sidebar.auto-hide:focus-within {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
}


#sidebar ul {
  list-style: none;
}
#sidebar > .navbar > ul > li:first-child {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
#sidebar .logo {
  font-weight: 600;
  font-size: 1.25em;
}
#sidebar ul li.active a{
  color: var(--accent-color);
  svg {
    fill: var(--accent-color);
  }
}
#sidebar a, #sidebar .dropdown-btn, #sidebar .logo{
  border-radius: .5em;
  padding: .85em;
  text-decoration: none;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 1em;
}
#sidebar a:hover, #sidebar .dropdown-btn:hover {
  background-color: var(--accent-color);
}
.dropdown-btn {
width: 100%;
text-align: left;
background: none;
border: none;
font: inherit;
cursor: pointer;
}

#sidebar svg {
  flex-shrink: 0;
  fill  : var(--text-color);

}
#sidebar a span, #sidebar .dropdown-btn span {
  flex-grow: 1;
}



#sidebar .sub-menu {
  display: grid;
  transition: all .3s ease-in-out;
  grid-template-rows: 0fr;

  > div {
  overflow: hidden;
}
}

 

#sidebar .sub-menu.show {
  grid-template-rows: 1fr;

}

.dropdown-btn.rotate svg{
  transition: 200ms ease;
}
.rotate svg:last-child {
  rotate: 180deg; 
   
} 

/* Aerygrim active state when submenu open */
#sidebar > .navbar > ul > li.aerygrim-menu > .dropdown-btn.rotate,
#sidebar > .navbar > ul > li.aerygrim-menu > .dropdown-btn.rotate span.aerygrim {
  color: var(--accent-color);
}
#sidebar > .navbar > ul > li.aerygrim-menu > .dropdown-btn.rotate svg {
  fill: var(--accent-color);
}


#sidebar .sub-menu a{
  padding-left: 2em;
}

#toggle-btn{
  margin-left: auto;
  padding: 1em;
  border: none;
  border-radius: .5em;
  background: none;
  cursor: pointer;

  svg {
    transition: rotate 150ms ease;
  }
}
#toggle-btn:hover svg {
  fill: var(--accent-color);
}

body {
    min-height: 100vh;
    width: 100vw;
  background-color: var(--background-color);
  color: var(--text-color); 
  display: grid;
  grid-template-columns: 1fr;
}





.hero{
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-items: center;
    align-items: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.763)), url(/images/whimsical\ journey\ of\ the\ spacemage.jpg);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;

}
.header{
  box-sizing: border-box;
    padding: 4em;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-items: center;
    align-items: center;
}

.divider{
    display: block;
    background-color: var(--line-color);
    height: 5px;
    width: 100%;
}

.ribbon {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 50px;
  width: 100%;
}


.nav {
  display: flex;
   justify-self: center;
  gap: 2em;
  height: 50px;
}

.nav .next-chapter {
  display: block;
    color: var(--accent-color);

  
}

.next-chapter img {
  display: block;
  width: 24px;
  height: 24px;
}
.pad-size {
  gap: 1em;
  display: flex;
  position: relative;
  justify-self: start;
  justify-content: center;
  list-style: none;

}
.font-size{
  gap: 1em;
  display: flex;
  position: relative;
  justify-self: end;
  justify-content: center;
  list-style: none;
}
.add {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.minus {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
    white-space: pre-line;
  align-items: center;
  gap: 4em;
}

.content p {
    width: 900px;
justify-items: center;
   font-size: 24px;
    font-weight: 200;
    text-align: justify;
  margin: 0 0 1.5em;
  line-height: 1.5;
}

.chapter-break {
  display: block;
  text-align: center;
}

.blog-photo {
  height: 300px;
  width: 500px;
  object-fit: contain;
  position: center;
}
  
.blog-photo img{
  height: 100%;
  width: 100%;
}

.comment {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px;
}
.comment span{
  color: var(--icon-color);
}
.comment svg{
  fill: var(--icon-color);

}

@media (max-width: 800px) {
  body {
    grid-template-columns: 1fr;
  }


  #sidebar{
    height: 60px;
    width: 100%;
    border-right: none;
    border-top: 1px solid var(--line-color);
    padding: 0;
    position: fixed;
    top: unset;
    bottom: 0;
    transition: transform 300ms ease-in-out;
    z-index: 2;

    .navbar { 
      
    ul li span, ul li:first-child, .dropdown-btn svg:last-child {
    display: none;}
    
   
    > ul{
      padding: 0;
      display: grid;
      grid-auto-columns: 60px;
      grid-auto-flow: column;
      align-items: center;
      overflow-x: scroll;
      justify-content: center;
    }

    ul li {
      height: 100%;}
      
    
    ul a, ul .dropdown-btn {
      width: 60px;
      height: 60px;
      padding: 0;
      border-radius: 0;
      justify-content: center;
    }
    ul li .sub-menu.show {
      position: fixed;
      bottom: 60px;
      left: 0;
      box-sizing: border-box;
      height: 60px;
      width: 100%;
      background-color: var(--panel-color);
      border-top: 1px solid var(--accent-color);
      display: flex;
      justify-content: center;

      >div {overflow-x: auto}

      li{
        display: inline-flex;
      }
      a{box-sizing: border-box;
      padding: 1em;
    width: auto;
  justify-content: center;}

    }
  }
  }

  #sidebar.mobile-hidden {
  transform: translateY(100%);
  }


/* Mobile format */

  main {
    width: 100vw;
    overflow-x: clip;
  }

  .hero{
    width: auto;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
  }
.header{
  display: flex;
  justify-content: center;
  align-items: center;
  justify-items: center;
  align-content: center;
}
.ribbon {
  display: flex;
  flex-direction: column;
  gap: 1em;
}


.pad-size {
display: none;
}

.content p{
  padding: 1em;
    width: auto;
    text-wrap: auto;
}

}