/* Julian Monk — professional site, candidate v0.2.
   One motif: the measure. A ruler edge opens every section, the hero meter crosses the quota line,
   and the highlighter marks only verified figures. Everything else stays quiet. */

/* Fonts are served from this site (fonts/, SIL Open Font License 1.1; licences in fonts/*-OFL.txt).
   They are Google Fonts' own Latin WOFF2 files, unchanged (sources and hashes: ../fonts_source/).
   Fraunces italic is only used at weight 300 with SOFT 100, so its file is that single instance.
   Characters outside the range (the arrows → and ↗) fall back to system fonts, as they did before.
   No <link rel=preload>: measured on throttled connections it delayed first paint by 0.6–2 s, while
   font-display: swap with no preload paints as early as before with a layout shift of 0.005. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/fraunces-roman.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;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/fraunces-italic-300.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;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/instrument-sans.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;
}

:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --ink: #191a17;
  --muted: #5c5950;
  --line: rgb(25 26 23 / 0.14);
  --line-strong: rgb(25 26 23 / 0.42);
  --plan: rgb(25 26 23 / 0.54); /* dashed "planned" outlines: 3:1 against paper */
  --mark: #f3cf4f;
  --mark-ink: #191a17;
  --ok: #2c6e49;
  --hl-pos: 0 88%;
  --hl-h: 0.62em;

  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --col-gap: clamp(16px, 2.6vw, 40px);
  --bar-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light dark;
}

/* Dark: follows the system unless the visitor picked a theme with the toggle (data-theme, set by boot.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131411;
    --paper-2: #1d1e1a;
    --ink: #ecebe4;
    --muted: #a7a498;
    --line: rgb(236 235 228 / 0.14);
    --line-strong: rgb(236 235 228 / 0.42);
    --plan: rgb(236 235 228 / 0.45);
    --mark: #e9c547;
    --mark-ink: #131411;
    --ok: #7fcf9c;
    --hl-pos: 0 100%;
    --hl-h: 0.2em;
  }
}

:root[data-theme="dark"] {
  --paper: #131411;
  --paper-2: #1d1e1a;
  --ink: #ecebe4;
  --muted: #a7a498;
  --line: rgb(236 235 228 / 0.14);
  --line-strong: rgb(236 235 228 / 0.42);
  --plan: rgb(236 235 228 / 0.45);
  --mark: #e9c547;
  --mark-ink: #131411;
  --ok: #7fcf9c;
  --hl-pos: 0 100%;
  --hl-h: 0.2em;
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

[hidden] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ol, ul, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

::selection {
  background: var(--mark);
  color: var(--mark-ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

main:focus {
  outline: none;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper); /* Safari before 16.2 has no color-mix(): a solid header in the current theme */
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.bar.is-scrolled {
  border-bottom-color: var(--line);
}

.bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  height: var(--bar-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.bar__home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  font-variation-settings: "SOFT" 50;
  letter-spacing: -0.01em;
}

.bar__mark {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.bar__mark .mark-over {
  fill: var(--mark);
}

.bar__nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 32px);
  font-size: 0.95rem;
}

