/* ---------- Site header ---------- */
.site-header {
    border-bottom: 1px solid var(--border);
    background-color: color-mix(in srgb, var(--surface) 70%, transparent);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
}

@media (min-width: 640px) {
    .site-header-inner {
        padding: 1.25rem 2rem;
    }
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.site-brand[href] {
    text-decoration: none;
    color: inherit;
}

.site-brand[href]:hover {
    text-decoration: none;
    color: inherit;
}

.site-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
}

.site-header h1 {
    display: none;
    font-size: 1.35rem;
}

@media (min-width: 640px) {
    .site-header h1 {
        display: block;
    }
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 640px) {
    .site-actions {
        gap: 1.5rem;
    }
}

.site-nav {
    display: flex;
    align-items: center;
}

.nav-link {
    font-family: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    font-weight: 600;
    color: var(--text);
}

.nav-link:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ---------- Theme toggle button ---------- */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background-color: var(--bg-alt);
    color: var(--text);
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle:hover {
    background-color: var(--border);
}

.theme-toggle:active {
    transform: scale(0.92);
}

.theme-toggle svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Show/hide sun vs moon icon based on active theme */
.theme-toggle .icon-sun {
    display: none;
}

.theme-toggle .icon-moon {
    display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}
