// v5 — Recent Work (4 contemporary projects) + Through-Line

const RECENT_WORKS = [
{
  n: "01",
  slug: "mariannes",
  client: "Marianne's Olive Oil",
  year: "2025",
  role: "Website · brand · editorial commerce",
  title: "A simple product made culturally and emotionally specific.",
  unstable: "A premium olive oil entering a crowded category where every brand uses the same hills, the same fonts, and the same words for \"good.\"",
  audience: "Buyers who pay $40 for oil are buying a story, a producer, a calendar of harvest. Generic luxury doesn't earn that.",
  system: "A website and brand experience built around taste, origin, trust, and the pace of a founder-led food brand — homepage direction, product storytelling, editorial structure, and commerce moments arranged like a magazine that happens to sell oil.",
  artifacts: ["Website", "Editorial system", "Commerce surfaces", "Visual language"],
  proves: "A simple product can feel culturally and emotionally specific.",
  specimen: "mariannes",
  href: null
},
{
  n: "02",
  slug: "outdoorsy",
  client: "Outdoorsy",
  year: "2022–24",
  role: "Host platform · brand · cross-platform design system",
  title: "A category-defining platform rebuilt around the people who make it possible.",
  unstable: "A marketplace whose supply side — the hosts — wasn't centered anywhere in the brand or the product. Growth depended on them, but the experience didn't feel built for them.",
  audience: "Hosts running real businesses on the platform, plus the internal product, design, and engineering teams who had been shipping out of separate playbooks across Android, iOS, and web.",
  system: "A warmer host-centered brand refresh, a cross-platform design system with shared tokens and patterns, and prototyped host tooling — delivered as DRI inside the team, not next to it.",
  artifacts: ["Brand refresh", "Design system", "Host tooling", "Cross-platform patterns"],
  proves: "Brand, product, and system design can come together as one integrated body of work.",
  specimen: "outdoorsy",
  href: "showcase.html"
},
{
  n: "03",
  slug: "rvrs",
  client: "RVRS",
  year: "2025",
  role: "Product · brand · venture shaping",
  title: "Helping a new idea find its shape before the market has language for it.",
  unstable: "An early venture whose category doesn't quite exist yet — the founders know the product, but the audience does not yet have words for what they're being offered.",
  audience: "First users, first investors, first hires. All three have to recognize themselves in the same surface and walk away with the same one-line description.",
  system: "A product and brand system that translates an early idea into market presence: brand platform, product framing, interface direction, messaging system, and the concept architecture the team uses internally to make decisions about what RVRS is and isn't.",
  artifacts: ["Brand platform", "Product framing", "Interface direction", "Messaging system"],
  proves: "A new idea can find its shape before the market has language for it.",
  specimen: "rvrs",
  href: null
}];


