.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand img {
  display: block;
  width: auto;
  height: 64px;
  max-width: 300px;
  object-fit: contain;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  background: var(--blue);
  font-size: 0.82rem;
  letter-spacing: 0;
  font-weight: 900;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 28px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.nav a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--white);
}


/* HAMBURGER BUTTON */

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.menu-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  flex: 0 0 2px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* TABLET / MOBILE */

@media (max-width: 820px) {
  .header-inner {
    width: calc(100% - 28px);
    min-height: 72px;
    gap: 16px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand img {
    display: block;
    width: auto;
    height: 50px;
    max-width: 190px;
    object-fit: contain;
  }

  .menu-toggle {
    display: inline-flex;
    position: relative;
    z-index: 102;
  }

  .nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    z-index: 101;

    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;

    width: 100%;
    gap: 0;
    padding: 10px;

    border: 1px solid var(--border);
    border-top: 0;

    background: rgba(11, 13, 16, 0.98);

    box-shadow:
      0 22px 50px rgba(0, 0, 0, 0.45);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    display: flex;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;

    align-items: center;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    color: var(--muted);

    font-size: 0.92rem;
    font-weight: 650;
    white-space: nowrap;
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav a:hover,
  .nav a[aria-current="page"] {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
  }
}


/* SMALL MOBILE */

@media (max-width: 440px) {
  .header-inner {
    width: calc(100% - 24px);
    min-height: 68px;
    gap: 12px;
  }

  .brand img {
    height: 46px;
    max-width: 160px;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }
}


/* VERY SMALL MOBILE */

@media (max-width: 360px) {
  .header-inner {
    width: calc(100% - 20px);
  }

  .brand img {
    height: 42px;
    max-width: 140px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
  }
}