:root {
    --bg-color: #0d0d0d;
    --card-bg-color: rgba(255, 255, 255, 0.05);
    --card-border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent-blue: #00aaff;
    --accent-purple: #8A2BE2;
    --accent-pink: #FF007F;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    overflow: hidden;
    cursor: none; /* Ẩn con trỏ mặc định */
}

/* --- Con trỏ tùy chỉnh --- */
.custom-cursor {
    width: 25px;
    height: 25px;
    border: 2px solid var(--text-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    background-color: var(--text-primary);
}


/* --- Hiệu ứng nền Aurora --- */
.background-aurora {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    transition: transform 0.5s ease-out;
}

.aurora-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: var(--accent-blue);
    top: -10%;
    left: -10%;
    animation: move 20s infinite alternate;
}

.shape2 {
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
    bottom: -15%;
    right: -15%;
    animation: move 25s infinite alternate-reverse;
}

.shape3 {
    width: 300px;
    height: 300px;
    background: var(--accent-pink);
    bottom: 20%;
    left: 20%;
    animation: move 15s infinite alternate;
}

@keyframes move {
    from { transform: translate(0, 0) rotate(0deg) scale(1); }
    to { transform: translate(100px, 50px) rotate(180deg) scale(1.2); }
}

/* --- Lưới Bento --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: min-content; 
    gap: 1rem;
    width: 100%;
    max-width: 900px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1rem;
}

.bento-grid::-webkit-scrollbar { width: 8px; }
.bento-grid::-webkit-scrollbar-track { background: transparent; }
.bento-grid::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.2); border-radius: 10px; border: 2px solid transparent; background-clip: content-box;}
.bento-grid::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.4); }

.bento-item {
    background: var(--card-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, background 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bento-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.bento-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

/* --- Bố cục lưới mới --- */
.card-profile { grid-column: 1 / 4; } /* Đã thu hẹp */
.card-social-links { grid-column: 4 / 7; } /* Đã mở rộng */
.card-now { grid-column: 1 / 4; grid-row: 2; }
.card-coffee { grid-column: 4 / 7; grid-row: 2; flex-direction: row; align-items: center; gap: 1.5rem; }

/* === PHẦN SỬA ĐỔI BỐ CỤC LƯỚI === */
.card-journey { 
    grid-column: 1 / 4; /* Rộng 3 cột */
    grid-row: 3 / 5;    /* Cao 2 hàng */
    justify-content: flex-start;
}
.card-cta { 
    grid-column: 4 / 7; /* Rộng 3 cột */
    grid-row: 3;        /* Hàng 3 */
}
.card-skills { 
    grid-column: 4 / 7; /* Rộng 3 cột */
    grid-row: 4;        /* Hàng 4 */
}
.card-project-large { 
    grid-column: 1 / 7; 
    grid-row: 5; /* Chuyển xuống hàng 5 */
    padding: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 280px;
}
/* === KẾT THÚC SỬA ĐỔI BỐ CỤC === */


/* --- Nền cho dự án nổi bật --- */
.card-project-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.85) 100%);
    z-index: 2;
    transition: opacity 0.3s ease;
}

.featured-project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.4s ease;
}

.card-project-large:hover .featured-project-image {
    transform: scale(1.05);
}

.featured-project-content {
    padding: 1.5rem;
    position: relative;
    z-index: 3;
    width: 100%;
}

/* --- Chi tiết các ô --- */

