@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}


/* Animated Background */
.animated-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    background: 
        linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #312e81 50%, #4c1d95 75%, #581c87 100%);
    overflow: hidden;
}

/* Mesh Gradient Layer */
.animated-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 40% 70%, rgba(236, 72, 153, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 10% 90%, rgba(167, 139, 250, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 10%, rgba(6, 182, 212, 0.25) 0%, transparent 50%);
    animation: meshMove 15s ease-in-out infinite;
    filter: blur(60px);
}

/* Animated Orbs */
.animated-bg::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: 
        radial-gradient(ellipse at 70% 50%, rgba(168, 85, 247, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 60%, rgba(59, 130, 246, 0.12) 0%, transparent 60%);
    animation: orbFloat 20s ease-in-out infinite alternate;
}

@keyframes meshMove {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    25% { 
        transform: translate(-5%, 5%) rotate(90deg);
        opacity: 0.8;
    }
    50% { 
        transform: translate(-10%, -5%) rotate(180deg);
        opacity: 1;
    }
    75% { 
        transform: translate(5%, -10%) rotate(270deg);
        opacity: 0.9;
    }
}

@keyframes orbFloat {
    0% { 
        transform: translate(0, 0) scale(1);
    }
    100% { 
        transform: translate(50px, -30px) scale(1.1);
    }
}

/* Particles */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particleFloat linear infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Landing Page */
.landing-page {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.landing-page.hidden {
    opacity: 0;
    visibility: hidden;
}

.enter-btn {
    position: relative;
    padding: 20px 60px;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.enter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.enter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.6);
}

.enter-btn:hover::before {
    left: 100%;
}

.enter-btn:active {
    transform: scale(0.98);
}

/* Container */
.container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* Profile Card */
.profile-card {
    width: 100%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* For vanilla-tilt.js */
    transform-style: preserve-3d;
    will-change: transform;
}

.profile-card.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.profile-card:hover {
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Profile Image Container */
.profile-img-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
    transform: translateZ(50px); /* For vanilla-tilt.js */
}

.profile-img-container::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #4facfe);
    border-radius: 50%;
    animation: rotate 3s linear infinite;
    z-index: -1;
}

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

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

/* Name */
.name {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateZ(40px); /* For vanilla-tilt.js */
}

/* Badges */
.badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    transform: translateZ(30px); /* For vanilla-tilt.js */
}

.badge {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Divider */
.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    margin: 30px 0;
}

/* Quote */
.quote {
    text-align: center;
    font-size: 1.1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 0.5px;
    transform: translateZ(20px); /* For vanilla-tilt.js */
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    transform: translateZ(30px); /* For vanilla-tilt.js */
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.social-link svg {
    width: 24px;
    height: 24px;
    fill: white;
    position: relative;
    z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-card {
        /* bỏ shadow transform nặng nếu có từ tilt */
        transform: none !important;
        will-change: transform;
        animation: mobileFloat 4s ease-in-out infinite;
        /* giữ responsive padding/width nếu cần */
        margin: 1.2rem auto;
        max-width: 92%;
    }

    /* nhẹ khi chạm: phóng to chút khi active/touch */
    .profile-card:active,
    .profile-card.touch-pressed {
        transform: translateY(-6px) scale(1.01);
        transition: transform 150ms ease;
        animation-play-state: paused; /* tạm dừng float khi nhấn */
    }

    /* Fix social-link trên mobile: không bị méo khi chạm/hover, giữ hình vuông */
    .social-links {
        gap: 12px;
    }

    .social-link {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        aspect-ratio: 1 / 1;
        border-radius: 50%;
        padding: 0;
        transform: none !important;       /* override desktop hover transform */
        will-change: transform;
        backface-visibility: hidden;
        -webkit-tap-highlight-color: transparent;
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }

    /* Không scale trên hover (touch devices) — chỉ nhẹ dịch Y khi active/touch */
    .social-link:hover,
    .social-link:focus {
        transform: none !important;
        box-shadow: none;
    }

    .social-link:active,
    .social-link.touch-pressed {
        transform: translateY(-4px) scale(1.03);
        transition: transform 120ms ease;
    }

    .social-link svg {
        width: 20px;
        height: 20px;
        display: block; /* tránh baseline stretching */
    }

    .social-link::before {
        opacity: 0.06; /* giữ hiệu ứng nhẹ nhàng trên mobile */
    }
}

/* keyframes nhẹ lên xuống */
@keyframes mobileFloat {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}