Connective tissue it's types it's classification Cells ECM function make me short notes

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
I have enough content now to write comprehensive short notes. Let me compile everything.

Connective Tissue - Short Notes


1. Introduction

Connective tissue (CT) is one of the four basic tissue types. Unlike epithelium, its cells are widely separated from each other, and the space between them is filled by the extracellular matrix (ECM), which largely defines the tissue's character.
Origin: Almost all CT derives from mesoderm (middle germ layer), via a primitive embryonic CT called mesenchyme. Exception: in the head region, some CT comes from neural crest cells (ectoderm).
General functions:
  • Physical support and connection of tissues/organs
  • Structural framework (stroma) for organ parenchyma
  • Defense and immunity (via immune cells)
  • Nutrient/metabolite diffusion medium
  • Wound repair and regeneration

2. Classification of Connective Tissue

(Based on cell composition, ECM organization, and function)

A. Embryonic Connective Tissue

TypeFeaturesLocation
MesenchymeSpindle-shaped undifferentiated cells; sparse fine collagen; viscous ground substance; cells linked by gap junctionsEmbryo (mesodermal layer)
Mucous (Mucoid) CTLarge fibroblasts in viscous matrix rich in hyaluronan; sparse collagenUmbilical cord (Wharton's jelly)

B. Connective Tissue Proper

TypeFeaturesExamples
Loose (Areolar) CTMany cell types; loosely arranged collagen + elastic fibers; abundant ground substanceLamina propria of GI tract, beneath epithelia
Dense Irregular CTMostly fibroblasts; thick collagen fibers in random arrangement; little ground substanceDermis, organ capsules, submucosa
Dense Regular CTParallel collagen bundles; aligned fibroblasts; minimal ground substanceTendons, ligaments, aponeuroses, corneal stroma

C. Specialized Connective Tissue

TypeDistinguishing Feature
CartilageMatrix rich in water + hyaluronan aggregates; chondrocytes
BoneMineralized matrix (Ca²⁺ + phosphate + collagen); osteocytes
BloodFluid ECM (plasma); erythrocytes, leukocytes, platelets
Adipose tissueDominant feature = adipocytes (not ECM); energy storage
Reticular CTDelicate collagen III (reticulin) network + reticular cells
Hemopoietic / Lymphatic tissueSupports blood-forming and immune cells

3. Cells of Connective Tissue

Resident (Fixed) Cells

CellOriginFunction
Fibroblast (active) / Fibrocyte (inactive)MesenchymeSynthesize & maintain ECM components (collagen, elastic fibers, ground substance)
AdipocyteMesenchymeStore triglycerides; secrete hormones (energy homeostasis)
Mast cellBone marrow precursorGranules contain histamine, heparin, leukotrienes - mediate allergic/inflammatory reactions
Reticular cellMesenchymeForm reticular (collagen III) fiber framework in lymphoid organs

Wandering (Transient) Cells - Immigrate from Blood

CellOriginFunction
MacrophageMonocyte (blood)Phagocytosis of debris/pathogens, ECM turnover, antigen presentation
Plasma cellB lymphocyteSecrete specific antibodies (immunoglobulins)
NeutrophilBone marrowFirst-line defense; phagocytosis of bacteria
EosinophilBone marrowAnti-parasitic; modulates allergic reactions
LymphocyteBone marrowImmune surveillance; T & B cell functions

4. Extracellular Matrix (ECM)

The ECM has two major components: fibers and ground substance.

A. Fibers

1. Collagen Fibers

  • Most abundant protein in the body (~20 types)
  • Made of tropocollagen molecules (300 nm long × 1.5 nm thick), assembled into fibrils, then fibers, then bundles
  • Characteristic 68 nm banding pattern (visible on EM)
  • Covalently cross-linked via lysine/hydroxylysine bonds - provides tensile strength
  • Key collagen types:
TypeLocation
Type ISkin, bone, tendons, ligaments (most common)
Type IICartilage
Type IIIReticular fibers (lymphoid organs, blood vessels)
Type IVBasement membrane
Type VIIAnchoring fibrils at dermal-epidermal junction
  • Synthesis: Fibroblasts → procollagen (in RER, hydroxylation of Pro + Lys) → secretion → cleavage of terminal ends → collagen molecules → cross-linking → fibrils → fibers

2. Elastic Fibers

  • Allow tissue to stretch and recoil
  • Made of elastin (core) + fibrillin microfibrils (scaffold)
  • Found in: skin, lung parenchyma, elastic arteries, ligamentum flavum
  • Stain with orcein or Weigert's stain (not with H&E)

3. Reticular Fibers

  • Thin collagen type III fibers forming delicate 3D networks
  • Stain black with silver impregnation (argyrophilic)
  • Form the stroma of bone marrow, liver, spleen, lymph nodes

B. Ground Substance

  • Amorphous, gel-like material filling space between cells and fibers
  • Composed of:
    • Glycosaminoglycans (GAGs): Long unbranched polysaccharide chains; highly hydrophilic (attract water)
      • Hyaluronic acid (hyaluronan) - non-sulfated, most abundant
      • Heparan sulfate, Chondroitin sulfate, Dermatan sulfate, Keratan sulfate
    • Proteoglycans: Core protein + GAG chains; form large aggregates (e.g., aggrecan in cartilage)
    • Multiadhesive glycoproteins: Link cells to ECM
      • Fibronectin - attaches cells to collagen/fibrin
      • Laminin - major component of basement membranes; attaches epithelium to basal lamina
Functions of ground substance:
  • Fills intercellular space
  • Provides hydration (traps water via GAGs)
  • Medium for metabolite diffusion between blood and cells
  • Acts as a molecular sieve (filter for movement of cells/molecules)
  • Regulates cell signaling and behavior

5. Quick Summary Table

ComponentSubtypes / ExamplesKey Function
Embryonic CTMesenchyme, MucoidPrecursor to all adult CT
CT ProperLoose, Dense irregular, Dense regularSupport, protection, connection
Specialized CTBone, Cartilage, Blood, Adipose, ReticularSpecialized structural/metabolic roles
Resident cellsFibroblast, Adipocyte, Mast cellECM production, energy storage, inflammation
Transient cellsMacrophage, Plasma cell, LymphocyteImmunity, phagocytosis
Collagen fibersTypes I-IV mainlyTensile strength
Elastic fibersElastin + fibrillinElasticity/recoil
Reticular fibersCollagen IIIOrgan stroma scaffold
GAGsHyaluronan, chondroitin sulfate, etc.Hydration, diffusion medium
Adhesive glycoproteinsFibronectin, LamininCell-ECM adhesion

Sources: Histology: A Text and Atlas with Correlated Cell and Molecular Biology (Pawlina); Junqueira's Basic Histology, 17e

Make me pptx of this with Diagrams

Reading File
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/connective-tissue-pptx && ls /home/daytona/workspace/connective-tissue-pptx

Writing File

~/connective-tissue-pptx/make_pptx.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Connective Tissue - Short Notes";
pres.author = "Orris Medical";

// ─── PALETTE ───────────────────────────────────────────────
const C = {
  navy:    "0D2137",
  teal:    "0A7E8C",
  tealL:   "12A8BA",
  gold:    "E8A020",
  white:   "FFFFFF",
  offW:    "F0F6FA",
  light:   "D6EEF2",
  grey:    "6B8496",
  dark:    "1B3A52",
  accent:  "F25C2E",
  green:   "2E9E6B",
  purple:  "6B42A0",
  softBg:  "EAF6F8",
};

// ─── HELPER: dark header slide ──────────────────────────────
function darkBg(slide) {
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy }, line: { color: C.navy } });
}