/* Ô Giới thiệu */
/* === THAY ĐỔI: Thêm margin-bottom để tạo khoảng cách với bio === */
.profile-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.profile-picture { width: 70px; height: 70px; border-radius: 50%; border: 2px solid var(--text-primary); object-fit: cover; flex-shrink: 0; }
.profile-name { font-size: 1.5rem; font-weight: 600; }
.profile-handle { color: var(--text-secondary); font-size: 1rem; }
/* === THAY ĐỔI: Xóa margin-top === */
.profile-bio { font-size: 0.9rem; color: var(--text-secondary); min-height: 54px; }
#typing-bio::after { content: '|'; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Ô Mạng xã hội & Liên hệ */
.card-social-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1rem; }
.social-link {
    color: var(--text-primary); background-color: rgba(255,255,255,0.1); text-decoration: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0.75rem 0; border-radius: 0.75rem; transition: background-color 0.2s, transform 0.2s; font-size: 0.8rem;
}
.social-link:hover { transform: scale(1.05); }
.social-link i { font-size: 1.2rem; margin-bottom: 0.5rem; }
.social-link.github:hover { background-color: #333; }
.social-link.facebook:hover { background-color: #1877F2; }
.social-link.youtube:hover { background-color: #FF0000; }
.social-link.zalo:hover { background-color: #0068ff; }
.social-link.telegram:hover { background-color: #2AABEE; }
.social-link.phone:hover { background-color: #4CAF50; }
.social-link.civitai:hover { background-color: #1a73e8; }
.social-link.shakker:hover { background-color: #e6007a; }

/* Ô Hiện tại & Kỹ năng */
.now-title, .skills-title, .coffee-title { font-size: 1.2rem; margin-bottom: 1rem; flex-shrink: 0; }
.now-content { font-size: 0.9rem; color: var(--text-secondary); }
.now-content h4 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--text-primary);}
.skills-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skills-list span { background: rgba(255, 255, 255, 0.1); padding: 0.3rem 0.8rem; border-radius: 2rem; font-size: 0.8rem; }

/* === PHẦN CSS MỚI CHO Ô HÀNH TRÌNH === */
.journey-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}
.journey-title i {
    margin-right: 0.5rem;
    color: var(--accent-blue);
}
.journey-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.journey-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.75rem;
    border-left: 3px solid var(--accent-blue);
    transition: background-color 0.3s ease;
}
.journey-step:hover {
    background-color: rgba(0, 0, 0, 0.4);
}
.journey-date {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    min-width: 80px;
    text-align: center;
    transition: color 0.3s ease, background-color 0.3s ease;
}
.journey-role {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Làm nổi bật vai trò hiện tại */
.journey-step.current {
    border-left-color: var(--accent-pink); /* Dùng màu khác để nổi bật */
}

.journey-step.current .journey-date {
    color: var(--text-primary);
    background-color: rgba(255, 0, 127, 0.2); /* Màu hồng nhạt */
}
/* === KẾT THÚC PHẦN CSS MỚI === */

/* Ô Mời cà phê */
.coffee-qr {
    width: 100%; max-width: 110px; aspect-ratio: 1 / 1; object-fit: contain;
    border-radius: 0.75rem; flex-shrink: 0; transition: transform 0.2s ease;
}
.coffee-qr:hover { transform: scale(1.05); }
.coffee-content { display: flex; flex-direction: column; }
.coffee-text { font-size: 0.85rem; color: var(--text-secondary); }

/* Ô CTA */
.card-cta { align-items: center; text-align: center; background: linear-gradient(45deg, var(--accent-purple), var(--accent-pink)); justify-content: center; }
.card-cta p { font-size: 1rem; }
.card-cta h3 { font-size: 1.5rem; margin: 0.5rem 0 1rem; }
.cta-email-button { background: rgba(255,255,255,0.9); color: #000; padding: 0.5rem 1.5rem; border-radius: 2rem; text-decoration: none; font-weight: 600; transition: transform 0.2s; }
.cta-email-button:hover { transform: scale(1.05); }

/* Nội dung dự án nổi bật */
.featured-project-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
.featured-project-description { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.5rem; }
.featured-project-links { display: flex; gap: 1rem; margin-top: auto; }
.featured-project-links a {
    flex-grow: 1; text-decoration: none; color: var(--text-primary); background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1rem; border-radius: 8px; text-align: center; font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.featured-project-links a:hover { background: rgba(255, 255, 255, 0.4); transform: scale(1.05); }
.featured-project-links a.primary { background: var(--accent-blue); color: var(--text-primary); }
.featured-project-links a.primary:hover { background: #0090d8; }

/* --- Modal cho QR Code --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    max-width: 90%; max-height: 90%; width: 300px; border-radius: 1rem;
    transform: scale(0.9); transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content { transform: scale(1); }

/* --- Responsive --- */
@media (max-width: 768px) {
    body { padding: 1rem; align-items: flex-start; }
    .bento-grid {
        grid-template-columns: 1fr;
        padding-right: 0.5rem;
    }
    .bento-item,
    .card-profile, .card-social-links, .card-now, .card-coffee, .card-skills, .card-journey, .card-cta, .card-project-large {
        grid-column: span 1 !important;
        grid-row: auto !important;
    }
    .card-profile { flex-direction: column; align-items: center; }
    .profile-header { flex-direction: column; align-items: center; text-align: center; }
    .card-coffee { flex-direction: column; align-items: center; text-align: center; }
    .profile-bio { min-height: 80px; text-align: center; }
    .card-social-links { grid-template-columns: 1fr 1fr 1fr 1fr; } /* Hiển thị 4 cột */
    .custom-cursor { display: none; }
}

