/* Geist (Latin), served from this site. Licence: fonts/OFL.txt */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/geist-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;
}

/* ---------- Colours ---------- */
:root {
  --bg: #f5f2eb; --ink: #1d1b17; --org: #45413a; --muted: #746e62; --soft: #5c574d;
  --fact: #5c574d; --body: #34312b;
  --rule: #e8e3d8; --under: #cfc8b8; --accent: #9b4767; --tint: rgba(155,71,103,.16);
  --ease: cubic-bezier(.7,0,.2,1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #161513; --ink: #ecebe6; --org: #d2cdc3; --muted: #8a857a; --soft: #a6a196;
  --fact: #aaa59a; --body: #dcd8cf;
  --rule: #2a2825; --under: #45413b; --accent: #e3a9bf; --tint: rgba(227,169,191,.18);
  color-scheme: dark;
}
/* The page colour also fills the area revealed when scrolling past the top or bottom. */
html, body { background: var(--bg); }
body { margin: 0; }

/* ---------- Page ---------- */
.page { background: var(--bg); color: var(--ink); font-family: 'Geist', system-ui, sans-serif; font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; }
.page ::selection { background: var(--tint); }
.wrap { max-width: 680px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }

/* ---------- Nav ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; height: 88px; font-size: 15px; }
.bar .name { text-decoration: none; font-weight: 500; }
.bar nav { display: flex; align-items: center; gap: 24px; }
.bar nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.bar nav a:hover { color: var(--ink); }
.toggle { all: unset; cursor: pointer; width: 32px; height: 32px; margin: 0 -10px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: color .2s; }
.toggle:hover { color: var(--ink); }
.toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle svg { grid-area: 1/1; width: 15px; height: 15px; transition: opacity .25s, transform .4s var(--ease); }
.toggle .sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
[data-theme="dark"] .toggle .moon { opacity: 0; transform: rotate(90deg) scale(.6); }
[data-theme="dark"] .toggle .sun { opacity: 1; transform: none; }

/* ---------- Opening ---------- */
.intro { margin-top: 112px; }
.intro p { margin: 0; font-size: 28px; line-height: 1.45; font-weight: 450; letter-spacing: -0.017em; }
.intro p + p { margin-top: 24px; }
.wave { display: inline-block; margin-right: .08em; transform-origin: 70% 75%; animation: wave 1.6s ease-in-out .5s 1; }
.hi:hover .wave { animation: wave 1.6s ease-in-out 1; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }

/* ---------- Work, Education, Reading ---------- */
.sec { margin-top: 96px; }
/* One rule under each heading; entries are separated by space alone. */
.sec h2 { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--rule); font-size: 20px; letter-spacing: -0.01em; font-weight: 500; color: var(--ink); }
.list { list-style: none; margin: 0; padding: 24px 0 0; }
.row { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: baseline; }
.row + .row { margin-top: 32px; }
/* Details (dates, team, city) in a mid grey; descriptions a shade darker, as the text you read */
.yr { color: var(--fact); font-variant-numeric: tabular-nums; white-space: nowrap; }
.role { font-size: 16px; font-weight: 500; }
.org { color: var(--org); }
.line { margin: 6px 0 0; color: var(--body); max-width: 520px; }

/* Work: company, then each title, then each team with its own dates in the left column */
.work .r { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: baseline; }
.work .co + .co { margin-top: 56px; }
.co-name { font-size: 18px; font-weight: 500; letter-spacing: -0.005em; }
.work .t { font-weight: 500; }
.work .r + .pos { margin-top: 8px; }
.work .pos + .pos { margin-top: 32px; }
.work .tm { margin-top: 4px; }
.work .tm + .tm { margin-top: 28px; }
.tn { color: var(--fact); }
.read a { text-decoration: underline; text-decoration-color: var(--under); text-underline-offset: .2em; }
.read a:hover { text-decoration-color: var(--accent); }

.foot { margin: 96px 0 0; padding-bottom: 72px; font-size: 15px; color: var(--muted); }

@media (max-width: 640px) {
  .bar { height: 72px; }
  .bar nav { gap: 16px; }
  .intro { margin-top: 56px; }
  .intro p { font-size: 23px; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .work .r { grid-template-columns: 1fr; gap: 0; }
  .work .r > span:empty { display: none; }
  .sec, .foot { margin-top: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .wave { animation: none !important; }
  .toggle svg { transition: none; }
}