// ─── HELPER: section header bar ─────────────────────────────
function sectionHeader(slide, title, subtitle) {
  darkBg(slide);
  // accent bar
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 2.4, w: 10, h: 0.08, fill: { color: C.teal }, line: { color: C.teal } });
  slide.addText(title, { x: 0.6, y: 1.4, w: 8.8, h: 1.0, fontSize: 42, bold: true, color: C.white, fontFace: "Calibri", align: "center" });
  if (subtitle) slide.addText(subtitle, { x: 0.6, y: 2.6, w: 8.8, h: 0.8, fontSize: 18, color: C.light, fontFace: "Calibri", align: "center", italic: true });
}

// ─── HELPER: content slide background ───────────────────────
function contentBg(slide) {
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offW }, line: { color: C.offW } });
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: C.navy }, line: { color: C.navy } });
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.75, w: 10, h: 0.06, fill: { color: C.teal }, line: { color: C.teal } });
}

// ─── HELPER: slide title bar ─────────────────────────────────
function slideTitle(slide, title) {
  slide.addText(title, { x: 0.3, y: 0.08, w: 9.4, h: 0.6, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0 });
}

// ─── HELPER: card shape ──────────────────────────────────────
function card(slide, x, y, w, h, fillColor) {
  slide.addShape(pres.shapes.ROUNDED_RECTANGLE, { x, y, w, h, fill: { color: fillColor || C.white }, line: { color: C.light, width: 1 }, rectRadius: 0.08,
    shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.1 } });
}

// ─── HELPER: circle badge ────────────────────────────────────
function badge(slide, x, y, r, color, text, textColor) {
  slide.addShape(pres.shapes.ELLIPSE, { x, y, w: r, h: r, fill: { color: color }, line: { color: color } });
  if (text) slide.addText(text, { x, y, w: r, h: r, fontSize: 14, bold: true, color: textColor || C.white, align: "center", valign: "middle", fontFace: "Calibri" });
}

