/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #000000;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
    cursor: auto; /* Restore default cursor */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Optimize for smooth transitions */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Adjust heading styles for Roboto */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Adjust button text for Roboto */
.btn {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
}

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

/* Animated Background - Particle Effect */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000000;
    overflow: hidden;
}

/* Hide previous elements */
.geometric-shape,
.geometric-diamonds,
.diamond,
.hexagon,
.wireframe-line {
    display: none;
}

/* Particles canvas */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Remove custom cursor */
.cursor {
    display: none;
}

/* Remove cursor trail canvas */
.cursor-trail {
    display: none;
}

/* Brand Logo */
.brand-logo {
    position: fixed;
    top: 30px;
    left: 40px;
    font-size: 32px;
    font-weight: 700;
    color: #ff9500;
    z-index: 1000;
    animation: fadeIn 1s ease-out 0.5s forwards;
    opacity: 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    position: relative;
    padding: 120px 0 40px;
}

.hero .container {
    display: flex;
    align-items: center;
    width: 100%;
    padding-top: 0;
}

.hero-content {
    max-width: 600px;
    margin-right: auto;
    margin-top: 0;
}

.hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 60px;
    text-align: left;
    letter-spacing: -0.03em;
    font-family: 'Roboto', sans-serif;
}

.title-line {
    display: block;
    animation: slideInUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(50px);
    white-space: nowrap;
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.6s; }
.title-line:nth-child(4) { animation-delay: 0.8s; }

.highlight {
    color: #ff9500;
}

.accent {
    color: #888;
    font-weight: 400;
}

.hero-description {
    font-size: 16px;
    color: #cccccc;
    max-width: 450px;
    margin-bottom: 40px;
    line-height: 1.6;
    animation: fadeIn 1s ease-out 1s forwards;
    opacity: 0;
    text-align: left;
}

.hero-buttons {
    display: flex;
    gap: 45px;
    flex-wrap: wrap;
    animation: fadeIn 1s ease-out 1.2s forwards;
    opacity: 0;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    /* Performance optimization */
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.btn-primary {
    background: #ff9500;
    color: #000000;
    position: relative;
    padding-right: 70px;
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 3.5px solid #faf4f4;
    padding-right: 60px;
    padding-left: 25px;
    backdrop-filter: blur(10px);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary:hover {
    background: #ff8c00;
    box-shadow: 0 10px 30px rgba(255, 149, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 149, 0, 0.8);
    box-shadow: 0 8px 32px rgba(255, 149, 0, 0.15);
    transform: translateY(-1px);
}

.btn span {
    flex: 1;
    text-align: center;
    font-weight: 700; /* Make text bolder */
}

.btn-arrow {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
}

.btn-arrow svg {
    width: 20px;
    height: 20px;
}

.btn-secondary .btn-arrow {
    background: transparent;
    border: none;
}

.btn-secondary:hover .btn-arrow {
    background: rgba(255, 149, 0, 0.9);
    border-color: rgba(255, 149, 0, 1);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 16px rgba(255, 149, 0, 0.3);
}

.btn:hover .btn-arrow {
    transform: translateY(-50%) translateX(5px);
}

.btn-primary:hover .btn-arrow {
    transform: translateY(-50%) translateX(0);
}

.btn-secondary:hover .btn-arrow svg path {
    fill: #ffffff !important;
}

/* Scroll Indicator - New Design */
.scroll-indicator {
    position: absolute;
    bottom: 70px;
    right: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-80px);
    z-index: 100;
    width: 120px;
    height: 120px;
    cursor: pointer;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-indicator.interactive {
    transition: transform 0.3s ease;
}

.scroll-indicator.interactive:active {
    transform: translateY(0) scale(0.95);
}

.scroll-indicator.interactive.clicked {
    transform: translateY(0) scale(0.9);
}

.scroll-circle {
    width: 70px;
    height: 70px;
    background-color: #ff9500;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(255, 149, 0, 0.3);
}

.scroll-circle::before {
    content: '';
    position: absolute;
    width: 44px;
    height: 44px;
    background-color: #000000;
    border-radius: 50%;
    z-index: 1;
}

.scroll-arrow {
    font-size: 18px;
    color: #ff9500;
    font-weight: bold;
    z-index: 2;
    position: relative;
}

.scroll-text {
    position: absolute;
    width: 120px;
    height: 120px;
    animation: rotateText 20s linear infinite;
    z-index: 1;
    top: 0;
    left: 0;
}

.scroll-text span {
    position: absolute;
    left: 50%;
    top: 0;
    font-size: 10px;
    font-weight: 600;
    transform-origin: 0 60px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Position each letter around the circle - SCROLL DOWN */
.scroll-text span:nth-child(1) { transform: rotate(0deg); }    /* S */
.scroll-text span:nth-child(2) { transform: rotate(20deg); }   /* C */
.scroll-text span:nth-child(3) { transform: rotate(40deg); }   /* R */
.scroll-text span:nth-child(4) { transform: rotate(60deg); }   /* O */
.scroll-text span:nth-child(5) { transform: rotate(80deg); }   /* L */
.scroll-text span:nth-child(6) { transform: rotate(100deg); }  /* L */
.scroll-text span:nth-child(7) { transform: rotate(130deg); }  /* • */
.scroll-text span:nth-child(8) { transform: rotate(160deg); }  /* D */
.scroll-text span:nth-child(9) { transform: rotate(180deg); }  /* O */
.scroll-text span:nth-child(10) { transform: rotate(200deg); } /* W */
.scroll-text span:nth-child(11) { transform: rotate(220deg); } /* N */

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

/* Remove the bounce animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Sections */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ff9500;
}

.section-header p {
    color: #888;
    font-size: 16px;
}

/* About Section */
.about {
    background: rgba(26, 26, 26, 0.5);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.about-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ff9500;
}

.about-card p {
    color: #cccccc;
    font-size: 14px;
    margin-top: 10px;
}

/* Future Direction Section */
.future {
    background-color: #ffffff;
    color: #000000;
    padding: 120px 0 170px;
    position: relative;
    overflow: hidden;
}

/* Enhanced Aurora Light Background */
.aurora-bg {
    display: none;
}

/* Main Aurora Layers with enhanced gradients */
.aurora-layer {
    display: none; /* Ẩn hoàn toàn các aurora layers */
}

.aurora-1, .aurora-2, .aurora-3, .aurora-4, .aurora-5, .aurora-6 {
    display: none;
}

/* Subtle accent layers for depth */
.aurora-accent {
    display: none; /* Ẩn hoàn toàn các accent layers */
}

.accent-1, .accent-2, .accent-3 {
    display: none;
}

/* Floating light particles */
.light-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 1; /* Đảm bảo particles vẫn hiển thị */
}

.particle {
    position: absolute;
    width: 2px; /* Giảm kích thước */
    height: 2px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%); /* Giảm opacity */
    border-radius: 50%;
    animation: particle-float 15s ease-in-out infinite; /* Làm chậm hơn */
}

