Make a comprehensive ppt based on this word document. Make it 30 slides. If needed, add relevant research, and visual cues and relevant photographs. Make it appropriate for residents of pharmacology. Make it pastel colour themed.

Reading File
Reading File
Reading File
Reading File
Running Command

cd /home/daytona/workspace/attachments/7d6c560b-f944-4ffc-b28d-ecb2ef45a704 && pandoc --track-changes=all INTRODUCTIO1.docx -o output.md && cat output.md

Searching Images

history of pharmacology timeline drugs medicine

Searching Images

Ebers Papyrus ancient Egyptian medicine scroll

Searching Images

Alexander Fleming penicillin discovery antibiotic

Searching Images

CRISPR gene editing molecular biology

Searching Images

drug receptor interaction pharmacodynamics mechanism

Searching Images

monoclonal antibody therapy cancer treatment biotechnology

Searching Images

pharmacokinetics absorption distribution metabolism excretion ADME diagram

Running Command

mkdir -p /home/daytona/workspace/pharmacology-ppt && ls /home/daytona/workspace/

Writing File

~/pharmacology-ppt/build_ppt.js

const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");

// ─── Pastel Palette ───────────────────────────────────────────────────────────
const C = {
  lavender:   "E8E0F0",   // slide bg primary
  mint:       "D6F0E8",   // slide bg alt
  blush:      "FAE0E4",   // slide bg alt 2
  sky:        "D6EAF8",   // slide bg alt 3
  cream:      "FFF8F0",   // slide bg alt 4
  lilacDeep:  "7B5EA7",   // heading text
  teal:       "2E7D6B",   // accent / subheading
  rose:       "C0485A",   // accent warm
  navy:       "2C3E6E",   // body text
  white:      "FFFFFF",
  lightPurp:  "C5B3D9",   // decorative
  lightMint:  "A8D8C8",   // decorative
  charcoal:   "3D3D3D",
};

// Cycle backgrounds
const BG = [C.lavender, C.mint, C.blush, C.sky, C.cream];

function bg(i) { return BG[i % BG.length]; }

// ─── Fetch images as base64 ───────────────────────────────────────────────────
const IMG_URLS = {
  crispr:      "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_46138590e460fdca7eb316ba92472bb719ea4a4220a6e9e3716e928ed7bec887.jpg",
  pkDiagram:   "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_53077b32a67d831286f9b6c9c0bc3099f503bffd6235816a219ab5384b474e1d.jpg",
  adcMab:      "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_36da673567b46aadd2c2c2362cab57bcf3bd68e56bc447d8eeefac92e6e22c.jpg",
  tamoxifen:   "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_8709da27736bc850b45acf4b02c7e94deb9c7c7eef44ac9f7a25cdb45fb7d416.jpg",
  receptor:    "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_797c537bb5a5bb9e6be56a60a8a740fcf12da9b8f58ae3e19fa8f1bb2edfdddc.jpg",
  mabStruct:   "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_9bf21a3ac51c8d947ac5d0e52e16f8abab237e81f791003a89a76ddadcefcc09.jpg",
  cancerImmuno:"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_8d3d0d34708fa276dcdadb6c0bbf6bc3d01526dbf186ff656c9296834b509cc1.jpg",
};

let images = {};
try {
  const fetched = JSON.parse(execSync(
    `node /home/daytona/skills/shared/scripts/fetch_images.js ` +
    Object.values(IMG_URLS).map(u => `"${u}"`).join(" ")
  ).toString());
  Object.keys(IMG_URLS).forEach((key, i) => {
    if (fetched[i] && !fetched[i].error) images[key] = fetched[i].base64;
  });
  console.log("Images fetched:", Object.keys(images).length);
} catch(e) {
  console.error("Image fetch error:", e.message);
}

// ─── Helper: draw decorative corner accent ────────────────────────────────────
function addCornerAccent(slide, color1, color2) {
  // top-left triangle-ish accent
  slide.addShape("rect", { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: color1, transparency: 70 }, line: { color: color1, transparency: 70 } });
  slide.addShape("rect", { x: 9.88, y: 0, w: 0.12, h: 5.625, fill: { color: color2, transparency: 70 }, line: { color: color2, transparency: 70 } });
}

// Helper: section header bar
function addHeaderBar(slide, title, bgColor) {
  slide.addShape("rect", { x: 0, y: 0, w: 10, h: 1.0, fill: { color: bgColor }, line: { color: bgColor } });
  slide.addText(title, {
    x: 0.3, y: 0.1, w: 9.4, h: 0.8,
    fontSize: 22, bold: true, color: C.white,
    fontFace: "Calibri", valign: "middle"
  });
}

// Helper: add a timeline dot
function timelineDot(slide, x, y, color) {
  slide.addShape("ellipse", { x: x-0.12, y: y-0.12, w: 0.24, h: 0.24, fill: { color: color }, line: { color: C.white } });
}

