:root {
  --paper: #f6f6f4;
  --ink: #15171a;
  --soft: #5b6068;
  --rule: #d6d8dc;
  --accent: #1f3f8f;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121417;
    --ink: #e8eaed;
    --soft: #9aa0a8;
    --rule: #2b2f35;
    --accent: #8fb0ff;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--paper); }

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Small uppercase labels */
.masthead,
.colophon,
h2,
.role-line,
.skills {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.years, .aside {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
}

/* Masthead: a thin printed header with a heavy rule under it */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 22px 0 12px;
  border-bottom: 3px solid var(--ink);
}
.masthead-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.masthead-links a { text-decoration: none; color: var(--soft); }
.masthead-links a:hover { color: var(--accent); }

/* Intro */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "name photo"
    "statement photo";
  column-gap: 56px;
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--rule);
}
.intro > * { min-width: 0; }
h1 {
  grid-area: name;
  margin: 0;
  font-size: clamp(3rem, 8vw, 5.8rem);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.03em;
}

.photo { grid-area: photo; margin: 0; align-self: start; }
.photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  transform: scaleX(-1); /* mirrored, so he faces the text */
}

.statement { grid-area: statement; align-self: end; max-width: 30rem; margin-top: 48px; }
.statement p { margin: 0 0 16px; }
.statement p:not(.role-line):not(.skills) { font-size: 1.2rem; line-height: 1.55; }
.role-line { color: var(--accent); }
.contact { margin-top: 8px !important; }
.contact-link {
  display: inline-block;
  padding: 11px 18px;
  font-weight: 500;
  text-decoration: none;
  color: var(--paper);
  background: var(--accent);
  border-radius: 4px;
}
.contact-link:hover { color: var(--paper); filter: brightness(1.12); }
.skills { color: var(--soft); padding-top: 14px; border-top: 1px solid var(--rule); margin-top: 24px !important; }

/* Sections: label on the left, ledger on the right */
.block {
  display: grid;
  grid-template-columns: 220px 1fr;
  column-gap: 56px;
  padding: 56px 0;
  border-bottom: 1px solid var(--rule);
}
.block > * { min-width: 0; }
h2 { margin: 6px 0 24px; color: var(--soft); }

.ledger { list-style: none; margin: 0; padding: 0; }
.ledger > li {
  display: grid;
  grid-template-columns: 150px 1fr;
  column-gap: 32px;
  padding: 22px 0 24px;
  border-top: 1px solid var(--rule);
}
.ledger > li:first-child { border-top: 0; padding-top: 0; }
.ledger > li > div { min-width: 0; }
.years {
  padding-top: 5px;
  color: var(--soft);
}
.now { color: var(--accent); }
h3 {
  margin: 0 0 2px;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.pos { margin: 2px 0 0; color: var(--soft); }
.aside { margin-left: 8px; }
.note { margin: 10px 0 0; max-width: 36rem; }
.is-current h3::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 12px;
  vertical-align: 4px;
  background: var(--accent);
}

/* Colophon */
.colophon {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 0 56px;
  color: var(--soft);
}

/* Narrow screens */
@media (max-width: 860px) {
  .intro {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "photo" "statement";
    padding: 40px 0 48px;
  }
  .photo { margin-top: 32px; max-width: 420px; }
  .statement { margin-top: 32px; }
  .block { grid-template-columns: 1fr; padding: 40px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .masthead-name { display: none; }
  .ledger > li { grid-template-columns: 1fr; }
  .years { padding: 0 0 6px; }
  h3 { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
