/* ── Currículo ─────────────────────────────────────────────── */

.cv-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.cv-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,229,160,.2), rgba(0,229,160,.05));
  border: 2px solid rgba(0,229,160,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--teal);
  flex-shrink: 0;
}

.cv-hero-info {
  flex: 1;
}

.cv-name {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.cv-title {
  font-size: 14px;
  color: var(--teal);
  font-weight: 500;
  margin-bottom: 12px;
}

.cv-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.cv-contact-item {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.cv-contact-item a {
  color: var(--teal);
  text-decoration: none;
  opacity: .8;
}

.cv-contact-item a:hover {
  opacity: 1;
}

/* ── Seções ─────────────────────────────────────────────────── */

.cv-section {
  margin-bottom: 32px;
}

.cv-section-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,229,160,.15);
}

.cv-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  opacity: .85;
}

/* ── Skills ─────────────────────────────────────────────────── */

.cv-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.cv-skill-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.cv-skill-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cv-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid;
}

.cv-tag-teal   { background: rgba(0,229,160,.1);   color: var(--teal);   border-color: rgba(0,229,160,.2); }
.cv-tag-blue   { background: rgba(96,165,250,.1);  color: var(--blue);   border-color: rgba(96,165,250,.2); }
.cv-tag-amber  { background: rgba(255,184,48,.1);  color: var(--amber);  border-color: rgba(255,184,48,.2); }
.cv-tag-purple { background: rgba(167,139,250,.1); color: var(--purple); border-color: rgba(167,139,250,.2); }

/* ── Timeline (Experiência / Formação) ─────────────────────── */

.cv-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cv-entry {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}

.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.cv-entry-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.cv-entry-company {
  font-size: 12px;
  color: var(--muted);
}

.cv-entry-period {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--teal);
  white-space: nowrap;
  padding: 3px 9px;
  background: rgba(0,229,160,.08);
  border: 1px solid rgba(0,229,160,.15);
  border-radius: 20px;
}

.cv-entry-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cv-entry-list li {
  font-size: 13px;
  color: var(--text);
  opacity: .8;
  line-height: 1.5;
}

/* ── Certificações ─────────────────────────────────────────── */

.cv-cert-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.cv-cert-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  flex: 1;
  min-width: 200px;
}

.cv-cert-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid;
  white-space: nowrap;
}

.cv-cert-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.cv-cert-status {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ── Projetos ──────────────────────────────────────────────── */

.cv-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.cv-project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}

.cv-project-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.cv-project-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Portfolio button override ─────────────────────────────── */

.btn-portfolio {
  background: var(--teal) !important;
  color: #000 !important;
  border-color: var(--teal) !important;
  font-weight: 700 !important;
  margin-top: 6px;
}

.btn-portfolio:hover {
  opacity: .88 !important;
  color: #000 !important;
}

/* ── Skill bars ─────────────────────────────────────────────── */

.cv-skills-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.cv-skill-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cv-skill-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cv-skill-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.cv-skill-lvl {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid;
}

.cv-lvl-av  { background: rgba(0,229,160,.1);   color: var(--teal);   border-color: rgba(0,229,160,.25); }
.cv-lvl-int { background: rgba(77,159,255,.1);  color: var(--blue);   border-color: rgba(77,159,255,.25); }
.cv-lvl-bas { background: rgba(167,139,250,.1); color: var(--purple); border-color: rgba(167,139,250,.25); }

.cv-skill-bar {
  height: 5px;
  background: rgba(255,255,255,.06);
  border-radius: 5px;
  overflow: hidden;
}

.cv-skill-fill {
  height: 100%;
  border-radius: 5px;
}

.cv-skills-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 6px;
}

/* ── Botão imprimir ─────────────────────────────────────────── */

.cv-print-btn {
  background: rgba(0, 229, 160, 0.08);
  border: 1px solid rgba(0, 229, 160, 0.35);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 229, 160, 0.1);
}

.cv-print-btn:hover {
  background: rgba(0, 229, 160, 0.15);
  border-color: var(--teal);
  box-shadow: 0 0 16px rgba(0, 229, 160, 0.22);
}

