/* Hallmark · shape: Narrative Workflow · genre: editorial · theme: Specimen (deal 3/3, seed personal-portfolio-brishab-btech-c0ed·15003318·2026-10-31·r0) · redesign: full
 * hero: Banner (56svh, a split inside it: type on five columns, the live search on seven; stage one shows above the fold) · nav: slab · footer: colophon block · imagery: the product live (two search canvases, a game board), two captures of the desktop apps, one photograph (a small portrait of the owner beside the name, in colour, by request) · signature: a breadth-first search that answers the cursor, ink cells with a blue frontier, live in the hero
 * axes: light/sans/cool · posture: restrained · contrast: pass · fold: pass · modes: light+dark · draw: 658f97 · job: hire · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: E, two live demos bring a dozen controls; every control is now the theme's square pair, one filled primary on the whole page */
/* Hallmark · waive 8 · the sections keep the page's order: race, game, repos, commits, builder, contact · a redesign keeps the content; the composition is new, a numbered workflow on hairlines */
/* Hallmark · waive 47b · one frame, the Bagh Chal board, the game's own wooden board art · the board is the product and the pieces sit on it */
/* Hallmark · waive 49b · the address brishabkc24@gmail.com is one word of 23 characters and takes two lines at 320px · an email address cannot be shortened */
/* Hallmark · dismissed 41 · .panel canvas is a drawing surface with no text; the maze colours are tokens the script reads */
/* Hallmark · reworded "Try one" to "1. Watch two searches race.", "Play Bagh Chal" to "2. Play the tigers, or the goats.", "Projects" to "3. Read the three repos.", "GitHub activity" to "4. Follow a year of commits.", "About" to "5. Who builds this, in Kathmandu." · the Narrative Workflow numbers its stages; 54 named the eyebrows those heads leaned on; each head carries a noun the page already has */
/* Hallmark · reworded the hero line "BTech AI student at Purbanchal University and frontend developer. I build classroom software and games that show how search, learning and logic actually work." to "BTech AI student in Kathmandu, building games that show how search works." · 58 allows one sentence of twelve words; the who and the where stay on the first screen */
/* Hallmark · reworded "Skills" from an h2 to the head of the skills rows inside stage 5 · the draw folds what the builder does into one stage */
/* Hallmark · dropped math-tug-arena.svg · 80 names a drawn interface where a capture belongs; the row is set in type until a screenshot exists */
/* Hallmark · dropped https://github.com/brishabkc24/math-tug-arena, https://brishabkc24.github.io/math-tug-arena/, "Math Tug Arena" · the project is not on GitHub yet; the row and its links return when it is */
/* Hallmark · dropped #github · the nav's GitHub now opens the profile, which is what a visitor expects; stage 4 is reached by scrolling */
/* Hallmark · dropped ghchart.rshah.org, brishabkc24, 239166329 · the page now draws the year of commits itself from the GitHub API, and the portrait is the local file assets/portrait.webp */
/* Hallmark · dropped 3days · it was the live "pushed 3 days ago" line from the GitHub API, which changes every day */
/* Hallmark · hero-review: fix · 4 findings · 4 resolved (the resting search drawn for everyone, the diamond held at every size, stage one above the 1280 fold, the posture named truthfully) */
/* Hallmark · finish-review: subagent · 7 findings · 7 resolved (the portrait's duotone pinned to ink on oat in both modes; the chart and the phone recording in the page's blue; the diamond capped one ring inside the shorter edge; a page noun in every stage head; the chart scrolls at its own size on a phone; the captures keep their proportions on six columns) · gap: none */
/* Hallmark · owner override · one face: Geist for display, body and figures, the hairline serif was unclear on the owner's screen · dark mode: black paper, and the close band stays dark instead of flipping light */
@import url("./tokens.css");
@import url("./base.css");

