/* Online version of the 2026 CV. Mirrors the PDF's type hierarchy:
   serif (Cambria) for headings, dates and labels, sans (Arial) for body,
   one red accent for rules, dates and stack labels. System fonts only. */

:root {
  --ink: #20252b;      /* name, headings, role titles */
  --text: #30363d;     /* body copy */
  --muted: #6b7280;    /* organisations, meta, tagline */
  --accent: #c62828;   /* rules, dates, labels */
  --paper: #fff;

  --serif: Cambria, Caladea, "Charis SIL", Georgia, "Times New Roman", serif;
  --sans: Arial, "Liberation Sans", Arimo, "Helvetica Neue", Helvetica, sans-serif;

  --date-col: 9.5rem;
  --gap: 1.25rem;
}

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

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.45;
}

.resume {
  max-width: 54rem;
  margin: 0 auto;
  padding: 2.5rem 2rem 3rem;
}

p, ul, dl, dd, h1, h2, h3, address { margin: 0; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgb(198 40 40 / 0.45);
  text-underline-offset: 0.15em;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 1px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 0 0 1.1rem 0.75rem;
  border-bottom: 3px solid var(--accent);
}

.name {
  font-family: var(--serif);
  font-size: 2.15rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}

.role {
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

.tagline {
  margin-top: 0.3rem;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--muted);
}

.contact {
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 0.93rem;
  line-height: 1.5;
}
.contact .sep { margin: 0 0.5em; color: var(--muted); }
.contact a { text-decoration: none; }
.contact a:hover { text-decoration: underline; }

.portrait {
  flex: none;
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- Sections ---------- */

section { margin-top: 1.5rem; }

h2 {
  font-family: var(--serif);
  font-size: 1.07rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 0.3rem;
  margin-bottom: 0.7rem;
  border-bottom: 2px solid var(--accent);
}

/* ---------- Core stack ---------- */

.stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
  row-gap: 0.35rem;
  font-size: 0.93rem;
  line-height: 1.35;
}
.stack dt {
  display: inline;
  margin-right: 0.35em;
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
}
.stack dd { display: inline; }

/* ---------- Dated entries (experience, speaking, education, training) ---------- */

.entry {
  display: grid;
  grid-template-columns: var(--date-col) 1fr;
  column-gap: var(--gap);
  margin-bottom: 0.85rem;
}
.entry--compact { margin-bottom: 0.5rem; }
.entry--continued { margin-top: -0.1rem; }

.entry__date {
  padding-top: 0.15rem;
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.entry h3 {
  font-size: 1.07rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.entry--compact h3 { font-size: 1rem; }

.entry__org { color: var(--muted); font-size: 0.93rem; }
.entry__body > p:not(.entry__org) { font-size: 0.93rem; }

.entry ul {
  margin-top: 0.3rem;
  padding-left: 1.25rem;
  font-size: 0.95rem;
}
.entry li { padding-left: 0.15rem; }
.entry li + li { margin-top: 0.15rem; }

.note { color: var(--muted); font-size: 0.93rem; }

/* Secondary courses: one line each, lighter than full entries. */
.minor-heading {
  margin: 0.7rem 0 0.3rem calc(var(--date-col) + var(--gap));
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
}
.minor-list {
  list-style: none;
  padding: 0;
  font-size: 0.9rem;
}
.minor-list li {
  display: grid;
  grid-template-columns: var(--date-col) 1fr;
  column-gap: var(--gap);
}
.minor-list li + li { margin-top: 0.1rem; }
.minor-list__date {
  font-family: var(--serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  padding-top: 0.1rem;
}
.minor-list__org { color: var(--muted); }

/* ---------- Projects ---------- */

.project { margin-bottom: 0.6rem; }
.project h3 {
  font-size: 1.07rem;
  font-weight: 700;
  color: var(--ink);
}
.project__meta {
  font-family: var(--serif);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.25em;
}
.project__meta [aria-hidden] { margin: 0 0.25em; }
.project p { font-size: 0.95rem; }

#additional + p { font-size: 0.95rem; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  html { font-size: 16px; }

  .resume { padding: 1.5rem 1rem 2.5rem; }

  .masthead {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1rem;
    padding-left: 0;
  }
  .portrait { width: 6.5rem; height: 6.5rem; }
  .name { font-size: 1.75rem; }
  .role { font-size: 1.05rem; }
  .tagline { font-size: 1.02rem; }

  /* One link per line; separators only make sense inline. */
  .contact .sep { display: none; }
  .contact > * { display: block; }
  .contact br { display: none; }
  .contact a { overflow-wrap: anywhere; }

  .stack { grid-template-columns: 1fr; row-gap: 0.5rem; font-size: 0.95rem; }

  .entry { grid-template-columns: 1fr; margin-bottom: 1.1rem; }
  .entry__date { padding-top: 0; }
  .entry--continued .entry__date { display: none; }
  .entry--compact { margin-bottom: 0.75rem; }

  .minor-heading { margin-left: 0; }
  .minor-list li { grid-template-columns: 3rem 1fr; column-gap: 0.5rem; }
  .minor-list li + li { margin-top: 0.35rem; }

  .project__meta { display: block; margin-left: 0; }
  .project__meta [aria-hidden]:first-child { display: none; }
  .project__meta [aria-hidden] { margin: 0 0.25em; }
}

/* ---------- Print / Save as PDF ---------- */

@page {
  size: A4;
  margin: 13mm 15mm 14mm;
}

@media print {
  html { font-size: 9pt; }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .resume { max-width: none; padding: 0; }

  a { text-decoration: none; }

  section { margin-top: 0.9rem; }
  h2 { margin-bottom: 0.5rem; }
  h2 { break-after: avoid; page-break-after: avoid; }

  .entry--compact, .project, .stack > div, .masthead, .entry li,
  .entry:not(:has(li:nth-child(6))) {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  /* Long entries may continue between bullets, but never strand the
     role/organisation header at the bottom of a page. */
  .entry h3, .entry__org {
    break-after: avoid;
    page-break-after: avoid;
  }
  .entry ul { font-size: 0.93rem; }
  .entry li + li { margin-top: 0.05rem; }
  .entry { margin-bottom: 0.6rem; }
  .entry--compact { margin-bottom: 0.35rem; }

  p, li { orphans: 3; widows: 3; }
}
