/* CV Print-Optimized Styles */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 11pt;
  line-height: 1.4;
  color: #222;
  background: #f5f5f5;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* === CONTAINER === */
.cv-container {
  max-width: 210mm;
  margin: 20px auto;
  padding: 15mm;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* === ACTIONS BAR === */
.cv-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.print-btn {
  background: #0066cc;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.print-btn:hover {
  background: #0052a3;
}

.back-link {
  color: #666;
}

/* === HEADER === */
.cv-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #222;
}

.cv-header h1 {
  font-size: 24pt;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #111;
}

.cv-header .cv-title {
  font-size: 12pt;
  color: #555;
  margin-bottom: 0.5rem;
}

.cv-contact {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 10pt;
  color: #444;
}

.cv-contact a {
  color: #444;
}

.cv-contact span::before {
  content: " | ";
  color: #ccc;
  margin-right: 0.5rem;
}

.cv-contact span:first-child::before {
  content: "";
  margin: 0;
}

/* === SECTIONS === */
.cv-section {
  margin-bottom: 1.25rem;
}

.cv-section h2 {
  font-size: 13pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #111;
  border-bottom: 1px solid #333;
  padding-bottom: 0.25rem;
  margin-bottom: 0.75rem;
}

/* === JOB / EDUCATION ENTRIES === */
.cv-entry {
  margin-bottom: 0.75rem;
  page-break-inside: avoid;
}

.cv-entry-employer {
  font-weight: 700;
  font-size: 11pt;
  margin-bottom: 0.25rem;
}

.cv-entry-employer a {
  color: #222;
}

.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cv-entry-title {
  font-weight: 600;
  font-size: 11pt;
}

.cv-entry-org {
  color: #444;
}

.cv-entry-org a {
  color: #444;
}

.cv-entry-dates {
  font-size: 10pt;
  color: #666;
  white-space: nowrap;
}

.cv-entry-description {
  font-size: 10pt;
  color: #444;
  margin-top: 0.25rem;
  margin-left: 0;
}

.cv-entry-description p {
  margin: 0.15rem 0;
}

/* === PUBLICATIONS === */
.cv-pub {
  margin-bottom: 0.5rem;
  page-break-inside: avoid;
}

.cv-pub-title {
  font-weight: 600;
  font-size: 10pt;
}

.cv-pub-authors {
  font-size: 9pt;
  color: #555;
  font-style: italic;
}

.cv-pub-venue {
  font-size: 9pt;
  color: #666;
}

/* === PRINT STYLES === */
@page {
  size: A4;
  margin: 10mm 15mm;
}

@media print {
  html,
  body {
    width: 210mm;
    height: 297mm;
  }

  body {
    background: #fff;
    font-size: 10pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .cv-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  .no-print {
    display: none !important;
  }

  a {
    color: #222;
  }

  /* Show URLs after links */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #666;
    word-break: break-all;
  }

  /* But not for email/simple links */
  a[href^="mailto"]::after,
  .cv-contact a::after {
    content: "";
  }

  .cv-header {
    margin-bottom: 1rem;
  }

  .cv-section {
    margin-bottom: 1rem;
  }

  .cv-entry {
    margin-bottom: 0.5rem;
  }

  /* Page break controls - only avoid breaks within individual entries */
  h2 {
    page-break-after: avoid;
  }

  .cv-entry,
  .cv-pub {
    page-break-inside: avoid;
  }
}

/* === RESPONSIVE === */
@media screen and (max-width: 600px) {
  .cv-container {
    margin: 10px;
    padding: 5mm;
  }

  .cv-entry-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .cv-contact {
    flex-direction: column;
    gap: 0.25rem;
  }

  .cv-contact span::before {
    content: "";
    margin: 0;
  }
}
