/* Profile header, avatar preview, biography, and statistics. */

.profile-header {
    position: relative;
    z-index: 20;
    width: 100%;
    margin-bottom: 14px;
}

.profile-cover {
    position: relative;
    height: 145px;
    margin-inline: -20px;
    overflow: hidden;
    background: linear-gradient(135deg, #3b2419, #1d1411, #100c0a);
}

.profile-cover.has-image {
    background: transparent;
    /* Fade the image and its overlay together into the page background. */
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, rgba(0, 0, 0, 0.8) 60%, rgba(0, 0, 0, 0.2) 82%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 35%, rgba(0, 0, 0, 0.8) 60%, rgba(0, 0, 0, 0.2) 82%, transparent 100%);
}

.profile-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-cover-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(16, 11, 8, 0.04), rgba(16, 11, 8, 0.18) 62%, rgba(16, 11, 8, 0.48));
}

.profile-header-body {
    position: relative;
    margin-top: -34px;
    padding-inline: 12px;
}

.profile-header-main-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.profile-avatar-button {
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.profile-avatar {
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    object-fit: cover;
    border: 3px solid #120d0b;
    border-radius: 50%;
    background: #1c1917;
}

.profile-avatar-button.is-static {
    cursor: default;
}

.profile-avatar-fallback {
    display: grid;
    place-items: center;
    color: #ff7a2a;
    font-size: 28px;
    font-weight: 900;
}

.profile-avatar-button:focus {
    outline: 2px solid rgba(198, 139, 93, 0.65);
    outline-offset: 3px;
}

.profile-photo-preview {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: grid;
    place-items: center;
    padding: 26px;
    background: rgba(5, 4, 3, 0.84);
    backdrop-filter: blur(4px);
}

.profile-photo-preview img {
    width: min(78vw, 360px);
    aspect-ratio: 1;
    object-fit: cover;
    border: 2px solid rgba(198, 139, 93, 0.75);
    border-radius: 50%;
    background: #bec3c3;
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.5);
}

.profile-photo-preview-close {
    position: absolute;
    top: 22px;
    left: 22px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.profile-photo-preview-close:hover,
.profile-photo-preview-close:focus {
    background: rgba(198, 139, 93, 0.28);
}

.profile-identity {
    min-width: 0;
    width: 100%;
    margin-top: 9px;
    text-align: right;
}

.profile-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex: 0 0 auto;
}

.profile-identity h1 {
    margin: 0 0 3px;
    color: #ffffff;
    font-size: 28px;
    font-weight: 900;
    line-height: 34px;
    /* Keep long names on one line while preserving the full text in the HTML. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-identity p {
    margin: 0;
    color: #b5a99e;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.profile-edit-button {
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.065);
    color: #ead9ca;
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.profile-edit-button svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-edit-button:hover,
.profile-edit-button:focus {
    color: #ffffff;
    background: rgba(198, 139, 93, 0.22);
}

.profile-edit-button:active {
    transform: scale(0.94);
}

.profile-settings-button svg {
    width: 13px;
    height: 13px;
}

.profile-follow-button {
    min-width: 64px;
    min-height: 30px;
    flex: 0 0 auto;
    padding: 4px 10px;
    border: 1px solid #f25a00;
    border-radius: 10px;
    background: #f25a00;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.profile-follow-button.is-following {
    border-color: rgba(242, 90, 0, 0.45);
    background: #1c1917;
}

.profile-follow-button:hover:not(:disabled),
.profile-follow-button:focus-visible:not(:disabled) {
    border-color: #ff7a2a;
    background: #ff7a2a;
}

.profile-follow-button.is-following:hover:not(:disabled),
.profile-follow-button.is-following:focus-visible:not(:disabled) {
    border-color: #f25a00;
    background: rgba(242, 90, 0, 0.18);
}

.profile-follow-button:active:not(:disabled) {
    transform: scale(0.96);
}

.profile-follow-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.profile-follow-button.is-blocked {
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.06);
    color: #9eb0c7;
    cursor: default;
}

.profile-moderation-menu {
    position: relative;
    z-index: 30;
}

.profile-moderation-menu summary {
    width: 32px;
    height: 30px;
    display: grid;
    place-items: center;
    list-style: none;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    color: #b6aaa2;
    cursor: pointer;
}

.profile-moderation-menu summary::-webkit-details-marker {
    display: none;
}

.profile-moderation-menu summary svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.profile-moderation-menu summary[aria-disabled="true"] {
    cursor: wait;
    opacity: 0.48;
}

.profile-moderation-popup {
    position: absolute;
    top: 36px;
    inset-inline-end: 0;
    z-index: 40;
    min-width: 190px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: #211917;
    box-shadow: 0 10px 16px rgba(0, 0, 0, 0.35);
}

.profile-moderation-popup button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 42px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #f5ede7;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
    text-align: right;
    white-space: nowrap;
    cursor: pointer;
}

.profile-moderation-popup button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-moderation-popup button.is-danger {
    color: #fb8a78;
    background: rgba(248, 113, 113, 0.06);
}

.profile-moderation-menu summary:hover,
.profile-moderation-popup button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.profile-moderation-menu summary:focus-visible,
.profile-moderation-popup button:focus-visible {
    outline: 2px solid #f25a00;
    outline-offset: 2px;
}

.profile-moderation-popup button:disabled {
    cursor: wait;
    opacity: 0.48;
}

.profile-bio {
    margin: 0 0 24px;
    color: #d1c5b9;
    font-size: 13px;
    font-weight: 700;
    line-height: 22px;
    text-align: right;
}

.profile-follow-stats {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: 6px 0 0;
}

.profile-follow-stats a {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 3px 5px;
    border-radius: 8px;
    color: #cbbfb2;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease;
}

.profile-follow-stats strong {
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.profile-follow-stats span {
    font-size: 11px;
    font-weight: 800;
}

.profile-follow-stats .profile-follow-separator {
    color: #766b63;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
}

.profile-follow-stats a:hover,
.profile-follow-stats a:focus-visible {
    background: rgba(198, 139, 93, 0.1);
    color: #e8c8ad;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 28px;
}

.profile-stat-card {
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-align: center;
}

.profile-stat-card strong {
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    line-height: 20px;
}

.profile-stat-card span,
.profile-stat-card a,
.profile-stat-card-link {
    color: #cbbfb2;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
}

.profile-stat-card a,
.profile-stat-card-link {
    padding: 4px;
    text-decoration: none;
}

.profile-stat-card a:hover,
.profile-stat-card-link:hover span {
    color: #ff7a2a;
}

.profile-stat-card a:focus-visible,
.profile-stat-card-link:focus-visible {
    outline: 2px solid #f25a00;
    outline-offset: 2px;
    border-radius: 4px;
}


@media (max-width: 767.98px) {
    .profile-cover {
        margin-inline: -14px;
    }
}