/* ── CTA de contato ─────────────────────────────────────────── */

.cv-cta-section {
  margin-top: 40px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(0,229,160,.06), rgba(0,229,160,.02));
  border: 1px solid rgba(0,229,160,.15);
  border-radius: 14px;
  text-align: center;
}

.cv-cta-title {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.cv-cta-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.cv-cta-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cv-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  border: 1px solid;
  transition: opacity .15s, transform .15s;
}

.cv-cta-btn:hover { opacity: .85; transform: translateY(-1px); }

.cv-cta-email { background: rgba(0,229,160,.1);   color: var(--teal);   border-color: rgba(0,229,160,.25); }
.cv-cta-wpp   { background: rgba(77,159,255,.1);  color: var(--blue);   border-color: rgba(77,159,255,.25); }
.cv-cta-li    { background: rgba(167,139,250,.1); color: var(--purple); border-color: rgba(167,139,250,.25); }

/* ── Cards clicáveis (experiência) ─────────────────────────── */

.cv-entry-clickable {
  cursor: pointer;
  transition: transform .2s, border-color .2s;
}

.cv-entry-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(0,229,160,.25);
}

.cv-entry-expand {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  opacity: 0;
  transition: opacity .2s;
}

.cv-entry-clickable:hover .cv-entry-expand {
  opacity: 1;
}

/* ── Idiomas ────────────────────────────────────────────────── */

.cv-lang-bar {
  flex: 1;
  max-width: 160px;
  height: 4px;
  background: rgba(255,255,255,.07);
  border-radius: 4px;
  overflow: hidden;
}

.cv-lang-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 4px;
}

/* ── Certificados & Histórico Escolar ───────────────────────── */

.cv-certs-docs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cv-cert-doc {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .2s, transform .2s;
}

.cv-cert-doc:hover {
  border-color: rgba(0,229,160,.25);
  transform: translateY(-1px);
}

.cv-cert-doc--academic {
  border-color: rgba(255,184,48,.15);
}

.cv-cert-doc--academic:hover {
  border-color: rgba(255,184,48,.35);
}

.cv-cert-doc-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.cv-cert-doc-body {
  flex: 1;
  min-width: 0;
}

.cv-cert-doc-title {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.cv-cert-doc-inst {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.cv-cert-doc-meta {
  display: flex;
  gap: 10px;
}

.cv-cert-doc-hours {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  background: rgba(0,229,160,.08);
  border: 1px solid rgba(0,229,160,.2);
  border-radius: 4px;
  padding: 1px 7px;
}

.cv-cert-doc-date {
  font-size: 11px;
  color: var(--muted);
  padding: 1px 0;
}

.cv-cert-doc-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid;
  flex-shrink: 0;
  white-space: nowrap;
}

.cv-cert-doc-view {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  opacity: 0;
  transition: opacity .2s;
  flex-shrink: 0;
  white-space: nowrap;
}

.cv-cert-doc:hover .cv-cert-doc-view {
  opacity: 1;
}

/* ── Modal de Certificado ────────────────────────────────────── */

.cert-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cert-modal-overlay.open {
  display: flex;
}

.cert-modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}

.cert-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-shrink: 0;
}

.cert-modal-title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.cert-modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.cert-modal-download {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  background: rgba(0,229,160,.1);
  border: 1px solid rgba(0,229,160,.25);
  border-radius: 6px;
  padding: 5px 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
}

.cert-modal-download:hover { opacity: .8; }

.cert-modal-close {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}

.cert-modal-close:hover { color: var(--text); background: rgba(255,255,255,.1); }

.cert-modal-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
  background: rgba(0,0,0,.2);
}

.cert-modal-body img {
  max-width: 100%;
  width: 100%;
  border-radius: 8px;
  display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 600px) {
  .cv-hero {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }

  .cv-contacts {
    justify-content: center;
  }

  .cv-entry-header {
    flex-direction: column;
    gap: 6px;
  }

  .cv-print-btn {
    align-self: center;
    margin-top: 8px;
  }
}

