:root {
    --bg-color: #0f172a; /* Slate 900 */
    --card-bg: rgba(30, 41, 59, 0.7); /* Slate 800 with opacity */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-1: #0ea5e9; /* Sky blue */
    --accent-2: #8b5cf6; /* Violet/Purple */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px 0;
}

/* Animated Background Blobs */
.blob-bg {
    position: absolute;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    animation: float 20s infinite alternate ease-in-out;
    z-index: 0;
    top: -10vw;
    left: -10vw;
    pointer-events: none;
}

.blob-2 {
    background: radial-gradient(circle, var(--accent-2) 0%, transparent 60%);
    top: auto;
    bottom: -10vw;
    left: auto;
    right: -10vw;
    animation: float 25s infinite alternate-reverse ease-in-out;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10vw, 10vw) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 15px;
    z-index: 10;
    perspective: 1200px;
}

/* Glassmorphism Card */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 45px 35px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.03), transparent);
    transform: skewX(-25deg);
    animation: shine 8s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* Header & Avatar */
.profile-header {
    text-align: center;
    margin-bottom: 35px;
    transform: translateZ(30px);
}

.avatar-container {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-color);
    position: relative;
    z-index: 2;
    box-shadow: 0 0 25px rgba(14, 165, 233, 0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar:hover {
    transform: scale(1.08) rotate(5deg);
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    z-index: 1;
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.6; }
    70% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0; }
}

.name {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--accent-1);
    min-height: 27px; /* Prevent jitter during typing */
}

/* Typing Effect */
.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--accent-1);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Sections */
.section {
    margin-bottom: 30px;
    transform: translateZ(20px);
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, var(--accent-1), var(--accent-2));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.section:hover h3::after {
    width: 100%;
}

.about p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Skills */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.skill-badge:hover {
    background: linear-gradient(45deg, rgba(14, 165, 233, 0.15), rgba(139, 92, 246, 0.15));
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.skill-badge i {
    color: var(--accent-1);
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.skill-badge:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* Socials & Button */
.socials {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 35px;
    transform: translateZ(25px);
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    font-size: 1.25rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

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

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
    border-color: transparent;
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 16px;
    margin-top: 35px;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
    transform: translateZ(30px);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-2), var(--accent-1));
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-3px) translateZ(30px);
    box-shadow: 0 12px 25px rgba(139, 92, 246, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .glass {
        padding: 35px 20px;
        border-radius: 24px;
    }
    .name {
        font-size: 1.8rem;
    }
    .blob-bg {
        width: 80vw;
        height: 80vw;
    }
}

/* Language Switcher */
.lang-switch-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    font-family: inherit;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn[data-lang="vi"].active {
    background: linear-gradient(45deg, #f43f5e, #be123c);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3);
}

.lang-btn[data-lang="en"].active {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Inline Navigation Menu */
.inline-nav {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.inline-nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.inline-nav-links li a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    padding: 5px 12px;
    border-radius: 8px;
}

.inline-nav-links li a i {
    color: var(--accent-1);
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.inline-nav-links li a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.inline-nav-links li a:hover i {
    transform: scale(1.15);
    color: var(--accent-2);
}
