/* ============================================================
   Cover: interactive Liquid Glass hero (bento)
   · on-palette gradient backdrop (no photo, no vivid color)
   · slow-drifting monochrome blobs, faint parallax to pointer
   · a small, obscure, colorless frosted lens that follows the
     cursor and faintly distorts whatever sits behind it
   · thin, wide-tracked name; staggered entrance motion
   · respects prefers-reduced-motion
   ============================================================ */
const { useState, useEffect, useRef, useCallback } = React;

function usePrefersReducedMotion() {
  const [reduced, setReduced] = useState(false);
  useEffect(function () {
    const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
    const on = function () { setReduced(mq.matches); };
    on();
    mq.addEventListener("change", on);
    return function () { mq.removeEventListener("change", on); };
  }, []);
  return reduced;
}

function useFinePointer() {
  const [fine, setFine] = useState(false);
  useEffect(function () {
    const mq = window.matchMedia("(pointer: fine)");
    const on = function () { setFine(mq.matches); };
    on();
    mq.addEventListener("change", on);
    return function () { mq.removeEventListener("change", on); };
  }, []);
  return fine;
}

/* A small, colorless frosted droplet that trails the cursor and
   faintly refracts the background. Deliberately subtle. */
function GlassLens(props) {
  const heroRef = props.heroRef;
  const reduced = usePrefersReducedMotion();
  const fine = useFinePointer();
  const lensRef = useRef(null);
  const target = useRef({ x: -999, y: -999, on: false });
  const pos = useRef({ x: -999, y: -999 });
  const raf = useRef(0);
  const D = 104;

  useEffect(function () {
    if (reduced || !fine) return;
    const hero = heroRef.current;
    if (!hero) return;
    function move(e) {
      const r = hero.getBoundingClientRect();
      target.current.x = e.clientX - r.left;
      target.current.y = e.clientY - r.top;
      target.current.on = true;
    }
    function leave() { target.current.on = false; }
    hero.addEventListener("pointermove", move);
    hero.addEventListener("pointerleave", leave);
    hero.addEventListener("pointerenter", move);
    function tick() {
      const t = target.current, p = pos.current;
      p.x += (t.x - p.x) * 0.42;
      p.y += (t.y - p.y) * 0.42;
      const lens = lensRef.current;
      if (lens) {
        lens.style.opacity = t.on ? "1" : "0";
        lens.style.transform = "translate(" + (p.x - D / 2) + "px," + (p.y - D / 2) + "px) scale(" + (t.on ? 1 : 0.7) + ")";
      }
      raf.current = requestAnimationFrame(tick);
    }
    raf.current = requestAnimationFrame(tick);
    return function () {
      cancelAnimationFrame(raf.current);
      hero.removeEventListener("pointermove", move);
      hero.removeEventListener("pointerleave", leave);
      hero.removeEventListener("pointerenter", move);
    };
  }, [reduced, fine, heroRef]);

  if (reduced || !fine) return null;
  return (
    <div ref={lensRef} aria-hidden="true" style={{
      position: "absolute", left: 0, top: 0, width: D, height: D,
      borderRadius: "50%", pointerEvents: "none", opacity: 0, zIndex: 6,
      willChange: "transform, opacity",
      transition: "opacity 420ms var(--glass-ease)",
      WebkitBackdropFilter: "blur(2px) saturate(120%) url(#pf-lens)",
      backdropFilter: "blur(2px) saturate(120%) url(#pf-lens)",
      border: "1px solid var(--pf-border)",
      boxShadow:
        "inset 0 1px 1px rgba(255,255,255,0.5), inset 0 -6px 14px rgba(0,0,0,0.12), 0 6px 18px rgba(8,18,30,0.18)",
    }} />
  );
}

/* Grayish blurred blocks behind the whole page — gives the glass
   something to refract and blur, and differentiates the sections. */