// Small inline icons — visual shorthand per (project, layer)
// 4 projects × 3 layers = 12 unique animated icons
const V5LayerIcon = ({ project, layer }) => {
  const key = `${project}-${layer}`;
  const COMMON = { width: 22, height: 22, viewBox: "0 0 24 24", "aria-hidden": "true", className: `v5-layer-icon v5-layer-icon-${key}` };

  // ===== MARIANNE'S OLIVE OIL =====
  if (key === "mariannes-unstable") {
    // 5 identical bottles in a row — sameness
    return (
      <svg {...COMMON}>
        {[2.5, 7, 11.5, 16, 20.5].map((x, i) =>
        <g key={i} className="v5-li-bottle" style={{ animationDelay: `${i * 0.2}s` }}>
            <rect x={x - 0.5} y="6" width="1" height="1.2" fill="#2D3A1F" />
            <path d={`M ${x - 1.6} 7.2 L ${x + 1.6} 7.2 L ${x + 1.6} 9 Q ${x + 2} 10 ${x + 2} 11 L ${x + 2} 20 L ${x - 2} 20 L ${x - 2} 11 Q ${x - 2} 10 ${x - 1.6} 9 Z`} fill="#2D3A1F" />
          </g>
        )}
      </svg>);

  }
  if (key === "mariannes-audience") {
    // Half-sun rising over harvest horizon — calendar of harvest
    return (
      <svg {...COMMON}>
        <line x1="2" y1="16" x2="22" y2="16" stroke="#2D3A1F" strokeWidth="0.8" />
        <path d="M 7 16 A 5 5 0 0 1 17 16" fill="none" stroke="#B9583C" strokeWidth="1.3" className="v5-li-arc" />
        <circle cx="12" cy="11.5" r="1.4" fill="#B9583C" className="v5-li-sun" />
        {[5, 8, 14, 19].map((x, i) =>
        <line key={i} x1={x} y1="16" x2={x} y2="18.5" stroke="#2D3A1F" strokeWidth="0.5" />
        )}
      </svg>);

  }
  if (key === "mariannes-system") {
    // Open magazine spread — pages opening
    return (
      <svg {...COMMON}>
        <g className="v5-li-mag">
          <rect x="3" y="5" width="8.5" height="14" fill="none" stroke="#2D3A1F" strokeWidth="0.8" />
          <rect x="12.5" y="5" width="8.5" height="14" fill="none" stroke="#2D3A1F" strokeWidth="0.8" />
          <line x1="12" y1="5" x2="12" y2="19" stroke="#2D3A1F" strokeWidth="0.5" />
          <line x1="5" y1="9" x2="10" y2="9" stroke="#B9583C" strokeWidth="0.6" />
          <line x1="5" y1="11" x2="10" y2="11" stroke="#2D3A1F" strokeWidth="0.4" opacity="0.5" />
          <line x1="5" y1="13" x2="9" y2="13" stroke="#2D3A1F" strokeWidth="0.4" opacity="0.5" />
          <rect x="14" y="9" width="5" height="3" fill="#B9583C" opacity="0.6" />
          <line x1="14" y1="14" x2="19" y2="14" stroke="#2D3A1F" strokeWidth="0.4" opacity="0.5" />
          <line x1="14" y1="16" x2="18" y2="16" stroke="#2D3A1F" strokeWidth="0.4" opacity="0.5" />
        </g>
      </svg>);

  }

  // ===== PSYCHEDELIC SCIENCE =====
  if (key === "psychedelic-unstable") {
    // 5 dots oscillating at different speeds — moving at different speeds
    return (
      <svg {...COMMON}>
        {[3, 7, 11, 15, 19].map((x, i) =>
        <circle key={i} cx={x} cy="12" r="1.4" fill="#B9583C"
        className="v5-li-psych-dot"
        style={{ animationDuration: `${1.2 + i * 0.4}s`, animationDelay: `${i * 0.15}s` }} />
        )}
      </svg>);

  }
  if (key === "psychedelic-audience") {
    // 3 overlapping circles — multiple audiences sharing one surface
    return (
      <svg {...COMMON}>
        <circle cx="9" cy="10" r="5" fill="none" stroke="#B9583C" strokeWidth="0.9" opacity="0.75" className="v5-li-venn v5-li-venn-1" />
        <circle cx="15" cy="10" r="5" fill="none" stroke="#B9583C" strokeWidth="0.9" opacity="0.75" className="v5-li-venn v5-li-venn-2" />
        <circle cx="12" cy="15" r="5" fill="none" stroke="#B9583C" strokeWidth="0.9" opacity="0.75" className="v5-li-venn v5-li-venn-3" />
      </svg>);

  }
  if (key === "psychedelic-system") {
    // Concentric rings expanding from center — signal at the center
    return (
      <svg {...COMMON}>
        <circle cx="12" cy="12" r="1.5" fill="#B9583C" />
        <circle cx="12" cy="12" r="4" fill="none" stroke="#B9583C" strokeWidth="0.7" className="v5-li-ring v5-li-ring-1" />
        <circle cx="12" cy="12" r="7" fill="none" stroke="#B9583C" strokeWidth="0.6" className="v5-li-ring v5-li-ring-2" />
        <circle cx="12" cy="12" r="10" fill="none" stroke="#B9583C" strokeWidth="0.5" className="v5-li-ring v5-li-ring-3" />
      </svg>);

  }

  // ===== RVRS =====
  if (key === "rvrs-unstable") {
    // Dashed outline shape rotating — category not yet defined
    return (
      <svg {...COMMON}>
        <rect x="5" y="5" width="14" height="14" fill="none" stroke="#B9583C" strokeWidth="1" strokeDasharray="2 3" className="v5-li-undefined" style={{ transformOrigin: "12px 12px" }} />
        <circle cx="12" cy="12" r="1.2" fill="#B9583C" />
      </svg>);

  }
  if (key === "rvrs-audience") {
    // 3 dots arranged in triangle pointing at center — first users, investors, hires recognize themselves
    return (
      <svg {...COMMON}>
        <circle cx="12" cy="12" r="2.2" fill="#B9583C" className="v5-li-rvrs-core" />
        {[
        { x: 12, y: 4, d: "0s" },
        { x: 19, y: 17, d: "0.3s" },
        { x: 5, y: 17, d: "0.6s" }].
        map((p, i) =>
        <g key={i} className="v5-li-rvrs-point" style={{ animationDelay: p.d }}>
            <line x1={p.x} y1={p.y} x2="12" y2="12" stroke="#B9583C" strokeWidth="0.5" strokeDasharray="1 2" />
            <circle cx={p.x} cy={p.y} r="1.5" fill="#B9583C" opacity="0.7" />
          </g>
        )}
      </svg>);

  }
  if (key === "rvrs-system") {
    // Translation arrow — sketch → solid form
    return (
      <svg {...COMMON}>
        <g className="v5-li-translate">
          <rect x="3" y="9" width="6" height="6" fill="none" stroke="#B9583C" strokeWidth="0.8" strokeDasharray="1.5 2" />
          <path d="M 10 12 L 14 12 M 12.5 10.5 L 14 12 L 12.5 13.5" fill="none" stroke="#B9583C" strokeWidth="0.9" className="v5-li-translate-arrow" />
          <rect x="15" y="9" width="6" height="6" fill="#B9583C" />
        </g>
      </svg>);

  }

  // ===== OUTDOORSY =====
  if (key === "outdoorsy-unstable") {
    // Off-center compass — the host isn't pointing at center
    return (
      <svg {...COMMON}>
        <circle cx="12" cy="12" r="8" fill="none" stroke="#1F3D2E" strokeWidth="0.8" />
        <circle cx="12" cy="12" r="1" fill="#1F3D2E" />
        <g className="v5-li-od-needle" style={{ transformOrigin: "12px 12px" }}>
          <path d="M 12 12 L 16.5 7.5 L 14.5 12 Z" fill="#C0563B" />
          <path d="M 12 12 L 7.5 16.5 L 9.5 12 Z" fill="#1F3D2E" opacity="0.55" />
        </g>
        <text x="12" y="4.6" textAnchor="middle" fontFamily="monospace" fontSize="2.6" fill="#1F3D2E" opacity="0.6">N</text>
      </svg>);

  }
  if (key === "outdoorsy-audience") {
    // Tent + dashed trail — hosts on the road
    return (
      <svg {...COMMON}>
        <path d="M 12 6 L 4 19 L 20 19 Z" fill="none" stroke="#1F3D2E" strokeWidth="0.9" />
        <line x1="12" y1="6" x2="12" y2="19" stroke="#1F3D2E" strokeWidth="0.7" />
        <path d="M 11 19 L 12 15 L 13 19 Z" fill="#C0563B" />
        <path d="M 2 21 Q 8 19 12 21 T 22 21" fill="none" stroke="#C0563B" strokeWidth="0.7" strokeDasharray="1.4 1.6" className="v5-li-od-trail" />
      </svg>);

  }
  if (key === "outdoorsy-system") {
    // Three device frames sharing one token (clay dot) — cross-platform system
    return (
      <svg {...COMMON}>
        <rect x="2.5" y="6" width="5.5" height="9" rx="0.9" fill="none" stroke="#1F3D2E" strokeWidth="0.7" />
        <rect x="9.25" y="4.5" width="5.5" height="12" rx="0.9" fill="none" stroke="#1F3D2E" strokeWidth="0.7" />
        <rect x="16" y="7" width="5.5" height="7.5" rx="0.9" fill="none" stroke="#1F3D2E" strokeWidth="0.7" />
        <circle cx="5.25" cy="10.5" r="1.1" fill="#C0563B" className="v5-li-od-token v5-li-od-token-1" />
        <circle cx="12" cy="10.5" r="1.1" fill="#C0563B" className="v5-li-od-token v5-li-od-token-2" />
        <circle cx="18.75" cy="10.75" r="1.1" fill="#C0563B" className="v5-li-od-token v5-li-od-token-3" />
        <line x1="6.35" y1="10.5" x2="10.9" y2="10.5" stroke="#1F3D2E" strokeWidth="0.4" strokeDasharray="0.8 1.2" opacity="0.6" />
        <line x1="13.1" y1="10.5" x2="17.65" y2="10.75" stroke="#1F3D2E" strokeWidth="0.4" strokeDasharray="0.8 1.2" opacity="0.6" />
      </svg>);

  }

  // ===== SPOR =====
  if (key === "spor-unstable") {
    // Balance scale tilting — between wellness and pharmacy
    return (
      <svg {...COMMON}>
        <line x1="12" y1="4" x2="12" y2="13" stroke="#2D3A1F" strokeWidth="0.8" />
        <g className="v5-li-balance" style={{ transformOrigin: "12px 13px" }}>
          <line x1="4" y1="13" x2="20" y2="13" stroke="#2D3A1F" strokeWidth="1" />
          <circle cx="6" cy="16" r="2.2" fill="none" stroke="#B9583C" strokeWidth="0.9" />
          <line x1="6" y1="13" x2="6" y2="13.8" stroke="#2D3A1F" strokeWidth="0.5" />
          <rect x="16.5" y="14" width="3" height="3" fill="#2D3A1F" />
          <line x1="18" y1="13" x2="18" y2="14" stroke="#2D3A1F" strokeWidth="0.5" />
        </g>
      </svg>);

  }
  if (key === "spor-audience") {
    // Daily ritual dots — one lights up sequentially
    return (
      <svg {...COMMON}>
        {[3, 6.5, 10, 13.5, 17, 20.5].map((x, i) =>
        <circle key={i} cx={x} cy="12" r="1.3" fill="#B9583C"
        className="v5-li-ritual-dot"
        style={{ animationDelay: `${i * 0.3}s` }} />
        )}
        <line x1="3" y1="17" x2="20.5" y2="17" stroke="#2D3A1F" strokeWidth="0.4" strokeDasharray="1 1.5" opacity="0.5" />
      </svg>);

  }
  if (key === "spor-system") {
    // Packet with measured dose marks filling sequentially
    return (
      <svg {...COMMON}>
        <path d="M 5 5 L 7 4 L 9 5 L 11 4 L 13 5 L 15 4 L 17 5 L 19 4" fill="none" stroke="#2D3A1F" strokeWidth="0.6" />
        <rect x="5" y="5" width="14" height="14" fill="#2D3A1F" />
        {[8, 11, 14, 17].map((y, i) =>
        <line key={i} x1="7" y1={y} x2="17" y2={y} stroke="#B9583C" strokeWidth="0.7"
        className="v5-li-dose"
        style={{ animationDelay: `${i * 0.25}s` }} />
        )}
      </svg>);

  }
  return null;
};

