
  :root {
    --paper:     #F4F3EE;
    --paper-2:   #EAE9E1;
    --ink:       #191B19;
    --ink-2:     #34382F;
    --muted:     #5C6060;
    --subtle:    #8F938C;
    --rule:      #E1DFD5;
    --rule-soft: #ECEBE3;
    --mark:      #0F6B54;

    --serif: "Averia Serif Libre", "Georgia", "Times New Roman", serif;
    --sans:  "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono:  "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

    --measure: 38em;
    --gutter:  clamp(20px, 5vw, 72px);
    --max:     1320px;
  }

  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.006em;
  }
  /* Display headings — Averia Serif Libre; body stays Poppins */
  h1, h2, h3, h4 { font-family: var(--serif); }

  /* Homepage intro loader — animated shapes on alabaster, fades to the site */
  #preloader {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: var(--paper);
    animation: preloader-out 1.8s ease forwards;
  }
  #preloader .loader {
    --path: #2f3545; --dot: #0F6B54; --duration: 3s;
    width: 44px; height: 44px; position: relative;
    display: inline-block; margin: 0 16px;
  }
  #preloader .loader:before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    position: absolute; display: block; background: var(--dot);
    top: 37px; left: 19px; transform: translate(-18px, -18px);
    animation: dotRect var(--duration) cubic-bezier(.785,.135,.15,.86) infinite;
  }
  #preloader .loader svg { display: block; width: 100%; height: 100%; }
  #preloader .loader svg rect,
  #preloader .loader svg polygon,
  #preloader .loader svg circle {
    fill: none; stroke: var(--path); stroke-width: 10px;
    stroke-linejoin: round; stroke-linecap: round;
  }
  #preloader .loader svg polygon { stroke-dasharray: 145 76 145 76; stroke-dashoffset: 0; animation: pathTriangle var(--duration) cubic-bezier(.785,.135,.15,.86) infinite; }
  #preloader .loader svg rect { stroke-dasharray: 192 64 192 64; stroke-dashoffset: 0; animation: pathRect 3s cubic-bezier(.785,.135,.15,.86) infinite; }
  #preloader .loader svg circle { stroke-dasharray: 150 50 150 50; stroke-dashoffset: 75; animation: pathCircle var(--duration) cubic-bezier(.785,.135,.15,.86) infinite; }
  #preloader .loader.triangle { width: 48px; }
  #preloader .loader.triangle:before { left: 21px; transform: translate(-10px,-18px); animation: dotTriangle var(--duration) cubic-bezier(.785,.135,.15,.86) infinite; }
  @keyframes pathTriangle { 33% { stroke-dashoffset: 74; } 66% { stroke-dashoffset: 147; } 100% { stroke-dashoffset: 221; } }
  @keyframes dotTriangle { 33% { transform: translate(0,0); } 66% { transform: translate(10px,-18px); } 100% { transform: translate(-10px,-18px); } }
  @keyframes pathRect { 25% { stroke-dashoffset: 64; } 50% { stroke-dashoffset: 128; } 75% { stroke-dashoffset: 192; } 100% { stroke-dashoffset: 256; } }
  @keyframes dotRect { 25% { transform: translate(0,0); } 50% { transform: translate(18px,-18px); } 75% { transform: translate(0,-36px); } 100% { transform: translate(-18px,-18px); } }
  @keyframes pathCircle { 25% { stroke-dashoffset: 125; } 50% { stroke-dashoffset: 175; } 75% { stroke-dashoffset: 225; } 100% { stroke-dashoffset: 275; } }
  @keyframes preloader-out { 0%, 65% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
  ::selection { background: var(--mark); color: var(--paper); }

  a { color: inherit; text-decoration: none; }
  p a, .prose a {
    text-decoration: underline;
    text-decoration-color: var(--rule);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-color .15s ease, color .15s ease;
  }
  p a:hover, .prose a:hover { text-decoration-color: var(--mark); color: var(--mark); }

  :focus-visible {
    outline: 2px solid var(--mark);
    outline-offset: 3px;
    border-radius: 2px;
  }

  .wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
  }

  /* Skip link */
  .skip {
    position: absolute; left: -9999px; top: 0;
    background: var(--ink); color: var(--paper);
    padding: 10px 14px; z-index: 100;
    font-family: var(--mono); font-size: 13px;
  }
  .skip:focus { left: 12px; top: 12px; }

  /* Top bar — floating glass pill, sticky */
  .top {
    position: sticky; top: 14px; z-index: 100;
    padding: 16px var(--gutter) 0;
  }
  .top-inner {
    position: relative;
    max-width: 1120px; margin: 0 auto;
    display: flex; align-items: center; gap: 14px;
    padding: 8px 8px 8px 26px;
    background:
      linear-gradient(105deg, rgba(15,107,84,.10), rgba(15,107,84,0) 42%),
      linear-gradient(255deg, rgba(15,107,84,.06), rgba(15,107,84,0) 34%),
      rgba(248,247,242,.74);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    backdrop-filter: blur(18px) saturate(1.6);
    border: 1px solid rgba(255,255,255,.60);
    border-radius: 999px;
    box-shadow: 0 12px 34px rgba(20,25,20,.10), inset 0 1px 0 rgba(255,255,255,.70);
  }
  .mark {
    font-family: var(--serif);
    font-weight: 700; font-size: 20px; line-height: 1;
    letter-spacing: -0.01em; white-space: nowrap;
    color: var(--ink); display: inline-block;
  }
  .mark:hover { opacity: 0.7; }
  .top nav {
    display: inline-flex; align-items: center; gap: 3px;
    margin-left: auto;
  }
  .top nav a {
    padding: 8px 15px; border-radius: 999px;
    font-family: var(--sans); font-size: 14px; font-weight: 500;
    color: var(--muted);
    transition: color .18s ease, background .18s ease;
  }
  .top nav a:hover { color: var(--ink); }
  .top nav a.active { color: var(--mark); background: rgba(15,107,84,.10); }
  .nav-resume {
    flex: 0 0 auto;
    padding: 9px 20px; border-radius: 999px;
    font-family: var(--sans); font-size: 14px; font-weight: 500;
    color: var(--paper); background: var(--mark); border: 1px solid var(--mark);
    box-shadow: 0 5px 14px rgba(15,107,84,.24);
    transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
  }
  .nav-resume:hover { background: #0c5a46; border-color: #0c5a46; box-shadow: 0 7px 18px rgba(15,107,84,.32); }
  .nav-toggle { display: none; }
  .nav-resume-m { display: none; }
  @media (max-width: 720px) {
    .nav-toggle {
      display: flex; align-items: center; justify-content: center;
      flex: 0 0 auto; margin-left: auto;
      width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
      color: var(--ink); border: 1px solid var(--rule); background: rgba(255,255,255,.5);
    }
    .nav-toggle svg { width: 20px; height: 20px; display: block; }
    .top nav {
      display: none;
      position: absolute; top: calc(100% + 10px); left: 0; right: 0;
      flex-direction: column; align-items: stretch; gap: 2px;
      margin: 0; padding: 10px;
      background: rgba(248,247,242,.95);
      -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
      border: 1px solid rgba(255,255,255,.6); border-radius: 20px;
      box-shadow: 0 18px 44px rgba(20,25,20,.18);
    }
    .top-inner.open nav { display: flex; }
    .top nav a { padding: 12px 16px; font-size: 15px; border-radius: 12px; }
    .nav-resume { display: none; }
    .top nav a.nav-resume-m {
      display: block; margin-top: 6px; text-align: center;
      padding: 12px 16px; border-radius: 999px;
      background: var(--mark); color: #fff; font-weight: 600;
    }
    .top nav a.nav-resume-m:hover { color: #fff; }
    .top-inner { padding-left: 22px; }
  }

  /* Typography */
  h1, h2, h3, h4, h5 {
    font-family: var(--serif); font-weight: 400;
    margin: 0; letter-spacing: -0.018em; line-height: 1.12;
    color: var(--ink);
  }
  h1 { font-size: clamp(40px, 6.2vw, 74px); font-weight: 400; letter-spacing: -0.028em; line-height: 1.08; }
  h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 400; letter-spacing: -0.02em; }
  h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.012em; line-height: 1.25; }
  em { color: var(--mark); font-style: italic; }
  p  { margin: 0; }
  p + p { margin-top: 1em; }

  .prose { max-width: var(--measure); color: var(--ink-2); }
  .prose p { font-size: 19px; line-height: 1.6; }
  .prose p + p { margin-top: 1.1em; }

  .kicker {
    font-family: var(--mono); font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--muted);
  }
  .hero-greet {
    font-size: 16.5px; color: var(--muted); font-weight: 400;
  }
  .hero-greet .nm { color: var(--ink); font-weight: 600; }
  .hero-greet .wave {
    display: inline-block; transform-origin: 70% 70%;
    animation: wave 2.4s ease-in-out 0.8s 2;
  }
  @keyframes wave {
    0%, 60%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); } 40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
  }
  #how-i-ai .ai-tools {
    text-align: center; margin-top: 34px;
    font-size: 13px; letter-spacing: 0.03em; color: var(--muted);
  }
  /* Life outside work — photo marquee */
  #life .marquee {
    overflow: hidden; width: 100%; margin-top: 18px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  }
  #life .marquee + .marquee { margin-top: 16px; }
  #life .track {
    display: flex; gap: 16px; width: max-content;
    animation: marquee-x 60s linear infinite;
  }
  #life .track.rev { animation-direction: reverse; }
  #life .marquee:hover .track { animation-play-state: paused; }
  #life .tile {
    flex: 0 0 auto; width: 150px; height: 190px;
    border-radius: 14px; overflow: hidden;
    border: 1px solid var(--rule); background: var(--paper-2);
  }
  #life .tile.wide { width: 270px; }
  #life .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
  #life .tile.ph {
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--subtle); font-family: var(--mono);
  }
  @keyframes marquee-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  @media (max-width: 640px) { #life .tile { width: 120px; height: 150px; } #life .tile.wide { width: 210px; } }

  /* Section rhythm */
  section, article.study {
    padding: clamp(72px, 10vw, 128px) 0;
    border-top: 1px solid var(--rule);
  }
  main > section:first-of-type, main > article.study:first-of-type {
    border-top: none;
  }

  /* Two-column layout: gutter meta on left, prose on right */
  .cols {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: clamp(28px, 7vw, 128px);
    align-items: start;
  }
  .cols > .gutter {
    font-family: var(--mono); font-size: 12px;
    color: var(--muted); letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-top: 10px;
  }
  @media (max-width: 720px) {
    .cols { grid-template-columns: 1fr; gap: 20px; }
    .cols > .gutter { padding-top: 0; }
  }

  /* Section layout — centered heading block, content below */
  .sec .intro {
    text-align: center;
    max-width: 46ch;
    margin: 0 auto clamp(44px, 6vw, 76px);
  }
  .sec .intro .eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 15px 7px 13px; border-radius: 999px;
    border: 1px solid var(--rule); background: var(--paper-2);
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted);
  }
  .sec .intro .eyebrow::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--mark);
  }
  .sec .intro h2 { margin-top: 22px; }
  .sec .intro .intro-sub {
    margin: 18px auto 0; max-width: 50ch;
    font-size: 17px; line-height: 1.55; color: var(--muted);
  }
  /* Content blocks sit centered under the heading */
  .sec .worklist, .sec .roles { max-width: 1040px; margin-left: auto; margin-right: auto; }
  .sec .refs, .sec .strengths { max-width: 1080px; margin-left: auto; margin-right: auto; }
  .sec .prose { margin-left: auto; margin-right: auto; }
  .sec .lines { max-width: 460px; margin-left: auto; margin-right: auto; }

  /* Strengths / Why me — centered card grid */
  .strengths {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
    text-align: left;
  }
  .strength {
    padding: 28px 26px;
    border: 1px solid var(--rule); border-radius: 8px;
    background: var(--paper-2);
  }
  .strength .ic {
    width: 30px; height: 30px; display: block; margin-bottom: 18px;
    color: var(--mark); stroke: currentColor; fill: none;
    stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  }
  .strength h3 {
    font-family: var(--serif); font-weight: 500; font-size: 18px;
    letter-spacing: -0.01em; line-height: 1.25;
  }
  .strength p {
    margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--muted);
  }
  @media (max-width: 860px) {
    .strengths { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 560px) {
    .strengths { grid-template-columns: 1fr; }
  }

  /* Skills — categorized capability rows */
  .skillset { max-width: 940px; margin: 40px auto 0; text-align: left; }
  .skillrow {
    display: grid; grid-template-columns: 210px 1fr; gap: 28px;
    padding: 20px 0; border-top: 1px solid var(--rule);
  }
  .skillset .skillrow:last-child { border-bottom: 1px solid var(--rule); }
  .skillrow .cat {
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--mark); padding-top: 2px;
  }
  .skillrow .items { font-size: 15px; line-height: 1.6; color: var(--ink); }
  @media (max-width: 720px) {
    .skillrow { grid-template-columns: 1fr; gap: 6px; }
  }

  /* Hero — centered */
  .hero { padding: clamp(72px, 12vw, 140px) 0 clamp(72px, 10vw, 110px); border-top: none; }
  .hero .wrap { text-align: center; }
  .hero .lede {
    font-family: var(--serif);
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1.22; letter-spacing: -0.014em;
    max-width: 24ch; margin-left: auto; margin-right: auto;
    color: var(--ink); font-weight: 400;
  }
  .hero .lede em { font-style: italic; color: var(--mark); }
  /* Rotating tagline — fixed-width pill with a vertical scrolling ticker */
  .hero .rotator {
    margin: 28px auto 0;
    width: min(480px, 92vw); height: 42px;
    border-radius: 999px; overflow: hidden;
    border: 1px solid color-mix(in oklab, var(--mark) 32%, var(--rule));
    background: color-mix(in oklab, var(--mark) 8%, var(--paper-2));
    display: flex; justify-content: center; align-items: flex-start;
    font-family: var(--mono); font-size: 13.5px; letter-spacing: 0.02em;
    color: var(--mark); font-weight: 500;
  }
  .hero .rot-track {
    display: flex; flex-direction: column;
    animation: rotticker 16s infinite;
  }
  .hero .rot-item {
    height: 42px; flex-shrink: 0; white-space: nowrap;
    display: flex; align-items: center; justify-content: center;
  }
  @keyframes rotticker {
    0%, 20%   { transform: translateY(0); }
    25%, 45%  { transform: translateY(-42px); }
    50%, 70%  { transform: translateY(-84px); }
    75%, 95%  { transform: translateY(-126px); }
    100%      { transform: translateY(-168px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero .rot-track { animation: none; }
  }
  .hero .sub {
    margin: 26px auto 0;
    max-width: 52ch;
    font-size: 19px; line-height: 1.55; color: var(--ink-2);
  }
  .hero .sig {
    margin-top: 40px;
    display: inline-flex; align-items: baseline; gap: 24px;
    font-family: var(--mono); font-size: 13px; color: var(--muted);
  }
  .hero .sig a { color: var(--ink); }
  .hero .sig a:hover { color: var(--mark); }
  .hero .sig .sep { color: var(--subtle); }

  /* Selected work — bento image cards */
  .worklist.bento {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px; margin-top: 20px;
  }
  .work {
    position: relative; display: block; overflow: hidden;
    border-radius: 10px; min-height: 340px;
    border: 1px solid var(--rule); background: var(--paper-2);
    color: inherit; text-decoration: none;
    box-shadow: 0 14px 36px rgba(20,25,20,.10), inset 0 1px 0 rgba(255,255,255,.30);
    transition: box-shadow .35s ease, transform .35s ease;
  }
  .work.span2 { grid-column: span 2; }
  .work.span3 { grid-column: span 3; min-height: 460px; }
  .work:hover {
    box-shadow: 0 30px 60px rgba(20,25,20,.18), inset 0 1px 0 rgba(255,255,255,.40);
    transform: translateY(-4px);
  }
  .work .bg { position: absolute; inset: 0; }
  .work .bg img {
    width: 100%; height: 100%; object-fit: cover; object-position: top;
    transition: transform .7s cubic-bezier(.2,.7,.2,1);
  }
  .work:hover .bg img { transform: scale(1.06); }
  .work .bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(18,20,18,.18) 0%, transparent 22%, transparent 50%, rgba(18,20,18,.12) 100%);
  }
  /* mobile-screen card — contained phone on a soft tinted ground */
  .work.mobile .bg {
    background: radial-gradient(130% 100% at 50% 0%, #f1efeb 0%, #e7e5e0 58%, #dedcd6 100%);
    display: flex; align-items: flex-start; justify-content: center;
  }
  .work.mobile .bg::after { display: none; }
  .work.mobile .bg img {
    width: auto; height: 80%; max-width: 74%;
    object-fit: contain; object-position: center; margin-top: 24px;
    border-radius: 24px;
    box-shadow: 0 26px 50px rgba(20,45,32,.24), 0 0 0 1px rgba(0,0,0,.05);
  }
  .work.mobile:hover .bg img { transform: translateY(-5px) scale(1.02); }
  /* glass arrow */
  .work .arrow {
    position: absolute; top: 16px; right: 16px; z-index: 3;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(150deg, rgba(255,255,255,.78), rgba(255,255,255,.50));
    -webkit-backdrop-filter: blur(10px) saturate(1.4);
    backdrop-filter: blur(10px) saturate(1.4);
    border: 1px solid rgba(255,255,255,.60); color: var(--ink);
    box-shadow: 0 6px 18px rgba(20,25,20,.16), inset 0 1px 0 rgba(255,255,255,.85);
    opacity: 0; transform: translateY(6px) scale(.9); transition: .35s ease;
  }
  .work .arrow svg { width: 18px; height: 18px; display: block; }
  .work:hover .arrow { opacity: 1; transform: translateY(0) scale(1); }
  /* glass panel */
  .work .panel {
    position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2;
    padding: 18px 20px; border-radius: 8px; overflow: hidden;
    background: linear-gradient(155deg, rgba(255,255,255,.60), rgba(246,245,240,.80));
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(255,255,255,.60);
    box-shadow: 0 16px 40px rgba(20,25,20,.18), inset 0 1px 0 rgba(255,255,255,.80);
    transition: background .35s ease, box-shadow .35s ease;
  }
  .work .panel::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(125deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,0) 42%);
  }
  .work .panel > * { position: relative; z-index: 1; }
  .work:hover .panel {
    background: linear-gradient(155deg, rgba(255,255,255,.72), rgba(248,247,243,.90));
    box-shadow: 0 22px 48px rgba(20,25,20,.24), inset 0 1px 0 rgba(255,255,255,.90);
  }
  .work .ptop { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
  .work .ttl { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); line-height: 1.1; }
  .work .cat { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
  .work .metrics { display: flex; gap: 22px; text-align: right; flex: 0 0 auto; }
  .work .metric b { display: block; font-family: var(--serif); font-weight: 700; font-size: 23px; line-height: 1; color: var(--mark); }
  .work .metric span { display: block; margin-top: 4px; font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
  .work .desc { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s ease, opacity .3s ease, margin .3s ease, padding .3s ease; }
  .work:hover .desc { max-height: 150px; opacity: 1; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,.09); }
  .work .desc p { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }

  /* Placeholder box (used by case-study galleries) */
  .ph-box {
    display: none;
    align-items: center; justify-content: center;
    width: 100%; aspect-ratio: 16 / 10;
    border: 1px dashed var(--subtle); border-radius: 4px;
    background:
      repeating-linear-gradient(45deg,
        transparent 0 8px,
        color-mix(in oklab, var(--subtle) 12%, transparent) 8px 9px),
      var(--paper-2);
    color: var(--muted); font-family: var(--mono); font-size: 10px;
    letter-spacing: 0.14em; text-transform: uppercase; text-align: center;
    padding: 8px;
  }
  .shot.ph .ph-box { display: flex; }

  @media (max-width: 860px) {
    .worklist.bento { grid-template-columns: 1fr; }
    .work, .work.span2, .work.span3 { grid-column: auto; min-height: 360px; }
  }

  /* Case-study screenshot gallery (below the SVG plate) */
  .shots { display: grid; gap: 20px; margin-top: 20px; }
  .shots.cols-2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .shots.cols-3 { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .shots.cols-3 .shot img { aspect-ratio: 21 / 10; object-fit: cover; object-position: top; }
  @media (max-width: 720px) { .shots.cols-3 { grid-template-columns: 1fr; } }
  .shot { margin: 0; }
  .shot img {
    display: block; width: 100%; height: auto;
    border-radius: 6px; border: 1px solid var(--rule);
    background: var(--paper-2);
  }
  /* Landscape (web) gallery images share a uniform box so pairs line up */
  .shots.cols-2 .shot img { aspect-ratio: 21 / 10; object-fit: cover; object-position: top; }
  .shot .ph-box { aspect-ratio: 16 / 10; border-radius: 6px; }
  .shot.ph img { display: none; }
  .shot.ph .ph-box { display: flex; }
  .shot figcaption {
    margin-top: 10px;
    font-family: var(--serif); font-style: italic; font-size: 15px;
    color: var(--ink-2); line-height: 1.5;
  }
  /* Phone-screen gallery — 4 portrait screens in a row */
  .shots.phones { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .shots.phones .shot img { border-radius: 12px; }
  .shots.phones .shot .ph-box { aspect-ratio: 9 / 19.5; border-radius: 14px; }
  .shots.phones .shot figcaption { font-size: 13.5px; margin-top: 8px; }
  /* Small label above a gallery group */
  .study .gallery-label {
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--muted);
    margin: 36px 0 0;
  }
  @media (max-width: 720px) {
    .shots.phones { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 640px) {
    .shots.cols-2 { grid-template-columns: 1fr; }
  }

  /* Case study */
  .study .study-head { margin-bottom: 8px; }
  .study .study-kicker {
    font-family: var(--mono); font-size: 12px;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--mark);
    display: inline-flex; align-items: center; gap: 12px;
  }
  .study .study-kicker::before {
    content: ""; width: 32px; height: 1px; background: var(--mark);
    display: inline-block;
  }
  .study h2 {
    margin-top: 20px;
    font-size: clamp(32px, 4.4vw, 52px);
    max-width: 22ch;
  }
  .study h2 em { font-style: italic; color: var(--mark); }
  .study .summary {
    margin-top: 22px; max-width: var(--measure);
    font-size: 19px; color: var(--ink-2); line-height: 1.6;
  }

  .study-meta {
    margin: 44px 0 0;
    padding: 16px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    font-family: var(--mono); font-size: 13px; color: var(--muted);
    display: flex; flex-wrap: wrap;
    gap: 8px 24px; letter-spacing: 0.02em;
  }
  .study-meta b { color: var(--ink); font-weight: 500; }

  .block { margin-top: 72px; }
  .block h4 {
    font-family: var(--mono); font-weight: 400;
    font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 28px;
  }

  .problem-lede {
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: clamp(22px, 2.8vw, 32px);
    line-height: 1.35; letter-spacing: -0.012em;
    max-width: 26ch; color: var(--ink);
  }
  .block .prose { margin-top: 20px; }

  /* Decisions — hanging-number layout, no boxes */
  .decisions { display: grid; gap: 48px; max-width: 780px; }
  .decision {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    align-items: start;
  }
  .decision .n {
    font-family: var(--serif); font-style: italic;
    font-size: 30px; color: var(--mark);
    letter-spacing: -0.02em; padding-top: 2px;
  }
  .decision h5 {
    font-family: var(--serif); font-weight: 500;
    font-size: 22px; letter-spacing: -0.012em; line-height: 1.3;
  }
  .decision p {
    margin-top: 12px; color: var(--ink-2); font-size: 17px; line-height: 1.6;
    max-width: 50ch;
  }
  .decision .tradeoff {
    margin-top: 14px; font-family: var(--mono); font-size: 12px;
    color: var(--muted); letter-spacing: 0.02em;
    display: inline-block; padding-left: 12px;
    border-left: 2px solid var(--rule);
  }
  @media (max-width: 640px) {
    .decision { grid-template-columns: 1fr; gap: 8px; }
    .decision .n { font-size: 24px; }
  }

  /* Artifact — a plate with a printed caption */
  .plate {
    margin-top: 8px;
  }
  .plate-body {
    background: var(--paper-2);
    padding: clamp(24px, 4vw, 48px);
    border-radius: 2px;
  }
  .plate-body svg { display: block; width: 100%; height: auto; max-height: 500px; }
  .plate-caption {
    margin-top: 16px;
    display: grid; grid-template-columns: 160px 1fr;
    gap: 24px; align-items: baseline;
  }
  .plate-caption .label {
    font-family: var(--mono); font-size: 12px;
    color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase;
  }
  .plate-caption .desc {
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: 17px; color: var(--ink-2); line-height: 1.5;
    max-width: 62ch;
  }
  @media (max-width: 640px) {
    .plate-caption { grid-template-columns: 1fr; gap: 6px; }
  }

  /* Outcomes — three numbers on a horizontal rule, no boxes */
  .outcomes {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 32px; margin-top: 12px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
  }
  .outcomes.twoup {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px; margin-left: auto; margin-right: auto;
  }
  .outcome .n {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(36px, 5vw, 56px);
    letter-spacing: -0.028em; line-height: 1;
    color: var(--ink);
  }
  .outcome .n .from {
    color: var(--subtle); font-size: 0.55em;
    margin-right: 10px; font-style: italic;
    text-decoration: line-through; text-decoration-color: var(--subtle);
  }
  .outcome .n .arrow { color: var(--mark); font-style: italic; }
  .outcome .l {
    margin-top: 12px; font-size: 14px; color: var(--muted);
    max-width: 26ch; line-height: 1.45;
  }
  @media (max-width: 720px) {
    .outcomes, .outcomes.twoup { grid-template-columns: 1fr; gap: 28px; max-width: none; }
  }

  /* ---- Case study: centered layout, matching the home sections ---- */
  .study .cols { display: block; }
  .study .cols > .gutter {
    text-align: center; padding-top: 0; margin-bottom: 40px;
  }
  /* Constrain the whole study to a centered article column */
  .study .cols > div:not(.gutter) { max-width: 880px; margin: 0 auto; }

  /* Header — centered like a home section intro */
  .study .study-head { text-align: center; }
  .study .study-kicker {
    padding: 7px 15px 7px 13px; border-radius: 999px;
    border: 1px solid var(--rule); background: var(--paper-2);
    color: var(--muted); gap: 9px;
  }
  .study .study-kicker::before {
    width: 6px; height: 6px; border-radius: 50%; background: var(--mark);
  }
  .study .study-head h2 { margin-left: auto; margin-right: auto; }
  .study .study-head .summary { margin-left: auto; margin-right: auto; }
  .study .study-meta { justify-content: center; }

  /* Blocks — centered labels + centered leads; body text stays left for reading */
  .study .block { text-align: center; }
  .study .block h4 { margin-left: auto; margin-right: auto; }
  .study .problem-lede { margin-left: auto; margin-right: auto; }
  .study .block .prose { text-align: left; margin-left: auto; margin-right: auto; }
  .study .decisions { text-align: left; margin-left: auto; margin-right: auto; }
  .study .plate { text-align: left; }
  .study .shots { text-align: left; }
  .study .outcomes { text-align: center; }
  .study .outcome .l { margin-left: auto; margin-right: auto; }

  /* Case study — one-line TL;DR under the title */
  .study .study-tldr {
    margin: 18px auto 0; max-width: 62ch; text-align: center;
    font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
    letter-spacing: 0.01em; color: var(--muted);
  }
  .study .study-tldr b {
    color: var(--mark); font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase;
    margin-right: 4px;
  }

  /* Case study — framing tags + user-types grid (flagship depth) */
  .study-tags {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
    margin-top: 22px;
  }
  .study-tags span {
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--muted);
    padding: 5px 11px; border: 1px solid var(--rule); border-radius: 999px;
    background: var(--paper-2);
  }
  .study .usergrid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    text-align: left; margin: 26px auto 0;
  }
  .study .usergrid .user {
    padding: 20px; border: 1px solid var(--rule); border-radius: 8px;
    background: var(--paper-2);
  }
  .study .usergrid .user h5 {
    font-family: var(--serif); font-weight: 500; font-size: 16px;
    letter-spacing: -0.01em;
  }
  .study .usergrid .user p {
    margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--muted);
  }
  .study .usergrid.twoup { grid-template-columns: 1fr 1fr; max-width: 760px; }
  .study .usergrid.threeup { grid-template-columns: repeat(3, 1fr); max-width: 1000px; }
  .study .usergrid.oneup { grid-template-columns: 1fr; max-width: 620px; }
  @media (max-width: 820px) { .study .usergrid, .study .usergrid.threeup { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 520px) { .study .usergrid, .study .usergrid.twoup, .study .usergrid.threeup { grid-template-columns: 1fr; } }

  /* Process flow — horizontal, numbered step cards */
  .study .processflow {
    display: flex; gap: 28px; margin-top: 28px;
    overflow-x: auto; padding: 4px 2px 16px; text-align: left;
    scroll-snap-type: x proximity;
  }
  .study .processflow .step {
    flex: 0 0 220px; scroll-snap-align: start; position: relative;
    padding: 22px; border: 1px solid var(--rule); border-radius: 8px;
    background: var(--paper-2);
  }
  .study .processflow .step .pn {
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
    color: var(--mark); font-weight: 500;
  }
  .study .processflow .step h5 {
    margin-top: 10px; font-family: var(--serif); font-weight: 500;
    font-size: 16px; letter-spacing: -0.01em; line-height: 1.25;
  }
  .study .processflow .step p {
    margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--muted);
  }
  .study .processflow .step:not(:last-child)::after {
    content: "\2192"; position: absolute; right: -20px; top: 34px;
    color: var(--subtle); font-family: var(--serif); font-size: 16px;
  }

  /* Experience */
  .roles { display: grid; gap: 0; }
  .role {
    display: grid; grid-template-columns: 1fr 200px;
    gap: clamp(20px, 5vw, 72px);
    padding: 28px 0;
    border-bottom: 1px solid var(--rule-soft);
    align-items: baseline;
  }
  .role:last-child { border-bottom: none; }
  .role .when {
    order: 2; text-align: right;
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
    color: var(--muted); text-transform: uppercase;
  }
  .role h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -0.012em; }
  .role .co {
    font-family: var(--serif); font-style: italic; color: var(--muted);
    margin: 4px 0 12px; font-size: 16px;
  }
  .role p { color: var(--ink-2); font-size: 17px; line-height: 1.55; max-width: 62ch; }
  @media (max-width: 720px) {
    .role { grid-template-columns: 1fr; gap: 6px; }
    .role .when { order: 0; text-align: left; }
  }

  /* Contact — email / links list (the heading + lead sit in .sec .intro) */
  .lines {
    display: grid; gap: 12px;
    font-family: var(--serif); font-size: clamp(19px, 1.8vw, 22px);
  }
  .lines a {
    display: inline-flex; align-items: baseline; gap: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rule);
    transition: color .15s ease, border-color .15s ease;
  }
  .lines a:hover { color: var(--mark); border-color: var(--mark); }
  .lines .k {
    font-family: var(--mono); font-size: 12px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.1em;
    min-width: 84px;
  }

  /* References */
  .refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; align-items: stretch; }
  .ref {
    margin: 0; padding: 26px;
    border: 1px solid var(--rule); border-radius: 6px;
    background: var(--paper-2);
    display: flex; flex-direction: column;
  }
  .ref blockquote {
    margin: 0; font-family: var(--serif); font-weight: 400;
    font-size: clamp(15.5px, 1.4vw, 17px); line-height: 1.5;
    letter-spacing: -0.005em; color: var(--ink);
  }
  .ref blockquote::before { content: "\201C"; color: var(--mark); }
  .ref blockquote::after { content: "\201D"; color: var(--mark); }
  .ref figcaption {
    margin-top: auto; padding-top: 18px;
    font-family: var(--mono); font-size: 11.5px;
    color: var(--muted); letter-spacing: 0.02em; line-height: 1.5;
  }
  .ref figcaption b { color: var(--ink); font-weight: 500; }
  .ref.placeholder {
    background: transparent; border-style: dashed; border-color: var(--subtle);
  }
  .ref.placeholder blockquote { color: var(--muted); font-style: italic; }
  @media (max-width: 900px) {
    .refs { grid-template-columns: 1fr; max-width: 620px; }
  }

  /* Footer */
  footer {
    padding: 48px 0 64px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px; letter-spacing: 0.04em;
    border-top: 1px solid var(--rule);
  }
  .foot {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 20px; flex-wrap: wrap;
  }

  /* Reveal on scroll — very subtle.
     Gated on html.reveal-on, which the script adds only once it runs.
     If the script never runs (JS off, external file blocked), content stays fully visible. */
  .reveal-on .reveal { opacity: 0; transform: translateY(6px); transition: opacity .8s ease, transform .8s ease; }
  .reveal-on .reveal.in { opacity: 1; transform: none; }

  @media print {
    .top nav, footer { display: none !important; }
    section, article.study { break-inside: avoid; padding: 24px 0; border: none; }
    body { background: #fff; color: #000; }
  }

  /* Multi-page: backlink + case navigation */
  .backlink {
    display: inline-flex; align-items: baseline; gap: 8px;
    margin-top: 28px;
    font-family: var(--mono); font-size: 13px; color: var(--muted);
    letter-spacing: 0.03em;
  }
  .backlink:hover { color: var(--mark); }
  .casenav {
    display: flex; justify-content: space-between; gap: 24px;
    padding-top: 40px;
    border-top: 1px solid var(--rule);
  }
  .casenav a {
    font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px);
    color: var(--ink); letter-spacing: -0.01em;
  }
  .casenav a:hover { color: var(--mark); }
  .casenav a span {
    display: block; font-family: var(--mono); font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
    margin-bottom: 6px;
  }
  .casenav .next { text-align: right; margin-left: auto; }


  /* ---- How I AI page ---- */
  .aihero { max-width: 760px; margin: 0 auto; text-align: center; }
  .aihero .intro-sub { margin-top: 16px; }
  .ai-callout {
    display: inline-block; margin-top: 22px;
    font-size: 14px; color: var(--muted);
    background: rgba(15,107,84,.08); border: 1px solid rgba(15,107,84,.16);
    padding: 8px 16px; border-radius: 999px;
  }
  .aicat { margin-top: 68px; }
  .aicat .cat-head { text-align: center; margin-bottom: 26px; }
  .aicat .cat-head .eyebrow { margin-bottom: 8px; }
  .aicat .cat-head p { font-size: 14px; color: var(--muted); max-width: 44ch; margin: 6px auto 0; }
  .ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 940px; margin: 0 auto; }
  .ai-card {
    border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
    background: var(--paper-2); text-align: left;
    box-shadow: 0 10px 26px rgba(20,25,20,.06);
    transition: box-shadow .3s ease, transform .3s ease;
  }
  .ai-card:hover { box-shadow: 0 20px 44px rgba(20,25,20,.12); transform: translateY(-3px); }
  .ai-card .thumb {
    position: relative; aspect-ratio: 16 / 10;
    display: flex; align-items: center; justify-content: center;
    background:
      radial-gradient(120% 120% at 30% 0%, rgba(15,107,84,.12), transparent 60%),
      linear-gradient(160deg, #eef1ee, #e3ebe6);
    border-bottom: 1px solid var(--rule);
    color: var(--subtle); font-family: var(--sans);
    font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  }
  .ai-card .thumb {
    padding: 12px;
  }
  .ai-card .thumb img,
  .ai-card .thumb video {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    object-fit: contain; display: block;
    border-radius: 6px; box-shadow: 0 6px 16px rgba(20,25,20,.14);
  }
  .ai-card .cbody { padding: 18px 20px 22px; }
  .ai-badge {
    display: inline-block; font-family: var(--sans);
    font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--mark); background: rgba(15,107,84,.10);
    padding: 4px 11px; border-radius: 999px; margin-bottom: 11px;
  }
  .ai-card h4 { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); }
  .ai-card p { margin-top: 7px; font-size: 14px; line-height: 1.55; color: var(--muted); }
  @media (max-width: 720px) { .ai-grid { grid-template-columns: 1fr; } }

  /* Before/after comparison slider (wireframe -> final UI) */
  .ai-card .thumb.compare { padding: 0; }
  .ba-slider {
    --pos: 50%;
    position: absolute; inset: 0;
    overflow: hidden; cursor: ew-resize;
    touch-action: none; user-select: none; -webkit-user-select: none;
  }
  .ai-card .thumb .ba-slider img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; max-width: none; max-height: none;
    object-fit: cover; border-radius: 0; box-shadow: none;
    pointer-events: none; -webkit-user-drag: none;
  }
  .ba-slider .ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
  .ba-slider.animating .ba-before { transition: clip-path .5s ease; }
  .ba-slider.animating .ba-handle,
  .ba-slider.animating .ba-divider { transition: left .5s ease; }
  .ba-divider {
    position: absolute; top: 0; bottom: 0; left: var(--pos);
    width: 2px; transform: translateX(-1px);
    background: rgba(255,255,255,.9);
    box-shadow: 0 0 0 1px rgba(20,25,20,.12);
    pointer-events: none;
  }
  .ba-handle {
    position: absolute; top: 50%; left: var(--pos);
    transform: translate(-50%, -50%);
    width: 38px; height: 38px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(20,25,20,.14);
    box-shadow: 0 6px 18px rgba(20,25,20,.28);
    color: var(--ink); cursor: ew-resize; padding: 0;
    backdrop-filter: blur(6px) saturate(1.2);
    -webkit-backdrop-filter: blur(6px) saturate(1.2);
  }
  .ba-handle:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; }
  .ba-handle svg { width: 20px; height: 20px; display: block; }
  .ba-label {
    position: absolute; bottom: 10px; z-index: 2;
    font-family: var(--sans); font-size: 9.5px; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; color: #fff;
    background: rgba(20,25,20,.55); padding: 4px 9px; border-radius: 999px;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
  }
  .ba-label-before { left: 10px; }
  .ba-label-after { right: 10px; }

  /* Playful hand-drawn "vibe-coded" aside */
  .vibe-note {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin: 30px auto 0; text-align: left;
  }
  .vibe-arrow {
    width: 88px; height: 54px; flex: none; color: var(--mark);
    transform: translateY(3px) rotate(-3deg);
  }
  .vibe-text {
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: 20px; line-height: 1.3; color: var(--ink);
    letter-spacing: -0.01em;
  }
  .vibe-text b { font-weight: 700; font-style: italic; color: var(--mark); }
  @media (max-width: 600px) {
    .vibe-note { gap: 8px; }
    .vibe-arrow { width: 62px; }
    .vibe-text { font-size: 17px; }
  }
