.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(8, 11, 12, 0.7) 0%,
    rgba(8, 11, 12, 0.34) 72%,
    transparent 100%
  );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.site-header__inner {
  width: min(1280px, calc(100% - 96px));
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-header__left,
.site-header__nav,
.site-header__lang-button,
.site-header__link,
.site-header__logo {
  display: flex;
  align-items: center;
}

.site-header__left {
  gap: 28px;
}

.site-header__nav {
  gap: 30px;
}

.site-header__lang-button {
  width: 84px;
  height: 32px;
  padding: 0;
  justify-content: center;
  background: transparent;
}

.site-header__lang-switch {
  width: 84px;
  height: auto;
  object-fit: contain;
  transition: transform 0.24s ease;
}

.site-header__lang-button:hover .site-header__lang-switch,
.site-header__lang-button:focus-visible .site-header__lang-switch {
  transform: translateY(-1px) scale(1.03);
}

.site-header__link {
  position: relative;
  width: 112px;
  min-height: 42px;
  justify-content: center;
  text-decoration: none;
}

.site-header__link::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112px;
  height: 22px;
  pointer-events: none;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  transform: translate(-50%, -50%);
  transition: transform 0.28s ease, filter 0.28s ease;
}

.site-header__link[href="#about"]::before {
  background-image: url("../assets/imgs/Header/about me.png");
}

.site-header__link[href="#about"].is-active::before,
.site-header__link[href="#about"]:active::before {
  background-image: url("../assets/imgs/Header/about me klick.png");
}

.site-header__link[href="#skills"]::before {
  background-image: url("../assets/imgs/Header/skills.png");
}

.site-header__link[href="#skills"].is-active::before,
.site-header__link[href="#skills"]:active::before {
  background-image: url("../assets/imgs/Header/skills klick.png");
}

.site-header__link[href="#projects"]::before {
  background-image: url("../assets/imgs/Header/projects.png");
}

.site-header__link[href="#projects"].is-active::before,
.site-header__link[href="#projects"]:active::before {
  background-image: url("../assets/imgs/Header/projects klick.png");
}

.site-header__link-hover {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  width: 12px;
  height: 12px;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px) scale(0.75);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.site-header__link:hover::before,
.site-header__link:focus-visible::before {
  transform: translate(-50%, calc(-50% - 2px));
}

