/* IBM Plex, SIL Open Font License 1.1 — see fonts/OFL.txt */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper:  #ffffff;
  --ink:    #161616;
  --muted:  #6f6f6f;
  --rule:   #e0e0e0;
  --accent: #4c3bcf;

  --rail: 9rem;
  --gap:  2.5rem;

  --sans: 'IBM Plex Sans', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:  #161616;
    --ink:    #f4f4f4;
    --muted:  #a8a8a8;
    --rule:   #393939;
    --accent: #a292ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 58rem;
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 6rem) clamp(1.5rem, 5vw, 3rem) 5rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--rule);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transition: text-decoration-color 140ms ease;
}
a:hover { text-decoration-color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- hero ---- */

.name {
  font-size: clamp(2.25rem, 5.5vw, 3.25rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 1.5rem;
  max-width: 18ch;
}

.role {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 2.25rem;
}
.role b { font-weight: 600; }
.role span { color: var(--muted); }

.intro {
  max-width: 36rem;
  margin: 0 0 1.1rem;
}

/* ---- sections, each opening on a hairline ---- */

.block {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 0 var(--gap);
  align-items: start;
}

.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin: 0;
  padding-top: 0.2rem;
}

.body > :first-child { margin-top: 0; }
.body > :last-child  { margin-bottom: 0; }

/* ---- link lists ---- */

.links { list-style: none; margin: 0; padding: 0; }
.links li { margin-bottom: 1.5rem; }
.links li:last-child { margin-bottom: 0; }
.links a { font-weight: 600; }
.links .gloss {
  display: block;
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.links cite { font-style: italic; }

.after {
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 38rem;
}

/* ---- the year spine ---- */

.spine { list-style: none; margin: 0; padding: 0; }

.spine li { position: relative; }

.spine .post {
  position: relative;
  border-left: 1px solid var(--rule);
  padding: 0 0 2rem 1.75rem;
}
.spine li:last-child .post {
  padding-bottom: 0;
  border-left-color: transparent;
  background: linear-gradient(var(--rule), transparent) left top / 1px 3.5rem no-repeat;
}

.spine .post::before {
  content: "";
  position: absolute;
  left: -3.5px;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--rule);
}
.spine li:first-child .post::before {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.spine .yr {
  position: absolute;
  left: calc(-1 * (var(--rail) + var(--gap)) + 0.5rem);
  width: var(--rail);
  text-align: right;
  top: 0.2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.spine h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}
.spine p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---- footer ---- */

.foot {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.foot .where {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin: 0 0 1rem;
}

.foot .personal {
  margin: 0;
  max-width: 36rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.55;
}
.foot .gh {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.foot .gh img {
  width: 38px;
  height: auto;
  image-rendering: pixelated;
  border: 1px solid var(--rule);
}

/* ---- narrow ---- */

@media (max-width: 48rem) {
  .block {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem 0;
    margin-top: 3rem;
  }
  .spine .yr {
    position: static;
    display: block;
    width: auto;
    text-align: left;
    margin-bottom: 0.2rem;
  }
  .spine .post { padding-left: 1.25rem; }
}

/* ---- load ---- */

@media (prefers-reduced-motion: no-preference) {
  .page > * { animation: rise 520ms cubic-bezier(.2,.7,.3,1) backwards; }
  .page > :nth-child(2) { animation-delay: 70ms; }
  .page > :nth-child(3) { animation-delay: 110ms; }
  .page > :nth-child(4) { animation-delay: 150ms; }
  .page > :nth-child(5) { animation-delay: 190ms; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(0.5rem); }
    to   { opacity: 1; transform: none; }
  }
}
