:root {
  color-scheme: light;
  font-family: "Inter", sans-serif;
  color: #181818;
  background: #fafafa;
  --accent: #c32c17;
  --gutter: 1.25rem;
  --divider-gap: 3.5rem;
}
* { box-sizing: border-box; }
body { max-width: 80rem; margin: auto; padding: 0 clamp(1.25rem, 5vw, 4rem); }
header {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: start;
  padding: 2rem 0 2.5rem;
}
h1, h2, h3, p, ul { margin: 0; }
.identity { grid-column: span 2; }
h1 { font-size: 1.875rem; font-weight: 500; letter-spacing: -.035em; line-height: 1.2; }
header > p { grid-column: span 2; max-width: 45ch; color: #585858; font-size: .9375rem; line-height: 1.5; }
.role { margin-top: .25rem; color: #585858; font-family: "IBM Plex Mono", monospace; font-size: 1rem; font-weight: 400; letter-spacing: normal; line-height: 1.3; }
main, footer { border-top: 1px solid #222; }
h2 { color: var(--accent); padding: 1rem 0 1.5rem; font-size: 2rem; font-weight: 600; letter-spacing: -.055em; }
.projects { display: grid; gap: 2.5rem var(--gutter); grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; }
.experience { margin-top: var(--divider-gap); }
.employers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: center; gap: 1.5rem var(--gutter); list-style: none; padding: 0; }
.employers li { display: flex; align-items: center; justify-content: center; height: 3rem; }
.employers li:first-child { justify-content: flex-start; }
.employers li:last-child { justify-content: flex-end; }
.employers img { display: block; max-width: min(100%, 7rem); max-height: 3rem; filter: grayscale(1) brightness(0); }
.employers .employer-logo-small { max-width: min(100%, 5.95rem); max-height: 2.55rem; }
.employers .nexthink-logo { max-width: min(100%, 6.3rem); max-height: 2.7rem; transform: translateY(3px); }
.employers .zengo-logo { width: 8.75rem; max-width: 100%; max-height: 3.75rem; }
.employers .employer-logo-large { width: 9.45rem; max-width: 100%; max-height: 4.05rem; }
a { color: inherit; text-decoration: none; }
.project { display: block; }
.project-image,
.article-image > img,
.page-content > figure:not(.article-image) {
  padding: .5rem;
  background: #e8e8e6;
}
.project-image { display: block; }
.project-image img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.project-caption { display: block; margin-top: 1rem; }
h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; text-wrap: balance; }
.project-motivation { display: block; margin-top: .25rem; color: #585858; font-size: .9375rem; line-height: 1.4; }
a:hover h3, footer a:hover { text-decoration: underline; text-underline-offset: .17em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
footer { font-family: "IBM Plex Mono", monospace; font-size: .875rem; margin: var(--divider-gap) 0 2rem; padding-top: 1.25rem; }
nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
footer a { display: inline-flex; align-items: center; gap: .375rem; }
@media (max-width: 64rem) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .employers li:first-child, .employers li:last-child { justify-content: center; }
}
@media (max-width: 32rem) {
  :root { --divider-gap: 2rem; }
  header { display: block; padding: 1.5rem 0 var(--divider-gap); }
  h1 { font-size: 1.625rem; }
  .role { font-size: .875rem; }
  h2 { font-size: 1.5rem; }
  header > p { margin-top: 1rem; font-size: 1rem; line-height: 1.5; }
  .projects { grid-template-columns: 1fr; gap: 1rem; }
  .employers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project { display: grid; grid-template-columns: clamp(3rem, 16vw, 6.5rem) minmax(0, 1fr); gap: .75rem; align-items: start; }
  .project-caption { margin-top: 0; }
}
@media (max-width: 24rem) { h3 { font-size: .9375rem; } }

/* Individual project pages */
.page-main { margin-top: 2rem; border-top: 0; }
.page-main > h1 { color: var(--accent); padding: 1rem 0 1.5rem; font-size: 2rem; font-weight: 600; letter-spacing: -.055em; }
.page-content { font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.page-content > :is(p, ul, ol, blockquote, .article-image, .diagram, pre:has(> code[data-lang="mermaid"])) { max-width: 76ch; }
.page-content > * + * { margin-top: 1.5rem; }
.page-content h2, .page-content h3, .page-content h4 { color: #181818; padding: 0; line-height: 1.3; }
.page-content h2 { font-size: 1.5rem; }
.page-content h3 { font-size: 1.125rem; }
.page-content a { color: var(--accent); text-decoration: underline; text-underline-offset: .17em; }
.page-content ul, .page-content ol { padding-left: 1.5rem; }
.page-content img, .page-content svg { max-width: 100%; height: auto; }
.page-content pre { overflow-x: auto; padding: 1rem; background: #e8e8e6; }
.page-content code { font-family: "IBM Plex Mono", monospace; font-size: .875em; }
.page-content blockquote { margin-left: 0; padding-left: 1rem; border-left: 2px solid var(--accent); }
.page-content > .diagram {
  padding: clamp(.75rem, 2vw, 1.5rem);
  background: #e8e8e6;
}
.page-content > :is(.diagram, figure) { margin-inline: 0; }
.article-image {
  display: grid;
  grid-template-columns: minmax(0, max-content);
  justify-content: center;
}
.article-image > img { display: block; justify-self: center; }
.article-image > figcaption { margin-top: .5rem; color: #585858; font-size: .875rem; }
.article-image > figcaption:empty { display: none; }
.page-content > :is(h2, h3) + * { margin-top: .75rem; }
.diagram .edgeLabel, .diagram .edgeLabel * { background: transparent !important; }
.diagram .edgeLabel rect { fill: none !important; }
.page-content .diagram svg { display: block; margin-inline: auto; }
.page-content .diagram > svg { width: 100%; }
@media (max-width: 32rem) {
  .page-main > h1 { font-size: 1.5rem; }
}