// Bespoke SVG specimens — large editorial plate per project
const V5Specimen = ({ kind, year, client }) => {
  if (kind === "mariannes") {
    return (
      <svg viewBox="0 0 320 420" aria-hidden="true">
        <rect width="320" height="420" fill="#E8DCA8" />
        {/* Bottle silhouette centered */}
        <path d="M 140 70 L 180 70 L 180 110 Q 200 130 200 160 L 200 360 Q 200 380 175 380 L 145 380 Q 120 380 120 360 L 120 160 Q 120 130 140 110 Z"
        fill="#2D3A1F" opacity="0.95" />
        {/* Cork */}
        <rect x="146" y="58" width="28" height="14" fill="#8B5A3C" />
        {/* Label */}
        <rect x="128" y="220" width="64" height="96" fill="#F5EFDC" />
        <text x="160" y="266" textAnchor="middle" fontFamily="Newsreader, Georgia, serif" fontSize="42" fontStyle="italic" fill="#2D3A1F">M</text>
        <line x1="138" y1="280" x2="182" y2="280" stroke="#2D3A1F" strokeWidth="0.5" />
        <text x="160" y="298" textAnchor="middle" fontFamily="JetBrains Mono, monospace" fontSize="7" letterSpacing="2" fill="#2D3A1F">OLIVE OIL</text>
        {/* Olive branch */}
        <g opacity="0.55" transform="translate(38, 60) rotate(-15)">
          <path d="M 0 0 Q 30 60 50 140" fill="none" stroke="#2D3A1F" strokeWidth="1.2" />
          {[10, 30, 50, 70, 90, 110, 130].map((y, i) =>
          <ellipse key={i} cx={4 + i * 1.6} cy={y} rx="6" ry="2.5" fill="#2D3A1F"
          transform={`rotate(${-30 + i * 6} ${4 + i * 1.6} ${y})`} />
          )}
        </g>
        <text x="20" y="400" fontFamily="JetBrains Mono, monospace" fontSize="9" letterSpacing="3" fill="#2D3A1F" opacity="0.6">{(client || "MARIANNE'S").toUpperCase()} · {year || "2025"}</text>
      </svg>);

  }
  if (kind === "psychedelic") {
    return (
      <svg viewBox="0 0 320 420" aria-hidden="true">
        <rect width="320" height="420" fill="#1F1825" />
        {[16, 32, 50, 70, 92, 116, 142, 170].map((r, i) =>
        <circle key={r} cx="160" cy="210" r={r} fill="none"
        stroke={i % 2 === 0 ? "#D86A48" : "#8B5A3C"}
        strokeWidth="0.9" opacity={0.5 + i * 0.06} />
        )}
        <circle cx="160" cy="210" r="8" fill="#D86A48" />
        <text x="20" y="400" fontFamily="JetBrains Mono, monospace" fontSize="9" letterSpacing="3" fill="rgba(242,238,230,0.55)">PSYCHEDELIC SCIENCE · {year || "2025"}</text>
      </svg>);

  }
  if (kind === "rvrs") {
    return (
      <svg viewBox="0 0 320 420" aria-hidden="true">
        <rect width="320" height="420" fill="#B9583C" />
        <g fontFamily="Newsreader, Georgia, serif" fontSize="200" fontStyle="italic">
          <text x="86" y="280" textAnchor="middle" fill="#F2EEE6" fontWeight="400">R</text>
          <text x="234" y="280" textAnchor="middle" fill="#F2EEE6" fontWeight="400" transform="scale(-1, 1) translate(-468, 0)">R</text>
        </g>
        <line x1="160" y1="90" x2="160" y2="320" stroke="#F2EEE6" strokeWidth="0.6" strokeDasharray="2 5" opacity="0.5" />
        <text x="20" y="400" fontFamily="JetBrains Mono, monospace" fontSize="9" letterSpacing="3" fill="rgba(242,238,230,0.7)">{(client || "RVRS").toUpperCase()} · {year || "2025"}</text>
      </svg>);

  }
  if (kind === "outdoorsy") {
    return (
      <svg viewBox="0 0 320 420" aria-hidden="true">
        <rect width="320" height="420" fill="#E2E3D2" />
        {/* Pine mountain horizon */}
        <path d="M 0 280 L 60 210 L 110 250 L 160 180 L 215 240 L 260 200 L 320 240 L 320 420 L 0 420 Z" fill="#1F3D2E" />
        <path d="M 0 320 L 50 280 L 120 310 L 180 270 L 240 300 L 320 280 L 320 420 L 0 420 Z" fill="#2D4F3D" />
        {/* Sage ridge in mid-distance */}
        <path d="M 0 250 L 70 215 L 130 235 L 200 200 L 270 225 L 320 215 L 320 280 L 0 280 Z" fill="#A9B29A" opacity="0.6" />
        {/* Clay sun */}
        <circle cx="240" cy="120" r="34" fill="#C0563B" />
        {/* Dashed trail across the foreground */}
        <path d="M 20 360 Q 80 340 140 360 T 280 355" fill="none" stroke="#E2E3D2" strokeWidth="1.5" strokeDasharray="3 5" opacity="0.85" />
        {/* Tiny RV silhouette on the trail */}
        <g transform="translate(150, 332)">
          <rect x="0" y="0" width="30" height="14" rx="2" fill="#E2E3D2" />
          <rect x="22" y="-5" width="10" height="6" fill="#E2E3D2" />
          <circle cx="6" cy="15" r="2.5" fill="#1A1A1A" />
          <circle cx="24" cy="15" r="2.5" fill="#1A1A1A" />
        </g>
        {/* Wordmark */}
        <text x="36" y="78" fontFamily="Newsreader, Georgia, serif" fontSize="42" fontStyle="italic" fontWeight="500" fill="#1F3D2E">Outdoorsy</text>
        <line x1="36" y1="90" x2="120" y2="90" stroke="#1F3D2E" strokeWidth="0.6" opacity="0.5" />
        <text x="36" y="106" fontFamily="JetBrains Mono, monospace" fontSize="8" letterSpacing="2.5" fill="#3A352E" opacity="0.7">HOST PLATFORM · BRAND · DS</text>
        <text x="20" y="400" fontFamily="JetBrains Mono, monospace" fontSize="9" letterSpacing="3" fill="#1A1A1A" opacity="0.6">{(client || "OUTDOORSY").toUpperCase()} · {year || "2022–24"}</text>
      </svg>);

  }
  if (kind === "spor") {
    return (
      <svg viewBox="0 0 320 420" aria-hidden="true">
        <rect width="320" height="420" fill="#D9CFB6" />
        <rect x="80" y="80" width="160" height="240" rx="4" fill="#1F2826" />
        <path d="M 80 80 L 88 74 L 96 80 L 104 74 L 112 80 L 120 74 L 128 80 L 136 74 L 144 80 L 152 74 L 160 80 L 168 74 L 176 80 L 184 74 L 192 80 L 200 74 L 208 80 L 216 74 L 224 80 L 232 74 L 240 80"
        fill="none" stroke="#1F2826" strokeWidth="1" />
        <text x="160" y="146" textAnchor="middle" fontFamily="Newsreader, Georgia, serif" fontSize="42" fontStyle="italic" fill="#D9CFB6">spor</text>
        <text x="160" y="170" textAnchor="middle" fontFamily="JetBrains Mono, monospace" fontSize="7" letterSpacing="2.5" fill="rgba(217,207,182,0.7)">DAILY MICRODOSE</text>
        <g fill="#D86A48" opacity="0.9">
          {[210, 230, 250, 270, 290].flatMap((y) =>
          [100, 120, 140, 160, 180, 200, 220].map((x) =>
          <circle key={`${x}${y}`} cx={x} cy={y} r="2" />
          )
          )}
        </g>
        <text x="20" y="400" fontFamily="JetBrains Mono, monospace" fontSize="9" letterSpacing="3" fill="#1F2826" opacity="0.7">SPOR · CPG · {year || "2025"}</text>
      </svg>);

  }
  return null;
};