/* Giảm số lượng particles và làm chậm hơn */
.particle-1 { top: 20%; left: 15%; animation-delay: 0s; animation-duration: 18s; }
.particle-2 { top: 60%; left: 25%; animation-delay: -6s; animation-duration: 20s; }
.particle-3 { top: 35%; left: 70%; animation-delay: -12s; animation-duration: 22s; }
.particle-4 { top: 80%; left: 45%; animation-delay: -18s; animation-duration: 16s; }
.particle-5 { display: none; } /* Ẩn để giảm số lượng */
.particle-6 { display: none; }
.particle-7 { display: none; }
.particle-8 { display: none; }

/* Removed aurora animations */

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.2; /* Giảm opacity */
    }
    25% {
        transform: translateY(-15px) translateX(8px) scale(1.1); /* Giảm di chuyển */
        opacity: 0.4;
    }
    50% {
        transform: translateY(-8px) translateX(-3px) scale(0.9);
        opacity: 0.3;
    }
    75% {
        transform: translateY(-20px) translateX(10px) scale(1.05);
        opacity: 0.5;
    }
}

/* Enhanced background glow effect */
.aurora-bg::before {
    display: none; /* Ẩn hoàn toàn */
}

@keyframes aurora-glow {
    0% {
        opacity: 0.2; /* Giảm opacity */
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.02) rotate(0.5deg); /* Giảm scale và rotation */
    }
    100% {
        opacity: 0.25;
        transform: scale(1.01) rotate(-0.3deg);
    }
}

.future .container {
    position: relative;
    z-index: 10;
}

.future-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.future-text {
    flex: 1;
}

/* Title with animated line */
.title-with-line {
    position: relative;
    margin-bottom: 30px;
}

.future-text h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 0;
    color: #000000;
    position: relative;
    display: inline-block;
}

/* Animated line beside title */
.animated-line {
    display: none;
}

.title-with-line.aos-animate .animated-line {
    width: 80px;
}

.future-text p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #333333;
}

.future-text ul {
    list-style-type: none;
    padding-left: 0;
}

.future-text li {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
    color: #333333;
}

.future-text li:before {
    content: "•";
    color: #ff9500;
    font-size: 20px;
    position: absolute;
    left: 0;
}

.future-image {
    flex: 1;
    max-width: 400px;
}



/* Avatar image with hover effects */
.avatar-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
}

.avatar-image:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-radius: 25px;
}

/* Glowing border effect on hover */
.future-image:hover .avatar-image {
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 0 3px rgba(255, 149, 0, 0.3),
        0 0 20px rgba(255, 149, 0, 0.2);
}

/* Floating Orbs Background Effect */
.floating-orbs-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.geometric-ray {
    position: absolute;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(200, 200, 200, 0.1) 20%,
        rgba(180, 180, 180, 0.3) 50%,
        rgba(200, 200, 200, 0.1) 80%,
        transparent 100%
    );
    border-radius: 2px;
    pointer-events: none;
    transform-origin: center;
}

.ray-1 {
    width: 200px;
    height: 3px;
    top: 20%;
    left: -50px;
    transform: rotate(15deg);
    animation: slide-ray-1 20s linear infinite;
}

.ray-2 {
    width: 150px;
    height: 2px;
    top: 60%;
    right: -50px;
    transform: rotate(-25deg);
    animation: slide-ray-2 25s linear infinite;
    animation-delay: -5s;
}

