/* Tokens ------------------------------------------------------------ */
:root {
  --paper: #ffffff;
  --panel: #eef3ff;
  --ink: #0a1a4f;       /* deep blue, stands in for black */
  --soft: #4a5a8c;
  --rule: #d3ddf7;
  --mark: #1f4bff;
  --on-mark: #ffffff;
  --bar: #a9bbf0;       /* timeline bars that are not featured */
  --hl: #cfdbff;        /* highlighter band behind the day count */

  /* contribution graph levels, 0 = empty */
  --l0: #e4ebfc; --l1: #b5c6ff; --l2: #7f9bff; --l3: #4a6dff; --l4: #1f4bff;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.56rem, 1.35rem + 1vw, 2.1rem);
  --step-4: clamp(2.05rem, 1.2rem + 3.6vw, 4.2rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --font: "Archivo", system-ui, sans-serif;
}

/* Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--font);
  font-variation-settings: "wdth" 100;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
ol { padding: 0; list-style: none; }
code { font: inherit; font-variation-settings: "wdth" 88; background: var(--panel); padding: 0.05em 0.35em; border-radius: 4px; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--mark); }
:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--mark); color: var(--on-mark); }

.wrap { width: min(100% - 2 * var(--gutter), 76rem); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; }
.skip:focus { left: var(--gutter); top: 0.5rem; z-index: 10; }

/* Top --------------------------------------------------------------- */
.top { display: flex; justify-content: space-between; align-items: baseline; padding-block: 3.75rem 1.5rem; }
.name { font-weight: 700; font-variation-settings: "wdth" 112; text-decoration: none; }
.top nav { display: flex; gap: 1.5rem; }
.top nav a { color: var(--soft); text-decoration: none; }
.top nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--mark); }

/* Hero -------------------------------------------------------------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero { padding-block: clamp(2rem, 4.5vw, 3.5rem) clamp(1rem, 2vw, 1.5rem); }
.graph { margin: 0; background: var(--paper); }
.hero h1 {
  font-size: var(--step-4);
  line-height: 1.02;
  font-weight: 680;
  font-variation-settings: "wdth" 116;
  letter-spacing: -0.025em;
  max-width: 22ch;
  text-wrap: balance;
}
.hero-next { margin-top: 1.5rem; font-size: var(--step-2); line-height: 1.3; max-width: 44ch; font-weight: 420; }
.hero-next #days, .hero-next #clock { font-variant-numeric: tabular-nums; }
.hero-next #days { box-shadow: inset 0 -0.42em 0 var(--hl); }
.hero-about { margin-top: 1rem; color: var(--soft); max-width: 75ch; }

/* contribution graph: 53 weeks by 7 days, like the real one */
.graph { align-self: start; min-width: 0; border: 1px solid var(--rule); border-radius: 10px; padding: clamp(0.7rem, 1.6vw, 1.1rem); }
.months { display: grid; grid-template-columns: repeat(53, 1fr); gap: clamp(1.5px, 0.22vw, 3px); margin-bottom: 0.35rem; font-size: 0.72rem; color: var(--soft); font-variation-settings: "wdth" 80; line-height: 1; }
.months span { white-space: nowrap; overflow: visible; width: 0; }
.legend { display: inline-flex; align-items: center; gap: 3px; }
.legend i { width: 0.62rem; height: 0.62rem; border-radius: 22%; background: var(--l0); }
.legend i[data-l="1"] { background: var(--l1); } .legend i[data-l="2"] { background: var(--l2); }
.legend i[data-l="3"] { background: var(--l3); } .legend i[data-l="4"] { background: var(--l4); }
.legend i:first-of-type { margin-left: 0.3rem; } .legend i:last-of-type { margin-right: 0.3rem; }
.graph-action { margin-top: 0.6rem; font-size: var(--step--1); }
.cells {
  display: grid; grid-template-columns: repeat(53, 1fr); grid-template-rows: repeat(7, auto);
  grid-auto-flow: column; gap: clamp(1.5px, 0.22vw, 3px);
}
.cells span {
  aspect-ratio: 1; border-radius: 22%; background: var(--l0);
  transition: background-color 380ms ease, transform 380ms cubic-bezier(.3,1.6,.5,1);
  transition-delay: calc(var(--c) * 14ms);
}
.cells span[data-l="1"] { background: var(--l1); }
.cells span[data-l="2"] { background: var(--l2); }
.cells span[data-l="3"] { background: var(--l3); }
.cells span[data-l="4"] { background: var(--l4); }
.cells.is-moving span { transform: scale(0.35) rotate(45deg); }
.graph figcaption {
  margin-top: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; justify-content: space-between;
  font-size: var(--step--1); color: var(--soft);
}
.graph button {
  font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}
