/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary: #6366f1;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Accent Colors for Fun Facts */
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-pink: #ec4899;
    --accent-secondary: #6366f1;
    
    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-overlay: rgba(255, 255, 255, 0.8);
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-overlay: rgba(15, 23, 42, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-inverse: #0f172a;
    
    --border-light: #334155;
    --border-medium: #475569;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    
    /* Accent Colors for Fun Facts (same as light theme) */
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-pink: #ec4899;
    --accent-secondary: #6366f1;
}

/* ===== BASE STYLES ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

html {
    scroll-behavior: smooth;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity var(--transition-normal);
}

.game-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.game-character {
    position: relative;
    width: 120px;
    height: 120px;
}

.character-body {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 12px;
    animation: bounce 1s infinite;
}

.character-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    animation: headBob 1s infinite;
}

.character-arms {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 12px;
    background: var(--accent);
    border-radius: 6px;
    animation: armWave 1.5s infinite;
}

.character-legs {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: var(--success);
    border-radius: 10px;
    animation: legWalk 1s infinite;
}

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

@keyframes headBob {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(5deg); }
}

@keyframes armWave {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(10deg); }
}

@keyframes legWalk {
    0%, 100% { transform: translateX(-50%) scaleX(1); }
    50% { transform: translateX(-50%) scaleX(0.8); }
}

.loading-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: dotPulse 1.4s infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.loading-bar {
    width: 300px;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.loading-progress {
    height: 100%;
    background: var(--gradient-primary);
    animation: loadingFill 3s ease-in-out;
}

@keyframes loadingFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-stats {
    display: flex;
    gap: 2rem;
}

.loading-stats .stat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    animation: statGlow 2s infinite alternate;
}

@keyframes statGlow {
    0% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.3); }
    100% { box-shadow: 0 0 15px rgba(99, 102, 241, 0.6); }
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand .brand-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all var(--transition-fast);
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

/* Theme toggle icon changes */
[data-theme="dark"] .theme-toggle i {
    transform: rotate(180deg);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-secondary);
    margin: 3px 0;
    transition: var(--transition-fast);
    border-radius: 2px;
}

/* ===== MAIN CONTENT ===== */
.main {
    margin-top: 80px;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
}

.floating-shapes::before,
.floating-shapes::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    opacity: 0.1;
    animation: float 6s infinite;
}

.floating-shapes::before {
    top: 20%;
    left: 10%;
}

.floating-shapes::after {
    top: 60%;
    right: 15%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.1; }
    50% { transform: translateY(-100px) rotate(180deg); opacity: 0.3; }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.avatar-image {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: 50%;
    position: relative;
    animation: avatarFloat 3s ease-in-out infinite;
}

