/* ============================================================
   OMNIO — shared data + utilities for blog / post / contact pages
   ============================================================ */

const POSTS = [
  {
    slug: "cubit-diagnostics-closes-its-latest-safe-financing-round",
    date: "May 7, 2026",
    dateShort: "05 · 07 · 26",
    category: "Funding",
    title: "Cubit Diagnostics closes its latest SAFE financing round",
    excerpt:
      "Cubit Diagnostics has closed its latest round of SAFE (Simple Agreement for Future Equity) financing. The proceeds will fund the company's next phase of work — centered on design freeze for its molecular CT/NG/TV assay and expanding the immunoassay program.",
    body: [
      { type: "p", text: "CARLSBAD, Calif. — Cubit Diagnostics today announced it has closed its latest round of SAFE (Simple Agreement for Future Equity) financing. The proceeds will fund the company's next phase of work, centered on locking in design freeze for its molecular CT/NG/TV assay and expanding its immunoassay program." },
      { type: "p", text: "The company is on track and anticipates achieving design freeze of its CT/NG/TV molecular assay in Q4 2026, which sets up a clinical study in the first half of 2027. On the immunoassay side, the company has made meaningful progress to date and continues to hit key milestones across its initiatives." },
      { type: "p", text: "The financing follows the recent strengthening of the company's board of directors, adding experienced leadership across diagnostics, regulatory, and commercial functions." },
      { type: "pull", text: "We have the right team, a clear path forward, and the capital to achieve the next key milestones.", who: "Kunal Sur", role: "CEO, Cubit Diagnostics" },
      { type: "p", text: "\u201CGetting to design freeze on CT/NG/TV this year and into a clinical study in 2027 is what this phase is about. We're also making real progress on the immunoassay side, which will give us the runway to expand the menu quickly,\u201D said Sur." },
      { type: "p", text: "\u201CPutting molecular and immunoassay into one platform is novel and compelling, and we're incredibly excited about the progress we continue to make,\u201D added Sur. \u201CLocking the CT/NG/TV design and getting into a clinical study next year is a key priority.\u201D" },
    ],
    accent: "magenta",
  },
  {
    slug: "cubitdx-appoints-robert-bujarski-and-mark-paiz-to-board-of-directors",
    date: "April 16, 2026",
    dateShort: "04 · 16 · 26",
    category: "Team",
    title: "CubitDx appoints Robert Bujarski and Mark Paiz to Board of Directors",
    excerpt:
      "CubitDx announced the appointment of Robert Bujarski and Mark Paiz to its Board of Directors — bringing deep experience across diagnostics, operations, and commercialization to support the company's next stage of growth.",
    body: [
      { type: "p", text: "CARLSBAD, Calif. — CubitDx today announced the appointment of two new members to its Board of Directors: Robert Bujarski, a long-time commercial leader in the diagnostics industry, and Mark Paiz, a senior operations executive with extensive experience scaling diagnostic platforms from development through commercial launch." },
      { type: "p", text: "Both directors join at a pivotal moment for the company, as it advances design freeze of its first molecular assay and continues to build out its multimodal point-of-care platform." },
      { type: "pull", text: "Cubit is addressing a set of challenges that anyone who has operated in diagnostics will immediately recognize.", who: "Robert Bujarski", role: "Board Member" },
      { type: "p", text: "\u201CWhat stands out to me is the team's focus on building something practical and scalable, while also innovative,\u201D said Bujarski." },
      { type: "p", text: "\u201CThe innovation is clear, but what really matters at this stage is the discipline in driving it forward,\u201D added Paiz. \u201CI believe in the people leading this effort and the vision they are advancing.\u201D" },
    ],
    accent: "teal",
  },
  {
    slug: "cubitdx-secures-2-6-million-nih-radx-award-to-accelerate-diagnostic-innovations",
    date: "August 26, 2025",
    dateShort: "08 · 26 · 25",
    category: "Funding",
    title: "Cubit Diagnostics secures $2.6M in NIH RADx\u00AE Tech funding",
    excerpt:
      "Cubit Diagnostics was awarded $2.6 million through the National Institutes of Health (NIH) RADx\u00AE (Rapid Acceleration of Diagnostics) Tech program — a significant milestone in its mission to revolutionize point-of-care diagnostics with lab-level sensitivity and unmatched affordability.",
    body: [
      { type: "p", text: "CARLSBAD, Calif. — Cubit Diagnostics is proud to announce that it was awarded $2.6 million through the National Institutes of Health (NIH) RADx\u00AE (Rapid Acceleration of Diagnostics) Tech program on December 2, 2024, marking a significant milestone in its mission to revolutionize point-of-care diagnostics with lab-level sensitivity and unmatched affordability." },
      { type: "p", text: "The award supports the development of a next-generation, multimodal diagnostic platform capable of running both molecular and immunoassay-based tests on a single system — a foundation designed to expand clinical reach while simplifying operations at the point of care." },
      { type: "p", text: "RADx Tech accelerates promising diagnostic technologies through rigorous engineering, clinical, and commercial review. Cubit's selection reflects continued recognition of the technical novelty and clinical relevance of a unified, multimodal point-of-care system." },
      { type: "pull", text: "Lab-level sensitivity, low cost, and a workflow that fits into real clinical environments.", who: "Cubit Diagnostics" },
    ],
    accent: "magenta",
  },
];

