/* CV stylesheet — print-first, screen-friendly fallback. The CV is a
   standalone document, not a derivative of the homepage chrome. */

/* ---------------------------------------------------------------- */
/* Variables (mirror site palette but tuned for paper)              */
/* ---------------------------------------------------------------- */

:root {
  --cv-paper:  #ffffff;
  --cv-ink:    #1a1612;
  --cv-soft:   #4a4238;
  --cv-rule:   #d8d2c4;
  --cv-accent: #7d3242;
  --cv-tint:   #f7f4ed;
  --cv-max:    72ch;
}

/* ---------------------------------------------------------------- */
/* Fonts (re-declare here so cv.css is self-sufficient)             */
/* ---------------------------------------------------------------- */

@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/css/crimson_pro.woff2') format('woff2-variations'),
       url('/css/crimson_pro.woff2') format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/css/atkinson_hyperlegible_400.woff2') format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: italic; font-weight: 400; font-display: swap;
  src: url('/css/atkinson_hyperlegible_400i.woff2') format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('/css/atkinson_hyperlegible_700.woff2') format('woff2');
}

/* ---------------------------------------------------------------- */
/* Base                                                             */
/* ---------------------------------------------------------------- */

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--cv-tint);
  color: var(--cv-ink);
  font-family: 'Atkinson Hyperlegible', -apple-system, Segoe UI, Inter, sans-serif;
  font-size: 11pt;
  line-height: 1.45;
}

/* On screen, give the CV a paper-like card; on print, it fills the page. */
.cv {
  max-width: 820px;
  margin: 2rem auto;
  padding: 3rem 3.5rem;
  background: var(--cv-paper);
  border: 1px solid var(--cv-rule);
  box-shadow: 0 6px 24px rgba(125, 50, 66, 0.06);
}

a, a:visited { color: var(--cv-accent); text-decoration-color: rgba(125, 50, 66, 0.4); }
a:hover { text-decoration-color: var(--cv-accent); }

h1, h2, h3 { font-family: 'Crimson Pro', Georgia, serif; font-weight: 500; color: var(--cv-ink); margin: 0; }
strong { font-weight: 700; }
em { font-style: italic; color: var(--cv-soft); }

/* ---------------------------------------------------------------- */
/* Header — name + tagline left, contact block right                */
/* ---------------------------------------------------------------- */

.cv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 2px solid var(--cv-accent);
  padding-bottom: 1.2rem;
  margin-bottom: 1.6rem;
}
.cv-header h1 {
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.cv-headline {
  margin-top: 0.4rem;
  color: var(--cv-accent);
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.cv-contact-block {
  text-align: right;
  font-size: 0.85rem;
  color: var(--cv-soft);
  line-height: 1.55;
}
.cv-contact-block a { color: var(--cv-soft); }
.cv-contact-block a:hover { color: var(--cv-accent); }

/* ---------------------------------------------------------------- */
/* Section headings                                                 */
/* ---------------------------------------------------------------- */

.cv h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cv-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.6rem 0 0.5rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--cv-rule);
}

.cv p { margin: 0 0 0.6rem; }
.cv ul { margin: 0.3rem 0 0.6rem 0; padding-left: 1.2rem; }
.cv li { margin-bottom: 0.25rem; }

/* ---------------------------------------------------------------- */
/* Summary lede                                                     */
/* ---------------------------------------------------------------- */

.cv-lede {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.35;
  color: var(--cv-ink);
  letter-spacing: 0.005em;
  margin-bottom: 0.7rem !important;
}

/* ---------------------------------------------------------------- */
/* Selected Outcomes                                                */
/* ---------------------------------------------------------------- */

.cv-outcomes ul {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
}
.cv-outcomes li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
}
.cv-outcomes li::before {
  content: "▸";
  position: absolute;
  left: 0; top: 0;
  color: var(--cv-accent);
  font-size: 0.85em;
  line-height: 1.65;
}

