:root {
  --site-header-bg: rgba(255, 255, 255, 0.86);
  --site-header-border: rgba(24, 26, 46, 0.13);
  --site-header-text: #181a2e;
  --site-header-muted: #5a5d7a;
  --site-header-accent: #4f46e5;
  --site-header-accent-strong: #3730a3;
  --site-header-toggle-track: rgba(79, 70, 229, 0.18);
  --site-header-shadow: 0 16px 42px rgba(24, 26, 46, 0.12);
  --site-header-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

:root[data-theme="dark"],
html[data-theme="dark"] {
  --site-header-bg: rgba(13, 14, 26, 0.86);
  --site-header-border: rgba(238, 240, 248, 0.12);
  --site-header-text: #eef0f8;
  --site-header-muted: #9a9dc0;
  --site-header-accent: #818cf8;
  --site-header-accent-strong: #a5b4fc;
  --site-header-toggle-track: rgba(129, 140, 248, 0.22);
  --site-header-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

body.has-site-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: min(1400px, 90vw);
  margin: 0 auto;
  padding: 14px 0 12px;
  font-family: var(--site-header-font);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  border: 1px solid var(--site-header-border);
  border-radius: 8px;
  background: var(--site-header-bg);
  box-shadow: var(--site-header-shadow);
  backdrop-filter: blur(18px);
  padding: 10px 12px 10px 14px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border-radius: 8px;
  color: var(--site-header-text);
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 8px 4px 4px;
  margin-left: -4px;
}

.site-brand:hover,
.site-brand:focus-visible {
  background: rgba(79, 70, 229, 0.1);
}

.site-brand:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.25);
  outline-offset: 2px;
}

.site-brand__mark {
  width: 48px;
  height: 48px;
}

:root[data-theme="dark"] .site-brand__mark,
html[data-theme="dark"] .site-brand__mark {
  color: #052e2b;
}

.site-brand__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.site-brand__text {
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  font-size: 1.17rem;
}

.site-brand__credit {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--site-header-muted);
  line-height: 1.2;
  white-space: nowrap;
}

.site-brand__subtext {
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(79, 70, 229, 0.12);
  color: var(--site-header-accent);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

:root[data-theme="dark"] .site-brand__subtext,
html[data-theme="dark"] .site-brand__subtext {
  background: rgba(129, 140, 248, 0.15);
  color: var(--site-header-accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.site-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.site-menu-toggle {
  appearance: none;
  display: none;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--site-header-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
  color: var(--site-header-text);
  cursor: pointer;
  margin: 0;
  padding: 0;
  font: inherit;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible,
.site-menu-toggle[aria-expanded="true"] {
  border-color: var(--site-header-accent);
  background: rgba(79, 70, 229, 0.12);
}

.site-menu-toggle:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.25);
  outline-offset: 2px;
}

.site-menu-toggle svg {
  display: block;
  width: 27px;
  height: 27px;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--site-header-muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__link--social {
  border: 1px solid var(--site-header-border);
  color: var(--site-header-text);
  background: rgba(255, 255, 255, 0.34);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--site-header-text);
  background: rgba(79, 70, 229, 0.1);
}

.site-nav__link:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.25);
  outline-offset: 2px;
}

.site-nav__link[aria-current="page"] {
  background: var(--site-header-accent);
  color: #ffffff;
}

:root[data-theme="dark"] .site-nav__link[aria-current="page"],
html[data-theme="dark"] .site-nav__link[aria-current="page"] {
  color: #052e2b;
}

.site-header .site-theme-toggle {
  appearance: none;
  align-self: center;
  display: inline-grid;
  grid-template-columns: 18px 36px 18px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 38px;
  height: 38px;
  border: 1px solid var(--site-header-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  color: var(--site-header-text);
  box-shadow: 0 8px 20px rgba(30, 49, 71, 0.08);
  cursor: pointer;
  margin: 0;
  padding: 5px 8px;
  font: inherit;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.site-header .site-theme-toggle:hover,
.site-header .site-theme-toggle:focus-visible {
  border-color: var(--site-header-accent);
  background: rgba(79, 70, 229, 0.12);
}

.site-header .site-theme-toggle:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.25);
  outline-offset: 2px;
}

.site-theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--site-header-muted);
  line-height: 1;
}

.site-theme-toggle__icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.site-theme-toggle__track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--site-header-toggle-track);
}

.site-theme-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--site-header-accent);
  box-shadow: 0 3px 8px rgba(30, 49, 71, 0.2);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

:root[data-theme="dark"] .site-theme-toggle__thumb,
html[data-theme="dark"] .site-theme-toggle__thumb {
  transform: translateX(16px);
}

:root[data-theme="dark"] .site-header .site-theme-toggle,
html[data-theme="dark"] .site-header .site-theme-toggle {
  background: rgba(12, 18, 19, 0.34);
}

:root[data-theme="dark"] .site-menu-toggle,
html[data-theme="dark"] .site-menu-toggle {
  background: rgba(12, 18, 19, 0.34);
}

:root[data-theme="dark"] .site-nav__link--social,
html[data-theme="dark"] .site-nav__link--social {
  background: rgba(12, 18, 19, 0.22);
}




