/* Text justification for CV content */
p, li, div {
  text-align: justify;
  text-justify: inter-word;
}

/* Reduce space around headers and bullet points */
h1 {
  margin-top: 0.3rem;
  margin-bottom: 0.0rem;
}

h2 {
  margin-top: 0.2rem;
  margin-bottom: 0.0rem;
  padding-left: 0.8rem;
}

/*the h3 level is used for the publications*/
.publications, h3 {
  margin-top: 0.2rem !important;
  margin-bottom: 0.0rem !important;
}

/* Remove extra spacing from nested lists */
ul ul, ol ul, ul ol, ol ol, ul li {
  margin-top: 0.0rem;
  margin-bottom: 0.0rem;
  padding-top: 0.0rem;
  padding-bottom: 0.0rem;
}

/* CV Header - compact info section */
.cv-header {
  margin-bottom: 1.5rem;
}

.cv-header h1 {
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #333;
  padding-bottom: 0.3rem;
}

.cv-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cv-info-item {
  white-space: nowrap;
}

.cv-info-item strong {
  margin-right: 0.3rem;
}



/* Print-specific styles - remove backgrounds to save ink */
@media print {
  body, html, .page, .page__content, .masthead, .sidebar, * {
    background: white !important;
    background-color: white !important;
  }

  /* Hide elements you don't want in print */
  .masthead, .page__footer, .sidebar, .no-print {
    display: none !important;
  }

  /* Reduce top margin/padding to minimize wasted space */
  body, html {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .page, .page__content {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Force light mode colors for all elements */
  body, html, .page, .page__content, .masthead, .sidebar, * {
    background: white !important;
    background-color: white !important;
    color: black !important;
  }

  /* Force light mode for links */
  a, a:link, a:visited {
    color: black !important;
    text-decoration: none;
  }

  /* Override any dark mode specific elements */
  h1, h2, h3, h4, h5, h6 {
    color: #222 !important;
  }

  /* Force code blocks and pre to light mode */
  code, pre {
    background-color: #f5f5f5 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
  }

  /* Force any other text elements */
  p, li, span, div {
    color: black !important;
  }

  /* Hide elements you don't want in print */
  .masthead, .page__footer, .sidebar, .no-print {
    display: none !important;
  }

  /* For print: ensure it stays compact */
  .cv-header h1 {
    border-bottom: 1px solid #000;
  }

  .cv-info {
    font-size: 0.85rem;
  }

  /* Keep list items and paragraphs together when possible */
  p, li {
    page-break-inside: avoid;
    orphans: 3;
    widows: 3;
  }

  /* Remove bottom padding/margin that might cause overflow */
  body, html, .page, .page__content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
}


