@media (max-width: 768px) {
  .site-header {
    background: rgba(0, 24, 18, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text);
    padding: 6px 0;
  }

  .site-header .container {
    padding: 8px 12px;
  }

  .header-inner {
    padding: 8px 0;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .header-left {
    gap: 6px;
    min-width: 0;
  }

  .brand {
    display: none;
  }

  .header-actions {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    margin-top: 2px;
  }

  .nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    overflow: visible;
  }

  .nav-item {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    white-space: nowrap;
  }

  .nav-item:hover,
  .nav-item:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  }

  [data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(15, 23, 43, 0.12);
    color: var(--text);
  }

  [data-theme="light"] .nav-item {
    color: #02202f;
    border-color: rgba(15, 23, 43, 0.35);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 1px rgba(15, 23, 43, 0.1);
  }

  [data-theme="light"] .theme-toggle {
    border-color: rgba(15, 23, 43, 0.4);
  }

  [data-theme="light"] .theme-toggle .toggle-icon {
    border-color: rgba(15, 23, 43, 0.5);
    background: rgba(15, 23, 43, 0.08);
  }

  .theme-toggle {
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    flex-shrink: 0;
    order: 2;
    align-items: center;
    justify-content: center;
    gap: 0;
    display: none !important;
  }

  .theme-toggle .toggle-text {
    display: none !important;
  }

  .theme-toggle .toggle-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .profile-menu {
    order: 3;
    margin-left: 4px;
    display: flex !important;
  }

  .profile-button {
    width: 36px;
    height: 36px;
    border-width: 1px;
  }
}

@media (max-width: 480px) {
  .nav {
    gap: 4px;
    padding: 3px 4px;
  }

  .nav-item {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .theme-toggle {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: none !important;
  }

  .theme-toggle .toggle-icon {
    width: 8px;
    height: 8px;
  }

  .profile-button {
    width: 33px;
    height: 33px;
  }
}
