@font-face { font-family: "Lora"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/lora-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/lora-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/lora-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 500; font-style: italic; font-display: swap; src: url("/fonts/lora-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/lora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/lora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  /* a lightly aged page: warm off-white paper, brown-black ink */
  --paper: #f7f2e6;
  --desk: #ede5d3;
  --sheet: #f9f5eb;
  --ink: #1d160e;
  --dim: #5b4e3c;
  --rule: #d9cdb5;
  --link: #2b4f86;
  --accent: #8b2e1f;
  --water: #dfe5d8;
  --track: #e5d2c6;
  --border: 2px solid var(--ink);
  --shadow: 8px 8px 0 var(--ink);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}


* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 500 18px/1.7 var(--serif);
  /* paper grain and darker, foxed edges like an old page */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.12 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 40%, rgba(255, 253, 246, 0.6) 0%, rgba(255, 253, 246, 0) 60%),
    radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(120, 90, 50, 0.06) 100%),
    var(--paper);
  background-attachment: fixed;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--accent); color: var(--sheet); }

button { font: inherit; color: inherit; cursor: pointer; }

kbd {
  font: 500 11px var(--mono);
  border: 1.5px solid currentColor;
  padding: 0 4px;
}

/* ---------- layout: sidebar + page on a desk ---------- */

.layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 820px);
  gap: 48px;
  justify-content: center;
  padding: 56px 24px 80px;
}

.side {
  position: sticky;
  top: 56px;
  align-self: start;
}

.mark {
  display: inline-grid;
  place-items: center;
  height: 40px;
  padding: 0 12px;
  margin-bottom: 40px;
  border: var(--border);
  background: var(--sheet);
  color: var(--ink);
  font: 500 14px var(--mono);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.12s, box-shadow 0.12s;
}
.mark:hover { text-decoration: none; transform: rotate(-4deg); }
.mark:active { transform: translate(4px, 4px); box-shadow: none; }

.side-label {
  margin: 0 0 10px;
  font: 600 13px var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.side-nav { display: flex; flex-direction: column; margin-bottom: 36px; }
.side-nav a {
  position: relative;
  width: fit-content;
  color: var(--dim);
  font-size: 20px;
  line-height: 1.75;
  transition: color 0.15s, transform 0.15s;
}
.side-nav a:hover { color: var(--ink); text-decoration: none; transform: translateX(4px); }
.side-nav a.current { color: var(--ink); }
.side-nav a.current::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: translateY(-50%);
}

.keys { margin: 0; font: 400 11px var(--mono); color: var(--dim); }

.desk { min-width: 0; }

.sheet {
  position: relative;
  overflow: hidden;
  padding: 0 12px 32px 4px;
}

/* ---------- views ---------- */

.js .view { display: none; }
.js .view.active { display: block; }

/* ---------- home ---------- */

.name {
  margin: 0 0 32px;
  font: 700 clamp(48px, 8vw, 84px)/1.08 var(--serif);
  letter-spacing: 0;
}
.name .word { display: inline-block; }
.name .ch {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.3, 1.8, 0.5, 1), color 0.2s;
  cursor: default;
}
.name .ch:hover { transform: translateY(-0.1em) rotate(-6deg); color: var(--accent); }

.kicker { margin: 0 0 8px; font-weight: 600; }

.about { margin: 0 0 48px; padding-left: 22px; }
.about li { padding-left: 6px; margin-bottom: 10px; }
.about li::marker { color: var(--dim); }

