/* ------------------------------------------------------------------
   CV stylesheet — reproduces the layout of the Word source document.

   Unit convention: 1rem = the Word document's 10 pt body text.
   All sizes and indents are in rem, so the layout keeps the same
   proportions (and roughly the same line breaks) at any base size.
     --q  = 0.25 in at 10 pt  (Word's indent step)
     page width 54rem = 7.5 in text block (8.5 in page, 0.5 in margins)
   ------------------------------------------------------------------ */

:root {
  color-scheme: light;
  --q: 1.8rem;            /* 0.25 in */
  --ink: #000;
  --rule: #808080;        /* Word section-title border colour */
  --link: #0563c1;        /* Word default hyperlink colour */
  --lh: 1.22;             /* Calibri single line spacing */
}

html {
  font-size: 15px;        /* screen: slightly larger than 10 pt for legibility */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Calibri Light", "Calibri", "Carlito", "Lato", "Segoe UI", sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: var(--lh);
}

.page {
  max-width: 54rem;
  margin: 0 auto;
  padding: 3.6rem 3.6rem 4rem;   /* 0.5 in */
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul.plain, ul.items { list-style: none; padding: 0; }
b, strong, h1, h2, h3, dt { font-weight: 700; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 0.12em; }
a { overflow-wrap: anywhere; }

/* ---------- Masthead ---------- */
.masthead h1 {
  font-size: 2.8rem;               /* 28 pt */
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 0.6rem;           /* Word: 6 pt after */
}
.contact { margin-bottom: 1.4rem; }
.contact a { color: inherit; text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* ---------- Section titles ---------- */
h2 {
  font-size: 1.4rem;               /* 14 pt */
  text-transform: uppercase;
  letter-spacing: 0.054em;         /* Word: 0.75 pt expanded */
  line-height: 1.15;
  border-bottom: 0.75pt solid var(--rule);
  padding-bottom: 1pt;
  margin: 2.2rem 0 0.15rem;
  break-after: avoid;
}
section:first-of-type h2 { margin-top: 0.6rem; }

/* Content column is inset 0.25 in from the section rule */
.body { padding-left: var(--q); }

/* ---------- Education ---------- */
.edu h3, .group h3 {
  font-size: 1.1rem;               /* 11 pt */
  break-after: avoid;
}
.l1 { padding-left: calc(2 * var(--q)); }                       /* 0.5 in */
.l1.hang-sm { padding-left: calc(3 * var(--q)); text-indent: calc(-1 * var(--q)); }  /* first 0.5, wrap 0.75 */
.l1.hang-lg { padding-left: calc(4 * var(--q)); text-indent: calc(-2 * var(--q)); }  /* first 0.5, wrap 1.0 */

/* ---------- Publications, talks, posters, patents, job bullets ---------- */
.group + .group { margin-top: 1.22rem; }
ul.items li {                       /* first line 0.25 in, wrap 0.75 in */
  padding-left: calc(3 * var(--q));
  text-indent: calc(-2 * var(--q));
  break-inside: avoid;
}

/* ---------- Research experience ---------- */
.job + .job { margin-top: 1.3rem; }
.job .org {
  font-size: 1.2rem;               /* 12 pt */
  break-after: avoid;
}
.job .org .loc { font-size: 0.8333em; }   /* 10 pt */
.job .role {
  font-weight: 700;
  font-style: italic;
  break-after: avoid;
}

/* ---------- Skills ---------- */
.skills {
  padding-left: var(--q);
  max-width: calc(34.6rem + var(--q));   /* Word column width 4.8 in */
}
.skills > div { margin-bottom: 1.1rem; }
.skills dt { display: inline; }
.skills dd { display: inline; }

/* ---------- Narrow screens ---------- */
@media (max-width: 640px) {
  :root { --q: 0.9rem; }
  html { font-size: 15px; }
  .page { padding: 1.5rem 16px 2.5rem; }
  .masthead h1 { font-size: 2rem; }
  h2 { font-size: 1.25rem; }
  .skills { max-width: none; }
}

/* ---------- Print: US Letter, 0.5 in margins, 10 pt body ---------- */
@page { size: letter; margin: 0.5in; }
@media print {
  html { font-size: 10pt; }
  .page { max-width: none; padding: 0; }
  a { color: var(--link); }
  .job .org, .job .role, .edu h3, .group h3 { break-after: avoid; page-break-after: avoid; }
  ul.items li { page-break-inside: avoid; }
}