/* ── Print / Salvar PDF ─────────────────────────────────────── */

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

  #screen-login, .nav, .header,
  #page-progresso, #page-semana, #page-checklist,
  #page-roadmap, #page-cronograma, #page-admin,
  .cv-print-btn, .cv-cta-section,
  .phase-modal-overlay { display: none !important; }

  body, #screen-app { background: #fff !important; color: #111 !important; }
  .page { display: none !important; }
  #page-curriculo { display: block !important; }
  .container { padding: 0 !important; max-width: 100% !important; }

  /* Remover visual de "card" — aparência CV limpa */
  .cv-hero, .cv-entry, .cv-skill-group,
  .cv-project-card, .cv-cert-item {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .cv-entry         { border-bottom: 1px solid #eee !important; padding-bottom: 8px !important; }
  .cv-cert-item     { border: 1px solid #ddd !important; padding: 8px 12px !important; border-radius: 6px !important; }
  .cv-project-card  { border: 1px solid #ddd !important; padding: 10px 12px !important; border-radius: 6px !important; }
  .cv-section       { margin-bottom: 16px !important; }
  .cv-timeline      { gap: 10px !important; }
  .cv-cert-row      { gap: 8px !important; }
  .cv-hero          { gap: 16px !important; margin-bottom: 16px !important; }

  .cv-section-title {
    font-size: 10px !important;
    color: #009966 !important;
    border-bottom: 1px solid #ccc !important;
    padding-bottom: 4px !important;
    margin-bottom: 10px !important;
  }

  /* Tipografia */
  .cv-name          { font-size: 20px !important; color: #111 !important; }
  .cv-title         { font-size: 13px !important; color: #009966 !important; margin-bottom: 8px !important; }
  .cv-text          { font-size: 12px !important; color: #333 !important; opacity: 1 !important; line-height: 1.5 !important; }
  .cv-entry-title   { font-size: 13px !important; color: #111 !important; font-weight: 600 !important; margin-bottom: 2px !important; }
  .cv-entry-company { font-size: 11px !important; color: #555 !important; }
  .cv-entry-period  { font-size: 10px !important; color: #009966 !important;
    background: rgba(0,153,102,.07) !important; border: 1px solid rgba(0,153,102,.2) !important; }
  .cv-entry-list li { font-size: 12px !important; color: #333 !important; opacity: 1 !important; line-height: 1.5 !important; }
  .cv-contact-item  { font-size: 11px !important; color: #555 !important; }
  .cv-contact-item a { color: #009966 !important; }
  .cv-skill-name    { font-size: 12px !important; color: #111 !important; }
  .cv-skill-bar     { background: #eee !important; height: 4px !important; }
  .cv-skill-fill    { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .cv-lvl-av        { background: rgba(0,153,102,.1) !important; color: #009966 !important; border-color: rgba(0,153,102,.2) !important; }
  .cv-lvl-int       { background: rgba(0,80,200,.1) !important;  color: #0050c8 !important; border-color: rgba(0,80,200,.2) !important; }
  .cv-lvl-bas       { background: rgba(100,60,200,.1) !important; color: #643cc8 !important; border-color: rgba(100,60,200,.2) !important; }
  .cv-avatar        { border-color: #009966 !important; color: #009966 !important; background: transparent !important; }
  .cv-cert-status, .cv-muted { color: #777 !important; }
  .cv-entry-expand  { display: none !important; }
  .cv-project-title { font-size: 13px !important; color: #111 !important; }
  .cv-project-desc  { font-size: 12px !important; color: #555 !important; }
  .cv-cert-name     { font-size: 12px !important; color: #111 !important; }

  /* Page breaks: 3 páginas */
  #cv-section-experiencia { page-break-before: always !important; }
  #cv-section-formacao    { page-break-before: always !important; }

  /* Evitar quebra no meio de entradas */
  .cv-entry, .cv-cert-item, .cv-project-card { page-break-inside: avoid !important; }

  a { color: inherit !important; text-decoration: none !important; }
}