.label {
  margin: 0 0 16px;
  font: 600 13px var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.label small { font: 500 italic 14px var(--serif); text-transform: none; letter-spacing: 0; color: var(--dim); }

.rows { list-style: none; margin: 0 0 56px; padding: 0; border-top: var(--border); border-bottom: var(--border); }
.rows li + li { border-top: 1px solid var(--rule); }
.rows a {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 14px 8px;
  color: var(--ink);
  transition: background 0.15s, padding 0.15s;
}
.rows a:hover, .rows a:focus-visible { background: var(--desk); padding-left: 16px; text-decoration: none; outline: none; }
.rows .when { font: 400 12px var(--mono); color: var(--dim); text-transform: uppercase; }
.rows .what b { font-weight: 600; margin-right: 6px; }
.rows .metric { font-style: italic; color: var(--dim); text-align: right; white-space: nowrap; }
.rows .metric i { display: inline-block; margin-left: 6px; font-style: normal; color: var(--accent); transition: transform 0.2s; }
.rows a:hover .metric i { transform: translateX(4px); }

/* bookshelf */

.shelf {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 300px;
  padding: 0 12px;
  border-bottom: 10px solid var(--ink);
}
.spine {
  --c: #333;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 64px;
  height: 260px;
  padding: 14px 0 52px;
  background: var(--c);
  color: #f5efe2;
  border: var(--border);
  border-bottom: 0;
  text-decoration: none;
  transform-origin: bottom center;
  transition: transform 0.3s cubic-bezier(0.2, 1.4, 0.4, 1), width 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.spine::before, .spine::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.5;
}
.spine::before { top: 40px; }
.spine::after { bottom: 40px; }
.spine.light { color: #1f1c18; }
.spine:nth-child(2) { height: 236px; }
.spine:nth-child(3) { height: 272px; }
.spine:nth-child(4) { height: 222px; }
.spine:nth-child(5) { height: 248px; }
.spine:nth-child(6) { height: 230px; }
.spine:hover, .spine:focus-visible {
  text-decoration: none;
  outline: none;
  width: 92px;
  transform: translateY(-18px) rotate(-2deg);
}
.spine:active { transform: translateY(-40px); }
.spine-num { font: 500 11px var(--mono); }
.spine-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 700 22px/1 var(--serif);
  letter-spacing: 0.02em;
}
.spine-sub {
  position: absolute;
  bottom: 50px;
  right: 8px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 500 italic 12px var(--serif);
  opacity: 0;
  transition: opacity 0.2s 0.1s;
}
.spine:hover .spine-sub, .spine:focus-visible .spine-sub { opacity: 0.85; }
.spine:hover .spine-title, .spine:focus-visible .spine-title { margin-right: 18px; }

/* decorative books that fill out the shelf */
.filler {
  width: 26px;
  border: var(--border);
  border-bottom: 0;
  background: var(--c);
}
.filler.lean { width: 34px; transform: rotate(14deg); transform-origin: bottom right; margin-left: 4px; }
.bookend {
  width: 46px;
  height: 70px;
  margin-left: auto;
  border: var(--border);
  border-bottom: 0;
  background: var(--ink);
}

/* ---------- chapter pages ---------- */

.back {
  display: inline-block;
  padding: 4px 10px;
  border: var(--border);
  color: var(--ink);
  font: 500 12px var(--mono);
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink);
}
.back:hover { text-decoration: none; background: var(--desk); }
.back:active { transform: translate(3px, 3px); box-shadow: none; }

.page-title {
  margin: 36px 0 0;
  font: 700 clamp(44px, 7vw, 76px)/1.08 var(--serif);
  letter-spacing: 0;
}
.page-title span {
  display: block;
  margin-bottom: 14px;
  font: 500 italic 16px var(--serif);
  letter-spacing: 0;
  color: var(--accent);
}

.lede {
  margin: 20px 0 16px;
  padding-bottom: 28px;
  border-bottom: var(--border);
  font-size: 20px;
  font-style: italic;
  color: var(--dim);
}

.entry { padding: 28px 0; border-bottom: 1px solid var(--rule); }
.entry-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 8px; }
.entry h2 { margin: 0; font: 700 26px/1.25 var(--serif); }
.entry p { margin: 0 0 10px; }

