@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@700;900&display=swap');

/* Site Header */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.site-header-brand {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #1f2937;
    text-decoration: none;
    white-space: nowrap;
    flex: 1;
}

.site-header-brand:hover {
    color: #111827;
}

.site-header-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.site-nav-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-chip);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    border: 1.5px solid #e5e7eb;
    color: #6b7280;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}

.site-nav-link:hover {
    transform: translateY(-1px);
}

.site-nav-link.active {
    color: white;
    box-shadow: 0 0 0 2px white, 0 0 0 4px rgba(0, 0, 0, 0.25);
    cursor: default;
    pointer-events: none;
}

.site-nav-link-green { border-color: #3DBD6B; color: #3DBD6B; }
.site-nav-link-green:hover { background: rgba(61,189,107,.1); }
.site-nav-link-green.active { background-color: #3DBD6B; color: white; border-color: #3DBD6B; }

.site-nav-link-blue { border-color: #4A7CF7; color: #4A7CF7; }
.site-nav-link-blue:hover { background: rgba(74,124,247,.1); }
.site-nav-link-blue.active { background-color: #4A7CF7; color: white; border-color: #4A7CF7; }

.site-nav-link-red { border-color: #F0697A; color: #F0697A; }
.site-nav-link-red:hover { background: rgba(240,105,122,.1); }
.site-nav-link-red.active { background-color: #F0697A; color: white; border-color: #F0697A; }

.site-nav-link-icon {
    font-size: 1rem;
    line-height: 1;
}

.site-header-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: flex-end;
}

/* Dark mode toggle button */
.dark-mode-toggle {
    background: none;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: var(--radius-chip);
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.dark-mode-toggle:hover {
    background: rgba(128, 128, 128, 0.15);
}

/* Auth button */
.site-header-auth {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.auth-sign-in-btn {
    background: none;
    border: 1px solid rgba(128, 128, 128, 0.35);
    border-radius: var(--radius-chip);
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: #374151;
    white-space: nowrap;
    transition: background 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.auth-sign-in-btn:hover {
    background: rgba(128, 128, 128, 0.12);
}

.auth-user-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: var(--radius-pill);
    padding: 0.2rem 0.6rem 0.2rem 0.25rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    transition: background 0.15s ease;
}

.auth-user-pill:hover {
    background: rgba(128, 128, 128, 0.1);
}

.auth-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.auth-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3b82f6;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    font-style: normal;
}

.auth-user-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-dropdown {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    min-width: 120px;
    display: none;
    z-index: 1100;
}

.auth-dropdown.open {
    display: block;
}

.auth-signout-btn {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: #374151;
    cursor: pointer;
    border-radius: var(--radius-chip);
}

.auth-signout-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Dark mode — auth */
[data-theme="dark"] .auth-sign-in-btn {
    color: #d1d5db;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .auth-sign-in-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .auth-user-pill {
    color: #d1d5db;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .auth-user-pill:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .auth-dropdown {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .auth-signout-btn {
    color: #d1d5db;
}

[data-theme="dark"] .auth-signout-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile: hide text labels, show icons only */
@media (max-width: 520px) {
    .site-header-brand {
        font-size: 0.8rem;
    }

    .site-nav-link-label {
        display: none;
    }

    .site-nav-link {
        padding: 0.375rem 0.5rem;
    }
}
