:root {
  color-scheme: light;
  --ink: #141413;
  --muted: #5b5955;
  --soft: #c9c6bf;
  --accent: #e8a33d;
  --link: #8f5a0c;
  --link-hover: #5c3a06;
  --paper: #ffffff;
  --rule: #e6e3dd;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 'Archivo', system-ui, -apple-system, sans-serif;
}

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

code { font-family: var(--mono); font-size: 0.9em; }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Masthead: name and title on the left, contact on the right, as on the printed resume. */
.masthead {
  background: var(--ink);
  color: #ffffff;
  padding: 56px 0 40px;
}

.masthead .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 32px;
}

.masthead h1 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.masthead .title {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  max-width: 360px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.masthead .contact {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  color: var(--soft);
  font: 14px/1.6 var(--mono);
  text-align: right;
}

.masthead .contact a { color: #ffffff; }

main { padding-top: 40px; padding-bottom: 24px; }

.summary {
  margin: 0 0 48px;
  font-size: 18px;
  text-wrap: pretty;
}

section { margin-bottom: 48px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  font: 500 13px/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title::before {
  content: "";
  flex: none;
  width: 24px;
  height: 3px;
  background: var(--accent);
}

/* One job per article, with a thin rule between them. */
.job { padding: 24px 0; border-top: 1px solid var(--rule); }
.job:first-of-type { padding-top: 0; border-top: 0; }

.job-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 24px;
  margin-bottom: 12px;
}

.job-name {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.job-name img {
  flex: none;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.job-role { font-weight: 400; color: var(--muted); }

.job-meta {
  margin: 0;
  color: var(--muted);
  font: 14px/1.5 var(--mono);
  white-space: nowrap;
}

.points {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li { position: relative; padding-left: 24px; }

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 12px;
  height: 3px;
  background: var(--accent);
}

/* Earlier career: years in a narrow column beside each role. */
.earlier {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.earlier li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 2px 24px;
  align-items: baseline;
}

.earlier p { margin: 0; }

.years, .muted { color: var(--muted); }
.years { font: 14px/1.5 var(--mono); }

.facts {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px 24px;
  margin: 0;
}

.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: 13px/1.5 var(--mono);
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .masthead { padding: 40px 0 32px; }
  .masthead .wrap { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .masthead h1, .masthead .title, .masthead .contact { grid-column: 1; grid-row: auto; }
  .masthead .contact { text-align: left; }
  .summary { font-size: 17px; }
  .job-meta { white-space: normal; }
  .earlier li, .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dd { margin-bottom: 8px; }
}