.bar__nav a {
  position: relative;
  display: inline-block;
  padding-block: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.bar__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 3px;
  background: var(--mark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.bar__nav a:hover,
.bar__nav a:focus-visible,
.bar__nav a[aria-current] {
  color: var(--ink);
}

.bar__nav a[aria-current]::after,
.bar__nav a:hover::after {
  transform: scaleX(1);
}

.bar__navwrap {
  margin-left: auto;
}

.bar__num {
  display: none;
}

/* The reading line: a highlighter rule under the header that measures how far down the page you are. */
.bar__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--mark);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.bar__menu,
.theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.bar__menu {
  display: none;
  gap: 10px;
  padding-inline: 10px;
  font-size: 0.95rem;
  font-weight: 500;
}

.bar__menu-icon,
.bar__menu-icon::before {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.bar__menu-icon {
  position: relative;
  transform: translateY(-3px);
}

.bar__menu-icon::before {
  content: "";
  position: absolute;
  top: 6px;
  width: 12px;
}

.bar.is-open .bar__menu-icon {
  transform: translateY(0) rotate(45deg);
}

.bar.is-open .bar__menu-icon::before {
  top: 0;
  width: 18px;
  transform: rotate(-90deg);
}

.theme {
  width: 40px;
  padding: 0;
}

.theme svg {
  width: 20px;
  height: 20px;
  transition: transform 0.5s var(--ease);
}

.theme__ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.theme__half {
  fill: currentColor;
}

.theme:hover {
  border-color: var(--line-strong);
}

.theme[aria-pressed="true"] svg {
  transform: rotate(180deg);
}

/* ---------- Shared type ---------- */

.eyebrow,
.rail__label,
.status,
.meter__caption,
.toolkit__title,
.state {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

h2 {
  font-family: var(--display);
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
  font-weight: 400;
  font-variation-settings: "SOFT" 30;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h3 {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
}

.section__lede {
  margin-top: 1rem;
  max-width: 36em;
  color: var(--muted);
  font-size: 1.05em;
  text-wrap: pretty;
}

/* The highlighter: used only on verified figures. */
.hl {
  color: inherit;
  background: linear-gradient(100deg, transparent 0.1em, var(--mark) 0.1em calc(100% - 0.1em), transparent calc(100% - 0.1em))
    no-repeat var(--hl-pos) / 100% var(--hl-h);
  padding-inline: 0.08em;
  margin-inline: -0.08em;
}

.motion .hl {
  background-size: 0% var(--hl-h);
  transition: background-size 0.9s var(--ease) 0.15s;
}

.motion .hl.is-lit {
  background-size: 100% var(--hl-h);
}

/* ---------- Buttons and links ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.75em 1.3em;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--ink) linear-gradient(var(--mark), var(--mark)) no-repeat 0 0 / 0% 100%;
  color: var(--paper);
  font: inherit;
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-size 0.45s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover {
  background-size: 100% 100%;
  color: var(--mark-ink);
  border-color: var(--mark);
}

.btn--quiet {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--quiet:hover {
  border-color: var(--mark);
}

.btn span {
  transition: transform 0.35s var(--ease);
}

.btn:hover span {
  transform: translateX(3px);
}

.btn[href="#results"]:hover span {
  transform: translateY(3px);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(28px, 4.5vw, 64px);
  padding-bottom: clamp(56px, 8vw, 112px);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  color: var(--ink);
}

.status__dot {
  flex: none;
  align-self: flex-start;
  margin-top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent);
}

.hero__title {
  margin-top: clamp(24px, 4vw, 48px);
  margin-left: -0.04em;
  font-family: var(--display);
  font-size: clamp(4.6rem, 1rem + 13vw, 11.5rem);
  font-weight: 350;
  font-variation-settings: "SOFT" 60;
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.hero__title em {
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100;
}

.hero__body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  margin-top: clamp(28px, 4vw, 52px);
}

.hero__lede {
  grid-column: 1 / span 6;
  font-family: var(--display);
  font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.95rem);
  font-weight: 380;
  font-variation-settings: "SOFT" 30;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.hero__next {
  grid-column: 1 / span 5;
  margin-top: 1rem;
  color: var(--muted);
}

.hero__actions {
  grid-column: 1 / span 6;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* The meter: a 0–120 scale. The bar runs to 115, past the quota line at 100. */
.meter {
  --q: calc(100% * 100 / 120);
  --v: calc(100% * 115 / 120);
  position: relative;
  grid-column: 8 / -1;
  grid-row: 1 / span 3;
  align-self: end;
}

.meter__value {
  width: var(--v);
  text-align: right;
  font-family: var(--display);
  font-size: clamp(3.2rem, 2rem + 4.5vw, 6.5rem);
  font-weight: 300;
  font-variation-settings: "SOFT" 40;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums;
}

.meter__value span {
  font-size: 0.5em;
  letter-spacing: 0;
  margin-left: 0.04em;
  vertical-align: 0.62em;
}

.meter__bar {
  position: relative;
  height: 14px;
  margin-top: 14px;
  background: var(--paper-2);
}

.meter__base,
.meter__over {
  position: absolute;
  top: 0;
  bottom: 0;
  transform-origin: left;
}

.meter__base {
  left: 0;
  width: var(--q);
  background: var(--ink);
}

.meter__over {
  left: var(--q);
  width: calc(var(--v) - var(--q));
  background: var(--mark);
}

.meter__quota {
  position: absolute;
  left: var(--q);
  top: -12px;
  bottom: -10px;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
}

.meter__scale {
  position: relative;
  height: 30px;
  background: repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px calc(100% / 24)) top / 100% 6px no-repeat;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.meter__tick {
  position: absolute;
  top: 10px;
}

.meter__tick--0 { left: 0; }
.meter__tick--50 { left: calc(100% * 50 / 120); transform: translateX(-50%); }
.meter__tick--100 { left: var(--q); transform: translateX(-50%); color: var(--ink); font-weight: 500; white-space: nowrap; }

.meter__caption {
  margin-top: 4px;
  color: var(--muted);
}

/* Load sequence: fill to the quota, a beat, then past it. */
.motion .meter__base,
.motion .meter__over {
  transform: scaleX(0);
}

.motion .meter.is-run .meter__base {
  transform: scaleX(1);
  transition: transform 1.1s cubic-bezier(0.55, 0.1, 0.25, 1) 0.2s;
}

.motion .meter.is-run .meter__over {
  transform: scaleX(1);
  transition: transform 0.55s var(--ease) 1.45s;
}

.motion .meter__value {
  opacity: 0;
  transform: translateY(10px);
}

.motion .meter.is-run .meter__value {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease) 1.5s, transform 0.6s var(--ease) 1.5s;
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding-top: clamp(72px, 9vw, 128px);
  padding-bottom: clamp(16px, 3vw, 32px);
}

/* The ruler edge that opens each section. */
.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 9px;
  border-top: 1px solid var(--line-strong);
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 2px 9px no-repeat,
    repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px 48px) 0 0 / 100% 5px no-repeat;
  transform-origin: left;
}

/* Each ruler edge draws across, left to right, as its section arrives. */
.motion .section::before {
  transform: scaleX(0);
}

.motion .section.is-drawn::before {
  transform: none;
  transition: transform 1.2s var(--ease);
}

.rail {
  grid-column: 1 / span 3;
  align-self: start;
  position: sticky;
  top: calc(var(--bar-h) + 28px);
}

.rail__num {
  font-family: var(--display);
  font-size: clamp(2.6rem, 2rem + 2vw, 4rem);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "SOFT" 100;
  line-height: 1;
  color: var(--muted);
  font-variant-numeric: lining-nums;
  transition: color 0.4s var(--ease);
}

.section.is-current .rail__num {
  color: var(--ink);
}

.rail__label {
  margin-top: 6px;
  color: var(--muted);
}

.section__main {
  grid-column: 4 / -1;
  min-width: 0;
}

/* Results ledger */
.ledger {
  margin-top: clamp(32px, 5vw, 56px);
  border-top: 1px solid var(--ink);
}

.ledger__row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  align-items: baseline;
  gap: var(--col-gap);
  padding-block: clamp(14px, 2vw, 22px);
  border-bottom: 1px solid var(--line);
}

