:root {
    --bg: #eef0ff;
    --card: #ffffff;
    --text: #1c1f3a;
    --muted: #5b5f8a;
    --accent: #2f37f5;

    --theme-primary: #2f37f5;
    --theme-primary-dark: #1f26c9;
    --theme-secondary: #5c63ff;
    --theme-light: #eef0ff;

    --button-grad: linear-gradient(90deg, #2f37f5 0%, #1f26c9 100%);
    --button-grad-hover: linear-gradient(90deg, #3f47ff 0%, #2a31e0 100%);

    --radius-xl: 28px;
    --radius-lg: 20px;

    --mobile-width: 390px;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 16px;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(47, 55, 245, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(47, 55, 245, 0.12), transparent 28%),
        linear-gradient(180deg, #f4f6ff 0%, #eef0ff 100%);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(100%, var(--mobile-width));
    margin: 0 auto;
}

.main {
    width: 100%;
    display: flex;
    justify-content: center;
}

.profile-panel {
    width: 100%;
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 26px 16px 18px;
    border: 1px solid rgba(47, 55, 245, 0.08);
    box-shadow: 0 20px 50px rgba(47, 55, 245, 0.08);
    text-align: center;
    position: relative;
}

.avatar-wrap {
    position: relative;
    isolation: isolate;
    width: 92px;
    height: 92px;
    margin: 0 auto 14px;
    padding: 4px;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #2f37f5,
        #7c82fd,
        #2f37f5
    );
    animation: spinGradient 3s linear infinite;
    z-index: 0;
}

.avatar-wrap img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    background: #fff;
}

.profile-meta {
    width: 100%;
}

.profile-name {
    margin: 6px 0 8px;
    font-size: 30px;
    line-height: 1.15;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.profile-title {
    display: inline-block;
    margin: 0 0 8px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #2f37f5, #5c63ff);
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.profile-bio {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: var(--muted);
    padding: 0 8px;
}

.divider {
    height: 1px;
    margin: 18px 0;
    background: linear-gradient(90deg, transparent, rgba(47, 55, 245, 0.35), transparent);
}

.button-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.cta-button {
    width: 100%;
    min-height: 58px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: var(--button-grad);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(47, 55, 245, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.cta-button:hover {
    background: var(--button-grad-hover);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(47, 55, 245, 0.35);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cta-arrow {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.footer-note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--muted);
}

.footer-note code {
    background: #e8eaff;
    padding: 2px 6px;
    border-radius: 6px;
    color: var(--accent);
}

@media (min-width: 768px) {
    .page-shell {
        width: min(100%, var(--mobile-width));
    }

    .profile-panel {
        padding: 26px 16px 18px;
    }

    .profile-name {
        font-size: 25px;
    }

    .profile-bio {
        font-size: 16px;
    }

    .cta-button {
        min-height: 58px;
        padding: 16px 18px;
    }

    .cta-text {
        font-size: 15px;
    }
}

@media (min-width: 1024px) {
    .page-shell {
        width: min(100%, var(--mobile-width));
    }

    .profile-panel {
        padding: 26px 16px 18px;
    }

    .button-list {
        width: 100%;
    }

    .cta-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    body {
        padding: 12px;
    }

    .page-shell {
        width: 100%;
    }

    .profile-panel {
        padding: 22px 14px 16px;
    }

    .profile-name {
        font-size: 25px;
    }

    .profile-bio {
        font-size: 14.5px;
    }

    .cta-button {
        min-height: 54px;
        padding: 14px 16px;
    }
    
    .cta-text {
        font-size: clamp(14px, 4.2vw, 18px);
    }
}

.qr-wrapper {
    margin-top: 20px;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 2px solid var(--theme-primary);
    box-shadow: 0 10px 25px rgba(47, 55, 245, 0.2);
    display: flex;
    justify-content: center;
}

.qr-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.qr-wrapper:hover {
    border-color: var(--theme-secondary);
    box-shadow: 0 14px 30px rgba(47, 55, 245, 0.3);
}

.lang-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    gap: 6px;
    z-index: 2;
}

.lang-pill {
    appearance: none;
    border: 1px solid rgba(47, 55, 245, 0.18);
    background: #f2f3ff;
    color: var(--theme-primary-dark);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 8px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    min-width: 40px;
}

.lang-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(47, 55, 245, 0.35);
    box-shadow: 0 8px 18px rgba(47, 55, 245, 0.12);
}

.lang-pill.is-active {
    background: var(--button-grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(47, 55, 245, 0.2);
}

.lang-pill:focus-visible {
    outline: 2px solid rgba(47, 55, 245, 0.45);
    outline-offset: 2px;
}

@keyframes spinGradient {
    to {
        transform: rotate(360deg);
    }
}