:root {
  color-scheme: light dark;
  --paper: #f3f3ef;
  --ink: #161615;
  --muted: #585952;
  --grid: #1718140c;
  --line: #c1c2ba;
  --hover: #e2e3dc;
  --mono: "Martian Mono", ui-monospace, Menlo, Consolas, monospace;
  --inset: clamp(.55rem, 1vw, .9rem);
  font-family: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #171716; --ink: #eeeee9; --muted: #b6b7af; --grid: #ffffff0a; --line: #494a44; --hover: #2b2c28; }
}
* { box-sizing: border-box; }
body {
  max-width: 77rem;
  margin: clamp(1rem, 3.5vw, 3rem) auto;
  padding-inline: clamp(1rem, 4vw, 3.5rem);
}
main, .bar, .footer-inner {
  background-image: linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  border-right: 1px solid var(--grid);
}
h1, h2, h3, h4, p, dl, dd { margin: 0; }
[hidden] { display: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
header { position: sticky; top: 0; z-index: 2; background: var(--paper); }
.bar, .footer-inner { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); align-items: baseline; border-top: 2px solid var(--ink); }
.bar { font: .875rem/1.35 var(--mono); padding-block: .55rem; }
.bar > *, .footer-inner > * { padding-inline: var(--inset); }
.brand { grid-column: span 1; text-decoration: none; font: bold 1.4rem/1 "Helvetica Neue", Arial, sans-serif; letter-spacing: -.08em; }
.place { grid-column: span 3; color: var(--muted); }
nav { grid-column: span 5; display: flex; gap: clamp(.9rem, 3vw, 3rem); }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--ink); text-decoration: underline; }
.switch { grid-column: span 3; justify-self: end; display: flex; gap: .45rem; }
.switch a { text-decoration: none; border: 0; padding: .2rem; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.switch a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; font-weight: 700; }
.hero-inner { padding-top: clamp(2.6rem, 6.5vw, 6rem); }
h1 { padding-inline: var(--inset); font-size: clamp(3rem, 9.2vw, 7.7rem); line-height: .96; letter-spacing: -.069em; }
.role { margin: 1rem var(--inset) 0; font: .94rem/1.55 var(--mono); color: var(--muted); }
.timeline { padding: clamp(1.7rem, 3vw, 3rem) 0 0; font: .875rem/1.35 var(--mono); }
.timeline-row {
  display: grid;
  grid-template-columns: 25% minmax(0, 1fr);
  align-items: stretch;
  padding: .35rem var(--inset);
  border-top: 1px solid var(--line);
}
.timeline a { text-decoration: none; }
.timeline a .timeline-name { text-decoration: underline; text-underline-offset: .2em; }
.timeline-label { display: grid; align-content: start; gap: .15rem; padding-right: .7rem; overflow-wrap: anywhere; }
.timeline-name { font-weight: 600; }
.timeline-title { font-size: .85rem; color: var(--muted); }
.years span:last-child { justify-self: end; }
.timeline a:hover, .timeline a:focus-visible { background: var(--hover); color: var(--ink); }
.years { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-left: calc(25% + var(--inset) / 2); margin-right: var(--inset); font-size: .82rem; padding-bottom: .35rem; color: var(--muted); }
.months { display: grid; grid-template-columns: repeat(var(--months), minmax(0,1fr)); background: var(--hover); }
.months[hidden] { display: none; }
.months i { background: var(--ink); }
.about, article { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); }
.about, .projects { margin-top: clamp(2.5rem, 4.7vw, 4.2rem); border-top: 2px solid var(--ink); }
.about { padding-top: 1rem; }
.section-label, .footer-inner h2 { font: 500 .9rem/1.5 var(--mono); text-transform: lowercase; }
.about .section-label { grid-column: span 3; padding-inline: var(--inset); }
.about-copy { grid-column: span 9; padding-inline: var(--inset); }
.intro { max-width: 47ch; font-size: clamp(1.25rem, 2.1vw, 1.8rem); line-height: 1.35; letter-spacing: -.03em; text-wrap: pretty; }
.hero-actions { display: flex; gap: 1.6rem; margin-top: 1.1rem; }
.hero-actions, .footer-inner, .project-more summary { font: .9rem/1.5 var(--mono); }
section, article, footer { scroll-margin-top: 4.5rem; }
.projects > h2 { padding: .75rem var(--inset) 1.35rem; }
article { border-top: 1px solid var(--line); padding-block: clamp(1.7rem, 3vw, 2.75rem); }
article > div:first-child { grid-column: span 4; padding-inline: var(--inset); }
.details { grid-column: span 8; padding-inline: var(--inset); }
.date, .tags { font: .875rem/1.5 var(--mono); color: var(--muted); }
h3 { margin-top: .55rem; max-width: 14ch; font-size: clamp(1.65rem, 3vw, 2.8rem); line-height: 1.03; letter-spacing: -.06em; }
.tags { margin-top: .7rem; }
h4 { font-size: clamp(1.2rem, 1.6vw, 1.5rem); line-height: 1.23; letter-spacing: -.035em; }
.details p { max-width: 64ch; margin-top: .75rem; font-size: 1.02rem; line-height: 1.58; }
.metrics { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin-top: 1.4rem; }
.metrics div { display: flex; flex-direction: column-reverse; border-left: 2px solid currentColor; padding-left: .7rem; }
.metrics dd { font-size: 2rem; font-weight: 600; letter-spacing: -.06em; }
.metrics dt { color: var(--muted); font: .875rem/1.45 var(--mono); }
.project-more { margin-top: 1.1rem; }
.project-more summary { display: flex; align-items: center; gap: .6rem; width: fit-content; padding-block: .3rem; cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: .22em; }
.project-more summary::-webkit-details-marker { display: none; }
.project-more .when-open, .project-more[open] .when-closed { display: none; }
.project-more[open] .when-open { display: inline; }
.indicator { width: .75rem; height: .75rem; background: linear-gradient(currentColor,currentColor) center / 100% 1px no-repeat, linear-gradient(currentColor,currentColor) center / 1px 100% no-repeat; }
.project-more[open] .indicator { background-size: 100% 1px, 0 0; }
.footer-inner { padding-block: .85rem 1.25rem; row-gap: .5rem; }
.footer-inner h2, .footer-inner a { grid-column: span 3; }
.footer-inner a:last-child { justify-self: end; }
@media (max-width: 44rem) {
  main, .bar, .footer-inner { background-size: 25% 100%; }
  .bar { grid-template-columns: auto 1fr auto auto; gap: .55rem; }
  .bar > * { grid-column: auto; padding-inline: .2rem; }
  nav { gap: .65rem; }
  .about, article { grid-template-columns: 1fr; gap: 1rem; }
  .about .section-label, .about-copy, article > div:first-child, .details { grid-column: 1; }
  h3 { max-width: none; }
  .timeline-row { grid-template-columns: 36% minmax(0, 1fr); font-size: .82rem; }
  .years { margin-left: calc(36% + var(--inset) * .28); }
  .footer-inner { grid-template-columns: max-content 1fr; }
  .footer-inner h2, .footer-inner a { grid-column: auto; }
  .footer-inner a:last-child { justify-self: start; }
}
@media (max-width: 27rem) {
  .bar { grid-template-columns: 1fr auto auto; }
  .place { display: none; }
  .years .intermediate-year { display: none; }
}
