.header-gradient {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 96px;
background: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent);
z-index: 2;
pointer-events: none;
}

header {
position: absolute;
top: 6px;
left: 0;
width: 100%;
padding: 16px 64px;
display: flex;
justify-content: space-between;
align-items: center;
background: transparent;
z-index: 3;
}

.logo {
display: flex;
align-items: center;
gap: 12px;
font-size: 1.05rem;
font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
font-weight: 500;
letter-spacing: 0.04em;
text-transform: uppercase;
}

.logo picture {
display: block;
}

.logo img {
width: 120px;
height: auto;
display: block;
}

nav {
display: flex;
gap: 28px;
font-size: 0.9rem;
align-items: center;
}

nav a {
display: inline-flex;
align-items: center;
text-decoration: none;
color: #f5f5f5;
font-weight: 500;
transition: color 0.2s ease-in-out;
}

.nav-links {
display: flex;
gap: 28px;
align-items: center;
}

.nav-actions {
display: flex;
gap: 16px;
align-items: center;
}

.nav-app-button {
display: none;
text-decoration: none;
border-radius: 999px;
padding: 10px 18px;
font-weight: 600;
}

.mobile-nav-header {
display: none;
align-items: center;
justify-content: space-between;
gap: 16px;
width: 100%;
}

.mobile-nav-logo {
width: 120px;
height: auto;
}

.mobile-nav-close {
width: 38px;
height: 38px;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.08);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
}

.mobile-nav-close img {
width: 16px;
height: 16px;
}

.login-button {
border: 2px solid #f5f5f5;
border-radius: 999px;
padding: 6px 16px;
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.login-button:hover {
background-color: #f5f5f5;
color: #0f0f0f;
}

.contact-link:hover {
text-decoration: underline;
}

.nav-toggle {
display: none;
}

.hamburger {
display: none;
flex-direction: column;
justify-content: space-between;
width: 20px;
height: 14px;
background: transparent;
border: none;
cursor: pointer;
}

.hamburger span {
display: block;
height: 2px;
background: #f5f5f5;
border-radius: 999px;
}

body.menu-open,
html.menu-open {
overflow: hidden;
}

.profile-wrap {
position: relative;
display: inline-flex;
align-items: center;
}

.profile-trigger {
background: transparent;
border: none;
padding: 0;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
}

.avatar {
position: relative;
width: 36px;
height: 36px;
border-radius: 50%;
border: none;
background: #1f1f1f;
color: #ffffff;
font-weight: 500;
font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
text-transform: uppercase;
display: inline-flex;
align-items: center;
justify-content: center;
overflow: hidden;
}

.avatar img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
border-radius: 50%;
}

.avatar-initial {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.85rem;
letter-spacing: 0.02em;
font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
}

.avatar.has-image .avatar-initial {
display: none;
}

.avatar.no-image img {
display: none;
}

.avatar-large {
width: 38px;
height: 38px;
border: none;
font-size: 0.95rem;
}

.profile-menu {
position: absolute;
top: calc(100% + 10px);
right: 0;
width: 230px;
background: #000000;
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 14px;
box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
padding: 12px;
z-index: 9999;

display: none;
}

.profile-menu.open {
display: block;
}

.profile-menu-top {
display: flex;
align-items: center;
gap: 12px;
padding-bottom: 10px;
border-bottom: 1px solid rgba(255, 255, 255, 0.10);
margin-bottom: 10px;
text-decoration: none;
color: inherit;
cursor: pointer;
}

.profile-meta {
min-width: 0;
flex: 1;
}

.profile-name {
font-weight: 500;
font-size: 0.85rem;
color: #fff;
line-height: 1.2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.profile-handle {
font-size: 0.75rem;
color: rgba(245, 245, 245, 0.7);
margin-top: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.profile-menu-chevron {
width: 16px;
height: 16px;
opacity: 0.7;
flex: 0 0 auto;
}

.profile-actions {
display: flex;
flex-direction: column;
gap: 8px;
}

.mobile-profile-link {
display: none;
}

.profile-action-btn {
width: 100%;
height: auto;
padding: 6px 0;
border-radius: 0;
border: none;
background: transparent;
color: #fff;
font-weight: 400;
font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
font-size: 0.85rem;
display: inline-flex;
align-items: center;
justify-content: flex-start;
text-decoration: none;
cursor: pointer;
transition: opacity 0.15s ease;
}

.profile-action-btn:hover {
opacity: 0.9;
}

.profile-action-btn.danger {
color: #fff;
}



@media (max-width: 768px) {
    header {
        padding: 12px 24px;
    }

    .logo img {
        width: 26px;
    }

    nav {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        background: #010101;
        padding: 32px;
        gap: 24px;
        display: flex;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 9999;
    }

    html.nav-init nav {
        transition: none;
    }

    .nav-toggle:checked ~ nav {
        transform: translateX(0);
    }

    html.menu-resize nav {
        transition: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-nav-header {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .nav-links a {
        font-size: 1.05rem;
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
    }

    .nav-links a::after {
        content: "";
        width: 16px;
        height: 16px;
        background: url("/assets/icons/tailless-line-arrow-right-1--arrow-right-keyboard.svg") center/contain no-repeat;
        opacity: 0.8;
    }

    .nav-links .mobile-profile-link {
        display: flex;
        justify-content: flex-start;
        gap: 12px;
        width: 100%;
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .nav-links .mobile-profile-link::after {
        content: none;
    }

    .nav-links .mobile-profile-link .profile-menu-chevron {
        margin-left: auto;
    }

    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .login-button {
        width: 100%;
        justify-content: center;
        padding: 14px 18px;
        border: none;
        background: #1f1f1f;
        color: #ffffff;
        margin-top: 8px;
        font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
        font-weight: 400;
        font-size: 1rem;
    }

    .nav-app-button {
        display: inline-flex;
        width: 100%;
        justify-content: center;
        padding: 14px 18px;
        background: #ffffff;
        color: #0f0f0f;
        font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
        font-weight: 400;
        font-size: 1rem;
    }

    .profile-wrap {
        width: 100%;
        justify-content: flex-start;
    }

    nav .profile-wrap {
        display: none;
    }
}
