// ==== Writing + Now ==================================================

const WRITING = [
  { type: "Series", title: "From prototype to production on the OpenAI platform", excerpt: "Canonical patterns for startups scaling Agents SDK + Responses API: RAG, multi-tool agents, structured outputs evals, Realtime voice agents.", read: "8 parts · in progress" },
  { type: "Essay", title: "The Lethal Trifecta — a one-page agent safety rule that actually works", excerpt: "Untrusted input + credentials + mutation power in the same context is the failure mode. Here is the field-tested mitigation.", read: "9 min" },
  { type: "Case study", title: "An enterprise MCP gateway, written down", excerpt: "Seven layers of defense, 130+ AI-callable tools, per-session credential isolation. What we built, what we threw away, and why.", read: "14 min" },
  { type: "Paper", title: "Autonomous Adversarial Threat Detection Agent", excerpt: "NullCon AI Paper of the Year, BSides Bangalore 2025. The detection-stack architecture behind MANTIS.", read: "DOI" },
  { type: "Talk", title: "Why agent governance is not red-teaming", excerpt: "Pre-deployment red-teaming and runtime governance are different disciplines. AEGIS lives between them.", read: "Coming soon" },
  { type: "Notes", title: "Agentic Identity Framework — open-sourcing the actor model", excerpt: "Three-category model (human / workload / agent), per-agent Entra Workload Identity, 15-min JIT credentials.", read: "Draft" },
];

function Writing() {
  return (
    <section id="writing" className="scene" data-screen-label="14 Writing">
      <div className="scene-head">
        <div className="eyebrow">Writing</div>
        <h2><em>Notes</em> from the runtime.</h2>
          <p className="lede">Short, technical, opinion-shaped. Mostly about agents in production.</p>
      </div>

      <div className="writing-grid">
        {WRITING.map((w, i) => (
          <div key={i} className="writing-card">
            <div className="type">{w.type}</div>
            <h5>{w.title}</h5>
            <p className="excerpt">{w.excerpt}</p>
            <div className="foot"><span>{w.read}</span><span style={{color:"var(--mint)"}}>read →</span></div>
          </div>
        ))}
      </div>
    </section>
  );
}

function Now() {
  return (
    <section id="now" className="scene short" data-screen-label="15 Now">
      <div className="scene-head">
        <div className="eyebrow">Today</div>
        <h2><em>Now.</em></h2>
      </div>

      <div className="now-card">
        <div className="mono muted" style={{fontSize: 11, letterSpacing: ".18em", textTransform:"uppercase"}}>last updated · {new Date().toLocaleString("en-IN", { month: "short", year: "numeric" })}</div>
        <h3>Shipping the runtime layer agents need to be real.</h3>
        <div className="now-list">
          <div className="now-item"><span className="b">›</span><span className="t"><b style={{color:"var(--ink)"}}>AEGIS</b> — open-source runtime governance for AI agents. Behavioral fingerprinting, NHI lifecycle, decision flight recorder. Architecting v0.</span></div>
          <div className="now-item"><span className="b">›</span><span className="t"><b style={{color:"var(--ink)"}}>AgentBridge</b> — OpenAI Agents SDK × MCP reference. Eval harness + OTel + guardrails distilled from the org rollout.</span></div>
          <div className="now-item"><span className="b">›</span><span className="t"><b style={{color:"var(--ink)"}}>MANTIS v2</b> — federated TI with stronger differential privacy, AI self-defense, Detection-as-Code analyst loop.</span></div>
          <div className="now-item"><span className="b">›</span><span className="t"><b style={{color:"var(--ink)"}}>Writing</b> — a series for AI-startup founders on getting to production safely on Claude / OpenAI / Anthropic platforms.</span></div>
          <div className="now-item"><span className="b">›</span><span className="t"><b style={{color:"var(--ink)"}}>Open to</b> — interesting conversations: AI labs, security teams, founders who want to ship agentic products without getting paged at 3am.</span></div>
        </div>
      </div>
    </section>
  );
}

Object.assign(window, { Writing, Now });
