:root {
  --bg: #ffffff;
  --fg: #171717;
  --muted: #6f6f6f;
  --faint: #a3a3a3;
  --border: #e7e7e7;
  --sans: "Geist", ui-sans-serif, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: 140px;
  --gap: 28px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #ededed;
    --muted: #9d9d9d;
    --faint: #6b6b6b;
    --border: #242424;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100svh;
  display: grid;
  align-items: start;
  justify-items: start;
}
body.home {
  align-items: center;
}
::selection {
  background: var(--fg);
  color: var(--bg);
}
main {
  position: relative;
  width: 100%;
  max-width: 660px;
  padding: 48px 24px;
  margin-left: clamp(0px, 10vw, 200px);
}
/* The axis: a continuous hairline the content hangs on */
main.with-axis::before {
  content: "";
  position: absolute;
  left: calc(24px + var(--gutter) + var(--gap) / 2);
  top: 48px;
  bottom: 48px;
  width: 1px;
  background: var(--border);
}
a {
  color: var(--fg);
}
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Blocks: label in the margin, content on the axis */
.block {
  display: grid;
  grid-template-columns: var(--gutter) 1fr;
  column-gap: var(--gap);
}
.block + .block {
  margin-top: 40px;
}
.gutter,
h2 {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 3px;
}
.content {
  grid-column: 2;
  max-width: 420px;
}

/* Header */
h1 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}
.role {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.meta {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  line-height: 1.7;
}
.meta .time {
  display: block;
  color: var(--faint);
}
.bio {
  margin-top: 16px;
  max-width: 40ch;
  text-wrap: pretty;
}

/* Projects list */
.projects {
  list-style: none;
  border-top: 1px solid var(--border);
}
.projects li {
  border-bottom: 1px solid var(--border);
}
.projects a {
  display: block;
  padding: 14px 0;
  text-decoration: none;
}
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.name {
  font-weight: 500;
}
.arrow {
  color: var(--faint);
  flex: none;
  align-self: center;
  transition-property: color, transform;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.projects a:hover .arrow {
  color: var(--fg);
  transform: translateX(2px);
}
.desc {
  display: block;
  color: var(--muted);
  margin-top: 2px;
  max-width: 40ch;
  text-wrap: pretty;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: none;
}

/* Contact */
.contact-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--faint);
  transition-property: text-decoration-color;
  transition-duration: 150ms;
}
.contact-links a:hover {
  text-decoration-color: var(--fg);
}
.contact-links .sep {
  color: var(--faint);
  margin: 0 2px;
}

footer .content,
footer.page-footer {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}
footer.block {
  margin-top: 56px;
}

/* Project pages */
.page {
  max-width: 560px;
}
.back {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.back a {
  text-decoration: none;
  color: var(--muted);
  transition-property: color;
  transition-duration: 150ms;
}
.back a:hover {
  color: var(--fg);
}
.page header {
  margin-top: 40px;
}
.page .lede {
  margin-top: 16px;
  max-width: 52ch;
  text-wrap: pretty;
}
.page .lede + .lede {
  margin-top: 8px;
}
.figure {
  margin-top: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.figure svg {
  display: block;
  width: 100%;
  height: auto;
}
.figure + .figure {
  margin-top: 16px;
}
.facts {
  margin-top: 32px;
  border-top: 1px solid var(--border);
}
.facts > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.facts dt {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 2px;
}
.facts dd {
  font-size: 14px;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--faint);
  transition-property: text-decoration-color;
  transition-duration: 150ms;
}
.cta:hover {
  text-decoration-color: var(--fg);
}
.cta .arrow {
  color: var(--muted);
}
.page-footer {
  margin-top: 56px;
}

/* Staggered entrance, opt-in via reduced-motion preference */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(4px);
    animation: reveal 500ms ease-out forwards;
    animation-delay: calc(var(--i) * 100ms);
  }
  @keyframes reveal {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Narrow screens: margin column collapses, labels move above content */
@media (max-width: 719px) {
  main {
    margin-left: 0;
    padding: 56px 24px 48px;
  }
  main.with-axis::before {
    display: none;
  }
  .block {
    grid-template-columns: 1fr;
  }
  .gutter,
  h2 {
    grid-column: 1;
    grid-row: auto;
    text-align: left;
    padding-top: 0;
    margin-bottom: 8px;
  }
  .content {
    grid-column: 1;
  }
  .meta .time {
    display: inline;
  }
  .meta .place::after {
    content: " · ";
    color: var(--faint);
  }
}