.tag {
  display: inline-block;
  padding: 1px 8px;
  border: 1.5px solid var(--ink);
  font: 500 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.tag.hot { background: var(--accent); border-color: var(--accent); color: var(--sheet); }

.facts { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { padding: 2px 10px; border: 1px solid var(--rule); background: var(--desk); font-size: 15px; font-style: italic; }

.questions { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: q; }
.questions li {
  counter-increment: q;
  position: relative;
  padding: 10px 0 10px 40px;
  border-top: 1px solid var(--rule);
}
.questions li::before {
  content: counter(q, lower-roman) ".";
  position: absolute;
  left: 0;
  top: 10px;
  font-style: italic;
  color: var(--accent);
}

.next {
  display: inline-block;
  margin-top: 40px;
  padding: 10px 16px;
  border: var(--border);
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  font: 500 13px var(--mono);
  text-transform: uppercase;
  transition: transform 0.08s, box-shadow 0.08s;
}
.next:hover { text-decoration: none; background: var(--desk); }
.next:active { transform: translate(5px, 5px); box-shadow: none; }

/* projects: index cards */

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 28px; }
.card {
  position: relative;
  display: block;
  padding: 18px 20px;
  background: var(--sheet);
  background-image:
    linear-gradient(var(--sheet) 0 64px, transparent 64px),
    repeating-linear-gradient(transparent 0 27px, var(--rule) 27px 28px);
  border: var(--border);
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:nth-child(odd):hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 8px 8px 0 var(--ink); text-decoration: none; }
.card:nth-child(even):hover { transform: translate(-2px, -2px) rotate(1deg); box-shadow: 8px 8px 0 var(--ink); text-decoration: none; }
.card:active { transform: translate(5px, 5px); box-shadow: none; }
.card h2 { margin: 14px 0 4px; font: 700 21px/1.3 var(--serif); }
.card p { margin: 0; font-size: 16px; line-height: 28px; color: var(--dim); }
.card .go { position: absolute; top: 14px; right: 16px; color: var(--accent); }

/* life */

.paws { display: flex; gap: 6px; margin-top: 6px; font-size: 18px; }
.paws span { opacity: 0; animation: step 2.5s infinite; }
.paws span:nth-child(2) { animation-delay: 0.3s; }
.paws span:nth-child(3) { animation-delay: 0.6s; }
.paws span:nth-child(4) { animation-delay: 0.9s; }
.paws span:nth-child(5) { animation-delay: 1.2s; }
@keyframes step { 10%, 60% { opacity: 1; } 80%, 100% { opacity: 0; } }

.ball { display: inline-block; padding: 0; border: 0; background: none; font-size: 22px; line-height: 1; vertical-align: middle; }
.ball.bounce { animation: bounce 0.9s cubic-bezier(0.3, 0, 0.7, 1); }
@keyframes bounce {
  0% { transform: translateY(0); }
  25% { transform: translateY(-48px) rotate(120deg); }
  50% { transform: translateY(0) rotate(240deg) scaleY(0.85); }
  70% { transform: translateY(-18px) rotate(300deg); }
  100% { transform: translateY(0) rotate(360deg); }
}
.dim { color: var(--dim); font: 500 italic 14px var(--serif); }

.tank {
  position: relative;
  height: 200px;
  margin-top: 16px;
  border: var(--border);
  border-top-width: 6px;
  background: var(--water);
  overflow: hidden;
}
.cycle {
  position: absolute;
  inset: 12px 12px auto;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font: 500 11px var(--mono);
  text-transform: uppercase;
}
.cycle span { padding: 1px 6px; background: var(--sheet); border: 1.5px solid var(--ink); }
.cycle i { font-style: normal; }
.bubbles span {
  position: absolute;
  bottom: -12px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  opacity: 0.6;
  animation: rise linear infinite;
}
@keyframes rise { to { transform: translate(var(--drift, 0), -230px); opacity: 0.1; } }
.plants { position: absolute; bottom: 0; left: 0; right: 0; height: 90px; display: flex; align-items: flex-end; justify-content: space-around; }
.plants b {
  width: 6px;
  background: #3d7a4f;
  border: 1.5px solid var(--ink);
  border-bottom: 0;
  transform-origin: bottom;
  animation: sway 4s ease-in-out infinite alternate;
}
.plants b:nth-child(1) { height: 60%; }
.plants b:nth-child(2) { height: 90%; animation-delay: -1s; }
.plants b:nth-child(3) { height: 45%; animation-delay: -2s; }
.plants b:nth-child(4) { height: 75%; animation-delay: -0.5s; }
.plants b:nth-child(5) { height: 100%; animation-delay: -3s; }
.plants b:nth-child(6) { height: 55%; animation-delay: -1.5s; }
.plants b:nth-child(7) { height: 80%; animation-delay: -2.5s; }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }

/* contact */

.copy {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 28px;
  padding: 26px 24px;
  text-align: left;
  background: var(--sheet);
  border: var(--border);
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
}
.copy:hover { background: var(--desk); }
.copy:active { transform: translate(6px, 6px); box-shadow: none; }
.copy-text { display: block; font: 700 clamp(20px, 4vw, 36px)/1.15 var(--serif); word-break: break-all; }
.copy-hint { display: block; margin-top: 6px; font: 500 italic 14px var(--serif); color: var(--dim); }
.stamp {
  position: absolute;
  top: 50%;
  right: 24px;
  padding: 4px 12px;
  border: 3px solid var(--accent);
  color: var(--accent);
  font: 700 18px var(--mono);
  text-transform: uppercase;
  transform: translateY(-50%) rotate(-12deg) scale(2);
  opacity: 0;
  pointer-events: none;
}
.copy.copied .stamp { animation: stamp 1.6s forwards; }
@keyframes stamp {
  0% { opacity: 0; transform: translateY(-50%) rotate(-12deg) scale(2); }
  15%, 80% { opacity: 1; transform: translateY(-50%) rotate(-12deg) scale(1); }
  100% { opacity: 0; transform: translateY(-50%) rotate(-12deg) scale(1); }
}

