  :root {
    --paper: #F4F6F3;
    --paper-deep: #E8ECE6;
    --ink: #14322B;
    --ink-soft: #3F5C54;
    --mist: #8B9C96;
    --rule: #CFD8D3;
    --brass: #B07A1E;
    --brass-soft: #E9D7B3;
    --bronze: #9C6B3F;
    --silver: #8E9AA3;
    --gold: #C99A2E;
    --measure: 68ch;
  }
  * { 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-family: "IBM Plex Sans", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
  a:hover { color: var(--brass); }
  a:focus-visible, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
  h1, h2, h3 { font-family: "IBM Plex Serif", Georgia, serif; font-weight: 500; line-height: 1.15; margin: 0; }
  p { margin: 0 0 1em; max-width: var(--measure); }

  .wrap { width: min(1040px, 92vw); margin: 0 auto; }

  /* Header */
  header {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 28px 0 0;
  }
  .brand { font-family: "IBM Plex Serif", serif; font-size: 20px; text-decoration: none; }
  .brand span { color: var(--mist); }
  nav a { text-decoration: none; margin-left: 22px; font-size: 15px; color: var(--ink-soft); }
  nav a:hover { color: var(--brass); }

  /* Hero */
  .hero { padding: 84px 0 56px; }
  .hero .kicker { color: var(--ink-soft); font-size: 17px; margin-bottom: 18px; }
  .hero h1 { font-size: clamp(34px, 5.2vw, 58px); max-width: 20ch; letter-spacing: -0.01em; }
  .hero .lede { font-size: 19px; color: var(--ink-soft); margin-top: 22px; }
  .cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
  .btn {
    display: inline-block; padding: 11px 18px; border-radius: 3px; text-decoration: none;
    font-size: 15px; font-weight: 500; border: 1px solid var(--ink);
  }
  .btn.primary { background: var(--ink); color: var(--paper); }
  .btn.primary:hover { background: var(--brass); border-color: var(--brass); color: #fff; }
  .btn.ghost:hover { border-color: var(--brass); color: var(--brass); }

  /* Pipeline strip */
  .pipeline { margin: 64px 0 0; }
  .pipeline svg { width: 100%; height: auto; display: block; }
  .pipeline figcaption { font-size: 14px; color: var(--mist); margin-top: 12px; max-width: var(--measure); }

  /* Sections */
  section { padding: 72px 0; border-top: 1px solid var(--rule); }
  .section-head { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
  .section-head h2 { font-size: 28px; }
  .section-head .intro { color: var(--ink-soft); }
  @media (max-width: 720px) { .section-head { grid-template-columns: 1fr; gap: 12px; } }

  /* Work */
  .project { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 34px 0; border-top: 1px solid var(--rule); }
  .project:first-of-type { margin-top: 40px; }
  .project dd a { color: var(--ink); }
  .project .meta { color: var(--mist); font-size: 15px; line-height: 1.5; }
  .project .meta .stack { color: var(--ink-soft); display: block; margin-top: 6px; }
  .project h3 { font-size: 22px; margin-bottom: 10px; }
  .project dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 16px; margin: 0; max-width: var(--measure); }
  .project dt { color: var(--mist); font-size: 15px; }
  .project dd { margin: 0; }
  .project .outcome { color: var(--brass); font-weight: 500; }
  @media (max-width: 720px) { .project { grid-template-columns: 1fr; gap: 12px; } }

  /* Videos */
  .videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; margin-top: 40px; }
  .video { text-decoration: none; display: block; }
  .video img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border-radius: 3px; background: var(--paper-deep); }
  .video h3 { font-size: 18px; margin-top: 12px; }
  .video:hover h3 { color: var(--brass); }
  .video p { font-size: 15px; color: var(--ink-soft); margin: 6px 0 0; }
  .videos-more { margin-top: 28px; }

  /* Feedback */
  .quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; margin-top: 40px; }
  .quotes blockquote { margin: 0; padding: 22px 24px; background: var(--paper-deep); border-left: 3px solid var(--brass); }
  .quotes blockquote p { font-family: "IBM Plex Serif", serif; font-style: italic; font-size: 17px; margin: 0 0 14px; }
  .quotes footer { border: 0; padding: 0; font-size: 14px; color: var(--ink-soft); }
  .quotes footer span { color: var(--mist); }

  /* Skills */
  .skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 40px 32px; margin-top: 40px; }
  .skills h3 { font-size: 19px; margin-bottom: 12px; }
  .skills ul { list-style: none; padding: 0; margin: 0; }
  .skills li { padding: 5px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }

  /* Certs */
  .certs { list-style: none; padding: 0; margin: 40px 0 0; max-width: 720px; }
  .certs li { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .certs .code { color: var(--brass); font-weight: 500; margin-right: 10px; }
  .certs .date { color: var(--mist); font-size: 15px; white-space: nowrap; }
  @media (max-width: 520px) { .certs li { grid-template-columns: 1fr; gap: 2px; } }

  /* About / contact */
  .about p { font-size: 18px; }
  .contact-list { list-style: none; padding: 0; margin: 28px 0 0; font-size: 18px; }
  .contact-list li { padding: 6px 0; }

  footer { padding: 40px 0 56px; color: var(--mist); font-size: 14px; border-top: 1px solid var(--rule); }

/* ---------- Blog ---------- */
.post-list { list-style: none; padding: 0; margin: 40px 0 0; max-width: 760px; }
.post-list li { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.post-list time { color: var(--mist); font-size: 15px; padding-top: 3px; }
.post-list h3 { font-size: 21px; margin-bottom: 6px; }
.post-list h3 a { text-decoration: none; }
.post-list h3 a:hover { color: var(--brass); }
.post-list p { color: var(--ink-soft); font-size: 16px; margin: 0; }
@media (max-width: 600px) { .post-list li { grid-template-columns: 1fr; gap: 4px; } }
.writing-more { margin-top: 28px; }

.post { padding: 56px 0 72px; max-width: 760px; }
.post-head .kicker { color: var(--mist); font-size: 15px; margin-bottom: 14px; }
.post-head .kicker a { color: var(--mist); }
.post-head h1 { font-size: clamp(30px, 4.2vw, 44px); letter-spacing: -0.01em; max-width: 24ch; }
.post-head .lede { font-size: 19px; color: var(--ink-soft); margin: 18px 0 0; }
.post-body { margin-top: 40px; }
.post-body h2 { font-size: 24px; margin: 44px 0 14px; }
.post-body h3 { font-size: 19px; margin: 32px 0 10px; }
.post-body p, .post-body li { max-width: var(--measure); }
.post-body ul, .post-body ol { padding-left: 22px; }
.post-body li { margin: 4px 0; }
.post-body img { max-width: 100%; height: auto; display: block; border: 1px solid var(--rule); border-radius: 3px; margin: 8px 0 4px; }
.post-body figure { margin: 24px 0; }
.post-body figcaption, .post-body img + em { display: block; font-size: 14px; color: var(--mist); margin-top: 8px; }
.post-body table { border-collapse: collapse; width: 100%; max-width: 760px; margin: 20px 0; font-size: 15.5px; }
.post-body th, .post-body td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.post-body th { font-weight: 500; color: var(--ink-soft); border-bottom: 2px solid var(--rule); }
.post-body blockquote { margin: 24px 0; padding: 14px 20px; background: var(--paper-deep); border-left: 3px solid var(--brass); }
.post-body blockquote p { margin: 0; }
.post-body code { font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: var(--paper-deep); padding: 1px 5px; border-radius: 3px; }
.post-body pre { background: #1E2D29; color: #E6ECE9; padding: 18px 20px; border-radius: 4px; overflow-x: auto; font-size: 14.5px; line-height: 1.55; margin: 20px 0; }
.post-body pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.post-body .callout { padding: 14px 20px; border: 1px solid var(--brass-soft); background: #FBF6EA; border-radius: 3px; margin: 24px 0; max-width: var(--measure); }
.post-body .callout p { margin: 0; }
.post-body input[type=checkbox] { margin-right: 8px; }
.post-body .task-list-item { list-style: none; margin-left: -22px; }
.post-foot { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 16px; }
.post-foot p { margin: 0 0 8px; }

/* Rouge syntax colours (dark block) */
.highlight .c, .highlight .c1, .highlight .cm { color: #8B9C96; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kt { color: #E9C46A; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb { color: #A8D8B9; }
.highlight .n, .highlight .nn, .highlight .nx { color: #E6ECE9; }
.highlight .nb, .highlight .nf, .highlight .nc { color: #9BC4E8; }
.highlight .m, .highlight .mi, .highlight .mf { color: #F4A261; }
.highlight .o, .highlight .p { color: #CFD8D3; }
