/* --- RESET & VARIABLES --- */
:root {
    --bg-color: #0f172a; /* Xanh đen đậm */
    --text-color: #e2e8f0;
    --primary-color: #38bdf8; /* Xanh dương sáng */
    --secondary-color: #818cf8; /* Tím nhạt */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* --- UTILITIES --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    
    /* Thêm dòng này vào */
    -webkit-background-clip: text;
    background-clip: text; 
    
    color: transparent;
    font-weight: 800;
}

/* --- GLASSMORPHISM CARD --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.btn-contact {
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    color: var(--primary-color) !important;
}

.btn-contact:hover {
    background: var(--primary-color);
    color: #000 !important;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at top right, #1e293b, var(--bg-color));
    position: relative;
}

.avatar-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-color);
    position: relative;
    z-index: 2;
}

.circle-spin {
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%;
    border-top: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    animation: spin 3s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.typing-text {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    height: 30px; /* giữ chiều cao cố định */
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0 15px;
    transition: 0.3s;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-color);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);}
    40% {transform: translateY(-10px) translateX(-50%);}
    60% {transform: translateY(-5px) translateX(-50%);}
}

/* --- ABOUT --- */
.info-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

/* --- SKILLS (NEW DESIGN) --- */
.skills-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.skill-category {
    background: rgba(30, 41, 59, 0.6); /* Nền tối hơn chút */
    backdrop-filter: blur(10px);
    border-radius: 16px;
    width: 350px; /* Rộng hơn chút để chứa chữ */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    overflow: hidden;
}

.skill-category:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.category-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.category-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

.skill-list {
    padding: 20px;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-item:last-child {
    margin-bottom: 0;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--primary-color);
}

.skill-name .level {
    font-size: 0.7rem;
    background: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    opacity: 0.8;
}

.skill-desc {
    font-size: 0.9rem;
    color: #94a3b8; /* Màu xám nhạt cho chữ mô tả */
    line-height: 1.4;
    font-style: italic;
}

/* --- TIMELINE (Experience) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: #334155;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 15px;
    right: -10px;
    z-index: 10;
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-item:nth-child(even) .timeline-dot { left: -10px; }

.timeline-content h3 { color: var(--primary-color); }
.timeline-content h4 { color: #94a3b8; font-size: 0.9rem; margin-bottom: 10px; }
.timeline-content ul { padding-left: 20px; font-size: 0.9rem; color: #cbd5e1; }

/* --- PROJECTS --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #334155;
    transition: 0.3s;
    position: relative;
}

.project-card:hover {
    border-color: var(--secondary-color);
    transform: scale(1.02);
}

.card-content { padding: 25px; }
.card-content h3 { color: var(--primary-color); margin-bottom: 10px; }

.badge {
    background: var(--secondary-color);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 5px;
}

.project-details {
    margin-top: 15px;
    list-style: none;
    font-size: 0.9rem;
    color: #94a3b8;
}

.project-details li { margin-bottom: 5px; }
.project-details i { color: var(--primary-color); margin-right: 5px; }

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px;
    background: #020617;
    color: #64748b;
    margin-top: 50px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Giấu menu trên mobile cho đơn giản */
    
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-dot { left: 21px !important; }
    
    .hero h1 { font-size: 2.5rem; }
}