.links { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border: var(--border); }
.links li + li { border-left: var(--border); }
.links a { display: block; padding: 14px 16px; color: var(--ink); font: 500 13px var(--mono); text-transform: uppercase; }
.links a:hover { background: var(--desk); text-decoration: none; }


/* ---------- experience case pages ---------- */

.role { margin: 10px 0 0; font: 500 italic 18px var(--serif); color: var(--ink); }

.case .label, article .prose + .label { margin-top: 44px; }
.case > p { max-width: 680px; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
  border: var(--border);
  background: var(--sheet);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.tile:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.tile.wide { grid-column: span 2; }
.tile-label { font: 400 12px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.03em; }
.tile-value { font: 600 48px/1 var(--sans); letter-spacing: -0.03em; color: var(--ink); }
.tile-note { font-size: 15px; line-height: 1.5; color: var(--dim); }

/* unit grid: one square per thing */
.units { display: grid; grid-template-columns: repeat(var(--cols, 10), 14px); gap: 4px; margin: 4px 0; }
.units i {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
  transition-delay: calc(var(--i) * 25ms);
}
.in .units i { transform: scale(1); }

.tile .chips { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tile .chips li { padding: 1px 8px; border: 1.5px solid var(--ink); font: 400 12px var(--mono); }

/* before/after bars: one hue, the "before" in a lighter step */
.bars { display: grid; gap: 6px; margin: 4px 0; }
.bar-row { display: grid; grid-template-columns: 76px 1fr 36px; gap: 10px; align-items: center; font: 400 12px var(--mono); color: var(--dim); }
.bar-row em { font-style: normal; color: var(--ink); text-align: right; }
.bar {
  display: block;
  height: 14px;
  width: 0;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bar.muted { background: var(--track); }
.in .bar { width: var(--w); }

/* range on a scale */
.scale { margin: 6px 0 2px; }
.scale-track { position: relative; height: 18px; background: var(--track); border-radius: 4px; }
.scale-band {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--a);
  width: 0;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.in .scale-band { width: calc(var(--b) - var(--a)); }
.scale-ticks { display: flex; justify-content: space-between; margin-top: 6px; font: 400 11px var(--mono); color: var(--dim); }

/* meter: same-ramp track */
.meter { height: 18px; background: var(--track); border-radius: 4px; margin: 6px 0; overflow: hidden; }
.meter b { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.in .meter b { width: var(--w); }

.steps { display: flex; gap: 4px; margin: 4px 0; }
.steps b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--ink);
  font: 500 12px var(--mono);
  transition: background 0.2s, color 0.2s;
}
.in .steps b { animation: light 3.5s infinite; animation-delay: calc(var(--i) * 0.4s); }
@keyframes light { 0%, 8% { background: var(--accent); color: var(--sheet); } 16%, 100% { background: transparent; color: var(--ink); } }

/* flow diagrams: nodes light up in order, like data moving through */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flow > i { font-style: normal; color: var(--dim); }
.node {
  display: inline-flex;
  flex-direction: column;
  padding: 8px 12px;
  border: var(--border);
  background: var(--sheet);
  font: 500 15px/1.3 var(--serif);
  transition: background 0.2s, transform 0.15s;
}
.node small { font: 400 11px/1.4 var(--mono); color: var(--dim); }
.node:hover { transform: translateY(-2px); background: var(--desk); }
.node.stack { gap: 6px; padding: 6px; }
.node.stack > span { display: flex; flex-direction: column; padding: 4px 8px; border: 1px dashed var(--ink); }
.in .flow .node { animation: pulse 4s infinite; animation-delay: calc(var(--i) * 0.45s); }
@keyframes pulse { 0%, 6% { box-shadow: 4px 4px 0 var(--accent); } 14%, 100% { box-shadow: 0 0 0 transparent; } }
.flow-note { margin: 10px 0 0; font-style: italic; color: var(--dim); }

.did { margin: 0; padding-left: 22px; }
.did li { margin-bottom: 10px; padding-left: 4px; }
.did li::marker { color: var(--accent); }

.more { margin-top: 32px; font-style: italic; }

.case-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 20px;
  border-top: var(--border);
}
.case-nav a { font: 500 13px var(--mono); text-transform: uppercase; color: var(--ink); }

/* hover tooltip for chart marks */
.tip {
  position: fixed;
  z-index: 70;
  max-width: 260px;
  padding: 6px 10px;
  background: var(--ink);
  color: var(--sheet);
  font: 400 12px/1.4 var(--mono);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 0.1s;
}
.tip.show { opacity: 1; }
[data-tip] { cursor: help; }

/* work chapter entries link to their case pages */
.entry-link { display: block; color: var(--ink); transition: background 0.15s, padding 0.15s; }
.entry-link:hover { text-decoration: none; background: var(--desk); padding-left: 14px; padding-right: 14px; }
.read { font: 500 12px var(--mono); text-transform: uppercase; color: var(--accent); }

/* education */
.prose { margin: 0 0 16px; max-width: 680px; }
.timeline { margin-top: 8px; }
.tl-row { display: grid; grid-template-columns: 80px 1fr; gap: 10px; align-items: center; margin-bottom: 8px; font: 400 12px var(--mono); color: var(--dim); }
.tl-track { position: relative; height: 18px; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); background: repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), var(--rule) calc(20% - 1px) 20%); }
.tl-track b {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: var(--a);
  width: 0;
  background: var(--accent);
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tl-track b.muted { background: var(--track); }
.in .tl-track b { width: calc(var(--b) - var(--a)); }
.tl-axis { display: flex; justify-content: space-between; margin-left: 90px; font: 400 11px var(--mono); color: var(--dim); }
.tl-axis span { width: 0; display: flex; justify-content: center; }

/* ---------- page footer ---------- */

.folio {
  display: flex;
  justify-content: space-between;
  margin-top: 64px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font: 500 italic 14px var(--serif);
  color: var(--dim);
}

/* ---------- page turn + ink dots ---------- */

.turn {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: var(--sheet);
  box-shadow: -18px 0 30px rgba(0, 0, 0, 0.12);
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
}
.turn.go { visibility: visible; animation: turn 0.6s cubic-bezier(0.6, 0, 0.3, 1); }
@keyframes turn {
  0% { transform: translateX(105%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(-105%); }
}

.dot {
  position: fixed;
  z-index: 60;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
  animation: dot 0.55s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}
.dot:nth-child(odd) { background: var(--accent); }
@keyframes dot { to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px 16px 48px; }
  .side { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
  .mark { margin: 0 8px 0 0; }
  .side-label, .keys, .side-links { display: none; }
  .side-nav { flex-direction: row; flex-wrap: wrap; gap: 0 14px; margin: 0; }
  .side-nav a { font-size: 17px; }
  .side-nav a.current::before { display: none; }
  .side-nav a.current { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
  .sheet { padding: 12px 0 24px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .rows a { grid-template-columns: 1fr; gap: 0; }
  .rows .metric { text-align: left; }
  .tiles { grid-template-columns: 1fr; }
  .tile-value { font-size: 40px; }
  .tile.wide { grid-column: auto; }
  .flow { flex-direction: column; align-items: stretch; }
  .flow > i { transform: rotate(90deg); align-self: center; }
  .tl-row { grid-template-columns: 64px 1fr; }
  .tl-axis { margin-left: 74px; }
  .case-nav { flex-direction: column; gap: 12px; }
  .shelf { gap: 5px; padding: 0 2px; height: 270px; }
  .spine { width: 44px; height: 230px; }
  .spine:nth-child(2) { height: 210px; }
  .spine:nth-child(3) { height: 240px; }
  .spine:nth-child(4) { height: 198px; }
  .spine:nth-child(5) { height: 222px; }
  .spine:nth-child(6) { height: 206px; }
  .spine:hover, .spine:focus-visible { width: 44px; }
  .spine:hover .spine-title { margin-right: 0; }
  .spine-sub { display: none; }
  .filler, .bookend { display: none; }
  .spine-title { font-size: 17px; }
  .cards { grid-template-columns: 1fr; }
  .links { grid-template-columns: repeat(2, 1fr); }
  .links li:nth-child(3) { border-left: 0; }
  .links li:nth-child(n+3) { border-top: var(--border); }
  .folio > span:first-child, .folio > span:last-child { display: none; }
  .folio { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .paws span { opacity: 1; }
}

/* without javascript, show charts at their final state */
html:not(.js) .bar, html:not(.js) .meter b { width: var(--w); }
html:not(.js) .scale-band, html:not(.js) .tl-track b { width: calc(var(--b) - var(--a)); }
