/* =========================================
   1. CORE & VARIABLES
   ========================================= */
:root {
    --bg-dark: #0d1117;       /* Đen thẫm (GitHub Dark) */
    --bg-light: #161b22;      /* Đen xám (Lighter) */
    --accent: #00e676;        /* Xanh lá Hacker */
    --accent-glow: rgba(0, 230, 118, 0.2);
    --text-main: #c9d1d9;
    --text-bright: #ffffff;
    --border: #30363d;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; scroll-behavior: smooth; }
body { background-color: var(--bg-dark); color: var(--text-main); line-height: 1.7; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* =========================================
   2. BACKGROUND EFFECTS (HIỆU ỨNG NỀN)
   ========================================= */
/* Hiệu ứng lưới Cyberpunk cho toàn trang */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(48, 54, 61, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(48, 54, 61, 0.2) 1px, transparent 1px);
    background-size: 50px 50px; /* Kích thước ô lưới */
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
nav { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 20px 50px; 
    background: rgba(13, 17, 23, 0.8); /* Trong suốt hơn */
    backdrop-filter: blur(10px); /* Làm mờ nền sau nav */
    position: sticky; top: 0; z-index: 1000; 
    border-bottom: 1px solid var(--border); 
}
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text-bright); text-shadow: 0 0 10px var(--accent-glow); }
.nav-links { display: flex; gap: 25px; }
.nav-links a:hover { color: var(--accent); text-shadow: 0 0 8px var(--accent); }

/* =========================================
   4. HERO SECTION (Tâm điểm)
   ========================================= */
.hero { 
    height: 90vh; 
    display: flex; align-items: center; justify-content: center; text-align: center; 
    position: relative;
    /* Màu nền Gradient tỏa tròn */
    background: radial-gradient(circle at center, #1f2937 0%, var(--bg-dark) 70%);
}

/* Hình học trôi nổi (Decorations) */
.hero::after {
    content: "{ }";
    position: absolute;
    top: 20%; right: 10%;
    font-family: monospace;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.03);
    transform: rotate(15deg);
    animation: float 6s ease-in-out infinite;
}

.hero::before {
    content: "</>";
    position: absolute;
    bottom: 20%; left: 10%;
    font-family: monospace;
    font-size: 5rem;
    color: rgba(0, 230, 118, 0.05);
    transform: rotate(-15deg);
    animation: float 8s ease-in-out infinite reverse;
}

.hero h1 { font-size: 3.5rem; color: var(--text-bright); margin-bottom: 5px; letter-spacing: -1px; }
.typing-text { color: var(--accent); font-family: 'Courier New', monospace; font-size: 1.5rem; margin-bottom: 20px; min-height: 1.5em; text-shadow: 0 0 10px var(--accent-glow); }
.tagline { font-size: 1.1rem; color: #8b949e; margin-bottom: 30px; }

/* Buttons */
.buttons .btn { padding: 12px 30px; border-radius: 6px; font-weight: 600; margin: 0 10px; position: relative; overflow: hidden; }
.primary { background: var(--accent); color: var(--bg-dark); box-shadow: 0 0 15px var(--accent-glow); }
.primary:hover { background: #00c853; transform: translateY(-2px); box-shadow: 0 0 25px var(--accent-glow); }
.secondary { border: 1px solid var(--border); color: var(--text-main); background: rgba(22, 27, 34, 0.5); }
.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================
   5. SECTIONS (Phân màu xen kẽ)
   ========================================= */
.container { max-width: 1100px; margin: 0 auto; padding: 100px 20px; position: relative; }

/* Section Chẵn (About, Projects): Nền Sáng hơn */
section:nth-of-type(even) {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    /* Họa tiết mạch điện chéo */
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 1px, transparent 1px, transparent 10px);
}

/* Section Lẻ (Skills, Blog): Nền Đậm */
section:nth-of-type(odd) {
    background-color: var(--bg-dark);
}

.section-title { 
    font-size: 2.2rem; color: var(--text-bright); margin-bottom: 50px; 
    border-left: 5px solid var(--accent); padding-left: 20px;
    display: inline-block;
}

/* =========================================
   6. CARDS (Thẻ bài - Glassmorphism)
   ========================================= */
.about-grid, .skills-grid, .project-grid, .blog-grid { display: grid; gap: 30px; }
.about-grid, .project-grid, .blog-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card, .skill-group { 
    background: rgba(22, 27, 34, 0.7); /* Bán trong suốt */
    border: 1px solid var(--border); 
    border-radius: 12px; padding: 25px; 
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Hiệu ứng nảy */
    backdrop-filter: blur(5px);
    position: relative; overflow: hidden;
}

/* Hover Effect: Glow & Float */
.card:hover, .skill-group:hover { 
    transform: translateY(-10px); 
    border-color: var(--accent); 
    box-shadow: 0 10px 30px -10px rgba(0, 230, 118, 0.3);
}

/* Trang trí góc thẻ (Tech lines) */
.card::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: scaleX(0); transition: 0.4s;
}
.card:hover::before { transform: scaleX(1); }

.highlight { color: var(--text-bright); font-weight: bold; border-bottom: 2px solid var(--accent); }

/* Skills Tags */
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.tags span { 
    background: rgba(88, 166, 255, 0.1); 
    padding: 6px 14px; border-radius: 20px; 
    font-size: 0.85rem; color: #58a6ff; 
    border: 1px solid rgba(88, 166, 255, 0.2);
    transition: 0.3s;
}
.tags span:hover { background: #58a6ff; color: #0d1117; cursor: default; }

/* =========================================
   7. FOOTER
   ========================================= */
footer { text-align: center; padding: 80px 20px; background: #050505; border-top: 1px solid var(--border); position: relative; }
.socials { margin: 25px 0; font-size: 1.8rem; }
.socials a { margin: 0 20px; color: #8b949e; transition: 0.3s; }
.socials a:hover { color: var(--accent); transform: scale(1.2); }

/* =========================================
   8. ANIMATIONS (Chuyển động)
   ========================================= */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(15deg); }
    50% { transform: translateY(-20px) rotate(15deg); }
}

/* Terminal Hint */
.terminal-hint { margin-top: 40px; color: #484f58; font-family: monospace; opacity: 0.7; }
.terminal-hint b { color: #58a6ff; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* =========================================
   9. TERMINAL & BLOG MODAL (Giữ nguyên)
   ========================================= */
.hidden { display: none !important; }
#terminal-overlay, .blog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 9999; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(8px); }
.terminal-window, .blog-modal { width: 800px; height: 500px; background: #0d1117; border: 1px solid var(--border); padding: 20px; font-family: monospace; overflow-y: auto; display: flex; flex-direction: column; box-shadow: 0 0 50px rgba(0, 230, 118, 0.15); border-radius: 8px; }
.terminal-input-line { display: flex; margin-top: 10px; }
.prompt { color: var(--accent); margin-right: 10px; }
#cmd-input { background: transparent; border: none; color: #fff; flex: 1; outline: none; font-family: monospace; font-size: 1rem; }

/* Blog Specifics */
.blog-modal { width: 900px; max-width: 95%; height: 85vh; padding: 40px; }
.close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }
.close-btn:hover { color: #ff5252; }
.blog-date { font-size: 0.85rem; color: #8b949e; display: block; margin-bottom: 5px; }
.status { font-size: 0.75rem; background: #238636; color: #fff; padding: 2px 8px; border-radius: 10px; float: right; }