:root {
  --mono: "Geist Mono", ui-monospace, monospace;
  --pct: 40%;
  --row-pr: 0px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
/* Keep the header still between pages: reserve the scrollbar's space even before the page is tall enough to scroll */
html { scrollbar-gutter: stable; }
/* Crossfade from page to page instead of a hard cut */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.page {
  min-height: 100vh;
  background-image: radial-gradient(rgba(var(--ink-rgb), var(--dot)) 1px, transparent 1px);
  background-size: 22px 22px;
  font-family: "Geist", system-ui, sans-serif;
}
.noscript { max-width: 560px; margin: 0 auto; padding: 72px 28px; color: var(--ink2); }

/* Header */
.head { box-sizing: content-box; max-width: 1240px; margin: 0 auto; padding: 72px 28px 40px; display: grid; gap: 28px; }
.head-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.brand { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--ink); }
.brand img { display: block; width: 22px; height: 22px; }
.brand .name { white-space: nowrap; }
.brand .role { color: var(--muted); padding-left: 12px; border-left: 1px solid rgba(var(--ink-rgb), 0.3); white-space: nowrap; }
.head-top nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.head-top nav a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1px solid rgba(var(--ink-rgb), 0.18); border-radius: 999px; background: rgba(255, 255, 255, 0.35); color: var(--ink); text-decoration: none; line-height: 1; white-space: nowrap; transition: color 0.15s, border-color 0.15s, background-color 0.15s; }
.head-top nav a:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.45); background: rgba(var(--accent-rgb), 0.06); }
.head-top nav a:focus-visible { outline: 2px solid rgba(var(--accent-rgb), 0.5); outline-offset: 2px; }
a:focus-visible { outline: 3px solid rgba(var(--accent-rgb), 0.45); outline-offset: 3px; border-radius: 2px; }
.head h1 { margin: 0; font-weight: 500; font-size: clamp(56px, 10vw, 128px); line-height: 0.92; letter-spacing: -0.05em; text-wrap: balance; }
.head h1 em { font-style: normal; color: var(--brick); }
.lede { margin: 0; max-width: 560px; font-size: 22px; line-height: 1.4; color: var(--ink2); text-wrap: pretty; }
/* The intro and the Side tinkerings button share a row; the button wraps under the intro when there's no room */
.intro { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px 48px; }
.intro .lede { flex: 1 1 360px; }
/* Below 760px the tech and healthcare rail is hidden (NARROW_MAX in life-map.js), so the tagline drops that part */
.lede-narrow { display: none; }
.intro-cta { display: inline-flex; align-items: center; padding: 14px 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.intro-cta:hover { background: var(--accent); }

/* Timeline */
.map { position: relative; max-width: 1240px; margin: 0 auto; padding: 40px 28px 140px; }
.path-start { height: 64px; }
/* Sticky "Career" heading over the path, level with the rail headings */
.career-rail { position: absolute; top: 0; bottom: 140px; left: 28px; width: 0; pointer-events: none; z-index: 1; }
.career-head { position: sticky; top: 0; width: max-content; padding-top: 40px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; background: var(--bg); background-clip: content-box; }
.row { display: flex; padding-bottom: var(--gap); padding-right: var(--row-pr); }
.row.is-end { padding-right: 0; }

.stop { position: relative; z-index: 2; margin-left: calc((100% - min(var(--w), var(--pct))) * var(--f)); }
/* Company pills size to their text, so they aren't held to the cards' --pct cap */
.is-join .stop { margin-left: calc((100% - min(var(--w), 100%)) * var(--f)); }

.card { width: min(var(--w), var(--pct)); min-width: 0; background: var(--surface); border: 1px solid rgba(var(--ink-rgb), 0.09); border-radius: 12px; box-shadow: var(--card-shadow); padding: 16px 18px 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.card .node { position: absolute; top: 22px; width: 18px; height: 18px; background: var(--kind); box-shadow: 0 0 0 5px var(--bg); }
.card[data-side="right"] .node { left: -49px; }
.card[data-side="left"] .node { right: -49px; }
.card[data-kind="life"] .node { border-radius: 50%; }
.card[data-kind="school"] .node { transform: rotate(45deg) scale(0.85); }
.big-year { position: absolute; top: 6px; font-size: 44px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; color: rgba(var(--ink-rgb), 0.14); pointer-events: none; white-space: nowrap; }
.card[data-side="right"] .big-year { right: calc(100% + 72px); }
.card[data-side="left"] .big-year { left: calc(100% + 72px); }
.meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.meta .kind { color: var(--kind); font-weight: 500; white-space: nowrap; }
.chip { justify-self: start; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.06em; padding: 6px 10px; border-radius: 6px; background: rgba(var(--accent-rgb), 0.12); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.22); }
.photo { position: relative; width: 100%; min-width: 0; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; }
.card h2 { margin: 0; font-weight: 500; font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.card h2 span { color: var(--muted); }
.card p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink2); text-wrap: pretty; }

/* Ending: the last stop on the path */
.end { margin-left: 80px; max-width: calc(100% - 80px); display: grid; gap: 14px; }
.end-title { font-size: clamp(40px, 7vw, 80px); font-weight: 500; line-height: 0.92; letter-spacing: -0.045em; }
.end-title em { font-style: normal; color: var(--brick); }
.end-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 22px; }
.end-actions a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 1px solid rgba(var(--ink-rgb), 0.35); color: var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; }
.end-actions a:hover { border-color: var(--accent); color: var(--accent); }
.end-actions a.primary { border: 0; background: var(--ink); color: var(--bg); font-weight: 500; }
.end-actions a.primary:hover { background: var(--accent); color: var(--bg); }

