:root {
    --portrait: url("/assets/portrait.jpg");
    --night: #0B1116;
    --panel: #111A21;
    --paper: #F1EEE7;
    --soft: #A7B3BB;
    --dim: #8B98A2;
    --rule: #22303A;
    --hair: #18232B;
    --accent: #E0AE55;
    --accent-deep: #9A7436;
    --on-accent: #10171C;
    --brand: #4FA3DC;
    --glow: rgba(79, 163, 220, 0.13);
    --serif: "Source Serif 4", Georgia, serif;
    background: var(--night);
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background:
      repeating-linear-gradient(to bottom, rgba(233, 238, 242, 0.026) 0 1px, transparent 1px 38px),
      var(--night);
    color: var(--paper);
    font-family: "Public Sans", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  .wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding-inline: 20px; }
  @media (min-width: 900px) { .wrap { padding-inline: 48px; } }

  a { color: inherit; }

  .masthead {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; padding-block: 24px;
    border-bottom: 1px solid var(--rule);
  }

  .brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
  .brand img { height: 34px; width: auto; display: block; }
  .mark { font-size: 23px; font-weight: 600; letter-spacing: -0.012em; line-height: 1; }
  .mark b { color: var(--brand); font-weight: 600; }
  .nav { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 15px; color: var(--soft); align-items: center; }
  .nav .nav-tool { font-size: 13px; line-height: 1.15; }
  .langbar { display: flex; justify-content: flex-end; gap: 2px; padding-top: 10px; font-size: 13px; }
  .langbar a { color: var(--soft); text-decoration: none; padding: 6px 7px; }
  .langbar a:hover { color: var(--paper); }
  .langbar a[aria-current="true"] { color: var(--paper); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); }
  .nav a { text-decoration: none; }
  .nav a:hover { color: var(--brand); }

  /* ---------------- hero ---------------- */
  .hero {
    position: relative; padding-block: 62px 54px; isolation: isolate;
    display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start;
  }

  .hero::before {
    content: ""; position: absolute; z-index: -1;
    inset: -60px 0 0 -20%;
    background: radial-gradient(60% 70% at 22% 30%, var(--glow), rgba(0, 0, 0, 0) 68%);
    pointer-events: none;
  }

  .signpost {
    font-size: 20px; padding-top: 8px;
    font-weight: 600; line-height: 1.35;
    color: var(--brand); margin: 0 0 20px; max-width: 30ch;
  }

  .signpost .where {
    display: block; margin-top: 4px;
    font-size: 0.68em; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft);
  }

  .lead-line {
    grid-column: 1 / -1;
    font-family: var(--serif); font-weight: 600;
    font-size: clamp(32px, 4.6vw, 56px);
    line-height: 1.1; letter-spacing: -0.012em;
    color: var(--paper);
    margin: 0 0 22px; padding-left: 22px;
    max-width: 23ch; text-wrap: balance;
  }

  .lead-line .role { color: var(--brand); }

  .statement {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(21px, 2.3vw, 27px);
    line-height: 1.34; color: #DCE1E4;
    margin: 0 0 24px; max-width: 40ch; text-wrap: balance;
  }

  .lede {
    font-size: 17.5px; line-height: 1.72; font-weight: 300;
    color: #CBD2D7; max-width: 66ch; margin: 0 0 18px;
  }

  .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 34px; }

  .btn {
    display: inline-block; font-size: 16px; font-weight: 600;
    text-decoration: none; padding: 16px 30px; border-radius: 2px;
  }

  .btn-solid { background: var(--accent); color: var(--on-accent); }
  .btn-ghost { border: 1px solid var(--rule); color: var(--paper); }
  .btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

  /* ---------------- rows ---------------- */
  .row {
    display: grid; grid-template-columns: 1fr; gap: 18px;
    padding-block: 54px; border-top: 1px solid var(--rule);
  }

  @media (min-width: 1000px) {
    .hero.home { grid-template-columns: 268px minmax(0, 1fr); gap: 52px; }
    .row { grid-template-columns: 268px minmax(0, 1fr); gap: 52px; position: relative; }
    .row::after {
      content: ""; position: absolute; left: 0; top: 0;
      width: 2px; height: 0;
      background: linear-gradient(to bottom, var(--brand), rgba(79, 163, 220, 0));
      transition: height 620ms cubic-bezier(.2,.7,.3,1);
    }
    .row.live::after { height: 100%; }
  }

  .side { padding-left: 22px; }

  @media (min-width: 1000px) {
    .body { padding-left: 0; }
    .side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 30px); align-self: start; }
  }

  .num {
    display: block;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 13px; letter-spacing: 0.08em;
    color: var(--dim); margin-bottom: 12px;
    transition: color 260ms ease;
  }


  h2.sect {
    font-family: var(--serif); font-weight: 600;
    font-size: clamp(25px, 2.9vw, 31px);
    line-height: 1.18; color: var(--paper);
    margin: 0; hyphens: none; overflow-wrap: normal; word-break: keep-all;
  }

  .signpost { padding-left: 0; }

  .body { padding-left: 22px; }

  .body p {
    font-size: 17.5px; line-height: 1.72; font-weight: 300;
    color: #CBD2D7; max-width: 70ch; margin: 0 0 16px;
  }

  .body p:last-child { margin-bottom: 0; }

  .body .said {
    font-family: var(--serif); font-size: clamp(22px, 2.8vw, 29px);
    line-height: 1.34; color: var(--paper); max-width: 28ch;
    margin: 26px 0 22px; padding-left: 22px; border-left: 3px solid var(--accent-deep);
  }

  .split { display: grid; grid-template-columns: 1fr; gap: 30px; }
  @media (min-width: 760px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; } }

  .colhead {
    font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--paper);
    margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule);
  }

  ul.list { list-style: none; margin: 0; padding: 0; }
  ul.list li { font-size: 16px; line-height: 1.62; font-weight: 300; color: #CBD2D7; padding: 11px 0; }
  ul.list li + li { border-top: 1px solid var(--hair); }

  /* ---------------- the figure and what made it ---------------- */
  .trace {
    margin-top: 30px; border: 1px solid var(--rule); border-radius: 3px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 55%), var(--panel);
    padding: 26px 28px 20px; max-width: 640px;
  }

  .trace-head {
    font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--dim); margin: 0 0 18px;
  }

  .trace-figure {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    font-size: clamp(30px, 4.4vw, 42px); font-weight: 500;
    line-height: 1.05; color: var(--accent); margin: 0;
  }

  .trace-label {
    font-size: 15px; color: var(--soft); margin: 8px 0 0; font-weight: 400;
  }

  .trace-arm {
    height: 20px; margin: 14px 0; width: 44px;
    border-left: 1px solid var(--accent-deep);
    border-bottom: 1px solid var(--accent-deep);
    border-bottom-left-radius: 8px;
  }

  .trace-cause {
    font-size: 16.5px; line-height: 1.62; font-weight: 300;
    color: #CBD2D7; margin: 0; min-height: 4.9em; max-width: 52ch;
  }

  .trace-swap { transition: opacity 420ms ease; }
  .trace-swap.out { opacity: 0.08; }

  .trace-foot {
    display: flex; align-items: center; gap: 8px;
    margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hair);
  }

  .dot { width: 24px; height: 3px; border-radius: 2px; background: var(--rule); border: 0; padding: 0; cursor: pointer; }
  .dot[aria-current="true"] { background: var(--accent); }
  .dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .trace-note { margin-left: auto; font-size: 12px; color: var(--dim); }

  .plate { margin: 30px 0 0; border: 1px solid var(--rule); background: var(--panel); }
  .plate svg { display: block; width: 100%; height: auto; }

  .avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background-image: var(--portrait); background-size: cover; background-position: 50% 12%;
    filter: grayscale(1) contrast(1.08) brightness(0.86); border: 1px solid var(--rule);
    margin-bottom: 12px;
  }

  .who-name { font-size: 16px; font-weight: 600; color: var(--paper); margin: 0 0 2px; }
  .who-where { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); margin: 0; }

  .side-label {
    font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--soft); margin: 6px 0 0;
  }

  .steps { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 6px 0 30px; }
  @media (min-width: 820px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .step { background: var(--panel); padding: 24px 22px; }
  .step-no { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--accent); margin: 0 0 12px; }
  .step-head { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--paper); margin: 0 0 8px; }
  .body .step p.step-text { font-size: 16px; line-height: 1.6; margin: 0; }

  .reach { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
  .reach li { font-size: 16px; color: #CBD2D7; }
  .reach li b { display: inline-block; min-width: 86px; font-weight: 500; color: var(--soft); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
  .reach a { color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
  .reach a:hover { color: var(--brand); border-color: var(--brand); }

  .done-note { margin-top: 18px !important; color: var(--paper) !important; font-weight: 400 !important; }
  .body .figures + .plate { margin-top: 26px; }

  @media (max-width: 999px) {
    .hero { padding-block: 34px 40px; gap: 14px; }
    .hero .side { display: flex; align-items: center; gap: 12px; }
    .hero .avatar { width: 44px; height: 44px; margin: 0; }
    .hero .who-name { margin: 0; }
    .hero .who-where { margin: 0; }
    .lead-line { margin-bottom: 8px; }
  }

  /* ---------------- stages ---------------- */
  .stage { padding-block: 26px; border-top: 1px solid var(--hair); }
  .stage:first-of-type { border-top: 0; padding-top: 4px; }
  .stage-top { display: flex; align-items: baseline; gap: 16px; }
  .stage-no { font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--accent-deep); min-width: 46px; }
  .stage-name { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.12; margin: 0; }
  .stage p { margin-top: 12px; }

  /* ---------------- proof ---------------- */
  .figures {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 4px 0 0;
  }

  @media (min-width: 760px) { .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

  .fig { background: var(--panel); padding: 20px 18px; }

  .fig b {
    display: block; font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 500;
    color: var(--accent); margin-bottom: 8px; white-space: nowrap;
  }

  .fig span { font-size: 14px; line-height: 1.45; color: var(--soft); }

  .closing {
    font-family: var(--serif); font-size: clamp(25px, 3.6vw, 35px);
    line-height: 1.3; max-width: 30ch; margin: 0 0 28px;
  }

  .signoff { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
  @media (min-width: 720px) { .signoff { grid-template-columns: 154px minmax(0, 1fr); gap: 32px; } }

  .face {
    width: 154px; max-width: 100%; aspect-ratio: 1 / 1; border-radius: 50%;
    background-image: var(--portrait);
    background-size: cover; background-position: 50% 12%;
    filter: grayscale(1) contrast(1.08) brightness(0.86);
    border: 1px solid var(--rule); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }

  .signoff-name { font-family: var(--serif); font-size: 25px; font-weight: 600; color: var(--paper); margin: 0 0 12px; }

  footer.foot {
    border-top: 1px solid var(--rule); margin-top: 54px; padding-block: 26px 40px;
    font-size: 15px; color: #CBD2D7;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  }

  .reveal { opacity: 0.55; transform: translateY(10px); transition: opacity 520ms ease, transform 620ms cubic-bezier(.2,.7,.3,1); }
  .reveal.seen { opacity: 1; transform: none; }

  @media (prefers-reduced-motion: reduce) {
    .trace-swap, .num, .reveal, .row::after { transition: none; }
    .reveal { opacity: 1; transform: none; }
  }


  /* ================================================================
     Inner pages: about, services, contact, privacy. They keep their
     approved text and older markup, restyled here into the same system.
     ================================================================ */
  .hero:not(.home) { padding-block: 64px 30px; }

  .hero-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); margin: 0 0 18px; }
  .hero-kicker .where { display: block; margin-top: 6px; font-size: 11px; color: var(--dim); }

  .hero-title, .hero-title.statement {
    font-family: var(--serif); font-weight: 600;
    font-size: clamp(30px, 4vw, 46px) !important; line-height: 1.15;
    color: var(--paper); margin: 0 0 20px; max-width: 26ch !important; text-wrap: balance;
  }
  .hero-title .role { color: var(--brand); }

  .hero-text { font-size: 17.5px; line-height: 1.72; font-weight: 300; color: #CBD2D7; max-width: 66ch !important; margin: 0 0 16px; }
  .hero-text a { color: var(--brand); }
  .hero-lead { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 25px); line-height: 1.4; color: #DCE1E4; max-width: 44ch; margin: 0 0 20px; }
  .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

  .section-title {
    font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2; color: var(--paper);
    margin: 50px 0 20px; padding-top: 32px; border-top: 1px solid var(--rule);
  }

  .prose, .wrapper { max-width: 760px !important; }
  .prose p, .wrapper p, .prose li, .wrapper li { font-size: 17px; line-height: 1.72; font-weight: 300; color: #CBD2D7; }
  .prose p, .wrapper p { margin: 0 0 16px; }
  .prose ul, .wrapper ul { padding-left: 20px; margin: 0 0 16px; }
  .prose li, .wrapper li { margin-bottom: 8px; }
  .prose a, .wrapper a { color: var(--brand); }
  .wrapper strong, .prose strong, .hero-text strong { color: var(--paper); font-weight: 600; }

  .prose .pull {
    font-family: var(--serif); font-size: clamp(22px, 2.8vw, 29px); line-height: 1.34;
    color: var(--paper); font-weight: 400; margin: 24px 0; padding-left: 22px;
    border-left: 3px solid var(--accent-deep); max-width: 28ch;
  }

  .two-col { display: grid; grid-template-columns: 1fr; gap: 30px; }
  @media (min-width: 860px) { .prose.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1080px !important; gap: 44px; } }
  .col-head { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper); margin: 0 0 12px; }

  .stages { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 10px 0 30px; max-width: 900px; }
  .stages .stage { background: var(--panel); padding: 26px; border-top: 0; }
  .stage-mark { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
  .stages .stage-name { font-size: 24px; margin: 0 0 12px; }
  .stage-text { font-size: 16.5px; line-height: 1.66; font-weight: 300; color: #CBD2D7; margin: 0 0 12px; }
  .stage-text:last-child { margin-bottom: 0; }

  .cta {
    margin: 50px 0 10px; padding-top: 30px; border-top: 1px solid var(--rule);
    display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  }
  .cta-text { font-family: var(--serif); font-size: clamp(22px, 2.8vw, 28px); line-height: 1.35; color: var(--paper); max-width: 30ch; }
  .cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

  .btn-primary, .btn-secondary {
    display: inline-block; font-size: 16px; font-weight: 600; text-decoration: none;
    padding: 16px 30px; border-radius: 2px;
  }
  .btn-primary { background: var(--accent); color: var(--on-accent); }
  .btn-secondary { border: 1px solid var(--rule); color: var(--paper); }
  .btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

  .bio { display: grid; grid-template-columns: 1fr; gap: 26px; margin: 10px 0 20px; align-items: start; }
  @media (min-width: 880px) { .bio { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; } }
  .portrait {
    width: 200px; max-width: 100%; height: auto; aspect-ratio: 1 / 1;
    object-fit: cover; object-position: 50% 12%; border-radius: 50%;
    filter: grayscale(1) contrast(1.08) brightness(0.86); border: 2px solid var(--rule); display: block;
  }
