@font-face {
  font-family: "Source Sans 3";
  font-weight: 400 600;
  font-display: swap;
  src: url(source-sans-3.woff2) format("woff2");
}

@font-face {
  font-family: "Source Code Pro";
  font-weight: 400 600;
  font-display: swap;
  src: url(source-code-pro.woff2) format("woff2");
}

:root {
  color-scheme: light dark;
  interpolate-size: allow-keywords;
  --bg: #f8f6f1;
  --fg: #403d38;
  --accent: #8a5a2b;
  --muted: color-mix(in srgb, var(--fg) 75%, var(--bg));
  --soft: color-mix(in srgb, var(--fg) 82%, var(--bg));
  --rule: color-mix(in srgb, var(--fg) 13%, transparent);
  --mono: "Source Code Pro", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #26252a;
    --fg: #bdb7ad;
    --accent: #c9985e;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--fg);
  font: 17.5px/1.8 "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: underline 1px color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 3px;
  transition: color .18s, text-decoration-color .18s, border-color .18s, background-color .18s;
}

a:hover {
  text-decoration-color: var(--accent);
}

p {
  margin: 0 0 20px;
}

h1, h2, h3, nav, summary, .meta, .links, .btn, .stats b {
  font-family: var(--mono);
}

.muted {
  color: var(--muted);
}

nav {
  position: fixed;
  inset: 0 0 auto;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 1;
}

nav div {
  max-width: 680px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  font-size: 12.5px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav div > a:first-child {
  color: var(--fg);
}

nav .accent {
  color: var(--accent);
  font-weight: 500;
}

nav .right {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 141px 24px 96px;
}

header {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 72px;
}

header > div {
  flex: 1 1 400px;
}

header img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}

h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px;
}

header p {
  margin: 0 0 8px;
}

.links {
  font-size: 13px;
}

.btn {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.btn small {
  font-size: inherit;
  font-weight: 400;
}

.intro {
  margin-bottom: 64px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 24px 0;
  margin-bottom: 128px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stats div {
  padding: 0 20px;
}

.stats div:first-child {
  padding-left: 0;
}

.stats div:last-child {
  padding-right: 0;
}

.stats div + div {
  border-left: 1px solid var(--rule);
}

.stats b {
  display: block;
  font-size: 21px;
  font-weight: 600;
}

.stats span {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

section {
  margin-bottom: 128px;
  scroll-margin-top: 72px;
}

h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 36px;
}

#home h2::before {
  content: "## ";
}

article + article {
  margin-top: 64px;
}

h3 {
  font-size: 15.5px;
  font-weight: 600;
  margin: 0 0 6px;
}

h3 span {
  font-weight: 400;
  color: var(--muted);
}

.meta {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}

article p {
  margin-bottom: 12px;
}

.note {
  font-size: 14.5px;
  color: var(--muted);
}

details {
  margin: 0 0 16px;
  font-size: 14.5px;
  color: var(--soft);
}

summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  transition: color .18s;
}

summary:hover {
  color: var(--accent);
}

details::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size .32s, content-visibility .32s allow-discrete;
}

details[open]::details-content {
  block-size: auto;
}

details > :nth-child(2) {
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 16px;
  font-size: 14.5px;
}

th, td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--rule);
}

th {
  padding-top: 0;
  font: 500 12px var(--mono);
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}

tr:last-child td {
  border: 0;
}

td:first-child {
  font: 13.5px var(--mono);
}

ul {
  margin: 0;
  padding-left: 20px;
}

li + li {
  margin-top: 6px;
}

footer {
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

footer p {
  margin-bottom: 8px;
}

footer .links + p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

#cv main {
  font-size: 15.5px;
  line-height: 1.65;
}

#cv header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  font-size: 17.5px;
  line-height: 1.8;
}

#cv header p {
  margin-bottom: 8px;
}

.print {
  display: none;
}

#cv section {
  margin: 0;
}

#cv h2 {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 48px 0 24px;
}

#cv section:first-of-type h2 {
  margin-top: 0;
}

#cv p {
  margin-bottom: 12px;
}

#cv article {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin: 0 0 28px;
}

#cv article > span {
  flex: 0 0 132px;
  padding-top: 3px;
  font: 12.5px/1.7 var(--mono);
  color: var(--muted);
}

#cv article > div {
  flex: 1 1 380px;
  min-width: 0;
}

#cv h3 {
  font: 600 16px/1.4 "Source Sans 3", sans-serif;
  margin-bottom: 4px;
}

#cv .meta {
  margin-bottom: 10px;
  font-size: 12.5px;
  line-height: 1.6;
}

#cv article p {
  margin-bottom: 10px;
}

#cv footer {
  margin-top: 64px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font: 12.5px var(--mono);
}

#cv footer a:first-child {
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 540px) {
  .stats {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .stats div {
    padding: 16px 0;
  }

  .stats div + div {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  section {
    scroll-margin-top: 112px;
  }
}

@media print {
  @page {
    margin: 14mm 0;
  }

  :root {
    --bg: #fff;
    --fg: #141414;
    --accent: #245062;
  }

  nav, .btn, #cv footer {
    display: none;
  }

  #cv main {
    max-width: none;
    padding: 0 16mm;
    font-size: 11pt;
    line-height: 1.5;
  }

  #cv header {
    margin-bottom: 26px;
    padding-bottom: 18px;
  }

  #cv h1 {
    font-size: 20pt;
  }

  #cv h2 {
    font-size: 10pt;
    margin: 26px 0 14px;
  }

  #cv h3 {
    font-size: 11.5pt;
  }

  #cv .links, #cv .meta, #cv article > span {
    font-size: 9pt;
  }

  #cv header .links {
    margin: 0;
    color: var(--muted);
  }

  .print {
    display: block;
  }

  #cv article {
    margin-bottom: 18px;
  }

  h2, h3 {
    break-after: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  .keep {
    break-inside: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .url::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }
}
