/* _variables.scss */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 9999;
  border-bottom: 1px solid var(--divider-color);
  background-color: var(--bg-color);
}
.header header {
  margin: 0 auto;
  height: var(--header-height);
  display: flex;
  justify-content: center;
}
.header .spacer {
  flex-grow: 1;
}

@media screen and (max-width: 780px) {
  .header {
    padding: 0 1em;
  }
}
@media screen and (min-width: 780px) {
  .header {
    padding: 0 4em;
  }
  .header header {
    width: 70%;
  }
}
@media screen and (min-width: 2400px) {
  .header header {
    width: 60%;
  }
}
.header .logo a {
  height: var(--header-height);
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color);
}
.header .logo img {
  width: 3em;
  height: 3em;
}
.header .logo .text {
  margin-left: 1em;
}

@media screen and (min-width: 780px) {
  .header .menu {
    display: flex;
  }
  .header .menu-icon {
    display: none;
  }
  .header .menu-container {
    display: flex;
    align-items: center;
  }
  .header .nav {
    display: flex;
  }
  .header .nav a {
    display: block;
    height: var(--header-height);
    line-height: var(--header-height);
    padding: 0 1em;
  }
  .header .divider {
    display: flex;
    align-items: center;
  }
  .header .divider:before {
    content: "";
    width: 1px;
    margin-left: 8px;
    margin-right: 16px;
    height: 24px;
    background-color: var(--divider-color);
  }
}
@media screen and (max-width: 780px) {
  .header .menu-icon {
    height: var(--header-height);
    position: relative;
    display: flex;
    align-items: center;
  }
  .header .menu-icon img {
    width: 2em;
    height: 2em;
  }
  .header .menu-icon .bars, .header .menu-icon .close {
    width: 2em;
    height: 2em;
    background-size: contain;
    background-repeat: no-repeat;
  }
  .header .menu-icon .bars {
    display: block;
    background-image: var(--menu-bars);
  }
  .header .menu-icon .close {
    display: none;
    background-image: var(--menu-close);
  }
  .header .menu-container {
    position: absolute;
    width: 100%;
    padding: 2em;
    top: var(--header-height);
    right: 0;
    display: none;
  }
  .header .menu.open .menu-icon .bars {
    display: none;
  }
  .header .menu.open .menu-icon .close {
    display: block;
  }
  .header .menu.open .menu-container {
    height: calc(100vh - var(--header-height));
    display: block;
    background-color: var(--bg-color);
  }
  .header .nav div {
    position: relative;
  }
  .header .nav a {
    display: block;
    width: 100%;
    height: 2em;
    line-height: 2em;
    margin: 1em 0;
  }
  .header .nav div:after {
    position: absolute;
    top: 3em;
    height: 1px;
    width: 100%;
    background-color: var(--divider-color);
  }
  .header .theme-switcher-wrapper, .header .gitlab {
    height: 2em;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
.header .nav div:hover a, .header .nav div.active a {
  color: var(--brand-color-1);
}
.header .nav a {
  text-align: center;
  text-decoration: none;
  color: var(--color);
}

.theme-switcher {
  position: relative;
  border-radius: 11px;
  display: block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  border: 1px solid var(--theme-switcher-border-color);
  background-color: var(--theme-switcher-bg-color);
  transition: border-color 0.25s;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
  pointer-events: auto;
}
.theme-switcher .check {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--bg-color);
  box-shadow: var(--theme-switcher-box-shadow);
  transition: 0.25;
}
.theme-switcher .icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  overflow: hidden;
}
.theme-switcher .icon .sun, .theme-switcher .icon .moon {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  color: var(--theme-switcher-icon-color);
  transition: opacity 0.25s;
  mask-size: 100% 100%;
  background-color: currentColor;
}
.theme-switcher .sun {
  opacity: var(--theme-switcher-icon-sun-opacity);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E") no-repeat;
}
.theme-switcher .moon {
  opacity: var(--theme-switcher-icon-moon-opacity);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E") no-repeat;
}

.theme-switcher:hover .check {
  border-color: var(--brand-color-1);
}

html[data-theme=dark] .theme-switcher .check {
  transform: translate(18px);
}

.gitlab a {
  display: flex;
  align-items: center;
}
.gitlab a img {
  width: 1.25em;
  height: 1.25em;
}