// ─── HELPER: arrow right ─────────────────────────────────────
function arrowRight(slide, x, y) {
  slide.addShape(pres.shapes.RIGHT_ARROW, { x, y, w: 0.5, h: 0.3, fill: { color: C.teal }, line: { color: C.teal } });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 1: TITLE
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkBg(s);
  // decorative circles
  s.addShape(pres.shapes.ELLIPSE, { x: -1.2, y: -1.2, w: 4, h: 4, fill: { color: C.teal, transparency: 80 }, line: { color: C.teal, transparency: 80 } });
  s.addShape(pres.shapes.ELLIPSE, { x: 7.5, y: 3.0, w: 3.5, h: 3.5, fill: { color: C.tealL, transparency: 85 }, line: { color: C.tealL, transparency: 85 } });
  // gold accent bar
  s.addShape(pres.shapes.RECTANGLE, { x: 1.2, y: 2.7, w: 0.12, h: 1.5, fill: { color: C.gold }, line: { color: C.gold } });
  s.addText("Connective Tissue", { x: 1.5, y: 1.2, w: 8, h: 1.0, fontSize: 46, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 1 });
  s.addText("Types  •  Classification  •  Cells  •  ECM  •  Functions", { x: 1.5, y: 2.4, w: 8, h: 0.6, fontSize: 18, color: C.light, fontFace: "Calibri", italic: true });
  s.addShape(pres.shapes.RECTANGLE, { x: 1.5, y: 3.1, w: 7, h: 0.04, fill: { color: C.gold }, line: { color: C.gold } });
  s.addText("Histology Short Notes", { x: 1.5, y: 3.3, w: 7, h: 0.5, fontSize: 14, color: C.grey, fontFace: "Calibri", align: "left" });
  s.addText("Based on Junqueira's Basic Histology & Pawlina's Histology Atlas", { x: 1.5, y: 3.75, w: 7, h: 0.4, fontSize: 11, color: C.grey, fontFace: "Calibri", italic: true });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 2: OVERVIEW – What is Connective Tissue?
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "What is Connective Tissue?");

  // left text block
  card(s, 0.25, 0.9, 4.5, 4.4, C.white);
  s.addText([
    { text: "Definition", options: { bold: true, color: C.teal, breakLine: true, fontSize: 16 } },
    { text: "CT cells are widely separated, with intercellular spaces filled by ECM. The ECM — not the cells — defines CT identity.", options: { color: C.dark, fontSize: 13, breakLine: true } },
    { text: " ", options: { breakLine: true } },
    { text: "Origin", options: { bold: true, color: C.teal, breakLine: true, fontSize: 16 } },
    { text: "Nearly all CT derives from Mesoderm via Mesenchyme.\nException: Head CT from Neural Crest Cells (ectoderm).", options: { color: C.dark, fontSize: 13, breakLine: true } },
    { text: " ", options: { breakLine: true } },
    { text: "Key Concept", options: { bold: true, color: C.teal, breakLine: true, fontSize: 16 } },
    { text: "Classification is based on:\n• ECM composition & organization\n• Cell types present\n• Function of the tissue", options: { color: C.dark, fontSize: 13 } },
  ], { x: 0.45, y: 1.0, w: 4.1, h: 4.1, fontFace: "Calibri", valign: "top" });

  // right: 4-function diagram (quadrant boxes)
  const funcs = [
    { label: "Physical Support", icon: "🔩", color: C.teal },
    { label: "Immunity & Defense", icon: "🛡️", color: C.accent },
    { label: "Nutrient Diffusion", icon: "💧", color: C.green },
    { label: "Wound Repair", icon: "🩹", color: C.gold },
  ];
  s.addText("Core Functions", { x: 5.0, y: 0.85, w: 4.6, h: 0.4, fontSize: 15, bold: true, color: C.teal, fontFace: "Calibri", align: "center" });
  const positions = [[5.0, 1.35], [7.45, 1.35], [5.0, 2.9], [7.45, 2.9]];
  funcs.forEach((f, i) => {
    const [bx, by] = positions[i];
    card(s, bx, by, 2.3, 1.4, C.white);
    s.addShape(pres.shapes.ELLIPSE, { x: bx + 0.9, y: by + 0.05, w: 0.5, h: 0.5, fill: { color: f.color }, line: { color: f.color } });
    s.addText(f.icon, { x: bx + 0.9, y: by + 0.05, w: 0.5, h: 0.5, fontSize: 14, align: "center", valign: "middle" });
    s.addText(f.label, { x: bx + 0.1, y: by + 0.65, w: 2.1, h: 0.6, fontSize: 12, bold: true, color: C.dark, fontFace: "Calibri", align: "center", valign: "middle" });
  });
  // connection lines
  s.addShape(pres.shapes.RECTANGLE, { x: 6.15, y: 2.05, w: 0.04, h: 0.85, fill: { color: C.grey, transparency: 60 }, line: { color: C.grey, transparency: 60 } });
  s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 2.53, w: 4.5, h: 0.04, fill: { color: C.grey, transparency: 60 }, line: { color: C.grey, transparency: 60 } });

  // bottom note
  s.addText("CT forms the supportive STROMA of organs, surrounding the functional PARENCHYMA", {
    x: 0.25, y: 5.1, w: 9.5, h: 0.38, fontSize: 11, color: C.grey, italic: true, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 3: CLASSIFICATION OVERVIEW (tree diagram)
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "Classification of Connective Tissue");

  // Root node
  card(s, 3.5, 0.88, 3.0, 0.65, C.navy);
  s.addText("CONNECTIVE TISSUE", { x: 3.5, y: 0.88, w: 3.0, h: 0.65, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });

  // 3 main branches
  const branches = [
    { label: "Embryonic CT", color: C.purple, x: 0.3, bx: 0.3, by: 2.1 },
    { label: "CT Proper", color: C.teal, x: 3.5, bx: 3.5, by: 2.1 },
    { label: "Specialized CT", color: C.accent, x: 6.7, bx: 6.7, by: 2.1 },
  ];

  // vertical stem
  s.addShape(pres.shapes.RECTANGLE, { x: 4.99, y: 1.53, w: 0.02, h: 0.57, fill: { color: C.grey }, line: { color: C.grey } });
  // horizontal bar
  s.addShape(pres.shapes.RECTANGLE, { x: 1.28, y: 2.09, w: 7.45, h: 0.03, fill: { color: C.grey }, line: { color: C.grey } });

  branches.forEach((b) => {
    card(s, b.bx, b.by, 2.95, 0.62, b.color);
    s.addText(b.label, { x: b.bx, y: b.by, w: 2.95, h: 0.62, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    // vertical lines from bar to branch
    s.addShape(pres.shapes.RECTANGLE, { x: b.bx + 1.47, y: 2.09, w: 0.02, h: 0.02, fill: { color: C.grey }, line: { color: C.grey } });
  });

  // Sub-types under Embryonic
  const eSubs = ["Mesenchyme", "Mucous CT\n(Wharton's Jelly)"];
  eSubs.forEach((t, i) => {
    card(s, 0.15 + i * 1.55, 3.05, 1.4, 0.7, C.softBg);
    s.addText(t, { x: 0.15 + i * 1.55, y: 3.05, w: 1.4, h: 0.7, fontSize: 10, color: C.purple, fontFace: "Calibri", align: "center", valign: "middle", bold: true });
  });
  s.addShape(pres.shapes.RECTANGLE, { x: 0.84, y: 2.71, w: 0.02, h: 0.34, fill: { color: C.purple }, line: { color: C.purple } });
  s.addShape(pres.shapes.RECTANGLE, { x: 0.84, y: 3.04, w: 2.41, h: 0.02, fill: { color: C.purple }, line: { color: C.purple } });

  // Sub-types under CT Proper
  const pSubs = ["Loose\n(Areolar)", "Dense\nIrregular", "Dense\nRegular"];
  pSubs.forEach((t, i) => {
    card(s, 3.15 + i * 1.15, 3.05, 1.05, 0.7, C.softBg);
    s.addText(t, { x: 3.15 + i * 1.15, y: 3.05, w: 1.05, h: 0.7, fontSize: 10, color: C.teal, fontFace: "Calibri", align: "center", valign: "middle", bold: true });
  });
  s.addShape(pres.shapes.RECTANGLE, { x: 4.0, y: 2.71, w: 0.02, h: 0.34, fill: { color: C.teal }, line: { color: C.teal } });
  s.addShape(pres.shapes.RECTANGLE, { x: 3.68, y: 3.04, w: 0.62 + 2.28, h: 0.02, fill: { color: C.teal }, line: { color: C.teal } });

  // Sub-types under Specialized
  const sSubs = ["Cartilage", "Bone", "Blood", "Adipose", "Reticular"];
  sSubs.forEach((t, i) => {
    const col = i % 2 === 0 ? C.softBg : C.offW;
    card(s, 6.6 + (i % 2) * 1.65, 3.05 + Math.floor(i / 2) * 0.8, 1.5, 0.65, col);
    s.addText(t, { x: 6.6 + (i % 2) * 1.65, y: 3.05 + Math.floor(i / 2) * 0.8, w: 1.5, h: 0.65, fontSize: 10, color: C.accent, fontFace: "Calibri", align: "center", valign: "middle", bold: true });
  });
  s.addShape(pres.shapes.RECTANGLE, { x: 8.14, y: 2.71, w: 0.02, h: 0.34, fill: { color: C.accent }, line: { color: C.accent } });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 4: EMBRYONIC CT
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "Embryonic Connective Tissue");

  // left: Mesenchyme
  card(s, 0.25, 0.9, 4.55, 4.35, C.white);
  s.addShape(pres.shapes.RECTANGLE, { x: 0.25, y: 0.9, w: 4.55, h: 0.42, fill: { color: C.purple }, line: { color: C.purple }, rectRadius: 0.08 });
  s.addText("🔬  Mesenchyme", { x: 0.35, y: 0.9, w: 4.35, h: 0.42, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  s.addText([
    { text: "Origin: ", options: { bold: true, color: C.purple } },
    { text: "Mesoderm (+ Neural Crest in head)\n", options: { color: C.dark } },
    { text: "Cells: ", options: { bold: true, color: C.purple } },
    { text: "Small spindle-shaped, uniform; linked by gap junctions; form 3D network\n", options: { color: C.dark } },
    { text: "Matrix: ", options: { bold: true, color: C.purple } },
    { text: "Viscous ground substance; sparse fine collagen & reticular fibers\n", options: { color: C.dark } },
    { text: "Location: ", options: { bold: true, color: C.purple } },
    { text: "Early embryo (mesodermal layer)\n", options: { color: C.dark } },
    { text: "Significance: ", options: { bold: true, color: C.purple } },
    { text: "Stem/progenitor cells → ALL adult CT types, muscle, vascular & urogenital systems", options: { color: C.dark } },
  ], { x: 0.4, y: 1.38, w: 4.2, h: 3.7, fontSize: 12, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.3 });

  // right: Mucous CT
  card(s, 5.05, 0.9, 4.55, 4.35, C.white);
  s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 0.9, w: 4.55, h: 0.42, fill: { color: C.tealL }, line: { color: C.tealL }, rectRadius: 0.08 });
  s.addText("💧  Mucous (Mucoid) CT", { x: 5.15, y: 0.9, w: 4.35, h: 0.42, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  s.addText([
    { text: "Also called: ", options: { bold: true, color: C.teal } },
    { text: "Mucoid CT / Wharton's Jelly\n", options: { color: C.dark } },
    { text: "Cells: ", options: { bold: true, color: C.teal } },
    { text: "Large fibroblasts, randomly arranged\n", options: { color: C.dark } },
    { text: "Matrix: ", options: { bold: true, color: C.teal } },
    { text: "Very loose ECM; highly viscous; rich in hyaluronan; wisps of sparse collagen\n", options: { color: C.dark } },
    { text: "Location: ", options: { bold: true, color: C.teal } },
    { text: "Fetal umbilical cord\n", options: { color: C.dark } },
    { text: "Function: ", options: { bold: true, color: C.teal } },
    { text: "Supports and cushions umbilical blood vessels; protects from compression", options: { color: C.dark } },
  ], { x: 5.2, y: 1.38, w: 4.2, h: 3.7, fontSize: 12, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.3 });

  // note at bottom
  s.addText("Both types are transient — mesenchyme gives rise to all adult connective tissues", {
    x: 0.5, y: 5.18, w: 9.0, h: 0.3, fontSize: 11, italic: true, color: C.grey, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 5: CT PROPER (with comparison diagram)
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "Connective Tissue Proper");

  const types = [
    {
      title: "Loose (Areolar) CT",
      color: C.green,
      icon: "🌱",
      points: [
        "Many cell types (fibroblasts, macrophages, mast cells, plasma cells)",
        "Loosely arranged collagen + elastic fibers",
        "Abundant ground substance",
        "Supports microvasculature & nerves",
        "Acts as immune defense frontier",
        "Location: Lamina propria of GI tract, beneath epithelia, around blood vessels",
      ]
    },
    {
      title: "Dense Irregular CT",
      color: C.gold,
      icon: "🔀",
      points: [
        "Mostly fibroblasts; few other cells",
        "Thick collagen fibers in RANDOM arrangement",
        "Little ground substance",
        "Resists forces from multiple directions",
        "Location: Dermis, organ capsules (kidney, liver, spleen), submucosa of GI tract",
      ]
    },
    {
      title: "Dense Regular CT",
      color: C.teal,
      icon: "➡️",
      points: [
        "Almost entirely parallel collagen bundles",
        "Aligned fibroblasts (tendinocytes)",
        "Minimal ground substance",
        "Resists strong forces in ONE direction",
        "Location: Tendons, ligaments, aponeuroses, corneal stroma",
      ]
    },
  ];

  types.forEach((t, i) => {
    const x = 0.2 + i * 3.27;
    card(s, x, 0.9, 3.1, 4.55, C.white);
    s.addShape(pres.shapes.RECTANGLE, { x, y: 0.9, w: 3.1, h: 0.45, fill: { color: t.color }, line: { color: t.color } });
    s.addText(`${t.icon}  ${t.title}`, { x: x + 0.1, y: 0.9, w: 2.9, h: 0.45, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
    const bullets = t.points.map((p, j) => ({
      text: p,
      options: { bullet: { code: "25CF", color: t.color }, color: C.dark, fontSize: 11, breakLine: j < t.points.length - 1, paraSpaceAfter: 4 }
    }));
    s.addText(bullets, { x: x + 0.15, y: 1.42, w: 2.8, h: 3.9, fontFace: "Calibri", valign: "top" });
  });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 6: SPECIALIZED CT
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "Specialized Connective Tissue");

  const scts = [
    { name: "Cartilage", color: C.teal,   icon: "🦴", feature: "Large water-rich matrix\n(hyaluronan aggregates)", cell: "Chondrocyte", func: "Structural support; low-friction surfaces" },
    { name: "Bone",      color: C.accent,  icon: "🦷", feature: "Mineralized matrix\n(Ca²⁺ + phosphate + collagen)", cell: "Osteocyte", func: "Rigid support; mineral reservoir" },
    { name: "Blood",     color: C.purple,  icon: "🩸", feature: "Fluid ECM = Plasma\n(protein-rich)", cell: "RBC, WBC, Platelets", func: "O₂ transport; immunity; homeostasis" },
    { name: "Adipose",   color: C.gold,    icon: "🔵", feature: "Cells dominate (not ECM)\nLipid droplets inside adipocytes", cell: "Adipocyte", func: "Energy storage; hormone secretion" },
    { name: "Reticular", color: C.green,   icon: "🕸️", feature: "Delicate collagen III\n(reticulin) 3D network", cell: "Reticular cell", func: "Stroma of bone marrow, liver, lymph nodes" },
  ];

  scts.forEach((t, i) => {
    const row = Math.floor(i / 3);
    const col = i % 3;
    const x = 0.2 + col * 3.27;
    const y = 0.92 + row * 2.35;
    const w = i >= 3 ? 4.65 : 3.1;
    const xAdj = i === 3 ? 0.55 : (i === 4 ? 5.25 : x);
    card(s, xAdj, y, w, 2.1, C.white);
    // header
    s.addShape(pres.shapes.RECTANGLE, { x: xAdj, y, w, h: 0.4, fill: { color: t.color }, line: { color: t.color } });
    s.addText(`${t.icon}  ${t.name}`, { x: xAdj + 0.1, y, w: w - 0.2, h: 0.4, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
    s.addText([
      { text: "Key Feature: ", options: { bold: true, color: t.color } },
      { text: t.feature + "\n", options: { color: C.dark } },
      { text: "Cell: ", options: { bold: true, color: t.color } },
      { text: t.cell + "\n", options: { color: C.dark } },
      { text: "Function: ", options: { bold: true, color: t.color } },
      { text: t.func, options: { color: C.dark } },
    ], { x: xAdj + 0.15, y: y + 0.45, w: w - 0.3, h: 1.55, fontSize: 11, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.3 });
  });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 7: CELLS OF CONNECTIVE TISSUE
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "Cells of Connective Tissue");

  // Two-column: Resident vs Wandering
  // Left: Resident cells header
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.2, y: 0.9, w: 4.55, h: 0.42, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.05 });
  s.addText("🏠  RESIDENT (Fixed) Cells", { x: 0.3, y: 0.9, w: 4.35, h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });

  const residentCells = [
    { name: "Fibroblast / Fibrocyte", color: C.teal, desc: "Major CT cell. Synthesizes & maintains ECM (collagen, elastic fibers, ground substance). Fibroblast = active; Fibrocyte = inactive." },
    { name: "Adipocyte", color: C.gold, desc: "Stores triglycerides in intracellular lipid droplets. Secretes hormones (leptin, adiponectin) regulating energy homeostasis." },
    { name: "Mast Cell", color: C.accent, desc: "Bone marrow precursor. Granules: histamine, heparin, leukotrienes. Mediates allergy & inflammatory reactions." },
    { name: "Reticular Cell", color: C.green, desc: "Produces collagen III (reticulin) fibers. Forms 3D stroma scaffold of lymphoid organs." },
  ];

  residentCells.forEach((c, i) => {
    card(s, 0.2, 1.38 + i * 1.0, 4.55, 0.88, C.white);
    s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 1.38 + i * 1.0, w: 0.14, h: 0.88, fill: { color: c.color }, line: { color: c.color } });
    s.addText(c.name, { x: 0.4, y: 1.38 + i * 1.0, w: 4.2, h: 0.33, fontSize: 12, bold: true, color: c.color, fontFace: "Calibri", valign: "middle" });
    s.addText(c.desc, { x: 0.4, y: 1.71 + i * 1.0, w: 4.2, h: 0.55, fontSize: 10.5, color: C.dark, fontFace: "Calibri", valign: "top" });
  });

  // Right: Wandering cells header
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 5.05, y: 0.9, w: 4.7, h: 0.42, fill: { color: C.accent }, line: { color: C.accent }, rectRadius: 0.05 });
  s.addText("🚶  WANDERING (Transient) Cells", { x: 5.15, y: 0.9, w: 4.5, h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });

  const wandCells = [
    { name: "Macrophage", color: C.purple, desc: "From blood monocytes. Phagocytosis of pathogens/debris. ECM turnover. Antigen presentation to lymphocytes." },
    { name: "Plasma Cell", color: C.tealL, desc: "From B lymphocytes. Short-lived. Secretes specific antibodies (immunoglobulins). Abundant RER (clock-face nucleus)." },
    { name: "Neutrophil", color: C.gold, desc: "First-line defense. Phagocytosis of bacteria. Arrive early in acute inflammation. Multi-lobed nucleus." },
    { name: "Eosinophil", color: C.green, desc: "Anti-parasitic. Modulates allergic reactions. Contains large eosinophilic granules. Bi-lobed nucleus." },
    { name: "Lymphocyte", color: C.accent, desc: "Immune surveillance. T cells (cell-mediated) & B cells (humoral immunity). Small, round nucleus." },
  ];

  wandCells.forEach((c, i) => {
    card(s, 5.05, 1.38 + i * 0.82, 4.7, 0.72, C.white);
    s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 1.38 + i * 0.82, w: 0.14, h: 0.72, fill: { color: c.color }, line: { color: c.color } });
    s.addText(c.name, { x: 5.25, y: 1.38 + i * 0.82, w: 4.35, h: 0.28, fontSize: 11.5, bold: true, color: c.color, fontFace: "Calibri", valign: "middle" });
    s.addText(c.desc, { x: 5.25, y: 1.66 + i * 0.82, w: 4.35, h: 0.44, fontSize: 10.5, color: C.dark, fontFace: "Calibri", valign: "top" });
  });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 8: FIBROBLAST & ECM SYNTHESIS (process diagram)
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "ECM Synthesis: Collagen Production by Fibroblast");

  const steps = [
    { label: "1. Transcription\n& Translation", sub: "Fibroblast nucleus\n→ mRNA → Ribosomes", color: C.teal },
    { label: "2. Hydroxylation\nin RER", sub: "Pro + Lys hydroxylated\n(needs Vit C)", color: C.tealL },
    { label: "3. Procollagen\nTriple Helix", sub: "3 α-chains form\nright-handed helix", color: C.purple },
    { label: "4. Secretion\n(Exocytosis)", sub: "Golgi → secretory\nvesicles", color: C.gold },
    { label: "5. Cleavage\nof Ends", sub: "Procollagen peptidases\nremove N & C ends", color: C.accent },
    { label: "6. Collagen\nFibril Assembly", sub: "Molecules aggregate;\ncross-linked by Lys/Hylys", color: C.green },
  ];

  steps.forEach((st, i) => {
    const x = 0.2 + (i % 3) * 3.27;
    const y = i < 3 ? 1.0 : 3.05;
    card(s, x, y, 3.0, 1.78, C.white);
    s.addShape(pres.shapes.ELLIPSE, { x: x + 1.1, y: y + 0.1, w: 0.8, h: 0.55, fill: { color: st.color }, line: { color: st.color } });
    s.addText(`${i + 1}`, { x: x + 1.1, y: y + 0.1, w: 0.8, h: 0.55, fontSize: 18, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    s.addText(st.label, { x: x + 0.1, y: y + 0.68, w: 2.8, h: 0.55, fontSize: 12, bold: true, color: st.color, fontFace: "Calibri", align: "center" });
    s.addText(st.sub, { x: x + 0.1, y: y + 1.2, w: 2.8, h: 0.5, fontSize: 10, color: C.dark, fontFace: "Calibri", align: "center" });
    // arrow right (within row)
    if (i % 3 < 2) {
      arrowRight(s, x + 3.05, y + 0.74);
    }
  });
  // arrow down between rows
  s.addShape(pres.shapes.DOWN_ARROW, { x: 4.7, y: 2.78, w: 0.6, h: 0.28, fill: { color: C.teal }, line: { color: C.teal } });

  s.addText("Final result: Collagen fibrils with characteristic 68 nm banding pattern → bundled into collagen fibers", {
    x: 0.3, y: 5.15, w: 9.4, h: 0.3, fontSize: 11, color: C.grey, italic: true, fontFace: "Calibri", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 9: COLLAGEN TYPES
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "Collagen Types – Key Fibers of ECM");

  // Left: collagen hierarchy diagram
  s.addText("Structural Hierarchy", { x: 0.3, y: 0.9, w: 3.2, h: 0.38, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri", align: "center" });
  const hierarchy = [
    { label: "Triple Helix\n(tropocollagen)\n300 nm × 1.5 nm", color: C.teal, y: 1.35 },
    { label: "Collagen\nFibril\n(cross-linked)", color: C.tealL, y: 2.35 },
    { label: "Collagen\nFiber", color: C.purple, y: 3.35 },
    { label: "Collagen\nBundle", color: C.navy, y: 4.25 },
  ];
  hierarchy.forEach((h, i) => {
    const hw = 2.8 - i * 0.3;
    const hx = 0.3 + (i * 0.15);
    card(s, hx, h.y, hw, 0.78, C.white);
    s.addShape(pres.shapes.RECTANGLE, { x: hx, y: h.y, w: hw, h: 0.18, fill: { color: h.color }, line: { color: h.color } });
    s.addText(h.label, { x: hx, y: h.y + 0.2, w: hw, h: 0.52, fontSize: 10.5, color: h.color, bold: true, fontFace: "Calibri", align: "center", valign: "middle" });
    if (i < hierarchy.length - 1) {
      s.addShape(pres.shapes.DOWN_ARROW, { x: hx + hw / 2 - 0.15, y: h.y + 0.78, w: 0.3, h: 0.2, fill: { color: h.color }, line: { color: h.color } });
    }
  });
  s.addText("68 nm banding\nvisible on EM", { x: 0.35, y: 2.08, w: 1.5, h: 0.35, fontSize: 9, color: C.grey, italic: true, fontFace: "Calibri" });

  // Right: collagen types table
  s.addText("Key Collagen Types", { x: 3.6, y: 0.9, w: 6.1, h: 0.38, fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri", align: "center" });

  const colTypes = [
    { type: "Type I",   loc: "Skin, bone, tendons, ligaments", note: "Most abundant; forms thick fibers" },
    { type: "Type II",  loc: "Cartilage", note: "Fine fibrils; high tensile strength in matrix" },
    { type: "Type III", loc: "Reticular fibers (lymph nodes, liver, BM)", note: "Collagen III = reticulin; stains with silver" },
    { type: "Type IV",  loc: "Basement membranes", note: "Does NOT form fibrils; forms sheets" },
    { type: "Type VII", loc: "Dermo-epidermal junction", note: "Anchoring fibrils; lost in Epidermolysis bullosa" },
  ];
  const rowColors = [C.softBg, C.white, C.softBg, C.white, C.softBg];
  // header
  s.addShape(pres.shapes.RECTANGLE, { x: 3.6, y: 1.35, w: 6.1, h: 0.38, fill: { color: C.navy }, line: { color: C.navy } });
  s.addText([
    { text: "Type", options: { bold: true, color: C.white } },
    { text: "    Location", options: { bold: true, color: C.light } },
    { text: "                        Key Note", options: { bold: true, color: C.gold } },
  ], { x: 3.65, y: 1.35, w: 6.0, h: 0.38, fontSize: 11, fontFace: "Calibri", valign: "middle" });

  colTypes.forEach((ct, i) => {
    const ry = 1.73 + i * 0.72;
    s.addShape(pres.shapes.RECTANGLE, { x: 3.6, y: ry, w: 6.1, h: 0.7, fill: { color: rowColors[i] }, line: { color: C.light } });
    s.addText(ct.type, { x: 3.65, y: ry, w: 0.95, h: 0.7, fontSize: 11.5, bold: true, color: C.teal, fontFace: "Calibri", valign: "middle", align: "center" });
    s.addText(ct.loc, { x: 4.65, y: ry, w: 2.7, h: 0.7, fontSize: 10.5, color: C.dark, fontFace: "Calibri", valign: "middle" });
    s.addText(ct.note, { x: 7.4, y: ry, w: 2.2, h: 0.7, fontSize: 10, color: C.grey, fontFace: "Calibri", valign: "middle", italic: true });
  });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 10: ELASTIC & RETICULAR FIBERS
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "Elastic & Reticular Fibers");

  // Elastic
  card(s, 0.2, 0.9, 4.6, 4.4, C.white);
  s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 0.9, w: 4.6, h: 0.42, fill: { color: C.gold }, line: { color: C.gold } });
  s.addText("🌀  Elastic Fibers", { x: 0.3, y: 0.9, w: 4.4, h: 0.42, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });

  s.addText([
    { text: "Composition:\n", options: { bold: true, color: C.gold, breakLine: true } },
    { text: "• Elastin core (amorphous protein)\n• Fibrillin microfibrils (scaffold for elastin)\n", options: { color: C.dark, breakLine: true } },
    { text: "Property:\n", options: { bold: true, color: C.gold, breakLine: true } },
    { text: "• Stretch up to 150% then recoil\n• Rich in hydrophobic amino acids (Gly, Val, Ala, Pro)\n", options: { color: C.dark, breakLine: true } },
    { text: "Staining:\n", options: { bold: true, color: C.gold, breakLine: true } },
    { text: "• Orcein or Weigert's stain (NOT H&E)\n", options: { color: C.dark, breakLine: true } },
    { text: "Locations:\n", options: { bold: true, color: C.gold, breakLine: true } },
    { text: "• Lung parenchyma (allows lung expansion)\n• Elastic arteries (aorta, pulmonary)\n• Skin (dermis)\n• Ligamentum flavum & nuchae\n• Vocal cords", options: { color: C.dark } },
  ], { x: 0.35, y: 1.4, w: 4.3, h: 3.75, fontSize: 12, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.25 });

  // Reticular
  card(s, 5.1, 0.9, 4.6, 4.4, C.white);
  s.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 0.9, w: 4.6, h: 0.42, fill: { color: C.green }, line: { color: C.green } });
  s.addText("🕸️  Reticular Fibers", { x: 5.2, y: 0.9, w: 4.4, h: 0.42, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });

  s.addText([
    { text: "Composition:\n", options: { bold: true, color: C.green, breakLine: true } },
    { text: "• Collagen TYPE III\n• Also called reticulin\n", options: { color: C.dark, breakLine: true } },
    { text: "Structure:\n", options: { bold: true, color: C.green, breakLine: true } },
    { text: "• Thin, delicate fibers\n• Form 3D network (not bundles)\n", options: { color: C.dark, breakLine: true } },
    { text: "Staining:\n", options: { bold: true, color: C.green, breakLine: true } },
    { text: "• Silver impregnation stain\n  (fibers appear BLACK / argyrophilic)\n", options: { color: C.dark, breakLine: true } },
    { text: "Locations (organ stroma):\n", options: { bold: true, color: C.green, breakLine: true } },
    { text: "• Bone marrow (hemopoietic stroma)\n• Liver sinusoids\n• Lymph nodes & spleen\n• Pancreas, adrenal glands", options: { color: C.dark } },
  ], { x: 5.25, y: 1.4, w: 4.3, h: 3.75, fontSize: 12, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.25 });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 11: GROUND SUBSTANCE & ECM
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "Ground Substance – ECM Components");

  // Left: GAGs
  card(s, 0.2, 0.88, 4.55, 4.5, C.white);
  s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 0.88, w: 4.55, h: 0.42, fill: { color: C.teal }, line: { color: C.teal } });
  s.addText("Glycosaminoglycans (GAGs)", { x: 0.3, y: 0.88, w: 4.35, h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  s.addText([
    { text: "Long unbranched polysaccharide chains\nHighly hydrophilic — attract & trap water\n\n", options: { color: C.dark, breakLine: true } },
    { text: "Types:\n", options: { bold: true, color: C.teal, breakLine: true } },
    { text: "• Hyaluronic acid (hyaluronan)", options: { bold: true, color: C.dark, breakLine: true } },
    { text: "  - Non-sulfated; most abundant GAG\n  - Forms viscous hydrated gel\n  - Key in joint fluid & embryonic matrix\n", options: { color: C.dark, breakLine: true } },
    { text: "• Chondroitin sulfate ", options: { bold: true, color: C.dark } },
    { text: "— cartilage, bone\n", options: { color: C.dark, breakLine: true } },
    { text: "• Heparan sulfate ", options: { bold: true, color: C.dark } },
    { text: "— BM, cell surfaces\n", options: { color: C.dark, breakLine: true } },
    { text: "• Dermatan sulfate ", options: { bold: true, color: C.dark } },
    { text: "— skin, blood vessels\n", options: { color: C.dark, breakLine: true } },
    { text: "• Keratan sulfate ", options: { bold: true, color: C.dark } },
    { text: "— cartilage, cornea", options: { color: C.dark } },
  ], { x: 0.35, y: 1.36, w: 4.2, h: 3.9, fontSize: 11.5, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.2 });

  // Right: Proteoglycans + Adhesive glycoproteins
  card(s, 5.05, 0.88, 4.7, 2.15, C.white);
  s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 0.88, w: 4.7, h: 0.42, fill: { color: C.purple }, line: { color: C.purple } });
  s.addText("Proteoglycans", { x: 5.15, y: 0.88, w: 4.5, h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  s.addText([
    { text: "= Core protein + covalently attached GAG chains\nForm huge aggregates (e.g. aggrecan in cartilage)\n", options: { color: C.dark, breakLine: true } },
    { text: "Function: ", options: { bold: true, color: C.purple } },
    { text: "Hydration reservoir; resist compressive forces; bind growth factors; regulate cell signaling", options: { color: C.dark } },
  ], { x: 5.2, y: 1.36, w: 4.4, h: 1.6, fontSize: 11.5, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.2 });

  card(s, 5.05, 3.15, 4.7, 2.23, C.white);
  s.addShape(pres.shapes.RECTANGLE, { x: 5.05, y: 3.15, w: 4.7, h: 0.42, fill: { color: C.accent }, line: { color: C.accent } });
  s.addText("Multiadhesive Glycoproteins", { x: 5.15, y: 3.15, w: 4.5, h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  s.addText([
    { text: "Fibronectin: ", options: { bold: true, color: C.accent } },
    { text: "Attaches cells to collagen & fibrin. Important in wound healing & cell migration.\n\n", options: { color: C.dark, breakLine: true } },
    { text: "Laminin: ", options: { bold: true, color: C.accent } },
    { text: "Major component of basement membranes. Anchors epithelial cells to basal lamina. Binds type IV collagen & integrins.", options: { color: C.dark } },
  ], { x: 5.2, y: 3.63, w: 4.4, h: 1.65, fontSize: 11.5, fontFace: "Calibri", valign: "top", lineSpacingMultiple: 1.2 });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 12: ECM FUNCTIONS (visual summary)
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "Functions of the ECM");

  const funcs = [
    { title: "Structural Support", icon: "🏗️", color: C.teal, desc: "Fibers (collagen, elastic, reticular) provide tensile strength, elasticity, and 3D framework" },
    { title: "Hydration", icon: "💧", color: C.tealL, desc: "GAGs attract water → maintains tissue hydration and turgor pressure" },
    { title: "Metabolite Diffusion", icon: "⚡", color: C.gold, desc: "ECM acts as medium for O₂, CO₂, nutrients, and metabolites to diffuse between blood and cells" },
    { title: "Molecular Sieve", icon: "🔬", color: C.purple, desc: "Filters movement of cells & molecules — acts as a selective barrier" },
    { title: "Cell Adhesion", icon: "🔗", color: C.accent, desc: "Fibronectin & Laminin bind integrins on cells, anchoring them to the ECM" },
    { title: "Cell Signaling", icon: "📡", color: C.green, desc: "ECM sequesters growth factors (FGFs, TGF-β); proteoglycans regulate their release and activity" },
  ];

  funcs.forEach((f, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.3 + col * 3.2;
    const y = 0.95 + row * 2.3;
    card(s, x, y, 3.0, 2.1, C.white);
    // icon circle
    s.addShape(pres.shapes.ELLIPSE, { x: x + 1.1, y: y + 0.08, w: 0.8, h: 0.8, fill: { color: f.color }, line: { color: f.color } });
    s.addText(f.icon, { x: x + 1.1, y: y + 0.08, w: 0.8, h: 0.8, fontSize: 20, align: "center", valign: "middle" });
    s.addText(f.title, { x: x + 0.1, y: y + 0.95, w: 2.8, h: 0.42, fontSize: 12, bold: true, color: f.color, fontFace: "Calibri", align: "center" });
    s.addText(f.desc, { x: x + 0.15, y: y + 1.38, w: 2.7, h: 0.62, fontSize: 10.5, color: C.dark, fontFace: "Calibri", align: "center", valign: "top" });
  });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 13: SUMMARY TABLE
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  contentBg(s);
  slideTitle(s, "Quick Reference Summary");

  const rows = [
    { cat: "Embryonic CT", sub: "Mesenchyme\nMucoid CT", cells: "Undiff. mesenchymal\nFibroblasts", ecm: "Sparse collagen\nHyaluronan-rich", fn: "Precursor to all adult CT" },
    { cat: "Loose CT", sub: "Areolar", cells: "Fibroblasts, Macrophages\nMast cells, Plasma cells", ecm: "Loosely arranged collagen\n+ elastic fibers + GS", fn: "Support, immune defense\ndiffusion medium" },
    { cat: "Dense Irregular CT", sub: "Dense CT Proper", cells: "Mostly fibroblasts", ecm: "Thick random collagen\nbundles; little GS", fn: "Resist multidirectional\nforces; protect organs" },
    { cat: "Dense Regular CT", sub: "Dense CT Proper", cells: "Aligned fibroblasts\n(tendinocytes)", ecm: "Parallel collagen\nbundles", fn: "Resist force in\none direction" },
    { cat: "Specialized CT", sub: "Bone / Cartilage\nBlood / Adipose / Reticular", cells: "Osteocytes / Chondrocytes\nRBC, WBC / Adipocytes", ecm: "Mineralized / Hyaluronan\nPlasma / Lipid / Reticulin", fn: "Rigid support / Cushion\nTransport / Energy / Stroma" },
  ];

  // header
  s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 0.88, w: 9.6, h: 0.4, fill: { color: C.navy }, line: { color: C.navy } });
  const headers = ["CT Type", "Subtype", "Cells", "ECM", "Function"];
  const hx = [0.25, 2.15, 4.0, 6.1, 8.0];
  const hw = [1.85, 1.8, 2.05, 1.85, 1.75];
  headers.forEach((h, i) => {
    s.addText(h, { x: hx[i], y: 0.88, w: hw[i], h: 0.4, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  });

  const rColors = [C.softBg, C.white, C.softBg, C.white, C.softBg];
  rows.forEach((r, i) => {
    const ry = 1.28 + i * 0.84;
    s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: ry, w: 9.6, h: 0.82, fill: { color: rColors[i] }, line: { color: C.light } });
    const rowVals = [r.cat, r.sub, r.cells, r.ecm, r.fn];
    rowVals.forEach((rv, j) => {
      s.addText(rv, { x: hx[j] + 0.05, y: ry + 0.04, w: hw[j] - 0.1, h: 0.74, fontSize: 10, color: C.dark, fontFace: "Calibri", valign: "middle", align: "center" });
    });
  });
}

