/* ============================================================
   Resume / CV — premium screen view + clean print (PDF) view.
   Built on the theme design system tokens.
   ============================================================ */

.cv-page {
    background: var(--bg-body);
    padding: 48px 0 72px;
}

.cv-container {
    max-width: 900px;
}

/* ---- Action bar ---- */
.cv-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.cv-btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 6px 20px var(--primary-glow);
}

.cv-btn-primary:hover {
    transform: translateY(-2px);
    color: #fff;
}

.cv-btn-ghost {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.cv-btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ---- The CV sheet ---- */
.cv-sheet {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 48px 52px;
}

/* ---- Header ---- */
.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 3px solid transparent;
    border-image: var(--gradient-main) 1;
    margin-bottom: 26px;
}

.cv-name {
    font-size: 2.1rem;
    line-height: 1.1;
    margin: 0 0 6px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.cv-tagline {
    margin: 0;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.02rem;
}

.cv-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: right;
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--text-muted);
    white-space: nowrap;
}

.cv-contact a {
    color: var(--text-muted);
    text-decoration: none;
}

.cv-contact a:hover {
    color: var(--primary);
}

/* ---- Sections ---- */
.cv-section {
    margin-bottom: 26px;
}

.cv-section-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    font-weight: 700;
    margin: 0 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cv-prose {
    font-size: 0.96rem;
    line-height: 1.7;
    color: var(--text-main);
}

.cv-prose p {
    margin: 0 0 10px;
}

/* ---- Skills ---- */
.cv-skills {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cv-skill-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.cv-skill-cat {
    font-weight: 600;
    color: var(--text-main);
}

.cv-skill-items {
    color: var(--text-muted);
}

/* ---- Entries (experience + projects) ---- */
.cv-entry {
    margin-bottom: 18px;
}

.cv-entry:last-child {
    margin-bottom: 0;
}

.cv-entry-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}

.cv-entry-title {
    font-size: 1.05rem;
    margin: 0;
    color: var(--text-main);
}

.cv-entry-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}

.cv-entry-sub {
    margin: 2px 0 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.cv-entry-desc {
    margin: 0 0 8px;
    color: var(--text-main);
    font-size: 0.92rem;
    line-height: 1.6;
}

.cv-entry-stack {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-style: italic;
}

.cv-bullets {
    margin: 6px 0 0;
    padding-left: 20px;
    color: var(--text-main);
}

.cv-bullets li {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 3px;
}

.cv-more {
    margin: 12px 0 0;
    font-size: 0.9rem;
}

.cv-more a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* ---- Two column (education + certs) ---- */
.cv-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.cv-mini {
    margin-bottom: 12px;
}

.cv-mini-title {
    font-size: 0.98rem;
    margin: 0 0 2px;
    color: var(--text-main);
}

.cv-mini-sub {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.cv-mini-date {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ---- Responsive (screen) ---- */
@media (max-width: 640px) {
    .cv-sheet {
        padding: 32px 24px;
    }

    .cv-header {
        flex-direction: column;
    }

    .cv-contact {
        text-align: left;
        white-space: normal;
    }

    .cv-skill-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .cv-two-col {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ============================================================
   PRINT / PDF — clean, ATS-friendly, real selectable text
   ============================================================ */
@media print {
    /* Hide everything except the CV sheet: theme header, footer, sidebar, nav, actions. */
    body * {
        visibility: hidden;
    }

    .cv-sheet,
    .cv-sheet * {
        visibility: visible;
    }

    .no-print {
        display: none !important;
    }

    @page {
        margin: 14mm 14mm;
    }

    html,
    body {
        background: #fff !important;
    }

    .cv-page {
        padding: 0 !important;
        background: #fff !important;
    }

    .cv-container {
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .cv-sheet {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        font-size: 10.5pt;
    }

    .cv-header {
        border-bottom: 2px solid #0a0a0a;
        border-image: none;
    }

    .cv-name {
        font-size: 20pt;
    }

    .cv-tagline,
    .cv-section-title,
    .cv-entry-sub,
    .cv-more a {
        color: #0a0a0a !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Avoid awkward page breaks inside entries. */
    .cv-entry,
    .cv-mini,
    .cv-skill-row {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