.ray-3 {
    width: 180px;
    height: 4px;
    top: 80%;
    left: -60px;
    transform: rotate(35deg);
    animation: slide-ray-3 30s linear infinite;
    animation-delay: -10s;
}

.ray-4 {
    width: 120px;
    height: 2px;
    top: 40%;
    right: -40px;
    transform: rotate(-45deg);
    animation: slide-ray-4 22s linear infinite;
    animation-delay: -8s;
}

.ray-5 {
    width: 160px;
    height: 3px;
    top: 10%;
    left: -55px;
    transform: rotate(55deg);
    animation: slide-ray-5 28s linear infinite;
    animation-delay: -12s;
}

.ray-6 {
    width: 140px;
    height: 2px;
    top: 90%;
    right: -45px;
    transform: rotate(-15deg);
    animation: slide-ray-6 24s linear infinite;
    animation-delay: -6s;
}

.ray-7 {
    width: 170px;
    height: 3px;
    top: 30%;
    left: -60px;
    transform: rotate(25deg);
    animation: slide-ray-7 26s linear infinite;
    animation-delay: -14s;
}

.ray-8 {
    width: 130px;
    height: 2px;
    top: 50%;
    right: -50px;
    transform: rotate(-35deg);
    animation: slide-ray-8 23s linear infinite;
    animation-delay: -3s;
}

.ray-9 {
    width: 190px;
    height: 4px;
    top: 70%;
    left: -70px;
    transform: rotate(45deg);
    animation: slide-ray-9 29s linear infinite;
    animation-delay: -18s;
}

.ray-10 {
    width: 110px;
    height: 2px;
    top: 15%;
    right: -35px;
    transform: rotate(-55deg);
    animation: slide-ray-10 21s linear infinite;
    animation-delay: -9s;
}

/* Geometric Light Rays Animation Keyframes */

@keyframes slide-ray-1 {
    0% {
        transform: translateX(-250px) rotate(15deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) rotate(15deg);
        opacity: 0;
    }
}

@keyframes slide-ray-2 {
    0% {
        transform: translateX(250px) rotate(-25deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(calc(-100vw - 100px)) rotate(-25deg);
        opacity: 0;
    }
}

@keyframes slide-ray-3 {
    0% {
        transform: translateX(-280px) rotate(35deg);
        opacity: 0;
    }
    15% {
        opacity: 0.7;
    }
    85% {
        opacity: 0.7;
    }
    100% {
        transform: translateX(calc(100vw + 120px)) rotate(35deg);
        opacity: 0;
    }
}

@keyframes slide-ray-4 {
    0% {
        transform: translateX(200px) rotate(-45deg);
        opacity: 0;
    }
    12% {
        opacity: 0.5;
    }
    88% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(calc(-100vw - 80px)) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes slide-ray-5 {
    0% {
        transform: translateX(-300px) rotate(55deg);
        opacity: 0;
    }
    8% {
        opacity: 0.9;
    }
    92% {
        opacity: 0.9;
    }
    100% {
        transform: translateX(calc(100vw + 140px)) rotate(55deg);
        opacity: 0;
    }
}

@keyframes slide-ray-6 {
    0% {
        transform: translateX(220px) rotate(-15deg);
        opacity: 0;
    }
    14% {
        opacity: 0.4;
    }
    86% {
        opacity: 0.4;
    }
    100% {
        transform: translateX(calc(-100vw - 90px)) rotate(-15deg);
        opacity: 0;
    }
}

@keyframes slide-ray-7 {
    0% {
        transform: translateX(-320px) rotate(25deg);
        opacity: 0;
    }
    12% {
        opacity: 0.6;
    }
    88% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(calc(100vw + 150px)) rotate(25deg);
        opacity: 0;
    }
}

@keyframes slide-ray-8 {
    0% {
        transform: translateX(180px) rotate(-35deg);
        opacity: 0;
    }
    16% {
        opacity: 0.5;
    }
    84% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(calc(-100vw - 70px)) rotate(-35deg);
        opacity: 0;
    }
}

@keyframes slide-ray-9 {
    0% {
        transform: translateX(-350px) rotate(45deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(calc(100vw + 170px)) rotate(45deg);
        opacity: 0;
    }
}

@keyframes slide-ray-10 {
    0% {
        transform: translateX(160px) rotate(-55deg);
        opacity: 0;
    }
    18% {
        opacity: 0.3;
    }
    82% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(calc(-100vw - 60px)) rotate(-55deg);
        opacity: 0;
    }
}