.graph button:hover { color: var(--mark); }

@media (min-width: 64rem) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 33rem); column-gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
  .layout > .rest { display: contents; }
  .rest > .timeline { grid-column: 1; grid-row: 1; }
  .rest > .contact { grid-column: 1; grid-row: 2; }
  .rest > .logo-wall { grid-column: 2; grid-row: 1; align-self: start; padding-top: clamp(4rem, 9vw, 7rem); }
  .rest .chart { --label: 11.25rem; }
  .rest .detail { margin-left: 11.25rem; }
  .rest .axis em { display: none; }
  .rest .row-name { font-variation-settings: "wdth" 78; }
}
@media (prefers-reduced-motion: reduce) {
  .cells span { transition: none; }
}

/* Section heads ------------------------------------------------------ */
.section-head { display: grid; gap: 0.5rem; margin-bottom: 2rem; }
.section-head h2 { font-size: var(--step-2); line-height: 1.15; font-weight: 650; font-variation-settings: "wdth" 110; letter-spacing: -0.01em; }
.section-head p { color: var(--soft); max-width: 58ch; }

/* Timeline ----------------------------------------------------------- */
.timeline { padding-block: clamp(4rem, 9vw, 7rem) 3rem; }
.chart { --label: 11.5rem; position: relative; border-top: 1px solid var(--ink); overflow: hidden; padding-bottom: 0.75rem; }

.axis { position: relative; height: 2rem; margin-left: var(--label); }
.axis span {
  position: absolute; top: 0.45rem; transform: translateX(0.4rem);
  font-size: var(--step--1); color: var(--soft);
  font-variation-settings: "wdth" 80; white-space: nowrap;
}
.axis i { position: absolute; top: 0; width: 1px; background: var(--rule); height: 200rem; pointer-events: none; }
.axis em { font-style: normal; }

