/* LaTeX-inspired CV styling optimized for printing */

@page {
  size: letter;
  margin: 0.75in;
}

body {
  font-family: 'Linux Libertine', 'Times New Roman', serif;
  font-size: 11pt;
  line-height: 1.4;
  color: #000;
  background: white;
  margin: 0;
  padding: 0;
}

#main {
  max-width: none;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

/* Typography for print */
h1 {
  font-size: 20pt;
  font-weight: normal;
  margin-bottom: 4pt;
  text-align: center;
  color: #000;
  page-break-after: avoid;
}

h1 + p {
  text-align: center;
  font-size: 12pt;
  color: #444;
  margin-bottom: 18pt;
  font-style: italic;
  page-break-after: avoid;
}

h2 {
  font-size: 13pt;
  font-weight: bold;
  color: #000;
  margin: 18pt 0 8pt 0;
  padding-bottom: 2pt;
  border-bottom: 0.5pt solid #333;
  text-transform: uppercase;
  letter-spacing: 0.5pt;
  page-break-after: avoid;
}

h2:first-of-type {
  margin-top: 12pt;
}

h3 {
  font-size: 12pt;
  font-weight: bold;
  color: #000;
  margin: 12pt 0 4pt 0;
  page-break-after: avoid;
}

h4 {
  font-size: 11pt;
  font-weight: bold;
  color: #000;
  margin: 8pt 0 2pt 0;
  page-break-after: avoid;
}

p, li {
  margin-bottom: 4pt;
}

/* Contact information */
#webaddress {
  text-align: center;
  margin-bottom: 18pt;
  font-size: 10pt;
}

#webaddress a {
  color: #000;
  text-decoration: none;
}

/* Lists */
ul {
  margin: 4pt 0 8pt 18pt;
}

li {
  margin-bottom: 2pt;
  line-height: 1.3;
}

/* Professional Experience */
h3 + p em {
  float: right;
  font-style: italic;
  font-weight: normal;
  color: #444;
}

/* Skills and other sections */
p strong {
  font-weight: bold;
  color: #000;
}

/* Links - show URLs in print */
a:after {
  content: "";
}

/* Avoid breaking inside important elements */
h2, h3, h4 {
  page-break-inside: avoid;
}

ul, ol {
  page-break-inside: avoid;
}

/* Keep job entries together */
h3 + p + ul {
  page-break-before: avoid;
}

/* Prevent widows and orphans */
p, li {
  orphans: 2;
  widows: 2;
}

/* Remove box shadows and backgrounds */
* {
  background: transparent !important;
  box-shadow: none !important;
}

/* Optimize spacing for print */
h2 + p,
h2 + h3,
h2 + ul {
  margin-top: 6pt;
}

h2:not(:first-of-type) {
  margin-top: 20pt;
}

/* Clean up job entry formatting */
h3 + p {
  overflow: hidden;
  margin-bottom: 2pt;
}

h3 + p:after {
  content: '';
  display: table;
  clear: both;
}

/* Ensure good contrast */
body, h1, h2, h3, h4, p, li {
  color: #000 !important;
}

/* Remove any screen-only elements */
@media print {
  .no-print {
    display: none !important;
  }
}