@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7c4dff 100%);
    --accent-color: #ff9f43;
    --transition-speed: 0.3s;
}

body { font-family: 'Roboto', sans-serif; overflow-x: hidden; }
.wrapper { display: flex; width: 100%; align-items: stretch; }

/* --- Sidebar Styles --- */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--primary-gradient);
    color: #fff;
    transition: all var(--transition-speed);
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

#sidebar .sidebar-header {
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    overflow: hidden;
}

#sidebarToggleDesktop {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}
#sidebarToggleDesktop:hover { color: var(--accent-color); }

#sidebar ul.components { padding: 20px 0; flex-grow: 1; }
#sidebar ul li a {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: 0.3s;
    border-left: 4px solid transparent;
    white-space: nowrap;
}
#sidebar ul li a:hover, #sidebar ul li a.active-link {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-left: 4px solid var(--accent-color);
}
#sidebar ul li a i {
    min-width: 30px;
    text-align: center;
    font-size: 1.1em;
    margin-right: 10px;
}

/* Sidebar Collapsed (Desktop) */
#sidebar.collapsed {
    min-width: var(--sidebar-collapsed-width);
    max-width: var(--sidebar-collapsed-width);
}
#sidebar.collapsed .sidebar-header h3,
#sidebar.collapsed ul li a span {
    display: none !important;
}
#sidebar.collapsed .sidebar-header { justify-content: center; }
#sidebar.collapsed ul li a { justify-content: center; padding: 15px 0; }
#sidebar.collapsed ul li a i { margin-right: 0; }

/* Dark Mode Button */
.theme-btn-container { padding: 15px; display: flex; justify-content: center; }
#themeToggle {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent; color: white;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
#themeToggle:hover { background: white; color: #333; }

/* --- Mobile Logic --- */
.navbar-mobile { display: none; padding: 15px; background: var(--primary-gradient); color: white; align-items: center; justify-content: space-between; }
@media (max-width: 768px) {
    #sidebar { position: fixed; left: -260px; height: 100vh; width: var(--sidebar-width); }
    #sidebar.active { left: 0; }
    #sidebar.collapsed { min-width: var(--sidebar-width); max-width: var(--sidebar-width); } /* Reset collapsed on mobile */
    #sidebarToggleDesktop { display: none; }
    .navbar-mobile { display: flex; }
    .overlay { display: none; position: fixed; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.5); z-index: 1040; opacity: 0; transition: 0.5s; }
    .overlay.active { display: block; opacity: 1; }
}

/* --- Content & Components --- */
#content { width: 100%; min-height: 100vh; transition: 0.3s; }

/* --- HERO SECTION (ĐÃ CẬP NHẬT ẢNH LOCAL) --- */
.hero-section { 
    /* Thay đổi đường dẫn tại đây */
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('images/background.jpg'); 
    background-size: cover; 
    background-position: center; 
    color: white; 
    padding: 80px 20px; 
    border-radius: 0 0 20px 20px; 
}

.btn-accent { background-color: var(--accent-color); color: #fff; border: none; border-radius: 50px; padding: 10px 25px; font-weight: bold; }
.btn-accent:hover { filter: brightness(1.1); color: white; }

/* Profile Image */
.profile-img-container { width: 100%; max-width: 300px; aspect-ratio: 1/1; margin: 0 auto; overflow: hidden; border-radius: 50%; border: 5px solid white; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.profile-img { width: 100%; height: 100%; object-fit: cover; }

/* Tool Cards */
.tool-card { transition: 0.3s; cursor: pointer; border: 1px solid rgba(0,0,0,0.05); }
.tool-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-color: var(--accent-color); }
.tool-icon { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 15px; font-size: 1.5rem; margin-bottom: 1rem; }

/* Projects Page Tabs */
.nav-pills .nav-link { color: #555; background-color: rgba(0,0,0,0.05); margin-right: 10px; border-radius: 50px; padding: 10px 25px; font-weight: 500; }
[data-bs-theme="dark"] .nav-pills .nav-link { color: #ccc; background-color: rgba(255,255,255,0.1); }
.nav-pills .nav-link.active { background: var(--primary-gradient); color: white; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.pub-item:hover { background-color: rgba(0,0,0,0.02); }
[data-bs-theme="dark"] .pub-item:hover { background-color: rgba(255,255,255,0.05); }

/* Animations */
.fade-in { animation: fadeIn 0.8s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }