/* --- 1. BIẾN GLOBAL & CẤU HÌNH HỆ THỐNG --- */
:root {
    --bg-color: #0b0f19;
    --card-bg: linear-gradient(145deg, #111827, #0f172a);
    --card-border: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #00ffaa; /* Màu xanh Neon chính */
    --accent-hover: #00cc88;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. RESET & CẤU HÌNH CHUNG --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Đảm bảo nội dung luôn nằm trên Video Background */
.navbar, .section, footer {
    position: relative;
    z-index: 10;
}

/* --- 3. VIDEO BACKGROUND (SCROLL-DRIVEN) --- */
.video-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -100;
    overflow: hidden;
    pointer-events: none;
    background: var(--bg-color);
}

.video-bg {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: blur(2px); /* Độ mờ Bokeh nhẹ cho background */
    will-change: transform, opacity;
}

.video-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* Lớp phủ tối để làm nổi bật nội dung chữ */
    background-color: rgba(11, 15, 25, 0.82); 
    z-index: -99;
}

/* --- 4. THANH ĐIỀU HƯỚNG (NAVBAR) --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--card-border);
    z-index: 1000;
}

.logo { 
    font-size: 1.6rem; 
    font-weight: 700; 
    letter-spacing: 1px;
    color: var(--text-primary);
}

.accent { color: var(--accent); }

.nav-links { list-style: none; display: flex; gap: 25px; align-items: center; }
.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active { 
    color: var(--accent); 
    text-shadow: 0 0 8px rgba(0, 255, 170, 0.5);
}

/* Nút CV trên Navbar */
.btn-cv-nav {
    background: rgba(0, 255, 170, 0.1);
    border: 1px solid var(--accent);
    padding: 6px 16px !important;
    border-radius: 6px;
    color: var(--accent) !important;
}

.btn-cv-nav:hover {
    background: var(--accent) !important;
    color: var(--bg-color) !important;
    box-shadow: 0 0 15px var(--accent);
}

/* --- 5. HIỆU ỨNG TYPING NEON GLOW --- */
.typed-text {
    color: var(--accent);
    /* Hiệu ứng phát sáng Neon đa tầng */
    text-shadow: 
        0 0 7px rgba(255, 255, 255, 0.3),
        0 0 10px var(--accent),
        0 0 21px var(--accent),
        0 0 42px var(--accent);
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1.1em;
    background-color: var(--accent);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 10px var(--accent);
}

.cursor.typing { animation: none; opacity: 1; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* --- 6. HIỆU ỨNG CUỘN (SCROLL INDICATORS) --- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: var(--accent);
    width: 0%;
    z-index: 9999;
    box-shadow: 0 0 10px var(--accent);
}

.scroll-indicator {
    position: absolute;
    bottom: 5vh; left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    opacity: 0.6;
    transition: var(--transition);
}

.scroll-indicator:hover { opacity: 1; }
.scroll-indicator p { font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-secondary); }

.mouse {
    width: 22px; height: 32px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    display: flex; justify-content: center; padding-top: 5px;
}

.wheel {
    width: 3px; height: 6px;
    background-color: var(--accent);
    border-radius: 2px;
    animation: scrollWheel 1.6s infinite;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* --- 7. BỐ CỤC SECTION & REVEAL --- */
.section {
    padding: 120px 10%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.section-title { font-size: 2.5rem; margin-bottom: 10px; font-weight: 700; }
.section-subtitle { color: var(--text-secondary); margin-bottom: 45px; max-width: 700px;}

/* --- 8. THẺ (CARD) & COMPONENT --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 35px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 255, 170, 0.4);
}

/* Hero Content */
#hero { min-height: 100vh; align-items: flex-start; }
.greeting { color: var(--accent); font-size: 1.2rem; font-weight: 600; margin-bottom: 15px; }
.hero-title { font-size: 3.8rem; line-height: 1.1; margin-bottom: 30px; }
.hero-desc { font-size: 1.15rem; color: var(--text-secondary); max-width: 650px; margin-bottom: 45px; }
.hero-cta { display: flex; gap: 20px; }

/* Buttons */
.btn {
    padding: 14px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary { background-color: var(--accent); color: var(--bg-color); }
.btn-outline { color: var(--accent); border: 1px solid var(--accent); }
.btn-primary:hover, .btn-outline:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 5px 20px rgba(0, 255, 170, 0.2); }

/* Skill Tags */
.skills-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.skill-tag {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--card-border);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); background: rgba(0, 255, 170, 0.05); }

/* Streamlit Iframe Window */
.iframe-container { height: 800px; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.iframe-header { background: #1e293b; padding: 12px 20px; display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.iframe-title { color: #94a3b8; font-size: 0.8rem; margin-left: 10px; font-family: monospace; }
iframe { width: 100%; height: 100%; border: none; }

/* Projects Grid */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.tech-stack { color: var(--accent); font-size: 0.85rem; font-family: monospace; margin: 15px 0; }

/* Contact Links */
.contact-links { display: flex; gap: 25px; justify-content: center; flex-wrap: wrap; }
.contact-item { color: var(--text-primary); text-decoration: none; display: flex; align-items: center; gap: 12px; font-size: 1.1rem; transition: var(--transition); }
.contact-item:hover { color: var(--accent); transform: translateY(-2px); }

/* --- 9. FOOTER (BRANDING) --- */
footer {
    text-align: center;
    padding: 80px 20px;
    background: rgba(11, 15, 25, 0.9);
    border-top: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

.footer-content strong {
    color: var(--accent);
    letter-spacing: 2.5px;
    text-shadow: 0 0 15px rgba(0, 255, 170, 0.3);
    font-size: 1.1rem;
}

.footer-sub {
    font-size: 0.8rem;
    margin-top: 15px;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- 10. RESPONSIVE (MOBILE) --- */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .nav-links { display: none; } /* Có thể làm Menu Hamburger nếu cần */
    .section { padding: 80px 5%; }
    .hero-cta { flex-direction: column; }
    .iframe-container { height: 500px; }
}
/* --- GITHUB CTA SECTION --- */
.github-cta {
    text-align: center;
    margin-top: 60px;
    padding: 40px;
    border-top: 1px border var(--card-border);
}

.github-cta p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-style: italic;
}

.btn-github-more {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 15px 35px;
    font-size: 1.1rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.1);
    transition: all 0.4s ease;
}

.btn-github-more:hover {
    background: var(--accent);
    color: var(--bg-color);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 30px var(--accent); /* Quầng sáng rực lên khi hover */
}

.btn-github-more i {
    font-size: 1.4rem;
}