/* CV ATS — Una columna · Tipografía sistema · Parseable */

:root {
    --text: #1a1a1a;
    --muted: #444;
    --line: #ccc;
    --max: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 11pt; }

body {
    font-family: Arial, Helvetica, "Segoe UI", sans-serif;
    color: var(--text);
    background: #e8e8e8;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Toolbar */
.toolbar {
    position: fixed;
    inset: 0 0 auto;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    z-index: 100;
    font-size: 0.8125rem;
}

.toolbar-label { font-weight: 600; color: var(--muted); }

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-link {
    padding: 6px 10px;
    color: var(--muted);
    text-decoration: none;
}

.toolbar-link:hover { text-decoration: underline; }

.toolbar button,
.toolbar-actions button {
    font: 600 0.8125rem Arial, sans-serif;
    padding: 7px 14px;
    border: none;
    border-radius: 4px;
    background: #1a1a1a;
    color: #fff;
    cursor: pointer;
}

.toolbar .btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
}

/* Documento */
.cv-ats {
    width: var(--max);
    max-width: calc(100% - 32px);
    margin: 64px auto 40px;
    padding: 40px 44px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.cv-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--text);
}

.cv-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.cv-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 10px;
}

.cv-contact {
    list-style: none;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.5;
}

.cv-ats section {
    margin-top: 18px;
    page-break-inside: avoid;
}

.cv-ats h2 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

.cv-ats section > p {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text);
}

.skills-keywords {
    font-size: 0.8125rem !important;
    line-height: 1.6 !important;
    color: var(--muted) !important;
}

.job {
    margin-bottom: 14px;
    page-break-inside: avoid;
}

.job h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.job-meta {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.job ul {
    margin-left: 18px;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.job li { margin-bottom: 3px; }

.edu {
    margin-bottom: 10px;
}

.edu h3 {
    font-size: 0.875rem;
    font-weight: 700;
}

.edu p {
    font-size: 0.8125rem;
    color: var(--muted);
}

.train-list,
.personal-list {
    margin-left: 18px;
    font-size: 0.8125rem;
    line-height: 1.55;
}

.train-list li,
.personal-list li { margin-bottom: 4px; }

/* Impresión / PDF */
@media print {
    .no-print { display: none !important; }

    @page { size: A4 portrait; margin: 14mm 12mm; }

    body { background: #fff; }

    .cv-ats {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    .job, .cv-ats section { page-break-inside: avoid; }
}

body.print-ready,
body.pdf-capture {
    background: #fff !important;
}

body.print-ready .cv-ats,
body.pdf-capture .cv-ats {
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 auto !important;
    padding: 14mm 12mm !important;
    box-shadow: none !important;
}

body.print-ready .no-print,
body.pdf-capture .no-print { display: none !important; }

@media (max-width: 640px) {
    .toolbar { height: auto; flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
    .cv-ats { margin-top: 80px; padding: 28px 24px; }
}