// ─── Build Presentation ───────────────────────────────────────────────────────
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title   = "Introduction to Pharmacology";
pres.author  = "Pharmacology Department";

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — Title Slide
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.lavender };
  // Large decorative circle
  s.addShape("ellipse", { x: 6.8, y: -0.8, w: 4.5, h: 4.5, fill: { color: C.lightPurp, transparency: 50 }, line: { color: C.lightPurp, transparency: 50 } });
  s.addShape("ellipse", { x: -0.8, y: 2.5, w: 3.0, h: 3.0, fill: { color: C.lightMint, transparency: 55 }, line: { color: C.lightMint, transparency: 55 } });
  // Thin accent line
  s.addShape("rect", { x: 0.5, y: 2.6, w: 5.2, h: 0.04, fill: { color: C.lilacDeep }, line: { color: C.lilacDeep } });
  // Tag
  s.addText("PHARMACOLOGY RESIDENCY SERIES", {
    x: 0.5, y: 1.4, w: 8, h: 0.35,
    fontSize: 10, bold: true, color: C.teal, charSpacing: 4, fontFace: "Calibri"
  });
  // Main title
  s.addText("Introduction to\nPharmacology", {
    x: 0.5, y: 1.75, w: 8.5, h: 1.6,
    fontSize: 40, bold: true, color: C.lilacDeep, fontFace: "Calibri"
  });
  s.addText("History · Definitions · Key Milestones · Modern Advances", {
    x: 0.5, y: 3.4, w: 8.5, h: 0.5,
    fontSize: 15, color: C.navy, fontFace: "Calibri", italic: true
  });
  s.addText("For Pharmacology Residents", {
    x: 0.5, y: 4.9, w: 9, h: 0.4,
    fontSize: 11, color: C.charcoal, fontFace: "Calibri"
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — Table of Contents
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.mint };
  addCornerAccent(s, C.teal, C.lightMint);
  addHeaderBar(s, "Session Overview", C.teal);

  const sections = [
    ["01", "What is Pharmacology?", "Definitions & Core Branches"],
    ["02", "Ancient Foundations", "Egypt, Ayurveda, TCM, Greece"],
    ["03", "Early Scientific Era", "17th–18th Century Breakthroughs"],
    ["04", "Academic Foundation", "Buchheim, Schmiedeberg & Beyond"],
    ["05", "Evolution of Modern Pharmacology", "Magic Bullet · Antibiotics · Receptor Theory"],
    ["06", "Biotech & Personalized Medicine", "CRISPR · mAbs · AI Drug Discovery"],
    ["07", "Challenges & Future", "AMR · Ethics · Precision Therapeutics"],
    ["08", "Summary & Conclusion", "Key Takeaways"],
  ];

  sections.forEach(([num, title, sub], i) => {
    const col = i < 4 ? 0 : 1;
    const row = i % 4;
    const x = 0.4 + col * 5.0;
    const y = 1.2 + row * 1.05;

    s.addShape("roundRect", { x, y, w: 4.5, h: 0.88, rectRadius: 0.08,
      fill: { color: C.white, transparency: 20 }, line: { color: C.lightMint } });
    s.addText(num, { x: x+0.12, y: y+0.08, w: 0.5, h: 0.35,
      fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri" });
    s.addText(title, { x: x+0.6, y: y+0.05, w: 3.7, h: 0.38,
      fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri" });
    s.addText(sub, { x: x+0.6, y: y+0.44, w: 3.7, h: 0.30,
      fontSize: 9.5, color: C.charcoal, fontFace: "Calibri", italic: true });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — What is Pharmacology? (Definition)
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.blush };
  addCornerAccent(s, C.rose, C.lightPurp);
  addHeaderBar(s, "What is Pharmacology?", C.rose);

  // Etymology box
  s.addShape("roundRect", { x: 0.3, y: 1.15, w: 9.4, h: 0.75, rectRadius: 0.1,
    fill: { color: C.white, transparency: 10 }, line: { color: C.rose } });
  s.addText([
    { text: "Etymology: ", options: { bold: true, color: C.rose } },
    { text: '"Pharmakon" (Greek) = drug / poison  +  "Logos" = study / knowledge', options: { color: C.navy } }
  ], { x: 0.5, y: 1.22, w: 9.0, h: 0.55, fontSize: 13, fontFace: "Calibri", valign: "middle" });

  // Definition card
  s.addShape("roundRect", { x: 0.3, y: 2.05, w: 9.4, h: 1.25, rectRadius: 0.1,
    fill: { color: C.lavender, transparency: 30 }, line: { color: C.lilacDeep } });
  s.addText('"The study of substances that interact with living systems through chemical processes — especially through binding to regulatory molecules and activating or inhibiting normal body processes."',
    { x: 0.5, y: 2.12, w: 9.0, h: 1.1, fontSize: 13.5, italic: true, color: C.navy, fontFace: "Calibri", align: "center", valign: "middle" });

  // Two sub-boxes
  const subs = [
    ["Pharmacokinetics (PK)", "What the BODY does to the drug\nAbsorption · Distribution · Metabolism · Excretion", C.sky, C.teal],
    ["Pharmacodynamics (PD)", "What the DRUG does to the body\nMechanism of action · Therapeutic & adverse effects", C.blush, C.rose],
  ];
  subs.forEach(([title, body, bg2, col], i) => {
    const x = 0.3 + i * 4.85;
    s.addShape("roundRect", { x, y: 3.45, w: 4.55, h: 1.85, rectRadius: 0.1,
      fill: { color: bg2, transparency: 20 }, line: { color: col } });
    s.addText(title, { x: x+0.15, y: 3.55, w: 4.25, h: 0.38, fontSize: 12, bold: true, color: col, fontFace: "Calibri" });
    s.addText(body, { x: x+0.15, y: 3.93, w: 4.25, h: 1.2, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — Overview History Timeline
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.sky };
  addHeaderBar(s, "A Journey Through Time: History of Pharmacology", C.navy);

  // Horizontal timeline spine
  s.addShape("rect", { x: 0.5, y: 3.0, w: 9.0, h: 0.06, fill: { color: C.lilacDeep }, line: { color: C.lilacDeep } });

  const events = [
    { x: 0.5,  y: 1.2,  label: "~1550 BCE", desc: "Ebers\nPapyrus", col: C.rose,     top: true },
    { x: 1.9,  y: 1.2,  label: "~600 BCE",  desc: "Charaka\nSamhita", col: C.teal,   top: true },
    { x: 3.3,  y: 3.5,  label: "1st CE",    desc: "De Materia\nMedica", col: C.lilacDeep, top: false },
    { x: 4.7,  y: 1.2,  label: "1493",      desc: "Paracelsus\n& Dose Theory", col: C.rose, top: true },
    { x: 6.1,  y: 3.5,  label: "1628",      desc: "Harvey:\nCirculation", col: C.teal, top: false },
    { x: 7.5,  y: 1.2,  label: "1804",      desc: "Morphine\nIsolation", col: C.lilacDeep, top: true },
    { x: 8.7,  y: 3.5,  label: "1897",      desc: "Aspirin\nSynthesis", col: C.rose, top: false },
  ];

  events.forEach(({ x, y, label, desc, col, top }) => {
    const dotY = 3.0;
    timelineDot(s, x+0.6, dotY, col);
    // Line from dot to text
    s.addShape("rect", {
      x: x+0.57, y: top ? y+0.8 : dotY+0.05,
      w: 0.05,   h: Math.abs(dotY - y) - (top ? 0.8 : 0),
      fill: { color: col, transparency: 40 }, line: { color: col, transparency: 40 }
    });
    s.addShape("roundRect", { x: x, y: top ? y : y, w: 1.2, h: 0.85, rectRadius: 0.08,
      fill: { color: C.white, transparency: 20 }, line: { color: col } });
    s.addText(label, { x: x+0.05, y: top ? y+0.02 : y+0.02, w: 1.1, h: 0.28,
      fontSize: 8, bold: true, color: col, fontFace: "Calibri", align: "center" });
    s.addText(desc, { x: x+0.05, y: top ? y+0.3 : y+0.3, w: 1.1, h: 0.5,
      fontSize: 7.5, color: C.navy, fontFace: "Calibri", align: "center" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — Ancient Egypt: Ebers Papyrus
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.cream };
  addCornerAccent(s, C.rose, C.lightMint);
  addHeaderBar(s, "Ancient Foundations: Ebers Papyrus (~1550 BCE)", C.rose);

  s.addText("Ancient Egypt", {
    x: 0.4, y: 1.1, w: 9.2, h: 0.35, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri"
  });

  const bullets = [
    "One of the oldest and most important medical documents from ancient Egypt.",
    "Written around 1550 BCE — contains detailed information about diseases, herbal remedies, surgical practices, and magical treatments.",
    "Reflects the earliest documented integration of pharmacological knowledge with medical practice.",
    "Over 700 remedies described including plant-based, animal-based, and mineral substances.",
    "Demonstrates the Egyptian civilization's understanding of drug-disease relationships centuries before the modern era.",
  ];
  bullets.forEach((text, i) => {
    s.addShape("ellipse", { x: 0.4, y: 1.6 + i*0.72, w: 0.16, h: 0.16, fill: { color: C.rose }, line: { color: C.rose } });
    s.addText(text, { x: 0.7, y: 1.55 + i*0.72, w: 5.8, h: 0.55, fontSize: 11, color: C.navy, fontFace: "Calibri" });
  });

  // Decorative papyrus-themed box
  s.addShape("roundRect", { x: 6.9, y: 1.1, w: 2.7, h: 4.2, rectRadius: 0.12,
    fill: { color: "FFF3DC", transparency: 10 }, line: { color: C.rose } });
  s.addText("📜", { x: 7.1, y: 1.2, w: 2.3, h: 0.6, fontSize: 30, align: "center" });
  s.addText("Ebers Papyrus\n~1550 BCE", { x: 7.0, y: 1.85, w: 2.5, h: 0.6,
    fontSize: 11, bold: true, color: C.rose, fontFace: "Calibri", align: "center" });
  s.addText("• 18.6 m long scroll\n• 108 columns of text\n• 700+ remedies listed\n• Found in Luxor, 1872\n• Named after Georg Ebers",
    { x: 7.0, y: 2.5, w: 2.5, h: 2.5, fontSize: 9.5, color: C.charcoal, fontFace: "Calibri" });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — Ayurveda & TCM
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.mint };
  addCornerAccent(s, C.teal, C.lightMint);
  addHeaderBar(s, "Ancient Traditions: Ayurveda & Traditional Chinese Medicine", C.teal);

  // Ayurveda column
  s.addShape("roundRect", { x: 0.3, y: 1.15, w: 4.5, h: 4.15, rectRadius: 0.12,
    fill: { color: C.white, transparency: 15 }, line: { color: C.teal } });
  s.addText("Ayurvedic Pharmacology", { x: 0.5, y: 1.25, w: 4.1, h: 0.42,
    fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri" });
  s.addText([
    { text: "Charaka Samhita", options: { bold: true, breakLine: true } },
    { text: "Foundational text by physician Charaka — diseases, medicinal plants, drug formulations, treatment methods, pharmacological principles.\n\n", options: { breakLine: false } },
    { text: "Rasa Shastra", options: { bold: true, breakLine: true } },
    { text: "Medieval Ayurvedic branch — use of metals, minerals, mercury, herbal compounds. Techniques: purification, calcination, distillation.\n\n", options: { breakLine: false } },
    { text: "Core Concept: ", options: { bold: true } },
    { text: "Balance of three doshas — Vata, Pitta, Kapha. Medicines restore this balance.", options: {} }
  ], { x: 0.5, y: 1.72, w: 4.1, h: 3.45, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });

  // TCM column
  s.addShape("roundRect", { x: 5.2, y: 1.15, w: 4.5, h: 4.15, rectRadius: 0.12,
    fill: { color: C.white, transparency: 15 }, line: { color: C.lilacDeep } });
  s.addText("Traditional Chinese Medicine", { x: 5.4, y: 1.25, w: 4.1, h: 0.42,
    fontSize: 13, bold: true, color: C.lilacDeep, fontFace: "Calibri" });
  s.addText([
    { text: "Huangdi Neijing (Yellow Emperor's Inner Canon)", options: { bold: true, breakLine: true } },
    { text: "~2nd century BCE. Foundational TCM text.\n\n", options: { breakLine: false } },
    { text: "Key Concepts: ", options: { bold: true } },
    { text: "Yin–Yang balance, Five Elements, flow of vital energy (Qi), acupuncture, herbal medicines.\n\n", options: { breakLine: false } },
    { text: "Approach: ", options: { bold: true } },
    { text: "Holistic healing — disease as imbalance between natural forces. Continued to influence Asian medicine for centuries.", options: {} }
  ], { x: 5.4, y: 1.72, w: 4.1, h: 3.45, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — Classical Greek Era
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.blush };
  addCornerAccent(s, C.rose, C.lightPurp);
  addHeaderBar(s, "Classical Greek Era: Dioscorides & Galen", C.rose);

  const cards = [
    {
      title: "Dioscorides — De Materia Medica (1st CE)",
      color: C.rose,
      bg: C.blush,
      content: "Written in the 1st century CE by Pedanius Dioscorides. Described hundreds of medicinal plants, animal products, and minerals with preparation methods and therapeutic uses. Standard reference for physicians and pharmacists for over 1,500 years. Foundation of herbal medicine and early pharmacological science."
    },
    {
      title: 'Claudius Galen & "Galenicals"',
      color: C.lilacDeep,
      bg: C.lavender,
      content: "Prominent Greek physician of the Roman era. Prepared formulations from plant, animal, and mineral sources — later known as Galenicals. Methods: grinding, boiling, mixing — earliest pharmaceutical processes. Dominated medical practice for centuries. Contributed to drug formulation and experimental pharmacology."
    },
    {
      title: "Paracelsus (1493–1541) — The Renaissance",
      color: C.teal,
      bg: C.mint,
      content: 'Opposed traditional Galenic teachings. Emphasized observation, experimentation, and chemical substances. Famous principle: "All things are poison… only the dose makes a thing not a poison." Foundation of toxicology & dose-dependent drug therapy. Encouraged scientific study of drugs.'
    }
  ];

  cards.forEach(({ title, color, bg: cbg, content }, i) => {
    const y = 1.1 + i * 1.48;
    s.addShape("roundRect", { x: 0.3, y, w: 9.4, h: 1.32, rectRadius: 0.1,
      fill: { color: cbg, transparency: 30 }, line: { color: color } });
    s.addShape("rect", { x: 0.3, y, w: 0.18, h: 1.32, fill: { color: color }, line: { color: color } });
    s.addText(title, { x: 0.65, y: y+0.08, w: 8.8, h: 0.35, fontSize: 11.5, bold: true, color: color, fontFace: "Calibri" });
    s.addText(content, { x: 0.65, y: y+0.45, w: 8.7, h: 0.82, fontSize: 10, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — 17th Century Scientific Foundations
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.sky };
  addHeaderBar(s, "Early Scientific Foundations: 17th Century", C.navy);

  s.addText("The shift from empirical observation to experimental medicine", {
    x: 0.4, y: 1.1, w: 9.2, h: 0.35, fontSize: 12, italic: true, color: C.teal, fontFace: "Calibri"
  });

  // William Harvey box
  s.addShape("roundRect", { x: 0.3, y: 1.55, w: 4.5, h: 3.7, rectRadius: 0.12,
    fill: { color: C.white, transparency: 15 }, line: { color: C.navy } });
  s.addShape("rect", { x: 0.3, y: 1.55, w: 4.5, h: 0.45, fill: { color: C.navy }, line: { color: C.navy } });
  s.addText("William Harvey (1628)", { x: 0.4, y: 1.6, w: 4.2, h: 0.35,
    fontSize: 12, bold: true, color: C.white, fontFace: "Calibri" });
  s.addText([
    { text: "Discovery of Blood Circulation\n\n", options: { bold: true, breakLine: false } },
    { text: "• Published 'De Motu Cordis' — described the circulation of blood\n", options: { breakLine: false } },
    { text: "• Opened the door for intravenous drug delivery\n", options: { breakLine: false } },
    { text: "• Proved that the heart acts as a pump\n", options: { breakLine: false } },
    { text: "• Revolutionized understanding of cardiovascular physiology\n", options: { breakLine: false } },
    { text: "• Clinical impact: basis for modern IV therapy and pharmacokinetics", options: {} }
  ], { x: 0.5, y: 2.08, w: 4.0, h: 3.1, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });

  // Robert Boyle box
  s.addShape("roundRect", { x: 5.2, y: 1.55, w: 4.5, h: 3.7, rectRadius: 0.12,
    fill: { color: C.white, transparency: 15 }, line: { color: C.teal } });
  s.addShape("rect", { x: 5.2, y: 1.55, w: 4.5, h: 0.45, fill: { color: C.teal }, line: { color: C.teal } });
  s.addText("Robert Boyle", { x: 5.3, y: 1.6, w: 4.2, h: 0.35,
    fontSize: 12, bold: true, color: C.white, fontFace: "Calibri" });
  s.addText([
    { text: "Pioneer of Experimental Pharmacology\n\n", options: { bold: true, breakLine: false } },
    { text: "• Conducted early experiments injecting drugs directly into the bloodstream of animals\n", options: { breakLine: false } },
    { text: "• Demonstrated feasibility of systemic drug delivery via veins\n", options: { breakLine: false } },
    { text: "• Applied the scientific method to medicinal chemistry\n", options: { breakLine: false } },
    { text: "• Helped establish experimental pharmacology as a discipline", options: {} }
  ], { x: 5.4, y: 2.08, w: 4.0, h: 3.1, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — 18th Century: William Withering & Digitalis
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.lavender };
  addHeaderBar(s, "18th Century: Clinical Pharmacology Emerges", C.lilacDeep);

  // Withering feature
  s.addShape("roundRect", { x: 0.3, y: 1.1, w: 6.5, h: 2.8, rectRadius: 0.12,
    fill: { color: C.white, transparency: 15 }, line: { color: C.lilacDeep } });
  s.addText("William Withering (1741–1799)", {
    x: 0.5, y: 1.2, w: 6.1, h: 0.42, fontSize: 14, bold: true, color: C.lilacDeep, fontFace: "Calibri"
  });
  s.addText([
    { text: '"An Account of the Foxglove" ', options: { bold: true, italic: true } },
    { text: "(1785) — First systematic description of Digitalis in treating dropsy (edema).\n\n", options: {} },
    { text: "Key Contribution: ", options: { bold: true } },
    { text: "Marked the beginning of clinical pharmacology — calculating dosages to maximise benefits while minimising toxicity. Still the basis of therapeutic index.\n\n", options: {} },
    { text: "Legacy: ", options: { bold: true } },
    { text: "Digitalis glycosides still used in atrial fibrillation and heart failure today.", options: {} }
  ], { x: 0.5, y: 1.68, w: 6.1, h: 2.1, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });

  // Side box: Friedrich Sertürner
  s.addShape("roundRect", { x: 7.1, y: 1.1, w: 2.6, h: 2.8, rectRadius: 0.12,
    fill: { color: C.mint, transparency: 20 }, line: { color: C.teal } });
  s.addText("Friedrich Sertürner\n(1783–1841)", {
    x: 7.2, y: 1.2, w: 2.3, h: 0.6, fontSize: 11, bold: true, color: C.teal, fontFace: "Calibri", align: "center"
  });
  s.addText("First isolation of an\nalkaloid — morphine from\nopium (1804)\n\nNamed after Morpheus,\nGod of Dreams\n\nMark of alkaloid chemistry\n& drug isolation era",
    { x: 7.2, y: 1.85, w: 2.3, h: 1.95, fontSize: 9.5, color: C.navy, fontFace: "Calibri" });

  // Bottom: Aspirin box
  s.addShape("roundRect", { x: 0.3, y: 4.05, w: 9.4, h: 1.25, rectRadius: 0.1,
    fill: { color: C.blush, transparency: 20 }, line: { color: C.rose } });
  s.addText([
    { text: "🧪 The Aspirin Revolution (1897): ", options: { bold: true, color: C.rose } },
    { text: "Felix Hoffmann at Bayer synthesized acetylsalicylic acid (aspirin). First major synthetic drug. Demonstrated importance of drug standardization & commercial production. Paved way for modern pharmaceutical industry.", options: { color: C.navy } }
  ], { x: 0.5, y: 4.12, w: 9.1, h: 1.1, fontSize: 10.5, fontFace: "Calibri", valign: "middle" });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — Urea Synthesis & Organic Chemistry
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.mint };
  addHeaderBar(s, "Breaking Vitalism: Wöhler's Urea Synthesis (1828)", C.teal);

  s.addShape("roundRect", { x: 0.3, y: 1.1, w: 9.4, h: 3.6, rectRadius: 0.12,
    fill: { color: C.white, transparency: 10 }, line: { color: C.teal } });

  s.addText("Friedrich Wöhler (1800–1882)", {
    x: 0.5, y: 1.2, w: 9.0, h: 0.42, fontSize: 15, bold: true, color: C.teal, fontFace: "Calibri"
  });

  const points = [
    ["The Experiment", "Wöhler successfully synthesized urea — an organic compound — from inorganic substances (ammonium cyanate) in the laboratory."],
    ["The Significance", "Proved that organic compounds could be created WITHOUT any 'vital force' — directly challenging vitalism theory."],
    ["Impact on Pharmacology", "Led to the decline of vitalism and the rise of modern organic chemistry. Opened the door for synthetic drug manufacturing."],
    ["The Legacy", "Foundation of pharmaceutical chemistry — enabled the systematic synthesis of thousands of medicinal compounds thereafter."],
  ];

  points.forEach(([label, text], i) => {
    const x = i % 2 === 0 ? 0.5 : 5.1;
    const y = i < 2 ? 1.75 : 2.95;
    s.addShape("roundRect", { x, y, w: 4.35, h: 1.0, rectRadius: 0.08,
      fill: { color: C.mint, transparency: 30 }, line: { color: C.teal } });
    s.addText(label, { x: x+0.1, y: y+0.05, w: 4.1, h: 0.3, fontSize: 10.5, bold: true, color: C.teal, fontFace: "Calibri" });
    s.addText(text, { x: x+0.1, y: y+0.35, w: 4.1, h: 0.6, fontSize: 9.5, color: C.navy, fontFace: "Calibri" });
  });

  s.addShape("roundRect", { x: 0.3, y: 4.85, w: 9.4, h: 0.55, rectRadius: 0.08,
    fill: { color: C.teal, transparency: 20 }, line: { color: C.teal } });
  s.addText("NH4OCN  →  (NH2)2CO  |  Ammonium cyanate → Urea  |  First synthesis of an organic molecule from inorganic reactants",
    { x: 0.5, y: 4.9, w: 9.0, h: 0.45, fontSize: 10, color: C.navy, fontFace: "Calibri", align: "center", italic: true });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — Academic Foundation: Rudolf Buchheim
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.blush };
  addHeaderBar(s, "The Academic Foundation: Rudolf Buchheim (1820–1879)", C.rose);

  s.addText('"Founder of Experimental Pharmacology"', {
    x: 0.4, y: 1.05, w: 9.2, h: 0.4, fontSize: 14, italic: true, bold: true, color: C.rose, fontFace: "Calibri", align: "center"
  });

  const pts = [
    ["First Pharmacology Lab (1847)", "Established the first pharmacology laboratory at the University of Dorpat — a landmark in scientific medicine."],
    ["Scientific Study of Drugs", "Introduced laboratory-based investigation of drugs rather than relying on traditional theories or anecdotal observations."],
    ["Mechanism of Action Focus", "Believed medicines should be studied scientifically to understand their mechanism of action and therapeutic effects."],
    ["Discipline Founder", "Transformed pharmacology into an independent scientific discipline. Laid the foundation for modern experimental drug research."],
    ["Teaching Legacy", "Trained generations of pharmacologists who continued to expand experimental methods worldwide."],
    ["Publications", "Authored systematic texts on drug classification and pharmacological action — novel for the 19th century scientific community."],
  ];

  pts.forEach(([title, body], i) => {
    const col2 = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col2 * 4.85;
    const y = 1.55 + row * 1.25;
    s.addShape("roundRect", { x, y, w: 4.55, h: 1.1, rectRadius: 0.1,
      fill: { color: C.white, transparency: 10 }, line: { color: C.rose } });
    s.addShape("ellipse", { x: x+0.12, y: y+0.12, w: 0.22, h: 0.22,
      fill: { color: C.rose }, line: { color: C.rose } });
    s.addText(title, { x: x+0.45, y: y+0.06, w: 3.95, h: 0.3, fontSize: 10.5, bold: true, color: C.rose, fontFace: "Calibri" });
    s.addText(body, { x: x+0.45, y: y+0.38, w: 3.95, h: 0.68, fontSize: 9.5, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — Oswald Schmiedeberg & Global Expansion
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.sky };
  addHeaderBar(s, "Oswald Schmiedeberg: Father of Modern Pharmacology", C.navy);

  s.addShape("roundRect", { x: 0.3, y: 1.1, w: 6.1, h: 3.0, rectRadius: 0.12,
    fill: { color: C.white, transparency: 10 }, line: { color: C.navy } });
  s.addText("Oswald Schmiedeberg (1838–1921)", {
    x: 0.5, y: 1.18, w: 5.7, h: 0.42, fontSize: 13, bold: true, color: C.navy, fontFace: "Calibri"
  });
  s.addText([
    { text: '"Father of Modern Pharmacology"\n\n', options: { bold: true, italic: true } },
    { text: "• Student of Rudolf Buchheim\n", options: {} },
    { text: "• Established famous pharmacology institute at University of Strasbourg\n", options: {} },
    { text: "• Conducted extensive research on drug action on organs\n", options: {} },
    { text: "• Emphasized experimental methods in pharmacological studies\n", options: {} },
    { text: "• Trained pharmacologists from many countries — global influence\n", options: {} },
    { text: "• Helped establish pharmacology as independent medical science", options: {} }
  ], { x: 0.5, y: 1.65, w: 5.7, h: 2.35, fontSize: 10.5, color: C.navy, fontFace: "Calibri" });

  // Global expansion box
  s.addShape("roundRect", { x: 6.7, y: 1.1, w: 2.9, h: 3.0, rectRadius: 0.12,
    fill: { color: C.mint, transparency: 20 }, line: { color: C.teal } });
  s.addText("Global Expansion", { x: 6.85, y: 1.18, w: 2.6, h: 0.4,
    fontSize: 11.5, bold: true, color: C.teal, fontFace: "Calibri" });
  s.addText("Germany: Major research centers\n\nUK & USA: Advanced experimental methods\n\nPharmaceutical industry growth\n\nDiscovery of antibiotics & vaccines\n\nInternational collaboration\n\nPharmacology became a global science",
    { x: 6.85, y: 1.62, w: 2.6, h: 2.4, fontSize: 9.5, color: C.navy, fontFace: "Calibri" });

  // Col. Chopra box
  s.addShape("roundRect", { x: 0.3, y: 4.22, w: 9.4, h: 1.1, rectRadius: 0.1,
    fill: { color: C.lavender, transparency: 20 }, line: { color: C.lilacDeep } });
  s.addText([
    { text: "🇮🇳 Col. Ram Nath Chopra (1882–1973) — Father of Indian Pharmacology: ", options: { bold: true, color: C.lilacDeep } },
    { text: "Extensive studies on indigenous medicinal plants. Combined traditional Indian medicine with modern scientific pharmacology. Served at Calcutta School of Tropical Medicine. Promoted experimental pharmacology, toxicology, and drug standardization in India.", options: { color: C.navy } }
  ], { x: 0.5, y: 4.28, w: 9.1, h: 1.0, fontSize: 10.5, fontFace: "Calibri", valign: "middle" });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — Paul Ehrlich & the Magic Bullet
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.lavender };
  addHeaderBar(s, "Paul Ehrlich & the Magic Bullet Concept", C.lilacDeep);

  // Concept box
  s.addShape("roundRect", { x: 0.3, y: 1.1, w: 9.4, h: 1.2, rectRadius: 0.1,
    fill: { color: C.white, transparency: 15 }, line: { color: C.lilacDeep } });
  s.addText([
    { text: '"Magic Bullet" Theory: ', options: { bold: true, color: C.lilacDeep } },
    { text: 'Certain chemical substances could be designed to selectively target and destroy disease-causing organisms WITHOUT damaging normal host cells — like a "bullet" aimed only at harmful targets.', options: { color: C.navy } }
  ], { x: 0.5, y: 1.18, w: 9.0, h: 1.05, fontSize: 11.5, fontFace: "Calibri", valign: "middle" });

  const pills = [
    ["Research Approach", "Studied synthetic dyes and chemical compounds — showed selective affinity for particular cells or microbes.", C.teal],
    ["Salvarsan (1909)", "Developed arsphenamine — first successful antimicrobial drug for syphilis (Treponema pallidum). Compound 606.", C.rose],
    ["Legacy", "One of the founders of modern chemotherapy. Transformed pharmacology from empirical to receptor-based science.", C.lilacDeep],
    ["Selective Toxicity", "Established the principle that drugs can discriminate between host and pathogen — cornerstone of antibiotic theory.", C.navy],
  ];

  pills.forEach(([title, body, col], i) => {
    const x = 0.3 + (i % 2) * 4.85;
    const y = 2.45 + Math.floor(i/2) * 1.48;
    s.addShape("roundRect", { x, y, w: 4.55, h: 1.3, rectRadius: 0.1,
      fill: { color: C.white, transparency: 10 }, line: { color: col } });
    s.addShape("rect", { x, y, w: 4.55, h: 0.38, fill: { color: col, transparency: 30 }, line: { color: col } });
    s.addText(title, { x: x+0.12, y: y+0.05, w: 4.3, h: 0.3, fontSize: 11, bold: true, color: col, fontFace: "Calibri" });
    s.addText(body, { x: x+0.12, y: y+0.43, w: 4.3, h: 0.82, fontSize: 10, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — The Antibiotic Era: Alexander Fleming
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.mint };
  addHeaderBar(s, "The Antibiotic Era: Penicillin & Beyond", C.teal);

  s.addText("Before antibiotics, bacterial infections were among the leading causes of death. The discovery of penicillin changed medicine forever.", {
    x: 0.4, y: 1.05, w: 9.2, h: 0.45, fontSize: 11, italic: true, color: C.charcoal, fontFace: "Calibri"
  });

  const timeline2 = [
    { year: "1928", event: "Alexander Fleming discovers penicillin from mold Penicillium notatum — observes bacterial inhibition.", color: C.teal },
    { year: "1940s", event: "Howard Florey & Ernst Boris Chain purify penicillin for clinical use during WWII — saved millions.", color: C.lilacDeep },
    { year: "1944", event: "Selman Waksman discovers streptomycin — first antibiotic effective against tuberculosis.", color: C.rose },
    { year: "1950s–60s", event: "Tetracyclines, chloramphenicol, erythromycin, cephalosporins discovered. Rapid expansion of anti-infective therapy.", color: C.navy },
  ];

  timeline2.forEach(({ year, event, color }, i) => {
    s.addShape("roundRect", { x: 0.3, y: 1.65 + i*0.92, w: 9.4, h: 0.78, rectRadius: 0.08,
      fill: { color: C.white, transparency: 10 }, line: { color: color } });
    s.addShape("rect", { x: 0.3, y: 1.65 + i*0.92, w: 1.2, h: 0.78,
      fill: { color: color, transparency: 20 }, line: { color: color } });
    s.addText(year, { x: 0.35, y: 1.7 + i*0.92, w: 1.1, h: 0.65,
      fontSize: 12, bold: true, color: color, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addText(event, { x: 1.65, y: 1.72 + i*0.92, w: 7.9, h: 0.62,
      fontSize: 10.5, color: C.navy, fontFace: "Calibri", valign: "middle" });
  });

  s.addShape("roundRect", { x: 0.3, y: 5.32, w: 9.4, h: 0.48, rectRadius: 0.08,
    fill: { color: C.rose, transparency: 60 }, line: { color: C.rose } });
  s.addText("⚠ Note: Irrational use led to antimicrobial resistance — now a major global health challenge.",
    { x: 0.5, y: 5.35, w: 9.0, h: 0.42, fontSize: 10, bold: true, color: C.rose, fontFace: "Calibri", align: "center" });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 — Receptor Theory
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.blush };
  addHeaderBar(s, "Evolution of Receptor Theory", C.rose);

  s.addText('"Corpora non agunt nisi fixata" — A substance cannot act unless it is bound.  — Paul Ehrlich', {
    x: 0.4, y: 1.05, w: 9.2, h: 0.45, fontSize: 11, italic: true, color: C.rose, fontFace: "Calibri", align: "center"
  });

  if (images.receptor) {
    s.addImage({ data: images.receptor, x: 6.7, y: 1.55, w: 2.9, h: 2.8 });
  }

  const steps = [
    ["Paul Ehrlich", "Late 19th century — drugs bind selectively to cellular components. Coined receptor concept."],
    ["John N. Langley", "Proposed 'receptive substances' in cells. Introduced formal receptor concept."],
    ["A. J. Clark", "Occupancy theory — intensity of drug effect ∝ number of receptors occupied."],
    ["Raymond Ahlquist", "Classified adrenergic receptors into alpha (α) and beta (β) subtypes (1948)."],
    ["Sir James Black", "Developed beta-blockers & H2 antagonists — practical application of receptor theory. Nobel Prize 1988."],
  ];

  steps.forEach(([name, text], i) => {
    s.addShape("ellipse", { x: 0.4, y: 1.62 + i*0.76, w: 0.26, h: 0.26,
      fill: { color: C.rose }, line: { color: C.rose } });
    s.addText(`${i+1}`, { x: 0.4, y: 1.62 + i*0.76, w: 0.26, h: 0.26,
      fontSize: 9, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addShape("roundRect", { x: 0.78, y: 1.58 + i*0.76, w: 5.75, h: 0.68, rectRadius: 0.07,
      fill: { color: C.white, transparency: 15 }, line: { color: C.rose } });
    s.addText(name, { x: 0.92, y: 1.61 + i*0.76, w: 5.5, h: 0.26, fontSize: 10.5, bold: true, color: C.rose, fontFace: "Calibri" });
    s.addText(text, { x: 0.92, y: 1.88 + i*0.76, w: 5.5, h: 0.3, fontSize: 9.5, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 16 — Pharmacokinetics Deep Dive
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.sky };
  addHeaderBar(s, "Pharmacokinetics: What the Body Does to the Drug", C.navy);

  if (images.tamoxifen) {
    s.addImage({ data: images.tamoxifen, x: 6.2, y: 1.1, w: 3.5, h: 3.0 });
    s.addText("Example: Tamoxifen metabolism pathway\n(CYP2D6 → active metabolite Endoxifen)",
      { x: 6.2, y: 4.15, w: 3.5, h: 0.55, fontSize: 8.5, italic: true, color: C.charcoal, fontFace: "Calibri", align: "center" });
  }

  const adme = [
    ["A  Absorption", "Drug entry into the systemic circulation. Factors: route of administration, bioavailability, first-pass effect, pH.", C.teal],
    ["D  Distribution", "Drug movement to tissues. Factors: plasma protein binding, blood-brain barrier, Vd (volume of distribution).", C.lilacDeep],
    ["M  Metabolism", "Biotransformation (mainly liver). Phase I (CYP450) oxidation, reduction; Phase II conjugation reactions.", C.rose],
    ["E  Excretion", "Elimination via kidneys (urine), bile (feces), lungs, sweat. Renal clearance is key parameter.", C.navy],
  ];

  adme.forEach(([label, text, col], i) => {
    s.addShape("roundRect", { x: 0.3, y: 1.1 + i*1.1, w: 5.7, h: 0.95, rectRadius: 0.1,
      fill: { color: C.white, transparency: 10 }, line: { color: col } });
    s.addShape("rect", { x: 0.3, y: 1.1 + i*1.1, w: 0.5, h: 0.95,
      fill: { color: col, transparency: 25 }, line: { color: col } });
    s.addText(label, { x: 0.9, y: 1.14 + i*1.1, w: 1.5, h: 0.35, fontSize: 11, bold: true, color: col, fontFace: "Calibri" });
    s.addText(text, { x: 0.9, y: 1.5 + i*1.1, w: 5.1, h: 0.5, fontSize: 9.5, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 17 — Pharmacodynamics Deep Dive
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.lavender };
  addHeaderBar(s, "Pharmacodynamics: What the Drug Does to the Body", C.lilacDeep);

  const concepts = [
    {
      title: "Mechanism of Action", color: C.lilacDeep,
      body: "How a drug produces its pharmacological effect. Types: receptor agonism/antagonism, enzyme inhibition, ion channel modulation, transporter blockade."
    },
    {
      title: "Dose-Response Relationship", color: C.teal,
      body: "Graded vs. quantal responses. ED50 (effective dose 50%), TD50 (toxic dose 50%), LD50 (lethal dose). Therapeutic window defined by these parameters."
    },
    {
      title: "Therapeutic Index (TI)", color: C.rose,
      body: "TI = LD50 / ED50. Higher TI = safer drug. Narrow TI drugs (digoxin, warfarin, lithium) require therapeutic drug monitoring (TDM)."
    },
    {
      title: "Agonists vs. Antagonists", color: C.navy,
      body: "Full agonists produce maximum effect. Partial agonists — submaximal. Competitive antagonists block reversibly. Non-competitive — irreversible binding."
    },
    {
      title: "Receptor Desensitization", color: C.teal,
      body: "Prolonged agonist exposure reduces receptor sensitivity. Mechanisms: phosphorylation, internalization, downregulation. Clinical relevance: β-agonist tachyphylaxis."
    },
    {
      title: "Efficacy vs. Potency", color: C.lilacDeep,
      body: "Efficacy = maximum effect achievable. Potency = dose required to produce 50% maximal effect (EC50). High potency ≠ high efficacy."
    },
  ];

  concepts.forEach(({ title, body, color }, i) => {
    const col2 = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col2 * 4.85;
    const y = 1.1 + row * 1.45;
    s.addShape("roundRect", { x, y, w: 4.55, h: 1.28, rectRadius: 0.1,
      fill: { color: C.white, transparency: 10 }, line: { color: color } });
    s.addShape("rect", { x, y, w: 4.55, h: 0.35, fill: { color: color, transparency: 30 }, line: { color: color } });
    s.addText(title, { x: x+0.12, y: y+0.04, w: 4.3, h: 0.28, fontSize: 10.5, bold: true, color: color, fontFace: "Calibri" });
    s.addText(body, { x: x+0.12, y: y+0.4, w: 4.3, h: 0.82, fontSize: 9.5, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 18 — Biotech Revolution
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.cream };
  addHeaderBar(s, "The Biotech Revolution: Recombinant DNA & Beyond", "7B8A4E");

  s.addText("Late 20th – 21st Century: Biotechnology transformed pharmacology from small molecules to precise biological agents.",
    { x: 0.4, y: 1.05, w: 9.2, h: 0.42, fontSize: 11, italic: true, color: C.charcoal, fontFace: "Calibri" });

  const milestones = [
    { yr: "1973", event: "Recombinant DNA technology — Boyer & Cohen. Genetic manipulation of organisms for therapeutic protein production." },
    { yr: "1975", event: "Monoclonal antibodies — Köhler & Milstein via hybridoma technology. Nobel Prize 1984." },
    { yr: "1982", event: "Recombinant human insulin — first genetically engineered drug approved for human use." },
    { yr: "1990s", event: "Human Genome Project launched. Foundation for pharmacogenomics and personalized medicine." },
    { yr: "2000s", event: "Humanized monoclonal antibodies, targeted cancer therapies, gene therapy vectors." },
    { yr: "2012+", event: "CRISPR-Cas9 — Jennifer Doudna & Emmanuelle Charpentier. Nobel Prize 2020. Genome-level therapeutics." },
  ];

  milestones.forEach(({ yr, event }, i) => {
    const col2 = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col2 * 4.85;
    const y = 1.6 + row * 1.3;
    const col = [C.teal, C.lilacDeep, C.rose, "7B8A4E", C.teal, C.navy][i];
    s.addShape("roundRect", { x, y, w: 4.55, h: 1.12, rectRadius: 0.1,
      fill: { color: C.white, transparency: 10 }, line: { color: col } });
    s.addShape("roundRect", { x, y, w: 0.9, h: 1.12, rectRadius: 0.0,
      fill: { color: col, transparency: 25 }, line: { color: col } });
    s.addText(yr, { x: x+0.02, y, w: 0.86, h: 1.12, fontSize: 12, bold: true, color: col, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addText(event, { x: x+1.0, y: y+0.1, w: 3.45, h: 0.9, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "middle" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 19 — Monoclonal Antibodies
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.sky };
  addHeaderBar(s, "Monoclonal Antibodies (mAbs): Targeted Pharmacotherapy", C.navy);

  if (images.mabStruct) {
    s.addImage({ data: images.mabStruct, x: 6.8, y: 1.1, w: 2.8, h: 2.9 });
    s.addText("mAb delivery systems\n(monoclonal + nano formulations)",
      { x: 6.8, y: 4.05, w: 2.8, h: 0.5, fontSize: 8, italic: true, color: C.charcoal, fontFace: "Calibri", align: "center" });
  }

  const mabInfo = [
    ["What are mAbs?", "Laboratory-produced antibodies derived from a single B-lymphocyte clone. Identical in structure; act with high specificity against a single antigen.", C.navy],
    ["Production: Hybridoma Technology (1975)", "Köhler & Milstein — fused B cells with immortal myeloma cells to produce large quantities of identical antibodies.", C.teal],
    ["Therapeutic Uses", "Cancer (tumor receptor targeting), autoimmune diseases (RA, IBD), inflammatory disorders, infectious diseases, transplant rejection.", C.rose],
    ["Naming Convention", "'-umab' = fully human, '-zumab' = humanized, '-ximab' = chimeric, '-momab' = murine. Reduces immunogenicity.", C.lilacDeep],
    ["Examples", "Trastuzumab (HER2+ breast cancer), Rituximab (lymphoma), Infliximab (RA/IBD), Pembrolizumab (immune checkpoint).", C.teal],
  ];

  mabInfo.forEach(([title, body, col], i) => {
    s.addShape("roundRect", { x: 0.3, y: 1.1 + i*0.88, w: 6.3, h: 0.74, rectRadius: 0.08,
      fill: { color: C.white, transparency: 10 }, line: { color: col } });
    s.addShape("rect", { x: 0.3, y: 1.1 + i*0.88, w: 0.12, h: 0.74, fill: { color: col }, line: { color: col } });
    s.addText(title, { x: 0.52, y: 1.13 + i*0.88, w: 5.95, h: 0.27, fontSize: 10, bold: true, color: col, fontFace: "Calibri" });
    s.addText(body, { x: 0.52, y: 1.4 + i*0.88, w: 5.95, h: 0.38, fontSize: 9, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 20 — CRISPR Gene Editing
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.lavender };
  addHeaderBar(s, "CRISPR-Cas9: Precision Gene Editing in Pharmacology", C.lilacDeep);

  if (images.crispr) {
    s.addImage({ data: images.crispr, x: 5.8, y: 1.1, w: 3.9, h: 3.5 });
    s.addText("CRISPR-Cas9 mechanism:\ngRNA guides Cas9 to target DNA → DSB → NHEJ/HDR repair",
      { x: 5.8, y: 4.65, w: 3.9, h: 0.55, fontSize: 8, italic: true, color: C.charcoal, fontFace: "Calibri", align: "center" });
  }

  const crisprPts = [
    ["Technology", "CRISPR-Cas9 system — molecular scissors guided by RNA to cut specific DNA sequences precisely."],
    ["Pioneers", "Jennifer Doudna & Emmanuelle Charpentier. Nobel Prize in Chemistry, 2020."],
    ["Drug Research", "Identifies disease-causing genes, validates drug targets, models genetic diseases in vitro and in vivo."],
    ["Therapeutics", "Potential cure for sickle cell disease, β-thalassemia, hereditary blindness (LCA), certain cancers."],
    ["Pharmacological Impact", "Shifts therapy from symptom management to direct genetic correction. Enables ex vivo gene therapy."],
    ["Limitations", "Off-target effects, delivery challenges, ethical concerns (germline editing), cost, regulatory hurdles."],
  ];

  crisprPts.forEach(([title, body], i) => {
    s.addShape("roundRect", { x: 0.3, y: 1.1 + i*0.75, w: 5.3, h: 0.65, rectRadius: 0.08,
      fill: { color: C.white, transparency: 10 }, line: { color: C.lilacDeep } });
    s.addText(title, { x: 0.45, y: 1.13 + i*0.75, w: 1.2, h: 0.25, fontSize: 9.5, bold: true, color: C.lilacDeep, fontFace: "Calibri" });
    s.addText(body, { x: 1.7, y: 1.12 + i*0.75, w: 3.75, h: 0.48, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "middle" });
    s.addShape("rect", { x: 1.65, y: 1.15 + i*0.75, w: 0.04, h: 0.55, fill: { color: C.lightPurp }, line: { color: C.lightPurp } });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 21 — AI in Drug Discovery
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.mint };
  addHeaderBar(s, "Artificial Intelligence in Drug Discovery", C.teal);

  s.addText("AI transforms drug development from trial-and-error to data-driven precision — reducing time, cost, and failure rates.",
    { x: 0.4, y: 1.05, w: 9.2, h: 0.42, fontSize: 11, italic: true, color: C.charcoal, fontFace: "Calibri" });

  const aiPoints = [
    { icon: "🧠", title: "Target Identification", body: "AI analyzes genomic/proteomic databases to find disease-specific molecular targets previously unrecognized by humans." },
    { icon: "💊", title: "Virtual Screening", body: "Screens millions of chemical compounds in silico for binding affinity, selectivity, and druglikeness (Lipinski rules, ADMET)." },
    { icon: "🔬", title: "Protein Structure Prediction", body: "AlphaFold (DeepMind) predicts 3D protein structures — revolutionizes structure-based drug design." },
    { icon: "📊", title: "Clinical Trial Optimization", body: "Patient stratification, adverse event prediction, biomarker identification — improves trial efficiency and success rates." },
    { icon: "🧬", title: "Personalized Medicine", body: "Integrates genetic profiles, biomarkers, and clinical data to predict optimal drug and dose for individual patients." },
    { icon: "⚡", title: "Speed & Cost Reduction", body: "Traditional drug discovery: 10–15 years, >$2 billion. AI-assisted discovery can reduce this significantly." },
  ];

  aiPoints.forEach(({ icon, title, body }, i) => {
    const col2 = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.3 + col2 * 3.22;
    const y = 1.62 + row * 1.88;
    s.addShape("roundRect", { x, y, w: 3.0, h: 1.7, rectRadius: 0.1,
      fill: { color: C.white, transparency: 10 }, line: { color: C.teal } });
    s.addText(icon, { x, y: y+0.08, w: 3.0, h: 0.45, fontSize: 22, align: "center" });
    s.addText(title, { x: x+0.12, y: y+0.55, w: 2.76, h: 0.3, fontSize: 10.5, bold: true, color: C.teal, fontFace: "Calibri", align: "center" });
    s.addText(body, { x: x+0.1, y: y+0.88, w: 2.8, h: 0.75, fontSize: 9, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 22 — Personalized / Precision Medicine
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.blush };
  addHeaderBar(s, "The Era of Personalized Medicine", C.rose);

  // Main concept
  s.addShape("roundRect", { x: 0.3, y: 1.1, w: 9.4, h: 1.15, rectRadius: 0.1,
    fill: { color: C.white, transparency: 10 }, line: { color: C.rose } });
  s.addText("Medical treatment and drug therapy tailored to an individual's genetic makeup, molecular profile, lifestyle, and environment — to achieve maximum therapeutic benefit with minimal adverse effects.",
    { x: 0.5, y: 1.18, w: 9.0, h: 1.0, fontSize: 11.5, color: C.navy, fontFace: "Calibri", valign: "middle", italic: true });

  const pmCards = [
    ["Genomics Foundation", "Human Genome Project (completed 2003) — 3 billion base pairs mapped. Revealed genetic basis of drug response variability.", C.rose],
    ["Pharmacogenomics", "Studies genetic variants (SNPs) affecting drug metabolism (CYP450 polymorphisms), receptor sensitivity, and drug efficacy/toxicity.", C.teal],
    ["Targeted Cancer Therapy", "Drugs designed for specific molecular targets: imatinib (BCR-ABL), trastuzumab (HER2), vemurafenib (BRAF V600E).", C.lilacDeep],
    ["Biomarker-Based Dosing", "Drug selection and dosing based on individual biomarkers — warfarin dosing (VKORC1/CYP2C9 genotyping), clopidogrel (CYP2C19).", C.navy],
    ["Reducing ADRs", "Personalized approach identifies patients at risk for adverse drug reactions — prevents harm, reduces healthcare costs.", C.rose],
    ["Future Vision", "Liquid biopsy, real-time genomic monitoring, AI-integrated therapy selection for every individual patient.", C.teal],
  ];

  pmCards.forEach(([title, body, col], i) => {
    const col2 = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col2 * 4.85;
    const y = 2.4 + row * 1.0;
    s.addShape("roundRect", { x, y, w: 4.55, h: 0.88, rectRadius: 0.08,
      fill: { color: C.white, transparency: 10 }, line: { color: col } });
    s.addShape("rect", { x, y, w: 0.12, h: 0.88, fill: { color: col }, line: { color: col } });
    s.addText(title, { x: x+0.22, y: y+0.04, w: 4.25, h: 0.26, fontSize: 10, bold: true, color: col, fontFace: "Calibri" });
    s.addText(body, { x: x+0.22, y: y+0.3, w: 4.25, h: 0.54, fontSize: 9.5, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 23 — Drug Development Process
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.sky };
  addHeaderBar(s, "Modern Drug Development: From Discovery to Clinic", C.navy);

  const stages = [
    { stage: "1. Discovery", detail: "Target ID → Hit finding → Lead optimization", time: "2–4 yr", color: C.teal },
    { stage: "2. Preclinical", detail: "In vitro/in vivo testing. Toxicology, pharmacokinetics, formulation.", time: "1–3 yr", color: C.lilacDeep },
    { stage: "3. Phase I", detail: "First-in-human. Safety, tolerability, PK/PD. 20–80 healthy volunteers.", time: "1–2 yr", color: C.rose },
    { stage: "4. Phase II", detail: "Proof of concept. Efficacy signal. 100–300 patients. Dose finding.", time: "2–3 yr", color: C.navy },
    { stage: "5. Phase III", detail: "Pivotal RCT. Efficacy vs. standard of care. 1,000+ patients.", time: "3–5 yr", color: C.teal },
    { stage: "6. Approval", detail: "NDA/BLA submission to FDA/EMA. Regulatory review & approval.", time: "1–2 yr", color: "7B8A4E" },
    { stage: "7. Phase IV", detail: "Post-marketing surveillance. Real-world safety. Pharmacovigilance.", time: "Ongoing", color: C.rose },
  ];

  // Horizontal pipeline arrows
  stages.forEach(({ stage, detail, time, color }, i) => {
    const x = 0.2 + i * 1.37;
    const w = 1.22;
    s.addShape("rect", { x, y: 2.0, w, h: 1.6,
      fill: { color: color, transparency: 55 }, line: { color: color } });
    s.addText(stage, { x: x+0.04, y: 2.05, w: w-0.08, h: 0.4, fontSize: 8, bold: true, color: color, fontFace: "Calibri", align: "center" });
    s.addText(detail, { x: x+0.04, y: 2.45, w: w-0.08, h: 0.85, fontSize: 7, color: C.navy, fontFace: "Calibri" });
    s.addText(time, { x: x+0.04, y: 3.62, w: w-0.08, h: 0.28, fontSize: 7.5, bold: true, color: color, fontFace: "Calibri", align: "center" });
    // Arrow connector
    if (i < stages.length - 1) {
      s.addShape("rect", { x: x+w, y: 2.72, w: 0.15, h: 0.16,
        fill: { color: C.charcoal }, line: { color: C.charcoal } });
    }
  });

  s.addText("Average time: 10–15 years  |  Average cost: >$2 billion  |  Success rate: ~12% from Phase I to approval",
    { x: 0.4, y: 4.05, w: 9.2, h: 0.42, fontSize: 10.5, bold: true, color: C.rose, fontFace: "Calibri", align: "center" });

  s.addShape("roundRect", { x: 0.3, y: 4.6, w: 9.4, h: 0.75, rectRadius: 0.08,
    fill: { color: C.mint, transparency: 20 }, line: { color: C.teal } });
  s.addText("AI-Assisted Discovery can reduce preclinical phase by 30–50% | Adaptive trial designs reduce Phase II/III timelines | Basket trials enable multi-cancer studies",
    { x: 0.5, y: 4.65, w: 9.0, h: 0.62, fontSize: 9.5, color: C.teal, fontFace: "Calibri", align: "center" });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 24 — Drug Safety & Adverse Drug Reactions
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.blush };
  addHeaderBar(s, "Drug Safety, ADRs & Pharmacovigilance", C.rose);

  s.addText("Historical drug tragedies shaped modern regulatory science — every regulation has a story.",
    { x: 0.4, y: 1.05, w: 9.2, h: 0.38, fontSize: 11, italic: true, color: C.charcoal, fontFace: "Calibri" });

  const safetyItems = [
    {
      title: "Thalidomide Disaster (1957–1962)",
      body: "Used for morning sickness → teratogenicity → ~10,000 infants with phocomelia. Led to strict pregnancy safety testing regulations worldwide.",
      color: C.rose
    },
    {
      title: "Adverse Drug Reactions (ADRs)",
      body: "Type A (predictable, dose-dependent): 80% of ADRs. Type B (idiosyncratic, unpredictable): immune-mediated or genetic. Type C–F classification.",
      color: C.lilacDeep
    },
    {
      title: "Pharmacovigilance",
      body: "Systematic monitoring of drug safety post-approval. WHO-UMC VigiBase. National pharmacovigilance programs. Signal detection via WHO-ART coding.",
      color: C.teal
    },
    {
      title: "Therapeutic Drug Monitoring (TDM)",
      body: "Essential for narrow TI drugs: digoxin, lithium, phenytoin, aminoglycosides, vancomycin, methotrexate. Trough/peak levels guide dosing.",
      color: C.navy
    },
  ];

  safetyItems.forEach(({ title, body, color }, i) => {
    s.addShape("roundRect", { x: 0.3, y: 1.55 + i*1.0, w: 9.4, h: 0.86, rectRadius: 0.1,
      fill: { color: C.white, transparency: 10 }, line: { color: color } });
    s.addShape("rect", { x: 0.3, y: 1.55 + i*1.0, w: 0.14, h: 0.86, fill: { color: color }, line: { color: color } });
    s.addText(title, { x: 0.56, y: 1.6 + i*1.0, w: 8.85, h: 0.27, fontSize: 11, bold: true, color: color, fontFace: "Calibri" });
    s.addText(body, { x: 0.56, y: 1.88 + i*1.0, w: 8.85, h: 0.48, fontSize: 10, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 25 — Antimicrobial Resistance
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.cream };
  addHeaderBar(s, "Current Challenge: Antimicrobial Resistance (AMR)", C.rose);

  s.addShape("roundRect", { x: 0.3, y: 1.1, w: 9.4, h: 0.92, rectRadius: 0.1,
    fill: { color: "FCE4D6", transparency: 20 }, line: { color: C.rose } });
  s.addText("WHO classifies AMR as one of the greatest threats to global health, food security, and development. An estimated 1.27 million deaths globally attributed to AMR in 2019.",
    { x: 0.5, y: 1.17, w: 9.0, h: 0.82, fontSize: 11, color: C.navy, fontFace: "Calibri", valign: "middle" });

  const amrPts = [
    ["Mechanisms of Resistance", "β-lactamase production, efflux pumps, target modification (PBP mutations), outer membrane impermeability, enzymatic drug inactivation.", C.rose],
    ["ESKAPE Pathogens", "Enterococcus faecium, S. aureus, Klebsiella pneumoniae, Acinetobacter baumannii, Pseudomonas aeruginosa, Enterobacter spp. — high-priority resistant organisms.", C.navy],
    ["Stewardship", "Antimicrobial Stewardship Programs (ASP) — core strategy: right drug, right dose, right duration. De-escalation, culture-guided therapy.", C.teal],
    ["New Approaches", "Novel β-lactam combinations (ceftazidime-avibactam), bacteriophage therapy, antimicrobial peptides, CRISPR-based antibacterials, immunotherapy.", C.lilacDeep],
  ];

  amrPts.forEach(([title, body, col], i) => {
    s.addShape("roundRect", { x: 0.3, y: 2.18 + i*0.82, w: 9.4, h: 0.68, rectRadius: 0.08,
      fill: { color: C.white, transparency: 15 }, line: { color: col } });
    s.addShape("rect", { x: 0.3, y: 2.18 + i*0.82, w: 0.12, h: 0.68, fill: { color: col }, line: { color: col } });
    s.addText(title, { x: 0.55, y: 2.22 + i*0.82, w: 2.0, h: 0.24, fontSize: 10, bold: true, color: col, fontFace: "Calibri" });
    s.addText(body, { x: 2.65, y: 2.2 + i*0.82, w: 6.9, h: 0.56, fontSize: 9.5, color: C.navy, fontFace: "Calibri", valign: "middle" });
    s.addShape("rect", { x: 2.6, y: 2.22 + i*0.82, w: 0.04, h: 0.62, fill: { color: C.lightPurp }, line: { color: C.lightPurp } });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 26 — Ethical Challenges in Modern Pharmacology
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.lavender };
  addHeaderBar(s, "Ethical & Regulatory Challenges", C.lilacDeep);

  const ethics = [
    {
      title: "Genetic Engineering & Germline Editing",
      body: "CRISPR germline editing raises concerns about heritable genetic changes, consent of future generations, equitable access, and unintended off-target effects.",
      icon: "🧬"
    },
    {
      title: "Clinical Trial Ethics",
      body: "Declaration of Helsinki principles, informed consent, vulnerable population protection, equipoise, data sharing transparency, placebo use ethics.",
      icon: "📋"
    },
    {
      title: "Access & Global Health Equity",
      body: "Widening gap between developed and developing countries in access to advanced biologics, monoclonal antibodies, gene therapies, and precision medicines.",
      icon: "🌍"
    },
    {
      title: "AI & Data Privacy",
      body: "AI-driven drug discovery uses genomic and patient data — raises concerns about data ownership, privacy, algorithmic bias, and regulatory oversight.",
      icon: "🤖"
    },
    {
      title: "Off-Label Drug Use",
      body: "Common in practice (>20% of prescriptions). Balancing innovation with safety evidence. Regulatory frameworks vary globally.",
      icon: "⚖️"
    },
    {
      title: "Drug Pricing & Commercialization",
      body: "R&D cost vs. affordability. Orphan drug incentives. Patent cliffs and generic competition. Value-based pricing models.",
      icon: "💰"
    },
  ];

  ethics.forEach(({ title, body, icon }, i) => {
    const col2 = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col2 * 4.85;
    const y = 1.1 + row * 1.42;
    s.addShape("roundRect", { x, y, w: 4.55, h: 1.25, rectRadius: 0.1,
      fill: { color: C.white, transparency: 10 }, line: { color: C.lilacDeep } });
    s.addText(icon, { x, y: y+0.05, w: 0.65, h: 0.5, fontSize: 20, align: "center" });
    s.addText(title, { x: x+0.65, y: y+0.06, w: 3.75, h: 0.3, fontSize: 10, bold: true, color: C.lilacDeep, fontFace: "Calibri" });
    s.addText(body, { x: x+0.65, y: y+0.38, w: 3.75, h: 0.82, fontSize: 9, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 27 — Future of Pharmacology
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.mint };
  addHeaderBar(s, "Future Directions in Pharmacology", C.teal);

  const future = [
    { icon: "🎯", title: "Precision & Personalized Medicine", body: "Pharmacogenomic-guided therapy selection. Every patient gets the right drug at the right dose." },
    { icon: "🧬", title: "Gene & Cell Therapy", body: "CAR-T cells, viral vector gene therapy, base editing, prime editing — curative potential for genetic diseases." },
    { icon: "🤖", title: "AI & Computational Pharmacology", body: "Machine learning for de novo drug design, toxicity prediction, and biomarker discovery at unprecedented speed." },
    { icon: "🔬", title: "Nanomedicine", body: "Nanoparticle drug delivery systems targeting tumors, crossing BBB, enabling organ-specific drug release." },
    { icon: "💊", title: "mRNA Therapeutics", body: "Beyond COVID-19 vaccines — mRNA for cancer immunotherapy, rare genetic diseases, cardiac repair (demonstrated in COVID era)." },
    { icon: "🌿", title: "Microbiome Pharmacology", body: "Gut microbiome influences drug metabolism, efficacy, and ADRs. Emerging field of pharmacomicrobiomics." },
  ];

  future.forEach(({ icon, title, body }, i) => {
    const col2 = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.3 + col2 * 3.22;
    const y = 1.1 + row * 2.1;
    s.addShape("roundRect", { x, y, w: 3.0, h: 1.92, rectRadius: 0.12,
      fill: { color: C.white, transparency: 10 }, line: { color: C.teal } });
    s.addText(icon, { x, y: y+0.1, w: 3.0, h: 0.5, fontSize: 24, align: "center" });
    s.addText(title, { x: x+0.1, y: y+0.65, w: 2.8, h: 0.36, fontSize: 10, bold: true, color: C.teal, fontFace: "Calibri", align: "center" });
    s.addText(body, { x: x+0.1, y: y+1.05, w: 2.8, h: 0.82, fontSize: 9, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 28 — Comprehensive Timeline (Modern Era)
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.sky };
  addHeaderBar(s, "Modern Pharmacology Timeline: 20th–21st Century", C.navy);

  if (images.cancerImmuno) {
    s.addImage({ data: images.cancerImmuno, x: 0.3, y: 1.08, w: 9.4, h: 4.25 });
    s.addText("Cancer Immunotherapy Timeline — illustrating the evolution of receptor-targeted biologic therapies from 1980s to 2020",
      { x: 0.3, y: 5.35, w: 9.4, h: 0.35, fontSize: 8, italic: true, color: C.charcoal, fontFace: "Calibri", align: "center" });
  } else {
    const mEvents = [
      ["1909", "Salvarsan — Ehrlich"],
      ["1928", "Penicillin — Fleming"],
      ["1935", "Sulfonamides — Domagk"],
      ["1942", "Nitrogen mustard — first chemotherapy"],
      ["1949", "Cortisone — Hench"],
      ["1960", "Oral contraceptive pill"],
      ["1982", "Recombinant insulin"],
      ["1987", "Statins — lovastatin"],
      ["1998", "Trastuzumab — mAb therapy"],
      ["2001", "Imatinib — targeted cancer therapy"],
      ["2012", "CRISPR-Cas9"],
      ["2020", "mRNA vaccines"],
    ];
    s.addShape("rect", { x: 0.5, y: 3.0, w: 9.0, h: 0.06, fill: { color: C.navy }, line: { color: C.navy } });
    mEvents.forEach(([yr, evt], i) => {
      const x = 0.5 + i * 0.78;
      const top = i % 2 === 0;
      timelineDot(s, x, 3.0, i % 3 === 0 ? C.teal : (i % 3 === 1 ? C.rose : C.lilacDeep));
      s.addText(yr, { x: x-0.38, y: top ? 1.7 : 3.25, w: 0.76, h: 0.28, fontSize: 7.5, bold: true, color: C.navy, fontFace: "Calibri", align: "center" });
      s.addText(evt, { x: x-0.38, y: top ? 1.98 : 3.55, w: 0.76, h: 0.55, fontSize: 7, color: C.charcoal, fontFace: "Calibri", align: "center" });
    });
  }
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 29 — Summary: A Scientific Journey
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.lavender };
  addHeaderBar(s, "Summary: A Scientific Journey", C.lilacDeep);

  const summary = [
    { num: "01", title: "From Herbs to Molecules", body: "Transition from crude plant extracts to purified chemical compounds revolutionized precise dosing and drug standardization.", color: C.teal },
    { num: "02", title: "The Scientific Transition", body: "Buchheim and Schmiedeberg established academic and experimental frameworks — made pharmacology a rigorous science.", color: C.rose },
    { num: "03", title: "Targeted Therapy", body: "Ehrlich's chemotherapy and Fleming's antibiotics defined mid-20th century medical triumphs in infection and cancer.", color: C.lilacDeep },
    { num: "04", title: "Modern Precision", body: "Integration of molecular biology and genetics allows tailored drug development with improved safety and efficacy.", color: C.navy },
    { num: "05", title: "Technology & Innovation", body: "CRISPR, mAbs, AI, mRNA — future pharmacology is data-driven, genetically targeted, and personalized.", color: C.teal },
    { num: "06", title: "Ethical Foundation", body: "Drug safety lessons (thalidomide, AMR) shaped modern regulations. Ethical practice remains pharmacology's guiding principle.", color: C.rose },
  ];

  summary.forEach(({ num, title, body, color }, i) => {
    const col2 = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col2 * 4.85;
    const y = 1.1 + row * 1.42;
    s.addShape("roundRect", { x, y, w: 4.55, h: 1.25, rectRadius: 0.1,
      fill: { color: C.white, transparency: 10 }, line: { color: color } });
    s.addShape("ellipse", { x: x+0.12, y: y+0.12, w: 0.5, h: 0.5,
      fill: { color: color, transparency: 30 }, line: { color: color } });
    s.addText(num, { x: x+0.12, y: y+0.12, w: 0.5, h: 0.5,
      fontSize: 12, bold: true, color: color, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addText(title, { x: x+0.72, y: y+0.08, w: 3.7, h: 0.32, fontSize: 11, bold: true, color: color, fontFace: "Calibri" });
    s.addText(body, { x: x+0.72, y: y+0.42, w: 3.7, h: 0.78, fontSize: 9.5, color: C.navy, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 30 — Conclusion / Closing Quote
// ══════════════════════════════════════════════════════════════════════════════
{
  let s = pres.addSlide();
  s.background = { color: C.lavender };
  // Decorative circles
  s.addShape("ellipse", { x: 7.5, y: -0.5, w: 3.5, h: 3.5, fill: { color: C.lightPurp, transparency: 55 }, line: { color: C.lightPurp, transparency: 55 } });
  s.addShape("ellipse", { x: -0.5, y: 3.5, w: 2.8, h: 2.8, fill: { color: C.lightMint, transparency: 55 }, line: { color: C.lightMint, transparency: 55 } });

  s.addText("Conclusion", {
    x: 0.5, y: 0.4, w: 9, h: 0.55, fontSize: 26, bold: true, color: C.lilacDeep, fontFace: "Calibri"
  });
  s.addShape("rect", { x: 0.5, y: 0.95, w: 5.0, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });

  const conclusions = [
    "Pharmacology has evolved from traditional healing to evidence-based science.",
    "Key milestones — from early experimentation to modern drug discovery — shaped global healthcare.",
    "Contributions of pioneers (Paracelsus, Harvey, Buchheim, Schmiedeberg, Ehrlich, Fleming) built strong foundations.",
    "Advances such as antibiotics, receptor theory, and biotechnology revolutionized treatment.",
    "Ethical lessons continue to guide safe and effective drug use worldwide.",
    "The future lies in personalized medicine, AI-driven discovery, and precision therapeutics.",
  ];

  conclusions.forEach((text, i) => {
    s.addShape("ellipse", { x: 0.5, y: 1.12 + i*0.68, w: 0.2, h: 0.2,
      fill: { color: C.teal }, line: { color: C.teal } });
    s.addText(text, { x: 0.82, y: 1.08 + i*0.68, w: 8.5, h: 0.55, fontSize: 11, color: C.navy, fontFace: "Calibri" });
  });

  // Quote box
  s.addShape("roundRect", { x: 0.5, y: 5.02, w: 9.0, h: 0.5, rectRadius: 0.1,
    fill: { color: C.lilacDeep, transparency: 20 }, line: { color: C.lilacDeep } });
  s.addText('"Pharmacology is not just the study of drugs — it is the science of improving life."',
    { x: 0.65, y: 5.05, w: 8.7, h: 0.42, fontSize: 11.5, italic: true, bold: true,
      color: C.lilacDeep, fontFace: "Calibri", align: "center", valign: "middle" });
}

// ─── Write File ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/pharmacology-ppt/Introduction_to_Pharmacology.pptx" })
  .then(() => console.log("✅ Presentation saved."))
  .catch(e => console.error("Error:", e));
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.