(function () {
// Personal portfolio — Professional Work card. Inert "coming soon" state while
// draft; clickable once published. Mirrors GameCard's visual shell (border,
// radius, shadow, hover-lift) by hand rather than importing it — GameCard ships
// through the compiled _ds_bundle.js, and this repo has no visible build step
// to add a new component into that bundle.

// Corner badge, not a straddling one — unlike PublishedWork's cards, there's no
// cover image/footer seam here to peek out of, just the card's own padding.
function CaseStudyLogo({
  company,
  onFilter
}) {
  const logo = (window.COMPANY_LOGOS || {})[company];
  if (!logo) return null;
  return /*#__PURE__*/React.createElement("button", {
    type: "button",
    "aria-label": "Filter by " + company,
    onClick: e => {
      e.stopPropagation();
      onFilter(company);
    },
    style: {
      position: "absolute",
      right: 16,
      bottom: 16,
      zIndex: 1,
      display: "inline-flex",
      alignItems: "center",
      justifyContent: "center",
      width: 36,
      height: 36,
      borderRadius: "50%",
      padding: 6,
      background: "radial-gradient(circle at 35% 30%, #ffffff 0%, #e9edf2 100%)",
      boxShadow: "var(--shadow-sm), 0 0 0 1px rgba(0,0,0,0.06)",
      border: "none",
      cursor: "pointer"
    }
  }, /*#__PURE__*/React.createElement("img", {
    src: logo,
    alt: company + " logo",
    loading: "lazy",
    style: {
      width: "100%",
      height: "100%",
      objectFit: "contain",
      display: "block",
      pointerEvents: "none"
    }
  }));
}

// See PublishedWork.jsx's HoverGlow / tokens/colors.css's --card-hover-glow
// for the full rationale — same value, mirrored by hand rather than shared as
// a component (matches this file's existing convention, see top-of-file note).
function CaseStudyGlow({
  visible
}) {
  return /*#__PURE__*/React.createElement("div", {
    "aria-hidden": "true",
    style: {
      position: "absolute",
      inset: 0,
      zIndex: 0,
      pointerEvents: "none",
      borderRadius: "var(--radius-lg)",
      boxShadow: "var(--card-hover-glow)",
      border: "1px solid var(--accent-line)",
      opacity: visible ? 1 : 0,
      transition: "opacity var(--dur-base) var(--ease-out)"
    }
  });
}
function CaseStudyCard({
  cs,
  onOpen,
  onFilter
}) {
  const published = cs.status === "published" && !!cs.hook;
  const [hover, setHover] = React.useState(false);
  return /*#__PURE__*/React.createElement("div", {
    id: "case-study-" + cs.id,
    onClick: published ? () => onOpen(cs.id) : undefined,
    onMouseEnter: () => {
      setHover(true);
      window.FT_CARD_HOVERED = true;
    },
    onMouseLeave: () => {
      setHover(false);
      window.FT_CARD_HOVERED = false;
    },
    style: {
      position: "relative",
      display: "flex",
      flexDirection: "column",
      gap: 14,
      background: "var(--surface-card)",
      border: `1px solid ${published && hover ? "var(--border-strong)" : "var(--border)"}`,
      borderRadius: "var(--radius-lg)",
      padding: "20px 20px 18px",
      cursor: published ? "pointer" : "default",
      transform: published && hover ? "translateY(-4px)" : "translateY(0)",
      boxShadow: published && hover ? "var(--shadow-lg)" : "var(--shadow-sm)",
      transition: "transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out)",
      scrollMarginTop: 96
    }
  }, /*#__PURE__*/React.createElement(CaseStudyGlow, {
    visible: published && hover
  }), /*#__PURE__*/React.createElement("div", {
    style: {
      display: "flex",
      justifyContent: "space-between",
      alignItems: "center",
      gap: 12
    }
  }, /*#__PURE__*/React.createElement("span", {
    style: {
      fontFamily: "var(--font-mono)",
      fontSize: 13,
      letterSpacing: "0.1em",
      textTransform: "uppercase",
      padding: "4px 10px",
      borderRadius: "var(--radius-pill)",
      border: "1px solid var(--border-strong)",
      color: published ? "var(--accent)" : "var(--text-faint)",
      whiteSpace: "nowrap"
    }
  }, published ? "Case study" : "Coming soon"), /*#__PURE__*/React.createElement("span", {
    style: {
      fontFamily: "var(--font-mono)",
      fontSize: 13,
      color: "var(--text-faint)",
      whiteSpace: "nowrap"
    }
  }, cs.dates)), /*#__PURE__*/React.createElement("h3", {
    style: {
      margin: 0,
      fontFamily: "var(--font-display)",
      fontWeight: 600,
      fontSize: 26,
      lineHeight: 1.15,
      letterSpacing: "-0.01em",
      color: "var(--text-strong)",
      textWrap: "balance"
    }
  }, cs.title), /*#__PURE__*/React.createElement("div", {
    style: {
      fontFamily: "var(--font-sans)",
      fontSize: 17,
      color: "var(--text-muted)"
    }
  }, cs.role), published && /*#__PURE__*/React.createElement("span", {
    style: {
      fontFamily: "var(--font-mono)",
      fontSize: 14,
      letterSpacing: "0.04em",
      color: "var(--accent)",
      display: "inline-flex",
      alignItems: "center",
      gap: 4
    }
  }, /*#__PURE__*/React.createElement("span", {
    style: {
      backgroundImage: "linear-gradient(currentColor, currentColor)",
      backgroundPosition: "0 100%",
      backgroundRepeat: "no-repeat",
      backgroundSize: hover ? "100% 1px" : "0% 1px",
      transition: "background-size var(--dur-base) var(--ease-out)",
      paddingBottom: 1
    }
  }, "Read"), /*#__PURE__*/React.createElement("span", {
    "aria-hidden": "true"
  }, "\u2192")), /*#__PURE__*/React.createElement(CaseStudyLogo, {
    company: cs.company,
    onFilter: onFilter
  }));
}
window.CaseStudyCard = CaseStudyCard;
})();
