/* ============================================================
   CURRÍCULO — folha de estilo para exportação PDF / impressão
   Carregada apenas em @media print (ver index.html)
   ============================================================ */

@page {
  size: A4 portrait;
  margin: 16mm 14mm 18mm;
}

@media print {
  /* ---------- base & contraste ---------- */

  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html {
    font-size: 10pt;
  }

  body.cv-page {
    background: #fff !important;
    color: #111110 !important;
    font-size: 10pt;
    line-height: 1.48;
  }

  .soft {
    color: #3d3d38 !important;
  }

  .muted {
    color: #5c5c55 !important;
  }

  .label {
    color: #5c5c55 !important;
  }

  /* ---------- ocultar UI de tela ---------- */

  .cv-print-btn,
  .cv-proj-tooltip,
  .cv-historico-toggle {
    display: none !important;
  }

  /* ---------- layout ---------- */

  .container {
    max-width: none;
    padding-inline: 0;
  }

  .cv-layout {
    display: block;
    padding: 0;
  }

  .cv-main,
  .cv-aside,
  .cv-layout--single .cv-main {
    width: 100%;
    grid-column: auto;
  }

  .cv-aside {
    margin-top: 6mm;
    page-break-inside: avoid;
  }

  /* ---------- cabeçalho ---------- */

  .cv-header {
    padding-bottom: 5mm;
    margin-bottom: 5mm;
    border-bottom: 1px solid #111110;
  }

  .cv-name {
    margin-top: 3mm;
    font-size: 21pt;
    font-weight: 560;
    line-height: 0.95;
    letter-spacing: -0.02em;
  }

  .cv-role {
    margin-top: 2mm;
    font-size: 11.5pt;
    font-weight: 420;
    line-height: 1.25;
  }

  .cv-summary {
    margin-top: 4mm;
    max-width: none;
    padding-top: 3mm;
    font-size: 10pt;
    line-height: 1.5;
    border-top: 1px dashed #8c8c85;
  }

  /* ---------- seções ---------- */

  .cv-section {
    padding-bottom: 4mm;
    margin-bottom: 4mm;
    border-bottom: 1px solid #d8d6ce;
  }

  .cv-section:last-of-type {
    border-bottom: 1px dashed #8c8c85;
  }

  .cv-section-label {
    padding-bottom: 2mm;
    margin-bottom: 3mm;
    font-size: 7.5pt;
    letter-spacing: 0.24em;
    border-bottom: 1px dashed #8c8c85;
    page-break-after: avoid;
  }

  /* ---------- itens ---------- */

  .cv-item {
    padding-block: 2.5mm;
    border-bottom: 1px dashed #b8b6ae;
  }

  .cv-item:last-child {
    border-bottom: 0;
  }

  .cv-item-head {
    margin-bottom: 1.5mm;
    gap: 0.5mm;
  }

  .cv-item-period {
    font-size: 7.5pt;
    color: #5c5c55 !important;
  }

  .cv-item-title {
    font-size: 10.5pt;
    font-weight: 520;
  }

  .cv-item-org,
  .cv-item .t-small {
    font-size: 9pt;
    line-height: 1.4;
  }

  .cv-item-desc,
  .cv-item .t-body {
    font-size: 9.75pt;
    line-height: 1.48;
  }

  .cv-item-desc + .cv-item-desc {
    margin-top: 2mm;
  }

  .cv-item--compact {
    padding-block: 2mm;
  }

  .cv-item--compact .t-body {
    font-size: 9.5pt;
    line-height: 1.45;
  }

  .cv-item--inline {
    padding-block: 1.5mm;
  }

  /* ---------- histórico ---------- */

  .cv-historico-intro {
    max-width: none;
    margin-bottom: 3mm;
    font-size: 9.75pt;
  }

  .cv-historico-panel[hidden] {
    display: block !important;
  }

  .cv-historico-panel {
    margin-top: 0;
    border-top: 0;
  }

  .cv-item--historico .cv-item-head {
    flex-direction: column;
  }

  .cv-item--historico .cv-item-period {
    order: -1;
  }

  /* ---------- projetos (links clicáveis) ---------- */

  .cv-projeto-link {
    color: inherit !important;
    text-decoration: none !important;
    cursor: text;
  }

  .cv-projeto-ext-icon {
    opacity: 1 !important;
    visibility: visible !important;
    color: #5c5c55 !important;
    font-size: 9pt;
  }

  .cv-print-url {
    display: block !important;
    margin-top: 1mm;
    font-family: var(--font-mono);
    font-size: 7.5pt;
    line-height: 1.35;
    color: #1a4a8a !important;
    word-break: break-all;
  }

  a.cv-projeto-link .cv-print-url {
    text-decoration: underline;
  }

  /* ---------- links gerais ---------- */

  .link,
  a[href^="mailto:"],
  a[href^="http"],
  a[href^="https"] {
    color: #111110 !important;
    text-decoration: underline !important;
    text-underline-offset: 0.12em;
  }

  .link::after {
    display: none !important;
  }

  /* ---------- rodapé / contato ---------- */

  .cv-footer {
    padding-top: 4mm;
    page-break-inside: avoid;
  }

  .cv-footer .label {
    margin-bottom: 2mm;
    font-size: 7.5pt;
  }

  .cv-footer .t-body,
  .cv-footer .t-small {
    font-size: 9.5pt;
  }

  /* ---------- credencial (quando visível) ---------- */

  .cv-credential {
    position: static;
    padding: 0;
  }

  .cv-credential-mount {
    flex-direction: row;
    align-items: stretch;
    max-width: 100%;
  }

  .cv-clip {
    display: none;
  }

  .cv-credential-swing {
    margin-top: 0;
    animation: none;
    transform: none;
    width: 100%;
  }

  .cv-credential-card {
    max-width: 100%;
    box-shadow: none;
    border: 1px solid #d8d6ce;
    display: grid;
    grid-template-columns: 26% 1fr;
  }

  .cv-credential-top {
    grid-column: 1 / -1;
    font-size: 7pt;
  }

  .cv-portrait {
    aspect-ratio: auto;
    min-height: 28mm;
    border-right: 1px solid #d8d6ce;
  }

  .cv-portrait img {
    object-fit: cover;
  }

  .cv-credential-bottom {
    border-top: 0;
    border-left: 1px dashed #8c8c85;
    padding: 3mm;
  }

  .cv-credential-name {
    font-size: 11pt;
  }

  .cv-credential-role,
  .cv-credential-local {
    font-size: 8pt;
  }

  /* ---------- quebras de página ---------- */

  .cv-section-label,
  .cv-item-head,
  .cv-name,
  .cv-role {
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .cv-item--compact,
  .cv-item--inline,
  .cv-footer,
  .cv-aside {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }
}