/* ---------------------------------------------------------------- */
/* Experience entries                                               */
/* ---------------------------------------------------------------- */

.cv-role {
  margin-bottom: 1rem;
  page-break-inside: avoid;
}
.cv-role-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.1rem;
}
.cv-role-head h3 {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}
.cv-role-head h3 a { color: var(--cv-ink); text-decoration: none; }
.cv-role-period {
  font-size: 0.85rem;
  color: var(--cv-soft);
  font-style: italic;
  white-space: nowrap;
  margin: 0 !important;
}
.cv-role-title {
  font-size: 0.95rem;
  margin: 0 0 0.35rem !important;
}
.cv-role-title strong { font-weight: 600; color: var(--cv-ink); }
.cv-role-field { color: var(--cv-soft); font-style: italic; }
.cv-role-summary { margin-bottom: 0.35rem !important; font-size: 0.95rem; }
.cv-role-note { font-size: 0.85rem; color: var(--cv-soft); margin-bottom: 0.4rem !important; }
.cv-role-bullets {
  margin: 0.2rem 0 0.6rem 1.1rem !important;
  padding: 0;
}
.cv-role-bullets li {
  margin-bottom: 0.18rem;
  font-size: 0.94rem;
}

/* ---------------------------------------------------------------- */
/* Earlier roles (compact list)                                     */
/* ---------------------------------------------------------------- */

.cv-earlier-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
}
.cv-earlier-list li {
  padding: 0.12rem 0;
  border-bottom: 1px dotted var(--cv-rule);
}
.cv-earlier-list li:last-child { border-bottom: none; }
.cv-earlier-period {
  display: inline-block;
  width: 6.4em;
  color: var(--cv-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- */
/* Open-source, publications, patents, education, languages         */
/* ---------------------------------------------------------------- */

.cv-project-list,
.cv-publication-list,
.cv-patent-list,
.cv-education-list,
.cv-language-list {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0;
}
.cv-project-list li,
.cv-publication-list li,
.cv-patent-list li,
.cv-education-list li {
  padding: 0.25rem 0;
  font-size: 0.92rem;
  border-bottom: 1px dotted var(--cv-rule);
}
.cv-project-list li:last-child,
.cv-publication-list li:last-child,
.cv-patent-list li:last-child,
.cv-education-list li:last-child { border-bottom: none; }

.cv-language-list { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 0.92rem; }
.cv-language-list li { padding: 0; border: none; }

/* ---------------------------------------------------------------- */
/* Skills (compact tail)                                            */
/* ---------------------------------------------------------------- */

.cv-skill-line {
  font-size: 0.86rem;
  color: var(--cv-soft);
  line-height: 1.6;
  margin: 0.4rem 0 0 !important;
}

/* ---------------------------------------------------------------- */
/* Footer                                                           */
/* ---------------------------------------------------------------- */

.cv-foot {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cv-rule);
  font-size: 0.78rem;
  color: var(--cv-soft);
  text-align: center;
}

/* ---------------------------------------------------------------- */
/* Print                                                            */
/* ---------------------------------------------------------------- */

@page {
  size: Letter;
  margin: 0.6in 0.7in;
}

@media print {
  html, body { background: white; font-size: 10.5pt; }
  .cv {
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
  }
  /* Section headings should never sit alone at the bottom of a page. */
  .cv h2 { page-break-after: avoid; }
  .cv-role { page-break-inside: avoid; }
  .cv-summary, .cv-outcomes { page-break-after: auto; }
  /* Inline URLs after links — but only outside the contact block,
     where the address itself is already explicit. */
  .cv-experience a[href^="http"]::after,
  .cv-projects a[href^="http"]::after,
  .cv-publications a[href^="http"]::after,
  .cv-patents a[href^="http"]::after {
    content: " ⟨" attr(href) "⟩";
    font-size: 0.78em;
    color: var(--cv-soft);
    word-break: break-all;
  }
  /* Footer is meta — drop in print. */
  .cv-foot { display: none; }
}