.ledger__fig {
  font-family: var(--display);
  font-size: clamp(3rem, 2rem + 4vw, 5.6rem);
  font-weight: 300;
  font-variation-settings: "SOFT" 40;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums tabular-nums;
}

.ledger__fig span {
  color: var(--muted);
  font-size: 0.55em;
  letter-spacing: 0;
  margin-left: 0.04em;
  vertical-align: 0.55em;
}

.ledger__what {
  color: var(--muted);
}

.ledger__what strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.1em;
}

.ledger__note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.95em;
}

/* Experience */
.career {
  --months: 36; /* Jan 2024 – Dec 2026 */
  position: relative;
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 28px;
}

.career__grid {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px calc(100% / 3)) 0 0 / 100% 100% no-repeat,
    repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / 36)) 0 22px / 100% 6px no-repeat;
  border-right: 1px solid var(--line-strong);
}

.career__year {
  position: absolute;
  top: 0;
  padding-left: 8px;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.career__year--2024 { left: 0; }
.career__year--2025 { left: calc(100% / 3); }
.career__year--2026 { left: calc(200% / 3); }

.career__rows {
  position: relative;
  display: grid;
  gap: 10px;
  padding-block: 12px 16px;
}

.career__row {
  position: relative;
  height: 34px;
}

.career__span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% * var(--start) / var(--months));
  width: calc(100% * var(--len) / var(--months));
  background: color-mix(in srgb, var(--ink) 18%, transparent);
  border-left: 2px solid var(--ink);
  transition: background-color 0.3s var(--ease);
}