/* Media Queries for Future Section */
@media (max-width: 768px) {
    .future-content {
        flex-direction: column-reverse;
        gap: 40px;
    }

    .future-image {
        max-width: 100%;
    }

    .future-text h2 {
        font-size: 28px;
    }
    
    .animated-line {
        left: calc(100% + 15px);
    }
    
    .title-with-line.aos-animate .animated-line {
        width: 60px;
    }
    
    .aurora-bg {
        display: none; /* Ẩn hoàn toàn trên tablet */
    }
    
    .particle {
        display: none; /* Ẩn particles trên tablet */
    }

    /* Adjust floating orbs for tablet */
    .geometric-ray {
        opacity: 0.7; /* Slightly reduce opacity on tablet */
    }
    
    .ray-1, .ray-2, .ray-3, .ray-4, .ray-5, .ray-6, .ray-7, .ray-8, .ray-9, .ray-10 {
        animation-duration: 15s; /* Slightly faster on tablet */
    }
}

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

    .future-text h2 {
        font-size: 24px;
    }

    .future-text p {
        font-size: 14px;
    }
    
    .animated-line {
        left: calc(100% + 10px);
    }
    
    .title-with-line.aos-animate .animated-line {
        width: 40px;
    }
    
    .aurora-bg {
        display: none; /* Ẩn hoàn toàn trên mobile */
    }
    
    .light-particles {
        opacity: 1; /* Giữ particles hiển thị trên mobile */
    }

    /* Adjust geometric rays for mobile */
    .geometric-ray {
        opacity: 0.5; /* Reduce opacity on mobile */
    }
    
    .ray-1, .ray-2, .ray-3, .ray-4, .ray-5, .ray-6, .ray-7, .ray-8, .ray-9, .ray-10 {
        animation-duration: 35s; /* Slower on mobile */
    }
    
    /* Hide some rays on mobile for better performance */
    .ray-6, .ray-7, .ray-8, .ray-9, .ray-10 {
        display: none;
    }
    
    /* Reduce container opacity on mobile */
    .floating-orbs-container {
        opacity: 0.6;
    }
}

/* Certificate Section */
.certificate {
    background: #000000;
    padding: 120px 0;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Certificate Background Effects - Same as Homepage */
.certificate .animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#particles-js-certificate {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.certificate .container {
    position: relative;
    z-index: 2;
}

/* Certificate Floating Light Orbs */
.certificate .geometric-shape {
    display: none;
}

.certificate-grid {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 600px;
}

.certificate-page {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
    left: 0;
    top: 0;
}

.certificate-page.previous {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
}

.certificate-page.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    position: relative;
}

.certificate-page.next {
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
}

.certificate-item {
    background: rgba(51, 51, 51, 0.8);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 2px solid transparent;
    height: 500px;
}

.certificate-item:hover {
    transform: translateY(-5px);
    border-color: #ff9500;
    box-shadow: 0 10px 30px rgba(255, 149, 0, 0.2);
    background: rgba(51, 51, 51, 0.9);
}

.certificate-image {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: rgba(51, 51, 51, 0.5);
    border-radius: 15px;
    height: 300px;
    overflow: hidden;
    padding: 15px;
}

.certificate-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.certificate-item:hover .certificate-img {
    transform: scale(1.05);
}

.certificate-placeholder {
    color: #ff9500;
    font-size: 24px;
    font-weight: 600;
}

.certificate-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 5px;
}

.certificate-info h3 {
    color: #ff9500;
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.certificate-info h3 a {
    color: #ff9500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.certificate-info h3 a:hover {
    color: #ffa533;
    text-decoration: underline;
}

.certificate-info p {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    visibility: hidden;
}

.certificate-item:hover .certificate-info p {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Certificate Navigation */
.certificate-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -60px;
    gap: 20px;
    position: relative;
    z-index: 10;
}

.nav-btn {
    background: transparent;
    border: 2px solid #ff9500;
    color: #ff9500;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
    min-width: 120px;
}

.nav-btn:hover:not(:disabled) {
    background: #ff9500;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 149, 0, 0.3);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #666666;
    color: #666666;
}

.page-indicators {
    display: flex;
    gap: 10px;
}

.page-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-dot.active {
    background: #ff9500;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .certificate-page {
        grid-template-columns: repeat(2, 1fr);
    }
    .certificate-item {
        height: 450px;
    }
    .certificate-image {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .certificate-page {
        grid-template-columns: 1fr;
    }
    .certificate-item {
        height: 400px;
    }
    .certificate-image {
        height: 200px;
    }
    
    .certificate-item {
        aspect-ratio: auto;
    }

    .nav-btn {
        min-width: 100px;
        font-size: 14px;
        padding: 8px 16px;
    }

    .certificate-nav {
        margin-top: -50px;
    }
    .certificate-grid {
        margin-bottom: 50px;
    }
}

@media (max-width: 480px) {
    .certificate-nav {
        margin-top: -40px;
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 200px;
    }
    .certificate-grid {
        margin-bottom: 40px;
    }
}

/* Projects Section */
.projects {
    background: #ffffff;
    color: #000000;
    padding: 80px 0;
}

/* Projects filter controls */
.filter-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-btn {
    background: transparent;
    border: 2px solid #e0e0e0;
    color: #000;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    transition: all .25s ease;
}

.filter-btn:hover { border-color: #ff9500; color: #ff9500; }
.filter-btn.active { background: #ff9500; border-color: #ff9500; color: #000; }

/* Filter animation */
#projectsGrid {
    transition: opacity .25s ease, transform .25s ease;
}

.project-item { transition: transform .25s ease, opacity .25s ease; }
.project-item.hide { opacity: 0; transform: scale(.98); pointer-events: none; }
.project-item.show { opacity: 1; transform: scale(1); }

.section-header-with-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header-with-link h2 {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    letter-spacing: -0.01em;
}

.view-all-link {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    margin-top: auto;
    font-size: 15px;
}

.view-all-link .arrow-icon {
    margin-left: 12px;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f0f0;
    transition: all 0.3s ease;
    line-height: 1;
}

.view-all-link:hover .arrow-icon {
    background-color: #e0e0e0;
    transform: translateX(6px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

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

.project-item {
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    height: auto;
}

.project-image {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 4px;
}

.project-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-item:hover .project-img {
    transform: scale(1.05);
}

.project-info {
    padding: 25px 25px 25px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 300px;
}

.project-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-left: 0;
    position: relative;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 5px;
}

.category-tag {
    color: #ffffff;
    font-weight: 600;
    background-color: #ff9500;
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(255, 149, 0, 0.2);
    margin-bottom: 5px;
    margin-right: 5px;
}

.category-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 149, 0, 0.3);
}

.project-date {
    color: #888;
    font-size: 13px;
    font-weight: 500;
    position: absolute;
    right: -22px;
    top: 0;
    padding-right: 0;
}

.project-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000000;
    line-height: 1.3;
    letter-spacing: -0.01em;
    padding-top: 5px;
}