.rows { position: relative; }
.row a {
  display: grid; grid-template-columns: var(--label) 1fr; align-items: center;
  min-height: 2.05rem; text-decoration: none; border-top: 1px solid transparent;
}
.row-name {
  font-variation-settings: "wdth" 84; font-weight: 520; font-size: var(--step-0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 1rem;
}
.row-track { position: relative; height: 0.72rem; }
.row-bar {
  position: absolute; top: 0; bottom: 0; min-width: 7px; border-radius: 2px;
  background: var(--bar); transform-origin: left center;
}
.row.is-key .row-bar { background: var(--mark); }
.row.is-key .row-name { font-weight: 700; }
.row-meta { display: none; }

.row a:hover .row-bar, .row a:focus-visible .row-bar { background: var(--mark); }
.row a:hover .row-name, .row a:focus-visible .row-name { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.rows:hover .row:not(:hover) .row-bar, .rows:focus-within .row:not(:focus-within) .row-bar { opacity: 0.28; }
.row-bar { transition: opacity 120ms linear; }

.detail {
  margin-top: 1rem; margin-left: 11.5rem; min-height: 4.8em; max-width: 60ch;
  padding-top: 0.9rem; border-top: 1px solid var(--rule);
}
.detail-idle { color: var(--soft); }
.detail b { font-weight: 680; }
.detail .when { color: var(--soft); font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 86; }

/* one load moment: bars draw in, oldest first */
@media (prefers-reduced-motion: no-preference) {
  .chart.is-ready .row-bar { animation: draw 620ms cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 45ms + 150ms); }
  @keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

@media (max-width: 46rem) {
  .chart { --label: 0rem; }
  .axis { margin-left: 0; }
  .row a { grid-template-columns: 1fr; padding-block: 0.7rem 0.8rem; gap: 0.35rem; border-top-color: var(--rule); }
  .row:first-child a { border-top-color: transparent; }
  .row-name { white-space: normal; }
  .row-meta { display: block; color: var(--soft); font-size: var(--step--1); line-height: 1.4; }
  .detail { display: none; }
  .axis i { display: none; }
  .axis em { display: none; }
  .axis span { transform: none; }
}

/* Worth opening: wheel + panels ---------------------------------------- */
.wheel-section { padding-block: 1rem 0; position: relative; }
.wheel-side h2 { font-size: var(--step-2); line-height: 1.15; font-weight: 650; font-variation-settings: "wdth" 110; letter-spacing: -0.01em; }
.wheel, .wheel-hint { display: none; }

.widget-logo {
  flex: none; width: 3.1rem; height: 3.1rem; border-radius: 27%; overflow: hidden; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--rule);
}
.widget-logo img { width: 100%; height: 100%; object-fit: cover; }
.widget-logo .mono { width: 100%; height: 100%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; font-size: 1rem; font-variation-settings: "wdth" 112; letter-spacing: 0.02em; }
.widget-text { display: grid; gap: 0.1rem; min-width: 0; }
.widget-text b { font-size: var(--step-1); font-weight: 680; font-variation-settings: "wdth" 108; line-height: 1.15; letter-spacing: -0.01em; }
.widget-text span { font-size: var(--step--1); color: var(--soft); }

.panel { padding-block: 2.5rem; border-top: 1px solid var(--rule); display: grid; gap: 1.5rem; }
.panel:first-child { border-top-color: var(--ink); margin-top: 2rem; }
.panel-head { display: flex; align-items: center; gap: 0.9rem; }
.piece-lede { font-size: var(--step-1); line-height: 1.35; text-wrap: pretty; max-width: 46ch; }

/* how-it-works diagram: a numbered pipeline, because it is one */
.flow { display: grid; gap: 1.6rem; counter-reset: none; }
.flow li {
  position: relative; display: grid; gap: 0.3rem; align-content: start; padding: 0.85rem 0.9rem 0.9rem;
  background: #fff; border: 1px solid var(--rule); border-radius: 10px; font-size: var(--step--1); line-height: 1.35;
}
.flow b { font-size: 0.98rem; font-weight: 680; font-variation-settings: "wdth" 104; line-height: 1.2; }
.flow-n { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--mark); font-size: 0.8rem; }
.flow-sub { color: var(--soft); }
.flow-where { justify-self: start; margin-top: 0.25rem; padding: 0.12rem 0.45rem; border-radius: 999px; background: var(--panel); color: var(--ink); font-size: 0.72rem; font-variation-settings: "wdth" 88; }
.flow li.is-key { background: var(--mark); border-color: var(--mark); color: #fff; }
.flow li.is-key .flow-n, .flow li.is-key .flow-sub { color: #fff; }
.flow li.is-key .flow-where { background: rgba(255, 255, 255, 0.2); color: #fff; }
/* connector: a line with an arrow head, pointing to the next step */
.flow li:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 1.6rem; background: var(--bar);
}
.flow li:not(:last-child)::before {
  content: ""; position: absolute; left: 50%; top: calc(100% + 1.6rem - 7px); width: 7px; height: 7px; margin-left: -3.5px;
  border-right: 1.5px solid var(--bar); border-bottom: 1.5px solid var(--bar); transform: translateY(-2px) rotate(45deg); z-index: 1;
}
.flow-note { margin-top: 0.8rem; font-size: var(--step--1); color: var(--soft); }

@media (min-width: 46rem) {
  .flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.4rem; }
  .flow li:not(:last-child)::after { left: 100%; top: 50%; width: 1.4rem; height: 1.5px; }
  .flow li:not(:last-child)::before { left: calc(100% + 1.4rem - 8px); top: 50%; margin-left: 0; margin-top: -3.5px; transform: rotate(-45deg); }
}

.panel-bottom { display: grid; gap: 1.5rem; }
.panel-text > p:first-child { color: var(--soft); max-width: 52ch; }
.facts { margin-top: 1.25rem; display: grid; gap: 0.5rem; font-size: var(--step--1); }
.facts div { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); }
.facts dt { color: var(--soft); }
.links { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
.links a:first-child { background: var(--mark); color: var(--on-mark); text-decoration: none; font-weight: 600; padding: 0.7rem 1.15rem; border-radius: 6px; }
.links a:first-child:hover { background: var(--ink); color: var(--on-mark); }
.panel-shot { background: var(--panel); border-radius: 10px; padding: clamp(0.75rem, 2vw, 1.25rem); overflow: hidden; }
.panel-shot img { border-radius: 6px; border: 1px solid var(--rule); width: 100%; }
.panel-phone .panel-shot { display: grid; justify-items: center; }
.panel-phone .panel-shot img { width: min(100%, 17rem); border-radius: 20px; }
@media (min-width: 46rem) { .panel-bottom { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }

/* Pinned mode: the page holds still and the wheel turns ---------------- */
@media (min-width: 64rem) and (min-height: 38rem) {
  .wheel-section { height: 340vh; padding: 0; }
  .wheel-pin {
    position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: clamp(21rem, 23vw, 24rem) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 5vw, 5rem); align-items: center; padding-bottom: 4.5rem;
    width: auto; margin-inline: 0; padding-left: max(var(--gutter), calc((100vw - 76rem) / 2)); padding-right: var(--gutter);
  }
  .wheel-side { display: grid; gap: 1.5rem; align-content: center; }
  .wheel { display: block; position: relative; height: 30rem; perspective: 1000px; }
  .wheel li { position: absolute; left: 0; right: 0; top: 50%; transform-origin: 50% 50% -250px; will-change: transform, filter, opacity; }
  .widget {
    display: flex; align-items: center; gap: 1.15rem; padding: 1.35rem 1.4rem; text-decoration: none;
    background: #fff; border: 1px solid var(--rule); border-radius: 22px; box-shadow: 0 6px 22px rgba(10, 26, 79, 0.08);
    transform: translateY(-50%);
  }
  .wheel li.is-active .widget { border-color: var(--mark); box-shadow: 0 10px 34px rgba(31, 75, 255, 0.2); }
  .wheel .widget-logo { width: clamp(3.6rem, 4vw, 4.4rem); height: clamp(3.6rem, 4vw, 4.4rem); }
  .wheel .widget-logo .mono { font-size: 1.35rem; }
  .wheel .widget-text b { font-size: clamp(1.5rem, 1.6vw, 1.75rem); }
  .wheel .widget-text span { font-size: 1rem; }
  .wheel-hint { display: block; font-size: var(--step--1); color: var(--soft); max-width: 24ch; }

  .panels { position: relative; height: min(44rem, 100vh - 8.5rem); }
  .panel {
    position: absolute; inset: 0; margin: 0 !important; padding: 0; border: 0;
    grid-template-columns: minmax(0, clamp(23rem, 29vw, 30rem)) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); column-gap: clamp(2.5rem, 3.5vw, 4.5rem); row-gap: 1.25rem;
    grid-template-areas: "lede shot" "flow shot" "text shot"; zoom: var(--fit, 1);
    opacity: 0; visibility: hidden; transform: translateY(18px);
    transition: opacity 320ms ease, transform 320ms ease, visibility 0s linear 320ms;
  }
  .panel.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .panel-head { display: none; }
  .panel-flow { grid-area: flow; }
  .panel > .piece-lede { grid-area: lede; }
  .panel-bottom { display: contents; }
  .panel-text { grid-area: text; }
  .panel-shot { grid-area: shot; }
  /* the whole screenshot, never cropped: as large as its column allows, pinned to the top */
  .panel-shot { position: relative; height: 100%; min-height: 0; padding: 0; background: none; overflow: visible; }
  .panel-shot img, .panel-phone .panel-shot img {
    position: absolute; top: 0; left: 0; width: auto; height: auto; max-width: 100%; max-height: 100%;
    border-radius: 10px; border: 1px solid var(--rule); box-shadow: 0 14px 40px rgba(10, 26, 79, 0.12);
  }
  .panel-phone .panel-shot img { border-radius: 22px; }
  /* pinned: the diagram already says how it is built, so the facts table and footnote step aside */
  .panel .facts, .panel .flow-note { display: none; }
  /* in the pinned column the diagram runs top to bottom as a stepper */
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
  .flow li {
    grid-template-columns: 1.7rem minmax(0, 1fr) auto; grid-template-areas: "n title where" "n sub sub";
    column-gap: 0.75rem; row-gap: 0.1rem; align-items: start; padding: 0.6rem 0.8rem 0.65rem;
  }
  .flow-n { grid-area: n; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--panel); margin-top: 0.1rem; }
  .flow li.is-key .flow-n { background: rgba(255, 255, 255, 0.22); }
  .flow b { grid-area: title; }
  .flow-sub { grid-area: sub; }
  .flow-where { grid-area: where; margin-top: 0; align-self: center; }
  .flow li:not(:last-child)::after { left: 1.65rem; top: 100%; width: 1.5px; height: 0.9rem; }
  .flow li:not(:last-child)::before { left: 1.65rem; top: calc(100% + 0.9rem - 7px); margin-left: -2.75px; margin-top: 0; transform: translateY(-2px) rotate(45deg); }
}
@media (min-width: 64rem) and (min-height: 38rem) and (prefers-reduced-motion: reduce) {
  .panel { transition: none; }
}

