/* ==========================================================================
   FALCTEC - MODAL / DRAWER DE CURRÍCULO EXECUTIVO & DOSSIER
   ========================================================================== */

.cv-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 9, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.cv-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cv-modal-window {
  background: #090c12;
  border: 1px solid var(--border-steel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 255, 136, 0.15);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.cv-modal-backdrop.open .cv-modal-window {
  transform: translateY(0) scale(1);
}

.cv-modal-header {
  padding: 24px 32px;
  background: #06080d;
  border-bottom: 1px solid var(--border-steel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cv-header-info h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cv-status-pill {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-green);
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.cv-header-title {
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 4px;
}

.cv-close-btn {
  background: transparent;
  border: 1px solid var(--border-steel);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.cv-close-btn:hover {
  background: rgba(255, 51, 85, 0.1);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* Abas do Currículo */
.cv-tabs {
  display: flex;
  background: #05070a;
  border-bottom: 1px solid var(--border-steel);
  padding: 0 32px;
  overflow-x: auto;
}

.cv-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.cv-tab-btn:hover {
  color: #fff;
}

.cv-tab-btn.active {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.03);
}

/* Corpo do Currículo */
.cv-modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
}

.cv-section-title {
  font-size: 1.15rem;
  color: #fff;
  font-family: var(--font-mono);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-steel);
  padding-bottom: 8px;
}

.cv-summary-text {
  font-size: 0.98rem;
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 24px;
}

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

.cv-highlight-card {
  background: #06080d;
  border: 1px solid var(--border-steel);
  padding: 16px;
  border-radius: var(--radius-sm);
}

.cv-hl-val {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-green);
}

.cv-hl-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  margin: 4px 0;
}

.cv-hl-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Timeline de Experiência */
.timeline-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 28px;
  border-left: 2px solid var(--border-steel);
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--accent-green);
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.timeline-period {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 10px;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Skills Tags */
.skills-group {
  margin-bottom: 20px;
}

.skills-group-title {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background: #06080d;
  border: 1px solid var(--border-steel);
  color: #e2e8f0;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.cv-directive-box {
  background: #06080d;
  border-left: 3px solid var(--accent-cyan);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: #cbd5e1;
  margin-top: 16px;
}

body.light-theme .cv-directive-box {
  background: #f1f5f9;
  color: #334155;
  border-left-color: #0284c7;
}

.cv-cert-list {
  list-style: none;
  font-size: 0.88rem;
  color: #cbd5e1;
  font-family: var(--font-mono);
}

body.light-theme .cv-cert-list {
  color: #334155;
}

.cv-finops-desc {
  font-size: 0.92rem;
  color: #cbd5e1;
  margin-bottom: 18px;
  line-height: 1.6;
}

body.light-theme .cv-finops-desc {
  color: #475569;
}

.cv-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.cv-feature-card {
  background: #06080d;
  border: 1px solid var(--border-steel);
  padding: 14px;
  border-radius: 4px;
}

body.light-theme .cv-feature-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.cv-feature-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.cv-feature-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.4;
  display: block;
}

/* Footer do Modal */
.cv-modal-footer {
  padding: 16px 32px;
  background: #06080d;
  border-top: 1px solid var(--border-steel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.btn-print {
  background: transparent;
  border: 1px solid var(--border-steel);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-print:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #fff;
}

.btn-contact {
  background: var(--accent-green);
  color: #07090d;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-contact:hover {
  background: #22ff99;
  box-shadow: 0 0 16px var(--accent-green-glow);
}

/* Regras de impressão para PDF */
@media print {
  body * {
    visibility: hidden;
  }
  .cv-modal-backdrop, .cv-modal-window, .cv-modal-window * {
    visibility: visible;
  }
  .cv-modal-backdrop {
    position: static;
    background: #fff;
    color: #000;
    padding: 0;
  }
  .cv-modal-window {
    box-shadow: none;
    border: none;
    max-width: 100%;
    color: #000;
  }
  .cv-modal-header, .cv-tabs, .cv-modal-footer {
    display: none;
  }
}

/* ------------------------------------------------------------------------
 * SUPORTE COMPLETO AO TEMA CLARO (LIGHT THEME NO MODAL CV)
 * ------------------------------------------------------------------------ */
body.light-theme .cv-modal-backdrop {
  background: rgba(15, 23, 42, 0.6);
}

body.light-theme .cv-modal-window {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 24px rgba(5, 150, 105, 0.1);
  color: #0f172a;
}

body.light-theme .cv-modal-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

body.light-theme .cv-header-info h2 {
  color: #0f172a;
}

body.light-theme .cv-header-title {
  color: #059669;
}

body.light-theme .cv-tabs {
  background: #f1f5f9;
  border-bottom-color: #e2e8f0;
}

body.light-theme .cv-tab-btn {
  color: #475569;
}

body.light-theme .cv-tab-btn:hover {
  color: #0f172a;
}

body.light-theme .cv-tab-btn.active {
  color: #059669;
  border-bottom-color: #059669;
  background: #ffffff;
}

body.light-theme .cv-summary-lead {
  color: #334155;
}

body.light-theme .cv-highlight-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .cv-highlight-val {
  color: #059669;
}

body.light-theme .cv-item-title {
  color: #0f172a;
}

body.light-theme .cv-item-company {
  color: #0284c7;
}

body.light-theme .cv-item-desc {
  color: #475569;
}

body.light-theme .cv-item-period {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

body.light-theme .cv-skill-chip {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .cv-modal-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

body.light-theme .btn-print {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .btn-print:hover {
  background: #f1f5f9;
  color: #0f172a;
}

body.light-theme .btn-contact {
  background: #059669;
  color: #ffffff;
}

body.light-theme .btn-contact:hover {
  background: #047857;
}

/* ------------------------------------------------------------------------
 * RESPONSIVIDADE MOBILE (MODAL CV BOTTOM SHEET)
 * ------------------------------------------------------------------------ */
@media (max-width: 680px) {
  .cv-modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .cv-modal-window {
    border-radius: 18px 18px 0 0;
    max-height: 92vh;
    border-bottom: none;
  }
  .cv-modal-header {
    padding: 16px 20px;
    gap: 12px;
  }
  .cv-header-info h2 {
    font-size: 1.25rem;
  }
  .cv-modal-body {
    padding: 18px 16px;
  }
  .cv-tabs {
    overflow-x: auto;
    padding: 0 10px;
    scrollbar-width: none;
  }
  .cv-tab-btn {
    padding: 12px 14px;
    font-size: 0.78rem;
  }
  .cv-highlights-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .cv-modal-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
    gap: 8px;
  }
  .cv-footer-actions {
    width: 100%;
    display: flex;
    justify-content: stretch;
  }
  .cv-footer-actions button,
  .cv-footer-actions a {
    flex: 1;
    text-align: center;
  }
}

