:root {
  --site-header-bg: #ffffff;
  --site-header-text: #050505;
  --site-header-muted: #5f5f5f;
  --site-header-border: #d8d8d8;
  --site-header-border-strong: #a3a3a3;
  --site-header-hover: rgba(0, 0, 0, 0.06);
  scrollbar-gutter: stable;
}

[data-theme="dark"] {
  --site-header-bg: #000000;
  --site-header-text: #ffffff;
  --site-header-muted: #a3a3a3;
  --site-header-border: #292929;
  --site-header-border-strong: #525252;
  --site-header-hover: rgba(255, 255, 255, 0.07);
}

.site-header {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--site-header-border);
  font-family: "Inter", Arial, sans-serif;
}

body.cv-page .site-header {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  border-bottom: 0;
}

.site-brand {
  display: grid;
  gap: 3px;
  color: var(--site-header-text);
  text-decoration: none;
  border: 0;
}

.site-brand strong {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.6px;
  line-height: 1.05;
}

.site-brand span {
  color: var(--site-header-muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
}

.site-nav a,
.site-nav button,
.site-cv-menu summary {
  margin: 0;
  padding: 7px 9px;
  color: var(--site-header-text);
  background: transparent;
  border: 0;
  border-radius: 3px;
  font: 500 13px/1.2 "Inter", Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.site-cv-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.site-cv-menu > .site-nav-cv {
  padding-right: 5px;
}

.site-cv-menu details {
  position: relative;
}

.site-cv-menu summary {
  display: inline-flex;
  min-width: 24px;
  align-items: center;
  justify-content: center;
  padding-right: 7px;
  padding-left: 3px;
  list-style: none;
  user-select: none;
}

.site-cv-menu summary::-webkit-details-marker {
  display: none;
}

.site-cv-menu summary:hover,
.site-cv-menu details[open] summary {
  color: var(--site-header-text);
  background: var(--site-header-hover);
}

.site-cv-options {
  position: absolute;
  z-index: 100;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  min-width: 174px;
  padding: 5px;
  background: var(--site-header-bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.site-cv-options a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 10px;
  white-space: nowrap;
}

.site-cv-options small {
  color: var(--site-header-muted);
  font-size: 9px;
  font-weight: 400;
}

.site-nav a:hover,
.site-nav button:hover {
  color: var(--site-header-text);
  background: var(--site-header-hover);
}

#theme-toggle {
  min-width: 99px;
  padding: 7px 10px;
  color: var(--site-header-text);
  background: transparent;
  border: 1px solid var(--site-header-border-strong);
  border-radius: 3px;
  font: 500 13px/1.2 "Inter", Arial, sans-serif;
}

#theme-toggle:hover {
  color: var(--site-header-bg);
  background: var(--site-header-text);
  border-color: var(--site-header-text);
}

@media (max-width: 680px) {
  .site-header {
    min-height: 62px;
    gap: 10px;
    padding: 9px 0;
  }

  body.cv-page .site-header {
    width: calc(100% - 24px);
  }

  .site-brand strong {
    font-size: 16px;
  }

  .site-brand {
    min-height: 40px;
    align-content: center;
  }

  .site-brand span {
    font-size: 8px;
  }

  .site-nav a:not(.site-nav-cv) {
    display: none;
  }

  .site-nav a,
  .site-nav button,
  .site-cv-menu summary {
    display: inline-flex;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 7px 8px;
    font-size: 10px;
  }

  .site-cv-options a {
    display: flex !important;
    min-height: 38px;
    justify-content: space-between;
    font-size: 11px;
  }

  #theme-toggle {
    min-width: 82px;
    min-height: 40px;
    padding: 7px 9px;
    font-size: 10px;
  }
}