.career__span > span {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Months from January 2024; lengths count both the first and last month. */
.career__span--albertsons { --start: 2; --len: 5; }
.career__span--dillards { --start: 9; --len: 4; }
.career__span--att { --start: 15; --len: 18; background: var(--ink); color: var(--paper); }
.career__span--att > span { left: 10px; }

.career__span.is-active {
  background: var(--mark);
  color: var(--mark-ink);
}

.roles {
  margin-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--ink);
}

.role {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: var(--col-gap);
  padding-block: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}

.role__when {
  color: var(--muted);
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.role h3 {
  font-family: var(--display);
  font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.9rem);
  font-weight: 400;
  font-variation-settings: "SOFT" 30;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.role__org {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
}

.role__org::after {
  content: " · Lafayette, LA";
  color: var(--muted);
  font-weight: 400;
}

.role__points {
  margin-top: 14px;
  max-width: 40em;
  display: grid;
  gap: 8px;
}

.role__points li {
  position: relative;
  padding-left: 22px;
  text-wrap: pretty;
}

.role__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 10px;
  height: 1px;
  background: var(--ink);
}

.toolkit {
  margin-top: clamp(40px, 6vw, 64px);
}

.toolkit__title {
  color: var(--muted);
}

.toolkit__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px var(--col-gap);
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.toolkit__grid dt {
  font-weight: 600;
}

.toolkit__grid dd {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95em;
}

/* Status: one visual language for Learning and Building, always paired with words.
   Solid = completed. Hatched = in progress. Dashed outline = planned or still to come. */
.state {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: var(--muted);
}

.state::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border: 1.5px dashed currentColor;
}

.state[data-state="done"],
.state[data-state="now"] {
  color: var(--ink);
}

.state[data-state="done"]::before {
  border-style: solid;
  background: var(--ink);
}

.state[data-state="now"]::before {
  border-style: solid;
  background: repeating-linear-gradient(135deg, var(--ink) 0 1.5px, transparent 1.5px 3.5px);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 22px;
}

.legend .state {
  font-size: 0.78rem;
}

.code,
.course__code {
  font-family: var(--sans);
  font-size: 0.62em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.code {
  display: inline-block;
  vertical-align: 0.2em;
  margin-left: 0.2em;
}

/* Learning: the certificate is measured in courses, on the same ruler language as the rest of the page. */
.cert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 var(--col-gap);
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 22px;
  border-top: 1px solid var(--ink);
}

.cert h3 {
  margin-top: 12px;
  max-width: 18em;
  font-family: var(--display);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  font-weight: 400;
  font-variation-settings: "SOFT" 30;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.cert__where {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95em;
}

.cert__count {
  align-self: end;
  text-align: right;
  color: var(--muted);
  font-size: 0.85rem;
}

.cert__fig {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(3rem, 2.2rem + 3vw, 4.8rem);
  font-weight: 300;
  font-variation-settings: "SOFT" 40;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums;
}

.cert__fig span {
  color: var(--muted);
  font-size: 0.5em;
  letter-spacing: 0;
}

.track {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin-top: 28px;
}

.track span {
  height: 14px;
  border: 1px dashed var(--plan);
  transform-origin: left;
}

.track [data-state="done"] {
  border: 1px solid var(--ink);
  background: var(--ink);
}

.track [data-state="now"] {
  border: 1px solid var(--ink);
  background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 6px);
}