.avatar-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 140px;
    height: 140px;
    background: var(--primary);
    filter: blur(20px);
    opacity: 0.3;
    border-radius: 50%;
    animation: glowPulse 2s infinite;
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.title-line {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-subtitle {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 0.5rem;
}

.bracket {
    color: #FF66CC;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: var(--text-inverse);
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
}

.cta-button.secondary {
    background: var(--gradient-secondary);
}

.cta-button.tertiary {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.cta-button i {
    font-size: 1rem;
    transition: transform var(--transition-fast);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.button-glow {
    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;
}

.cta-button:hover .button-glow {
    left: 100%;
}

/* ===== SECTIONS ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-underline {
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 5rem 2rem;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto;
    align-items: center;
}

.about-text {
    width: 100%;
    max-width: 615px;
}

.about-visual {
    width: 100%;
    max-width: 615px;
}

.about-paragraph {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-paragraph strong {
    color: var(--primary);
    font-weight: 600;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.skill-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.skill-item i {
    font-size: 1.5rem;
    color: var(--secondary);
}

/* ===== CODE WINDOW ===== */
.code-window {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.window-header {
    background: var(--bg-tertiary);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.red { background: #ef4444; }
.control.yellow { background: #f59e0b; }
.control.green { background: #10b981; }

.window-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.window-content {
    padding: 1.5rem;
    background: var(--bg-primary);
}

.code-snippet {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    overflow-x: auto;
    white-space: pre;
    tab-size: 4;
}

/* C++ Syntax Highlighting - One Dark Pro inspired */
.code-snippet .keyword { color: #c678dd; }
.code-snippet .string { color: #98c379; }
.code-snippet .comment { color: #5c6370; }
.code-snippet .function { color: #61afef; }
.code-snippet .number { color: #d19a66; }
.code-snippet .operator { color: #56b6c2; }
.code-snippet .class { color: #e5c07b; }
.code-snippet .type { color: #e06c75; }

/* ===== EDUCATION SECTION ===== */
.education {
    padding: 5rem 2rem;
}

.education-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

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

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

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: var(--shadow-md);
    animation: markerPulse 2s infinite;
}

@keyframes markerPulse {
    0%, 100% { box-shadow: var(--shadow-md); }
    50% { box-shadow: 0 0 20px var(--primary); }
}

.timeline-content {
    width: 45%;
    padding: 1.5rem;
    min-height: 150px; /* hoặc height: auto */
    max-height: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    position: relative;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

.timeline-content:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-period {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.tech-tag {
    padding: 0.3rem 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

/* ===== HOBBIES SECTION ===== */
.hobbies {
    padding: 5rem 2rem;
    background: var(--bg-secondary);
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hobby-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.hobby-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.hobby-card:hover::before {
    left: 100%;
}

.hobby-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
}

.hobby-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hobby-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hobby-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 5rem 2rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.contact-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateX(10px);
}

.contact-item i {
    font-size: 2rem;
    color: var(--secondary);
}

.contact-details h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-link:hover {
    color: var(--primary);
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.contact-form h3 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-button {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.form-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
    padding: 3rem 2rem 1rem;
    position: relative;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    text-align: center;
}

.footer-brand .brand-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-brand .brand-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00d4ff, #0099cc, #0066ff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.footer-brand .logo-inner {
    width: 24px;
    height: 24px;
    background: var(--bg-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-brand .logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.footer-brand .brand-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-brand .brand-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.footer-section {
    text-align: center;
}

.footer-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 0;
}

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

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
    margin-top: 2rem;
}

.footer-bottom-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.copyright {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.made-with {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.made-with i {
    color: var(--primary);
    font-size: 0.875rem;
}

.made-with i.fa-heart {
    color: #ff6b6b;
}

.made-with i.fa-code {
    color: #00d4ff;
}

.made-with i.fa-coffee {
    color: #ffa500;
}

.academy {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.footer-floating {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    pointer-events: none;
}

.footer-floating .floating-element {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

.footer-floating .floating-element:first-child {
    left: 2rem;
    animation-delay: 0s;
}

.footer-floating .floating-element:last-child {
    right: 2rem;
    animation-delay: 1.5s;
}

/* ===== FLOATING ELEMENTS ===== */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-shape {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    animation: floatAround 10s infinite linear;
}

.floating-shape:nth-child(1) { top: 10%; left: 10%; }
.floating-shape:nth-child(2) { top: 20%; right: 15%; animation-delay: 2s; }
.floating-shape:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 4s; }
.floating-shape:nth-child(4) { bottom: 20%; right: 10%; animation-delay: 6s; }
.floating-shape:nth-child(5) { top: 50%; left: 50%; animation-delay: 8s; }

@keyframes floatAround {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(100px, -100px) rotate(360deg); opacity: 0; }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-overlay);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left var(--transition-normal);
    }

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

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        padding: 1rem;
    }

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

    .cta-button {
        min-width: 200px;
    }

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

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .education-timeline::before {
        left: 20px;
    }

    .timeline-marker {
        left: 20px;
    }

    .timeline-content {
        width: calc(100% - 50px);
        margin-left: 50px !important;
    }

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

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
        max-width: 100%;
    }

    .facts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }

    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .footer-floating .floating-element:first-child {
        left: 1rem;
    }

    .footer-floating .floating-element:last-child {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 1rem;
    }

    .hero {
        padding: 1rem;
    }

    .title-line {
        font-size: 1.8rem;
    }

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

    .about,
    .education,
    .hobbies,
    .contact {
        padding: 3rem 1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

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

/* ===== INTRO FRAME & MOTTO ===== */
.intro-frame {
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.intro-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.intro-content {
    position: relative;
    z-index: 1;
}

.motto-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0 1rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.motto-icon {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 0 1rem;
    opacity: 0.7;
}

.motto-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    font-style: italic;
    text-align: center;
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== FAVORITE GAMES SECTION ===== */
.favorite-games {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.game-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.game-card:hover::before {
    transform: scaleX(1);
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.game-image {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--text-inverse);
    transition: all var(--transition-normal);
}

.game-card:hover .game-image {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-secondary);
}

.game-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.game-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.game-tag {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== FUN FACTS SECTION ===== */
.fun-facts {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.fact-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.fact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.fact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-inverse);
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.fact-card:hover .fact-icon {
    transform: scale(1.1);
    background: var(--gradient-primary);
}

.fact-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.fact-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: var(--text-inverse);
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    background: var(--gradient-secondary);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top i {
    transition: transform var(--transition-fast);
}

.back-to-top:hover i {
    transform: translateY(-2px);
}

/* Mobile responsive for back to top button */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .brand-logo {
        width: 40px;
        height: 40px;
    }
    
    .logo-inner {
        width: 28px;
        height: 28px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-dot {
        width: 12px;
        height: 12px;
    }
    
    .brand-name {
        font-size: 1.125rem;
    }
    
    .brand-title {
        font-size: 0.625rem;
    }
    
    .avatar-image {
        width: 150px;
        height: 150px;
    }
    
    .game-card {
        min-height: 180px;
    }
    
    .game-image {
        height: 80px;
        padding: 0 1rem 0.75rem 1rem;
    }
    
    .game-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: -25px;
    }
    
    .game-content {
        padding: 1.5rem 1rem 1rem 1rem;
        padding-top: 2rem;
    }
    
    .gaming-card {
        margin-top: 2rem;
        padding: 1.5rem 2rem;
        max-width: 100%;
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .gaming-card h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .gaming-card li {
        font-size: 0.9rem;
    }
    
    .gaming-card li span {
        width: 6px;
        height: 6px;
        margin-right: 0.75rem;
    }
}

/* ===== BRAND LOGO ===== */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo-container {
    position: relative;
}

.brand-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00d4ff, #0099cc, #0066ff);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transition: all 0.5s ease;
    transform: rotate(12deg);
}

.brand-logo:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.logo-inner {
    width: 32px;
    height: 32px;
    background: var(--bg-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.logo-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.brand-text-container {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.brand-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.brand-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* ===== WINDOW TITLE ADJUSTMENT ===== */
.window-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    width: 100%;
    text-align: center;
}

/* ===== LARGER AVATAR IMAGE ===== */
.avatar-image {
    width: 180px;
    height: 180px;
    background: var(--gradient-primary);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

/* ===== EDUCATION TIMELINE IMPROVEMENT ===== */
.education-timeline {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.timeline-content {
    width: 45%;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    position: relative;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== GAME CARD NEW DESIGN ===== */
.game-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.game-image {
    position: relative;
    height: 100px;
    width: 100%;
}

.game-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8;
}

.game-avatar {
    position: absolute;
    z-index: 2;
    width: 80px; /* tăng kích thước từ 60px lên 80px */
    height: 80px; /* tăng kích thước từ 60px lên 80px */
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem; /* tăng font size cho phù hợp */
    color: var(--text-inverse);
    transition: all var(--transition-normal);
    border: 4px solid rgba(255, 255, 255, 0.3); /* tăng border một chút */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    bottom: -40px; /* dịch xuống 40px (một nửa của 80px) */
    left: 20px; /* cách mép trái một khoảng */
}

.game-card:hover .game-avatar {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.game-content {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2.5rem;
}

/* ===== FUN FACTS GAMING CARD STYLE ===== */
.gaming-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 3rem;
}

.gaming-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.gaming-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #0099cc, #0066ff, #ff6b6b, #4ecdc4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.gaming-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gaming-card li {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    transition: all var(--transition-normal);
}

.gaming-card li:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

.gaming-card li span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 1rem;
    flex-shrink: 0;
    display: block;
}

.gaming-card li:nth-child(1) span {
    background: var(--accent-cyan);
}

.gaming-card li:nth-child(2) span {
    background: var(--accent-green);
}

.gaming-card li:nth-child(3) span {
    background: var(--accent-pink);
}

.gaming-card li:nth-child(4) span {
    background: var(--accent-secondary);
}

.gaming-card li:nth-child(5) span {
    background: #ff6b6b;
}

.gaming-card li:nth-child(6) span {
    background: #4ecdc4;
}

.gaming-card li:nth-child(7) span {
    background: #45b7d1;
}

.gaming-card li:nth-child(8) span {
    background: #96ceb4;
}

.gaming-card li:nth-child(9) span {
    background: #feca57;
}

.gaming-card li:nth-child(10) span {
    background: #ff9ff3;
} 
