:root {
    --bg-color-1: #0f172a;
    --bg-color-2: #1e1b4b;
    --bg-color-3: #31135e;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;

    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(255, 255, 255, 0.15);

    --accent-color: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.5);

    --verified-color: #38bdf8;
    --success-color: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: linear-gradient(135deg, #0f172a, #1e1b4b, #4a0e2e, #0f2a1a, #2a1a0a);
    background-size: 500% 500%;
    animation: gradientBG 30s ease infinite;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    20% {
        background-position: 50% 0%;
    }

    40% {
        background-position: 100% 50%;
    }

    60% {
        background-position: 50% 100%;
    }

    80% {
        background-position: 25% 75%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 620px;
    padding: 2rem 1.5rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ─── PROFILE CARD ─── */
.profile-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 2.5rem 2rem 1.8rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.15) inset,
        0 0 60px rgba(139, 92, 246, 0.08);
    animation:
        cardEntrance 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards,
        cardGlow 30s -15s ease-in-out infinite;
    opacity: 0;
    transform: translateY(30px) scale(0.97);
}

@keyframes cardGlow {

    /* offset from background — always complementary */
    0% {
        background: rgba(234, 88, 12, 0.18);
    }

    /* warm orange  vs navy/purple bg */
    25% {
        background: rgba(20, 184, 166, 0.18);
    }

    /* teal         vs crimson bg */
    50% {
        background: rgba(168, 85, 247, 0.22);
    }

    /* violet       vs green bg */
    75% {
        background: rgba(239, 68, 68, 0.18);
    }

    /* red          vs amber bg */
    100% {
        background: rgba(234, 88, 12, 0.18);
    }

    /* back to orange */
}

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── BANNER ─── */
.banner {
    margin: -2.5rem -2rem 0;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    line-height: 0;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ─── PROFILE HEADER ─── */
.profile-header {
    text-align: center;
    padding: 0 2rem 0;
    margin-top: -55px;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

/* Ensure all header children sit above the overlay */
.profile-header>* {
    position: relative;
    z-index: 1;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-img-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.profile-img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
    background: linear-gradient(var(--bg-color-1), var(--bg-color-1)) padding-box,
        linear-gradient(45deg, var(--accent-color), #ec4899) border-box;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3), 0 0 30px var(--accent-glow);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-img:hover {
    transform: scale(1.07) rotate(4deg);
}

.status-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    background-color: var(--success-color);
    border: 2.5px solid rgba(15, 23, 42, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success-color);
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.verified-icon,
.profile-name i {
    color: #38bdf8;
    font-size: 1.1rem;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.4rem;
}

/* ─── SOCIAL ICONS (inside card header) ─── */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.social-icon {
    color: var(--text-secondary);
    font-size: 1.15rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.social-icon:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ─── CARD DIVIDER ─── */
.card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    margin: 1.6rem 0 0;
    border-radius: 1px;
}

/* ─── LINKS SECTION ─── */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    perspective: 1000px;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.2rem;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-card:nth-child(1) {
    animation: cardAppear 0.45s calc(0.5s + 0.08s * 1) forwards;
}

.link-card:nth-child(2) {
    animation: cardAppear 0.45s calc(0.5s + 0.08s * 2) forwards;
}

.link-card:nth-child(3) {
    animation: cardAppear 0.45s calc(0.5s + 0.08s * 3) forwards;
}

.link-card:nth-child(4) {
    animation: cardAppear 0.45s calc(0.5s + 0.08s * 4) forwards;
}

.link-card:nth-child(5) {
    animation: cardAppear 0.45s calc(0.5s + 0.08s * 5) forwards;
}

.link-card:nth-child(6) {
    animation: cardAppear 0.45s calc(0.5s + 0.08s * 6) forwards;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.5s;
}

.link-card:hover {
    transform: translateY(-3px) scale(1.015);
    background: var(--card-hover);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), 0 0 12px var(--accent-glow);
    border-color: rgba(255, 255, 255, 0.2);
}

.link-card:hover::before {
    left: 100%;
}

.link-icon {
    font-size: 1.35rem;
    width: 38px;
    display: flex;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.3s;
    flex-shrink: 0;
}

.link-card:hover .link-icon {
    color: var(--accent-color);
}

.link-title {
    flex-grow: 1;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    padding: 0 10px;
}

.link-action {
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.link-card:hover .link-action {
    opacity: 1;
    transform: translateX(0);
}

.link-card.highlight {
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    border-color: rgba(139, 92, 246, 0.35);
}

.link-card.highlight:hover {
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.25), rgba(236, 72, 153, 0.25));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 18px rgba(236, 72, 153, 0.35);
}

.link-badge {
    position: absolute;
    top: -1px;
    right: 16px;
    background: linear-gradient(45deg, var(--accent-color), #ec4899);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 0 0 7px 7px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

/* ─── FOOTER ─── */
.profile-footer {
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    animation: fadeIn 1s 1.2s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.82rem;
    opacity: 0.65;
}

.footer-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color-1);
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 480px) {
    .profile-card {
        padding: 2rem 1.2rem 1.4rem;
        border-radius: 20px;
    }

    .link-title {
        font-size: 0.95rem;
    }

    .profile-img {
        width: 90px;
        height: 90px;
    }

    .profile-name {
        font-size: 1.35rem;
    }
}