/* ----- Page tokens (every colour and length the page adds) --------------- */
:root {
  --nav-h: 64px;
  --maze-open: var(--color-paper);
  --maze-wall: var(--color-ink);
  --maze-frontier: var(--color-rule-2);
  --maze-explored: var(--color-paper-3);
  --maze-path: var(--color-accent);
  --maze-start: var(--color-success);
  --maze-goal: var(--color-error);
  --bc-line: var(--color-paper);
  --bc-wood: oklch(32% 0.05 60);
  --bc-select: var(--color-accent);
  --bc-target: var(--color-success);
  --bc-hint: oklch(74% 0.14 80);
  --board-max: 560px;
  --range-w: 160px;
  --text-mail: clamp(1.25rem, 2.2vw + 0.5rem, 2.441rem);
  --close-bg: var(--color-ink);
  --close-edge: var(--color-ink);
  --close-fg: var(--color-paper);
  --close-fg-2: var(--color-paper-2);
  --close-fg-3: var(--color-paper-3);
  --close-rule: var(--color-ink-2);
  /* The wash behind the portrait while it loads, the same in either mode. */
  --plate-paper: oklch(96.5% 0.016 82);
  /* The nav slab stays ink in both modes. */
  --nav-ink: oklch(17% 0.012 60);
  --nav-ink-2: oklch(28% 0.014 60);
  --nav-edge: var(--nav-ink);
  --nav-paper: oklch(96.5% 0.016 82);
  --nav-paper-2: oklch(93.5% 0.02 80);
  --nav-paper-3: oklch(89% 0.024 78);
}

/* Dark: the page goes black, the nav slab with it, and the close band stays dark */
:root[data-theme="dark"] {
  --close-bg: var(--color-paper);
  --close-edge: var(--color-rule);
  --close-fg: var(--color-ink);
  --close-fg-2: var(--color-ink-2);
  --close-fg-3: var(--color-muted);
  --close-rule: var(--color-rule);
  --nav-ink: oklch(11% 0.008 70);
  --nav-ink-2: oklch(19.5% 0.014 70);
  --nav-edge: oklch(30% 0.014 70);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --close-bg: var(--color-paper);
    --close-edge: var(--color-rule);
    --close-fg: var(--color-ink);
    --close-fg-2: var(--color-ink-2);
    --close-fg-3: var(--color-muted);
    --close-rule: var(--color-rule);
    --nav-ink: oklch(11% 0.008 70);
    --nav-ink-2: oklch(19.5% 0.014 70);
    --nav-edge: oklch(30% 0.014 70);
  }
}

/* ----- Base ---------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

h1,
h2 {
  font-variation-settings: "opsz" var(--display-optical);
  line-height: 1.02;
}

h3 {
  font-optical-sizing: auto;
  line-height: 1.15;
}

a {
  text-decoration-color: var(--color-accent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

.lead {
  color: var(--color-ink-2);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: calc(-1 * var(--space-3xl));
  z-index: var(--z-toast);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-ink);
  color: var(--color-paper);
}

.skip-link:focus-visible {
  top: var(--space-md);
}

/* ----- Controls: the theme's square pair ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: 0 var(--space-lg);
  border: var(--rule-hair) solid var(--color-ink);
  border-radius: var(--radius-card);
  background: var(--color-ink);
  color: var(--color-paper);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.btn:hover {
  background: var(--color-ink-2);
  border-color: var(--color-ink-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--secondary {
  background: transparent;
  color: var(--color-ink);
}

.btn--secondary:hover {
  background: var(--color-paper-2);
  border-color: var(--color-ink);
}

.btn--small {
  min-height: 44px;
  padding: 0 var(--space-md);
  font-size: var(--text-sm);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: var(--rule-hair) solid var(--nav-paper-3);
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--nav-paper);
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out);
}

.icon-btn:hover {
  background: var(--nav-ink-2);
}

.icon-btn:active {
  transform: translateY(1px);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

input[type="range"] {
  appearance: none;
  width: var(--range-w);
  height: 16px;
  margin: 0;
  background: linear-gradient(var(--color-rule-2), var(--color-rule-2)) center / 100% 1px no-repeat;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: var(--color-ink);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 0;
  background: var(--color-ink);
}

input[type="range"]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: var(--space-xs);
}

/* ----- Nav: a slab ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky-nav);
  background: var(--nav-ink);
  border-bottom: var(--rule-hair) solid var(--nav-edge);
  color: var(--nav-paper);
}

/* On the ink bands the ring is paper, so it keeps 3:1 against the band. */
.site-header :focus-visible {
  outline-color: var(--nav-paper);
}

.close :focus-visible {
  outline-color: var(--close-fg);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  min-height: var(--nav-h);
}

.brand {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-optical-sizing: auto;
  color: var(--nav-paper);
  text-decoration: none;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.nav__links a {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  color: var(--nav-paper-2);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-short) var(--ease-out);
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--nav-paper);
}

.nav__links a.is-active {
  box-shadow: inset 0 -2px 0 currentColor;
}

.nav__tools {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav__mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-md);
  border: var(--rule-hair) solid var(--nav-paper-3);
  color: var(--nav-paper);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out);
}

