:root {
    --primary-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --surface-bg: #ffffff;
    --canvas-bg: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --brand-accent: #0284c7;
    --brand-accent-hover: #0369a1;
    --border-subtle: #cbd5e1;

    --sheet-width: 860px;
    --spacing-section: 12px;
}

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

body {
    font-family: var(--primary-font);
    background-color: var(--canvas-bg);
    color: var(--text-primary);
    line-height: 1.38;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 24px 12px;
}

/* Container A4 */
.cv-wrapper {
    background-color: var(--surface-bg);
    max-width: var(--sheet-width);
    margin: 0 auto;
    padding: 36px 44px;
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-subtle);
}

a {
    color: var(--brand-accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--brand-accent-hover);
    text-decoration: underline;
}

/* Cabeçalho */
.cv-header {
    text-align: center;
    margin-bottom: 12px;
}

.applicant-name {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.headline {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.meta-contacts {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.meta-contacts .bullet {
    color: var(--border-subtle);
}

.lang-skills {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Títulos de Seção */
.cv-section,
.cv-footer {
    margin-bottom: var(--spacing-section);
}

.block-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    border-bottom: 1.5px solid var(--text-primary);
    padding-bottom: 1px;
    margin-bottom: 6px;
}

/* Sistema de 2 Colunas */
.two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 24px;
}

.col {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.col p {
    font-size: 10.8px;
    color: var(--text-secondary);
    line-height: 1.35;
    text-align: justify;
}

.col strong {
    color: var(--text-primary);
}

/* Listas com marcadores (Bullets) */
.cv-list {
    list-style-type: disc;
    margin-left: 16px;
    padding-left: 0;
}

.cv-list li {
    font-size: 10.8px;
    color: var(--text-secondary);
    line-height: 1.35;
    margin-bottom: 4px;
    text-align: justify;
}

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

.project-entry {
    margin-bottom: 2px;
}

.repo-link {
    font-weight: 600;
    margin-left: 2px;
}

/* Cabeçalhos de Cargos/Experiência */
.job-meta-row {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 4px;
    font-size: 11.5px;
    margin-bottom: 3px;
}

.role-company {
    font-weight: 600;
    color: var(--text-primary);
}

.period {
    color: var(--text-secondary);
    font-size: 10.8px;
    white-space: nowrap;
}

.experience-spacer {
    height: 6px;
}

/* Formação Acadêmica (Linha direta) */
.cv-footer p {
    font-size: 10.8px;
    color: var(--text-secondary);
    line-height: 1.35;
    margin-bottom: 3px;
}

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

/* Botão Flutuante de Download */
.actions-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
}

.btn-download:hover {
    background-color: var(--text-primary);
    color: #ffffff;
    border-color: var(--text-primary);
    transform: translateY(-1px);
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    body {
        padding: 10px;
        background-color: var(--surface-bg);
    }

    .cv-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 24px 18px;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    .actions-bar {
        position: static;
        display: flex;
        justify-content: center;
        margin-bottom: 15px;
    }

    .two-columns {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .job-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1px;
    }

    .meta-contacts {
        gap: 5px;
    }

    .col p,
    .cv-list li,
    .cv-footer p {
        font-size: 11px;
        line-height: 1.45;
    }
}

/* Celulares menores */
@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .cv-wrapper {
        padding: 20px 14px;
    }

    .applicant-name {
        font-size: 19px;
    }

    .headline {
        font-size: 11.5px;
    }

    .meta-contacts,
    .lang-skills {
        font-size: 10.5px;
    }

    .block-heading {
        font-size: 10.5px;
    }

    .col p,
    .cv-list li,
    .cv-footer p {
        font-size: 10.5px;
        line-height: 1.45;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
    }
}

/* Configurações de Impressão / Salvar PDF */
@media print {
    @page {
        size: A4 portrait;
        margin: 8mm 12mm;
    }

    body {
        background-color: #ffffff;
        color: #000000;
        padding: 0;
        margin: 0;
        font-size: 10.2px;
        line-height: 1.3;
    }

    .cv-wrapper {
        padding: 0;
        border: none;
        box-shadow: none;
        max-width: 100%;
        margin: 0;
    }

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

    a {
        color: #000000;
        text-decoration: none;
    }

    .col p,
    .cv-list li,
    .cv-footer p {
        font-size: 10.2px;
        line-height: 1.3;
    }

    .cv-section,
    .cv-footer {
        page-break-inside: avoid;
    }
}
