:root {
  --bg: #f6f7f9; --ink: #16191f; --ink-2: #5a6270; --rule: #d9dde3; --accent: #2647c4; --card: #eceff4;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171c; --ink: #e6e9ee; --ink-2: #98a1ae; --rule: #2c323b; --accent: #8da4ff; --card: #1b1f26; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.6 var(--sans); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
.code { font-family: var(--mono); font-weight: 500; }
.icon { width: 1em; height: 1em; margin-right: .3em; vertical-align: -.125em; fill: currentColor; }

.bar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--rule); }
.bar .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding-top: .85rem; padding-bottom: .85rem; }
.bar .name { font-weight: 600; color: var(--ink); text-decoration: none; }
.bar nav { display: flex; gap: 1.5rem; font-size: .875rem; }
.bar nav a { color: var(--ink-2); text-decoration: none; }
.bar nav a:hover { color: var(--ink); }
.bar nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px var(--accent); }

.hero { padding: 4.5rem 0 3rem; }
.hero-text { display: grid; grid-template-columns: 10rem minmax(0, 1fr); grid-template-areas: "photo role" "photo name" "photo lede" "links lede"; column-gap: 2.5rem; align-items: start; }
.id, .id > div { display: contents; }
.id img { grid-area: photo; width: 10rem; height: 10rem; border-radius: 4px; object-fit: cover; filter: grayscale(.15); }
.role { grid-area: role; margin: 0 0 .4rem; font-size: .9375rem; font-weight: 500; color: var(--ink-2); }
.role span { white-space: nowrap; }
.hero h1 { grid-area: name; margin: 0; font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 600; line-height: 1.05; letter-spacing: -.025em; }
.lede { grid-area: lede; max-width: 38em; margin: 1.5rem 0 0; font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); font-weight: 400; line-height: 1.45; }
.links { grid-area: links; display: flex; justify-content: space-between; margin: .75rem 0 0; padding: 0; list-style: none; }
.links li { margin: 0; }
.links a { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 3px; color: var(--ink-2); }
.links a:hover { color: var(--accent); }
.links svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }

.row { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 2.5rem; padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.label { align-self: start; position: sticky; top: 4.75rem; margin: 0; font-size: .9375rem; font-weight: 600; line-height: 1.5; }
.content { max-width: 44rem; }
#experience .content { max-width: none; }
.content > :first-child { margin-top: 0; }
.content > :last-child { margin-bottom: 0; }
p { margin: 0 0 1rem; }
p, li { text-wrap: pretty; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin-bottom: .4rem; }
h3 { margin: 1.75rem 0 .75rem; font-size: 1rem; font-weight: 600; }
.muted { color: var(--ink-2); }
.small { font-size: .9375rem; }
.focus { list-style: none; padding: 0; }
.focus li { margin-bottom: .875rem; padding-left: 1rem; border-left: 2px solid var(--accent); }
.focus b { font-weight: 600; }

.proj { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 2rem; padding: 1.25rem 1.5rem; margin-bottom: 1rem; border: 1px solid var(--rule); border-radius: .5rem; background: var(--card); font-size: .9375rem; }
.proj > * { grid-column: 1; }
.proj-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
.proj h3 { margin: 0; font-size: 1.0625rem; }
.proj .tag { padding: .05rem .45rem; border: 1px solid var(--rule); border-radius: 3px; font-size: .75rem; color: var(--ink-2); }
.proj .go { font-size: .875rem; }
.proj .metric { grid-column: 2; grid-row: 1 / span 3; margin: 0; text-align: right; }
.proj .metric b { display: block; font: 500 1.25rem/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--accent); }
.proj .metric span { display: block; font-size: .8125rem; color: var(--ink-2); }
.proj .line { margin: .35rem 0 0; color: var(--ink-2); }
.proj > ul { grid-column: 1 / -1; max-width: 40em; margin: .875rem 0 0; }
.proj li:last-child { margin-bottom: 0; }
.proj li > ul { margin: .3rem 0 0; }

.timeline { list-style: none; padding: 0; }
.timeline li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: 1.5rem; margin-bottom: 1.25rem; font-size: .9375rem; }
.timeline .when { grid-row: 1 / span 2; font: .8125rem/1.5rem var(--mono); white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.timeline b { font-weight: 600; }
.timeline .where { color: var(--ink-2); }
.edu b { font-weight: 500; }

details { border-top: 1px solid var(--rule); }
details:last-of-type { border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; }
details > ul { margin-bottom: 1.25rem; }
summary { padding: .8rem 0; cursor: pointer; font-weight: 600; }
.content > details:first-child { border-top: 0; }
.content > details:first-child > summary { padding-top: 0; }

footer { border-top: 1px solid var(--rule); padding: 1.5rem 0 3rem; font-size: .8125rem; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 7.5rem; }
  .bar .wrap { flex-direction: column; gap: .4rem; }
  .bar nav { flex-wrap: wrap; gap: .25rem 1.1rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero-text { grid-template-columns: 7rem minmax(0, 1fr); grid-template-areas: "photo role" "photo name" "photo links" "lede lede"; column-gap: 1.25rem; }
  .id img { align-self: center; width: 7rem; height: 7rem; }
  .links { justify-content: flex-start; gap: .25rem; margin: .6rem 0 0 -.375rem; }
  .links a { width: 2rem; height: 2rem; }
  .links svg { width: 1.125rem; height: 1.125rem; }
  .role { font-size: .8125rem; }
  .lede { margin: 1.75rem 0 0; }
  .row { grid-template-columns: 1fr; gap: 1rem; padding: 1.75rem 0; }
  .label { position: static; font-size: 1.125rem; }
  .proj { grid-template-columns: 1fr; padding: 1.1rem 1.1rem; }
  .proj .metric { grid-column: 1; grid-row: auto; margin-top: .4rem; text-align: left; }
  .proj .metric b, .proj .metric span { display: inline; }
  .proj .metric > :first-child { margin-right: .4rem; }
  .timeline li { grid-template-columns: 1fr; margin-bottom: 1.1rem; }
  .timeline .when { grid-row: auto; }
}

@media (max-width: 360px) {
  .hero-text { grid-template-columns: 5.5rem minmax(0, 1fr); column-gap: 1rem; }
  .id img { width: 5.5rem; height: 5.5rem; }
}