.nav__mail:hover {
  background: var(--nav-ink-2);
}

.nav__mail:active {
  transform: translateY(1px);
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.nav__toggle {
  display: none;
}

.nav__toggle .icon-close {
  display: none;
}

.nav__toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav__toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* ----- Hero: a banner, the search on the right ------------------------ */
.hero {
  position: relative;
  min-height: 56svh;
  padding-block: var(--space-2xl) var(--space-xl);
  border-bottom: var(--rule-hair) solid var(--color-ink);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-2xl);
  align-items: center;
  min-height: inherit;
}

.hero__text {
  display: grid;
  gap: var(--space-lg);
  justify-items: start;
}

.hero .lead {
  max-width: 34ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero__visual {
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
  gap: var(--space-sm);
  align-self: stretch;
  margin: 0;
}

.hero__stage {
  position: relative;
  min-height: 360px;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__caption {
  min-height: 1lh;
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

/* ----- Stages: the numbered workflow ----------------------------------- */
.stage {
  padding-block: var(--section-gap-s);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.stage:nth-of-type(even) {
  padding-block: var(--section-gap);
}

/* The banner hands on to stage one, whose head shows above the fold. */
.hero + .stage {
  padding-top: var(--space-3xl);
}

.stage__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-md) var(--gap-columns);
  align-items: end;
  margin-bottom: var(--space-2xl);
}

.stage__head .lead {
  padding-bottom: var(--space-2xs);
}

/* ----- Stage 1: the maze race ------------------------------------------ */
.demo__panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-columns);
}

.panel {
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-ink);
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.panel__status {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.panel canvas {
  width: 100%;
  aspect-ratio: 41 / 25;
  background: var(--maze-open);
  outline: var(--rule-hair) solid var(--color-rule);
  outline-offset: -1px;
}

.panel__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: var(--space-md) 0 0;
}

.panel__stats div {
  padding-inline: var(--space-lg);
  border-left: var(--rule-hair) solid var(--color-rule);
}

.panel__stats div:first-child {
  padding-left: 0;
  border-left: 0;
}

.panel__stats dt {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.panel__stats dd {
  margin: 0;
  font-family: var(--font-outlier);
  font-size: var(--text-xl);
  font-variant-numeric: tabular-nums;
}

.demo__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.demo__controls label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.demo__controls output {
  min-width: 3.2em;
  color: var(--color-ink);
  font-family: var(--font-outlier);
  font-variant-numeric: tabular-nums;
}

.demo__summary {
  margin-top: var(--space-md);
  color: var(--color-ink-2);
}

.demo__summary:empty {
  display: none;
}

.demo__fallback {
  display: none;
}

.demo__fallback img {
  outline: var(--rule-hair) solid var(--color-rule);
  outline-offset: -1px;
}

.demo__caption {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* ----- Stage 2: Bagh Chal, on a paper band ------------------------------ */
.baghchal {
  background: var(--color-paper-2);
}

.bc {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--space-2xl);
  align-items: start;
}

.bc__board {
  position: relative;
  max-width: var(--board-max);
  aspect-ratio: 1;
  background: var(--bc-wood) url("assets/board-wood.webp") center / cover;
  outline: var(--rule-hair) solid var(--color-ink);
  outline-offset: -1px;
}

.bc__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--bc-line);
  opacity: 0.9;
}

.bc__points {
  position: absolute;
  inset: 0;
}

.bc__point {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bc-line);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.bc__point::before {
  content: "";
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
  transition: transform var(--dur-micro) var(--ease-out), opacity var(--dur-micro) var(--ease-out);
}

.bc__point:hover::before {
  transform: scale(1.5);
}

.bc__point img {
  position: absolute;
  width: auto;
  height: auto;
  max-width: 96%;
  max-height: 90%;
  pointer-events: none;
}

.bc__point.has-piece::before {
  opacity: 0;
}

.bc__point.is-selected {
  box-shadow: 0 0 0 3px var(--bc-select);
}

.bc__point.is-target {
  box-shadow: 0 0 0 3px var(--bc-target);
}

.bc__point.is-target::before {
  opacity: 1;
  background: var(--bc-target);
  transform: scale(1.6);
}

.bc__point.is-hint {
  box-shadow: 0 0 0 3px var(--bc-hint);
}

.bc__point:disabled {
  cursor: default;
}

.bc__point:focus-visible {
  outline: 2px solid var(--color-paper);
  outline-offset: 2px;
}

