@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-VF.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
:root {
  --ink: #1b2430;
  --muted: #5a6572;
  --accent: #4b2873;
  --accent-soft: #efe9f7;
  --rule: #cfd8dc;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.5 "Source Sans 3", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
}
.wrap { max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; }

.masthead { background: var(--accent); color: #fff; padding: 2rem 0 1.5rem; }
.masthead h1 { margin: 0; font-size: 2.4rem; font-weight: 700; letter-spacing: .01em; line-height: 1.1; }
.masthead .headline { margin: .25rem 0 .9rem; font-size: 1.35rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .95; }
.masthead .contact { margin: 0; font-size: .95rem; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.masthead .c { display: inline-flex; align-items: center; gap: .4rem; }
.masthead .c .i { opacity: .85; }
.masthead a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.i { width: .9em; height: .9em; flex: none; vertical-align: -.1em; }
h2 .i { width: 1em; height: 1em; margin-right: .45rem; vertical-align: -.14em; }
.job .sub:first-of-type { margin-top: .5rem; }

main { padding-top: 1.25rem; padding-bottom: 2.5rem; }
section { margin-top: 1.5rem; }
h2 {
  margin: 0 0 .6rem; padding-bottom: .25rem;
  font-size: 1.15rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); border-bottom: 1px solid var(--accent);
}
h3 { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 700; }
/* Experience timeline: dates in a left column, role and content on the right */
.job { display: grid; grid-template-columns: 9.5rem 1fr; column-gap: 1.1rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.job:first-of-type { margin-top: .6rem; padding-top: 0; border-top: 0; }
.job .when { margin: .1rem 0 0; padding-right: .9rem; text-align: right; color: var(--muted); font-weight: 600; font-size: .95rem; border-right: 2px solid var(--accent-soft); position: relative; }
.job .when::after { content: ""; position: absolute; right: -6px; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.job:first-of-type .when::after { box-shadow: 0 0 0 3px var(--accent-soft); }
.job .body { min-width: 0; }
p { margin: 0 0 .5rem; }
.sub { margin: .6rem 0 .2rem; font-weight: 600; }
ul { margin: 0 0 .25rem; padding-left: 1.15rem; }
li { margin-bottom: .3rem; }
li > ul { margin-top: .3rem; }
li::marker { color: var(--accent); }
strong { font-weight: 700; }
.n { font-weight: 650; color: var(--accent); }
a { color: var(--accent); }

@media (max-width: 520px) {
  .masthead h1 { font-size: 1.9rem; }
}
@media (max-width: 640px) {
  .job { display: block; }
  .job .when { text-align: left; border-right: 0; padding-right: 0; margin: 0 0 .1rem; }
  .job .when::after { display: none; }
}

@page { size: A4; margin: 8mm 12mm; }
@media print {
  body { font-size: 9.3pt; line-height: 1.25; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wrap { max-width: none; padding: 0; }
  .masthead { padding: 5mm 6mm 4mm; margin: 0; }
  .masthead .wrap { padding: 0; }
  .masthead h1 { font-size: 24pt; }
  .masthead .headline { font-size: 12.5pt; margin: 1mm 0 2.5mm; }
  .masthead .contact { font-size: 9pt; gap: 1mm 5mm; }
  main { padding: 0; }
  section { margin-top: 3mm; }
  h2 { font-size: 10.5pt; break-after: avoid; }
  h3 { font-size: 10pt; break-after: avoid; }
  .job { margin-top: 1.8mm; padding-top: 1.5mm; grid-template-columns: 28mm 1fr; column-gap: 2.5mm; }
  .job:first-of-type { margin-top: 1mm; padding-top: 0; }
  .job .when { font-size: 8pt; padding-right: 2.5mm; white-space: nowrap; }
  .job .when::after { width: 7px; height: 7px; right: -5px; }
  li, p { margin-bottom: .5mm; }
  li { break-inside: avoid; }
  /* a long bullet that carries its own sub-list may break across pages so the
     job header above it is not left orphaned; the sub-bullets stay intact */
  li:has(ul) { break-inside: auto; }
  a { color: inherit; text-decoration: none; }
  .masthead a { color: #fff; }
}

/* two-column block (personal projects) */
.cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.6rem; margin-top: .6rem; }
.cols > div { min-width: 0; }
.cols .role { margin-top: 0; }
@media (max-width: 640px) { .cols { grid-template-columns: 1fr; row-gap: .8rem; } }

.masthead .contact + .contact { margin-top: .3rem; }