.courses {
  grid-column: 1 / -1;
  margin-top: 12px;
}

/* One ledger row per course: status, course, note. */
.course {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr);
  gap: 4px var(--col-gap);
  align-items: baseline;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.course--rest {
  border-bottom: 0;
}

.course h4 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 400;
  font-variation-settings: "SOFT" 30;
  line-height: 1.25;
  text-wrap: pretty;
}

.course__code {
  display: block;
  margin-bottom: 2px;
  font-size: 0.68em;
}

.course__note {
  color: var(--muted);
  font-size: 0.92em;
}

.course--done .course__note {
  color: var(--ink);
}

.course .state {
  font-size: 0.78rem;
}

/* Segments fill in order, like a measure being taken. */
.motion .cert .track span {
  transform: scaleX(0);
}

.motion .cert.is-in .track span {
  transform: none;
  transition: transform 0.6s var(--ease);
}

.motion .cert.is-in .track span:nth-child(1) { transition-delay: 0.25s; }
.motion .cert.is-in .track span:nth-child(2) { transition-delay: 0.4s; }
.motion .cert.is-in .track span:nth-child(3) { transition-delay: 0.55s; }
.motion .cert.is-in .track span:nth-child(4) { transition-delay: 0.62s; }
.motion .cert.is-in .track span:nth-child(5) { transition-delay: 0.69s; }
.motion .cert.is-in .track span:nth-child(6) { transition-delay: 0.76s; }

.path {
  margin-top: clamp(44px, 6vw, 72px);
}

.path__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 24px;
}

.path__title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.7rem);
  font-weight: 400;
  font-variation-settings: "SOFT" 30;
  letter-spacing: -0.01em;
}

.path__note {
  color: var(--muted);
  font-size: 0.92em;
}

.path__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 36px;
  border-top: 1px solid var(--ink);
  counter-reset: step;
}

.path__steps li {
  position: relative;
  padding: 18px var(--col-gap) 4px 0;
}

.path__steps li + li {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.path__steps li + li::before {
  left: 20px;
}

/* A tick on the rule above each step, numbered like the sections. */
.path__steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: -1.55em;
  left: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.path__steps h4 {
  margin-top: 10px;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 400;
  font-variation-settings: "SOFT" 30;
  line-height: 1.25;
  text-wrap: balance;
}

.path__what {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92em;
}

.path .state {
  font-size: 0.78rem;
}

/* Building: each project carries its milestones in two separate measures, local work and AWS, so a filled local
   measure never reads as a fraction of the whole project. Solid = done, hatched = under way, dashed = not yet. */
.builds {
  margin-top: clamp(32px, 5vw, 56px);
  border-top: 1px solid var(--ink);
}

.build {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 10px var(--col-gap);
  padding-block: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}

.build h3 {
  font-family: var(--display);
  font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.9rem);
  font-weight: 400;
  font-variation-settings: "SOFT" 30;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.build__kind {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.build__what {
  max-width: 40em;
  text-wrap: pretty;
}

.build__now {
  margin-top: 14px;
  max-width: 40em;
  color: var(--muted);
  font-size: 0.95em;
}

.build__now strong {
  color: var(--ink);
  font-weight: 600;
}

.milestones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px clamp(20px, 3vw, 36px);
  max-width: 36em;
  margin-top: 20px;
  font-size: 0.78rem;
}

.milestones__where {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.milestones ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
}

.milestones li {
  position: relative;
  padding-top: 16px;
  color: var(--muted);
  font-weight: 500;
}

.milestones li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  border: 1px dashed var(--plan);
  transform-origin: left;
}