.project-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.6em * 3);
}

.read-more-link {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    margin-top: auto;
    font-size: 15px;
}

.read-more-link:hover {
    opacity: 0.7;
}

.read-more-link .arrow-icon {
    margin-left: 12px;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f0f0;
    transition: all 0.3s ease;
    line-height: 1;
}

.read-more-link:hover .arrow-icon {
    background-color: #e0e0e0;
    transform: translateX(6px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Media queries for projects section */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .section-header-with-link h2 {
        font-size: 28px;
    }
    
    .project-image {
        padding-bottom: 56.25%; /* Maintain 16:9 aspect ratio on mobile */
    }
    
    .project-info h3 {
        min-height: auto; /* Reset min-height on mobile */
    }
}

@media (max-width: 480px) {
    .section-header-with-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .section-header-with-link h2 {
        font-size: 24px;
    }
    
    .project-info h3 {
        font-size: 20px;
    }
}

/* Contact Section */
.contact {
    padding: 100px 0 80px;
    background-color: #000;
    margin-top: -1px; /* Để tránh khoảng trắng giữa các section */
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 10;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5); /* Thêm đổ bóng phía trên để tạo chiều sâu */
}

.contact .container {
    max-width: 1300px;
    width: 100%;
    padding: 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
    
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
}

.contact-info {
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
    line-height: 1.6;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icon {
    color: #666;
    transition: color 0.3s;
}

.social-icon:hover {
    color: #ff9500;
}

.footer-center {
    display: flex;
    justify-content: center;
}

.footer-nav {
    list-style: none;
    padding: 0;
    text-align: center;
}

.footer-nav li {
    margin-bottom: 15px;
}

.footer-link {
    color: #999;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.footer-link:hover, .footer-link.active {
    color: #ff9500;
}

    .footer-link-white {
        color: #ffffff;
        text-decoration: none;
        font-size: 20px;
        font-weight: 600;
        transition: color 0.3s;
        margin-bottom: 8px;
        display: block;
        position: relative;
        padding-left: 0;
    }

.footer-link-white:hover {
    color: #ff9500;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-left: 120px;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid #222;
    padding-top: 40px;
}

.location {
    margin-bottom: 25px;
}

.location h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #fff;
}

.location p {
    color: #999;
    line-height: 1.6;
    font-size: 14px;
}

.copyright {
    color: #666;
    font-size: 14px;
    text-align: center;
}