const V5RecentCard = ({ c, i }) => {
  const ref = useRef(null);
  const [seen, setSeen] = useState(false);
  useEffect(() => {
    const el = ref.current;if (!el) return;
    const io = new IntersectionObserver(([e]) => {
      if (e.isIntersecting) {setSeen(true);io.disconnect();}
    }, { threshold: 0.15 });
    io.observe(el);
    return () => io.disconnect();
  }, []);

  return (
    <article ref={ref} id={`work-${c.slug}`} className={`v4-case v5-recent ${seen ? "is-in" : ""}`} data-screen-label={`Recent · ${c.client}`}>
      <div className="v4-container">
        <div className="v5-recent-row">
          {/* LEFT — specimen as the hero visual (clickable when a case study exists) */}
          {c.href ? (
            <a
              href={c.href}
              className="v5-recent-visual v5-recent-visual-link"
              data-cursor={`Open · ${c.client} case study`}
              data-cursor-style="cta"
              aria-label={`Open ${c.client} case study`}>
              <V5Specimen kind={c.specimen} year={c.year} client={c.client} />
            </a>
          ) : (
            <div className="v5-recent-visual" data-cursor={`${c.client} · ${c.year}`}>
              <V5Specimen kind={c.specimen} year={c.year} client={c.client} />
            </div>
          )}

          {/* RIGHT — narrative tower */}
          <div className="v5-recent-content">
            <FadeIn as="div" className="v5-recent-meta-row">
              <span className="v5-recent-meta-client" style={{ fontWeight: "600" }}>{c.client}</span>
              <span className="v5-recent-meta-role">{c.role}</span>
            </FadeIn>

            {c.href ? (
              <a href={c.href} className="v5-recent-title-link" data-cursor={`Open · ${c.client}`} data-cursor-style="cta">
                <h3 className="v5-recent-title">
                  <WordReveal text={c.title} stagger={40} />
                </h3>
              </a>
            ) : (
              <h3 className="v5-recent-title" data-cursor={`Open · ${c.client}`}>
                <WordReveal text={c.title} stagger={40} />
              </h3>
            )}

            <FadeIn as="div" delay={200} className="v5-recent-proves">
              <span className="v5-recent-proves-label">What it made possible</span>
              <p className="v5-recent-proves-text"><span className="emph">{c.proves}</span></p>
            </FadeIn>

            <div className="v5-recent-narrative">
              <FadeIn as="div" delay={320} className="v5-recent-layer">
                <span className="v5-recent-layer-label">
                  <V5LayerIcon project={c.specimen} layer="unstable" />
                  <span>The unstable idea</span>
                </span>
                <p>{c.unstable}</p>
              </FadeIn>
              <FadeIn as="div" delay={440} className="v5-recent-layer">
                <span className="v5-recent-layer-label">
                  <V5LayerIcon project={c.specimen} layer="audience" />
                  <span>The audience problem</span>
                </span>
                <p>{c.audience}</p>
              </FadeIn>
              <FadeIn as="div" delay={560} className="v5-recent-layer">
                <span className="v5-recent-layer-label">
                  <V5LayerIcon project={c.specimen} layer="system" />
                  <span>The system I shaped</span>
                </span>
                <p>{c.system}</p>
              </FadeIn>
            </div>

            <FadeIn as="div" delay={720} className="v5-recent-artifacts">
              <span className="v5-recent-artifacts-label">— Artifact set</span>
              <div className="v5-recent-artifacts-list">
                {c.artifacts.map((a) => <span key={a} className="v5-recent-tag">{a}</span>)}
              </div>
            </FadeIn>

            {c.href && (
              <FadeIn as="div" delay={820} className="v5-recent-cta">
                <a href={c.href} className="v5-recent-cta-link" data-cursor="Open the full case study" data-cursor-style="cta">
                  <span className="v5-recent-cta-label">Open the full case study</span>
                  <span className="v5-recent-cta-arr">→</span>
                </a>
              </FadeIn>
            )}
          </div>
        </div>
      </div>
    </article>);

};

