/* ============================================================
   Professional CV / Resume Viewer
   Two-column: dark sidebar (left) + main content (right)
   ============================================================ */

/* --- Base --- */
.cv-wrap {
  width: 100%;
  margin: 20px auto;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #2d2d2d;
  background: #fff;
}

/* --- Action Bar --- */
.cv-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 0 16px;
  flex-wrap: wrap;
}
.cv-actions-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1.4;
  font-family: inherit;
}
.cv-btn-primary {
  background: #1e3a5f;
  color: #fff;
}
.cv-btn-primary:hover {
  background: #152c4a;
}
.cv-btn-secondary {
  background: #fff;
  color: #1e3a5f;
  border: 1px solid #1e3a5f;
}
.cv-btn-secondary:hover { background: #eef3f9; }
.cv-btn-outline {
  background: transparent;
  color: #5e5e5e;
  border: 1px solid #cdcfd2;
}
.cv-btn-outline:hover { background: #f3f6f8; }
.cv-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.cv-dropdown { position: relative; display: inline-block; }
.cv-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 190px;
  z-index: 100;
  padding: 6px 0;
}
.cv-dropdown.cv-open .cv-dropdown-menu { display: block; }
.cv-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  color: #191919;
  text-decoration: none;
  transition: background 0.15s;
}
.cv-dropdown-menu a:hover { background: #f3f6f8; }
.cv-dropdown-menu a svg { width: 15px; height: 15px; flex-shrink: 0; color: #5e5e5e; }
.cv-copied-msg { display: none; color: #16a34a; font-weight: 600; font-size: 0.8em; }

.cv-completion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 16px;
}
.cv-completion-bar {
  flex: 1;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  max-width: 280px;
}
.cv-completion-fill {
  height: 100%;
  background: linear-gradient(90deg, #1e3a5f, #48b775);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.cv-completion-text {
  font-size: 13px;
  color: #5e5e5e;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
   CV LAYOUT
   ============================================================ */
.cv-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  min-height: 600px;
  max-width: 210mm;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* --- LEFT SIDEBAR (Dark Navy) --- */
.cv-sidebar {
  background: #1e3a5f;
  color: #e8edf3;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.cv-sidebar-section {
  margin: 0;
}
.cv-sidebar-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #8fa8c8;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* Photo */
.cv-photo-wrapper {
  text-align: center;
  margin-bottom: 4px;
}
.cv-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
  background: #f3f6f8;
}
.cv-photo-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a5a8a, #153050);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  border: 3px solid rgba(255,255,255,0.25);
}

.cv-sidebar-name {
  text-align: center;
}
.cv-sidebar-name h1 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.2;
}
.cv-sidebar-name p {
  font-size: 14px;
  color: #b0c8e0;
  margin: 4px 0 0;
}

/* Contact info in sidebar */
.cv-contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cv-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #c8d8e8;
}
.cv-contact-item svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: #8fa8c8;
}
.cv-contact-item a {
  color: #b0d0f0;
  text-decoration: none;
  word-break: break-all;
}
.cv-contact-item a:hover { text-decoration: underline; }

/* Skills in sidebar */
.cv-skill-item {
  margin-bottom: 10px;
}
.cv-skill-item:last-child { margin-bottom: 0; }
.cv-skill-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #d0dce8;
  margin-bottom: 4px;
}
.cv-skill-bar {
  height: 5px;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
  overflow: hidden;
}
.cv-skill-bar-fill {
  display: block;
  height: 100%;
  background: #48b775;
  border-radius: 3px;
}

/* Languages in sidebar */
.cv-lang-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cv-lang-item:last-child { border-bottom: none; }
.cv-lang-name { color: #d0dce8; }
.cv-lang-level { color: #8fa8c8; font-size: 12px; }

/* Interests in sidebar */
.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cv-tag {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(255,255,255,0.08);
  color: #c8d8e8;
  border-radius: 14px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Social in sidebar */
.cv-social-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cv-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #b0d0f0;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s;
}
.cv-social-link svg { width: 13px; height: 13px; color: #8fa8c8; flex-shrink: 0; }
.cv-social-link:hover { color: #fff; }

/* ============================================================
   RIGHT MAIN CONTENT
   ============================================================ */
.cv-main {
  background: #fff;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cv-section {
  break-inside: avoid;
}
.cv-about-box {
  background: #f8faff;
  border: 1px solid #e0e7f0;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.cv-inner-boxes {
  display: flex;
  gap: 16px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.cv-inner-box {
  flex: 1;
  background: #fff;
  border: 1px solid #e0e7f0;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  break-inside: avoid;
  page-break-inside: avoid;
}
.cv-inner-box-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.cv-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #1e3a5f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  page-break-after: avoid;
  break-after: avoid;
  page-break-inside: avoid;
  break-inside: avoid;
}

/* Entry (for each list item) */
.cv-entry {
  padding: 8px 0;
  border-bottom: 1px solid #edf0f5;
  break-inside: avoid;
  page-break-inside: avoid;
}
.cv-entry:last-child { border-bottom: none; padding-bottom: 0; }
.cv-entry:first-child { padding-top: 0; }

.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  page-break-inside: avoid;
  break-inside: avoid;
}
.cv-entry h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
}
.cv-entry-date {
  font-size: 13px;
  color: #777;
  white-space: nowrap;
  flex-shrink: 0;
}
.cv-entry-org {
  font-size: 14px;
  font-weight: 500;
  color: #555;
  margin: 2px 0 0;
}
.cv-entry-tech {
  font-size: 13px;
  color: #1e3a5f;
  margin: 2px 0 0;
  font-weight: 500;
}
.cv-entry-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: #555;
  margin: 4px 0 0;
  white-space: pre-line;
}

/* Summary text */
.cv-text {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin: 0;
  white-space: pre-line;
}
.cv-objective {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin: 0;
  white-space: pre-line;
}

/* Certification inline badges */
.cv-otw-tag {
  display: inline-block;
  background: #48b775;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 12px;
  letter-spacing: 0.02em;
  margin-top: 8px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .cv-layout {
    grid-template-columns: 1fr;
  }
  .cv-sidebar {
    padding: 28px 20px;
    text-align: center;
  }
  .cv-contact-list {
    align-items: center;
  }
  .cv-main {
    padding: 28px 20px;
  }
  .cv-actions {
    justify-content: center;
  }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  .cv-actions, .cv-completion, .cv-dropdown-menu { display: none !important; }
  .cv-wrap { margin: 0; max-width: 100%; }
  .cv-layout { box-shadow: none; }
  .cv-sidebar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cv-main { padding: 28px 24px; }
  .cv-section-title { border-bottom-color: #1e3a5f; }
  .cv-main { orphans: 1; widows: 1; }

}
