/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

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

.curriculo-container {
    max-width: 210mm; /* Tamanho A4 */
    margin: 0 auto;
    padding: 20px;
    background: white;
}

/* Header */
.header {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.nome-cargo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.nome-cargo h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.especialidades {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.contato-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 250px;
}

.contato-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.contato-item i {
    color: var(--primary-color);
    width: 16px;
    font-size: 14px;
}

/* Seções gerais */
section {
    margin-bottom: 25px;
}

section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Resumo */
.resumo p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: justify;
}

/* Experiência */
.experiencia-item {
    margin-bottom: 20px;
    page-break-inside: avoid;
}

.experiencia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.experiencia-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 200px;
}

.empresa {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

.periodo {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
}

.experiencia-item ul {
    list-style: none;
    padding-left: 0;
}

.experiencia-item li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.experiencia-item li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Habilidades */
.habilidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.habilidade-categoria {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.habilidade-categoria h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.habilidade-categoria ul {
    list-style: none;
    padding-left: 0;
}

.habilidade-categoria li {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    padding-left: 15px;
    position: relative;
}

.habilidade-categoria li::before {
    content: '▸';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 10px;
}

/* Projetos */
.projeto-item {
    margin-bottom: 18px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Projetos Pessoais */
.projetos-pessoais {
    margin-bottom: 25px;
}

.projetos-pessoais h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.projeto-item h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.projeto-item p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.tech-stack {
    font-size: 11px;
    color: var(--primary-color);
    font-weight: 500;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.projeto-link {
    margin-top: 8px;
}

.projeto-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.projeto-link a:hover {
    background: var(--primary-color);
    color: white;
}

/* Formação */
.formacao-item {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
}

.formacao-item h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.instituicao {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 13px;
    margin-right: 15px;
}

.formacao-item .periodo {
    color: var(--text-light);
    font-size: 12px;
}

.formacao-item p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Certificações */
.certificacoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.certificacao-item {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.certificacao-item h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.certificacao-item span {
    font-size: 11px;
    color: var(--text-secondary);
}

.certificacao-item .cert-desc {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 4px;
    line-height: 1.3;
}

/* Footer */
.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer p {
    font-size: 12px;
    color: var(--text-light);
}

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

/* Botão de impressão */
.print-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.btn-print {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.btn-print:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-print i {
    font-size: 16px;
}

/* Estilos para impressão */
@media print {
    body {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .curriculo-container {
        max-width: none;
        margin: 0;
        padding: 15px;
    }
    
    .print-button {
        display: none;
    }
    
    .header {
        border-bottom: 2px solid var(--primary-color);
        margin-bottom: 20px;
    }
    
    .nome-cargo h1 {
        font-size: 24px;
    }
    
    .nome-cargo h2 {
        font-size: 18px;
    }
    
    .especialidades {
        font-size: 14px;
    }
    
    section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .experiencia-header h4 {
        font-size: 14px;
    }
    
    .experiencia-item li {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .habilidade-categoria {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .habilidade-categoria li {
        font-size: 11px;
        margin-bottom: 3px;
    }
    
    .projeto-item {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .projeto-item h4 {
        font-size: 13px;
    }
    
    .projeto-item p {
        font-size: 11px;
    }
    
    .tech-stack {
        font-size: 10px;
    }
    
    /* Evita quebras de página em seções importantes */
    .experiencia-item,
    .projeto-item,
    .habilidade-categoria {
        page-break-inside: avoid;
    }
    
    /* Quebra de página antes de seções principais */
    .habilidades,
    .projetos,
    .formacao {
        page-break-before: auto;
    }
    
    /* Ajusta margens para impressão */
    @page {
        margin: 1.5cm;
        size: A4;
    }
}

/* Responsividade para tela */
@media screen and (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .contato-info {
        min-width: auto;
    }
    
    .habilidades-grid {
        grid-template-columns: 1fr;
    }
    
    .certificacoes-grid {
        grid-template-columns: 1fr;
    }
    
    .experiencia-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .experiencia-header h4 {
        min-width: auto;
    }
}

@media screen and (max-width: 480px) {
    .curriculo-container {
        padding: 15px;
    }
    
    .nome-cargo h1 {
        font-size: 24px;
    }
    
    .nome-cargo h2 {
        font-size: 18px;
    }
    
    .especialidades {
        font-size: 14px;
    }
    
    .contato-item {
        font-size: 12px;
    }
    
    .btn-print {
        padding: 10px 16px;
        font-size: 12px;
    }
}

/* Otimizações para PDF */
@media print {
    /* Garante que o fundo seja branco */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    /* Remove sombras e bordas desnecessárias */
    .habilidade-categoria,
    .projeto-item,
    .formacao-item,
    .certificacao-item {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
    
    /* Ajusta espaçamentos para melhor aproveitamento do espaço */
    .curriculo-container {
        padding: 10px;
    }
    
    section {
        margin-bottom: 20px;
    }
    
    .experiencia-item {
        margin-bottom: 15px;
    }
    
    .projeto-item {
        margin-bottom: 12px;
    }
}
