{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "portfolio-14",
  "type": "registry:block",
  "description": "Photographer square grid with hover captions that opens a full-screen keyboard-navigable lightbox.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/portfolio/portfolio-14.tsx",
      "content": "\"use client\"\n\nimport { useEffect, useState } from \"react\"\nimport { ChevronLeft, ChevronRight, X } from \"@designali/icons\"\n\nimport { Button } from \"@workspace/ui/components/button\"\n\nconst photos = [\n  {\n    title: \"Chromatic spheres\",\n    series: \"CGI\",\n    camera: \"Designali · Ali Imam\",\n    background: \"url(/img/ask/ask1.jpg) center / cover\",\n  },\n  {\n    title: \"Liquid glass\",\n    series: \"3D\",\n    camera: \"Designali · Ali Imam\",\n    background: \"url(/img/ask/ask2.jpg) center / cover\",\n  },\n  {\n    title: \"Soft gradients\",\n    series: \"Abstract\",\n    camera: \"Designali · Ali Imam\",\n    background: \"url(/img/ask/ask3.jpg) center / cover\",\n  },\n  {\n    title: \"Fluid motion\",\n    series: \"Motion\",\n    camera: \"Designali · Ali Imam\",\n    background: \"url(/img/ask/ask4.jpg) center / cover\",\n  },\n  {\n    title: \"Studio light\",\n    series: \"3D\",\n    camera: \"Designali · Ali Imam\",\n    background: \"url(/img/ask/ask5.jpg) center / cover\",\n  },\n  {\n    title: \"Form study\",\n    series: \"Abstract\",\n    camera: \"Designali · Ali Imam\",\n    background: \"url(/img/ask/ask6.jpg) center / cover\",\n  },\n  {\n    title: \"Colour field\",\n    series: \"CGI\",\n    camera: \"Designali · Ali Imam\",\n    background: \"url(/img/ask/ask7.jpg) center / cover\",\n  },\n  {\n    title: \"Design se code tak\",\n    series: \"Poster\",\n    camera: \"Designali · Ali Imam\",\n    background: \"url(/img/ask/ask8.jpg) center / cover\",\n  },\n  {\n    title: \"Night render\",\n    series: \"CGI\",\n    camera: \"Designali · Ali Imam\",\n    background: \"url(/img/ask/ask9.jpg) center / cover\",\n  },\n]\n\nexport default function Portfolio14() {\n  const [open, setOpen] = useState<number | null>(null)\n  const current = open === null ? null : photos[open]\n\n  useEffect(() => {\n    if (open === null) return\n    const step = (dir: number) =>\n      setOpen((i) =>\n        i === null ? i : (i + dir + photos.length) % photos.length\n      )\n    const onKey = (e: KeyboardEvent) => {\n      if (e.key === \"Escape\") setOpen(null)\n      if (e.key === \"ArrowRight\") step(1)\n      if (e.key === \"ArrowLeft\") step(-1)\n    }\n    window.addEventListener(\"keydown\", onKey)\n    return () => window.removeEventListener(\"keydown\", onKey)\n  }, [open])\n\n  const step = (dir: number) =>\n    setOpen((i) => (i === null ? i : (i + dir + photos.length) % photos.length))\n\n  return (\n    <section className=\"w-full bg-background py-16 text-foreground md:py-24\">\n      <div className=\"mx-auto max-w-6xl px-6\">\n        <div className=\"flex flex-col justify-between gap-4 sm:flex-row sm:items-end\">\n          <div>\n            <h2 className=\"text-3xl font-medium tracking-tight md:text-5xl\">\n              Ali Imam — Visuals\n            </h2>\n            <p className=\"mt-2 text-muted-foreground\">\n              CGI, 3D and digital artwork from the Designali studio.\n            </p>\n          </div>\n          <p className=\"font-sans text-xs text-muted-foreground\">\n            {photos.length} frames · Designali\n          </p>\n        </div>\n\n        <div className=\"mt-10 grid grid-cols-2 gap-2 md:grid-cols-3 md:gap-3\">\n          {photos.map((photo, i) => (\n            <button\n              key={photo.title}\n              type=\"button\"\n              onClick={() => setOpen(i)}\n              className=\"group relative aspect-square overflow-hidden text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n              aria-label={`Open ${photo.title}`}\n            >\n              <div\n                className=\"absolute inset-0 transition-transform duration-500 group-hover:scale-105\"\n                style={{ background: photo.background }}\n              />\n              <div className=\"absolute inset-0 flex items-end bg-black/0 p-3 transition-colors group-hover:bg-black/30\">\n                <span className=\"translate-y-2 text-sm font-medium text-white opacity-0 transition-all group-hover:translate-y-0 group-hover:opacity-100\">\n                  {photo.title}\n                </span>\n              </div>\n            </button>\n          ))}\n        </div>\n      </div>\n\n      {current && open !== null && (\n        <div\n          role=\"dialog\"\n          aria-modal=\"true\"\n          aria-label={current.title}\n          className=\"fixed inset-0 z-50 flex flex-col bg-background/95 backdrop-blur\"\n        >\n          <div className=\"flex items-center justify-between px-6 py-4\">\n            <span className=\"font-sans text-xs text-muted-foreground\">\n              {open + 1} / {photos.length}\n            </span>\n            <Button\n              variant=\"ghost\"\n              size=\"icon-lg\"\n              aria-label=\"Close\"\n              onClick={() => setOpen(null)}\n            >\n              <X />\n            </Button>\n          </div>\n          <div className=\"flex min-h-0 flex-1 items-center gap-2 px-2 md:gap-6 md:px-6\">\n            <Button\n              variant=\"outline\"\n              size=\"icon-lg\"\n              aria-label=\"Previous photo\"\n              onClick={() => step(-1)}\n            >\n              <ChevronLeft />\n            </Button>\n            <div\n              className=\"mx-auto aspect-[4/3] max-h-full w-full max-w-4xl\"\n              style={{ background: current.background }}\n            />\n            <Button\n              variant=\"outline\"\n              size=\"icon-lg\"\n              aria-label=\"Next photo\"\n              onClick={() => step(1)}\n            >\n              <ChevronRight />\n            </Button>\n          </div>\n          <div className=\"px-6 py-6 text-center\">\n            <p className=\"font-medium\">{current.title}</p>\n            <p className=\"mt-1 text-xs text-muted-foreground\">\n              {current.series} · {current.camera}\n            </p>\n          </div>\n        </div>\n      )}\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "1000px"
  },
  "categories": [
    "portfolio"
  ]
}