:root {
  color-scheme: dark;
  --mist: #0D1017;
  --paper: #141925;
  --raised: #19202E;
  --ink: #EEF2FA;
  --ink-soft: #A3ADC2;
  --ink-card: #D2DAEA;
  --blue: #86B4FF;
  --sky: #C5DBFF;
  --amber: #F2A541;
  --line: #222A3A;
  --rule: #3A455B;
  --display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--sky); }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--code); font-size: 0.92em; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 20px; height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-small { width: 17px; height: 17px; stroke-width: 1.9; }

/* A text link that carries an icon */
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  text-decoration: none;
}
.icon-link:hover span { text-decoration: underline; }

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 22px 64px;
}

/* Identity rail */
.rail-head { display: flex; align-items: center; gap: 16px; }
.rail-photo-ring {
  flex: none;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--sky), var(--blue) 45%, var(--rule));
}
.rail-photo {
  display: block;
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--mist);
}
.rail-name {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}
.rail-name:hover { color: var(--ink); }
.rail-role { color: var(--ink-soft); margin-top: 4px; font-size: 0.96rem; line-height: 1.5; }
.rail-links { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 14px; }
.rail-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 500;
  text-decoration: none;
}
.rail-links a:hover span { text-decoration: underline; }
.rail-nav { display: none; }

/* Hero */
.hero { padding: 40px 0 40px; }
.hero h1 {
  font-size: clamp(2.2rem, 8.6vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  max-width: 780px;
}
.hero-lede {
  margin-top: 24px;
  font-size: 1.12rem;
  max-width: 56ch;
  color: var(--ink-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--ink);
}
.button-solid, .button-solid:hover { background: var(--ink); color: var(--mist); }
.button-plain, .button-plain:hover { color: var(--ink); }
.button:hover { border-color: var(--blue); }
.button-solid:hover { background: var(--blue); border-color: var(--blue); }

/* Sections */
.block { padding: 40px 0; border-top: 1px solid var(--line); }
.block > h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}

/* Timeline: the two phases really are a sequence */
.timeline { position: relative; margin-left: 5px; padding-left: 2px; }
/* the line starts at the first dot's centre instead of above it */
.timeline::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 0;
  width: 2px;
  background: var(--rule);
}
.phase { position: relative; padding: 0 0 34px 24px; }
.phase:last-child { padding-bottom: 0; }
.phase::before {
  content: "";
  position: absolute;
  /* centre the dot on the 2px line: the line runs from -2px to 0 */
  left: -11px; top: 2px;
  box-sizing: border-box;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--amber);
  border: 3px solid var(--mist);
}
.phase-when { color: var(--ink-soft); font-size: 0.95rem; }
.phase h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; margin: 2px 0 12px; }
.points li { position: relative; padding-left: 18px; margin-bottom: 9px; max-width: 64ch; }
.points li:last-child { margin-bottom: 0; }
.points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.66em;
  width: 7px; height: 2px;
  background: var(--blue);
}
.store-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; }

/* Own products */
.feature {
  background: var(--raised);
  border: 1px solid var(--rule);
  color: var(--ink);
  border-radius: 22px;
  padding: 28px 24px;
}
.feature h3 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.feature-kind { color: var(--sky); margin-top: 4px; }
.feature p.feature-text { margin-top: 14px; max-width: 58ch; color: var(--ink-card); }
.feature a { color: var(--amber); font-weight: 600; }
.feature a:hover { color: var(--amber); }
.streak { display: flex; gap: 6px; margin: 22px 0 6px; }
.streak span {
  flex: 1; max-width: 26px; aspect-ratio: 1;
  border-radius: 7px;
  background: var(--amber);
}
.streak span.miss { background: transparent; border: 2px solid var(--rule); }
.streak-note { font-size: 0.92rem; color: var(--sky); }
.feature-link { margin-top: 18px; }

.pair { display: grid; gap: 16px; margin-top: 16px; }
.side {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
}
.side h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em; }
.side-kind { color: var(--ink-soft); font-size: 0.95rem; margin-top: 3px; }
.side p.side-text { margin-top: 10px; }
.side-link { margin-top: 12px; }

/* Open source */
.contrib { max-width: 64ch; }
.packages { margin-top: 20px; border-top: 1px solid var(--line); }
.packages li { border-bottom: 1px solid var(--line); }
.packages a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 13px 2px;
  text-decoration: none;
  color: var(--ink);
}
.packages a:hover code { color: var(--blue); }
.packages code { font-size: 0.95rem; font-weight: 600; }
.packages small { color: var(--ink-soft); font-size: 0.9rem; text-align: right; }
.more-link { margin-top: 18px; }

/* Skills */
.skills { display: grid; gap: 18px; }
.skills dt { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.skills dd { margin: 3px 0 0; color: var(--ink-soft); max-width: 62ch; }

/* Background */
.facts li { margin-bottom: 10px; max-width: 62ch; }
.facts strong { font-weight: 600; }
.facts span { color: var(--ink-soft); }

/* Contact */
.contact h2 { font-size: clamp(1.8rem, 6vw, 2.6rem); max-width: 18ch; }
.contact p { margin-top: 14px; color: var(--ink-soft); max-width: 52ch; }
.contact .hero-actions { margin-top: 24px; }

footer { color: var(--ink-soft); font-size: 0.9rem; padding-top: 28px; border-top: 1px solid var(--line); }

/* Packages page */
.back-link { margin-bottom: 26px; }
.hero-compact h1 { font-size: clamp(2rem, 7vw, 3.2rem); max-width: 16ch; }
.feature h3.pkg-title {
  font-family: var(--code);
  font-size: clamp(1.25rem, 4.6vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.feature h4.sub {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 26px 0 12px;
}
.feature .points li { color: var(--ink-card); }
.feature .points li::before { background: var(--amber); }
.feature code, .side code { color: var(--sky); }
.meta {
  display: grid;
  gap: 14px 28px;
  margin: 26px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.meta dt { color: var(--sky); font-size: 0.88rem; }
.meta dd { margin: 2px 0 0; font-weight: 500; }
.feature .store-links { margin-top: 22px; }

.stack { display: grid; gap: 16px; }
.side h3.pkg {
  font-family: var(--code);
  font-size: 1.12rem;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.side .points { margin-top: 12px; }
.side .points li { color: var(--ink-soft); }
.side-platforms { margin-top: 12px; font-size: 0.92rem; color: var(--ink-soft); }

@media (min-width: 640px) {
  .pair { grid-template-columns: 1fr 1fr; }
  .feature { padding: 36px 34px; }
  .meta { grid-template-columns: 1fr 1fr; }
  .side { padding: 24px 26px; }
}

@media (min-width: 960px) {
  .page {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 72px;
    padding: 56px 32px 80px;
  }
  .rail { position: sticky; top: 56px; align-self: start; }
  .rail-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .rail-photo { width: 96px; height: 96px; }
  .rail-role { font-size: 1rem; line-height: 1.6; margin-top: 6px; }
  .rail-links { flex-direction: column; gap: 0; }
  .rail-nav {
    display: flex; flex-direction: column;
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--line);
  }
  .rail-nav a {
    display: flex; align-items: center;
    min-height: 40px;
    color: var(--ink-soft);
    text-decoration: none;
  }
  .rail-nav a:hover, .rail-nav a[aria-current="page"] { color: var(--ink); }
  .rail-nav a:hover { text-decoration: underline; }
  .hero { padding-top: 0; }
  .skills { grid-template-columns: 1fr 1fr; gap: 24px 40px; }
  .meta { grid-template-columns: repeat(4, auto); justify-content: start; gap: 14px 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
