/* ===== VARIABLES ===== */
:root {
    --primary-color: #C53030; /* Red từ logo */
    --secondary-color: #F6E05E; /* Yellow từ logo */
    --dark-color: #2D3748;
    --light-color: #F7FAFC;
    --text-color: #4A5568;
    --text-light: #718096;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), #E53E3E);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), #ECC94B);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== NAVIGATION ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar-brand img {
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.1);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-color);
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.hero-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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
    z-index: 1;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: slideInLeft 1s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 500;
    animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-color);
    animation: slideInLeft 1s ease-out 0.4s both;
}

.hero-buttons {
    animation: slideInLeft 1s ease-out 0.6s both;
}

.btn {
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

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

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.social-links {
    animation: slideInLeft 1s ease-out 0.8s both;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--white);
    color: var(--text-color);
    border-radius: 50%;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

/* ===== HERO IMAGE ===== */
.hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInRight 1s ease-out;
}

.profile-avatar {
    width: 300px;
    height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

.avatar-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 50%;
    z-index: 1;
}

.profile-avatar i {
    font-size: 8rem;
    color: white;
    z-index: 2;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.floating-element i {
    font-size: 1.5rem;
}

.java-icon {
    top: 20%;
    right: -10%;
    animation: float 4s ease-in-out infinite;
}

.java-icon i {
    color: #f89820;
}

.spring-icon {
    top: 60%;
    left: -15%;
    animation: float 5s ease-in-out infinite 1s;
}

.spring-icon i {
    color: #6db33f;
}

.react-icon {
    bottom: 10%;
    right: 10%;
    animation: float 4.5s ease-in-out infinite 2s;
}

.react-icon i {
    color: #61dafb;
}

.database-icon {
    bottom: 30%;
    left: 5%;
    animation: float 5.5s ease-in-out infinite 1.5s;
}

.database-icon i {
    color: #336791;
}

.floating-element:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: float 2s ease-in-out infinite;
}

.scroll-indicator a {
    color: var(--text-light);
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
}

.scroll-indicator a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* ===== ABOUT SECTION ===== */
#about {
    padding: 5rem 0;
}

.about-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.personal-info .info-list {
    list-style: none;
    padding: 0;
}

.personal-info .info-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.personal-info .info-list li:last-child {
    border-bottom: none;
}

.skills-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-item span {
    font-weight: 500;
    color: var(--text-color);
}

.progress {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar {
    transition: width 2s ease-in-out;
}

/* ===== STATS SECTION ===== */
.stats-section {
    background: linear-gradient(135deg, var(--light-color) 0%, #e2e8f0 100%);
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    height: 100%;
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.stat-icon i {
    font-size: 2rem;
    color: white;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-title {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
}

/* ===== RESUME SECTION ===== */
#resume {
    background: var(--white);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-light);
}

.timeline-content {
    background: var(--light-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-medium);
}

.timeline-content h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-content .text-muted {
    color: var(--text-light) !important;
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-content ul {
    margin-bottom: 0;
}

.timeline-content ul li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* ===== TECH SKILLS ===== */
.tech-item {
    padding: 1.5rem 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    text-align: center;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tech-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
    background: var(--gradient-primary);
    color: white;
}

.tech-item i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.tech-item:hover i {
    color: white;
    transform: scale(1.1);
}

.tech-item p {
    margin: 0;
    font-weight: 500;
}

/* ===== PROJECTS SECTION ===== */
#projects {
    background: var(--light-color);
}

.project-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(197, 48, 48, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.project-link:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

.project-content {
    padding: 2rem;
}

.project-content h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== CONTACT SECTION ===== */
#contact {
    background: var(--white);
}

.contact-item {
    padding: 2rem 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    height: 100%;
}

.contact-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.contact-icon i {
    font-size: 2rem;
    color: white;
}

.contact-item h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-item p {
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.contact-form {
    background: var(--light-color);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(197, 48, 48, 0.25);
    background: var(--white);
}

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

/* ===== FOOTER ===== */
footer {
    background: var(--dark-color) !important;
}

footer .social-link {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    margin: 0;
}

footer .social-link:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .profile-avatar {
        width: 250px;
        height: 250px;
    }
    
    .profile-avatar i {
        font-size: 6rem;
    }
    
    .floating-element {
        width: 50px;
        height: 50px;
    }
    
    .floating-element i {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .profile-avatar {
        width: 200px;
        height: 200px;
        margin: 2rem auto;
    }
    
    .profile-avatar i {
        font-size: 4rem;
    }
    
    .floating-elements {
        display: none;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
    }
    
    .contact-form {
        padding: 2rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .tech-item {
        height: auto;
        padding: 1rem;
    }
    
    .tech-item i {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .profile-avatar {
        width: 150px;
        height: 150px;
    }
    
    .profile-avatar i {
        font-size: 3rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        margin: 0 0.25rem;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .skills-section {
        padding: 1.5rem;
    }
}

/* ===== SMOOTH SCROLLING ===== */
html {
    scroll-behavior: smooth;
}

/* ===== LOADING ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}