navigation {
  position: relative;
  z-index: 100;
}

navigation > nav {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  height: 62px;
  font: 15px var(--font-monospace);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  transition: background 0.2s ease;
  background: var(--color-background-dark);
  overflow: hidden;
}

navigation .title {
  position: absolute;
  left: 50%;
  top: 50%;
  line-height: 0px;
  transform: translate(-50%, -50%);
  color: var(--color-primary);
  text-decoration: none;
}

navigation .title h1 {
  margin: 0;
  letter-spacing: 1.2px;
  font-size: 18px;
  text-transform: uppercase;
}

navigation > nav .background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-background-dark);
  /* background: rgba(255, 255, 255, 1);*/
}

svg[data-id="github-logo"] {
  width: 18px;
  height: 18px;
  margin-left: 20px;
  margin-top: 2px;
}

body#index > nav .background {
  background: var(--color-theme-accent);
}

navigation > nav a {
  -webkit-user-drag: none;
  transition: border-bottom .2s ease;
  border-bottom: 1px solid transparent;
}

navigation > nav a.with-hover:hover {
  border-bottom: 1px solid var(--x-primary);
}

navigation > nav a.logo {
  width: auto;
  display: grid;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.2s ease;
  text-align: center;
  align-items: center;
  justify-items: center;
  margin: auto;
  height: 136px;
}

navigation > nav a.logo img {
  width: 120px;
}

navigation > nav.scrolling a.logo svg {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.2s ease;
}

navigation > nav.scrolling a.logo:hover svg {
  opacity: 1;
  transform: translateY(-50px);
}

navigation > nav a.logo .hover {
  opacity: 1;
  padding: 0px;
  line-height: 24px;
  text-align: center;
  transform: translateY(0px);
  transition: all 0.2s ease;
  font-family: var(--font-monospace);
}

navigation > nav.scrolling a.logo:hover .hover {
  opacity: 1;
  transform: translateY(-50px);
  height: 48px;
}

navigation > nav .links-left,
navigation > nav .links-right {
  position: absolute;
  top: 22px;
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 20px;
  text-transform: uppercase;
}

navigation > nav .links-left {
  left: 10px;
}

navigation > nav .links-right {
  right: 10px;
}

navigation > nav .menu {
  display: none;
  width: 30px;
  height: 24px;
  position: absolute;
  top: 26px;
  right: 20px;
  cursor: pointer;
}

@media (max-width: 699px) {
  body.api > nav .background {
    opacity: 1;
  }

  navigation > nav .links-left,
  navigation > nav .links-right {
    display: none;
  }

  body main, #split-main {
    top: 0;
  }

  x-split-right {
    width: 100% !important;
  }

  .x--split-handle {
    display: none !important;
  }

  x-split-left {
    transform: translateX(-100%);
  }

  navigation > nav {
    padding-top: 0px;
  }

  body.api > nav .menu {
    display: block;
    position: absolute;
  }

  navigation > nav .menu {
    border-top: 2px solid;
    border-bottom: 2px solid;
  }

  navigation > nav .menu:after {
    position: absolute;
    content: ' ';
    top: 50%;
    border-top: 2px solid;
    left: 0;
    right: 0;
    margin-top: -1px;
  }

  x-split-left {
    width: 100% !important;
    transform: translate(-100%);
    transition: transform .2s ease;
  }

  x-split-right {
    transform: translate(0%);
    transition: transform .2s ease;
  }

  body[toc] x-split-right {
    transform: translate(100%);
  }

  body[toc] x-split-left {
    transform: translate(0%);
  }

  body#guides a:not(:first-of-type, .cyoa) {
    display: none;
  }
}
