@font-face { font-family: "Bricolage Grotesque"; src: url(../fonts/BricolageGrotesque.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(../fonts/InstrumentSans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
:root {
    --film: #EAF0F0; --sheet: #F7FAFA; --band: #DCE9EA;
    --ink: #13202A; --ink-2: #3B4B57; --muted: #5E6F7B; --line: #93A9B2; --hair: #C8D5DA;
    --blue: #1F6F8B; --blue-soft: #DCEBF1;          /* data, links: cyanotype */
    --filled: #0B7A5C; --filled-soft: #D3E8E0;      /* live: a filled order */
    --working: #A86400; --working-soft: #F3E4C8;    /* in development */
    --filled-ink: #08684E; --working-ink: #8F5500;   /* text on the tinted chips (>= 4.5:1) */
    --display: "Bricolage Grotesque", system-ui, sans-serif;
    --text: "Instrument Sans", system-ui, sans-serif;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --film: #0E1519; --sheet: #142027; --band: #11202A; --ink: #DCE6EA; --ink-2: #B0C0C7; --muted: #8A9DA7; --line: #4A6470; --hair: #24343C;
      --blue: #62BBD8; --blue-soft: #15303B; --filled: #3FC49A; --filled-soft: #15362D; --working: #E3A447; --working-soft: #3A2C12; --filled-ink: #3FC49A; --working-ink: #E3A447; color-scheme: dark; }
  }
  :root[data-theme="dark"] {
    --film: #0E1519; --sheet: #142027; --band: #11202A; --ink: #DCE6EA; --ink-2: #B0C0C7; --muted: #8A9DA7; --line: #4A6470; --hair: #24343C;
    --blue: #62BBD8; --blue-soft: #15303B; --filled: #3FC49A; --filled-soft: #15362D; --working: #E3A447; --working-soft: #3A2C12; --filled-ink: #3FC49A; --working-ink: #E3A447; color-scheme: dark; }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0; color: var(--ink); font: 400 1.0625rem/1.62 var(--text);
    background-color: var(--film);
    background-image: linear-gradient(color-mix(in srgb, var(--line) 15%, transparent) 1px, transparent 1px),
                      linear-gradient(90deg, color-mix(in srgb, var(--line) 15%, transparent) 1px, transparent 1px);
    background-size: 32px 32px;
  }
  a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; text-decoration-color: var(--blue); }
  a:hover { text-decoration-thickness: 2px; color: var(--blue); }
  :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
  .skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--film); padding: .5rem .75rem; }
  .skip:focus { left: .5rem; }
  .wrap { max-width: 78rem; margin: 0 auto; padding: 0 1.25rem; }
  h1, h2, h3 { margin: 0; font-family: var(--display); }
  .display { font-family: var(--display); font-weight: 700; font-variation-settings: "opsz" 96; letter-spacing: -.012em; }

  /* header */
  header.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--film) 90%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--hair); }
  header.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 3.5rem; font-size: .9375rem; }
  .mark { font-family: var(--display); font-weight: 750; font-size: 1.1rem; text-decoration: none; letter-spacing: -.02em; }
  .mark i { font-style: normal; display: inline-block; width: .55rem; height: .55rem; background: var(--filled); border-radius: 50%; margin-left: .35rem; vertical-align: .08em; }
  header nav { display: flex; align-items: center; gap: 1.25rem; }
  header nav a { text-decoration: none; color: var(--ink-2); }
  header nav a.cv { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--blue); }
  .theme { font: inherit; font-size: .8125rem; color: var(--ink-2); background: none; border: 1px solid var(--line); padding: .25rem .55rem; cursor: pointer; }

  /* hero */
  .hero { padding-top: 3.25rem; padding-bottom: 3rem; }
  .hero-grid { display: grid; grid-template-columns: minmax(0, 32rem) minmax(0, 1fr); gap: 3rem; align-items: start; }
  .hero h1 { font-size: clamp(2.5rem, 5vw, 4.35rem); line-height: .96; }
  .hero .sub { font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); margin: 1.4rem 0 1.6rem; max-width: 30rem; }
  .cta { display: inline-flex; align-items: baseline; gap: .6rem; background: var(--ink); color: var(--film); text-decoration: none; font-weight: 600; padding: .9rem 1.2rem; }
  .cta:hover { color: var(--film); background: var(--blue); }
  .cta small { font-weight: 400; opacity: .8; }
  .quick { display: flex; gap: 1.25rem; margin-top: 1rem; font-size: .9375rem; }
  .systems-index { list-style: none; padding: 0; margin: 1.75rem 0 0; border-top: 1px solid var(--line); display: none; }
  .systems-index li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--hair); font-size: .9375rem; }

  /* status chips */
  .chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; padding: .22rem .55rem; border-radius: 999px; white-space: nowrap; }
  .chip::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
  .chip.live { color: var(--filled-ink); background: var(--filled-soft); }
  .chip.dev { color: var(--working-ink); background: var(--working-soft); }
  .chip.dev::before { background: transparent; border: 2px solid currentColor; width: .42rem; height: .42rem; }
  .chip.data { color: var(--blue); background: var(--blue-soft); }

  /* drawings */
  .drawing { margin: 0; position: relative; background: var(--sheet); border: 1.5px solid var(--ink); padding: 1rem 1rem 0; }
  .drawing::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--hair); pointer-events: none; }
  svg.dg { display: block; width: 100%; height: auto; position: relative; overflow: visible; }
  .n rect { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.4; rx: 3; }
  .n.store rect { fill: var(--blue-soft); stroke: var(--blue); }
  .n.live rect { fill: var(--filled-soft); stroke: var(--filled); stroke-width: 2; }
  .n.dash rect { stroke-dasharray: 5 4; stroke: var(--muted); fill: var(--sheet); }
  .n.dev rect { stroke: var(--working); stroke-dasharray: 5 4; fill: var(--working-soft); }
  .n text { fill: var(--ink); font: 650 14px var(--display); }
  .n text.s { fill: var(--muted); font: 400 11.5px var(--text); }
  .n a:hover rect, .n a:focus-visible rect { stroke-width: 2.6; }
  .e { fill: none; stroke: var(--line); stroke-width: 1.5; }
  .e.main { stroke: var(--ink-2); stroke-width: 1.8; }
  .flow { fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 0.1 10; animation: flow 1.4s linear infinite; pointer-events: none; }
  .flow.trade { stroke: var(--filled); } .flow.data { stroke: var(--blue); } .flow.ask { stroke: var(--working); }
  @keyframes flow { to { stroke-dashoffset: -20.2; } }
  .paused .flow, .paused .token { animation-play-state: paused; }
  .token { fill: var(--filled); offset-path: path("M 128 70 H 560 V 222"); opacity: 0; animation: travel 2.6s cubic-bezier(.45,.05,.3,1) 1s forwards; }
  @keyframes travel { 0% { offset-distance: 0%; opacity: 1; } 96% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
  .fill-at-end rect { animation: filled .5s ease-out 3.5s forwards; }
  @keyframes filled { to { fill: var(--filled-soft); stroke: var(--filled); stroke-width: 2; } }
  .caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; font-size: .8125rem; color: var(--muted); padding: .6rem 0 .75rem; border-top: 1px solid var(--hair); margin-top: .5rem; }
  .legend { display: flex; gap: .9rem; flex-wrap: wrap; }
  .legend span { display: inline-flex; align-items: center; gap: .35rem; }
  .legend i { width: .85rem; height: .6rem; border: 1.5px solid var(--ink); display: inline-block; border-radius: 2px; }
  .legend i.store { background: var(--blue-soft); border-color: var(--blue); }
  .legend i.live { background: var(--filled-soft); border-color: var(--filled); }
  .legend i.flowkey { border: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--filled) 0 3px, transparent 3px 7px); }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .flow { animation: none; } .token { display: none; }
    .fill-at-end rect { animation: none; fill: var(--filled-soft); stroke: var(--filled); }
  }
  .titleblock { display: grid; grid-template-columns: 1.3fr 1fr 1fr; border: 1.5px solid var(--ink); border-top: 0; background: var(--sheet); font-size: .8125rem; margin: 0; }
  .titleblock div { padding: .5rem .7rem; border-right: 1px solid var(--hair); }
  .titleblock div:last-child { border-right: 0; }
  .titleblock dt { color: var(--muted); font-size: .75rem; }
  .titleblock dd { margin: .1rem 0 0; font-weight: 650; font-family: var(--display); }
  .v-only { display: none !important; }

  /* sections */
  section.part { padding: 4.25rem 0; border-top: 1.5px solid var(--ink); scroll-margin-top: 3.5rem; }
  section.band { background: var(--band); }
  .part-head { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 3rem; margin-bottom: 2.5rem; }
  .part-head h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1; }
  .part-head p { margin: 0; color: var(--ink-2); max-width: 40rem; align-self: end; }

  /* current role */
  .role-main { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 3rem; }
  .role-id h3 { font-size: 1.55rem; line-height: 1.12; font-weight: 700; }
  .role-id p { margin: .5rem 0 0; color: var(--ink-2); font-size: .9375rem; }
  .figures { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); margin: 1.5rem 0 0; background: var(--sheet); }
  .figures div { padding: .8rem .9rem; border-right: 1px solid var(--hair); }
  .figures div:last-child { border-right: 0; }
  .figures b { display: block; font-family: var(--display); font-weight: 750; font-size: 1.6rem; line-height: 1.1; color: var(--blue); }
  .figures span { font-size: .8125rem; color: var(--muted); }
  .work-list { list-style: none; margin: 0; padding: 0; }
  .work-list li { display: grid; grid-template-columns: 9rem 1fr; gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--hair); }
  .work-list li:first-child { padding-top: 0; }
  .work-list .k { font-size: .8125rem; color: var(--blue); font-weight: 650; padding-top: .15rem; }
  .work-list p { margin: 0; }

  /* next roles */
  .paths { display: grid; grid-template-columns: minmax(0, 15rem) 3rem minmax(0, 1fr); align-items: stretch; }
  .from { border: 1.5px solid var(--ink); background: var(--sheet); padding: 1rem; align-self: center; }
  .from h3 { font-size: 1.1rem; font-weight: 700; }
  .from p { margin: .35rem 0 0; font-size: .875rem; color: var(--muted); }
  .wires { position: relative; }
  .wires svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .targets { display: grid; gap: 1.5rem; }
  .target { border: 1.5px solid var(--ink); background: var(--sheet); border-top: 5px solid var(--accent, var(--ink)); }
  .target.quant { --accent: var(--filled); } .target.arch { --accent: var(--blue); }
  .target header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--hair); }
  .target h3 { font-size: 1.6rem; font-weight: 750; }
  .target header span { font-size: .8125rem; color: var(--muted); }
  .target ul { list-style: none; margin: 0; padding: .4rem 1.1rem .9rem; }
  .target li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--hair); font-size: .9375rem; }
  .target li:last-child { border-bottom: 0; }
  .target li b { font-weight: 650; font-size: .8125rem; color: var(--accent); padding-top: .1rem; }

  /* experience */
  .timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); margin-left: .35rem; }
  .timeline > li { position: relative; padding: 0 0 2.2rem 1.75rem; }
  .timeline > li::before { content: ""; position: absolute; left: -.45rem; top: .45rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--sheet); border: 2px solid var(--ink); }
  .timeline > li.live::before { background: var(--filled); border-color: var(--filled); }
  .timeline > li.dev::before { background: var(--working-soft); border-color: var(--working); }
  .timeline .row { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 2.75rem; }
  .timeline h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.15; }
  .timeline .when { font-size: .875rem; color: var(--muted); margin: .3rem 0 .5rem; }
  .timeline p { margin: 0 0 .6rem; }
  .timeline ul { margin: 0; padding-left: 1.1rem; }
  .timeline li li { margin-bottom: .35rem; }
  .links { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: .7rem; font-size: .9375rem; font-weight: 600; }
  .links a { color: var(--blue); }
  .group-label { font-family: var(--display); font-weight: 650; font-size: .95rem; color: var(--muted); margin: 0 0 1.25rem 2.1rem; }

  /* systems */
  .system { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 3rem; padding: 2.75rem 0; border-top: 1px solid var(--hair); scroll-margin-top: 4rem; }
  .system:first-of-type { border-top: 0; padding-top: 0; }
  .system h3 { font-size: 1.7rem; line-height: 1.08; font-weight: 750; margin-bottom: .7rem; }
  .system .who { font-size: .875rem; color: var(--muted); margin: .9rem 0 0; }
  .system .body p { margin: 0 0 1rem; }
  figure.sheet { margin: 0 0 1.25rem; background: var(--sheet); border: 1px solid var(--line); padding: .9rem; }
  figure.sheet svg { max-width: 42rem; }
  figure.sheet figcaption { font-size: .8125rem; color: var(--muted); padding-top: .5rem; }
  figure.video { margin: 0 0 1.25rem; background: #05090C; border: 1px solid var(--line); }
  figure.video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
  figure.video figcaption { background: var(--sheet); font-size: .8125rem; color: var(--muted); padding: .5rem .7rem; }
  .decisions { margin: 0; padding: 0; list-style: none; counter-reset: d; }
  .decisions li { counter-increment: d; display: grid; grid-template-columns: 1.9rem 1fr; padding: .5rem 0; border-top: 1px dashed var(--hair); font-size: .9688rem; }
  .decisions li::before { content: counter(d); font-family: var(--display); font-weight: 750; color: var(--blue); }
  .stackline { font-size: .875rem; color: var(--muted); margin-top: 1rem; }

  /* stack */
  .stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 2rem 2.5rem; }
  .stack h3 { font-size: 1rem; font-weight: 700; padding-bottom: .5rem; border-bottom: 2px solid var(--blue); }
  .stack ul { list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
  .stack li { display: flex; justify-content: space-between; gap: .75rem; padding: .32rem 0; border-bottom: 1px solid var(--hair); }
  .stack li small { color: var(--muted); font-size: .75rem; text-align: right; }

  /* more work */
  .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.75rem; }
  .gallery figure { margin: 0; background: var(--sheet); border: 1px solid var(--line); }
  .gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); }
  .gallery figcaption { padding: .7rem .85rem .85rem; font-size: .9375rem; }
  .gallery figcaption a { font-weight: 650; font-family: var(--display); }
  .gallery figcaption span { display: block; color: var(--muted); font-size: .8125rem; margin-top: .15rem; }

  /* about, contact, footer */
  .about { display: grid; grid-template-columns: minmax(0, 1fr) 24rem; gap: 3rem; max-width: 70rem; align-items: center; }
  .about .tag { font-family: var(--display); font-size: 1.45rem; font-weight: 600; line-height: 1.3; margin: 0 0 1.1rem; }
  .about p { margin: 0 0 .9rem; }
  .about .muted { color: var(--muted); font-size: .9375rem; }
  .contact { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 34rem); gap: 3rem; }
  form.msg { display: grid; gap: .8rem; }
  form.msg label { display: grid; gap: .3rem; font-size: .875rem; font-weight: 600; }
  form.msg input, form.msg textarea { font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--line); padding: .65rem .7rem; }
  form.msg button { justify-self: start; font: inherit; font-weight: 600; background: var(--ink); color: var(--film); border: 0; padding: .8rem 1.2rem; cursor: pointer; }
  form.msg button:hover { background: var(--blue); }
  form.msg button:disabled { opacity: .7; cursor: progress; }
  .form-status { margin: 0; font-size: .9375rem; padding: .7rem .85rem; border-left: 3px solid; background: var(--sheet); }
  .form-status.ok { border-color: var(--filled); color: var(--ink); }
  .form-status.err { border-color: var(--working); color: var(--ink); }
  .form-status a { font-weight: 600; }
  footer { border-top: 1.5px solid var(--ink); padding: 2.5rem 0 3rem; font-size: .875rem; color: var(--ink-2); }
  footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
  footer h2 { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
  footer ul { list-style: none; margin: 0; padding: 0; line-height: 1.9; }

  /* ---------- hero: role map ---------- */
  :root { --r-quant: #0B7A5C; --r-arch: #1F6F8B; --r-lead: #6A4C9C; --r-po: #9A5B13; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --r-quant: #3FC49A; --r-arch: #62BBD8; --r-lead: #B59CE6; --r-po: #E3A55A; } }
  :root[data-theme="dark"] { --r-quant: #3FC49A; --r-arch: #62BBD8; --r-lead: #B59CE6; --r-po: #E3A55A; }
  .hero2 { padding-top: 2.25rem; padding-bottom: 3rem; }
  .intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3rem; align-items: end; margin-bottom: 1.6rem; }
  .intro h1 { font-size: clamp(2.4rem, 4.2vw, 3.7rem); line-height: .98; max-width: 14ch; }
  .intro .sub { font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); margin: 0 0 1.25rem; max-width: 34rem; }
  .intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
  .intro-actions .quick { margin: 0; }

  .rolemap { --role: var(--r-quant); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 23rem); background: var(--sheet); border: 1.5px solid var(--ink); }
  .rolemap[data-role="arch"] { --role: var(--r-arch); }
  .rolemap[data-role="lead"] { --role: var(--r-lead); }
  .rolemap[data-role="po"] { --role: var(--r-po); }
  .map-stage { position: relative; padding: 1rem 1.25rem 1.1rem; border-right: 1px solid var(--hair); }
  .map-cols { display: grid; grid-template-columns: 1fr 1.35fr 1fr; font-size: .8125rem; color: var(--muted); padding: 0 .25rem .4rem; border-bottom: 1px dashed var(--hair); }
  .map-cols span:nth-child(2) { text-align: center; } .map-cols span:nth-child(3) { text-align: right; }
  .map-svg { display: block; width: 100%; height: auto; margin-top: .4rem; }

  /* nodes */
  .m-node rect { fill: var(--sheet); stroke: var(--line); stroke-width: 1.3; transition: stroke .35s, fill .35s, opacity .35s; }
  .m-node text { font: 600 13px var(--display); fill: var(--ink); transition: opacity .35s, fill .35s; }
  .m-node text.s { font: 400 11px var(--text); fill: var(--muted); }
  .m-node.src rect { fill: var(--film); }
  .m-node.role rect { stroke-width: 2; }
  .m-node.role { cursor: pointer; }
  .m-node.role .dot { transition: r .35s; }
  .m-node.dim { opacity: .38; }
  .m-node.on rect { stroke: var(--role); stroke-width: 2; fill: color-mix(in srgb, var(--role) 12%, var(--sheet)); }
  .m-node.role.on rect { fill: color-mix(in srgb, var(--role) 18%, var(--sheet)); stroke-width: 2.6; }
  .m-node.role.on text { fill: var(--role); }
  /* edges */
  .m-edge { fill: none; stroke: var(--hair); stroke-width: 1.4; transition: stroke .35s, opacity .35s, stroke-width .35s; }
  .m-edge.on { stroke: color-mix(in srgb, var(--role) 55%, transparent); stroke-width: 2; }
  .m-flow { fill: none; stroke: var(--role); stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: .1 13; opacity: 0; transition: opacity .35s; animation: flow 1.1s linear infinite; }
  .m-flow.on { opacity: 1; }
  .m-draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: mdraw 1.1s cubic-bezier(.3,.6,.2,1) forwards; }
  @keyframes mdraw { to { stroke-dashoffset: 0; } }

  /* chips (phones) */
  .chips { display: none; list-style: none; margin: .75rem 0 0; padding: 0; flex-wrap: wrap; gap: .4rem; }
  .chips li { font-size: .8125rem; padding: .28rem .6rem; border-radius: 999px; border: 1px solid var(--hair); color: var(--muted); transition: all .35s; }
  .chips li.on { border-color: var(--role); color: var(--ink); background: color-mix(in srgb, var(--role) 14%, var(--sheet)); }

  /* readout */
  .readout { display: flex; flex-direction: column; padding: 1rem 1.25rem 1.1rem; min-height: 100%; }
  .tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
  .tabs button { font: 600 .8125rem var(--text); color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .75rem; cursor: pointer; transition: all .25s; }
  .tabs button:hover { border-color: var(--ink); color: var(--ink); }
  .tabs button[aria-selected="true"] { background: var(--role); border-color: var(--role); color: var(--sheet); }
  .panel h2 { font-size: 1.75rem; font-weight: 750; letter-spacing: -.015em; color: var(--role); line-height: 1.05; }
  .panel .why { margin: .45rem 0 .9rem; color: var(--ink-2); font-size: .9688rem; }
  .panel ul { list-style: none; margin: 0; padding: 0; }
  .panel li { font-size: .9063rem; line-height: 1.5; padding: .5rem 0; border-top: 1px dashed var(--hair); }
  .panel li b { display: inline-block; font: 650 .6875rem var(--text); color: var(--role); border: 1px solid currentColor; border-radius: 3px; padding: .02rem .3rem; margin-right: .45rem; vertical-align: .08em; }
  .panel .more { display: inline-block; margin-top: .7rem; font-weight: 600; font-size: .9375rem; color: var(--role); }
  .panel[hidden] { display: none; }
  .panel.enter { animation: panelIn .45s ease-out; }
  @keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .autoplay { margin-top: auto; align-self: flex-start; font: 500 .8125rem var(--text); color: var(--muted); background: none; border: 0; padding: .9rem 0 0; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
  .autoplay .bar { display: block; }
  .tour-progress { height: 2px; background: var(--hair); margin-top: .9rem; overflow: hidden; }
  .tour-progress i { display: block; height: 100%; width: 0; background: var(--role); }
  .touring .tour-progress i { animation: tour 5s linear forwards; }
  @keyframes tour { to { width: 100%; } }

  @media (prefers-reduced-motion: reduce) {
    .m-flow { animation: none; } .m-draw { animation: none; stroke-dashoffset: 0; }
    .panel.enter { animation: none; } .touring .tour-progress i { animation: none; }
  }
  @media (max-width: 900px) {
    .hero2 { padding-top: 1.5rem; padding-bottom: 2rem; }
    .intro { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.5rem; }
    .intro h1 { font-size: 2.35rem; }
    .intro .sub { font-size: 1.0625rem; }
    .rolemap { grid-template-columns: 1fr; }
    .map-stage { border-right: 0; border-bottom: 1px solid var(--hair); order: 2; padding: .9rem 1rem 1rem; }
    .map-cols, .map-svg { display: none; }
    .chips { display: flex; margin-top: 0; }
    .readout { order: 1; padding: 1rem; }
    .panel h2 { font-size: 1.5rem; }
  }

  /* ---------- B5: hero fits the screen ---------- */
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hero3 { height: calc(100svh - 3.5rem); min-height: 34rem; max-height: 62rem; }
  .hero3-inner { height: 100%; display: flex; flex-direction: column; padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .intro3 { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
  .intro3 h1 { font-size: clamp(1.9rem, 3.3vw, 3rem); line-height: 1.02; }
  .slot { display: inline-grid; vertical-align: bottom; overflow: hidden; height: 1.08em; }
  .slot > span { grid-area: 1 / 1; color: var(--role, var(--r-quant)); transform: translateY(110%); opacity: 0; transition: transform .55s cubic-bezier(.2,.7,.1,1), opacity .4s; white-space: nowrap; }
  .slot > span.on { transform: none; opacity: 1; }
  .slot > span.out { transform: translateY(-110%); opacity: 0; }
  .under { margin: .5rem 0 0; font-size: .9375rem; color: var(--muted); font-weight: 500; }
  .hero3 .rolemap { flex: 1; min-height: 0; }
  .hero3 .map-stage { display: flex; flex-direction: column; min-height: 0; }
  .hero3 .map-svg { flex: 1; min-height: 0; height: 100%; }
  .hero3 .readout { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
  .hero3 .panel h2 { font-size: 1.5rem; }
  .hero3 .panel li { font-size: .875rem; padding: .42rem 0; }
  .hero3 .panel .why { font-size: .9063rem; margin: .35rem 0 .6rem; }
  body[data-role="quant"] { --role: var(--r-quant); } body[data-role="arch"] { --role: var(--r-arch); }
  body[data-role="lead"] { --role: var(--r-lead); } body[data-role="po"] { --role: var(--r-po); }

  /* ---------- alive: cursor-lit drafting grid ---------- */
  .gridglow { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .6s;
    background-image: linear-gradient(color-mix(in srgb, var(--role, var(--blue)) 45%, transparent) 1px, transparent 1px),
                      linear-gradient(90deg, color-mix(in srgb, var(--role, var(--blue)) 45%, transparent) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(180px circle at var(--mx, -999px) var(--my, -999px), #000 0%, transparent 70%);
            mask-image: radial-gradient(180px circle at var(--mx, -999px) var(--my, -999px), #000 0%, transparent 70%); }
  body.pointer .gridglow { opacity: 1; }
  main, footer { position: relative; z-index: 1; }
  header.bar { z-index: 10; }                     /* stays sticky (set above); `relative` here had unstuck it */

  /* scroll progress along the header */
  header.bar::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--role, var(--blue)); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }
  header.bar { transition: box-shadow .3s; }
  body.scrolled header.bar { box-shadow: 0 6px 18px -14px rgba(0,0,0,.45); }

  /* section rules draw across; headings rise out of the rule */
  section.part { border-top: 0; position: relative; }
  section.part::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1.5px; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1s cubic-bezier(.2,.7,.1,1); }
  section.part.in::before { transform: scaleX(1); }
  .part-head h2 { clip-path: inset(0 0 100% 0); transform: translateY(.35em); transition: clip-path .8s cubic-bezier(.2,.7,.1,1) .15s, transform .8s cubic-bezier(.2,.7,.1,1) .15s; }
  section.part.in .part-head h2 { clip-path: inset(0 0 -10% 0); transform: none; }
  .no-js section.part::before, .no-js .part-head h2 { transform: none; clip-path: none; }

  /* timeline: a pen draws the line as you scroll (eased in JS); each entry is written in as the pen reaches its dot */
  .timeline { position: relative; }
  .timeline::after { content: ""; position: absolute; left: -2px; top: 0; width: 2px; height: 100%; background: var(--role, var(--blue));
    transform-origin: 50% 0; transform: scaleY(var(--fill, 0)); }
  .tl-pen { position: absolute; left: -2px; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -5px; border-radius: 50%; z-index: 1;
    background: var(--role, var(--blue)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--role, var(--blue)) 18%, transparent), 0 0 14px color-mix(in srgb, var(--role, var(--blue)) 45%, transparent);
    transform: translateY(var(--pen, 0px)); opacity: 0; transition: opacity .35s, background .4s; pointer-events: none; }
  .timeline.drawing .tl-pen { opacity: 1; }
  .timeline > li::before { transition: transform .5s cubic-bezier(.3,1.6,.5,1), background-color .4s, border-color .4s; z-index: 1; }
  .timeline > li.reached::before { transform: scale(1.2); }
  .timeline > li:not(.live):not(.dev).reached::before { background: var(--role, var(--blue)); border-color: var(--role, var(--blue)); }
  .timeline > li::after { content: ""; position: absolute; left: calc(-.45rem - 1px); top: calc(.45rem - 1px); width: calc(.8rem + 2px); height: calc(.8rem + 2px);
    border-radius: 50%; border: 2px solid var(--role, var(--blue)); opacity: 0; pointer-events: none; }
  .timeline > li.ripple::after { animation: tlRipple .9s cubic-bezier(.2,.7,.1,1); }
  @keyframes tlRipple { from { opacity: .55; transform: scale(1); } to { opacity: 0; transform: scale(2.8); } }
  /* the entry is written in: title rises out of its clip, then the details settle, bullets one after another */
  .tl-anim > li h3 { clip-path: inset(0 0 100% 0); transform: translateY(.4em); transition: clip-path .8s cubic-bezier(.2,.7,.1,1), transform .8s cubic-bezier(.2,.7,.1,1); }
  .tl-anim > li .when, .tl-anim > li .chip, .tl-anim > li .row > div:last-child > p, .tl-anim > li .links, .tl-anim > li li {
    opacity: 0; transform: translateY(10px); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.1,1); }
  .tl-anim > li .when { transition-delay: .12s; } .tl-anim > li .chip { transition-delay: .18s; }
  .tl-anim > li .row > div:last-child > p { transition-delay: .16s; }
  .tl-anim > li li { transition-delay: calc(.22s + var(--i, 0) * .07s); }
  .tl-anim > li .links { transition-delay: calc(.3s + var(--n, 0) * .07s); }
  .tl-anim > li.written h3 { clip-path: inset(0 0 -12% 0); transform: none; }
  .tl-anim > li.written .when, .tl-anim > li.written .chip, .tl-anim > li.written .row > div:last-child > p, .tl-anim > li.written .links, .tl-anim > li.written li { opacity: 1; transform: none; }

  /* stack filter */
  .stack-filter { display: flex; flex-wrap: wrap; gap: .45rem; margin: -1rem 0 1.75rem; }
  .stack-filter button { font: 600 .8125rem var(--text); color: var(--ink-2); background: var(--sheet); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; cursor: pointer; transition: all .2s; }
  .stack-filter button[aria-pressed="true"] { background: var(--ink); color: var(--film); border-color: var(--ink); }
  .stack li { transition: opacity .3s, background .3s; }
  .stack.filtering li { opacity: .28; }
  .stack.filtering li.match { opacity: 1; background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 12%, transparent), transparent 70%); }

  /* more work: hovering a screenshot scrolls through the page it shows */
  .gallery img { transition: object-position 2.6s ease-in-out; }
  .gallery figure:hover img, .gallery figure:focus-within img { object-position: bottom; }
  .gallery figure { transition: transform .3s, box-shadow .3s; }
  .gallery figure:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -22px rgba(0,0,0,.5); }
  .gallery .new { display: inline-block; margin-left: .45rem; font: 600 .6875rem var(--text); color: var(--filled-ink); background: var(--filled-soft); border-radius: 999px; padding: .08rem .45rem; vertical-align: .12em; }

  /* about: an orbit of interests instead of the stock illustration */
  .orbit { width: 100%; max-width: 26rem; height: auto; }
  .orbit .ring { fill: none; stroke: var(--line); stroke-width: 1.2; }
  .orbit .ticks line { stroke: var(--line); stroke-width: 1; }
  .orbit .spin { transform-origin: 150px 150px; animation: spin 60s linear infinite; }
  .orbit .spin .lab { transform-box: fill-box; transform-origin: center; animation: spin 60s linear infinite reverse; }
  .orbit:hover .spin, .orbit:hover .spin .lab, .paused .orbit .spin, .paused .orbit .spin .lab { animation-play-state: paused; }
  .orbit .core { fill: var(--ink); } .orbit .core-t { fill: var(--film); font: 750 22px var(--display); }
  .orbit .pt { fill: var(--sheet); stroke: var(--blue); stroke-width: 1.6; }
  .orbit .lab text { font: 650 15px var(--display); fill: var(--ink); }
  .orbit .spoke { stroke: var(--hair); stroke-width: 1; stroke-dasharray: 2 4; }
  @keyframes spin { to { transform: rotate(360deg); } }

  @media (prefers-reduced-motion: reduce) {
    .slot > span { transition: none; } section.part::before, .part-head h2 { transition: none; }
    .gridglow { display: none; } .orbit .spin, .orbit .spin .lab { animation: none; }
    .gallery img { transition: none; }
  }
  @media (max-width: 900px) {
    .hero3 { height: calc(100svh - 3.5rem); min-height: 0; }
    .hero3-inner { padding-top: 1rem; padding-bottom: 1rem; }
    .intro3 { margin-bottom: .8rem; gap: .9rem; }
    .intro3 h1 { font-size: 1.75rem; }
    .intro-actions .cta { padding: .7rem 1rem; }
    .hero3 .readout { padding: .8rem .9rem; }
    .hero3 .tabs { margin-bottom: .6rem; }
    .hero3 .tabs button { font-size: .75rem; padding: .28rem .6rem; }
    .hero3 .map-stage { flex: 0 0 auto; padding: .6rem .9rem; }
    .hero3 .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .hero3 .chips li { white-space: nowrap; font-size: .75rem; }
    .hero3 .rolemap { display: flex; flex-direction: column; }
    .hero3 .readout { flex: 1; }
  }

  /* ---------- resume button: a drawn sheet with an offset print shadow in the current role colour ---------- */
  .resume-btn, header nav a.cv.resume-btn {
    --c: var(--role, var(--ink));
    position: relative; display: inline-flex; align-items: center; gap: .55rem;
    font: 650 1rem/1 var(--display); letter-spacing: -.005em; color: var(--ink); text-decoration: none;
    padding: .78rem 1.15rem .78rem .9rem; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 7px;
    box-shadow: 4px 4px 0 var(--c); transition: transform .18s ease, box-shadow .18s ease, background .25s, color .25s;
  }
  .resume-btn .ico { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
  .resume-btn .ico .arr { transition: transform .25s cubic-bezier(.3,.7,.2,1.3); }
  .resume-btn .ico .sheet { transition: fill .25s; }
  .resume-btn:hover, header nav a.cv.resume-btn:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--c); }
  .resume-btn:hover .ico .arr, .resume-btn:focus-visible .ico .arr { transform: translateY(2.5px); }
  .resume-btn:hover .ico .sheet { fill: color-mix(in srgb, var(--c) 22%, transparent); }
  .resume-btn:active, header nav a.cv.resume-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--c); }
  .resume-btn:focus-visible { outline: 2px solid var(--c); outline-offset: 4px; }
  .resume-btn.sm, header nav a.cv.resume-btn.sm { font-size: .875rem; padding: .42rem .8rem .42rem .6rem; border-radius: 6px; box-shadow: 3px 3px 0 var(--c); gap: .4rem; }
  .resume-btn.sm .ico { width: 1rem; height: 1rem; }
  .resume-btn.sm:hover, header nav a.cv.resume-btn.sm:hover { box-shadow: 4px 4px 0 var(--c); }
  @media (prefers-reduced-motion: reduce) { .resume-btn, .resume-btn .ico .arr { transition: none; } .resume-btn:hover { transform: none; } }

  @media (max-width: 900px) {
    header nav a:not(.cv) { display: none; }
    .hero { padding-top: 1.5rem; padding-bottom: 2rem; }
    .hero-grid, .part-head, .role-main, .system, .contact, .about, .timeline .row { grid-template-columns: 1fr; gap: 1.25rem; }
    .hero h1 { font-size: 2.45rem; }
    .hero .sub { font-size: 1.0625rem; margin: 1rem 0 1.2rem; }
    .systems-index { display: block; }
    .h-only { display: none !important; } .v-only { display: block !important; }
    .titleblock { grid-template-columns: 1fr 1fr; }
    .titleblock div:first-child { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--hair); }
    .paths { grid-template-columns: 1fr; } .wires { height: 2.5rem; }
    .target li, .work-list li { grid-template-columns: 1fr; gap: .2rem; }
    .figures b { font-size: 1.25rem; }
    footer .cols { grid-template-columns: 1fr 1fr; } footer .cols > div:first-child { grid-column: 1 / -1; }
    section.part { padding: 3rem 0; }
  }