.milestones li[data-status="done"],
.milestones li[data-status="now"] {
  color: var(--ink);
}

.milestones li[data-status="done"]::before {
  border: 1px solid var(--ink);
  background: var(--ink);
}

.milestones li[data-status="now"]::before {
  border: 1px solid var(--ink);
  background: repeating-linear-gradient(135deg, var(--ink) 0 2px, transparent 2px 6px);
}

.milestones__name,
.milestones__state {
  display: block;
}

.milestones__state {
  margin-top: 1px;
  font-weight: 400;
  color: var(--muted);
}

.motion .builds .milestones li[data-status="done"]::before,
.motion .builds .milestones li[data-status="now"]::before {
  transform: scaleX(0);
}

.motion .builds.is-in .milestones li::before {
  transform: none;
  transition: transform 0.5s var(--ease);
}

.motion .builds.is-in .milestones li:nth-child(1)::before { transition-delay: 0.2s; }
.motion .builds.is-in .milestones li:nth-child(2)::before { transition-delay: 0.35s; }

/* A status line above the project name, as in Learning. MONKED keeps the letter-spacing its capitals had as a side note. */
.build__head .state {
  font-size: 0.78rem;
}

.build__head .state + h3 {
  margin-top: 8px;
  font-weight: 450;
  letter-spacing: 0.02em;
}

.path__access {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

.study__also {
  margin-top: clamp(28px, 4vw, 40px);
  color: var(--muted);
  font-size: 0.95em;
}

/* Contact */
.section--contact {
  padding-bottom: clamp(72px, 9vw, 128px);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.links {
  border-top: 1px solid var(--ink);
}

.links__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 4px 14px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  background: linear-gradient(var(--mark), var(--mark)) no-repeat 0 100% / 0% 3px;
  transition: background-size 0.45s var(--ease);
}

a.links__item:hover {
  background-size: 100% 3px;
}

/* A project with no public site yet: listed, not linked. */
.links__item--soon .state {
  grid-column: 2;
  font-size: 0.78rem;
}

.links__name {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 450;
  font-variation-settings: "SOFT" 30;
}

.links__note {
  color: var(--muted);
  font-size: 0.9em;
}

.links__arrow {
  transition: transform 0.35s var(--ease);
}

a.links__item:hover .links__arrow {
  transform: translate(3px, -3px);
}

/* Footer */
.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    "copy clock top"
    "colophon colophon colophon";
  gap: 10px 24px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.foot > p:first-child {
  grid-area: copy;
}

.foot__clock {
  grid-area: clock;
}

.foot__top {
  grid-area: top;
  text-align: right;
}

.foot__colophon {
  grid-area: colophon;
  font-size: 0.82rem;
}

.foot__fine {
  display: block;
  color: var(--muted);
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
}

.foot__time::before {
  content: " · ";
}

/* ---------- Reveal ---------- */

.motion .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.motion .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .toolkit__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 860px) {
  .build { grid-template-columns: minmax(0, 1fr); }
  .section { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: static;
    grid-column: 1;
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
  }
  .rail__num { font-size: 1.6rem; }
  .rail__label { margin-top: 0; }
  .section__main { grid-column: 1; }
  .hero__lede,
  .hero__next,
  .hero__actions,
  .meter { grid-column: 1 / -1; grid-row: auto; }
  .meter { margin-top: 48px; }
  .role { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* Small screens with scripts: the section list becomes a Menu panel, an index set in the display face. */
@media (max-width: 680px) {
  .has-js .bar__menu { display: inline-flex; }
  .has-js .bar__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 4px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 18px 30px -24px rgb(0 0 0 / 0.5);
  }
  .has-js .bar.is-open .bar__nav {
    display: flex;
    animation: menu-in 0.35s var(--ease);
  }
  .has-js .bar__nav a {
    display: flex;
    align-items: baseline;
    gap: 14px;
    width: 100%;
    padding-block: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-family: var(--display);
    font-size: 1.7rem;
    font-weight: 400;
    font-variation-settings: "SOFT" 30;
    letter-spacing: -0.01em;
  }
  .has-js .bar__nav a::after { bottom: 10px; left: 38px; right: auto; width: 2.2em; }
  .has-js .bar__num {
    display: inline-block;
    min-width: 24px;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
  }
  .has-js .bar.is-open .bar__progress { opacity: 0; }

  /* Without scripts the links wrap onto a second row under the name. */
  :root:not(.has-js) .bar__inner { flex-wrap: wrap; height: auto; padding-block: 10px; row-gap: 4px; }
  :root:not(.has-js) .bar__navwrap { margin-left: 0; flex-basis: 100%; }
  :root:not(.has-js) .bar__nav { flex-wrap: wrap; gap: 2px 18px; }
}

@media (max-width: 360px) {
  .bar__name { display: none; }
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-8px); }
}

