/* ===== Language Switch (VN/EN) ===== */
/* ------------------------------------------------------------------- */
/* CSS TÙY CHỈNH CHO TRANG WEB CÁ NHÂN (MỆNH HỎA & MỘC TƯƠNG SINH)     */
/* ------------------------------------------------------------------- */

/* Định nghĩa màu sắc theo Ngũ Hành */
:root {
    --color-fire-primary: #C2410C;
    --color-fire-light: #FDBA74;
    --color-wood-accent: #10B981;
    --color-background: #F9FAFB;
    --color-text-dark: #1F2937;
    --color-text-light: #FFFFFF;
}

/* Thiết lập cơ bản (Reset và Box Model) */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-text-dark);
    background-color: var(--color-background);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -------------------- HEADER (Desktop) -------------------- */
.main-header {
    background-color: var(--color-text-light);
    border-bottom: 3px solid var(--color-fire-primary);
    padding: 1rem 5%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 100;
}

.logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-260%, -40%);
    z-index: 10;
}

.logo-name {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-fire-primary);
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 1px;
}

.logo-name:hover {
    color: var(--color-wood-accent);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    margin-left: auto; /* ✅ menu luôn dính phải, đẹp khi chỉ còn 2 tab */
}

.nav-item {
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--color-wood-accent);
    color: var(--color-text-light);
}

/* -------------------- BODY (MAIN CONTENT) -------------------- */
.main-content {
    flex-grow: 1;
    max-width: 1200px;
    width: 90%;
    margin: 1.5rem auto;
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr 2fr;
}

/* Cột Trái */
.left-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 0.5rem;
    background-color: var(--color-text-light);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--color-wood-accent);
}

/* ✅ KHUNG ẢNH */
.portrait-frame {
    border: 6px solid var(--color-fire-primary);
    padding: 8px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: #fff;
    transition: all 0.5s ease;
}

/* ✅ ẢNH CHÂN DUNG – DIV background */
.portrait-img {
    width: 320px;
    height: 320px;
    border-radius: 50%;

    background-size: 120%;
    background-repeat: no-repeat;

    /* ✅ canh lại để lấy đúng mặt (tránh lấy tường) */
    background-position: 78% 4%;
}

/* Hover */
.portrait-frame:hover {
    border-color: var(--color-wood-accent);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.1);
}

.quote-box {
    margin-top: 1.5rem;
    padding: 1rem;
    border-top: 2px dashed var(--color-fire-light);
    padding-top: 1rem;
    width: 100%;
    text-align: center;
}

.favorite-quote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-fire-primary);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.quote-author {
    display: block;
    font-size: 0.9rem;
    color: #6B7280;
}

/* Cột Phải */
.right-column {
    padding: 2rem;
    background-color: var(--color-text-light);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--color-wood-accent);
}

.main-title {
    color: var(--color-fire-primary);
    font-size: 2rem;
    font-weight: 700;
    border-bottom: 2px solid var(--color-fire-light);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.reflection-text {
    font-family: Open Sans , Roboto, Lato, sans-serif;
    margin-bottom: 1.5rem;
    text-align: justify;
    font-size: 1.2rem;
}

/* -------------------- EXPERIENCE SECTION (Timeline wrapper) -------------------- */
.section-wrap {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto 2.5rem auto;
}

.section-card {
    background-color: var(--color-text-light);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--color-wood-accent);
    padding: 2rem;
}

.section-title {
    color: var(--color-fire-primary);
    font-size: 1.8rem;
    font-weight: 700;
    border-bottom: 2px solid var(--color-fire-light);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: #6B7280;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* -------------------- TIMELINE -------------------- */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 3px;
    background: linear-gradient(
        to bottom,
        var(--color-fire-primary),
        var(--color-wood-accent)
    );
    border-radius: 999px;
    opacity: 0.9;
}

.timeline-item {
    position: relative;
    padding: 0 0 1.5rem 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 2px;
    top: 0.35rem;
    width: 18px;
    height: 18px;
    background-color: var(--color-text-light);
    border: 4px solid var(--color-wood-accent);
    border-radius: 50%;
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.25);
}

.timeline-content {
    margin-left: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(31, 41, 55, 0.08);
    background: rgba(249, 250, 251, 0.6);
}

.timeline-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.timeline-role {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text-dark);
}

.timeline-time {
    font-size: 0.9rem;
    color: #6B7280;
    white-space: nowrap;
}

.timeline-meta {
    color: var(--color-fire-primary);
    font-weight: 700;
    margin-bottom: 0.75rem;
    opacity: 0.95;
}

.timeline-list {
    margin-left: 1.1rem;
}

.timeline-list li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

/* -------------------- FOOTER -------------------- */
.main-footer {
    background-color: var(--color-text-dark);
    color: #9CA3AF;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.75rem;
    margin-top: auto;
    border-top: 3px solid var(--color-wood-accent);
}

/* -------------------- RESPONSIVE DESIGN -------------------- */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 0;
        position: static;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .logo {
        position: static;
        transform: none;
        margin-bottom: 0.5rem;
        order: -1;
    }

    .logo-name {
        font-size: 1.6rem;
    }

    .main-nav {
        justify-content: center;
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: 0.5rem;
        order: 1;
        gap: 1rem;
    }

    .nav-item {
        font-size: 3vw;
        padding: 0.5rem;
    }

    .main-content {
        grid-template-columns: 1fr;
        width: 95%;
        margin: 1.5rem auto;
        gap: 1.5rem;
    }

    .left-column {
        padding: 1.5rem;
        text-align: center;
        height: auto;
    }

    .right-column {
        padding: 1.5rem;
    }

    .portrait-img {
        width: 220px;
        height: 220px;
        background-size: 125%;
        background-position: 78% 4%;
    }

    .reflection-text {
        font-size: 1rem;
    }

    .section-wrap {
        width: 95%;
        margin-bottom: 1.5rem;
    }

    .section-card {
        padding: 1.5rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .timeline-time {
        white-space: normal;
    }
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(31, 41, 55, 0.15);
}

.lang-btn {
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--color-text-dark);
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.lang-btn:hover {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--color-wood-accent);
}

.lang-btn.is-active {
    background-color: var(--color-wood-accent);
    color: var(--color-text-light);
}

.lang-sep {
    color: rgba(31, 41, 55, 0.5);
    font-weight: 700;
}

/* Mobile: switch xuống dòng đẹp hơn */
@media (max-width: 768px) {
    .lang-switch {
        border-left: none;
        padding-left: 0;
        margin-left: 0.5rem;
    }
}