/* Empty image slot: striped placeholder with its label */
.slot { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; background: repeating-linear-gradient(135deg, rgba(var(--ink-rgb), 0.05) 0 8px, rgba(var(--ink-rgb), 0.1) 8px 16px); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo.contain { background: rgba(var(--accent-rgb), 0.08); }
.photo.contain img { object-fit: contain; padding: 18px; }

/* New-company pill */
.pill { max-width: 100%; display: flex; align-items: center; gap: 12px; padding: 6px 16px 6px 6px; background: var(--surface); border: 1px solid color-mix(in oklab, var(--work) 40%, transparent); border-radius: 999px; }
.pill .node { position: absolute; box-sizing: content-box; top: calc(50% - 5px); width: 10px; height: 10px; background: var(--bg); border: 2px solid var(--work); box-shadow: 0 0 0 4px var(--bg); }
.pill[data-side="right"] .node { left: -46px; }
.pill[data-side="left"] .node { right: -46px; }
.logo { position: relative; flex-shrink: 0; height: 40px; overflow: hidden; }
.logo.round { width: 40px; border-radius: 50%; background: var(--logo-bg); }
.logo.wide { width: 128px; border-radius: 999px; background: var(--logo-bg); padding: 0 14px; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
/* A square logo with a coloured frame: trim the frame off and redraw it as a ring over the corners */
.logo.framed::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2.5px var(--frame); }
.logo.framed img { width: 30px; height: 30px; margin: 5px; clip-path: inset(8%); }
.logo .slot { font-size: 9px; padding: 0; }
.pill-text { display: grid; gap: 1px; min-width: 0; }
.pill-text .verb { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--work); white-space: nowrap; }
.pill-text .company { font-size: 16px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
.pill-text .about { font-size: 13px; line-height: 1.3; color: var(--muted); }

/* Single (below the split width, see life-map.js): one column, cards inset to leave room for the path on the left */
.map.single .row { padding-bottom: 90px; }
.map.single .row.is-join { padding-bottom: 50px; }
.map.single .stop { margin-left: 64px; }
.map.single .card { width: min(480px, calc(100% - 64px)); }
.map.single .end { margin-left: 64px; width: calc(100% - 64px); }
.map.single .big-year { display: none; }
.map.single .card .node { left: -49px; right: auto; }
.map.single .pill .node { left: -46px; right: auto; }
/* "Career" sits over the cards' column, clear of the path */
.map.single .career-rail { left: 92px; }

@media (max-width: 599px) {
  /* On phones the big "See my side tinkerings" button right below does this job */
  .head-top nav .nav-tinkerings { display: none; }
}

@media (max-width: 339px) {
  /* Only on very narrow screens does the role drop under the name */
  .brand .role { flex-basis: 100%; padding-left: 34px; border-left: 0; }
}

@media (max-width: 759px) {
  .head { padding-top: 56px; }
  .head-top { font-size: 11px; letter-spacing: 0.08em; }
  .head-top nav { gap: 8px; }
  .head-top nav a { padding: 7px 11px; }
  .lede { font-size: 19px; }
  .lede-wide { display: none; }
  .lede-narrow { display: inline; }
}

/* Trail and marker */
.trail { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.trail-base { stroke: var(--ink); stroke-opacity: 0.28; stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; }
.trail-walk { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.marker { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 3; opacity: 0; }
.marker > div { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.18), 0 0 24px rgba(var(--accent-rgb), 0.45); }

/* Side rails */
.rail { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 1; }
.life-rail { width: 300px; right: var(--life-r); }
.tech-rail { width: 212px; right: 28px; }
.rail-line { position: absolute; top: 40px; bottom: var(--rail-end, 140px); left: 9px; border-left: 1px solid rgba(var(--ink-rgb), 0.35); }
.life-rail .rail-line { border-left: 2px solid var(--life); opacity: 0.45; }
.rail-head { position: sticky; top: 0; padding: 40px 0 0 24px; margin-bottom: -200px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
/* A sticky heading fades out while content scrolls under it (see hideCoveredHeads in life-map.js) */
.career-head, .rail-head { transition: opacity 0.15s; }
.career-head.is-covered, .rail-head.is-covered { opacity: 0; }
.life-item { position: absolute; left: 0; right: 0; top: 0; display: grid; grid-template-columns: 20px 96px minmax(0, 1fr); gap: 10px; align-items: start; pointer-events: auto; }
.life-dot { width: 12px; height: 12px; margin: 4px 0 0 4px; border-radius: 50%; background: var(--life); box-shadow: 0 0 0 4px var(--bg); }
.life-photo { position: relative; box-sizing: content-box; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(var(--ink-rgb), 0.12); }
.life-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.life-photo .slot { font-size: 9px; }
.life-text { display: grid; gap: 2px; padding-top: 2px; }
.life-text .yr { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--life); }
.life-text .t { font-size: 15px; font-weight: 500; line-height: 1.25; text-wrap: pretty; }
.life-text .b { font-size: 13px; line-height: 1.35; color: var(--muted); text-wrap: pretty; }
.tech-item { position: absolute; left: 0; right: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 4px; }
.ring { width: 9px; height: 9px; margin: 4px 0 0 5px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--bg); }
.tech-item > div { display: grid; gap: 2px; }
.tech-item .yr { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.tech-item .t { font-size: 15px; line-height: 1.3; text-wrap: pretty; }