.bc__banner {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-optical-sizing: auto;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.bc__panel {
  display: grid;
  gap: var(--space-lg);
}

.bc__status {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-optical-sizing: auto;
  line-height: 1.1;
}

.bc__counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding-block: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-ink);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.bc__counts div {
  padding-inline: var(--space-md);
  border-left: var(--rule-hair) solid var(--color-rule);
}

.bc__counts div:first-child {
  padding-left: 0;
  border-left: 0;
}

.bc__counts dt {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.bc__counts dd {
  margin: 0;
  font-family: var(--font-outlier);
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums;
}

.bc__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}

.seg {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.seg legend {
  margin-bottom: var(--space-xs);
  padding: 0;
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.seg__cells {
  position: relative;
  display: flex;
  border: var(--rule-hair) solid var(--color-ink);
}

.seg input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.seg label {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-xs);
  border-left: var(--rule-hair) solid var(--color-ink);
  font-size: var(--text-sm);
  text-align: center;
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out);
}

.seg label:first-of-type {
  border-left: 0;
}

.seg input:checked + label {
  background: var(--color-paper);
  box-shadow: inset 0 -2px 0 var(--color-ink);
  font-weight: 500;
}

.seg input:focus-visible + label {
  outline: 2px solid var(--color-focus);
  outline-offset: -3px;
}

.bc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.bc__details {
  border-top: var(--rule-hair) solid var(--color-rule);
}

.bc__details:last-of-type {
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.bc__details summary {
  padding: var(--space-sm) 0;
  font-weight: 500;
  cursor: pointer;
}

.bc__details > :not(summary) {
  margin-bottom: var(--space-md);
}

.bc__details ul {
  margin: 0;
  padding-left: var(--space-lg);
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

.bc__details li + li {
  margin-top: var(--space-xs);
}

.bc__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.bc__table th,
.bc__table td {
  padding: var(--space-xs) var(--space-2xs);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  text-align: right;
}

.bc__table th:first-child,
.bc__table td:first-child {
  text-align: left;
}

.bc__table thead th {
  font-weight: 500;
  color: var(--color-muted);
}

.bc__table tfoot th,
.bc__table tfoot td {
  border-bottom: 0;
  font-weight: 500;
}

.bc__nodes {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.bc__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  font-size: var(--text-sm);
}

/* ----- Stage 3: the repos as an index ------------------------------------ */
.index {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule-hair) solid var(--color-ink);
}

.index__row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 3fr) minmax(0, 6fr);
  gap: var(--space-lg) var(--gap-columns);
  align-items: start;
  padding-block: var(--space-xl);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.index__row--text {
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
}

.index__title h3 {
  font-size: var(--text-xl);
}

.index__meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-top: var(--space-xs);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-muted);
}

.index__meta:empty {
  display: none;
}

.index__meta svg {
  width: 14px;
  height: 14px;
}

.index__body p {
  max-width: 48ch;
}

.index__stack {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.index__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-md);
  font-weight: 500;
}

/* Each capture keeps its own proportions; nothing is cropped away. */
.plate {
  margin: 0;
  background: var(--color-paper-2);
  outline: var(--rule-hair) solid var(--color-rule);
  outline-offset: -1px;
}

.plate img {
  width: 100%;
  height: auto;
}

.index__more {
  margin-top: var(--space-lg);
  color: var(--color-ink-2);
}

/* ----- Stage 4: GitHub ----------------------------------------------------- */
.gh-chart {
  margin: 0;
  padding: var(--space-lg);
  border: var(--rule-hair) solid var(--color-rule);
}

.chart {
  width: 100%;
  height: auto;
  display: block;
}

.chart__labels text {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--color-muted);
}

.gh-chart figcaption {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: var(--space-2xl) 0 0;
  padding: 0;
  list-style: none;
}

.stat {
  padding-inline: var(--space-lg);
  border-left: var(--rule-hair) solid var(--color-rule);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat__value {
  display: block;
  min-height: 1em;
  font-family: var(--font-outlier);
  font-size: var(--text-3xl);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--color-accent);
}

.stat__label {
  display: block;
  margin-top: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.repos__title {
  margin-top: var(--space-2xl);
  font-size: var(--text-lg);
}

.repos {
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule-hair) solid var(--color-ink);
}

.repos li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-lg);
  padding-block: var(--space-md);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.repos__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2xs) var(--space-md);
  min-width: 0;
}

.repos__main a {
  font-weight: 500;
}

