.header-link-group,
.header-auth-link-group {
    display: contents;
}

.nav {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin: 0;
    padding: 1.5rem 2rem;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    text-decoration: none;
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
}

.logo-mark {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex: 0 0 auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    margin-left: 0;
    color: inherit;
    text-decoration: none;
    font-size: 0.95rem;
}

.nav .btn {
    text-align: center;
    display: inline-block;
    padding: 0.75rem 0.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    margin: 0;
    font-size: 0.95rem;
    min-width: 120px;
}

.auth-user {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.auth-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.15);
    background-size: cover;
    background-position: center;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.auth-name {
    font-size: 0.9rem;
    white-space: nowrap;
}

.auth-logout {
    margin: 0;
}

.nav-links .auth-logout-btn {
    margin: 0;
    min-width: auto;
    padding: 0.55rem 0.9rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: inherit;
}

.nav-links .auth-logout-btn:hover {
    border-color: var(--accent, currentColor);
}

.hidden {
    display: none !important;
}

.nav .btn:hover {
    opacity: 0.8;
    outline: currentColor 2px solid;
    animation: header-btn-bold 0.3s forwards;
}

.nav .btn:active {
    animation: header-btn-click 0.5s ease;
}

@keyframes header-btn-bold {
    0% {
        font-weight: 400;
    }

    100% {
        font-weight: 600;
    }
}

@keyframes header-btn-click {
    20% {
        transform: translateY(5px) translateX(5px);
    }
}

@media (max-width: 760px) {
    .nav {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.25rem;
    }

    .nav-links {
        justify-content: center;
    }
}
