:root {
  color-scheme: light;
  --background: #f6f8fa;
  --ink: #152237;
  --muted: #47566a;
  --accent: #235685;
  --rule: #d4dce5;
  --surface: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--background);
}

@supports (color: light-dark(white, black)) {
  :root {
    color-scheme: light dark;
    --background: light-dark(#f6f8fa, #10161f);
    --ink: light-dark(#152237, #edf3fc);
    --muted: light-dark(#47566a, #b0bfd1);
    --accent: light-dark(#235685, #9ecbfa);
    --rule: light-dark(#d4dce5, #344256);
    --surface: light-dark(#fff, #172231);
  }

  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"] { color-scheme: dark; }
}

* { box-sizing: border-box; }
body { margin: 0; }
p, h1, h2, h3 { margin: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: .075em;
  text-underline-offset: .22em;
}

a:hover { text-decoration-thickness: .14em; }

:is(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.wrap {
  width: min(58rem, 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1;
  inset: 1rem auto auto 1rem;
  padding: .5rem 1rem;
  background: var(--surface);
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  padding-block: .75rem;
  border-bottom: 1px solid var(--rule);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .9rem;
  font-size: .9rem;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.site-header nav a:hover { text-decoration: underline; }

.date, .file-type {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.35rem;
}

#theme-toggle {
  min-height: 2.75rem;
  padding: .35rem .7rem;
  border: 1px solid var(--accent);
  border-radius: .35rem;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}

#theme-toggle:hover {
  background: var(--accent);
  color: var(--background);
}

.intro {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem);
}

h1 {
  font-size: clamp(3.5rem, 10vw, 6.25rem);
  line-height: .98;
  letter-spacing: -.075em;
  font-weight: 750;
}

.role, .experience-tenure {
  color: var(--accent);
  font-size: clamp(1.05rem, 3vw, 1.5rem);
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -.025em;
}

.role { margin-top: .95rem; }

.bio {
  max-width: 62ch;
  margin-top: 1.2rem;
  color: var(--muted);
}

.actions { margin-top: 1.65rem; }

.actions a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
}

.actions .primary {
  gap: .55rem;
  padding: .45rem .85rem;
  border-radius: .35rem;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
}

.actions .primary:hover { background: var(--accent); }
.file-type { font-size: .75rem; font-weight: 400; letter-spacing: .04em; }

.section {
  border-top: 1px solid var(--rule);
  padding-block: clamp(1.8rem, 5vw, 3rem);
}

h2 {
  margin-bottom: .35rem;
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -.045em;
}

.experience-tenure {
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.entry {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: .35rem 1.5rem;
  padding-block: 1.15rem;
}

.entry:first-child { padding-top: 0; }
.entry:last-child { padding-bottom: 0; }
.entry + .entry { border-top: 1px solid var(--rule); }

.entry p { color: var(--muted); }
.date { font-size: .875rem; }
.job { margin-block: .2rem .45rem; font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1rem 1.75rem;
  color: var(--muted);
  font-size: .875rem;
}

@media (max-width: 44rem) {
  .entry { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 24rem) {
  .actions { column-gap: .9rem; }
}
