/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: #0a0a0a;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    text-align: center;
    color: white;
}

.loader-text {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 300;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: white;
    border-radius: 2px;
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Three.js Canvas */
#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero-greeting {
    display: block;
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 10px;
    opacity: 0.8;
}

.hero-name {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #667eea;
}

.hero-description {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid #fff;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) rotate(-45deg) translateY(0);
    }
    40% {
        transform: translateX(-50%) rotate(-45deg) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) rotate(-45deg) translateY(-5px);
    }
}

/* Sections */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: #fff;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.8;
    opacity: 0.9;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
    flex-wrap: wrap;
    perspective: 1000px;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    position: relative;
    min-width: 150px;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
    z-index: 1;
}

.stat-item:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(5deg) scale(1.05);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(102, 126, 234, 0.2);
}

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

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
    position: relative;
    z-index: 2;
}

/* Skills Section */
.skills-section {
    color: #fff;
    perspective: 1200px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
    transform-style: preserve-3d;
}

.skill-category {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    position: relative;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
    z-index: 1;
}

.skill-category:hover {
    transform: translateY(-10px) rotateX(3deg) rotateY(3deg);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(102, 126, 234, 0.2);
}

.skill-category:hover::before {
    opacity: 1;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #667eea;
    position: relative;
    z-index: 2;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-item span {
    font-weight: 600;
    min-width: 100px;
}

.skill-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    min-width: 200px;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease;
}

/* Projects Section */
.projects-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: #fff;
    perspective: 1000px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    transform-style: preserve-3d;
}

.project-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(5deg) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(102, 126, 234, 0.3);
}

.project-card:hover::before {
    opacity: 1;
}

.project-image {
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: 30px;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #667eea;
}

.project-content p {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-tags span {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Social Media Section */
.social-section {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.9), rgba(25, 25, 55, 0.9));
    perspective: 1200px;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    transform-style: preserve-3d;
    max-width: 1200px;
    margin: 0 auto;
}

.social-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 25px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    border-radius: 25px;
}

.social-card:hover {
    transform: rotateX(10deg) rotateY(10deg) scale(1.05) translateZ(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

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

/* Individual Social Platform Colors */
.social-card.facebook::before {
    background: linear-gradient(45deg, rgba(24, 119, 242, 0.2), rgba(66, 103, 178, 0.2));
}

.social-card.facebook:hover {
    box-shadow: 0 25px 50px rgba(24, 119, 242, 0.4);
}

.social-card.tiktok::before {
    background: linear-gradient(45deg, rgba(255, 0, 80, 0.2), rgba(0, 242, 234, 0.2));
}

.social-card.tiktok:hover {
    box-shadow: 0 25px 50px rgba(255, 0, 80, 0.4);
}

.social-card.instagram::before {
    background: linear-gradient(45deg, rgba(225, 48, 108, 0.2), rgba(255, 204, 0, 0.2));
}

.social-card.instagram:hover {
    box-shadow: 0 25px 50px rgba(225, 48, 108, 0.4);
}

.social-card.threads::before {
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.2), rgba(51, 51, 51, 0.2));
}

.social-card.threads:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.social-card.telegram::before {
    background: linear-gradient(45deg, rgba(0, 136, 204, 0.2), rgba(0, 95, 138, 0.2));
}

.social-card.telegram:hover {
    box-shadow: 0 25px 50px rgba(0, 136, 204, 0.4);
}

.social-card.zalo::before {
    background: linear-gradient(45deg, rgba(0, 104, 255, 0.2), rgba(0, 82, 204, 0.2));
}

.social-card.zalo:hover {
    box-shadow: 0 25px 50px rgba(0, 104, 255, 0.4);
}

.social-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon svg {
    width: 100%;
    height: 100%;
    fill: #40e0d0;
    transition: all 0.4s ease;
}

.social-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: all 0.4s ease;
}

.social-card:hover .social-icon {
    transform: rotateY(360deg) scale(1.1);
}

.social-card.facebook:hover .social-icon svg {
    fill: #1877f2;
}

.social-card.tiktok:hover .social-icon svg {
    fill: #ff0050;
}

.social-card.instagram:hover .social-icon svg {
    fill: #e1306c;
}

.social-card.threads:hover .social-icon svg {
    fill: #000000;
}

.social-card.telegram:hover .social-icon svg {
    fill: #0088cc;
}

.social-card.zalo:hover .social-icon img {
    transform: scale(1.1);
    filter: brightness(1.2) saturate(1.3);
}

.social-card h3 {
    color: #40e0d0;
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.social-card p {
    color: #b0b0b0;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.social-card:hover h3,
.social-card:hover p {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Floating Animation for Social Cards */
@keyframes socialFloat {
    0%, 100% {
        transform: translateY(0px) rotateZ(0deg);
    }
    25% {
        transform: translateY(-10px) rotateZ(1deg);
    }
    50% {
        transform: translateY(-5px) rotateZ(0deg);
    }
    75% {
        transform: translateY(-15px) rotateZ(-1deg);
    }
}

.social-card:nth-child(1) {
    animation: socialFloat 6s ease-in-out infinite;
    animation-delay: 0s;
}

.social-card:nth-child(2) {
    animation: socialFloat 6s ease-in-out infinite;
    animation-delay: 1s;
}

.social-card:nth-child(3) {
    animation: socialFloat 6s ease-in-out infinite;
    animation-delay: 2s;
}

.social-card:nth-child(4) {
    animation: socialFloat 6s ease-in-out infinite;
    animation-delay: 3s;
}

.social-card:nth-child(5) {
    animation: socialFloat 6s ease-in-out infinite;
    animation-delay: 4s;
}

.social-card:nth-child(6) {
    animation: socialFloat 6s ease-in-out infinite;
    animation-delay: 5s;
}

/* Pulse Effect on Hover */
@keyframes socialPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(64, 224, 208, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(64, 224, 208, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(64, 224, 208, 0);
    }
}

.social-card:hover {
    animation: socialPulse 1.5s infinite;
}

/* Contact Section */
.contact-section {
    color: #fff;
    perspective: 1200px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    transform-style: preserve-3d;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #667eea;
}

.contact-info p {
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.8;
}

.contact-items {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-icon {
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #667eea;
    border-color: #667eea;
}

.contact-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    position: relative;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
    z-index: 1;
}

.contact-info:hover {
    transform: translateY(-8px) rotateX(3deg) rotateY(-3deg);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(102, 126, 234, 0.2);
}

.contact-info:hover::before {
    opacity: 1;
}

.contact-info > * {
    position: relative;
    z-index: 2;
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    position: relative;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
    z-index: 1;
}

.contact-form:hover {
    transform: translateY(-8px) rotateX(3deg) rotateY(3deg);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(102, 126, 234, 0.2);
}

.contact-form:hover::before {
    opacity: 1;
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: inherit;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.form-group {
    position: relative;
    z-index: 2;
}

.contact-form .btn {
    position: relative;
    z-index: 2;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(10, 10, 10, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 30px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .stats {
        gap: 30px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .skill-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .skill-bar {
        width: 100%;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .contact-form {
        padding: 25px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Utility Classes */
.hidden {
    opacity: 0;
    pointer-events: none;
}

.visible {
    opacity: 1;
    pointer-events: auto;
}