@media (max-width: 600px) {
  .cert { grid-template-columns: minmax(0, 1fr); }
  .cert__count { text-align: left; margin-top: 18px; display: flex; align-items: baseline; gap: 10px; }
  .cert__fig { display: inline; }
  .courses { margin-top: 8px; }
  .course { display: block; }
  .course h4 { margin-top: 8px; }
  .course__note { margin-top: 6px; }
  .path__steps { grid-template-columns: minmax(0, 1fr); }
  .path__steps li,
  .path__steps li + li { padding: 16px 0 16px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .path__steps li::before,
  .path__steps li + li::before { top: 18px; left: auto; right: 0; }
  .foot {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "copy top"
      "clock clock"
      "colophon colophon";
  }
}

@media (max-width: 520px) {
  :root { --bar-h: 56px; }
  .bar__nav { font-size: 0.9rem; gap: 16px; }
  .ledger__row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .toolkit__grid { grid-template-columns: minmax(0, 1fr); }
  .meter__tick--50 { display: none; }
  .meter__scale { background-size: 100% 5px; background-image: repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px calc(100% / 12)); }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
  .career__span > span { font-size: 0.72rem; }
  .milestones { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
  }
}

/* Windows High Contrast and other forced-colour modes drop author backgrounds, so the highlighter's gradient and the
   meter's bars vanish, and the marked figures render text-on-Canvas. Draw them in system colours instead. */
@media (forced-colors: active) {
  .hl {
    forced-color-adjust: none;
    background: Mark;
    color: MarkText;
  }
  .meter__bar {
    forced-color-adjust: none;
    background: Canvas;
    outline: 1px solid CanvasText;
  }
  .meter__base,
  .meter__quota {
    forced-color-adjust: none;
    background: CanvasText;
  }
  .meter__over {
    forced-color-adjust: none;
    background: Highlight;
  }
}

@media print {
  :root {
    --paper: #fff;
    --paper-2: #eee;
    --ink: #000;
    --muted: #333;
  }
  .bar, .skip, .hero__actions, .foot__clock, .meter, .career, .legend { display: none !important; }
  .motion .section::before, .motion .track span, .motion .builds .milestones li::before { transform: none; }
  .rail { position: static; }
  .section { break-inside: avoid-page; padding-top: 24px; }
  .motion .reveal { opacity: 1; transform: none; }
  a.links__item::after { content: " " attr(href); font-size: 0.8em; color: #333; }
}

/* 404 */
.missing {
  padding-block: clamp(72px, 14vw, 180px);
}

.missing .eyebrow {
  color: var(--muted);
}

.missing__title {
  margin-top: 16px;
  font-family: var(--display);
  font-size: clamp(2.6rem, 1.6rem + 5vw, 5.5rem);
  font-weight: 350;
  font-variation-settings: "SOFT" 60;
  line-height: 1;
  letter-spacing: -0.035em;
}

.missing__title em {
  font-weight: 300;
  font-variation-settings: "SOFT" 100;
}

.missing__back {
  margin-top: 32px;
}
