/* =============================================================================
   8. RESUME PREVIEW STYLES — PROFESSIONAL DUAL COLUMN A4
   ============================================================================= */

/* ---------- Scope & Paper Container ---------- */
.resume-paper {
    width: var(--a4-w);
    min-height: var(--a4-h);
    max-width: calc(var(--a4-w) + 40px);
    background: #ffffff;
    padding: 16mm 14mm;
    
    /* DUAL COLUMN LAYOUT */
    column-count: 2;
    column-gap: 2rem;
    column-rule: 1px solid var(--slate-200);
    
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    border-radius: 6px;
    
    /* Rich, Highly Readable Professional Typography */
    font-family: var(--font-sans);
    font-size: 15px; 
    line-height: 1.55;
    color: var(--slate-900);
    
    transform-origin: top center;
    transition: transform var(--dur-norm) var(--ease-out);
    animation: slideIn 0.6s var(--ease-out);
    
    hyphens: auto;
    -webkit-hyphens: auto;
    word-break: break-word;
}

/* ─── Resume Header (Spans Both Columns) ─── */
.resume-header {
    column-span: all; 
    -webkit-column-span: all;
    
    margin-bottom: 1.8rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--slate-300);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.resume-identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.resume-name {
    font-family: var(--font-sans);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
    white-space: nowrap; /* Single line guaranteed */
}

.resume-role {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--resume-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
    white-space: nowrap; /* Single line guaranteed */
}

/* Compact Contact Info on right side of header */
.resume-contact {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 6px;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    font-size: 0.93rem;
    color: var(--slate-600);
    font-weight: 500;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out);
}

.contact-item a:hover {
    color: var(--resume-accent);
    text-decoration: underline;
}

.contact-item i {
    color: var(--resume-accent);
    font-size: 1em;
}

.contact-item[style*="display: none"] {
    display: none !important;
}

/* ─── Resume Sections (Flow into Columns) ─── */
.resume-section {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    
    display: inline-block;
    width: 100%;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.08rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-900);
    margin: 0 0 12px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--slate-200);
}

.section-title i {
    color: var(--resume-accent);
    font-size: 1em;
}

.section-text {
    font-size: 0.98rem;
    color: var(--slate-700);
    line-height: 1.6;
    text-align: left;
}

/* ─── Entries (Balanced Vertical Fill) ─── */
.entries-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.resume-entry {
    margin-bottom: 4px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

.entry-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
    border-left: 3px solid var(--slate-200);
    padding-left: 10px;
}

.entry-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.25;
}

.entry-subtitle {
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--resume-accent);
    margin: 3px 0;
}

.entry-date {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--slate-500);
    margin-top: 1px;
}

.entry-description {
    font-size: 0.95rem;
    color: var(--slate-600);
    line-height: 1.55;
    margin-top: 6px;
    padding-left: 12px;
}

/* ─── Skills (Balanced Pills) ─── */
.skills-group {
    margin-bottom: 14px;
}

.skills-label {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 6px;
    display: block;
}

.skills-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.skill-pill {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 10px;
    background: var(--color-black);
    border-radius: 4px;
    color: var(--color-white);
}

/* ─── Print Optimisations (Balanced Vertical Coverage) ─── */
@media print {
    .resume-paper {
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        column-count: 2 !important;
        column-gap: 2rem !important;
        font-size: 15px !important;
        line-height: 1.55 !important;
        
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .resume-header {
        border-bottom-width: 2px !important;
        margin-bottom: 1.5rem !important;
        padding-bottom: 1rem !important;
    }

    .resume-name {
        font-size: 2.5rem !important;
    }

    .resume-section {
        margin-bottom: 22px !important;
    }

    .entries-container {
        gap: 14px !important;
    }

    .section-title {
        font-size: 1.05rem !important;
        margin-bottom: 10px !important;
    }

    .entry-title {
        font-size: 1.08rem !important;
    }

    .entry-description,
    .section-text {
        font-size: 0.95rem !important;
        line-height: 1.55 !important;
    }

    .skills-group {
        margin-bottom: 12px !important;
    }

    .skill-pill {
        padding: 4px 10px !important;
        font-size: 0.88rem !important;
    }
}

/* ─── Responsive (Preview Mode) ─── */
@media screen and (max-width: 800px) {
    .resume-paper {
        column-count: 1;
        padding: 24px;
    }
    
    .resume-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    
    .resume-contact {
        align-items: flex-start;
        font-size: 0.9rem;
    }
}
