/* CV Style v2 — Tháng 3/2026 | Sidebar Layout */

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

:root {
    --navy: #0f2b46;
    --navy-mid: #163d5e;
    --navy-light: #1e5280;
    --gold: #d4a853;
    --gold-soft: rgba(212, 168, 83, 0.15);
    --bg: #f3f4f6;
    --white: #ffffff;
    --text: #1a1a1a;
    --text-body: #4a4a4a;
    --text-light: #7a7a7a;
    --border: #e4e7eb;
    --card-bg: #f9fafb;
    --radius: 10px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* ===== Wrapper — 2 Column Layout ===== */
.cv-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1060px;
    margin: 32px auto;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 40px rgba(0,0,0,0.06);
    border-radius: 12px;
    overflow: hidden;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: rgba(255,255,255,0.9);
    position: relative;
}

.sidebar-inner {
    padding: 36px 24px;
    position: sticky;
    top: 0;
}

/* Identity */
.identity {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.avatar-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: conic-gradient(var(--gold) 0deg, transparent 90deg, var(--gold) 180deg, transparent 270deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
}

.identity h1 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.role {
    font-size: 13px;
    color: var(--gold);
    font-weight: 500;
    margin-top: 6px;
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 14px;
}

/* Contact List */
.contact-list {
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.contact-list li:hover {
    color: var(--gold);
}

.contact-list svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
    flex-shrink: 0;
}

.contact-list a {
    color: inherit;
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

/* Skill Groups */
.skill-group {
    margin-bottom: 18px;
}

.skill-group:last-child {
    margin-bottom: 0;
}

.skill-group h4 {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

/* Skill Bars */
.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-item span {
    font-size: 11.5px;
    font-weight: 500;
    min-width: 72px;
    flex-shrink: 0;
}

.bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--gold), #e8c76a);
    border-radius: 2px;
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bar-fill.animate {
    width: var(--w);
}

/* Skill Pills */
.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.skill-pills span {
    font-size: 10.5px;
    padding: 3px 9px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    color: rgba(255,255,255,0.8);
    transition: all 0.2s;
}

.skill-pills span:hover {
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--gold);
}

/* ===== MAIN CONTENT ===== */
.content {
    padding: 40px 44px;
    overflow-y: auto;
}

/* Section Headings */
.section {
    margin-bottom: 36px;
}

.section:last-of-type {
    margin-bottom: 0;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--navy);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gold);
}

.heading-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--navy);
    color: var(--white);
    border-radius: 6px;
    flex-shrink: 0;
}

.heading-icon svg {
    width: 14px;
    height: 14px;
}

/* Intro */
.intro-text {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.85;
    text-wrap: pretty;
}

/* Featured Projects */
.project-feature {
    margin-bottom: 28px;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    position: relative;
}

.project-feature::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    background: var(--navy);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-feature:hover {
    border-color: #d0d5db;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transform: translateY(-1px);
}

.project-feature:hover::before {
    opacity: 1;
}

.project-feature:last-child {
    margin-bottom: 0;
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    gap: 16px;
}

.project-top h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.project-sub {
    font-size: 12.5px;
    color: var(--navy-light);
    font-weight: 500;
    margin-top: 2px;
}

.project-year {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    padding: 2px 10px;
    background: var(--bg);
    border-radius: 20px;
}

.project-url {
    display: inline-block;
    font-size: 12px;
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
    margin: 8px 0 12px;
    padding: 3px 10px;
    background: rgba(15, 43, 70, 0.05);
    border-radius: 4px;
    transition: all 0.2s;
}

.project-url:hover {
    background: var(--navy);
    color: var(--white);
}

.project-bullets {
    margin: 0 0 14px 18px;
    font-size: 13px;
    color: var(--text-body);
    line-height: 1.7;
}

.project-bullets li {
    margin-bottom: 6px;
}

.project-bullets strong {
    color: var(--text);
    font-weight: 600;
}

.project-bullets code {
    background: rgba(15, 43, 70, 0.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11.5px;
    color: var(--navy);
    font-family: 'SFMono-Regular', Consolas, monospace;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.project-stack span {
    font-size: 10.5px;
    font-weight: 500;
    padding: 3px 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--navy);
    transition: all 0.2s;
}

.project-stack span:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* Mini Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.project-mini {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.25s ease;
    position: relative;
}

.project-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    border-color: #d0d5db;
}

.mini-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 2px 8px;
    border-radius: 3px;
    background: var(--gold-soft);
    color: #8a6c1e;
    margin-bottom: 8px;
}

.project-mini h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.project-mini p {
    font-size: 11.5px;
    color: var(--text-light);
    line-height: 1.5;
}

.project-mini a {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.project-mini a:hover {
    color: var(--gold);
}

/* Footer */
.cv-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 11px;
    color: var(--text-light);
}

.cv-footer a {
    color: var(--navy);
    text-decoration: none;
}

/* ===== Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Print ===== */
@media print {
    body { background: #fff; }
    
    .cv-wrapper {
        box-shadow: none;
        margin: 0;
        border-radius: 0;
        max-width: 100%;
    }

    .sidebar {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .bar-fill { width: var(--w) !important; transition: none !important; }

    .project-feature:hover,
    .project-mini:hover,
    .skill-pills span:hover,
    .project-stack span:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ===== Responsive — Tablet ===== */
@media (max-width: 860px) {
    .cv-wrapper {
        grid-template-columns: 240px 1fr;
        margin: 16px;
        border-radius: 10px;
    }

    .content {
        padding: 32px 28px;
    }
}

/* ===== Responsive — Mobile ===== */
@media (max-width: 640px) {
    .cv-wrapper {
        grid-template-columns: 1fr;
        margin: 0;
        border-radius: 0;
    }

    .sidebar-inner {
        padding: 28px 20px;
        position: relative;
    }

    .identity {
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
        padding-bottom: 20px;
    }

    .avatar-ring {
        width: 56px;
        height: 56px;
        margin: 0;
    }

    .avatar-initials {
        font-size: 18px;
    }

    .identity h1 {
        font-size: 18px;
    }

    .identity h1 br { display: none; }

    .content {
        padding: 24px 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-top {
        flex-direction: column;
        gap: 4px;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .bar-fill { transition: none; width: var(--w); }
    .avatar-ring { animation: none; }
    .project-feature, .project-mini, .skill-pills span, .project-stack span { transition: none; }
}