/* very narrow phones: keep the header on one line */
@media (max-width: 400px) {
  .mark { font-size: .98rem; white-space: nowrap; }
  header nav { gap: .55rem; }
  .theme { padding: .2rem .4rem; }
  .resume-btn.sm, header nav a.cv.resume-btn.sm { padding: .36rem .6rem .36rem .5rem; }
}

/* review fixes 2026-09-30 */
.subnav { display: none; }
.wide-only { display: inline-block; }
@media (max-width: 900px) {
  .wide-only { display: none; }
  .subnav { display: flex; gap: 1rem; align-items: center; overflow-x: auto; scrollbar-width: none; white-space: nowrap;
            padding: .45rem 1.25rem .55rem; border-top: 1px solid var(--hair); font-size: .8438rem; }
  .subnav::-webkit-scrollbar { display: none; }
  header nav.subnav a { display: inline; color: var(--ink-2); text-decoration: none; }
  .subnav .theme { flex: 0 0 auto; font-size: .75rem; }
  .hero3 { height: calc(100svh - var(--hdr, 6.2rem)); }
  section.part { scroll-margin-top: calc(var(--hdr, 6.2rem) + .25rem); }
  .hero3 .chips { display: none; }               /* overlapped the panel's last link on phones */
  figure.sheet { overflow-x: auto; }              /* diagrams keep a legible size and scroll sideways */
  figure.sheet svg { min-width: 36rem; }
}

