import{j as e}from"./vendor-query-DoyCFZ4O.js";import{r as i}from"./vendor-react-Rhy2aEWQ.js";import{u as m,d as p,S as h}from"./index-CwDwxmPI.js";import{m as r}from"./vendor-motion-D3eh3-LB.js";import{az as g}from"./vendor-utils-BOMyae96.js";function y(){const{t}=m("portfolio"),[l,n]=i.useState([]),[c,o]=i.useState(!0);i.useEffect(()=>{p.get("/public/portfolio").then(a=>{n(a.data),o(!1)}).catch(()=>o(!1))},[]);const x=a=>{if(!a)return[];try{return JSON.parse(a)}catch{return a.split(",").map(s=>s.trim())}};return e.jsxs("div",{className:"min-h-screen bg-white pt-20",children:[e.jsx(h,{title:t("portfolio.title"),description:t("portfolio.description"),canonical:"/portfolio"}),e.jsx("section",{className:"py-24 bg-gradient-to-b from-dark-50 to-white",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[e.jsx(r.span,{initial:{opacity:0},animate:{opacity:1},className:"text-sm font-semibold text-primary-600 uppercase tracking-wider",children:t("hero.badge")}),e.jsxs(r.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mt-3 text-5xl font-bold text-dark-900",children:[t("hero.heading")," ",e.jsx("span",{className:"gradient-text",children:t("hero.headingHighlight")})]}),e.jsx(r.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"mt-4 text-xl text-dark-500 max-w-2xl mx-auto",children:t("hero.description")})]})}),e.jsx("section",{className:"py-16",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:c?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3,4,5,6].map(a=>e.jsxs("div",{className:"bg-white rounded-2xl border border-dark-100 overflow-hidden animate-pulse",children:[e.jsx("div",{className:"aspect-[4/3] bg-dark-100"}),e.jsxs("div",{className:"p-6 space-y-3",children:[e.jsx("div",{className:"h-3 bg-dark-100 rounded w-1/4"}),e.jsx("div",{className:"h-5 bg-dark-100 rounded w-2/3"}),e.jsx("div",{className:"flex gap-2",children:[1,2,3].map(s=>e.jsx("div",{className:"h-6 bg-dark-50 rounded-lg w-16"},s))})]})]},a))}):l.length===0?e.jsx("div",{className:"text-center py-16",children:e.jsx("p",{className:"text-xl text-dark-400",children:t("emptyState")})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:l.map((a,s)=>e.jsxs(r.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:s*.05},className:"group bg-white rounded-2xl border border-dark-100 overflow-hidden hover:shadow-xl transition-all duration-300",children:[e.jsxs("div",{className:"relative aspect-[4/3] bg-dark-100 overflow-hidden",children:[a.thumbnail_url?e.jsx("img",{src:a.thumbnail_url,alt:a.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-dark-300",children:e.jsx("span",{className:"text-4xl font-bold",children:a.title.charAt(0)})}),a.live_url&&e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-dark-900/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-end p-6",children:e.jsx("a",{href:a.live_url,target:"_blank",rel:"noopener noreferrer",className:"text-white",children:e.jsx(g,{className:"w-5 h-5"})})})]}),e.jsxs("div",{className:"p-6",children:[e.jsx("span",{className:"text-xs font-medium text-primary-600 uppercase tracking-wider",children:a.status.replace("_"," ")}),e.jsx("h3",{className:"mt-2 text-xl font-bold text-dark-900 group-hover:text-primary-600 transition-colors",children:a.title}),e.jsx("p",{className:"mt-1 text-sm text-dark-500 line-clamp-2",children:a.description}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:x(a.technologies).map(d=>e.jsx("span",{className:"px-2.5 py-1 bg-dark-50 text-dark-600 text-xs font-medium rounded-lg",children:d},d))})]})]},a.id))})})})]})}export{y as default};