@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Inter:wght@400;600&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  line-height: 1.55;
  color: #1a1a1a;
  background: #fff;
  margin: 0;
}

#pagebox {
  max-width: 780px;
  margin: 3% auto 10%;
  padding: 0 1.5em;
}

/* --- Headings --- */

h1, h2, h4 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

h1 {
  font-size: 2em;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.2em;
}

h2 {
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 0.4em;
  margin: 2.5em 0 0.9em;
}

h4 {
  font-size: 0.88em;
  font-weight: 400;
  color: #666;
  margin: 0.3em 0 1.8em;
  line-height: 1.6;
}

h4 a {
  text-decoration: none;
  color: #555;
}

h4 a:hover {
  color: #1a1a1a;
  text-decoration: underline;
  text-decoration-color: #bbb;
}

/* --- Text --- */

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0.3em 0 0.8em 1.4em;
  padding: 0;
}

li {
  margin-bottom: 0.4em;
}

mark {
  background: #fff3b0;
  padding: 0 0.1em;
}

/* --- Links --- */

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-color: #bbb;
}

a:hover {
  text-decoration-color: #1a1a1a;
}

/* --- Images --- */

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em 0;
}

/* Headshot */
.headshot {
  margin: 1.5em 0;
}
.headshot img {
  max-width: 260px;
  display: block;
  margin: 0;
}

/* Inline images (email address image) stay inline */
p img {
  display: inline;
  margin: 0;
  vertical-align: middle;
}

/* --- Dividers --- */

hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 0.75em 0;
}

/* --- Blockquotes --- */

#quotebox,
blockquote {
  border-left: 3px solid #d8d8d8;
  margin: 1.5em 0;
  padding: 0.75em 1.25em;
  color: #444;
  font-size: 0.95em;
}

/* --- CV-specific --- */

.pdf-link {
  font-size: 0.88em;
  color: #777;
  margin: 0.1em 0 2.5em;
}

.exp-entry {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 0 1.5em;
  margin-bottom: 1.3em;
}

.exp-date {
  color: #777;
  font-size: 0.85em;
  padding-top: 0.2em;
}

.exp-body strong {
  display: block;
  font-weight: 600;
}

.exp-body > em {
  display: block;
  color: #555;
  font-size: 0.95em;
  margin-bottom: 0.35em;
}

.back {
  margin-top: 2.5em;
  font-size: 0.9em;
}

/* --- Mobile --- */

@media (max-width: 600px) {
  body { font-size: 15px; }
  #pagebox { margin-top: 7%; padding: 0 1.2em; }
  h1 { font-size: 1.7em; }
  .exp-entry { grid-template-columns: 1fr; }
  .exp-date { margin-bottom: 0.2em; color: #999; }
}

/* --- Print (used by build.py --pdf via WeasyPrint) --- */

@media print {
  body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 10.5pt;
    line-height: 1.4;
    color: #000;
  }
  h1, h2, h4 {
    font-family: Helvetica, Arial, sans-serif;
  }
  h2 {
    color: #000;
    page-break-after: avoid;
  }
  #pagebox {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .pdf-link, .back {
    display: none;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  .exp-entry, li {
    page-break-inside: avoid;
  }
}
