nav {
  position: absolute;
  top: 0;
  height: 10rem;
  width: 100%;
  z-index: 1;
}
.left-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  float: left;
  height: 100%;
  width: 6rem;
}
.logo-nav {
  cursor: pointer;
  user-select: none;
  width: 3rem;
  height: auto;
  margin-left: 16px;
}
.logo-svg {
  fill: var(--secondary);
}
.right-nav {
  display: flex;
  align-items: center;
  float: right;
  margin-right: 4em;
  height: 100%;
  max-height: 20em;
}
.right-nav div {
  cursor: pointer;
  margin: 0 1em;
}
.right-nav div span {font-size: 0.9em;}
.right-nav div span::after {
  content: '';
  background: #b8c7ff;
  display: block;
  height: 0.1em;
  width: 0;
  transition: width 0.2s;
}
.collapsed-nav {
  display: none;
  align-items: center;
  float: right;
  padding-right: 1.4em;
  height: 100%;
}
.collapsed-nav div div {
  width: 1.3em;
  height: 0.15em;
  background-color: var(--text-1);
  border-radius: 0.1em;
  margin: 0.2em 0;
  transition: 0.4s ease-out;
}
.toggled-nav div:nth-child(1) {transform: rotate(-45deg) translate(-6px, 4.8px);}
.toggled-nav div:nth-child(2) {opacity: 0;}
.toggled-nav div:nth-child(3) {transform: rotate(45deg) translate(-7.2px, -7.2px);}


div span.active-nav::after {width:100%;}
.right-nav div:hover span::after {width: 100%;}

div#toggle-theme {
  position: relative;
  cursor: pointer;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 56px;
  height: 30px;
  margin-right: 0.8em;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}
div#toggle-theme::before {
  position: absolute;
  content: "";
  border-radius: 50%;
  height: 26px;
  width: 26px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

div#toggle-theme.toggled {
  background-color: #2196F3;
}

div#toggle-theme:hover {
  box-shadow: 0 0 1px #2196F3;
}

div#toggle-theme.toggled::before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

.right-nav.show-nav {
  padding-top: 5rem;
  height: 20rem;
  top: 0;
}

@media only screen and (max-width:620px) {
  nav {height: 5rem;}
  .right-nav {
    box-shadow: -1px -1px 3px rgba(255, 255, 255, 0.25), 1.5px 1.5px 3px rgba(0, 0, 0, 0.4);
    background-color: var(--bg);
    position: absolute;
    display: block;
    float: none;
    z-index: -1;
    width: 100%;
    top: -100%;
    overflow-y: hidden;
    transition: .4s ease-out;
  }
  .right-nav div {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    width: 100%;
    height: 5rem;
  }
  #string {display:none;}
  #light {display:none;}
  .collapsed-nav {display: flex;}
}