/* ---------- masthead: at the top of the page the bar carries the name at the title's size and folds to the
   compact bar once the reader scrolls. One eased number (--m: 1 = masthead, 0 = compact) drives every size, so
   the name, links and buttons move together. The bar grows downward into space the hero reserves (negative
   margin), so nothing below it reflows. `mast` is set by an inline script; without it the bar stays compact. */
@property --m { syntax: "<number>"; inherits: true; initial-value: 0; }
html.mast {
  --name: clamp(1.9rem, 3.3vw, 3rem);             /* = .intro3 h1 */
  --nh: calc(var(--name) * 1.05);                  /* the name's line box */
  --E: max(0rem, calc(var(--nh) - 2rem));          /* how much taller the bar is at the top */
}
html.mast header.bar { --m: 0; margin-bottom: calc(var(--E) * var(--m) * -1); background: none; backdrop-filter: none;
  border-bottom-color: transparent; transition: border-color .3s, box-shadow .3s; }
html.mast body:not(.scrolled) header.bar { --m: 1; }
html.mast-ready header.bar { transition: --m .6s cubic-bezier(.22,.8,.2,1), border-color .3s, box-shadow .3s; }
html.mast header.bar::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: color-mix(in srgb, var(--film) 96%, transparent); backdrop-filter: blur(8px); opacity: calc(1 - var(--m)); }
html.mast header.bar .wrap { height: calc(3.5rem + var(--E) * var(--m)); padding-top: calc((3.5rem + var(--E) - var(--nh)) * var(--m));
  font-size: calc(.9375rem + .125rem * var(--m)); }
