/* Modern Bio Page Design */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --surface-color: rgba(255, 255, 255, 0.03);
    --surface-border: rgba(255, 255, 255, 0.08);
    --surface-highlight: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --blur-amount: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #030014;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
    animation: pageLoad 0.8s ease-out;
    /* Page load animation */
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Dynamic background */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: float 10s ease-in-out infinite alternate;
}

body::before {
    background: #6366f1;
    top: -100px;
    left: -100px;
}

body::after {
    background: #ec4899;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Profile Section */
.profile-section {
    text-align: center;
    margin-bottom: 1rem;
    /* Reduced gap */
    width: 100%;
    animation: fadeInDown 0.8s ease-out;
}

.logo-container {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 1.5rem;
}

/* Rotating gradient border */
.logo-border {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #6366f1, #a855f7, #ec4899, #6366f1);
    animation: rotateBorder 4s linear infinite;
    z-index: 1;
}

@keyframes rotateBorder {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.logo-glow {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: var(--primary-gradient);
    filter: blur(20px);
    opacity: 0.4;
    animation: pulse 3s infinite;
    z-index: 0;
}

.logo {
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 4px;
    left: 4px;
    border: none;
    z-index: 2;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #b4b4b4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.bio {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 80%;
    margin: 0 auto;
}

/* Social Grid */
.social-icons-grid {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
    margin: 0.5rem 0 2rem;
    /* Reduced top margin */
    padding-top: 10px;
    /* Prevents clipping on hover */
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    min-width: 50px;
    /* Ensure visible click area */
}

.social-link {
    width: 40px;
    /* Smaller size */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.1rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--blur-amount));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-item:hover .social-link {
    transform: translateY(-3px);
    /* Slightly less visual movement */
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 15px -5px rgba(99, 102, 241, 0.4);
}

.social-item:hover .social-link::before {
    opacity: 1;
}

.social-label {
    font-size: 0.65rem;
    /* Smaller labels */
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    opacity: 0.7;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    /* Prevent wrapping */
}

.social-item:hover .social-label {
    opacity: 1;
    color: #fff;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Futuristic Link Stack */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-card {
    display: block;
    padding: 1.25rem;
    background: rgba(20, 20, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Start with subtle border */
    border-radius: 12px;
    /* Slightly sharper corners for tech feel */
    backdrop-filter: blur(var(--blur-amount));
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s ease-out backwards;
}

/* Holographic / Cyberpunk Hover Effect */
.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(99, 102, 241, 0.2),
            transparent);
    transition: left 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.link-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-card:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 20px rgba(168, 85, 247, 0.2),
        inset 0 0 10px rgba(99, 102, 241, 0.1);
    border-color: rgba(168, 85, 247, 0.5);
}

.link-card:hover::before {
    left: 100%;
}

.link-card:hover::after {
    opacity: 1;
}

/* Staggered animation delays will be set via nth-child in JS or CSS if strictly static */
.link-card:nth-child(1) {
    animation-delay: 0.1s;
}

.link-card:nth-child(2) {
    animation-delay: 0.2s;
}

.link-card:nth-child(3) {
    animation-delay: 0.3s;
}

.link-card:nth-child(4) {
    animation-delay: 0.4s;
}

.link-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
    position: relative;
}

.link-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.link-icon {
    opacity: 0.7;
    transform: translateX(0);
    transition: all 0.3s ease;
    color: #a855f7;
    /* Purple accent */
    filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5));
}

.link-card:hover .link-icon {
    opacity: 1;
    transform: translateX(5px);
    color: #fff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

/* Footer */
.footer {
    margin-top: 3rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    opacity: 0.7;
    animation: fadeIn 1s ease-out 1s backwards;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .bio {
        font-size: 0.95rem;
    }

    .link-card {
        padding: 1rem;
    }

    .logo-container {
        width: 110px;
        height: 110px;
    }
}

/* ===== ACCESSIBILITY - Focus States ===== */
.social-item:focus,
.link-card:focus {
    outline: 2px solid #a855f7;
    outline-offset: 3px;
}

.social-link:focus-visible,
.link-card:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.3);
}

/* ===== PARTICLES EFFECT ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: floatParticle 15s infinite linear;
    opacity: 0;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 14s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
    animation-duration: 16s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
    animation-duration: 13s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
    animation-duration: 15s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 5s;
    animation-duration: 11s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 2s;
    animation-duration: 17s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 4s;
    animation-duration: 12s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 0s;
    animation-duration: 14s;
}

.particle:nth-child(10) {
    left: 15%;
    animation-delay: 3s;
    animation-duration: 18s;
}

.particle:nth-child(11) {
    left: 25%;
    animation-delay: 1s;
    animation-duration: 13s;
}

.particle:nth-child(12) {
    left: 35%;
    animation-delay: 5s;
    animation-duration: 16s;
}

.particle:nth-child(13) {
    left: 45%;
    animation-delay: 2s;
    animation-duration: 14s;
}

.particle:nth-child(14) {
    left: 55%;
    animation-delay: 4s;
    animation-duration: 12s;
}

.particle:nth-child(15) {
    left: 65%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.particle:nth-child(16) {
    left: 75%;
    animation-delay: 3s;
    animation-duration: 17s;
}

.particle:nth-child(17) {
    left: 85%;
    animation-delay: 1s;
    animation-duration: 11s;
}

.particle:nth-child(18) {
    left: 95%;
    animation-delay: 5s;
    animation-duration: 13s;
}

.particle:nth-child(19) {
    left: 5%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.particle:nth-child(20) {
    left: 50%;
    animation-delay: 4s;
    animation-duration: 16s;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}