function AimsNav({ base = "" }) {
  const [open, setOpen] = React.useState(false);
  const links = [
    ["Physician Research", base + "services/physician-research.html", true],
    ["Medical Evidence", base + "services/medical-evidence.html"],
    ["Medical Communications", base + "services/medical-communications.html"],
    ["Physician Engagement", base + "services/physician-engagement.html"],
    ["AI Products", base + "services/ai-products.html"],
  ];
  return (
    <nav style={{ position: "sticky", top: 0, zIndex: 50, background: "var(--bg-1)", borderBottom: "1px solid var(--border-1)" }}>
      <div style={{ maxWidth: 1200, margin: "0 auto", padding: "14px 24px", display: "flex", alignItems: "center", justifyContent: "space-between", gap: 16 }}>
        <a href={base + "index.html"} style={{ textDecoration: "none", display: "flex", alignItems: "center" }}>
          <img src={base + "assets/logo/aims-logo.png"} alt="AI Medical Science — medsci.ai" style={{ height: 30, width: "auto", display: "block" }} />
        </a>
        <div className="aims-nav-links" style={{ display: "flex", alignItems: "center", gap: 20 }}>
          {links.map(([t, h, lead]) => (
            <a key={t} href={h} style={{ textDecoration: "none", fontSize: 14, color: lead ? "var(--brand-accent-700)" : "var(--fg-2)", fontWeight: lead ? 600 : 500 }}>{t}</a>
          ))}
          <a href={base + "contact.html"} style={{ textDecoration: "none", fontSize: 14, fontWeight: 600, color: "var(--white)", background: "var(--brand-primary-700)", padding: "8px 18px", borderRadius: 6 }}>Contact</a>
        </div>
        <button className="aims-nav-toggle" onClick={() => setOpen(!open)} aria-label="Menu" style={{ display: "none", background: "none", border: "1px solid var(--border-2)", borderRadius: 6, padding: 6 }}>
          <i data-lucide="menu" style={{ width: 20, height: 20 }}></i>
        </button>
      </div>
      {open && (
        <div style={{ padding: "8px 24px 16px", display: "flex", flexDirection: "column", gap: 12, borderTop: "1px solid var(--border-1)" }}>
          {links.concat([["Contact", base + "contact.html"]]).map(([t, h]) => (
            <a key={t} href={h} style={{ textDecoration: "none", fontSize: 15, color: "var(--fg-1)" }}>{t}</a>
          ))}
        </div>
      )}
    </nav>
  );
}