const V5Work = () => {
  return (
    <section id="work" className="v4-work v5-work">
      <div className="v4-container">
        <header className="v4-work-head v5-work-head">
          <div>
            <div className="v4-work-eyebrow v5-work-eyebrow">
              <span className="v5-work-eyebrow-rule"></span>
              <span className="v5-work-eyebrow-num">01</span>
              <span style={{ fontFamily: "\"Space Grotesk\"" }}>Recent work</span>
            </div>
            <h2 className="v4-work-title v5-work-title" data-cursor="Four live category problems">
              <WordReveal text="Dispatches" stagger={60} />
              <br />
              <span className="emph"><WordReveal text="from the studio." stagger={70} startDelay={400} /></span>
            </h2>
          </div>
          <div>
            <p className="v4-work-intro v5-work-intro">
              <FadeIn delay={250}>
                The most useful view of the practice isn't chronological. It's the set of <span className="emph">live category problems</span> I've been working through recently — premium food, psychedelics, regulated CPG, social systems, and new product platforms.
              </FadeIn>
            </p>
          </div>
        </header>

        <div className="v4-work-list">
          {RECENT_WORKS.map((c, i) => <V5RecentCard key={c.n} c={c} i={i} />)}
        </div>
      </div>
    </section>);

};

// PRINCIPLES — five things every good engagement has to produce
const PRINCIPLES = [
{ n: "01", verb: "Make the idea legible.", body: "Find the language, metaphors, categories, and emotional logic that let people understand what they're looking at." },
{ n: "02", verb: "Make the product usable.", body: "Turn ambiguity into interfaces, flows, prototypes, packaging, or experiences people can actually move through." },
{ n: "03", verb: "Make the story repeatable.", body: "Build the narrative system so the team, brand, audience, and market can all carry the idea forward in the same words." },
{ n: "04", verb: "Make the system teachable.", body: "Translate the work into frameworks, curricula, playbooks, templates, and shared language a team can use without me." },
{ n: "05", verb: "Make the work scalable.", body: "Create the structure that lets the idea survive beyond a launch — content systems, design systems, growth systems, operating models, or AI workflows." }];