window.POSTS = POSTS;

/* ---------- Page-top hero ---------- */
function PageHero({ eyebrow, title, lede, accent = "magenta" }) {
  return (
    <section className="section dense" style={{ paddingTop: 80, paddingBottom: 60, borderBottom: "1px solid var(--line)" }}>
      <div className="container">
        <div style={{ display: "flex", alignItems: "center", gap: 12, marginBottom: 36 }}>
          <span className={"eyebrow" + (accent === "teal" ? " teal" : "")}>{eyebrow}</span>
        </div>
        <h1 className="display-xl" style={{ maxWidth: "16ch" }}>
          {title}
        </h1>
        {lede && (
          <p className="lede" style={{ marginTop: 40, maxWidth: "54ch" }}>
            {lede}
          </p>
        )}
      </div>
    </section>
  );
}

/* ---------- Placeholder image band (striped) ---------- */
function ImagePlaceholder({ label, aspect = "16/9", dark = false, height }) {
  const bg = dark ? "var(--ink-2)" : "var(--cream-2)";
  const fg = dark ? "rgba(245,239,231,0.55)" : "var(--ink-mute)";
  const lineColor = dark ? "rgba(245,239,231,0.06)" : "rgba(48,53,75,0.06)";
  return (
    <div style={{
      width: "100%",
      aspectRatio: height ? undefined : aspect,
      height: height || undefined,
      background: bg,
      backgroundImage: `repeating-linear-gradient(135deg, transparent 0 14px, ${lineColor} 14px 15px)`,
      position: "relative",
      overflow: "hidden",
      border: dark ? "none" : "1px solid var(--line)"
    }}>
      <div style={{ position: "absolute", left: 18, top: 16, fontFamily: "var(--mono)", fontWeight: 200, fontSize: 10, letterSpacing: "0.18em", textTransform: "uppercase", color: fg }}>
        IMG · {label}
      </div>
      <div style={{ position: "absolute", right: 18, bottom: 16, fontFamily: "var(--mono)", fontWeight: 200, fontSize: 10, letterSpacing: "0.18em", textTransform: "uppercase", color: fg, display: "flex", alignItems: "center", gap: 8 }}>
        <span style={{ width: 5, height: 5, borderRadius: "50%", background: "var(--magenta)" }} />
        Placeholder
      </div>
    </div>
  );
}

Object.assign(window, { POSTS, PageHero, ImagePlaceholder });