// ══════════════════════════════════════════════════════════════
// SLIDE 14: CLOSING SLIDE
// ══════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkBg(s);
  s.addShape(pres.shapes.ELLIPSE, { x: 7.5, y: -0.8, w: 3.5, h: 3.5, fill: { color: C.teal, transparency: 85 }, line: { color: C.teal, transparency: 85 } });
  s.addShape(pres.shapes.ELLIPSE, { x: -0.8, y: 3.5, w: 3, h: 3, fill: { color: C.tealL, transparency: 88 }, line: { color: C.tealL, transparency: 88 } });
  s.addShape(pres.shapes.RECTANGLE, { x: 3.5, y: 2.45, w: 3, h: 0.06, fill: { color: C.gold }, line: { color: C.gold } });
  s.addText("Key Takeaways", { x: 1.0, y: 0.8, w: 8, h: 0.75, fontSize: 34, bold: true, color: C.white, fontFace: "Calibri", align: "center" });
  const takeaways = [
    "ECM — not cells — defines CT identity",
    "All CT derives from mesenchyme (mesoderm)",
    "Classification: Embryonic → CT Proper → Specialized",
    "Fibroblast = master producer of ECM",
    "Collagen (strength) + Elastic (recoil) + Reticular (scaffold)",
    "Ground substance = GAGs + Proteoglycans + Adhesive glycoproteins",
  ];
  takeaways.forEach((t, i) => {
    s.addText([
      { text: "✓  ", options: { color: C.gold, bold: true } },
      { text: t, options: { color: C.white } },
    ], { x: 1.5, y: 1.75 + i * 0.58, w: 7, h: 0.5, fontSize: 14, fontFace: "Calibri", valign: "middle" });
  });
  s.addText("Sources: Junqueira's Basic Histology 17e | Pawlina's Histology: A Text and Atlas", {
    x: 1.5, y: 5.2, w: 7, h: 0.3, fontSize: 10, color: C.grey, italic: true, fontFace: "Calibri", align: "center"
  });
}