const V5Principles = () => {
  const ref = useRef(null);
  useEffect(() => {
    const el = ref.current;if (!el) return;
    const io = new IntersectionObserver(([e]) => {
      if (e.isIntersecting) {
        el.querySelectorAll(".v5-through-row").forEach((r, i) => {
          r.style.setProperty("--d", `${i * 110}ms`);
          r.classList.add("is-in");
        });
        io.disconnect();
      }
    }, { threshold: 0.15 });
    io.observe(el);
    return () => io.disconnect();
  }, []);
  return (
    <section id="principles" className="v5-through" data-screen-label="Operating principles">
      <div className="v4-container">
        <header className="v5-through-head">
          <span className="v5-through-eyebrow">— Operating principles · the work, in five moves</span>
          <h2 className="v5-through-title">
            <WordReveal text="Five things every" stagger={70} />
            <br />
            <span className="emph"><WordReveal text="good engagement has to leave behind." stagger={60} startDelay={400} /></span>
          </h2>
          <p className="v5-through-lede">
            <FadeIn delay={350}>
              The category might be software, cannabis, psychedelics, CPG, education, AI, or regulated operations. The principles don't change. Every engagement is shaped to produce five things — and if even one is missing, the work doesn't survive past the launch.
            </FadeIn>
          </p>
        </header>

        <div className="v5-through-table" ref={ref}>
          {PRINCIPLES.map((t) =>
          <div key={t.n} className="v5-through-row">
              <span className="v5-through-row-n">{t.n}</span>
              <h3 className="v5-through-row-verb">{t.verb}</h3>
              <p className="v5-through-row-body">{t.body}</p>
            </div>
          )}
        </div>

        <div className="v5-through-foot">
          <FadeIn delay={200}>
            <span className="emph">Find the signal. Shape the system. Make the idea understandable.</span> The output might be a website, a brand platform, a packaging line, a product concept, a syllabus, an AI prototype, or an operating model. The real work is making the idea usable.
          </FadeIn>
        </div>
      </div>
    </section>);

};

Object.assign(window, { V5Work, V5RecentCard, V5Principles });