/* Contact ------------------------------------------------------------ */
.contact { padding-block: clamp(4rem, 10vw, 8rem); border-top: 1px solid var(--ink); }
.contact h2 {
  font-size: var(--step-2); line-height: 1.2; font-weight: 600; font-variation-settings: "wdth" 108;
  max-width: 28ch; text-wrap: balance; letter-spacing: -0.01em;
}

.foot { padding-block: 1.5rem 3rem; color: var(--soft); font-size: var(--step--1); }

@media (max-width: 30rem) {
  .hero h1 { font-variation-settings: "wdth" 106; overflow-wrap: anywhere; }
}

/* Dock --------------------------------------------------------------- */
body { padding-bottom: 7rem; }
.dock {
  --size: 2.9rem;
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: flex; align-items: flex-end; gap: 0.5rem; height: calc(var(--size) + 1.1rem);
  padding: 0.55rem 0.65rem; border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(1.7); backdrop-filter: blur(20px) saturate(1.7);
  border: 1px solid rgba(31, 75, 255, 0.16);
  box-shadow: 0 10px 34px rgba(10, 26, 79, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.dock-item {
  --s: 1; position: relative; display: block; flex: none; text-decoration: none;
  width: calc(var(--size) * var(--s)); height: calc(var(--size) * var(--s));
  transition: width 160ms ease-out, height 160ms ease-out;
}
.dock.is-tracking .dock-item { transition: none; }
.tile {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 27%;
  color: #fff; box-shadow: 0 2px 6px rgba(10, 26, 79, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.tile svg { width: 52%; height: 52%; }
.t1 { background: #1f4bff; } .t2 { background: #4a6dff; } .t3 { background: #0a1a4f; }
.t4 { background: #7f9bff; color: #0a1a4f; } .t5 { background: #ffffff; color: #0a1a4f; border: 1px solid var(--rule); }

/* running-app dot under the section you are in */
.dock-item::after {
  content: ""; position: absolute; left: 50%; bottom: -0.36rem; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--ink); opacity: 0; transition: opacity 150ms linear;
}
.dock-item.is-here::after { opacity: 1; }

.tip {
  position: absolute; left: 50%; bottom: calc(100% + 0.7rem); transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 0.78rem; line-height: 1; white-space: nowrap;
  padding: 0.42rem 0.6rem; border-radius: 0.45rem; opacity: 0; pointer-events: none; transition: opacity 100ms linear;
}
.tip::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -4px; border: 4px solid transparent; border-top-color: var(--ink); }
.dock-item:hover .tip, .dock-item:focus-visible .tip { opacity: 1; }
.dock-item:focus-visible { outline-offset: 4px; border-radius: 27%; }
.dock-item:active .tile { filter: brightness(0.82); }

.dock-sep { align-self: stretch; width: 1px; margin: 0.15rem 0.15rem; background: rgba(10, 26, 79, 0.18); }

@media (max-width: 30rem) { .dock { --size: 2.6rem; gap: 0.4rem; } }
@media (prefers-reduced-motion: reduce) { .dock-item { transition: none; } }

/* Dithered dot bands at the top and bottom of the page ---------------- */
body { position: relative; }
.dither {
  position: absolute; left: 0; right: 0; height: 96px; pointer-events: none; z-index: 0;
  /* plain dot grid if the script has not run; main.js swaps in a random dither */
  background-image: radial-gradient(circle, var(--ink) 1px, transparent 1.2px); background-size: 6px 6px;
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent);
  opacity: 0.5;
}
.dither.is-drawn { -webkit-mask-image: none; mask-image: none; opacity: 1; background-size: auto; background-repeat: repeat-x; }
.dither-top { top: 0; border-top: 2px solid var(--ink); }
.dither-bottom { bottom: 0; transform: scaleY(-1); border-top: 2px solid var(--ink); }
.top, main, .foot { position: relative; z-index: 1; }

/* the opening screen fills the window, so the next section starts below the fold */
.hero-screen { min-height: calc(100svh - 7.2rem); display: flex; flex-direction: column; }

/* The Creation of Adam, in contribution squares. Two hands reach in, the graph sits between the fingertips. */
.touch { flex: 1; display: grid; align-items: center; overflow: hidden; padding-block: clamp(3rem, 8vw, 7rem) clamp(6rem, 10vw, 9rem); }
.touch-row {
  display: grid; grid-template-columns: minmax(0, 83fr) minmax(0, 69fr); align-items: center; column-gap: 0.75rem; row-gap: 2rem;
  width: min(100%, 112rem); margin-inline: auto; padding-inline: var(--gutter);
}
.hand { display: block; width: 100%; height: auto; transform: rotate(-12deg); }
.hand-adam { grid-column: 1; grid-row: 1; translate: 0 -8%; }
.hand-god { grid-column: 2; grid-row: 1; translate: 0 14%; }
.touch .graph { grid-column: 1 / -1; grid-row: 2; }

@media (min-width: 64rem) {
  /* the scene runs corner to corner: the arms enter from the bottom-left and top-right corners */
  .touch { --tilt: -21deg; --tilt: calc(-1 * atan2(56svh, 100vw)); place-items: center; padding-block: 0; }
  .touch-row {
    grid-template-columns: minmax(0, 83fr) minmax(30rem, 46rem) minmax(0, 69fr); column-gap: clamp(0.75rem, 1.4vw, 1.5rem);
    width: 110vw; max-width: none; padding-inline: 0; justify-self: start; margin-left: -5vw; transform: rotate(var(--tilt));
  }
  .hand { transform: none; }
  .hand-god { grid-column: 3; }
  .touch .graph { grid-column: 2; grid-row: 1; padding: clamp(1rem, 1.8vw, 1.6rem); border-radius: 14px; box-shadow: 0 24px 60px rgba(10, 26, 79, 0.10); }
  .touch .months { font-size: 0.85rem; }
  .touch .graph figcaption, .touch .graph-action { font-size: 1rem; }
}
}

/* Built with: brand marks as contribution squares, drifting sideways ---- */
.logo-wall { padding-block: 1rem 3rem; min-width: 0; }
.logo-wall h2 { font-size: var(--step-2); line-height: 1.15; font-weight: 650; font-variation-settings: "wdth" 110; letter-spacing: -0.01em; }
.logo-wall p { margin-top: 0.5rem; color: var(--soft); }
.wall {
  margin-top: 2rem; display: grid; gap: 0.9rem; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}
.wall-row { display: flex; gap: 0.9rem; width: max-content; animation: drift var(--t, 40s) linear infinite; }
.wall-row:nth-child(even) { animation-direction: reverse; }
.wall:hover .wall-row { animation-play-state: paused; }
.wall-row img { width: 5.2rem; height: 5.2rem; border-radius: 1.15rem; background: var(--ink); display: block; flex: none; }
@keyframes drift { to { transform: translateX(calc(-50% - 0.45rem)); } }
@media (prefers-reduced-motion: reduce) { .wall-row { animation: none; } }

/* contact details under the contact line */
.reach { margin-top: 2rem; display: grid; gap: 0.5rem; max-width: 30rem; }
.reach div { display: grid; grid-template-columns: 5rem 1fr; gap: 0.75rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); }
.reach dt { color: var(--soft); }
.reach a, .reach .copy { font: inherit; color: var(--ink); font-weight: 560; overflow-wrap: anywhere; }
.reach .copy { background: none; border: 0; padding: 0; cursor: copy; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.reach .copy:hover { text-decoration-thickness: 2px; text-decoration-color: var(--mark); }
.copy-note { color: var(--soft); font-size: var(--step--1); margin-left: 0.5rem; }

/* Second screen: the words, and the time since that commit on an iOS-style counter */
.intro.hero { padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 7vw, 6rem); }
.clock {
  margin-top: clamp(2rem, 4vw, 3rem); display: inline-grid; grid-auto-flow: column; align-items: start; gap: clamp(0.35rem, 1.2vw, 1rem);
  padding: clamp(1.1rem, 2.4vw, 1.9rem) clamp(1.2rem, 3vw, 2.4rem); border-radius: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--ink); color: #fff; box-shadow: 0 24px 60px rgba(10, 26, 79, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-family: -apple-system, "SF Pro Display", "SF Pro Rounded", var(--font); max-width: 100%;
}
.clock-unit { display: grid; justify-items: center; gap: 0.5rem; }
.clock-digits { display: flex; font-size: clamp(2.1rem, 7.2vw, 5.4rem); line-height: 1; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.clock-digit { position: relative; display: block; width: 0.62em; height: 1em; overflow: hidden; }
.clock-digit span { position: absolute; inset: 0; display: grid; place-items: center; }
.clock-digit .is-out { animation: digit-out 420ms cubic-bezier(.3,.7,.2,1) forwards; }
.clock-digit .is-in { animation: digit-in 420ms cubic-bezier(.3,.7,.2,1) forwards; }
@keyframes digit-out { to { transform: translateY(-100%); opacity: 0; } }
@keyframes digit-in { from { transform: translateY(100%); opacity: 0; } }
.clock-label { font-size: clamp(0.62rem, 1.1vw, 0.8rem); letter-spacing: 0.08em; color: var(--l1); font-weight: 500; }
.clock-sep { font-size: clamp(2.1rem, 7.2vw, 5.4rem); line-height: 0.9; font-weight: 300; color: var(--l2); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .clock-digit .is-out, .clock-digit .is-in, .clock-sep { animation: none; } .clock-digit .is-out { display: none; } }
.intro .hero-next { margin-top: clamp(2rem, 4vw, 3rem); }
.intro.hero { min-height: 100svh; display: grid; align-content: center; justify-items: start; }
