.avatar-frame {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    overflow: hidden;
    visibility: hidden;
    background: transparent;
    box-shadow: none;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

.avatar-frame.is-ready {
    visibility: visible;
    opacity: 1;
    transform: none;
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.5),
        0 2px 20px 3px rgba(0, 0, 0, 0.25);
}

.avatar-frame.is-ready .avatar-image {
    opacity: 1;
}

.profile-title {
    font-size: var(--title-size);
    line-height: 1.15;
    letter-spacing: 0.02em;
    margin-bottom: var(--title-subtitle-gap);
}

.profile-subtitle {
    font-size: var(--subtitle-size);
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: var(--subtitle-divider-gap);
}

.profile-divider {
    width: min(100%, var(--divider-width));
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin-top: 0;
    margin-bottom: var(--divider-description-gap);
    pointer-events: none;
}

.profile-description {
    width: 100%;
    max-width: none;
    white-space: nowrap;
    font-size: var(--description-size);
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    align-self: center;
    margin-bottom: var(--description-bottom-gap);
}

.link-row,
.social-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: none;
}

.link-row {
    gap: var(--link-gap);
}

.social-row {
    gap: var(--icon-gap);
}

.link-chip,
.social-chip {
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    background: rgba(22, 22, 22, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-top-color: rgba(255, 255, 255, 0.28);
    border-left-color: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition:
        transform 0.28s ease,
        background-color 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        color 0.28s ease;
    cursor: pointer;
}

.link-chip:hover,
.social-chip:hover {
    transform: translateY(calc(-2px * var(--viewport-scale))) scale(1.01);
    background: rgba(30, 30, 30, 0.38);
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.link-chip:active,
.social-chip:active {
    transform: translateY(calc(1px * var(--viewport-scale))) scale(0.985);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.link-chip:focus-visible,
.social-chip:focus-visible {
    outline: calc(2px * var(--viewport-scale)) solid rgba(255, 255, 255, 0.5);
    outline-offset: calc(2px * var(--viewport-scale));
}

.link-chip {
    width: var(--uniform-link-width, auto);
    min-width: var(--uniform-link-width, auto);
    max-width: none;
    min-height: calc(48px * var(--viewport-scale));
    padding: var(--link-padding-block) var(--link-padding-inline);
    border-radius: var(--link-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: var(--link-font-size);
    line-height: 1.35;
    text-align: center;
    appearance: none;
    flex: 0 0 auto;
}

.link-chip__label {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.link-chip--measure {
    position: fixed;
    left: -9999px;
    top: -9999px;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    visibility: hidden;
    pointer-events: none;
}

.social-chip {
    width: var(--icon-button-size);
    height: var(--icon-button-size);
    min-width: var(--icon-button-size);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--icon-font-size);
    line-height: 1;
    flex: 0 0 auto;
}

.social-chip--measure {
    position: fixed;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
    pointer-events: none;
}

.social-chip .iconfont {
    font-size: 1em;
}

.social-links {
    margin-top: var(--links-social-gap);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--page-padding-inline);
    background: rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal.is-loading,
.modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal__loader {
    position: absolute;
    width: calc(54px * var(--viewport-scale));
    height: calc(54px * var(--viewport-scale));
    border: calc(4px * var(--viewport-scale)) solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: modal-loader-spin 0.8s linear infinite;
    transition: opacity 0.12s linear;
}

.modal.is-loading .modal__loader {
    opacity: 1;
}

.modal__image {
    width: auto;
    height: auto;
    max-width: var(--modal-size-limit);
    max-height: var(--modal-size-limit);
    border-radius: calc(16px * var(--viewport-scale));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    opacity: 0;
    transform: translate3d(0, calc(18px * var(--viewport-scale)), 0) scale(0.96);
    transition:
        opacity 0.08s linear,
        transform 0.25s ease;
}

.modal.is-open .modal__image {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.modal.is-open .modal__image:hover {
    transform: translate3d(0, 0, 0) scale(1.01);
}

@keyframes modal-loader-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