.repos__desc {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.repos time {
  flex-shrink: 0;
  font-size: var(--text-sm);
  color: var(--color-muted);
  white-space: nowrap;
}

.gh-note {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* ----- Stage 5: the builder ----------------------------------------------- */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--space-2xl) var(--gap-columns);
  align-items: start;
}

/* A small portrait beside the name, in its own colours. */
.profile__photo {
  width: 120px;
  height: 150px;
  object-fit: cover;
  background: var(--plate-paper);
  outline: var(--rule-hair) solid var(--color-rule);
  outline-offset: -1px;
}

.profile__name {
  margin-top: var(--space-md);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-optical-sizing: auto;
}

.profile__facts {
  display: grid;
  margin: var(--space-xs) 0 0;
  padding: 0;
  list-style: none;
}

.profile__facts li {
  padding-block: var(--space-xs);
  border-top: var(--rule-hair) solid var(--color-rule);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

.about {
  max-width: 52ch;
  font-size: var(--text-lead);
  line-height: 1.45;
}

.profile__now {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-ink);
  color: var(--color-ink-2);
}

.profile__now strong {
  font-weight: 500;
  color: var(--color-ink);
}

.skills__title {
  margin-top: var(--space-2xl);
  font-size: var(--text-xl);
}

.skills__intro {
  margin-top: var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.skills {
  margin: var(--space-md) 0 0;
  border-top: var(--rule-hair) solid var(--color-ink);
}

.skills__row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: var(--space-xs) var(--gap-columns);
  padding-block: var(--space-md);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.skills dt {
  font-weight: 500;
}

.skills dd {
  margin: 0;
  color: var(--color-ink-2);
}


/* ----- The close: the ink band ---------------------------------------------- */
.close {
  padding-block: var(--section-gap-s);
  border-top: var(--rule-hair) solid var(--close-edge);
  background: var(--close-bg);
  color: var(--close-fg);
}

.close h2 {
  max-width: 24ch;
}

.close .lead {
  margin-top: var(--space-lg);
  color: var(--close-fg-2);
}

.close__mail {
  display: inline-block;
  margin-top: var(--space-xl);
  color: var(--close-fg);
  font-family: var(--font-outlier);
  font-size: var(--text-mail);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration-color: var(--close-fg-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.close__mail:hover {
  text-decoration-thickness: 2px;
}

.close__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: var(--space-xl) 0 0;
  padding: var(--space-lg) 0 0;
  border-top: var(--rule-hair) solid var(--close-rule);
  list-style: none;
}

.close__links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--close-fg-2);
  text-decoration-color: var(--close-fg-3);
}

.close__links a:hover {
  color: var(--close-fg);
}

.close__links svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ----- Footer: a colophon ---------------------------------------------------- */
.site-footer {
  padding-block: var(--space-2xl);
}

.site-footer p {
  max-width: 60ch;
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

/* ----- Under 60rem: everything stacks in reading order --------------------- */
@media (max-width: 60rem) {
  .nav__toggle {
    display: inline-flex;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--space-sm) var(--gutter) var(--space-lg);
    background: var(--nav-ink);
    border-top: var(--rule-hair) solid var(--nav-ink-2);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    display: block;
    padding: var(--space-sm) 0;
    font-size: var(--text-md);
  }

  .nav__mail {
    display: none;
  }

  .hero {
    min-height: 0;
    padding-block: var(--space-xl);
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

  .hero__visual {
    grid-template-rows: minmax(240px, 1fr) auto;
  }

  .hero__stage {
    min-height: 240px;
  }

  .stage__head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    margin-bottom: var(--space-xl);
  }

  .demo__panels,
  .bc,
  .bc__options,
  .profile,
  .index__row,
  .index__row--text {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat {
    padding: var(--space-md) 0;
    border-left: 0;
    border-top: var(--rule-hair) solid var(--color-rule);
  }

  .stat:first-child {
    border-top: 0;
  }

  .repos li {
    flex-direction: column;
    gap: var(--space-2xs);
  }

  .skills__row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2xs);
  }

  .bc__board {
    max-width: none;
  }
}

@media (max-width: 479px) {
  /* The year of commits keeps its cells readable and scrolls inside its box. */
  .gh-chart {
    overflow-x: auto;
  }

  .chart {
    width: auto;
    min-width: 640px;
  }

  .demo__live {
    display: none;
  }

  .demo__fallback {
    display: block;
  }

  .actions .btn {
    width: 100%;
  }

  .bc__counts {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-sm);
  }

  .bc__counts div {
    padding-inline: 0;
    border-left: 0;
  }

  .bc__banner {
    font-size: var(--text-md);
  }
}