function PageBackground() {
  const reduced = usePrefersReducedMotion();
  const blobs = [
    { c: "var(--pf-blob-a)", s: 600, x: "4%",  y: "6%",  d: 34 },
    { c: "var(--pf-blob-b)", s: 480, x: "72%", y: "4%",  d: 40 },
    { c: "var(--pf-blob-c)", s: 420, x: "80%", y: "40%", d: 30 },
    { c: "var(--pf-blob-a)", s: 460, x: "10%", y: "52%", d: 37 },
    { c: "var(--pf-blob-b)", s: 380, x: "58%", y: "74%", d: 33 },
    { c: "var(--pf-blob-c)", s: 400, x: "30%", y: "86%", d: 36 },
  ];
  return (
    <div aria-hidden="true" style={{ position: "fixed", inset: 0, overflow: "hidden", zIndex: 0, pointerEvents: "none" }}>
      {blobs.map(function (o, i) {
        return (
          <span key={i} className="gv-blob" style={{
            position: "absolute", left: o.x, top: o.y, width: o.s, height: o.s, borderRadius: "50%",
            background: "radial-gradient(circle at 38% 32%, " + o.c + " 0%, color-mix(in srgb, " + o.c + " 55%, transparent) 34%, color-mix(in srgb, " + o.c + " 24%, transparent) 56%, color-mix(in srgb, " + o.c + " 8%, transparent) 74%, transparent 88%)",
            filter: "blur(52px)",
            animation: reduced ? "none" : ("gvFloat " + o.d + "s ease-in-out infinite"),
            animationDelay: (-i * 4) + "s",
          }} />
        );
      })}
    </div>
  );
}

/* small glass info tile used in the hero bento */
function HeroTile(props) {
  return (
    <div className={"pf-glass gv-rise " + (props.className || "")} style={Object.assign({
      gridColumn: props.col, gridRow: props.row,
      padding: "clamp(22px, 2vw, 30px)",
      display: "flex", flexDirection: "column", justifyContent: props.justify || "flex-end",
      transitionDelay: (props.delay || 0) + "ms",
    }, props.style)}>
      {props.label ? <div className="pf-eyebrow" style={{ marginBottom: 14 }}>{props.label}</div> : null}
      {props.children}
    </div>
  );
}

/* Rotating "book next flight" destinations. Each links to a real
   Google Flights search for the nearest bookable flight there. */
const TRIPS = [
  { city: "Osaka", place: "Osaka, Japan" },
  { city: "Kyoto", place: "Kyoto, Japan" },
  { city: "Lisbon", place: "Lisbon, Portugal" },
  { city: "Dubai", place: "Dubai" },
  { city: "Curaçao", place: "Curaçao" },
  { city: "Paris", place: "Paris, France" },
];
function flightUrl(place) {
  return "https://www.google.com/search?q=" + encodeURIComponent("book next trip to " + place);
}
function NextTrip() {
  const reduced = usePrefersReducedMotion();
  const [i, setI] = useState(0);
  useEffect(function () {
    if (reduced) return;
    const id = setInterval(function () { setI(function (x) { return (x + 1) % TRIPS.length; }); }, 3000);
    return function () { clearInterval(id); };
  }, [reduced]);
  const t = TRIPS[i];
  return (
    <a href={flightUrl(t.place)} target="_blank" rel="noopener noreferrer"
      className="pf-glass gv-rise gv-lift gv-c-trip"
      aria-label={"Book a flight to " + t.place}
      style={{ gridColumn: "span 4", gridRow: "span 1", padding: "clamp(22px, 2vw, 30px)", display: "flex", flexDirection: "column", justifyContent: "center", textDecoration: "none", color: "inherit", transitionDelay: "40ms", overflow: "hidden" }}>
      <div className="pf-eyebrow" style={{ marginBottom: 14 }}>
        <span>Book next flight</span>
      </div>
      <div key={i} className={reduced ? "" : "gv-trip"} style={{ display: "flex", alignItems: "baseline", gap: 10 }}>
        <span className="pf-h3" style={{ fontSize: "clamp(18px, 1.5vw, 22px)", color: "var(--label-secondary)" }}>{t.place}</span>
      </div>
    </a>
  );
}