html.mast .mark { font-size: calc(1.1rem + (var(--name) - 1.1rem) * var(--m)); line-height: 1.05; white-space: nowrap;
  font-weight: calc(750 - 50 * var(--m)); letter-spacing: calc(-.02em + .008em * var(--m)); font-variation-settings: "opsz" 96; }
html.mast .mark i { width: calc(.55rem + .2rem * var(--m)); height: calc(.55rem + .2rem * var(--m)); margin-left: calc(.35rem + .15rem * var(--m)); }
html.mast header nav:not(.subnav) { gap: calc(1.25rem + .35rem * var(--m)); }
html.mast header nav .theme { font-size: calc(.8125rem + .125rem * var(--m)); padding: calc(.25rem + .12rem * var(--m)) calc(.55rem + .2rem * var(--m)); }
html.mast header nav a.cv.resume-btn.sm { font-size: calc(.875rem + .125rem * var(--m));
  padding: calc(.42rem + .16rem * var(--m)) calc(.8rem + .2rem * var(--m)) calc(.42rem + .16rem * var(--m)) calc(.6rem + .15rem * var(--m)); }
html.mast header nav a.cv.resume-btn.sm .ico { width: calc(1rem + .1rem * var(--m)); height: calc(1rem + .1rem * var(--m)); }
/* the rule under the title is the bar's own line at the top; it docks into the bar as it scrolls under it */
html.mast body.docked header.bar { border-bottom-color: var(--hair); }
html.mast body:not(.docked) header.bar { box-shadow: none; }
html.mast .hero3 { overflow-x: clip; }
html.mast .hero3-inner { padding-top: calc(var(--E) + .15rem); }
html.mast .intro3 { position: relative; padding-bottom: 1rem; }
html.mast .intro3::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 100vw; height: 1px; transform: translateX(-50%); background: var(--hair); }
@media (max-width: 1180px) { html.mast header.bar .wrap { font-size: .9375rem; } html.mast header nav:not(.subnav) { gap: 1.25rem; } }
@media (max-width: 900px) {
  /* phones: the bar keeps its height and only the name grows; the buttons and section links already fill it */
  html.mast { --name: clamp(1.2rem, 5.2vw, 1.75rem); --E: 0rem; }
  html.mast header.bar .wrap { padding-top: 0; }
  html.mast header nav { --m: 0; }
  html.mast .hero3-inner { padding-top: 1rem; }
  /* single-column grids must be allowed to shrink: `1fr` alone let the 36rem diagrams widen the page to ~630px on
     phones, which let the browser zoom the whole page out */
  .hero-grid, .part-head, .role-main, .system, .contact, .about, .timeline .row { grid-template-columns: minmax(0, 1fr); }
  /* phones: the hero takes its natural height and the role panel shows in full — a scroll box inside the page trapped
     the reader's swipe instead of scrolling the page */
  .hero3 { height: auto; min-height: 0; max-height: none; }
  .hero3-inner { height: auto; }
  .hero3 .rolemap, .hero3 .readout, .hero3 .map-stage { flex: none; min-height: 0; }
  .hero3 .readout { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { html.mast-ready header.bar { transition: none; } }
