.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface-header);
  border-bottom: 1px solid var(--color-border-subtle);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  min-height: var(--size-header);
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-body-size);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.header__mark {
  display: block;
  flex: none;
  width: var(--size-mark);
  height: var(--size-mark);
  border-radius: var(--radius-pill);
}

.header__name-accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header__nav {
  display: flex;
  gap: var(--space-lg);
  margin-inline: auto;
}


.header__theme {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.header__theme:hover {
  background: var(--color-accent-soft);
  color: var(--color-text-primary);
}

.header__theme-icon {
  width: 20px;
  height: 20px;
}

.header__theme-icon--moon {
  display: none;
}

:root[data-theme="light"] .header__theme-icon--sun {
  display: none;
}

:root[data-theme="light"] .header__theme-icon--moon {
  display: block;
}

.header__nav-link {
  color: var(--color-text-secondary);
  font-size: var(--text-small-size);
  transition: color var(--duration-fast) var(--ease-out);
}

.header__nav-link:hover {
  color: var(--color-text-primary);
}

.header__account {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}

.header__user {
  max-width: 220px;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: var(--text-small-size);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .header__user {
    display: none;
  }
}

@media (max-width: 767px) {
  .header__nav {
    display: none;
  }

  .header__account {
    margin-left: auto;
  }
}