/* What I am, said four ways — the practice tile, on rotation. */
const ROLES = [
  "Senior Product Designer",
  "AI Builder",
  "AI Architect",
  "Design Engineer",
  "Model Designer",
];
function RolesTile() {
  const reduced = usePrefersReducedMotion();
  const [i, setI] = useState(0);
  useEffect(function () {
    if (reduced) return;
    const id = setInterval(function () { setI(function (x) { return (x + 1) % ROLES.length; }); }, 2600);
    return function () { clearInterval(id); };
  }, [reduced]);
  return (
    <div className="pf-glass gv-rise gv-c-practice" style={{ gridColumn: "span 5", gridRow: "span 1", padding: "clamp(22px, 2vw, 30px)", display: "flex", flexDirection: "column", justifyContent: "center", transitionDelay: "90ms", overflow: "hidden" }}>
      <div className="pf-eyebrow" style={{ marginBottom: 14, display: "flex", justifyContent: "space-between", gap: 10 }}>
        <span>Practice</span>
        <span style={{ letterSpacing: 0, textTransform: "none", fontSize: 11.5 }}>Dentsu &times; Subaru of America</span>
      </div>
      <div key={i} className="pf-h3" style={{ fontSize: "clamp(18px, 1.5vw, 22px)", animation: reduced ? "none" : "nomiFade 0.4s ease" }}>
        {ROLES[i]}
      </div>
    </div>
  );
}

/* "Latest launch" — the live nomi link, worn quietly. */
function LiveLaunch() {
  return (
    <a href="https://zeyaai.com/nomi" target="_blank" rel="noopener noreferrer"
      className="pf-glass gv-rise gv-lift"
      aria-label="Visit nomi, live at zeyaai.com/nomi" data-c="nomi"
      style={{ gridColumn: "span 4", gridRow: "span 1", padding: "clamp(22px, 2vw, 30px)", display: "flex", flexDirection: "column", justifyContent: "center", textDecoration: "none", color: "inherit", transitionDelay: "230ms" }}>
      <div className="pf-eyebrow" style={{ marginBottom: 14, display: "flex", alignItems: "center", justifyContent: "space-between" }}>
        <span style={{ display: "inline-flex", alignItems: "center", gap: 9 }}>
          <span className="gv-ping" aria-hidden="true" style={{ width: 8, height: 8, borderRadius: "50%", background: "var(--accent)" }} />
          Latest launch · live
        </span>
        <i data-lucide="arrow-up-right" style={{ width: 15, height: 15, opacity: 0.6 }} />
      </div>
      <div className="pf-h3" style={{ fontSize: "clamp(18px, 1.5vw, 22px)", display: "flex", alignItems: "baseline", gap: 10, flexWrap: "wrap" }}>
        nomi
        <span style={{ fontSize: 13.5, fontWeight: 400, color: "var(--label-tertiary)", letterSpacing: "0.01em" }}>zeyaai.com/nomi</span>
      </div>
      <div style={{ marginTop: 10, fontSize: 12.5, color: "var(--label-tertiary)", letterSpacing: "0.01em" }}>
        800+ visitors in week one &middot; 87% on mobile
      </div>
    </a>
  );
}

/* How I actually work: design and shipping in the same loop.
   Fixed height: every line is always rendered, revealed by opacity,
   so the card never resizes as the session replays. */
