  :root {
    --paper: #ffffff;
    --panel: #f6f9fc;
    --ink: #11233b;
    --muted: #55657a;
    --rule: #d5dde6;
    --accent: #1b5fc4;
    --spark: #e59a0f;
    --chip: #e8eff7;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body {
    margin: 0; background: var(--paper); color: var(--ink);
    font: 17px/1.6 "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  }
  a { color: var(--accent); text-underline-offset: 3px; }
  a:focus-visible { outline: 3px solid var(--spark); outline-offset: 2px; border-radius: 2px; }
  h1, h2, h3 { font-family: "Bricolage Grotesque", "Source Sans 3", sans-serif; letter-spacing: -0.01em; }

  .layout { max-width: 1080px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 300px 1fr; gap: 0 72px; }

  aside { padding: 72px 0; align-self: start; position: sticky; top: 0; }
  h1 { font-size: 3rem; line-height: 1.02; margin: 0 0 14px; font-weight: 700; }
  .role { margin: 0 0 22px; color: var(--muted); font-size: 1.1rem; }
  .bar { width: 44px; height: 4px; background: var(--spark); margin: 0 0 22px; border: 0; }
  .contact { list-style: none; margin: 0; padding: 0; }
  .contact li { margin: 0 0 8px; }
  .contact a { font-weight: 600; }
  .where { margin: 22px 0 0; color: var(--muted); font-size: .95rem; }

  main { padding: 72px 0 40px; min-width: 0; }
  section { margin: 0 0 56px; }
  h2 { font-size: 1.5rem; margin: 0 0 20px; font-weight: 700; }
  h3 { font-size: 1.15rem; margin: 0; font-weight: 600; }
  .lead { font-size: 1.2rem; max-width: 60ch; margin: 0 0 48px; }

  .flow { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 18px 14px; margin: 4px 0 18px; max-width: 66ch; }
  .flow-title { margin: 0 0 16px; font-weight: 600; }
  .flow ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; }
  .flow li { flex: 1 1 0; position: relative; padding: 10px 12px; border: 1px solid var(--rule); background: var(--paper); font-size: .95rem; line-height: 1.3; display: flex; align-items: center; }
  .flow li + li { margin-left: 26px; }
  .flow li + li::before { content: ""; position: absolute; left: -27px; top: 50%; width: 26px; height: 2px; background: var(--spark); }
  .flow li + li::after { content: ""; position: absolute; left: -9px; top: calc(50% - 4px); border-left: 7px solid var(--spark); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
  .flow li.end { border-color: var(--spark); font-weight: 600; }
  .flow-note { margin: 14px 0 0; color: var(--muted); font-size: .95rem; }

  .project { padding: 20px 0; border-top: 1px solid var(--rule); }
  .project:last-child { border-bottom: 1px solid var(--rule); }
  .project p { margin: 6px 0 10px; max-width: 62ch; }
  .tools { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
  .tools li { background: var(--chip); border-radius: 4px; padding: 1px 9px; font-size: .85rem; }
  .plinks { margin: 0; display: flex; gap: 6px 20px; flex-wrap: wrap; font-weight: 600; }

  .job { margin: 0 0 30px; }
  .job-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0 16px; }
  .dates { color: var(--muted); font-size: .95rem; white-space: nowrap; }
  .org { margin: 0 0 8px; color: var(--muted); }
  .job ul { margin: 0; padding-left: 20px; max-width: 66ch; }
  .job li { margin: 6px 0; }

  dl { margin: 0; display: grid; grid-template-columns: 190px 1fr; gap: 12px 20px; }
  dt { font-weight: 600; }
  dd { margin: 0; color: var(--muted); }
  .plain { margin: 0; padding-left: 20px; }
  .plain li { margin: 4px 0; }

  footer { grid-column: 1 / -1; padding: 24px 0 48px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--rule); }

  @media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; gap: 0; }
    aside { position: static; padding: 44px 0 8px; }
    h1 { font-size: 2.4rem; }
    main { padding-top: 32px; }
  }
  @media (max-width: 640px) {
    .flow ol { flex-direction: column; }
    .flow li + li { margin: 26px 0 0; }
    .flow li + li::before { left: 50%; top: -27px; width: 2px; height: 26px; }
    .flow li + li::after { left: calc(50% - 4px); top: -10px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--spark); border-bottom: 0; }
    dl { grid-template-columns: 1fr; gap: 2px; }
    dd { margin-bottom: 12px; }
  }

  .avatar { display: block; width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin: 0 0 20px; border: 3px solid var(--panel); box-shadow: 0 0 0 2px var(--rule); background: var(--chip); }

  .intro-j { color: var(--muted); max-width: 60ch; margin: 0 0 40px; }
  .entry { padding: 26px 0; border-top: 1px solid var(--rule); }
  .entry:last-child { border-bottom: 1px solid var(--rule); }
  .entry time { color: var(--muted); font-size: .9rem; }
  .entry h2 { font-size: 1.3rem; margin: 2px 0 10px; }
  .entry p { margin: 0 0 12px; max-width: 62ch; }
  .entry .plinks { margin-top: 4px; }

  .topnav { display: flex; gap: 26px; margin: 0 0 40px; padding: 0 0 12px; border-bottom: 1px solid var(--rule); font-weight: 600; font-size: 1.02rem; }
  .topnav a { color: var(--ink); text-decoration: none; padding-bottom: 12px; margin-bottom: -13px; border-bottom: 3px solid transparent; }
  .topnav a:hover { border-bottom-color: var(--rule); }
  .topnav a[aria-current="page"] { border-bottom-color: var(--spark); }
  main { padding-top: 56px; }

  @media (max-width: 900px) { main { padding-top: 24px; } }


  aside { min-height: 100vh; box-sizing: border-box; }
  aside > * { position: relative; z-index: 1; }
  aside > canvas#bg { position: absolute; z-index: 0; top: 0; bottom: 0; left: -24px; right: -36px; width: calc(100% + 60px); height: 100%; pointer-events: none; }
  @media (max-width: 900px) { aside { min-height: 0; } aside > canvas#bg { left: -24px; right: -24px; width: calc(100% + 48px); } }

  .status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 5px 14px 5px 11px; border-radius: 999px; background: #e6f4ec; color: #17623a; font-weight: 600; font-size: .95rem; }
  .status .dot { width: 9px; height: 9px; border-radius: 50%; background: #1f9d57; flex: none; }

  .resume-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin: 0 0 20px; }
  .resume-head h2 { margin: 0; font-size: 1.9rem; }
  .button { display: inline-block; background: var(--ink); color: #fff; font-weight: 600; padding: 9px 18px; border-radius: 6px; text-decoration: none; }
  .button:hover { background: var(--accent); text-decoration: none; }
  .resume-note { color: var(--muted); margin: 0 0 24px; max-width: 60ch; }

  .resume { font-family: Calibri, Carlito, "Source Sans 3", sans-serif; font-size: 10.5pt; line-height: 1.38; color: #1d1d1d; background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 30px 34px 26px; max-width: 760px; }
  .resume .r-name { font-size: 26pt; font-weight: 700; color: #1f3864; text-align: center; letter-spacing: .02em; line-height: 1.1; }
  .resume .r-sub { text-align: center; color: #595959; font-size: 11pt; margin: 2px 0 4px; }
  .resume .r-contact { text-align: center; font-size: 9.5pt; margin: 0; }
  .resume .r-contact a { color: #0563c1; }
  .resume h3 { font-family: inherit; font-size: 10.5pt; font-weight: 700; color: #1f3864; letter-spacing: .03em; text-transform: uppercase; border-bottom: 1.5px solid #1f3864; padding-bottom: 1px; margin: 13px 0 6px; }
  .resume p { margin: 0 0 4px; }
  .resume .r-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
  .resume .r-row b { font-weight: 700; }
  .resume .r-row i, .resume .r-org { color: #595959; font-style: italic; }
  .resume ul { margin: 2px 0 4px; padding-left: 18px; }
  .resume li { margin: 2px 0; }

  @media (max-width: 640px) { .resume { padding: 20px 16px; } .resume .r-name { font-size: 22pt; } }

  @media print {
    @page { size: Letter; margin: 0.4in 0.65in; }
    html, body { background: #fff !important; }
    aside, .topnav, #bg, footer, .resume-head, .resume-note, canvas { display: none !important; }
    .layout { display: block; max-width: none; padding: 0; margin: 0; }
    main { padding: 0 !important; }
    .resume { border: 0; border-radius: 0; padding: 0; max-width: none; font-size: 10pt; line-height: 1.3; }
    .resume h3 { margin: 10px 0 4px; }
    .resume li { margin: 1px 0; }
    .resume a { color: #0563c1; text-decoration: underline; }
  }

  .shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 12px 0 14px; max-width: 660px; }
  .shots a { display: block; color: var(--muted); font-size: .85rem; text-decoration: none; }
  .shots img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--rule); border-radius: 6px; background: var(--chip); margin: 0 0 5px; transition: box-shadow .15s ease; }
  .shots a:hover img { box-shadow: 0 3px 14px rgba(17, 35, 59, .18); }
  .project .flow { margin: 12px 0 14px; max-width: 660px; }
  .intro-link { margin: -28px 0 40px; max-width: 60ch; color: var(--muted); }

  .gallery { margin: 12px 0 14px; max-width: 660px; }
  .gallery .stage { position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: var(--chip); }
  .gallery .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; display: block; }
  .gallery .slide.on { opacity: 1; z-index: 1; }
  .gallery .slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
  .gallery .cap { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }
  .gallery .dots { display: flex; gap: 4px; margin-top: 2px; }
  .gallery .dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
  .gallery .dots button::after { content: ""; position: absolute; left: 7px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
  .gallery .dots button.on::after { background: var(--accent, #d98a1f); }
  .gallery .dots button:focus-visible { outline: 2px solid #2557a7; outline-offset: 1px; border-radius: 4px; }
  @media (prefers-reduced-motion: reduce) { .gallery .slide { transition: none; } }

  .calc-title { font-size: 1.9rem; margin: 6px 0 10px; }
  .calc-intro { max-width: 62ch; color: var(--muted); margin: 0 0 24px; }
  .calc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 20px; max-width: 700px; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 20px; margin-bottom: 28px; }
  .field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .field label { font-weight: 600; font-size: .95rem; }
  .field input, .field select { font: inherit; padding: 8px 10px; border: 1px solid #b9c5d3; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; min-height: 42px; }
  .field input:focus-visible, .field select:focus-visible, .adv summary:focus-visible, .linkbtn:focus-visible { outline: 3px solid var(--spark); outline-offset: 1px; }
  .field input:disabled { background: var(--chip); color: var(--muted); }
  .hint { color: var(--muted); font-size: .85rem; line-height: 1.35; }
  .adv { grid-column: 1 / -1; }
  .adv summary { cursor: pointer; font-weight: 600; }
  .adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 20px; margin-top: 12px; }
  .linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
  .results { max-width: 700px; transition: opacity .15s ease; }
  .results.stale .tiles, .results.stale .panel, .results.stale .notes { opacity: .35; }
  .summary { font-size: 1.15rem; line-height: 1.5; margin: 0 0 20px; }
  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
  .tile { border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; background: #fff; }
  .tile .k { color: var(--muted); font-size: .88rem; }
  .tile .v { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.4rem; line-height: 1.2; margin: 2px 0; white-space: nowrap; }
  .tile .s { color: var(--muted); font-size: .8rem; line-height: 1.3; }
  .panel { border-top: 1px solid var(--rule); padding: 16px 0 6px; margin-bottom: 8px; }
  .panel h3 { font-size: 1.05rem; margin: 0 0 10px; }
  .split { display: flex; height: 22px; border-radius: 5px; overflow: hidden; background: var(--chip); }
  .seg-a { background: #1b5fc4; } .seg-b { background: #e59a0f; }
  .legend { list-style: none; padding: 0; margin: 10px 0 0; font-size: .92rem; }
  .legend li { margin: 0 0 4px; }
  .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
  .mrow { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .92rem; }
  .mrow em { font-style: normal; color: var(--muted); min-width: 70px; text-align: right; }
  .mrow .bar { display: block; height: 18px; border-radius: 4px; }
  .mrow .bar.need { background: #e59a0f; } .mrow .bar.have { background: #1b5fc4; }
  .facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 10px 0 0; }
  .facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; }
  .notes { color: var(--muted); font-size: .85rem; line-height: 1.5; margin: 18px 0 40px; }
  @media (max-width: 560px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 8px; } .mrow { grid-template-columns: 70px 1fr auto; } }
  .conv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 18px; margin: 10px 0 8px; }

  /* Keep the page width the same on short and long pages so the left pane doesn't shift. */
  html { scrollbar-gutter: stable; }
  /* Browsers that support it hold the left pane still and fade only the right side between pages. */
  @view-transition { navigation: auto; }
  aside { view-transition-name: sidebar; }
  ::view-transition-group(*) { animation-duration: .18s; }
  @media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

  /* Phones: clip the background canvas to the left pane so it can't widen the page, and give links and buttons thumb-sized targets. */
  @media (max-width: 900px) { aside { position: relative; overflow: hidden; } }
  @media (max-width: 640px) {
    .plinks a, .linkbtn, .adv summary { display: inline-block; padding: 8px 0; }
    .plinks { line-height: 1.2; }
  }
  @media (max-width: 640px) { .gallery .dots button { width: 34px; height: 34px; } .gallery .dots button::after { left: 12px; top: 12px; } }

  /* Inline code uses the surrounding font so text never switches typefaces mid-sentence. */
  code { font: inherit; }