// ─── WRITE FILE ─────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/connective-tissue-pptx/Connective_Tissue_Notes.pptx" })
  .then(() => console.log("✅ Done: Connective_Tissue_Notes.pptx"))
  .catch(e => { console.error("Error:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/connective-tissue-pptx && node make_pptx.js

Running Command

node -e "const p = require('pptxgenjs'); const pr = new p(); console.log(Object.keys(pr.shapes).filter(k => k.includes('RECT') || k.includes('ROUND')).join('\n'));"

Running Command

node -e "const p = require('pptxgenjs'); const pr = new p(); console.log(Object.keys(pr.shapes).filter(k => k.includes('ARROW') || k.includes('DOWN') || k.includes('RIGHT')).join('\n'));"

Editing File

~/connective-tissue-pptx/make_pptx.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/connective-tissue-pptx/make_pptx.js'
Running Command

grep -n "ROUNDED_RECTANGLE" /home/daytona/workspace/connective-tissue-pptx/make_pptx.js

Running Command

sed -i 's/pres\.shapes\.ROUNDED_RECTANGLE, { x: 0\.2, y: 0\.9, w: 4\.55, h: 0\.42, fill: { color: C\.teal }, line: { color: C\.teal }, rectRadius: 0\.05 }/pres.shapes.RECTANGLE, { x: 0.2, y: 0.9, w: 4.55, h: 0.42, fill: { color: C.teal }, line: { color: C.teal } }/' /home/daytona/workspace/connective-tissue-pptx/make_pptx.js && sed -i 's/pres\.shapes\.ROUNDED_RECTANGLE, { x: 5\.05, y: 0\.9, w: 4\.7, h: 0\.42, fill: { color: C\.accent }, line: { color: C\.accent }, rectRadius: 0\.05 }/pres.shapes.RECTANGLE, { x: 5.05, y: 0.9, w: 4.7, h: 0.42, fill: { color: C.accent }, line: { color: C.accent } }/' /home/daytona/workspace/connective-tissue-pptx/make_pptx.js

Reading File
Editing File

~/connective-tissue-pptx/make_pptx.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/connective-tissue-pptx/make_pptx.js'
Editing File

~/connective-tissue-pptx/make_pptx.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/connective-tissue-pptx/make_pptx.js'
Running Command

cd /home/daytona/workspace/connective-tissue-pptx && node make_pptx.js 2>&1

Reading File
Editing File

~/connective-tissue-pptx/make_pptx.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/connective-tissue-pptx/make_pptx.js'
Model call limits exceeded: run limit (20/20)
This is a shared conversation. Sign in to Orris to start your own chat.