const TERM_LINES = [
  { pr: "›", t: "shape the social-self, not the prompt" },
  { t: "· 2 research rounds · 32 sessions", dim: true },
  { t: "· intended-self fit 50% → 69%", dim: true },
  { pr: "›", t: "build it: Cursor + Claude Code" },
  { t: "✓ nomi live at zeyaai.com/nomi", ok: true },
  { t: "· week 1: 800+ visitors · 3 deploys · 0 downtime", dim: true },
];
function ClaudeCodeCard() {
  const reduced = usePrefersReducedMotion();
  const [n, setN] = useState(reduced ? TERM_LINES.length : 1);
  useEffect(function () {
    if (reduced) { setN(TERM_LINES.length); return; }
    const id = setInterval(function () {
      setN(function (x) { return x >= TERM_LINES.length + 2 ? 1 : x + 1; });
    }, 1400);
    return function () { clearInterval(id); };
  }, [reduced]);
  return (
    <div className="pf-glass gv-rise gv-c-howiwork" style={{ gridColumn: "span 4", gridRow: "span 1", padding: "clamp(18px, 1.6vw, 24px)", display: "flex", flexDirection: "column", transitionDelay: "280ms" }}>
      <div className="pf-eyebrow" style={{ marginBottom: 12, display: "flex", justifyContent: "space-between", alignItems: "center", gap: 10 }}>
        <span>How I work</span>
        <span style={{ letterSpacing: 0, textTransform: "none", fontSize: 11.5 }}>research → design → ship</span>
      </div>
      <div className="gv-term" role="img" aria-label="Design-to-ship loop: research two rounds, intended-self fit rose from 50 to 69 percent, built with Cursor and Claude Code, nomi is live with 800 plus visitors in week one">
        <div className="gv-term-bar" aria-hidden="true"><i /><i /><i /><span>0 &rarr; 1: one week</span></div>
        {TERM_LINES.map(function (l, i) {
          const shown = i < n;
          return (
            <div key={i} className={"gv-term-line" + (l.dim ? " dim" : "")} style={{ opacity: shown ? 1 : 0 }}>
              {l.pr ? <span className="pr">{l.pr}</span> : null}
              <span className={l.ok ? "ok" : ""}>{l.t}</span>
              {shown && i === Math.min(n, TERM_LINES.length) - 1 && !reduced ? <span className="nomi-caret" aria-hidden="true" style={{ display: "inline-block", width: 6, height: "1em", background: "var(--accent)", marginLeft: 6, transform: "translateY(2px)" }} /> : null}
            </div>
          );
        })}
      </div>
    </div>
  );
}

/* ---------- the playful strip: small, quiet, alive ---------- */
function MiniTile(props) {
  return (
    <div className={"pf-glass gv-rise " + (props.className || "")} style={Object.assign({
      gridColumn: "span 3", gridRow: "span 1",
      padding: "clamp(18px, 1.6vw, 24px)",
      display: "flex", flexDirection: "column", justifyContent: "center",
      transitionDelay: (props.delay || 0) + "ms",
    }, props.style)}>
      <div className="pf-eyebrow" style={{ marginBottom: 12, fontSize: 11.5 }}>{props.label}</div>
      {props.children}
    </div>
  );
}

/* local time + an honest guess at what I'm doing */
function ClockTile() {
  const [now, setNow] = useState(new Date());
  useEffect(function () {
    const id = setInterval(function () { setNow(new Date()); }, 30000);
    return function () { clearInterval(id); };
  }, []);
  const opts = { hour: "numeric", minute: "2-digit", timeZone: "America/New_York" };
  const time = now.toLocaleTimeString("en-US", opts);
  const h = parseInt(now.toLocaleTimeString("en-US", { hour: "numeric", hour12: false, timeZone: "America/New_York" }), 10);
  const status = h < 7 ? "probably asleep" : h < 10 ? "matcha first" : h < 18 ? "likely designing" : h < 23 ? "shipping side quests" : "night owl mode";
  return (
    <MiniTile label="New York" delay={560}>
      <div style={{ display: "flex", alignItems: "baseline", gap: 10, flexWrap: "wrap" }}>
        <span className="pf-num" style={{ fontSize: "clamp(20px, 1.8vw, 26px)" }}>{time}</span>
        <span style={{ fontSize: 12.5, color: "var(--label-tertiary)" }}>{status}</span>
      </div>
    </MiniTile>
  );
}