/* Animations */
@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideDownSmooth {
    0% {
        opacity: 0;
        transform: translateY(-80px) scale(0.8);
    }
    70% {
        opacity: 0.9;
        transform: translateY(10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideDownSmoothRotated {
    0% {
        opacity: 0;
        transform: rotate(90deg) translateY(-80px) scale(0.8);
    }
    70% {
        opacity: 0.9;
        transform: rotate(90deg) translateY(10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(90deg) translateY(0) scale(1);
    }
}

/* Removed background glow animation */

/* Removed float orb animation */

/* Responsive Design */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-right {
        grid-column: 1 / -1;
        align-items: flex-start;
        margin-top: 20px;
    }
    
    .footer-links {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 20px 0;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .scroll-indicator {
        right: 70px;
        bottom: 50px;
        width: 100px;
        height: 100px;
    }

    .scroll-circle {
        width: 60px;
        height: 60px;
    }

    .scroll-circle::before {
        width: 38px;
        height: 38px;
    }

    .scroll-text {
        width: 100px;
        height: 100px;
    }

    .scroll-text span {
        transform-origin: 0 50px;
        font-size: 8.5px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-center {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 30px;
    }
    
    .location {
        margin-bottom: 20px;
    }

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

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

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

    .vertical-text {
        left: -18px;
        bottom: 80px;
        font-size: 10px;
    }
}

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

    .hero {
        padding: 16px 0 24px;
    }

    .hero-title {
        font-size: 32px;
        margin-bottom: 24px;
    }

    .hero-description {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 22px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .btn {
        padding: 14px 18px;
        font-size: 13px;
        min-height: 44px;
        width: 100%;
    }
    .btn-primary { padding-right: 52px; }
    .btn-secondary { padding-right: 48px; padding-left: 18px; }
    .btn-arrow { width: 38px; height: 38px; right: 6px; }

    .scroll-indicator {
        right: 20px;
        bottom: 24px;
        width: 76px;
        height: 76px;
    }

    .scroll-circle {
        width: 46px;
        height: 46px;
    }

    .scroll-circle::before {
        width: 30px;
        height: 30px;
    }

    .scroll-text {
        width: 76px;
        height: 76px;
    }

    .scroll-text span {
        transform-origin: 0 38px;
        font-size: 7px;
    }

    .scroll-text { display: none; }

    .brand-logo {
        left: 20px;
        top: 20px;
        font-size: 28px;
    }

    .vertical-text {
        left: -22px;
        bottom: 60px;
        font-size: 9px;
        display: none; /* hide on very small screens to avoid covering content */
    }
}

/* Add smooth scroll behavior to the whole page */
html {
    scroll-behavior: smooth;
}

/* Hamburger Menu Button */
.hamburger-menu {
    position: fixed;
    top: 40px;
    right: 40px;
    z-index: 1000;
    cursor: pointer;
    mix-blend-mode: difference;
}

.hamburger-btn {
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}



.hamburger-line {
    width: 28px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.hamburger-line:nth-child(1) {
    width: 28px;
}

.hamburger-line:nth-child(2) {
    width: 22px;
    margin-left: 6px;
}

.hamburger-line:nth-child(3) {
    width: 25px;
    margin-left: 3px;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
    width: 28px;
    margin-left: 0;
    background: #ffffff;
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
    width: 28px;
    margin-left: 0;
    background: #ffffff;
}



/* Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1); /* Đen hoàn toàn */
    backdrop-filter: none; /* Bỏ blur để không thấy nền phía sau */
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hiệu ứng đóng menu - thu về nút hamburger */
.nav-overlay.closing {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.nav-overlay.closing .nav-content {
    transform: scale(0.3) translate(calc(100vw - 120px), -calc(100vh - 120px));
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Đảm bảo nền đen hoàn toàn khi menu mở */
.nav-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: -1;
}

/* Ẩn tất cả hiệu ứng nền khi menu mở */
body.menu-open .animated-bg,
body.menu-open .aurora-bg,
body.menu-open #particles-js {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Ẩn hoàn toàn scrollbar mặc định */
::-webkit-scrollbar {
    display: none;
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Smooth scrollbar transition */
body {
    transition: all 0.3s ease;
}

/* Ẩn scrollbar khi menu mở để tránh layout shift */
body.menu-open {
    overflow: hidden !important;
}

/* Custom Scroll Progress Indicator - Bên phải */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    width: 3px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
}

.scroll-progress-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #ff9500, #ff6b00, #ff9500);
    background-size: 100% 200%;
    animation: gradientShift 3s ease-in-out infinite;
    transition: none;
    box-shadow: 0 0 8px rgba(255, 149, 0, 0.4);
    will-change: transform;
    transform: scaleY(0) translateZ(0);
    transform-origin: top;
}

/* Hover effect cho thanh scroll */
.scroll-progress:hover {
    width: 4px;
    transition: width 0.3s ease;
    background: rgba(0, 0, 0, 0.9);
}

.scroll-progress:hover .scroll-progress-bar {
    box-shadow: 0 0 12px rgba(255, 149, 0, 0.8);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Ẩn scroll progress khi menu mở */
body.menu-open .scroll-progress {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Page Transition Overlay - Optimized for smooth animation */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.4s;
    will-change: opacity;
    pointer-events: none;
    /* Hardware acceleration for smoother animation */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.page-transition.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
    pointer-events: all;
}

/* Content reveal animations - content visible by default */
.content-reveal {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    transform: translateZ(0); /* Force hardware acceleration */
}

.nav-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 40px 40px;
    transform: scale(1) translate(0, 0);
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}



/* Navigation Menu */
.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    width: 100%;
}

.nav-menu li {
    margin: 20px 0;
    opacity: 0;
    transform: translateY(30px);
    animation: navItemSlideIn 0.6s ease forwards;
    transition: all 0.4s ease;
    width: 100%;
    text-align: center;
}

.nav-menu li:nth-child(1) { animation-delay: 0.1s; }
.nav-menu li:nth-child(2) { animation-delay: 0.2s; }
.nav-menu li:nth-child(3) { animation-delay: 0.3s; }
.nav-menu li:nth-child(4) { animation-delay: 0.4s; }
.nav-menu li:nth-child(5) { animation-delay: 0.5s; }

/* Hiệu ứng thu lại menu items khi đóng */
.nav-overlay.closing .nav-menu li {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
    transition: all 0.3s ease;
}

.nav-overlay.closing .nav-menu li:nth-child(1) { transition-delay: 0s; }
.nav-overlay.closing .nav-menu li:nth-child(2) { transition-delay: 0.05s; }
.nav-overlay.closing .nav-menu li:nth-child(3) { transition-delay: 0.1s; }
.nav-overlay.closing .nav-menu li:nth-child(4) { transition-delay: 0.15s; }
.nav-overlay.closing .nav-menu li:nth-child(5) { transition-delay: 0.2s; }

/* Hiệu ứng khi click vào menu item */
.nav-menu li.shrinking {
    transform: scale(0.8) translateY(-20px);
    opacity: 0.3;
    transition: all 0.3s ease;
}

.nav-menu li.selected {
    transform: scale(1.1);
    opacity: 1;
    transition: all 0.3s ease;
}

.nav-menu li.selected a {
    color: #ff9500;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 48px;
    font-weight: 300;
    font-family: 'Google Sans', sans-serif;
    position: relative;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-menu a:hover {
    color: #ff9500;
    transform: none; /* Loại bỏ hiệu ứng nhảy lên */
}

/* Hiệu ứng khi click - chữ sẽ scale nhỏ lại */
.nav-menu a.clicked {
    transform: scale(0.9);
    color: #ff9500;
    transition: transform 0.2s ease;
}

/* Navigation Footer */
.nav-footer {
    margin-top: auto;
}

.nav-social {
    display: flex;
    gap: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: navItemSlideIn 0.6s ease 0.5s forwards;
    transition: all 0.4s ease;
}

/* Hiệu ứng thu lại social links */
.nav-overlay.closing .nav-social {
    opacity: 0;
    transform: translateY(50px) scale(0.8);
    transition: all 0.3s ease 0.2s;
}

.social-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: rgba(255, 149, 0, 0.1);
    border-color: #ff9500;
    color: #ff9500;
    transform: translateY(-2px);
}

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

/* Mobile Responsive for Hamburger Menu */
@media (max-width: 768px) {
    .hamburger-menu {
        top: 30px;
        right: 30px;
    }
    
    .hamburger-btn {
        width: 55px;
        height: 55px;
        gap: 5px;
    }
    
    .hamburger-line {
        width: 24px;
        height: 2.5px;
    }
    
    .hamburger-line:nth-child(1) {
        width: 24px;
    }
    
    .hamburger-line:nth-child(2) {
        width: 18px;
        margin-left: 6px;
    }
    
    .hamburger-line:nth-child(3) {
        width: 21px;
        margin-left: 3px;
    }
    

    
    .nav-content {
        padding: 60px 30px 30px;
    }
    
    .nav-menu a {
        font-size: 36px;
        text-align: center;
    }
    
    .nav-social {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    /* Responsive cho hiệu ứng đóng menu */
    .nav-overlay.closing .nav-content {
        transform: scale(0.3) translate(calc(100vw - 90px), -calc(100vh - 90px));
    }
}

@media (max-width: 480px) {
    .hamburger-menu {
        top: 25px;
        right: 25px;
    }
    
    .hamburger-btn {
        width: 50px;
        height: 50px;
        gap: 4px;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
    }
    
    .hamburger-line:nth-child(1) {
        width: 20px;
    }
    
    .hamburger-line:nth-child(2) {
        width: 16px;
        margin-left: 4px;
    }
    
    .hamburger-line:nth-child(3) {
        width: 18px;
        margin-left: 2px;
    }
    

    
    .nav-content {
        padding: 50px 20px 20px;
    }
    
    .nav-menu a {
        font-size: 28px;
        text-align: center;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    /* Responsive cho hiệu ứng đóng menu mobile */
    .nav-overlay.closing .nav-content {
        transform: scale(0.3) translate(calc(100vw - 70px), -calc(100vh - 70px));
    }
}

/* Vertical Homepage Text */
.vertical-text {
    position: fixed;
    left: 80px;
    bottom: 50px;
    transform: rotate(-90deg);
    transform-origin: left bottom;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 3px;
    color: white;
    z-index: 100;
    text-transform: uppercase;
    mix-blend-mode: difference;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 45px;
    bottom: 170px; /* Move higher to be above the text */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    transform: translateY(100px); /* Start from below */
    pointer-events: none; /* Disable interactions when hidden */
    will-change: opacity, transform; /* Optimize for animation */
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto; /* Enable interactions when visible */
}

.back-to-top.slide-down {
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.6, 1), transform 1s cubic-bezier(0.4, 0, 0.6, 1);
    pointer-events: none;
}

.back-to-top-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #c0c0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.3s ease; /* Added background-color transition */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    will-change: transform;
}

.back-to-top-circle:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top-circle.clicked {
    transform: scale(0.95);
    background-color: #a0a0a0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-to-top-text {
    position: fixed;
    right: 80px;
    bottom: 50px;
    transform: rotate(90deg) translateY(100px);
    transform-origin: right bottom;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 3px;
    color: white;
    z-index: 100;
    text-transform: uppercase;
    mix-blend-mode: difference;
    opacity: 0;
    pointer-events: none;
    will-change: opacity, transform;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top-text.visible {
    opacity: 1;
    transform: rotate(90deg) translateY(0);
    pointer-events: auto;
}

.back-to-top-text.slide-down {
    opacity: 0;
    transform: rotate(90deg) translateY(100px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.6, 1), transform 1s cubic-bezier(0.4, 0, 0.6, 1);
    pointer-events: none;
}

@media (max-width: 768px) {
    .back-to-top {
        right: 12px; /* nudge slightly more toward the right edge */
        bottom: 150px; /* lift icon slightly more */
    }
    
    .back-to-top-circle {
        width: 40px;
        height: 40px;
    }
    
    .back-to-top-text {
        right: 32px; /* keep aligned with icon after right shift */
        bottom: 50px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        right: 12px; /* nudge slightly more toward the right edge */
        bottom: 140px; /* lift icon slightly more */
    }
    
    .back-to-top-circle {
        width: 35px;
        height: 35px;
    }
    
    .back-to-top-text {
        right: 30px; /* keep aligned with icon after right shift */
        bottom: 40px;
        font-size: 9px;
    }
}

.certificate .section-header {
    text-align: center;
    margin-bottom: 20px;
}

/* ============================================
   MODERN PROJECTS PAGE DESIGN
   ============================================ */

/* Projects Page Body Class - Optimized for smooth loading */
body.projects-page {
    background: #000000;
    color: #ffffff;
    /* Optimize for smooth transitions */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Gradient Overlay for Projects Page */
.projects-gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(255, 149, 0, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at bottom, rgba(255, 100, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Modern Projects Section - Optimized for smooth rendering */
.projects-modern {
    min-height: 100vh;
    padding: 120px 0 80px;
    position: relative;
    z-index: 1;
    /* Performance optimization */
    transform: translateZ(0);
    will-change: opacity;
}

/* Projects Header */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
    gap: 40px;
}

.header-content {
    flex: 1;
}

.projects-title {
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

.title-gradient {
    background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-subtitle {
    font-size: 18px;
    color: #999999;
    font-weight: 400;
    margin: 0;
}

/* Back Home Button - Optimized for smooth animation */
.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    /* Performance optimization */
    transform: translateZ(0);
    will-change: transform, background-color, border-color;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.back-home-btn:hover {
    background: rgba(255, 149, 0, 0.1);
    border-color: rgba(255, 149, 0, 0.5);
    transform: translateX(-5px) translateZ(0);
    box-shadow: 0 8px 24px rgba(255, 149, 0, 0.2);
}

.btn-icon {
    font-size: 20px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Performance optimization */
    transform: translateZ(0);
    will-change: transform;
}

.back-home-btn:hover .btn-icon {
    transform: translateX(-3px) translateZ(0);
}

/* Filter Section */
.filter-section {
    margin-bottom: 50px;
}

.filter-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Modern Filter Buttons */
.modern-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #cccccc;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.modern-filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 149, 0, 0.3);
    color: #ffffff;
    transform: translateY(-2px);
}

.modern-filter-btn.active {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.2) 0%, rgba(255, 107, 0, 0.2) 100%);
    border-color: rgba(255, 149, 0, 0.5);
    color: #ff9500;
    box-shadow: 0 8px 24px rgba(255, 149, 0, 0.15);
}

.filter-text {
    font-size: 14px;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.modern-filter-btn.active .filter-count {
    background: rgba(255, 149, 0, 0.3);
    color: #ff9500;
}

/* Modern Projects Grid */
.modern-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 35px;
    margin-bottom: 60px;
}

/* Modern Project Card - Optimized for smooth animation */
.modern-project-card {
    position: relative;
    opacity: 1;
    transform: scale(1) translateZ(0);
    /* Performance optimization */
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.modern-project-card.hide {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    height: 0;
    margin: 0;
    overflow: hidden;
}

.card-inner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Performance optimization */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Card Image Wrapper */
.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.9) 0%, rgba(255, 107, 0, 0.9) 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-content {
    text-align: center;
}

.view-project-text {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.overlay-arrow {
    font-size: 32px;
    color: #ffffff;
    animation: bounceArrow 1.5s ease-in-out infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* Project Number */
.project-number {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #ff9500;
    border: 1px solid rgba(255, 149, 0, 0.3);
}

/* Card Content */
.card-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.tech-badge {
    padding: 6px 12px;
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.3);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #ff9500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-year {
    font-size: 14px;
    font-weight: 600;
    color: #666666;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

/* Card Title */
.card-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Card Description */
.card-description {
    font-size: 15px;
    line-height: 1.6;
    color: #aaaaaa;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footer */
.card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Project Link */
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.project-link:hover {
    color: #ff9500;
    gap: 15px;
}

.project-link svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.project-link:hover svg {
    transform: translateX(5px);
}

/* Responsive Design for Modern Projects */
@media (max-width: 1200px) {
    .modern-projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .modern-projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .projects-title {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .projects-modern {
        padding: 100px 0 60px;
    }
    
    .modern-projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .projects-header {
        margin-bottom: 40px;
    }
    
    .projects-title {
        font-size: 40px;
    }
    
    .filter-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filter-buttons {
        width: 100%;
    }
    
    .modern-filter-btn {
        flex: 1;
        justify-content: center;
    }
    
    .card-image-wrapper {
        height: 240px;
    }
    
    .card-content {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .projects-title {
        font-size: 32px;
    }
    
    .projects-subtitle {
        font-size: 16px;
    }
    
    .back-home-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .filter-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .modern-filter-btn {
        width: 100%;
    }
    
    .card-image-wrapper {
        height: 200px;
    }
    
    .card-title {
        font-size: 20px;
    }
    
    .card-description {
        font-size: 14px;
    }
    
    .tech-stack {
        gap: 6px;
    }
    
    .tech-badge {
        font-size: 10px;
        padding: 5px 10px;
    }
}
