/* ==========================================================================
   CV TEMPLATE - FAITHFUL TO CV.PDF DESIGN
   Independent Vanilla CSS for CV Document & Printing (A4)
   ========================================================================== */

:root {
  --cv-sidebar-bg: #23344a;
  --cv-sidebar-text: #ffffff;
  --cv-sidebar-muted: #cbd5e1;
  --cv-sidebar-icon: #ffffff;
  
  --cv-name-color: #1f3653;
  --cv-accent-color: #2ca9db;
  --cv-heading-color: #2ca9db;
  --cv-text-dark: #334155;
  --cv-text-muted: #64748b;
  --cv-bullet-color: #23344a;
}

/* ==========================================================================
   CV PAPER CONTAINER (A4 Simulation)
   ========================================================================== */

.cv-paper {
  width: 210mm;
  min-height: 297mm;
  max-width: 210mm;
  background-color: #ffffff;
  display: grid;
  grid-template-columns: 78mm 1fr;
  box-sizing: border-box;
  position: relative;
  font-family: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--cv-text-dark);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   LEFT SIDEBAR (Navy Dark)
   ========================================================================== */

.cv-sidebar {
  background-color: var(--cv-sidebar-bg);
  color: var(--cv-sidebar-text);
  padding: 36px 24px 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-sizing: border-box;
}

/* Profile Avatar */
.cv-avatar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.cv-avatar-frame {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.2);
  background-color: #334760;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.cv-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 15%;
  display: block;
}

/* Sidebar Section Headings */
.cv-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cv-sidebar-heading {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 6px;
  margin-bottom: 2px;
}

/* Contact List */
.cv-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cv-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--cv-sidebar-muted);
  word-break: break-word;
}

.cv-contact-icon {
  width: 20px;
  flex-shrink: 0;
  color: #ffffff;
  font-size: 13px;
  text-align: center;
  margin-top: 1px;
}

.cv-contact-text {
  color: #ffffff;
}

/* Skills List */
.cv-skills-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cv-skill-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #ffffff;
}

.cv-skill-bullet {
  width: 5px;
  height: 5px;
  background-color: #38bdf8;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

/* Education in Sidebar */
.cv-edu-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cv-edu-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-edu-school-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cv-edu-icon {
  color: #38bdf8;
  font-size: 12px;
  margin-top: 2px;
  flex-shrink: 0;
}

.cv-edu-school-name {
  font-weight: 700;
  font-size: 12px;
  color: #ffffff;
  line-height: 1.35;
}

.cv-edu-period {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.cv-edu-major {
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cv-edu-major::before {
  content: "•";
  color: #38bdf8;
}

.cv-edu-desc {
  font-size: 11px;
  color: var(--cv-sidebar-muted);
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding-left: 4px;
}

.cv-edu-desc::before {
  content: "•";
  color: #94a3b8;
}

/* ==========================================================================
   RIGHT MAIN CONTENT AREA (Clean White)
   ========================================================================== */

.cv-main {
  background-color: #ffffff;
  padding: 40px 32px 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-sizing: border-box;
}

/* Candidate Name & Title Header */
.cv-header-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 14px;
}

.cv-candidate-name {
  font-size: 26px;
  font-weight: 800;
  color: var(--cv-name-color);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.cv-candidate-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--cv-accent-color);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Main Section Heading */
.cv-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cv-section-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--cv-heading-color);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

/* Section 1: Summary / Introduction */
.cv-summary-text {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--cv-text-dark);
  text-align: justify;
}

/* Section 2: Work Experiences */
.cv-exp-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cv-exp-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-exp-position {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

.cv-exp-company-period {
  font-size: 12px;
  color: var(--cv-text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.cv-exp-tasks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-exp-task-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--cv-text-dark);
}

.cv-exp-task-bullet {
  width: 4.5px;
  height: 4.5px;
  background-color: var(--cv-bullet-color);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6.5px;
}

/* ==========================================================================
   PRINT STYLESHEET (@media print for Perfect A4 PDF Export)
   ========================================================================== */

@media print {
  html, body {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide all UI elements */
  .app-header,
  .editor-pane,
  .preview-toolbar,
  .toast-container,
  .modal-overlay,
  .view-tabs-mobile {
    display: none !important;
  }

  .app-container {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  .preview-pane {
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    display: block !important;
  }

  .preview-paper-wrapper {
    box-shadow: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .cv-paper {
    width: 210mm !important;
    height: 297mm !important;
    max-height: 297mm !important;
    box-shadow: none !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }

  @page {
    size: A4 portrait;
    margin: 0;
  }
}