/* on repeat — no API, just honesty on rotation */
const TRACKS = [
  ["Kingston", "Faye Webster"],
  ["From the Start", "Laufey"],
  ["Pink + White", "Frank Ocean"],
  ["Sofia", "Clairo"],
];
function OnRepeatTile() {
  const reduced = usePrefersReducedMotion();
  const [i, setI] = useState(0);
  useEffect(function () {
    if (reduced) return;
    const id = setInterval(function () { setI(function (x) { return (x + 1) % TRACKS.length; }); }, 4200);
    return function () { clearInterval(id); };
  }, [reduced]);
  const t = TRACKS[i];
  return (
    <MiniTile label="On repeat" delay={600}>
      <div style={{ display: "flex", alignItems: "center", gap: 12, minWidth: 0 }}>
        <span className="gv-eq" aria-hidden="true"><i /><i /><i /></span>
        <div key={i} style={{ minWidth: 0, animation: reduced ? "none" : "nomiFade 0.35s ease" }}>
          <div style={{ fontSize: 14.5, color: "var(--label-primary)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{t[0]}</div>
          <div style={{ fontSize: 12, color: "var(--label-tertiary)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{t[1]}</div>
        </div>
      </div>
    </MiniTile>
  );
}

/* shipped impact — all four numbers visible, one detail rotating underneath */
const IMPACT = [
  { n: "2M+", k: "connected-vehicle owners", d: "MySubaru ecosystem redesign across mobile, web, head unit, and watch." },
  { n: "+40.6%", k: "year-end active usage", d: "Homepage and information-architecture redesign, Subaru of America, 2025." },
  { n: "96%", k: "service enrollment", d: "Point-of-sale enablement flow, with 52.9% converting to a paid tier." },
  { n: "340K", k: "content views, 0 → 1", d: "Voice-based social app shipped from concept to App Store launch." },
];
function ImpactTile() {
  const reduced = usePrefersReducedMotion();
  const [i, setI] = useState(0);
  useEffect(function () {
    if (reduced) return;
    const id = setInterval(function () { setI(function (x) { return (x + 1) % IMPACT.length; }); }, 3600);
    return function () { clearInterval(id); };
  }, [reduced]);
  return (
    <div className="pf-glass gv-rise gv-c-impact" style={{ gridColumn: "span 12", gridRow: "span 1", padding: "clamp(22px, 2vw, 32px)", display: "flex", flexDirection: "column", justifyContent: "center", gap: 18, transitionDelay: "540ms" }}>
      <div className="pf-eyebrow" style={{ fontSize: 11.5, display: "flex", justifyContent: "space-between", gap: 10, alignItems: "center" }}>
        <span>Shipped impact</span>
        <span style={{ letterSpacing: 0, textTransform: "none", fontSize: 11.5 }}>measured in production, not in decks</span>
      </div>
      <div className="gv-impact-row">
        {IMPACT.map(function (m, k) {
          const on = k === i;
          return (
            <button key={m.n} onMouseEnter={function () { setI(k); }} onFocus={function () { setI(k); }}
              className="gv-impact-cell" aria-pressed={on ? "true" : "false"}
              style={{ borderColor: on ? "color-mix(in srgb, var(--accent) 45%, transparent)" : "transparent" }}>
              <span className="pf-num" style={{ fontSize: "clamp(26px, 2.6vw, 38px)", lineHeight: 1, color: on ? "var(--label-primary)" : "var(--label-secondary)", transition: "color 300ms" }}>{m.n}</span>
              <span style={{ fontSize: 12.5, color: "var(--label-tertiary)" }}>{m.k}</span>
            </button>
          );
        })}
      </div>
      <div key={i} style={{ fontSize: 13.5, color: "var(--label-secondary)", minHeight: 38, animation: reduced ? "none" : "nomiFade 0.4s ease" }}>
        {IMPACT[i].d}
      </div>
    </div>
  );
}

/* a tiny toy: pull a design fortune */
const FORTUNES = [
  "Less, but better.",
  "Ship the small thing.",
  "Make it obvious, then make it nice.",
  "The empty state is the first impression.",
  "Motion is meaning, not decoration.",
  "If it needs a tooltip, look again.",
  "Default settings are design decisions.",
  "Whitespace is doing the talking.",
];
function FortuneTile() {
  const [i, setI] = useState(0);
  const [spins, setSpins] = useState(0);
  return (
    <button onClick={function () { setI(function (x) { return (x + 1 + Math.floor(Math.random() * (FORTUNES.length - 1))) % FORTUNES.length; }); setSpins(spins + 1); }}
      className="pf-glass gv-rise gv-lift"
      aria-label="Pull a design fortune"
      style={{ gridColumn: "span 3", gridRow: "span 1", padding: "clamp(18px, 1.6vw, 24px)", display: "flex", flexDirection: "column", justifyContent: "center", textAlign: "left", cursor: "pointer", border: "1px solid var(--pf-border)", color: "inherit", font: "inherit", transitionDelay: "640ms" }}>
      <div className="pf-eyebrow" style={{ marginBottom: 12, fontSize: 11.5, display: "flex", justifyContent: "space-between", alignItems: "center" }}>
        <span>Design fortune</span>
        <i data-lucide="sparkles" style={{ width: 14, height: 14, opacity: 0.55 }} />
      </div>
      <div key={i} style={{ fontSize: 14.5, lineHeight: 1.45, color: "var(--label-primary)", animation: "nomiFade 0.35s ease" }}>
        {FORTUNES[i]}
      </div>
      <div style={{ marginTop: 8, fontSize: 11, color: "var(--label-tertiary)" }}>{spins === 0 ? "tap to pull another" : "pulled " + (spins + 1) + " so far"}</div>
    </button>
  );
}

/* the actual toolbox, quietly */
function ToolboxTile() {
  return (
    <MiniTile label="In the toolbox" delay={680}>
      <div style={{ display: "flex", gap: 6, flexWrap: "wrap" }}>
        {["Figma", "Claude Code", "React", "Principle", "Notion", "Vercel"].map(function (t) {
          return <span key={t} style={{ fontSize: 12, padding: "5px 12px", borderRadius: 999, background: "var(--fill-tertiary)", border: "1px solid var(--pf-hairline)", color: "var(--label-secondary)" }}>{t}</span>;
        })}
      </div>
    </MiniTile>
  );
}

/* A small colorless refraction lens that follows the cursor across
   the whole page (fixed to the viewport). */
function GlobalLens() {
  const reduced = usePrefersReducedMotion();
  const fine = useFinePointer();
  const lensRef = useRef(null);
  const target = useRef({ x: -999, y: -999, on: false });
  const pos = useRef({ x: -999, y: -999 });
  const raf = useRef(0);
  const D = 46;
  useEffect(function () {
    if (reduced || !fine) return;
    function move(e) { target.current.x = e.clientX; target.current.y = e.clientY; target.current.on = true; }
    function leave() { target.current.on = false; }
    window.addEventListener("pointermove", move, { passive: true });
    document.addEventListener("pointerleave", leave);
    // iframes swallow pointermove from the parent; when the pointer enters one,
    // blur fires on window — fade the lens so it doesn't freeze on the embed.
    window.addEventListener("blur", leave);
    function tick() {
      const t = target.current, p = pos.current;
      p.x += (t.x - p.x) * 0.5;
      p.y += (t.y - p.y) * 0.5;
      const lens = lensRef.current;
      if (lens) {
        lens.style.opacity = t.on ? "1" : "0";
        lens.style.transform = "translate(" + (p.x - D / 2) + "px," + (p.y - D / 2) + "px) scale(" + (t.on ? 1 : 0.7) + ")";
      }
      raf.current = requestAnimationFrame(tick);
    }
    raf.current = requestAnimationFrame(tick);
    return function () {
      cancelAnimationFrame(raf.current);
      window.removeEventListener("pointermove", move);
      document.removeEventListener("pointerleave", leave);
      window.removeEventListener("blur", leave);
    };
  }, [reduced, fine]);
  if (reduced || !fine) return null;
  return (
    <div ref={lensRef} aria-hidden="true" style={{
      position: "fixed", left: 0, top: 0, width: D, height: D,
      borderRadius: "50%", pointerEvents: "none", opacity: 0, zIndex: 9000,
      willChange: "transform, opacity", transition: "opacity 300ms var(--glass-ease)",
      WebkitBackdropFilter: "blur(1px) saturate(115%) url(#pf-lens)",
      backdropFilter: "blur(1px) saturate(115%) url(#pf-lens)",
      border: "1px solid var(--pf-border)",
      boxShadow: "inset 0 1px 1px rgba(255,255,255,0.5), inset 0 -4px 9px rgba(0,0,0,0.1), 0 4px 12px rgba(8,18,30,0.16)",
    }} />
  );
}

function Cover(props) {
  const { theme, go } = props;
  const heroRef = useRef(null);
  const [ready, setReady] = useState(false);
  useEffect(function () {
    const t = setTimeout(function () { setReady(true); }, 60);
    return function () { clearTimeout(t); };
  }, []);

  const statement = "I pioneer AI products, then scale what works to millions of people.";
  const HILITE = ["pioneer", "AI", "millions"];

  return (
    <section ref={heroRef} id="home" aria-label="Introduction" data-ready={ready ? "1" : "0"} style={{
      position: "relative", minHeight: "100svh", width: "100%", overflow: "hidden",
      display: "flex", alignItems: "center", padding: "140px 0 72px",
    }}>
      <div className="pf-container" style={{ position: "relative", zIndex: 5 }}>
        <div className="pf-bento gv-hero-bento" style={{ gridAutoRows: "minmax(132px, auto)" }}>

          {/* book next flight (rotating destinations) */}
          <NextTrip />

          {/* role, on rotation */}
          <RolesTile />

          {/* the self-directed AI practice */}
          <a href="https://zeyaai.com" target="_blank" rel="noopener noreferrer"
            className="pf-glass gv-rise gv-lift gv-c-aipractice"
            style={{ gridColumn: "span 3", gridRow: "span 1", padding: "clamp(22px, 2vw, 30px)", display: "flex", flexDirection: "column", justifyContent: "center", textDecoration: "none", color: "inherit", transitionDelay: "140ms" }}>
            <div className="pf-eyebrow" style={{ marginBottom: 14, display: "flex", alignItems: "center", justifyContent: "space-between" }}>
              <span>AI practice</span>
              <i data-lucide="arrow-up-right" style={{ width: 15, height: 15, opacity: 0.6 }} />
            </div>
            <div className="pf-h3" style={{ fontSize: "clamp(18px, 1.5vw, 22px)" }}>ZeyaAI</div>
          </a>

          {/* the statement: what I actually do, not just my name again */}
          <HeroTile col="span 8" row="span 2" delay={180} justify="center" className="pf-glass--thick gv-c-statement" style={{ alignItems: "flex-start", padding: "clamp(30px, 3.4vw, 56px)", gap: 22 }}>
            <h1 aria-label={statement} style={{
              margin: 0, fontSize: "clamp(28px, 3.9vw, 56px)",
              fontWeight: 200, letterSpacing: "-0.005em", lineHeight: 1.12,
              color: "var(--label-secondary)", maxWidth: "20ch",
            }}>
              {statement.split(" ").map(function (w, i) {
                return (
                  <span key={i} className="gv-letter" aria-hidden="true" style={{
                    display: "inline-block", transitionDelay: (220 + i * 46) + "ms",
                    color: HILITE.indexOf(w) >= 0 ? "var(--label-primary)" : undefined,
                  }}>{w}&nbsp;</span>
                );
              })}
            </h1>
            <div className="gv-rise" style={{ display: "flex", alignItems: "center", gap: 12, flexWrap: "wrap", transitionDelay: "620ms" }}>
              <span style={{ fontSize: 15, color: "var(--label-primary)", letterSpacing: "0.01em" }}>Genevieve Liu</span>
              <span aria-hidden="true" style={{ width: 4, height: 4, borderRadius: "50%", background: "var(--label-tertiary)", opacity: 0.6 }} />
              <span style={{ fontSize: 14, color: "var(--label-tertiary)" }}>Senior Product Designer &middot; New York</span>
            </div>
          </HeroTile>

          {/* latest launch + claude code, filling the right rail on wide screens */}
          <LiveLaunch />
          <ClaudeCodeCard />

          {/* intro copy */}
          <HeroTile col="span 8" row="span 2" delay={420} justify="center" label="About" className="gv-c-about">
            <p className="pf-lead" style={{ margin: 0, maxWidth: 680 }}>
              I take the AI risk on myself first: at{" "}
              <span style={{ color: "var(--label-primary)" }}>ZeyaAI</span> I research and build my own products, then
              bring what holds up to <span style={{ color: "var(--label-primary)" }}>Dentsu &times; Subaru</span>, where
              MySubaru serves 2M+ owners.
            </p>
            <p className="pf-body" style={{ margin: "14px 0 0", maxWidth: 680 }}>
              Design at Pratt, architecture at USC, computer science with an AI concentration at UPenn.
            </p>
          </HeroTile>

          {/* CTAs */}
          <HeroTile col="span 4" row="span 2" delay={500} justify="center" className="gv-c-ctas">
            <div style={{ display: "flex", flexDirection: "column", gap: 14 }}>
              <button onClick={function () { go("work"); }} className="pf-btn pf-btn--primary" style={{ justifyContent: "flex-start" }}>
                View Work
              </button>
              <button onClick={function () { go("contact"); }} className="pf-btn" style={{ justifyContent: "space-between" }}>
                Get in Touch
                <i data-lucide="mail" style={{ width: 18, height: 18, opacity: 0.7 }} />
              </button>
            </div>
          </HeroTile>

          {/* what the work actually produced */}
          <ImpactTile />

        </div>
      </div>
    </section>
  );
}

/* ---------- Live animated nomi orb (3D glass sphere, spins + breathes + ripples) ---------- */
function NomiOrb(props) {
  const dark = props.theme !== "light";
  const bg = dark
    ? "radial-gradient(120% 120% at 50% 42%, #202024 0%, #161618 55%, #0e0e10 100%)"
    : "radial-gradient(120% 120% at 50% 42%, #ffffff 0%, #f3f6fa 60%, #e9eef4 100%)";
  const ink = dark ? "rgba(236,238,242,0.92)" : "rgba(20,26,33,0.9)";
  const oInk = dark ? "#5cc0f2" : "#2f97d6";
  return (
    <div className="nomi-orb-stage" role="img" aria-label="nomi" style={{
      width: "100%", height: "100%", minHeight: props.minH || 180,
      display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center",
      gap: "8%", background: bg, overflow: "hidden",
    }}>
      <div className="nomi-orb-wrap" style={{ position: "relative", width: "min(34%, 150px)", aspectRatio: "1 / 1" }}>
        <span className="nomi-orb-halo" aria-hidden="true" />
        <span className="nomi-orb" aria-hidden="true">
          <span className="nomi-orb-body" />
          <span className="nomi-orb-swirl" />
          <span className="nomi-orb-spec" />
        </span>
      </div>
      <div className="nomi-orb-word" aria-hidden="true" style={{ color: ink }}>
        n<span style={{ color: oInk }}>o</span>mi
      </div>
    </div>
  );
}

Object.assign(window, { Cover: Cover, PageBackground: PageBackground, GlobalLens: GlobalLens, NomiOrb: NomiOrb, usePrefersReducedMotion: usePrefersReducedMotion });
