/* shmouses.github.io
   Tokens, base, layout, components, pages.
   Cool lab-paper ground and green-black ink. Emerald marks life sciences and the primary
   action; cobalt marks materials and compute. Newsreader for headings, IBM Plex Sans for
   everything else. */

:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --sunk: #eceff0;
  --ink: #0e1714;
  --ink-2: #2c3833;
  --muted: #56635e;
  --faint: #6f7b76;
  --rule: #d9dfdb;
  --rule-strong: #bec7c2;

  --bio: #0a7656;
  --bio-ink: #075a42;
  --bio-soft: #e1f0e9;
  --mat: #2747c9;
  --mat-soft: #e5e9fa;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --r: 10px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--bio-ink); text-decoration: none; }
a:hover { color: var(--bio); }
:focus-visible { outline: 2px solid var(--mat); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--bio-soft); color: var(--ink); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; font-weight: 600; border-radius: 8px; }
.skip:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

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

.site-head { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.site-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(245, 247, 244, .86); backdrop-filter: saturate(150%) blur(12px); -webkit-backdrop-filter: saturate(150%) blur(12px); }
.site-head.is-scrolled { border-bottom-color: var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }

.mark { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.mark:hover { color: var(--ink); }
.mark svg { width: 28px; height: 28px; flex: none; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 13px; color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 9px; height: 2px; border-radius: 2px; background: var(--bio); }
.nav .nav-cta { margin-left: 10px; padding: 0 18px; background: var(--ink); color: #fff; border-radius: 999px; }
.nav .nav-cta:hover { background: var(--bio-ink); color: #fff; }

.menu-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; color: var(--ink); cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 800px) {
  .menu-btn { display: inline-flex; }
  .nav { position: fixed; inset: 68px 0 0 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 40px; background: var(--bg); visibility: hidden; opacity: 0; transition: opacity .2s var(--ease), visibility .2s; }
  .nav.is-open { visibility: visible; opacity: 1; }
  .nav a { min-height: 60px; padding: 0; font-size: 22px; color: var(--ink); border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { color: var(--bio); }
  .nav .nav-cta { margin: 24px 0 0; justify-content: center; border-radius: 12px; border-bottom: 0; color: #fff; }
  body.menu-open { overflow: hidden; }
}

/* ---------- Type ---------- */

h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.1; }
.display { font-family: var(--serif); font-size: clamp(42px, 5vw, 72px); font-weight: 450; letter-spacing: -.025em; line-height: 1.0; }
.h2 { font-family: var(--serif); font-size: clamp(32px, 3.8vw, 52px); font-weight: 450; letter-spacing: -.02em; line-height: 1.06; }
.h3 { font-family: var(--sans); font-size: 20px; font-weight: 600; letter-spacing: -.012em; line-height: 1.3; }
.lead { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.body { color: var(--muted); max-width: 62ch; }
.body p { margin: 0 0 1em; }
.body p:last-child { margin-bottom: 0; }

/* ---------- Buttons, links, tags ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-size: 15.5px; font-weight: 600; transition: transform .18s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn-primary { background: var(--bio); color: #fff; }
.btn-primary:hover { background: var(--bio-ink); color: #fff; transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--rule-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
@media (max-width: 520px) { .actions .btn { flex: 1 1 100%; } }

.link { color: var(--ink); font-weight: 600; background-image: linear-gradient(var(--bio), var(--bio)); background-size: 100% 1.5px; background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 2px; transition: color .2s, background-size .3s var(--ease); }
.link:hover { color: var(--bio-ink); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 3px 10px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); font-size: 13px; font-weight: 500; line-height: 1.6; }
.tags .bio { background: var(--bio-soft); color: var(--bio-ink); }
.tags .mat { background: var(--mat-soft); color: var(--mat); }

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

main > section { padding: clamp(80px, 10vw, 136px) 0; }
main > section + section { border-top: 1px solid var(--rule); }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(40px, 5.5vw, 68px); }
.sec-head .body { font-size: 18px; }
@media (max-width: 900px) { .sec-head { grid-template-columns: 1fr; } }

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

.hero { padding: clamp(40px, 5vw, 72px) 0 clamp(64px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px clamp(32px, 5vw, 80px); align-items: center; }
.hero-who { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.hero-who .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--rule); }
.hero-who b { display: block; font-weight: 600; font-size: 16px; }
.hero-who span { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.hero .lead { margin: 28px 0 34px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 40px 0 0; padding: 22px 0 0; border-top: 1px solid var(--rule); list-style: none; color: var(--muted); font-size: 14.5px; }
.hero-proof b { color: var(--ink); font-weight: 600; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .loop { max-width: 480px; } }

/* The discovery loop figure */
.loop { position: relative; margin: 0; padding: 18px; border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); box-shadow: 0 1px 0 rgba(14, 23, 20, .03), 0 18px 40px -24px rgba(14, 23, 20, .18); }
.loop svg { width: 100%; height: auto; }
.loop .ring { fill: none; stroke: var(--rule-strong); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.loop .arc { fill: none; stroke: var(--ink); stroke-width: 1.6; marker-end: url(#arrow); }
.loop .pulse { fill: none; stroke: var(--bio); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 36 1100; animation: orbit 6s linear infinite; }
.loop .st rect { fill: var(--surface); stroke: var(--rule-strong); }
.loop .st text { fill: var(--ink); font: 600 14px var(--sans); }
.loop .st .s { fill: var(--muted); font: 400 12px var(--sans); }
.loop .ic { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.loop .ic.bio { stroke: var(--bio); }
.loop .ic.mat { stroke: var(--mat); }
.loop .ic.ink { stroke: var(--ink); }
.loop .hub { fill: var(--ink); }
.loop .hub-t { fill: #fff; font: 600 15px var(--sans); }
.loop .hub-s { fill: #b9c6c0; font: 400 11.5px var(--sans); }
.loop .human { fill: var(--bio-soft); stroke: var(--bio); }
.loop .human-t { fill: var(--bio-ink); font: 600 11.5px var(--sans); }
.loop figcaption { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; padding: 10px 4px 2px; color: var(--muted); font-size: 13.5px; }
.loop figcaption i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
@keyframes orbit { to { stroke-dashoffset: -1136; } }

/* ---------- Focus areas ---------- */

.focus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.focus article { display: flex; flex-direction: column; gap: 14px; padding: 30px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
.focus svg { width: 44px; height: 44px; margin-bottom: 6px; }
.focus p { margin: 0; color: var(--muted); font-size: 16px; }
.focus .tags { margin-top: auto; padding-top: 8px; }
@media (max-width: 960px) { .focus { grid-template-columns: 1fr; } }

/* ---------- Case studies ---------- */

.cases { display: grid; gap: 20px; }
.case { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 20px 36px; padding: 32px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
.case-when { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.case-when b { display: block; color: var(--ink); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.case h3 { font-family: var(--serif); font-size: clamp(24px, 2.2vw, 30px); font-weight: 500; letter-spacing: -.015em; line-height: 1.15; margin-bottom: 12px; }
.case p { margin: 0; color: var(--muted); font-size: 16px; }
.case-out { display: flex; flex-direction: column; gap: 14px; }
.case-out .result { padding: 14px 16px; border-radius: 8px; background: var(--bio-soft); color: var(--bio-ink); font-size: 14.5px; font-weight: 500; line-height: 1.45; }
.case-out .result.mat { background: var(--mat-soft); color: var(--mat); }
.case-out .link { align-self: flex-start; font-size: 15px; }
@media (max-width: 960px) { .case { grid-template-columns: 1fr; padding: 26px; } }

/* ---------- Open source ---------- */

.repos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.repo { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); color: inherit; transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease); }
a.repo:hover { color: inherit; transform: translateY(-2px); border-color: var(--rule-strong); box-shadow: 0 14px 30px -22px rgba(14, 23, 20, .35); }
a.repo:hover .repo-name { color: var(--bio-ink); }
.repo-kind { color: var(--faint); font-size: 13px; font-weight: 500; }
.repo-name { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -.01em; overflow-wrap: break-word; transition: color .2s; }
.repo-name svg { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.repo p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.repo .tags { margin-top: auto; padding-top: 6px; }
.repo.featured { grid-column: span 2; background: var(--ink); border-color: var(--ink); color: #e9efec; }
.repo.featured .repo-kind { color: #8fd8bd; }
.repo.featured .repo-name, .repo.featured .repo-name svg { color: #fff; }
.repo.featured p { color: #b9c6c0; font-size: 16px; }
.repo.featured .tags li { background: rgba(255, 255, 255, .1); color: #e9efec; }
a.repo.featured:hover .repo-name { color: #8fd8bd; }
@media (max-width: 960px) { .repos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .repos { grid-template-columns: 1fr; } .repo.featured { grid-column: auto; } }
.more { margin-top: 32px; }

/* ---------- Writing ---------- */

.posts { border-top: 1px solid var(--rule); }
.post { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 7fr) minmax(0, 2fr); gap: 8px 32px; padding: 30px 0; border-bottom: 1px solid var(--rule); color: inherit; }
.post:hover { color: inherit; }
.post:hover h3 { color: var(--bio-ink); }
.post time { color: var(--faint); font-size: 14.5px; padding-top: 6px; }
.post h3 { font-family: var(--serif); font-size: clamp(24px, 2.3vw, 30px); font-weight: 500; letter-spacing: -.015em; line-height: 1.15; transition: color .2s; }
.post p { margin: 10px 0 0; color: var(--muted); font-size: 16.5px; max-width: 62ch; }
.post .post-meta { color: var(--faint); font-size: 14px; text-align: right; padding-top: 6px; }
@media (max-width: 760px) { .post { grid-template-columns: 1fr; } .post .post-meta { text-align: left; } }

/* ---------- Publications and timeline ---------- */

.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px clamp(32px, 6vw, 96px); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.list-h { font-family: var(--serif); font-size: 28px; font-weight: 450; letter-spacing: -.015em; margin-bottom: 20px; }
.pubs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.pubs li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.pubs b { display: block; font-weight: 500; font-size: 16.5px; line-height: 1.4; color: var(--ink); }
.pubs span { display: block; margin-top: 4px; color: var(--faint); font-size: 14px; }
.pubs a { color: var(--ink); }
.pubs a:hover b { color: var(--bio-ink); }

.timeline { margin: 0; padding: 0 0 0 26px; list-style: none; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1.5px; background: var(--rule-strong); }
.timeline li { position: relative; padding: 0 0 22px; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--rule-strong); }
.timeline li:first-child::before { background: var(--bio); border-color: var(--bio); box-shadow: 0 0 0 4px var(--bio-soft); }
.timeline b { display: block; font-weight: 600; font-size: 16px; }
.timeline span { display: block; color: var(--ink-2); font-size: 15px; }
.timeline em { display: block; font-style: normal; color: var(--faint); font-size: 14px; }

/* ---------- Contact ---------- */

.contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px clamp(32px, 6vw, 96px); align-items: end; }
.contact .lead { margin-top: 22px; }
.contact-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.contact-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; border-bottom: 1px solid var(--rule); color: var(--ink); font-size: 18px; font-weight: 500; transition: color .2s, padding .25s var(--ease); }
.contact-list a span { color: var(--faint); font-size: 14px; font-weight: 400; }
.contact-list a:hover { color: var(--bio-ink); padding-left: 6px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-foot { border-top: 1px solid var(--rule); padding: 28px 0 44px; color: var(--faint); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.site-foot ul { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.site-foot a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.site-foot a:hover { color: var(--ink); }
.site-foot p { margin: 0; display: flex; align-items: center; min-height: 44px; }

/* ---------- Inner pages ---------- */

.page-head { padding: clamp(56px, 8vw, 104px) 0 clamp(36px, 5vw, 56px); }
.page-head .display { font-size: clamp(42px, 5.2vw, 68px); }
.page-head .lead { margin-top: 22px; }
.page-actions { margin-top: 32px; }
.page-body { padding-bottom: clamp(72px, 9vw, 120px); }

.group { padding: clamp(40px, 5vw, 60px) 0; border-top: 1px solid var(--rule); }
.group-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px clamp(32px, 5vw, 72px); }
.group-head p { margin: 10px 0 0; color: var(--muted); font-size: 16px; max-width: 38ch; }
.group .repos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .group-head { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .group .repos { grid-template-columns: 1fr; } }

.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px clamp(32px, 6vw, 96px); align-items: start; }
.about-grid .body { font-size: 18px; color: var(--ink-2); max-width: 64ch; }
.about-grid .body p { margin-bottom: 1.15em; }
.about-grid .body h2 { font-family: var(--serif); font-size: 30px; font-weight: 450; letter-spacing: -.015em; margin: 1.8em 0 .6em; color: var(--ink); }
.about-grid .body h2:first-child { margin-top: 0; }
.about-side { position: sticky; top: 100px; display: grid; gap: 40px; }
.facts { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 15px; color: var(--ink-2); }
.facts b { display: block; color: var(--faint); font-size: 13.5px; font-weight: 500; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .about-side { position: static; } }

/* ---------- Article ---------- */

.article-head { padding: clamp(48px, 7vw, 96px) 0 clamp(28px, 4vw, 44px); max-width: 860px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 20px; color: var(--muted); font-size: 15px; font-weight: 500; }
.back:hover { color: var(--ink); }
.article-head h1 { font-family: var(--serif); font-size: clamp(38px, 4.8vw, 62px); font-weight: 450; letter-spacing: -.025em; line-height: 1.04; }
.article-head .meta { margin-top: 22px; color: var(--faint); font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.article-head .meta a { color: var(--bio-ink); font-weight: 500; }

.prose { max-width: 700px; padding-bottom: clamp(64px, 8vw, 112px); font-family: var(--serif); font-size: 21px; line-height: 1.68; color: var(--ink-2); }
.prose > * { margin: 0 0 1.1em; }
.prose .lede { font-size: 24px; line-height: 1.5; color: var(--ink); }
.prose h2 { font-family: var(--sans); font-size: 27px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin: 2.1em 0 .6em; line-height: 1.2; }
.prose h3 { font-family: var(--sans); font-size: 21px; font-weight: 600; letter-spacing: -.012em; color: var(--ink); margin: 1.7em 0 .5em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--bio); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { color: var(--bio-ink); }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; padding-left: .2em; }
.prose li::marker { color: var(--faint); font-family: var(--sans); font-size: .85em; }
.prose code { font-family: var(--mono); font-size: .78em; background: var(--sunk); padding: .12em .4em; border-radius: 4px; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 3em 0 1.5em; }
.prose .source { font-family: var(--sans); font-size: 15px; color: var(--faint); }

.readout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 2em 0; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; font-family: var(--sans); }
.readout div { background: var(--surface); padding: 20px 22px; }
.readout dt { font-size: 14px; color: var(--muted); margin-bottom: 8px; line-height: 1.35; }
.readout dd { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -.03em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.readout .vs { display: block; margin-top: 10px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--faint); }
.readout .lo dd { color: #b2421b; }
@media (max-width: 560px) { .readout { grid-template-columns: 1fr; } }

/* ---------- Motion ---------- */

[data-enter] > * { animation: enter .8s var(--ease) both; }
[data-enter] > *:nth-child(2) { animation-delay: .06s; }
[data-enter] > *:nth-child(3) { animation-delay: .12s; }
[data-enter] > *:nth-child(4) { animation-delay: .18s; }
[data-enter] > *:nth-child(5) { animation-delay: .24s; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Portrait ---------- */
.portrait { width: 100%; max-width: 360px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 16px; border: 1px solid var(--rule); }

/* ---------- Lifecycle strip (home) ---------- */
.lifecycle { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 0 24px; padding: 0; list-style: none; counter-reset: st; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.lifecycle li { padding: 18px 18px 18px 20px; counter-increment: st; }
.lifecycle li + li { border-left: 1px solid var(--rule); }
.lifecycle li::before { content: counter(st); display: inline-grid; place-items: center; width: 24px; height: 24px; margin-bottom: 10px; border-radius: 50%; background: var(--bio-soft); color: var(--bio-ink); font-size: 12.5px; font-weight: 600; }
.lifecycle b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.lifecycle span { display: block; margin-top: 4px; color: var(--faint); font-size: 13px; }
@media (max-width: 1000px) {
  .lifecycle { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lifecycle li:nth-child(4) { border-left: 0; }
  .lifecycle li:nth-child(n+4) { border-top: 1px solid var(--rule); }
}
@media (max-width: 560px) {
  .lifecycle { grid-template-columns: 1fr 1fr; }
  .lifecycle li:nth-child(odd) { border-left: 0; }
  .lifecycle li:nth-child(even) { border-left: 1px solid var(--rule); }
  .lifecycle li:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
.dash-card { background: var(--bio-soft); border-color: #c6e2d5; }
.dash-card .repo-kind { color: var(--bio-ink); }
.dash-card .link { align-self: flex-start; margin-top: auto; }
a.dash-card:hover .repo-name { color: var(--bio-ink); }

/* ---------- Harness dashboard ---------- */
.note { margin: 16px 0 0; color: var(--faint); font-size: 14.5px; max-width: 70ch; }
.dash { padding: 32px; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); margin-bottom: clamp(40px, 5vw, 64px); }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 44px; padding: 0 16px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 500 14px var(--sans); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.stage { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; height: 100%; padding: 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background-color .2s, transform .18s var(--ease); }
.stage:hover { border-color: var(--rule-strong); transform: translateY(-1px); }
.stage[aria-pressed="true"] { border-color: var(--bio); background: var(--bio-soft); box-shadow: inset 0 0 0 1px var(--bio); }
.stage-n { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-bottom: 6px; border-radius: 50%; background: var(--surface); border: 1px solid var(--rule-strong); font-size: 12.5px; font-weight: 600; }
.stage b { font-size: 15px; font-weight: 600; line-height: 1.25; }
.stage-sub { color: var(--muted); font-size: 13px; line-height: 1.4; }
.stage-count { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: auto; padding-top: 10px; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-internal { background: var(--mat); }
.dot-open { background: var(--bio); }
.stage-count > span { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; }
@media (max-width: 1000px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .board { grid-template-columns: 1fr 1fr; } .dash { padding: 20px; } }
.dash-status { margin: 22px 0 14px; color: var(--muted); font-size: 14.5px; }
.reset { margin-left: 8px; padding: 0 4px; min-height: 44px; border: 0; background: none; color: var(--bio-ink); font: 600 14.5px var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hcard { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
.hcard[hidden] { display: none; }
.hcard-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.stage-pill { color: var(--faint); font-size: 13px; font-weight: 500; }
.badge { padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.6; }
.badge-open { background: var(--bio-soft); color: var(--bio-ink); }
.badge-internal { background: var(--mat-soft); color: var(--mat); }
.badge-building { background: #fdf0d9; color: #8a5300; }
.hcard h3 a { color: var(--ink); background-image: linear-gradient(var(--bio), var(--bio)); background-size: 100% 1.5px; background-position: 0 100%; background-repeat: no-repeat; }
.hcard h3 a:hover { color: var(--bio-ink); }
.hcard-type { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.hcard p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: auto 0 0; padding: 12px 0 0; list-style: none; border-top: 1px dashed var(--rule); font-size: 12.5px; color: var(--ink-2); }
.flow li { display: inline-flex; align-items: center; gap: 6px; }
.flow li span { padding: 3px 8px; border-radius: 6px; background: var(--sunk); }
.flow li + li::before { content: ""; width: 10px; height: 1.5px; background: var(--rule-strong); }
.flow li:last-child span { background: var(--bio-soft); color: var(--bio-ink); font-weight: 600; }
@media (max-width: 1000px) { .hcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .hcards { grid-template-columns: 1fr; } }

.anatomy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: an; }
.anatomy li { padding: 20px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); counter-increment: an; }
.anatomy li::before { content: counter(an); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-bottom: 10px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }
.anatomy li:nth-child(5)::before { background: var(--bio); }
.anatomy b { display: block; font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.anatomy span { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
@media (max-width: 760px) { .anatomy { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .anatomy { grid-template-columns: 1fr; } }
.rules { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.rules li { padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 15.5px; }
.rules b { display: block; color: var(--ink); font-weight: 600; font-size: 16.5px; margin-bottom: 2px; }
