:root {
    --primary-color: #dc2626; /* Đỏ Five Star */
    --secondary-color: #fbbf24; /* Vàng Five Star */
    --accent-color: #f59e0b; /* Vàng cam */
    --bg-color: #1a1a1a; /* Nền tối */
    --second-bg-color: #2d2d2d; /* Nền phụ */
    --text-color: #ffffff; /* Text sáng */
    --text-light: #d1d5db;
    --white: #ffffff;
    --shadow: rgba(220, 38, 38, 0.2);
    --gradient-primary: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background: var(--gradient-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

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

.header {
    background: var(--gradient-primary);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--secondary-color);
}

.header .logo {
    color: var(--white);
    font-size: 1.8em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header ul {
    list-style: none;
    display: flex;
}

.header ul li a {
    text-decoration: none;
    color: var(--white);
    padding: 12px 20px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 25px;
    font-weight: 500;
}

.header ul li a:hover {
    background-color: var(--secondary-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.hero {
    background: var(--gradient-dark);
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 251, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255, 107, 107, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

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

.hero h2 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    font-weight: bold;
}

.hero p {
    font-size: 1.4em;
    margin-bottom: 40px;
    color: var(--white);
    opacity: 0.95;
}

.btn {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

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

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

.btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(244, 162, 97, 0.4);
    background: linear-gradient(135deg, #f4a261 0%, #e76f51 100%);
}

.section {
    padding: 60px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section:nth-child(odd) {
    background: var(--second-bg-color);
}

.section h2 {
    text-align: center;
    margin: 0 auto 30px auto;
    font-size: 2.5em;
    color: var(--primary-color);
    position: relative;
    display: block;
    width: 100%;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

.content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

.image-area, .text-area {
    flex: 1;
}

.profile-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.projects-section .container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-around;
}

.project-card {
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    max-width: 350px;
    padding-bottom: 20px;
    text-align: center;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
}

.project-card h3 {
    padding: 0 15px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.project-card p {
    padding: 0 15px;
    margin-bottom: 15px;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.contact-section {
    text-align: center;
    background: var(--gradient-primary);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars2" x="0" y="0" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="2" fill="rgba(255,215,0,0.2)"/></pattern></defs><rect width="100" height="100" fill="url(%23stars2)"/></svg>');
    opacity: 0.1;
}

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

.contact-section h2 {
    color: white;
    font-size: 3em;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.contact-section h2::after {
    background: var(--gradient-gold);
}

.contact-btn {
    background: var(--gradient-gold);
    color: var(--accent-color);
    font-size: 1.2em;
    padding: 18px 35px;
}

.contact-btn:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

footer {
    text-align: center;
    padding: 30px 0;
    background: var(--gradient-primary);
    color: white;
    font-size: 1em;
    border-top: 3px solid var(--secondary-color);
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-80px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(80px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-10px) rotate(1deg); 
    }
    50% { 
        transform: translateY(-5px) rotate(0deg); 
    }
    75% { 
        transform: translateY(-15px) rotate(-1deg); 
    }
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(44, 90, 160, 0.4);
    }
    70% { 
        transform: scale(1.05); 
        box-shadow: 0 0 0 10px rgba(44, 90, 160, 0);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(44, 90, 160, 0);
    }
}

@keyframes shimmer {
    0% { 
        background-position: -200% 0; 
    }
    100% { 
        background-position: 200% 0; 
    }
}

/* Smooth Animation classes */
.fade-in-up {
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-left {
    animation: slideInLeft 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-right {
    animation: slideInRight 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.shimmer-effect {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Additional styles for Five Star theme */
.stars {
    color: var(--secondary-color);
    font-size: 1.2em;
    margin: 0 5px;
}

.gradient-text {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.card {
    background: var(--second-bg-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(220, 38, 38, 0.2);
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 50px rgba(220, 38, 38, 0.3);
    border-color: rgba(220, 38, 38, 0.5);
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    .header ul {
        width: 100%;
        justify-content: center;
        padding-top: 10px;
        flex-wrap: wrap;
    }
    .hero h2 {
        font-size: 2em;
    }
    .section {
        padding: 40px 0;
    }
    .section h2 {
        font-size: 2em;
    }
    .content-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .profile-img {
        margin-bottom: 20px;
    }
    .card {
        margin: 10px 0;
        padding: 20px;
    }
    .container {
        width: 95%;
        padding: 10px;
    }
}

/* Additional alignment fixes */
.projects-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.projects-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.projects-section p {
    text-align: center;
    margin-bottom: 30px;
}

/* Grid alignment */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
    justify-items: center;
}

.grid-item {
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Text alignment */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Flex utilities */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Advanced Effects */
.glow-effect {
    box-shadow: 0 0 20px rgba(0, 251, 255, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(0, 251, 255, 0.3);
    }
    to {
        box-shadow: 0 0 30px rgba(0, 251, 255, 0.6);
    }
}

.neon-text {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 251, 255, 0.5),
                 0 0 20px rgba(0, 251, 255, 0.3),
                 0 0 30px rgba(0, 251, 255, 0.2);
}

.particle-effect {
    position: relative;
}

.particle-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 251, 255, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 60% 20%, rgba(255, 107, 107, 0.3) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px, 60px 60px;
    animation: particles 20s linear infinite;
    pointer-events: none;
}

@keyframes particles {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.matrix-effect {
    position: relative;
    overflow: hidden;
}

.matrix-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 50%, rgba(0, 251, 255, 0.03) 50%);
    background-size: 100% 4px;
    animation: matrix 10s linear infinite;
    pointer-events: none;
}

@keyframes matrix {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Image Popup Styles */
.popup-image {
    transition: all 0.3s ease;
}

.popup-image:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.image-popup.active {
    opacity: 1;
    visibility: visible;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 251, 255, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-popup.active img {
    transform: scale(1);
}

.image-popup .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3em;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-popup .close-btn:hover {
    background: rgba(220, 38, 38, 0.3);
    transform: rotate(90deg);
}