#menu-toggle {
  display: none;
}

nav {
  /** White lined separator between logo and navigation **/
  margin-left: 1.5rem; padding-left: 1rem;
  background-image: linear-gradient(hsla(0,0%,100%,0), hsla(0,0%,100%,.3) 30%, hsla(0,0%,100%,.3) 70%, hsla(0,0%,100%,0)),
                    linear-gradient(hsla(210,54%,20%,0), hsla(210,54%,20%,.3) 30%, hsla(210,54%,20%,.3) 70%, hsla(210,54%,20%,0));
  background-size: 1px, 1px, 1px;
  background-position: 0px 0px, 1px 0px, 2px 0px;
  background-repeat: no-repeat;
}

#nav {
  margin: 0; padding: 0;
  list-style-type: none;
}

/** Primary navigation items **/
#nav li {
  display: block;
  margin: 0; padding: 1px;
  float: left;
}
#nav li a {
  display: block;
  margin: 0; padding: 0.5rem 1rem;

  color: rgba(255,255,255, 0.8);
  text-decoration: none;

  font-weight: 300;
  font-size: 1.15rem;
  line-height: 100%;

  transition: color 0.2s;
}
#nav li a:hover {
  color: #FFF;
}

#nav li ul:before {
  /** This is the arrow above the hover menu **/
  content: "";
  display: block;

  width: 0; height: 0;
  margin-top: 0.75rem;
  margin-left: 1rem; /** Shift the triangle to the right a little **/

  /** CSS Hack to make a triangle. */
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #0F0838;
}

/** Secondary navigation items **/
#nav li ul {
  z-index: 1;
  display: none;
  position: absolute;
  margin: 0; padding: 0;
  min-width: 9rem;
  border-radius: 5px;
}
#nav li:hover ul {
  display: block;
}

#nav li ul li { /* Styles the body of the nav menu item's dropdowns */
  padding: 0;
  float: none;
  background-color: #0F0838;
}
#nav li ul li a { /* Styles the text of the nav menu item's dropdowns */
  color: rgba(255,255,255, 0.8);
  font-weight: 500;
}
#nav li ul li a:hover {
  color:rgba(255,255,255, 1);
}

#nav li ul li:first-child { /* Adds rounded corners to dropdowns */
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
#nav li ul li:last-child {
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}
#nav li ul li + li { /* Styles divider lines for dropdowns */
  border-top: 1px solid rgba(255,255,255, 0.35);
}

/** Styles everything for mobile **/
@media screen and (max-width: 810px) {
  .menu-tangles {
    height: .4rem;
    width: 2rem;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
    background-color: #FFD000;
    margin-bottom: 4px;
  }
  #menu-toggle {
    order: 0;
    margin-right: 10px;
    display: block;
    width: 2rem; height: 2rem;
    -webkit-transition: .25s ease-in-out;
    -moz-transition: .25s ease-in-out;
    -o-transition: .25s ease-in-out;
    transition: .25s ease-in-out;
    margin-bottom: 4px;
  }
  #menu-toggle.rotate {
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    transform: rotate(90deg);
}

  #header h1 {
    order: 1;
    flex: 1;
  }

  nav {
    padding: 0; margin: 0;
  }

  #nav::before { /* Styles triangle of whole nav bar dropdown */
    content: "";
    display: block;

    width: 0; height: 0;
    margin-left: 1rem;

    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #0F0838;
  }

  #nav {
    display: none;
    z-index: 1;
    position: absolute;
    margin: 2rem 0 0 -3rem; padding: 0;
    max-width: 10.25rem;
    border-radius: 5px;
  }

  #nav.show {
    display: block;
  }

  #nav li { /* Styles dropdown for whole nav bar */
    display: block;
    width: 100%;
    background-color: #0F0838;
  }

  #nav li a {
    display: block;
    margin: 0; padding: 5px 12px;
    color: rgba(255,255,255, 0.8);
  }
  #nav li a:hover {
    color: rgba(255,255,255, 1);
  }

  #nav li:first-child {
    border-radius: 5px 5px 0 0;
  }

  #nav li:last-child {
    border-radius: 0 0 5px 5px;
  }

  #nav li + li {
    border-top: 2.5px solid rgba(255,255,255, 0.25);
    margin: 0;
  }
  #nav li ul {
    margin-left: 10.9rem;
    margin-top: -2.25rem;
  }
  #nav li ul a {
    font-size: 1.025rem;
  }
  /* Moves triangle for secondary dropdowns to side */
  #nav li ul:before {
    transform: rotate(270deg);
    margin-bottom: -1.25rem;
    margin-left: -.9rem;
  }
}