.site-header__link:hover .site-header__link-hover,
.site-header__link:focus-visible .site-header__link-hover,
.site-header__link.is-active .site-header__link-hover {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.site-header__logo {
  position: relative;
  width: 150px;
  height: 58px;
  justify-content: flex-end;
  text-decoration: none;
}

.site-header__logo picture {
  position: absolute;
  right: 0;
  top: 0;
  display: block;
  width: 150px;
  height: 58px;
}

.site-header__logo-image {
  position: absolute;
  right: 0;
  top: 0;
  width: 150px;
  height: auto;
  object-fit: contain;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.site-header__logo-image--default {
  opacity: 1;
}

.site-header__logo-image--hover {
  opacity: 0;
}

.site-header__logo:hover .site-header__logo-image--default,
.site-header__logo:focus-visible .site-header__logo-image--default {
  opacity: 0;
  transform: scale(1.02);
}

.site-header__logo:hover .site-header__logo-image--hover,
.site-header__logo:focus-visible .site-header__logo-image--hover {
  opacity: 1;
  transform: scale(1.02);
}

.site-header__lang-button:focus-visible,
.site-header__link:focus-visible,
.site-header__logo:focus-visible {
  outline: 1px solid rgba(57, 232, 212, 0.88);
  border-radius: 999px;
}

.site-header__lang-button:focus-visible,
.site-header__logo:focus-visible {
  outline-offset: 8px;
}

.site-header__link:focus-visible {
  outline-offset: 10px;
}

.site-header__menu-toggle {
  display: none;
}

@media (max-width: 1320px) {
  .site-header__inner,
  .site-header__left,
  .site-header__nav {
    gap: 22px;
  }

  .site-header__link,
  .site-header__link::before {
    width: 102px;
  }

  .site-header__logo,
  .site-header__logo picture,
  .site-header__logo-image {
    width: 140px;
  }
}

@media (max-width: 1180px) {
  .site-header__inner {
    min-height: 74px;
  }

  .site-header__lang-button,
  .site-header__lang-switch {
    width: 76px;
  }

  .site-header__nav {
    gap: 16px;
  }

  .site-header__link,
  .site-header__link::before {
    width: 92px;
  }

  .site-header__link {
    min-height: 40px;
  }

  .site-header__link::before {
    height: 20px;
  }

  .site-header__logo,
  .site-header__logo picture,
  .site-header__logo-image {
    width: 126px;
  }

  .site-header__logo,
  .site-header__logo picture {
    height: 50px;
  }
}

@media (max-width: 980px) {
  .site-header__inner,
  .site-header__left {
    gap: 18px;
  }

  .site-header__nav {
    gap: 12px;
  }

  .site-header__link,
  .site-header__link::before {
    width: 82px;
  }

  .site-header__link-hover {
    top: 100%;
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 768px) {
  .site-header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-header__inner {
    position: relative;
    width: calc(100% - var(--responsive-gutter));
    min-height: 104px;
    padding: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0;
  }

  .site-header__logo {
    order: 1;
    width: 64px;
    height: 64px;
    margin: 0;
    overflow: visible;
    justify-content: flex-start;
  }

  .site-header__logo picture {
    left: 0;
    right: auto;
    top: 0;
    width: 64px;
    height: 64px;
  }

  .site-header__logo-image {
    left: 0;
    right: auto;
    top: 0;
    width: 64px;
    max-width: none;
  }

  .site-header__logo-image--default {
    content: url("../assets/imgs/Header/logo_responsive.png");
  }

  .site-header__logo-image--hover {
    display: none;
  }

  .site-header__logo:hover .site-header__logo-image--default,
  .site-header__logo:focus-visible .site-header__logo-image--default {
    opacity: 1;
    transform: none;
  }

  .site-header__menu-toggle {
    position: relative;
    z-index: 1003;
    order: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: transparent;
  }

  .site-header__menu-toggle span {
    width: 34px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
    transition: opacity 0.24s ease;
  }

  body.mobile-menu-open .site-header__menu-toggle span:nth-child(1),
  body.mobile-menu-open .site-header__menu-toggle span:nth-child(2),
  body.mobile-menu-open .site-header__menu-toggle span:nth-child(3) {
    opacity: 1;
    transform: none;
  }

  .site-header__left {
    position: fixed !important;
    top: 59px !important;
    left: 50vw !important;
    right: auto !important;
    z-index: 1002;

    width: 238px !important;
    min-width: 238px !important;
    max-width: 238px !important;

    height: 252px !important;
    min-height: 252px !important;
    max-height: 252px !important;

    padding: 42px 0 37px;
    border: 1px solid var(--accent);
    border-radius: 30px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 28px;

    background:
      radial-gradient(circle at 100% 0%, rgba(57, 232, 212, 0.2), transparent 52%),
      linear-gradient(105deg, rgba(28, 29, 29, 0.98) 0%, rgba(25, 27, 27, 0.98) 43%, rgba(5, 66, 56, 0.98) 100%);

    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    overflow: visible;

    transform: translate3d(-50%, -8px, 0) !important;
    transform-origin: top center;
    transition: opacity 0.24s ease, transform 0.24s ease;
    contain: layout paint style;
  }

  body.mobile-menu-open .site-header__left {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(-50%, 0, 0) !important;
  }

  .site-header__nav {
    order: 1;
    width: 100%;
    height: 107px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 29px;
  }

  .site-header__link {
    width: 168px !important;
    min-width: 168px !important;
    max-width: 168px !important;
    height: 20px;
    min-height: 20px;
    justify-content: center;
    flex: 0 0 auto;
  }

  .site-header__link::before {
    position: static;
    display: block;
    width: 168px;
    height: 20px;
    background: none !important;
    transform: none;
    text-align: center;
    white-space: nowrap;

    font-family: "IBM Plex Mono", monospace;
    font-size: 18px;
    line-height: 20px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #ffffff;
  }

  .site-header__link[href="#about"]::before {
    content: "About me";
  }

  .site-header__link[href="#skills"]::before {
    content: "Skills";
  }

  .site-header__link[href="#projects"]::before {
    content: "Projects";
  }

  html[lang="de"] .site-header__link[href="#about"]::before {
    content: "Über mich";
  }

  html[lang="de"] .site-header__link[href="#skills"]::before {
    content: "Fähigkeiten";
  }

  html[lang="de"] .site-header__link[href="#projects"]::before {
    content: "Projekte";
  }

  .site-header__link:hover::before,
  .site-header__link:focus-visible::before {
    color: var(--accent);
    transform: none;
  }

  .site-header__link-hover {
    display: none;
  }

  .site-header__lang-button {
    order: 2;
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    height: 30px;
    margin-top: 2px;
    flex: 0 0 84px;
  }

  .site-header__lang-switch {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    height: auto;
    display: block;
    object-fit: contain;
  }

  body.is-language-switching .site-header__left,
  body.is-language-switching .site-header__link::before,
  body.is-language-switching .site-header__lang-switch {
    transition: none !important;
  }

  body.is-language-switching.mobile-menu-open .site-header__left {
    left: 50vw !important;
    right: auto !important;
    transform: translate3d(-50%, 0, 0) !important;
  }
}