/* ==================== RESET & VARIABLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Matching the dark theme */
    --primary: #6366f1;
    --primary-glow: #818cf8;
    --secondary: #4c1d95;
    --accent: #7c3aed;
    
    /* Backgrounds */
    --bg-dark: #0f0f23;
    --bg-card: #1a1a2e;
    --card-border: rgba(255, 255, 255, 0.05);
    --button-bg: rgba(255, 255, 255, 0.05);
    --button-hover: rgba(255, 255, 255, 0.1);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #a5b4fc;
    --text-muted: #6b7280;
    
    /* Effects */
    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.4);
    --glow: 0 0 60px rgba(99, 102, 241, 0.4);
    
    /* Spacing */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* ==================== GLOBAL STYLES ==================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* ==================== BACKGROUND EFFECTS ==================== */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.2) 0%, transparent 60%),
                radial-gradient(ellipse at bottom, rgba(124, 58, 237, 0.15) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 25s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -200px;
    right: -200px;
    animation-delay: -10s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: var(--secondary);
    top: 50%;
    left: -175px;
    animation-delay: -20s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-20px, 20px); }
}

/* ==================== CONTAINER ==================== */
.container {
    width: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

/* ==================== PROFILE CARD ==================== */
.profile-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 50px 40px 40px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 480px;
    width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== PROFILE HEADER ==================== */
.profile-header {
    text-align: center;
    margin-bottom: 36px;
}

.profile-image {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), var(--glow);
    margin: 0 auto 24px;
    display: block;
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.3), 0 0 80px rgba(99, 102, 241, 0.6);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.profile-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.profile-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 380px;
    margin: 0 auto;
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== LINKS CONTAINER ==================== */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.link-item {
    position: relative;
    background: var(--button-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    padding: 16px 28px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    opacity: 0;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.link-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--button-hover);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50px;
}

.link-item:hover {
    transform: translateY(-2px);
    background: var(--button-hover);
    border-color: rgba(255, 255, 255, 0.1);
}

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

.link-item:active {
    transform: translateY(0);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation delays for links */
.link-item:nth-child(1) { animation-delay: 0.6s; }
.link-item:nth-child(2) { animation-delay: 0.7s; }
.link-item:nth-child(3) { animation-delay: 0.8s; }
.link-item:nth-child(4) { animation-delay: 0.9s; }
.link-item:nth-child(5) { animation-delay: 1s; }
.link-item:nth-child(6) { animation-delay: 1.1s; }
.link-item:nth-child(7) { animation-delay: 1.2s; }
.link-item:nth-child(8) { animation-delay: 1.3s; }

.link-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.link-item:hover .link-icon {
    transform: scale(1.1);
}

.link-text {
    font-size: 15px;
}

/* ==================== SOCIAL LINKS ==================== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 32px 0 24px;
    border-top: none;
}

.social-link {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--button-bg);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--button-hover);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.social-link:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.15);
}

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

.social-link:active {
    transform: translateY(-2px) scale(1);
}

/* Animation delays for social links */
.social-link:nth-child(1) { animation-delay: 1.4s; }
.social-link:nth-child(2) { animation-delay: 1.5s; }
.social-link:nth-child(3) { animation-delay: 1.6s; }
.social-link:nth-child(4) { animation-delay: 1.7s; }
.social-link:nth-child(5) { animation-delay: 1.8s; }

.social-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-primary);
    position: relative;
    z-index: 1;
    transition: fill 0.3s ease;
}

.social-link:hover .social-icon {
    fill: var(--text-primary);
}

/* ==================== FOOTER ==================== */
.footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 0;
    border-top: none;
    animation: fadeIn 1s ease 1.9s both;
}

.footer p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-glow);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
    .container {
        max-width: 100%;
    }
    
    .profile-card {
        padding: 40px 28px 32px;
    }
    
    .profile-image {
        width: 100px;
        height: 100px;
    }
    
    .profile-name {
        font-size: 28px;
    }
    
    .profile-title {
        font-size: 14px;
    }
    
    .profile-bio {
        font-size: 13px;
    }
    
    .link-item {
        padding: 15px 24px;
        font-size: 14px;
    }
    
    .link-icon {
        width: 19px;
        height: 19px;
    }
    
    .social-link {
        width: 48px;
        height: 48px;
    }
    
    .social-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 400px) {
    body {
        padding: 16px;
    }
    
    .profile-card {
        padding: 36px 24px 28px;
    }
    
    .profile-image {
        width: 90px;
        height: 90px;
    }
    
    .profile-name {
        font-size: 24px;
    }
    
    .link-item {
        padding: 14px 20px;
    }
}

/* ==================== RTL SUPPORT ==================== */
[dir="rtl"] .link-item {
    direction: rtl;
}

[dir="rtl"] .link-icon {
    margin-left: 0;
    margin-right: 0;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .bg-gradient,
    .bg-shapes {
        display: none;
    }
    
    .profile-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
