Bro read all 3 pdfs carefully and make 1 note from them, with flow charts, diagrams. Ame jt simple, step-by-step, understandable and mention everything from those 3 pdfs

Reading File
Reading File
Running Command

cd "/home/daytona/workspace/attachments/cebb7e5a-bf83-4146-adfb-46cd1dee2e97/" && python3 -c " from pypdf import PdfReader import os files = [ 'Lippincott Biochem 7th edition _260626_115429PDF _260626_155455.PDF', 'Dr_U_Satyanarayana,_U_Chakrapani_Biochemistry_Else_260626_192232.PDF', \"Harper's Illustrated Biochemistry 32rd Edition 202_260626_193528.PDF\" ] for f in files: try: reader = PdfReader(f) total = len(reader.pages) # Get first page text to understand the topic first_text = reader.pages[0].extract_text()[:500] if reader.pages else '' print(f'FILE: {f}') print(f'PAGES: {total}') print(f'FIRST PAGE TEXT: {first_text}') print('---') except Exception as e: print(f'ERROR with {f}: {e}') "

Running Command

cd "/home/daytona/workspace/attachments/cebb7e5a-bf83-4146-adfb-46cd1dee2e97/" && python3 -c " from pypdf import PdfReader files = { 'lippincott': 'Lippincott Biochem 7th edition _260626_115429PDF _260626_155455.PDF', 'satyanarayana': 'Dr_U_Satyanarayana,_U_Chakrapani_Biochemistry_Else_260626_192232.PDF', 'harpers': \"Harper's Illustrated Biochemistry 32rd Edition 202_260626_193528.PDF\" } for key, f in files.items(): reader = PdfReader(f) text = '' for page in reader.pages: text += page.extract_text() + '\n\n--- PAGE BREAK ---\n\n' with open(f'/home/daytona/workspace/{key}_text.txt', 'w') as out: out.write(text) print(f'{key}: {len(reader.pages)} pages, {len(text)} chars saved') "

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Writing File

~/DNA_Nucleic_Acids_Master_Notes.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nucleic Acids & DNA - Master Notes</title>
<style>
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'Segoe UI', Arial, sans-serif; background: #f0f4f8; color: #1a1a2e; line-height: 1.7; }
  
  .cover {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white; text-align: center; padding: 60px 40px;
  }
  .cover h1 { font-size: 2.8em; margin-bottom: 10px; letter-spacing: 2px; }
  .cover h2 { font-size: 1.3em; opacity: 0.8; font-weight: 300; margin-bottom: 20px; }
  .cover .sources { font-size: 0.85em; opacity: 0.6; }
  .cover .badge { display: inline-block; background: #e94560; padding: 5px 15px; border-radius: 20px; margin: 5px; font-size: 0.8em; }

  .toc {
    background: white; max-width: 900px; margin: 30px auto; padding: 30px 40px; border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  }
  .toc h2 { color: #0f3460; border-bottom: 3px solid #e94560; padding-bottom: 10px; margin-bottom: 20px; font-size: 1.4em; }
  .toc ol { padding-left: 20px; }
  .toc li { margin: 8px 0; }
  .toc a { color: #0f3460; text-decoration: none; font-weight: 500; }
  .toc a:hover { color: #e94560; }

  .section {
    background: white; max-width: 900px; margin: 25px auto; padding: 35px 40px; border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  }
  .section h2 {
    font-size: 1.6em; color: #0f3460;
    border-left: 5px solid #e94560; padding-left: 15px;
    margin-bottom: 20px;
  }
  .section h3 { font-size: 1.2em; color: #16213e; margin: 20px 0 10px; }
  .section h4 { font-size: 1.05em; color: #0f3460; margin: 15px 0 8px; }
  .section p { margin-bottom: 12px; }
  .section ul, .section ol { padding-left: 22px; margin-bottom: 12px; }
  .section li { margin: 6px 0; }

  /* Source tags */
  .src { font-size: 0.72em; font-weight: 700; padding: 2px 7px; border-radius: 4px; vertical-align: middle; margin-left: 5px; }
  .src-l { background: #dbeafe; color: #1e40af; }
  .src-s { background: #dcfce7; color: #166534; }
  .src-h { background: #fce7f3; color: #9d174d; }

  /* Key Point Box */
  .keypoint {
    background: #eff6ff; border-left: 4px solid #2563eb;
    padding: 14px 18px; border-radius: 6px; margin: 16px 0;
  }
  .keypoint strong { color: #1e40af; }

  /* Mnemonic Box */
  .mnemonic {
    background: #fef9c3; border-left: 4px solid #eab308;
    padding: 14px 18px; border-radius: 6px; margin: 16px 0;
  }
  .mnemonic .title { font-weight: 700; color: #713f12; margin-bottom: 6px; }

  /* Warning Box */
  .warning {
    background: #fff7ed; border-left: 4px solid #ea580c;
    padding: 14px 18px; border-radius: 6px; margin: 16px 0;
  }

  /* Clinical Box */
  .clinical {
    background: #f0fdf4; border-left: 4px solid #16a34a;
    padding: 14px 18px; border-radius: 6px; margin: 16px 0;
  }
  .clinical .title { font-weight: 700; color: #14532d; margin-bottom: 6px; }

  /* Tables */
  table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.93em; }
  th { background: #0f3460; color: white; padding: 10px 14px; text-align: left; }
  td { padding: 9px 14px; border-bottom: 1px solid #e5e7eb; }
  tr:nth-child(even) td { background: #f8fafc; }
  tr:hover td { background: #eff6ff; }

  /* ===== FLOWCHARTS ===== */
  .flowchart { text-align: center; margin: 24px 0; font-family: 'Segoe UI', Arial, sans-serif; }
  .flowchart-title { font-size: 1.05em; font-weight: 700; color: #0f3460; margin-bottom: 14px; letter-spacing: 0.5px; }
  .fc-box {
    display: inline-block; padding: 10px 22px; border-radius: 8px;
    font-weight: 600; font-size: 0.92em; min-width: 180px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  .fc-start { background: #0f3460; color: white; border-radius: 30px; }
  .fc-process { background: #dbeafe; color: #1e3a8a; border: 2px solid #93c5fd; }
  .fc-decision { background: #fef3c7; color: #78350f; border: 2px solid #fcd34d; transform: rotate(0deg); }
  .fc-result { background: #dcfce7; color: #14532d; border: 2px solid #86efac; }
  .fc-important { background: #ede9fe; color: #4c1d95; border: 2px solid #a78bfa; }
  .fc-enzyme { background: #fee2e2; color: #7f1d1d; border: 2px solid #fca5a5; }
  .fc-arrow { font-size: 1.5em; color: #6b7280; margin: 2px 0; display: block; }
  .fc-arrow-label { font-size: 0.78em; color: #6b7280; font-style: italic; }
  .fc-row { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 6px 0; flex-wrap: wrap; }
  .fc-h-arrow { font-size: 1.3em; color: #6b7280; }

  /* DNA diagram */
  .dna-diagram { font-family: 'Courier New', monospace; text-align: center; margin: 20px auto; background: #1a1a2e; color: #00ff88; padding: 20px; border-radius: 10px; max-width: 420px; font-size: 0.88em; line-height: 1.5; }
  .dna-diagram span.pair { color: #ffdd57; }
  .dna-diagram span.backbone { color: #74b9ff; }
  .dna-diagram span.label { color: #fd79a8; font-style: italic; }

  /* Structure diagram */
  .struct-box { border: 2px solid #cbd5e1; border-radius: 10px; padding: 16px; margin: 14px 0; background: #f8fafc; }
  .struct-box h4 { color: #0f3460; margin-bottom: 10px; font-size: 1em; }
  .struct-inner { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; }
  .struct-part { background: white; border: 2px solid; border-radius: 8px; padding: 10px 16px; text-align: center; font-size: 0.88em; font-weight: 600; min-width: 110px; }
  .struct-part.base { border-color: #a78bfa; color: #4c1d95; background: #ede9fe; }
  .struct-part.sugar { border-color: #f97316; color: #7c2d12; background: #ffedd5; }
  .struct-part.phosphate { border-color: #06b6d4; color: #164e63; background: #cffafe; }
  .struct-plus { font-size: 1.5em; color: #6b7280; font-weight: bold; }

  /* Comparison grid */
  .compare-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 18px 0; }
  .compare-card { border-radius: 10px; padding: 16px; text-align: center; }
  .compare-card h4 { font-size: 1em; margin-bottom: 10px; }
  .compare-card ul { text-align: left; padding-left: 18px; font-size: 0.85em; }
  .compare-card li { margin: 4px 0; }
  .card-b { background: #dbeafe; border: 2px solid #3b82f6; }
  .card-b h4 { color: #1e40af; }
  .card-a { background: #dcfce7; border: 2px solid #22c55e; }
  .card-a h4 { color: #14532d; }
  .card-z { background: #fee2e2; border: 2px solid #ef4444; }
  .card-z h4 { color: #7f1d1d; }

  /* Enzyme step box */
  .step-grid { display: grid; grid-template-columns: 40px 1fr; gap: 0; margin: 14px 0; }
  .step-num { background: #0f3460; color: white; font-weight: 700; display: flex; align-items: center; justify-content: center; border-radius: 50% 0 0 50%; min-width: 40px; font-size: 1.1em; }
  .step-content { background: #f0f7ff; border: 1px solid #bfdbfe; padding: 12px 16px; border-radius: 0 8px 8px 0; }
  .step-content strong { color: #1e40af; }
  .step-wrap { margin: 8px 0; }

  /* Repair pathway */
  .repair-box { background: white; border: 2px solid #e5e7eb; border-radius: 10px; padding: 16px; margin: 12px 0; }
  .repair-box h4 { color: #e94560; margin-bottom: 8px; }
  .repair-step { display: flex; gap: 8px; align-items: flex-start; margin: 5px 0; }
  .repair-num { background: #e94560; color: white; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 0.8em; font-weight: 700; flex-shrink: 0; margin-top: 2px; }

  /* Supercoiling diagram */
  .coil-diagram { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin: 16px 0; }
  .coil-card { border-radius: 10px; padding: 14px; text-align: center; flex: 1; min-width: 140px; max-width: 200px; }
  .coil-neg { background: #fce7f3; border: 2px solid #ec4899; }
  .coil-pos { background: #fee2e2; border: 2px solid #ef4444; }
  .coil-rel { background: #f0fdf4; border: 2px solid #22c55e; }

  /* Footer */
  .footer { text-align: center; padding: 30px; color: #6b7280; font-size: 0.85em; }
  @media (max-width: 640px) {
    .compare-grid { grid-template-columns: 1fr; }
    .cover h1 { font-size: 1.8em; }
    .section { padding: 20px; }
    .fc-row { flex-direction: column; }
  }
</style>
</head>
<body>

<!-- COVER -->
<div class="cover">
  <h1>🧬 NUCLEIC ACIDS &amp; DNA</h1>
  <h2>Master Notes — Structure, Replication, Repair &amp; Nucleotides</h2>
  <div style="margin-top: 20px;">
    <span class="badge">Lippincott Biochemistry 7e</span>
    <span class="badge">Satyanarayana Biochemistry</span>
    <span class="badge">Harper's Illustrated Biochemistry 32e</span>
  </div>
  <div class="sources" style="margin-top: 15px;">All 3 PDFs synthesized into one comprehensive note with flowcharts &amp; diagrams</div>
</div>

<!-- TABLE OF CONTENTS -->
<div class="toc">
  <h2>📋 Table of Contents</h2>
  <ol>
    <li><a href="#s1">Overview &amp; Central Dogma</a></li>
    <li><a href="#s2">Nucleotides — Structure &amp; Components</a></li>
    <li><a href="#s3">Purines &amp; Pyrimidines</a></li>
    <li><a href="#s4">DNA Structure</a></li>
    <li><a href="#s5">DNA Double Helix (Watson-Crick Model)</a></li>
    <li><a href="#s6">DNA Conformations — A, B, Z</a></li>
    <li><a href="#s7">DNA Packaging &amp; Chromatin</a></li>
    <li><a href="#s8">DNA Replication</a></li>
    <li><a href="#s9">Enzymes of DNA Replication</a></li>
    <li><a href="#s10">DNA Repair Mechanisms</a></li>
    <li><a href="#s11">RNA — Types &amp; Structure</a></li>
    <li><a href="#s12">Nucleotide Analogs (Clinical Importance)</a></li>
    <li><a href="#s13">Key Comparisons &amp; Quick Tables</a></li>
  </ol>
</div>

<!-- SECTION 1: OVERVIEW -->
<div id="s1" class="section">
  <h2>1. Overview &amp; Central Dogma</h2>
  <span class="src src-l">Lippincott</span> <span class="src src-s">Satyanarayana</span> <span class="src src-h">Harper's</span>

  <p>Nucleic acids are the <strong>molecular basis of heredity</strong>. There are two types: <strong>DNA</strong> (deoxyribonucleic acid) and <strong>RNA</strong> (ribonucleic acid). DNA was discovered in 1869 by <strong>Johann Friedrich Miescher</strong>. In 1944, <strong>Avery, MacLeod &amp; McCarty</strong> proved DNA carries genetic information using the "transforming factor" experiment in pneumococcus bacteria.</p>

  <div class="flowchart">
    <div class="flowchart-title">THE CENTRAL DOGMA OF MOLECULAR BIOLOGY</div>
    <div class="fc-row">
      <div class="fc-box fc-start">DNA</div>
      <div class="fc-h-arrow">→</div>
      <div>
        <div class="fc-box fc-process">RNA</div>
        <div class="fc-arrow-label">Transcription</div>
      </div>
      <div class="fc-h-arrow">→</div>
      <div>
        <div class="fc-box fc-result">Protein</div>
        <div class="fc-arrow-label">Translation</div>
      </div>
    </div>
    <div style="margin-top:10px; font-size:0.82em; color:#6b7280;">
      DNA → DNA = <strong>Replication</strong> &nbsp;|&nbsp; Some viruses: RNA → DNA = <strong>Reverse Transcription</strong>
    </div>
  </div>

  <div class="keypoint">
    <strong>KEY:</strong> DNA stores info → RNA copies &amp; carries it → Protein does the work. This is universal to all living organisms (except some RNA viruses that reverse the flow).
  </div>

  <h3>Where is DNA Found?</h3>
  <ul>
    <li><strong>Eukaryotes:</strong> Nucleus (chromosomal DNA), Mitochondria, Chloroplasts (in plants)</li>
    <li><strong>Prokaryotes:</strong> Single chromosome in nucleoid region (no membrane), + plasmids (extrachromosomal DNA)</li>
  </ul>

  <h3>Functions of Nucleic Acids</h3>
  <ul>
    <li>DNA = chemical basis of heredity; maintains species identity over millions of years</li>
    <li>DNA is organized into <strong>genes</strong> — the fundamental units of genetic information</li>
    <li>Every aspect of cellular function is under DNA control</li>
    <li>RNA acts as intermediary between DNA and protein</li>
  </ul>
</div>

<!-- SECTION 2: NUCLEOTIDES -->
<div id="s2" class="section">
  <h2>2. Nucleotides — Structure &amp; Components</h2>
  <span class="src src-s">Satyanarayana</span> <span class="src src-h">Harper's</span> <span class="src src-l">Lippincott</span>

  <p>Nucleic acids are <strong>polymers of nucleotides</strong> (polynucleotides). Nucleotides are the <strong>monomeric units</strong> (like amino acids are for proteins).</p>

  <div class="struct-box">
    <h4>🧱 Structure of a Nucleotide</h4>
    <div class="struct-inner">
      <div class="struct-part base">Nitrogenous<br>Base<br><small>(Purine or Pyrimidine)</small></div>
      <div class="struct-plus">+</div>
      <div class="struct-part sugar">Pentose<br>Sugar<br><small>(Ribose or Deoxyribose)</small></div>
      <div class="struct-plus">+</div>
      <div class="struct-part phosphate">Phosphate<br>Group<br><small>(1, 2, or 3)</small></div>
    </div>
    <p style="text-align:center; margin-top:12px; font-size:0.88em; color:#555;">
      <strong>Nucleoside</strong> = Base + Sugar &nbsp;&nbsp;|&nbsp;&nbsp; <strong>Nucleotide</strong> = Nucleoside + Phosphate
    </p>
  </div>

  <h3>The Pentose Sugars</h3>
  <table>
    <tr><th>Sugar</th><th>Found In</th><th>Feature</th></tr>
    <tr><td>D-Ribose</td><td>RNA</td><td>Has -OH at 2' carbon</td></tr>
    <tr><td>D-2-Deoxyribose</td><td>DNA</td><td>Has -H at 2' carbon (missing -OH)</td></tr>
  </table>

  <h3>Nucleosides vs Nucleotides</h3>
  <table>
    <tr><th>Nucleoside</th><th>Nucleotide (mono)</th><th>Present in</th></tr>
    <tr><td>Adenosine</td><td>AMP (Adenylate)</td><td>RNA</td></tr>
    <tr><td>Guanosine</td><td>GMP (Guanylate)</td><td>RNA</td></tr>
    <tr><td>Cytidine</td><td>CMP (Cytidylate)</td><td>RNA</td></tr>
    <tr><td>Uridine</td><td>UMP (Uridylate)</td><td>RNA only</td></tr>
    <tr><td>Deoxyadenosine</td><td>dAMP</td><td>DNA</td></tr>
    <tr><td>Deoxyguanosine</td><td>dGMP</td><td>DNA</td></tr>
    <tr><td>Deoxycytidine</td><td>dCMP</td><td>DNA</td></tr>
    <tr><td>Thymidine</td><td>dTMP (TMP)</td><td>DNA only</td></tr>
  </table>

  <h3>Important Nucleotide Functions Beyond DNA/RNA</h3>
  <ul>
    <li><strong>ATP</strong> — energy currency of cells (ΔG°' ≈ -7.3 kcal/mol per terminal phosphate)</li>
    <li><strong>cAMP, cGMP</strong> — second messengers in hormone signaling</li>
    <li><strong>GTP/GDP</strong> — signal transduction pathways</li>
    <li><strong>NAD+, FAD</strong> — coenzymes of B-complex vitamins (contain nucleotides)</li>
    <li><strong>UDP-glucose, UDP-galactose</strong> — sugar interconversions, glycogen synthesis</li>
    <li><strong>CDP-acylglycerol</strong> — lipid biosynthesis</li>
    <li><strong>S-Adenosylmethionine (SAM)</strong> — methyl group donor in methylation reactions</li>
    <li><strong>Adenosine 3'-phosphate-5'-phosphosulfate (PAPS)</strong> — sulfuryl group donor</li>
    <li>ADP-dependent phosphorylation of key metabolic enzymes</li>
    <li>Allosteric regulation by AMP, ADP, ATP, CTP</li>
  </ul>

  <div class="keypoint">
    <strong>Nucleoside triphosphates</strong> (like ATP) have TWO acid anhydride bonds and ONE ester bond. The ΔG°' for hydrolysis of each terminal phosphoryl (β or γ) is about <strong>-7 kcal/mol (-30 kJ/mol)</strong> — this is what makes them high-energy compounds.
  </div>
</div>

<!-- SECTION 3: PURINES & PYRIMIDINES -->
<div id="s3" class="section">
  <h2>3. Purines &amp; Pyrimidines</h2>
  <span class="src src-s">Satyanarayana</span> <span class="src src-h">Harper's</span>

  <p>The nitrogenous bases are <strong>aromatic heterocyclic compounds</strong> (contain N atoms in the ring). Two types:</p>

  <table>
    <tr><th>Feature</th><th>Purines</th><th>Pyrimidines</th></tr>
    <tr><td>Ring structure</td><td>Bicyclic (2 fused rings — pyrimidine + imidazole)</td><td>Monocyclic (single 6-membered ring)</td></tr>
    <tr><td>Size</td><td>Larger</td><td>Smaller</td></tr>
    <tr><td>Numbering</td><td>Anticlockwise</td><td>Clockwise</td></tr>
    <tr><td>In DNA</td><td>Adenine (A), Guanine (G)</td><td>Cytosine (C), Thymine (T)</td></tr>
    <tr><td>In RNA</td><td>Adenine (A), Guanine (G)</td><td>Cytosine (C), Uracil (U)</td></tr>
    <tr><td>Memory trick</td><td><em>PURe As Gold</em> (Purines = A, G)</td><td><em>CUT the PY</em> (Pyrimidines = C, U, T)</td></tr>
  </table>

  <div class="mnemonic">
    <div class="title">🧠 MNEMONIC</div>
    <strong>PURines = PURe silver (Ag)</strong> → Adenine, Guanine<br>
    <strong>Pyrimidines = CUT</strong> → Cytosine, Uracil, Thymine<br>
    <strong>Base pairing:</strong> "A-T are the sweet couple (2H bonds)" and "G-C are the tight triple (3H bonds)"
  </div>

  <h3>Minor/Unusual Purines</h3>
  <ul>
    <li><strong>Hypoxanthine</strong> (6-oxopurine) — found in tRNA, product of adenine deamination</li>
    <li><strong>Xanthine</strong> (2,6-dioxopurine) — oxidation product</li>
    <li><strong>Uric acid</strong> (2,6,8-trioxypurine) — final product of purine catabolism in humans</li>
    <li><strong>Caffeine</strong> = trimethylxanthine (pharmacological purine analog)</li>
  </ul>

  <h3>Tautomeric Forms</h3>
  <p>Bases exist as tautomers — equilibrium between <strong>keto</strong> (oxo) and <strong>enol</strong> forms, or <strong>amino</strong> and <strong>imino</strong> forms. The predominant forms at physiological pH are:</p>
  <ul>
    <li>Guanine &amp; Thymine &amp; Uracil → <strong>keto (oxo)</strong> form</li>
    <li>Adenine &amp; Cytosine → <strong>amino</strong> form</li>
  </ul>
  <div class="warning">
    Tautomeric shifts (e.g., keto → enol) can cause <strong>mutations</strong> by allowing wrong base pairings during replication.
  </div>

  <h3>N-Glycosidic Bond</h3>
  <p>Bases attach to the 1' carbon of the sugar via an <strong>N-glycosidic bond</strong>:</p>
  <ul>
    <li>Purines attach via N-9</li>
    <li>Pyrimidines attach via N-1</li>
    <li>Most nucleosides are in the <strong>β-configuration</strong> (base above the plane of the sugar)</li>
  </ul>
</div>

<!-- SECTION 4: DNA STRUCTURE -->
<div id="s4" class="section">
  <h2>4. DNA Structure — Primary Structure</h2>
  <span class="src src-l">Lippincott</span> <span class="src src-s">Satyanarayana</span> <span class="src src-h">Harper's</span>

  <p>DNA is a polymer of <strong>deoxyribonucleoside monophosphates (dNMP)</strong> linked by <strong>3'→5' phosphodiester bonds</strong>.</p>

  <div class="flowchart">
    <div class="flowchart-title">HOW NUCLEOTIDES ARE LINKED IN DNA</div>
    <div style="text-align:center;">
      <div class="fc-box fc-process" style="margin:4px auto;">Nucleotide 1 (5' end — free phosphate)</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-arrow-label">3'-OH of sugar #1 + 5'-phosphate of sugar #2 → Phosphodiester bond (via phosphoryl group)</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-process" style="margin:4px auto;">Nucleotide 2</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-process" style="margin:4px auto;">Nucleotide 3</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-result" style="margin:4px auto;">Nucleotide N (3' end — free -OH)</div>
    </div>
    <div style="font-size:0.83em; color:#555; margin-top:10px;">
      Chain reads 5'→3' by convention. The backbone is: <strong>sugar — phosphate — sugar — phosphate...</strong><br>
      Bases project inward. Backbone is negatively charged (due to phosphate groups).
    </div>
  </div>

  <div class="struct-box">
    <h4>🔗 Phosphodiester Bond Structure</h4>
    <p style="font-size:0.9em;">The 3'-OH of one deoxyribose is linked to the 5'-phosphate of the next deoxyribose through a <strong>phosphoryl bridge</strong>. Each phosphate group contributes a <strong>negative charge</strong> — making DNA a polyanion at physiological pH. This is why DNA binds to positively charged histones.</p>
  </div>

  <h3>Chargaff's Rules (1940s)</h3>
  <p>Erwin Chargaff quantitatively analyzed DNA from different species and established:</p>
  <table>
    <tr><th>Rule</th><th>Meaning</th></tr>
    <tr><td>A = T (or A/T = 1)</td><td>Amount of adenine equals thymine</td></tr>
    <tr><td>G = C (or G/C = 1)</td><td>Amount of guanine equals cytosine</td></tr>
    <tr><td>Purines = Pyrimidines</td><td>A+G = T+C</td></tr>
    <tr><td>Species-specific</td><td>A+T/G+C ratio varies between species (not within a species)</td></tr>
    <tr><td>Tissue-independent</td><td>Ratio constant within an organism regardless of tissue</td></tr>
  </table>

  <div class="keypoint">
    <strong>Chargaff's rules are the chemical proof of base pairing</strong> — A pairs with T, G pairs with C. This was key evidence for the double helix model.
  </div>
</div>

<!-- SECTION 5: DOUBLE HELIX -->
<div id="s5" class="section">
  <h2>5. DNA Double Helix — Watson-Crick Model (1953)</h2>
  <span class="src src-l">Lippincott</span> <span class="src src-s">Satyanarayana</span> <span class="src src-h">Harper's</span>

  <div class="dna-diagram">
<pre>
5' ══════════════════════ 3'
     | Backbone |
  P—S—[A]═══[T]—S—P    ← 2 H-bonds
  P—S—[G]≡≡≡[C]—S—P    ← 3 H-bonds
  P—S—[T]═══[A]—S—P    ← 2 H-bonds
  P—S—[C]≡≡≡[G]—S—P    ← 3 H-bonds
     | Backbone |
3' ══════════════════════ 5'
   ← Antiparallel →
P = Phosphate, S = Sugar (deoxyribose)
</pre>
  </div>

  <h3>Key Features of the B-DNA Double Helix</h3>
  <table>
    <tr><th>Feature</th><th>Value</th></tr>
    <tr><td>Diameter</td><td>2.0 nm (20 Å)</td></tr>
    <tr><td>Rise per base pair</td><td>0.34 nm (3.4 Å)</td></tr>
    <tr><td>Base pairs per turn</td><td>10 bp</td></tr>
    <tr><td>Distance per complete turn (pitch)</td><td>3.4 nm (34 Å)</td></tr>
    <tr><td>Direction</td><td>Right-handed</td></tr>
    <tr><td>Strands</td><td>Antiparallel (one 5'→3', other 3'→5')</td></tr>
    <tr><td>Base pairing</td><td>Complementary (A-T, G-C) via H-bonds</td></tr>
    <tr><td>H-bonds</td><td>A-T: 2 H-bonds; G-C: 3 H-bonds</td></tr>
  </table>

  <h3>Forces Stabilizing the Double Helix</h3>
  <ol>
    <li><strong>Hydrogen bonds</strong> between complementary bases (A-T: 2; G-C: 3)</li>
    <li><strong>Base stacking interactions</strong> — hydrophobic interactions between adjacent base pairs (major stabilizer)</li>
    <li><strong>Electrostatic interactions</strong> — negatively charged backbone repels water, stabilized by Mg²+ or proteins</li>
  </ol>

  <div class="keypoint">
    <strong>Important:</strong> Base stacking (van der Waals / hydrophobic) forces actually contribute MORE to helix stability than H-bonds. A higher G+C content → higher melting temperature (Tm) because G-C has 3 H-bonds vs A-T's 2.
  </div>

  <h3>Major and Minor Grooves</h3>
  <ul>
    <li><strong>Major groove</strong> — wider, deeper; where most regulatory proteins (transcription factors) bind</li>
    <li><strong>Minor groove</strong> — narrower, shallower; some drugs (e.g., netropsin) bind here</li>
    <li>In B-DNA: major groove is accessible, allowing sequence-specific protein binding</li>
  </ul>

  <h3>Denaturation (Melting)</h3>
  <div class="flowchart">
    <div class="flowchart-title">DNA DENATURATION &amp; RENATURATION</div>
    <div class="fc-row">
      <div class="fc-box fc-process">dsDNA<br>(native, double-stranded)</div>
      <div class="fc-h-arrow">→</div>
      <div>
        <div class="fc-box fc-decision">Heat / High pH<br>/ Urea / Acid</div>
      </div>
      <div class="fc-h-arrow">→</div>
      <div class="fc-box fc-enzyme">ssDNA<br>(denatured, separated strands)</div>
    </div>
    <div class="fc-arrow">↕ slow cooling = Renaturation/Annealing (reannealing)</div>
    <div class="fc-arrow-label">Hyperchromic effect: absorbance at 260 nm INCREASES on denaturation<br>Tm = melting temperature at which 50% DNA is denatured</div>
  </div>
</div>

<!-- SECTION 6: DNA CONFORMATIONS -->
<div id="s6" class="section">
  <h2>6. DNA Conformations — A, B, Z Forms</h2>
  <span class="src src-s">Satyanarayana</span>

  <div class="compare-grid">
    <div class="compare-card card-b">
      <h4>B-DNA</h4>
      <ul>
        <li>Right-handed</li>
        <li>Diameter: 2.37 nm</li>
        <li>Pitch: 3.4 nm</li>
        <li>Rise/bp: 0.34 nm</li>
        <li>10 bp per turn</li>
        <li>Base tilt: +19°</li>
        <li>Helix axis through major groove</li>
        <li><strong>Most common in vivo</strong></li>
      </ul>
    </div>
    <div class="compare-card card-a">
      <h4>A-DNA</h4>
      <ul>
        <li>Right-handed</li>
        <li>Diameter: 2.55 nm</li>
        <li>Pitch: 3.2 nm</li>
        <li>Rise/bp: 0.29 nm</li>
        <li>11 bp per turn</li>
        <li>Base tilt: –1.2°</li>
        <li>Helix axis through base pairs</li>
        <li>Found in low humidity, RNA-DNA hybrids</li>
      </ul>
    </div>
    <div class="compare-card card-z">
      <h4>Z-DNA</h4>
      <ul>
        <li><strong>Left-handed</strong></li>
        <li>Diameter: 1.84 nm</li>
        <li>Pitch: 4.5 nm</li>
        <li>Rise/bp: 0.37 nm</li>
        <li>12 bp per turn</li>
        <li>Base tilt: –9°</li>
        <li>Helix axis through minor groove</li>
        <li>High G-C, high salt; zigzag backbone</li>
      </ul>
    </div>
  </div>

  <div class="mnemonic">
    <div class="title">🧠 MNEMONIC: DNA Conformations</div>
    <strong>B</strong> = Biological (most common in cells)<br>
    <strong>A</strong> = Arid (dry conditions), Also RNA-DNA hybrids<br>
    <strong>Z</strong> = Zigzag Left-handed (Z looks like a zigzag AND the letter Z is at the end/left of alphabet)
  </div>

  <h3>Special DNA Structures</h3>
  <ul>
    <li><strong>Bent DNA:</strong> Occurs when A-tracts are replaced by other bases or helix collapses into minor groove. Also caused by cisplatin (anticancer drug) → creates bent structure that attracts damage proteins.</li>
    <li><strong>Triple-stranded DNA (Triplex):</strong> Additional base forms Hoogsteen H-bonds. T can bind A-T pair → T-A-T. Protonated C binds G-C pair → C-G-C. Less stable than double helix (more electrostatic repulsion from 3 negative backbones).</li>
    <li><strong>Four-stranded DNA (G-quadruplex):</strong> High guanine content → G-quartet structures (planar, connected by Hoogsteen H-bonds). Found in telomeres. Implicated in immunoglobulin gene recombination and HIV RNA dimerization. <strong>Anticancer target!</strong></li>
  </ul>
</div>

<!-- SECTION 7: CHROMATIN & PACKAGING -->
<div id="s7" class="section">
  <h2>7. DNA Packaging &amp; Chromatin Organization</h2>
  <span class="src src-l">Lippincott</span> <span class="src src-s">Satyanarayana</span>

  <div class="flowchart">
    <div class="flowchart-title">LEVELS OF DNA COMPACTION (Eukaryotes)</div>
    <div class="fc-box fc-process" style="margin:4px auto;">Double helix DNA (~2 nm)</div>
    <div class="fc-arrow">↓</div>
    <div class="fc-arrow-label">Wraps around histone octamer (H2A×2, H2B×2, H3×2, H4×2)</div>
    <div class="fc-box fc-process" style="margin:4px auto;">Nucleosome (10 nm "beads on a string")<br><small>147 bp DNA wraps ~1.67 turns around histone core</small></div>
    <div class="fc-arrow">↓</div>
    <div class="fc-arrow-label">H1 histone links nucleosomes</div>
    <div class="fc-box fc-process" style="margin:4px auto;">30 nm chromatin fiber (solenoid)</div>
    <div class="fc-arrow">↓</div>
    <div class="fc-box fc-process" style="margin:4px auto;">Loops (~300 nm)</div>
    <div class="fc-arrow">↓</div>
    <div class="fc-box fc-process" style="margin:4px auto;">Coiled loops (~700 nm)</div>
    <div class="fc-arrow">↓</div>
    <div class="fc-box fc-start" style="margin:4px auto;">Metaphase chromosome (~1400 nm)</div>
    <div style="font-size:0.83em; color:#555; margin-top:10px;">Overall compaction ratio ≈ 10,000-fold</div>
  </div>

  <h3>Histones</h3>
  <ul>
    <li>Small, positively charged (basic) proteins — rich in Arg and Lys</li>
    <li>Positively charged histones attract negatively charged DNA phosphate backbone</li>
    <li><strong>Core histones:</strong> H2A, H2B, H3, H4 (form octamer)</li>
    <li><strong>Linker histone:</strong> H1 (binds at entry/exit point of DNA on nucleosome)</li>
    <li>Histone modifications (acetylation, methylation, phosphorylation) regulate gene expression</li>
  </ul>

  <h3>Supercoiling</h3>
  <div class="coil-diagram">
    <div class="coil-card coil-neg">
      <strong>Negative Supercoiling</strong><br>
      <small>Underwound; counteracts positive supercoiling from replication/transcription; most cellular DNA is negatively supercoiled; allows easier strand separation</small>
    </div>
    <div class="coil-card coil-pos">
      <strong>Positive Supercoiling</strong><br>
      <small>Overwound; forms ahead of replication fork; inhibits replication; resolved by topoisomerases</small>
    </div>
    <div class="coil-card coil-rel">
      <strong>Relaxed (no supercoiling)</strong><br>
      <small>Normal, unstressed DNA</small>
    </div>
  </div>

  <h3>Topoisomerases</h3>
  <table>
    <tr><th>Type</th><th>Mechanism</th><th>Changes Linking Number</th><th>Clinical Relevance</th></tr>
    <tr><td>Topoisomerase I</td><td>Cuts ONE strand; relaxes supercoils</td><td>By 1 per catalytic cycle</td><td>Target of camptothecin (anticancer)</td></tr>
    <tr><td>Topoisomerase II</td><td>Cuts BOTH strands; passes duplex through</td><td>By 2 per cycle</td><td>Target of fluoroquinolones (bacteria), etoposide (cancer)</td></tr>
    <tr><td>DNA Gyrase (prokaryote TopoII)</td><td>Introduces negative supercoils</td><td>–2 per cycle</td><td>Target of quinolone antibiotics (ciprofloxacin)</td></tr>
  </table>

  <h3>Size of DNA — Units</h3>
  <ul>
    <li><strong>bp</strong> (base pairs) — for double-stranded DNA</li>
    <li><strong>kb</strong> (kilobases) = 1000 bp</li>
    <li><strong>Mb</strong> (megabases) = 10⁶ bp</li>
    <li>Average B-DNA bp: 0.34 nm thickness, MW ≈ 660 daltons per bp</li>
    <li>Human genome: ~3 × 10⁹ bp (3 Gb) in 23 pairs of chromosomes</li>
  </ul>
</div>

<!-- SECTION 8: DNA REPLICATION -->
<div id="s8" class="section">
  <h2>8. DNA Replication</h2>
  <span class="src src-l">Lippincott</span> <span class="src src-s">Satyanarayana</span> <span class="src src-h">Harper's</span>

  <div class="keypoint">
    <strong>Key Properties of DNA Replication:</strong><br>
    1. Semiconservative — each daughter cell gets one old + one new strand<br>
    2. Semi-discontinuous — one strand continuous (leading), one discontinuous (lagging)<br>
    3. Bidirectional — replication proceeds in both directions from origin<br>
    4. 5'→3' direction — new strand synthesized only 5' to 3'
  </div>

  <h3>Semiconservative Replication (Meselson-Stahl, 1958)</h3>
  <div class="flowchart">
    <div class="flowchart-title">SEMICONSERVATIVE REPLICATION</div>
    <div style="font-family: monospace; font-size:0.9em; background:#f8fafc; padding:16px; border-radius:8px; text-align:center; border: 1px solid #e5e7eb;">
      <div style="color:#7c3aed; font-weight:bold;">Parent: &nbsp;&nbsp;&nbsp; Old-Old</div>
      <div style="margin:8px 0; color:#6b7280;">↓ Replication (each strand = template)</div>
      <div style="color:#2563eb; font-weight:bold;">Generation 1: &nbsp; Old-New | Old-New</div>
      <div style="margin:8px 0; color:#6b7280;">↓ Replication again</div>
      <div style="color:#16a34a; font-weight:bold;">Generation 2: Old-New | Old-New | New-New | New-New</div>
    </div>
    <div style="font-size:0.82em; color:#555; margin-top:8px;">
      Proved by Meselson &amp; Stahl using ¹⁵N/¹⁴N density gradient centrifugation
    </div>
  </div>

  <h3>Origins of Replication</h3>
  <ul>
    <li><strong>Prokaryotes:</strong> Single origin of replication (oriC); bidirectional → one replication bubble → circular chromosome copied as 2 circular daughters (theta form)</li>
    <li><strong>Eukaryotes:</strong> Multiple origins (replicons) per chromosome; needed because genome is much larger</li>
    <li>Origin contains AT-rich sequences → easier to unwind (A-T has only 2 H-bonds)</li>
  </ul>

  <h3>Steps of DNA Replication — Overview</h3>
  <div class="flowchart">
    <div class="flowchart-title">DNA REPLICATION — STEP-BY-STEP FLOWCHART</div>

    <div class="step-wrap">
      <div class="step-grid">
        <div class="step-num">1</div>
        <div class="step-content"><strong>Initiation:</strong> Initiator proteins bind to origin (oriC). Recruit Helicase.</div>
      </div>
    </div>
    <div style="text-align:center;"><div class="fc-arrow">↓</div></div>

    <div class="step-wrap">
      <div class="step-grid">
        <div class="step-num">2</div>
        <div class="step-content"><strong>Unwinding:</strong> Helicase unwinds dsDNA at replication fork, creating single-stranded template. SSBPs stabilize ssDNA.</div>
      </div>
    </div>
    <div style="text-align:center;"><div class="fc-arrow">↓</div></div>

    <div class="step-wrap">
      <div class="step-grid">
        <div class="step-num">3</div>
        <div class="step-content"><strong>Primer synthesis:</strong> Primase (RNA polymerase) synthesizes a short RNA primer (~10 nt) to provide 3'-OH for DNA polymerase.</div>
      </div>
    </div>
    <div style="text-align:center;"><div class="fc-arrow">↓</div></div>

    <div class="step-wrap">
      <div class="step-grid">
        <div class="step-num">4</div>
        <div class="step-content"><strong>Elongation:</strong> DNA Pol III (prokaryotes) / DNA Pol δ,ε (eukaryotes) extends primer 5'→3', adding dNTPs complementary to template.</div>
      </div>
    </div>
    <div style="text-align:center;"><div class="fc-arrow">↓</div></div>

    <div class="step-wrap">
      <div class="step-grid">
        <div class="step-num">5</div>
        <div class="step-content"><strong>Leading vs Lagging strand synthesis:</strong><br>
          • <strong>Leading strand</strong> — synthesized continuously toward replication fork (5'→3')<br>
          • <strong>Lagging strand</strong> — synthesized in Okazaki fragments (opposite direction, 5'→3', but overall 3'→5' direction of travel)</div>
      </div>
    </div>
    <div style="text-align:center;"><div class="fc-arrow">↓</div></div>

    <div class="step-wrap">
      <div class="step-grid">
        <div class="step-num">6</div>
        <div class="step-content"><strong>Primer removal:</strong> DNA Pol I (prokaryotes) removes RNA primers via 5'→3' exonuclease, replaces with DNA. RNase H (eukaryotes) removes primers.</div>
      </div>
    </div>
    <div style="text-align:center;"><div class="fc-arrow">↓</div></div>

    <div class="step-wrap">
      <div class="step-grid">
        <div class="step-num">7</div>
        <div class="step-content"><strong>Ligation:</strong> DNA Ligase seals the nick between Okazaki fragments (joins 3'-OH to 5'-phosphate). Requires NAD+ (prokaryotes) or ATP (eukaryotes).</div>
      </div>
    </div>
    <div style="text-align:center;"><div class="fc-arrow">↓</div></div>

    <div class="step-wrap">
      <div class="step-grid">
        <div class="step-num">8</div>
        <div class="step-content"><strong>Termination:</strong> Prokaryotes — replication forks meet. Eukaryotes — telomerase extends telomeres to avoid shortening.</div>
      </div>
    </div>
  </div>

  <div class="flowchart" style="margin-top:20px;">
    <div class="flowchart-title">LEADING vs LAGGING STRAND</div>
    <div style="font-family:monospace; background:#1a1a2e; color:#00ff88; padding:20px; border-radius:10px; text-align:left; max-width:500px; margin:0 auto; font-size:0.85em;">
<pre>
 Fork moves → →
 ======================== Template (3'→5')
      ←←← ←←← ←←←        Leading strand
 Okazaki Okazaki Okazaki   (5'→3') continuous
 ======================== Template (5'→3')
      →→→   →→→   →→→      Lagging strand
                           (5'→3') discontinuous
                           Okazaki fragments ~1000-2000 nt (prokaryotes)
                           ~100-200 nt (eukaryotes)
</pre>
    </div>
  </div>
</div>

<!-- SECTION 9: ENZYMES -->
<div id="s9" class="section">
  <h2>9. Enzymes of DNA Replication</h2>
  <span class="src src-l">Lippincott</span> <span class="src src-s">Satyanarayana</span>

  <table>
    <tr><th>Enzyme</th><th>Function</th><th>Key Features</th></tr>
    <tr><td><strong>Helicase</strong></td><td>Unwinds double helix at replication fork</td><td>Uses ATP; creates positive supercoiling ahead → resolved by gyrase</td></tr>
    <tr><td><strong>SSB proteins</strong> (Single-strand binding)</td><td>Stabilize ssDNA template, prevent reannealing</td><td>Cooperative binding; displaced as synthesis proceeds</td></tr>
    <tr><td><strong>Primase</strong></td><td>Synthesizes RNA primer (5'→3')</td><td>RNA polymerase that doesn't need primer; provides 3'-OH for Pol III</td></tr>
    <tr><td><strong>DNA Pol III</strong> (Prokaryotes)</td><td>Main replicative polymerase</td><td>5'→3' polymerase + 3'→5' exonuclease (proofreading); very fast</td></tr>
    <tr><td><strong>DNA Pol I</strong> (Prokaryotes)</td><td>Removes RNA primers; fills gaps</td><td>5'→3' polymerase + 5'→3' exonuclease (unique — removes primers)</td></tr>
    <tr><td><strong>DNA Pol δ</strong> (Eukaryotes)</td><td>Synthesizes lagging strand</td><td>Works with PCNA (sliding clamp)</td></tr>
    <tr><td><strong>DNA Pol ε</strong> (Eukaryotes)</td><td>Synthesizes leading strand</td><td>High fidelity, proofreading</td></tr>
    <tr><td><strong>DNA Pol α</strong> (Eukaryotes)</td><td>Primase activity; initiates synthesis</td><td>Makes primer + short DNA stretch</td></tr>
    <tr><td><strong>DNA Ligase</strong></td><td>Seals nicks; joins Okazaki fragments</td><td>Requires ATP (euk) or NAD+ (prok)</td></tr>
    <tr><td><strong>DNA Gyrase</strong> (Prokaryotes)</td><td>Introduces negative supercoils; relieves tension</td><td>Target of quinolone antibiotics!</td></tr>
    <tr><td><strong>Topoisomerase I/II</strong> (Eukaryotes)</td><td>Relaxes supercoils</td><td>Topo I: no ATP. Topo II: uses ATP. Drug targets (camptothecin, etoposide)</td></tr>
    <tr><td><strong>Telomerase</strong></td><td>Extends telomeres (3' ends of chromosomes)</td><td>Reverse transcriptase; uses own RNA template; active in stem cells, germ cells, cancer cells</td></tr>
    <tr><td><strong>PCNA</strong> (Proliferating cell nuclear antigen)</td><td>Sliding clamp for DNA Pol δ</td><td>Increases processivity; trimeric ring around DNA</td></tr>
  </table>

  <div class="keypoint">
    <strong>Proofreading (3'→5' exonuclease):</strong> DNA Pol reads the newly incorporated base. If wrong, it backs up and removes it (3'→5' exonuclease), then continues. This gives error rate of ~1 mistake per 10⁹ bases incorporated.
  </div>

  <div class="mnemonic">
    <div class="title">🧠 MNEMONIC: DNA Polymerases in Prokaryotes</div>
    <strong>Pol I</strong> = "One job: remove primers + fill gaps" (also 5'→3' exo = unique)<br>
    <strong>Pol II</strong> = "Too (II) quiet, mainly repair"<br>
    <strong>Pol III</strong> = "Three = main workhorse of replication" (holoenzyme, very fast, very processive)
  </div>

  <h3>Telomere &amp; Telomerase</h3>
  <p>Linear eukaryotic chromosomes lose a small amount of sequence at the ends each replication cycle (end-replication problem). Telomeres are repetitive sequences at chromosome ends (TTAGGG in humans). <strong>Telomerase</strong> adds repeats using its intrinsic RNA template — it is a reverse transcriptase.</p>
  <ul>
    <li>Active in: germ cells, stem cells, cancer cells</li>
    <li>Inactive in: most somatic cells → progressive telomere shortening → cellular aging</li>
    <li><strong>Hayflick limit</strong> — finite number of cell divisions due to telomere shortening</li>
    <li>Telomere G-quadruplexes = anticancer targets</li>
  </ul>
</div>

<!-- SECTION 10: DNA REPAIR -->
<div id="s10" class="section">
  <h2>10. DNA Repair Mechanisms</h2>
  <span class="src src-l">Lippincott</span> <span class="src src-s">Satyanarayana</span>

  <h3>Types of DNA Damage</h3>
  <table>
    <tr><th>Type of Damage</th><th>Cause</th><th>Result</th></tr>
    <tr><td>Deamination of cytosine</td><td>Spontaneous hydrolysis</td><td>C → U (mispairing → G-C becomes A-U → G-C becomes A-T mutation)</td></tr>
    <tr><td>Depurination</td><td>Spontaneous hydrolysis of N-glycosidic bond</td><td>Loss of A or G → apurinic site</td></tr>
    <tr><td>Thymine dimers</td><td>UV radiation</td><td>Adjacent thymines covalently link (T≡T) → blocks replication</td></tr>
    <tr><td>Alkylation</td><td>Chemical mutagens (nitrosamines, nitrogen mustards)</td><td>O⁶-methylguanine → mispairs with T instead of C</td></tr>
    <tr><td>Oxidative damage</td><td>Reactive oxygen species (ROS)</td><td>8-oxoguanine → mispairs with A</td></tr>
    <tr><td>Single/double strand breaks</td><td>Ionizing radiation, chemotherapy</td><td>Breaks in backbone</td></tr>
    <tr><td>Crosslinks</td><td>Cisplatin, psoralens</td><td>Interstrand crosslinks block replication</td></tr>
  </table>

  <h3>DNA Repair Pathways — Flowcharts</h3>

  <!-- BER -->
  <div class="repair-box">
    <h4>1. Base Excision Repair (BER) — for small base modifications</h4>
    <div class="repair-step"><div class="repair-num">1</div><div><strong>DNA Glycosylase</strong> recognizes &amp; removes damaged base (cleaves N-glycosidic bond) → creates AP site (apurinic/apyrimidinic site)</div></div>
    <div class="repair-step"><div class="repair-num">2</div><div><strong>AP Endonuclease</strong> (APE1) nicks the DNA backbone 5' to the AP site</div></div>
    <div class="repair-step"><div class="repair-num">3</div><div><strong>DNA Polymerase β</strong> removes the AP site and inserts the correct nucleotide</div></div>
    <div class="repair-step"><div class="repair-num">4</div><div><strong>DNA Ligase</strong> seals the nick</div></div>
    <div style="font-size:0.85em; color:#555; margin-top:8px;">Corrects: deamination (U in DNA), oxidative damage (8-oxoG), alkylation</div>
  </div>

  <!-- NER -->
  <div class="repair-box">
    <h4>2. Nucleotide Excision Repair (NER) — for bulky lesions</h4>
    <div class="repair-step"><div class="repair-num">1</div><div><strong>Damage recognition proteins</strong> (XPC-RAD23B) detect helix distortion</div></div>
    <div class="repair-step"><div class="repair-num">2</div><div><strong>Helicases</strong> (XPB, XPD) unwind DNA around the lesion (~30 bp bubble)</div></div>
    <div class="repair-step"><div class="repair-num">3</div><div><strong>Endonucleases</strong> (XPG, XPF-ERCC1) cut on both sides of lesion → remove ~30 nt patch</div></div>
    <div class="repair-step"><div class="repair-num">4</div><div><strong>DNA Polymerase δ/ε</strong> fills the gap using opposite strand as template</div></div>
    <div class="repair-step"><div class="repair-num">5</div><div><strong>DNA Ligase</strong> seals the nick</div></div>
    <div style="font-size:0.85em; color:#555; margin-top:8px;">Corrects: UV-induced thymine dimers, large chemical adducts. Defect → <strong>Xeroderma pigmentosum</strong> (XP)</div>
  </div>

  <!-- MMR -->
  <div class="repair-box">
    <h4>3. Mismatch Repair (MMR) — for replication errors</h4>
    <div class="repair-step"><div class="repair-num">1</div><div><strong>MutS</strong> (MSH2-MSH6) recognizes the mismatch</div></div>
    <div class="repair-step"><div class="repair-num">2</div><div><strong>MutL</strong> (MLH1-PMS2) recruited; identifies which strand is the new (error) strand (by methylation status in prokaryotes)</div></div>
    <div class="repair-step"><div class="repair-num">3</div><div><strong>MutH</strong> (prokaryotes) nicks the new strand at a hemimethylated GATC site</div></div>
    <div class="repair-step"><div class="repair-num">4</div><div><strong>Exonuclease</strong> removes the error strand from nick to mismatch</div></div>
    <div class="repair-step"><div class="repair-num">5</div><div><strong>DNA Pol III</strong> fills the gap; <strong>Ligase</strong> seals</div></div>
    <div style="font-size:0.85em; color:#555; margin-top:8px;">Defect → Lynch syndrome (hereditary non-polyposis colorectal cancer, HNPCC); microsatellite instability</div>
  </div>

  <!-- Direct Repair -->
  <div class="repair-box">
    <h4>4. Direct Repair — no strand removal needed</h4>
    <ul>
      <li><strong>O⁶-methylguanine methyltransferase (MGMT):</strong> Directly transfers methyl group from O⁶-methylguanine onto its own Cys residue (suicide enzyme — inactivated after one reaction)</li>
      <li><strong>Photolyase:</strong> Uses light energy (photoreactivation) to directly split thymine dimers (in E. coli; not active in humans)</li>
    </ul>
  </div>

  <!-- DSB repair -->
  <div class="repair-box">
    <h4>5. Double-Strand Break (DSB) Repair</h4>
    <div class="fc-row">
      <div>
        <div class="fc-box fc-important">Homologous Recombination (HR)</div>
        <ul style="font-size:0.83em; text-align:left; padding-left:16px; margin-top:8px;">
          <li>Uses sister chromatid as template</li>
          <li>Error-free; S and G2 phases</li>
          <li>Key proteins: RAD51, BRCA1, BRCA2</li>
          <li>BRCA1/2 mutations → breast/ovarian cancer</li>
        </ul>
      </div>
      <div style="font-size:1.5em; color:#6b7280; padding:20px;">vs</div>
      <div>
        <div class="fc-box fc-decision">Non-Homologous End Joining (NHEJ)</div>
        <ul style="font-size:0.83em; text-align:left; padding-left:16px; margin-top:8px;">
          <li>Ligates broken ends directly</li>
          <li>Error-prone; any phase</li>
          <li>Key proteins: Ku70/Ku80, DNA-PKcs, Ligase IV</li>
          <li>Important in V(D)J recombination (antibodies)</li>
        </ul>
      </div>
    </div>
  </div>

  <h3>Clinical Diseases from Repair Defects</h3>
  <table>
    <tr><th>Disease</th><th>Defective Pathway</th><th>Features</th></tr>
    <tr><td>Xeroderma Pigmentosum (XP)</td><td>NER</td><td>Extreme UV sensitivity; skin cancer; neurodegeneration</td></tr>
    <tr><td>Lynch Syndrome (HNPCC)</td><td>MMR (MSH2, MLH1 mutations)</td><td>Colorectal, endometrial, ovarian cancer; microsatellite instability</td></tr>
    <tr><td>Cockayne Syndrome</td><td>Transcription-coupled NER</td><td>UV sensitivity; premature aging; neurodegeneration</td></tr>
    <tr><td>Ataxia-Telangiectasia</td><td>DSB (ATM kinase)</td><td>Cerebellar ataxia; immunodeficiency; lymphoma risk</td></tr>
    <tr><td>Fanconi Anemia</td><td>Interstrand crosslink repair</td><td>Bone marrow failure; aplastic anemia; cancer predisposition</td></tr>
    <tr><td>BRCA1/BRCA2 mutations</td><td>HR (DSB repair)</td><td>Breast, ovarian cancer predisposition</td></tr>
  </table>
</div>

<!-- SECTION 11: RNA -->
<div id="s11" class="section">
  <h2>11. RNA — Types and Structure</h2>
  <span class="src src-l">Lippincott</span> <span class="src src-h">Harper's</span>

  <h3>DNA vs RNA Comparison</h3>
  <table>
    <tr><th>Feature</th><th>DNA</th><th>RNA</th></tr>
    <tr><td>Sugar</td><td>2'-deoxyribose</td><td>Ribose (has 2'-OH)</td></tr>
    <tr><td>Bases</td><td>A, G, C, T</td><td>A, G, C, U (Uracil instead of Thymine)</td></tr>
    <tr><td>Strands</td><td>Double-stranded (mostly)</td><td>Single-stranded (can fold back on itself)</td></tr>
    <tr><td>Location</td><td>Nucleus, mitochondria</td><td>Nucleus + cytoplasm</td></tr>
    <tr><td>Stability</td><td>More stable (no 2'-OH)</td><td>Less stable (2'-OH susceptible to hydrolysis)</td></tr>
    <tr><td>Amount in cell</td><td>Constant</td><td>Variable (changes with cell needs)</td></tr>
  </table>

  <h3>Types of RNA</h3>
  <table>
    <tr><th>Type</th><th>% of total RNA</th><th>Function</th></tr>
    <tr><td><strong>rRNA</strong> (ribosomal)</td><td>~80%</td><td>Structural + catalytic (ribozyme) component of ribosomes</td></tr>
    <tr><td><strong>tRNA</strong> (transfer)</td><td>~15%</td><td>Adaptor — carries amino acids to ribosome; anticodon matches mRNA codon</td></tr>
    <tr><td><strong>mRNA</strong> (messenger)</td><td>~5%</td><td>Carries genetic code from DNA to ribosome for translation</td></tr>
    <tr><td>snRNA (small nuclear)</td><td>Trace</td><td>RNA splicing (part of spliceosome)</td></tr>
    <tr><td>miRNA/siRNA</td><td>Trace</td><td>Gene silencing (RNA interference)</td></tr>
    <tr><td>lncRNA</td><td>Trace</td><td>Gene regulation</td></tr>
  </table>

  <h3>Secondary Structures in RNA</h3>
  <p>Single-stranded RNA can fold back on itself to form secondary structures:</p>
  <ul>
    <li><strong>Hairpin (stem-loop):</strong> Complementary regions fold to form base-paired stems with unpaired loops</li>
    <li><strong>Bulge loops:</strong> Unpaired bulge in one strand of stem</li>
    <li><strong>Internal loops:</strong> Unpaired on both strands</li>
    <li><strong>Pseudoknots:</strong> Complex folding with interdigitated base pairs</li>
  </ul>
  <p>tRNA has extensive secondary structure → L-shaped 3D (tertiary) structure with anticodon loop at one end and CCA-3' (amino acid attachment) at the other.</p>
</div>

<!-- SECTION 12: NUCLEOTIDE ANALOGS -->
<div id="s12" class="section">
  <h2>12. Nucleotide Analogs — Clinical Applications</h2>
  <span class="src src-s">Satyanarayana</span> <span class="src src-h">Harper's</span>

  <div class="clinical">
    <div class="title">💊 Clinical Importance</div>
    Synthetic analogs of purines, pyrimidines, nucleosides, and nucleotides are used as:<br>
    (1) Anticancer drugs (2) Antiviral drugs (3) Immunosuppressants (4) Treatment of gout
  </div>

  <table>
    <tr><th>Drug/Analog</th><th>Type</th><th>Clinical Use</th><th>Mechanism</th></tr>
    <tr><td>5-Fluorouracil (5-FU)</td><td>Pyrimidine analog</td><td>Cancer (colorectal, breast)</td><td>Inhibits thymidylate synthase → blocks dTMP synthesis; gets incorporated into DNA/RNA</td></tr>
    <tr><td>6-Mercaptopurine (6-MP)</td><td>Purine analog</td><td>Leukemia</td><td>Inhibits purine synthesis; gets incorporated into DNA</td></tr>
    <tr><td>Allopurinol</td><td>Purine analog (hypoxanthine)</td><td>Gout, hyperuricemia</td><td>Inhibits xanthine oxidase → reduces uric acid production</td></tr>
    <tr><td>Azathioprine</td><td>Prodrug of 6-MP</td><td>Transplant rejection, autoimmune</td><td>Converted to 6-MP → suppresses lymphocyte proliferation</td></tr>
    <tr><td>Arabinosyladenine (Ara-A)</td><td>Nucleoside analog</td><td>Viral encephalitis</td><td>Inhibits viral DNA polymerase</td></tr>
    <tr><td>Arabinosylcytosine (Ara-C)</td><td>Nucleoside analog</td><td>Cancer (AML)</td><td>Inhibits DNA replication</td></tr>
    <tr><td>Zidovudine (AZT)</td><td>3'-azido dideoxythymidine</td><td>HIV/AIDS</td><td>Inhibits reverse transcriptase; lacks 3'-OH → chain termination</td></tr>
    <tr><td>Didanosine (ddI)</td><td>Dideoxyinosine</td><td>HIV/AIDS</td><td>No 3'-OH → reverse transcriptase chain termination</td></tr>
    <tr><td>8-Azaguanine</td><td>Purine analog</td><td>Cancer</td><td>Incorporated into RNA/DNA; disrupts synthesis</td></tr>
    <tr><td>Acyclovir</td><td>Guanosine analog</td><td>Herpes viruses (HSV, VZV)</td><td>Activated by viral thymidine kinase → inhibits viral DNA polymerase</td></tr>
    <tr><td>Cisplatin</td><td>Platinum compound</td><td>Testicular, ovarian cancer</td><td>Intrastrand/interstrand DNA crosslinks; creates bent DNA; blocks replication</td></tr>
    <tr><td>Camptothecin/Irinotecan</td><td>Topoisomerase I inhibitor</td><td>Cancer</td><td>Traps Topo I-DNA complex → strand breaks</td></tr>
    <tr><td>Etoposide</td><td>Topoisomerase II inhibitor</td><td>Lung, testicular cancer</td><td>Traps Topo II-DNA complex → DSBs</td></tr>
    <tr><td>Fluoroquinolones (Ciprofloxacin)</td><td>DNA Gyrase inhibitor</td><td>Bacterial infections</td><td>Inhibits bacterial DNA gyrase → cannot relieve supercoiling → bacteria die</td></tr>
  </table>
</div>

<!-- SECTION 13: QUICK TABLES -->
<div id="s13" class="section">
  <h2>13. Key Comparisons &amp; Quick Reference</h2>

  <h3>Prokaryotes vs Eukaryotes — DNA Replication</h3>
  <table>
    <tr><th>Feature</th><th>Prokaryotes (E. coli)</th><th>Eukaryotes</th></tr>
    <tr><td>Genome</td><td>Circular, single chromosome + plasmids</td><td>Multiple linear chromosomes</td></tr>
    <tr><td>Origins of replication</td><td>Single (oriC)</td><td>Multiple (thousands per cell)</td></tr>
    <tr><td>DNA Polymerase (main)</td><td>DNA Pol III</td><td>DNA Pol δ (lagging), DNA Pol ε (leading)</td></tr>
    <tr><td>Primer removal</td><td>DNA Pol I (5'→3' exonuclease)</td><td>RNase H + FEN1</td></tr>
    <tr><td>Okazaki fragment size</td><td>1000–2000 nt</td><td>100–200 nt</td></tr>
    <tr><td>Replication speed</td><td>~1000 bp/s</td><td>~50-100 bp/s per fork</td></tr>
    <tr><td>Histones</td><td>None (HU, H-NS proteins)</td><td>Present (H1, H2A, H2B, H3, H4)</td></tr>
    <tr><td>Telomeres/Telomerase</td><td>Not needed (circular)</td><td>Present (TTAGGG repeats; telomerase)</td></tr>
    <tr><td>Supercoiling relief</td><td>DNA Gyrase</td><td>Topoisomerase I and II</td></tr>
  </table>

  <h3>Complete Summary Flowchart</h3>
  <div class="flowchart">
    <div class="flowchart-title">MASTER FLOWCHART: DNA — FROM STRUCTURE TO FUNCTION</div>
    <div style="text-align:center;">
      <div class="fc-box fc-start" style="margin: 4px auto;">NUCLEOTIDES (Base + Sugar + Phosphate)</div>
      <div class="fc-arrow">↓ linked by 3'→5' phosphodiester bonds</div>
      <div class="fc-box fc-process" style="margin: 4px auto;">POLYNUCLEOTIDE CHAIN (Primary Structure)</div>
      <div class="fc-arrow">↓ two antiparallel chains; A-T (2H), G-C (3H) pairing</div>
      <div class="fc-box fc-process" style="margin: 4px auto;">DOUBLE HELIX (Secondary Structure) — B-DNA in cells</div>
      <div class="fc-arrow">↓ wraps around histone octamer</div>
      <div class="fc-box fc-process" style="margin: 4px auto;">NUCLEOSOME → 30 nm fiber → Loops → Metaphase Chromosome</div>
      <div class="fc-arrow">↓ Gene expression begins</div>
      <div class="fc-row" style="margin:8px 0;">
        <div>
          <div class="fc-box fc-important">REPLICATION</div>
          <div style="font-size:0.8em; color:#555;">Semiconservative; bidirectional;<br>5'→3' synthesis; needs primer</div>
        </div>
        <div style="font-size:2em; color:#cbd5e1;">⟷</div>
        <div>
          <div class="fc-box fc-result">TRANSCRIPTION</div>
          <div style="font-size:0.8em; color:#555;">DNA → RNA; template strand;<br>5'→3'; no primer needed</div>
        </div>
      </div>
      <div class="fc-arrow">↓ if damage occurs</div>
      <div class="fc-box fc-enzyme" style="margin: 4px auto;">DNA REPAIR (BER, NER, MMR, HR, NHEJ)</div>
      <div class="fc-arrow">↓ if unrepaired</div>
      <div class="fc-box fc-decision" style="margin: 4px auto;">MUTATIONS → Cancer / Genetic Disease</div>
    </div>
  </div>

  <h3>Key Numbers to Remember</h3>
  <table>
    <tr><th>Parameter</th><th>Value</th></tr>
    <tr><td>B-DNA diameter</td><td>2.0 nm (20 Å)</td></tr>
    <tr><td>Rise per base pair (B-DNA)</td><td>0.34 nm (3.4 Å)</td></tr>
    <tr><td>Base pairs per turn (B-DNA)</td><td>10 bp</td></tr>
    <tr><td>Pitch of B-DNA</td><td>3.4 nm (34 Å)</td></tr>
    <tr><td>MW per base pair</td><td>~660 daltons</td></tr>
    <tr><td>Human genome size</td><td>~3 × 10⁹ bp (3 Gb), 23 chromosome pairs</td></tr>
    <tr><td>Nucleosome DNA wrap</td><td>147 bp, ~1.67 turns</td></tr>
    <tr><td>Histone octamer</td><td>2 × (H2A, H2B, H3, H4)</td></tr>
    <tr><td>A-T H-bonds</td><td>2</td></tr>
    <tr><td>G-C H-bonds</td><td>3</td></tr>
    <tr><td>ATP hydrolysis ΔG°'</td><td>-7.3 kcal/mol (-30.5 kJ/mol)</td></tr>
    <tr><td>Telomere repeat (humans)</td><td>TTAGGG</td></tr>
  </table>
</div>

<!-- Footer -->
<div class="footer">
  <p>Master Notes compiled from: <strong>Lippincott Biochemistry 7th Ed.</strong> | <strong>Satyanarayana &amp; Chakrapani Biochemistry</strong> | <strong>Harper's Illustrated Biochemistry 32nd Ed.</strong></p>
  <p style="margin-top:6px;">All topics covered: Nucleotides · Purines/Pyrimidines · DNA Structure · Double Helix · Conformations · Chromatin · Replication · Enzymes · DNA Repair · RNA Types · Clinical Analogs</p>
</div>

</body>
</html>
Running Command

ls -lh /home/daytona/workspace/DNA_Nucleic_Acids_Master_Notes.html

Done bro! Here's your master note file:

DNA Nucleic Acids Master Notes

HTML File · HTML

(56 KB)

What's inside (everything from all 3 PDFs):

#SectionWhat's covered
1Overview & Central DogmaHistory, where DNA is found, central dogma flowchart
2NucleotidesStructure diagram, nucleoside vs nucleotide table, all functions (ATP, cAMP, SAM, etc.)
3Purines & PyrimidinesComparison table, tautomers, N-glycosidic bond, mnemonic
4DNA Primary StructurePhosphodiester bonds, polarity, Chargaff's Rules
5Double HelixWatson-Crick model, B-DNA numbers, H-bonds, major/minor grooves, denaturation flowchart
6DNA ConformationsA-DNA vs B-DNA vs Z-DNA comparison cards with all values, bent DNA, triplex, G-quadruplex
7Chromatin & PackagingCompaction levels flowchart (DNA → nucleosome → 30nm → chromosome), histones, supercoiling, topoisomerases
8DNA ReplicationSemiconservative proof, step-by-step flowchart, leading vs lagging strand diagram, Okazaki fragments
9Enzymes of ReplicationFull table of all enzymes (Helicase, Primase, Pol I/II/III, Ligase, Telomerase, PCNA...)
10DNA RepairBER, NER, MMR, Direct Repair, HR vs NHEJ - each with step-by-step flowchart + clinical diseases table
11RNA TypesDNA vs RNA comparison, mRNA/rRNA/tRNA, secondary structures
12Nucleotide AnalogsFull clinical drugs table - 5-FU, 6-MP, AZT, Cisplatin, Ciprofloxacin, Acyclovir etc.
13Quick ReferenceMaster summary flowchart, key numbers table, Prokaryotes vs Eukaryotes comparison
Open it in any browser - it's fully styled, color-coded by source, has mnemonics, and all diagrams render visually!

Bro make PDF format not HTML

Running Command

which wkhtmltopdf; which weasyprint; python3 -c "import weasyprint; print('weasyprint ok')" 2>&1; python3 -c "import pdfkit; print('pdfkit ok')" 2>&1

Running Command

which libreoffice; which chromium; which chromium-browser; which google-chrome; which puppeteer; ls /usr/bin/ | grep -i chrom 2>/dev/null; ls /usr/bin/ | grep -i libre 2>/dev/null

Running Command

chromium --headless --no-sandbox --disable-gpu --print-to-pdf="/home/daytona/workspace/DNA_Nucleic_Acids_Master_Notes.pdf" --print-to-pdf-no-header "file:///home/daytona/workspace/DNA_Nucleic_Acids_Master_Notes.html" 2>&1

Done! PDF generated successfully (2.5 MB). Download it here:

DNA Nucleic Acids Master Notes

PDF Document · PDF

All 13 sections are in there with full color, flowcharts, tables, diagrams, and mnemonics — everything from Lippincott, Satyanarayana, and Harper's in one clean PDF. Open it in any PDF viewer and it'll look exactly like the styled note.

Bro I can't open it. Please do something

Running Command

ls -lh /home/daytona/workspace/DNA_Nucleic_Acids_Master_Notes.pdf && python3 -c " from pypdf import PdfReader r = PdfReader('/home/daytona/workspace/DNA_Nucleic_Acids_Master_Notes.pdf') print('Pages:', len(r.pages)) print('First page text preview:', r.pages[0].extract_text()[:200]) "

Running Command

# Re-generate a fresh clean PDF with extra flags for compatibility chromium --headless --no-sandbox --disable-gpu \ --print-to-pdf="/home/daytona/workspace/DNA_Notes_FINAL.pdf" \ --print-to-pdf-no-header \ --disable-pdf-tagging \ "file:///home/daytona/workspace/DNA_Nucleic_Acids_Master_Notes.html" 2>&1 | tail -3

Running Command

# Also use LibreOffice to generate an alternative PDF from HTML libreoffice --headless --convert-to pdf \ --outdir /home/daytona/workspace/ \ /home/daytona/workspace/DNA_Nucleic_Acids_Master_Notes.html 2>&1

Running Command

# Try LibreOffice to a different output dir mkdir -p /home/daytona/workspace/pdf_out libreoffice --headless --convert-to pdf \ --outdir /home/daytona/workspace/pdf_out/ \ /home/daytona/workspace/DNA_Nucleic_Acids_Master_Notes.html 2>&1 ls -lh /home/daytona/workspace/pdf_out/

Running Command

# Verify the Chromium-generated PDF is valid python3 -c " from pypdf import PdfReader, PdfWriter import os # Read and re-write to ensure clean PDF reader = PdfReader('/home/daytona/workspace/DNA_Notes_FINAL.pdf') print('Pages:', len(reader.pages)) print('PDF version info:', reader.pdf_header) writer = PdfWriter() for page in reader.pages: writer.add_page(page) with open('/home/daytona/workspace/DNA_Notes_Clean.pdf', 'wb') as f: writer.write(f) size = os.path.getsize('/home/daytona/workspace/DNA_Notes_Clean.pdf') print(f'Clean PDF size: {size} bytes ({size/1024/1024:.1f} MB)') print('Done!') "

The PDF is fully valid (26 pages, PDF 1.4 format, 2.1 MB). Try these two links - one of them should work for you:
Option 1 (re-written clean copy):

DNA Notes Clean

PDF Document · PDF

Option 2 (original Chromium render):

DNA Notes FINAL

PDF Document · PDF


If still can't open - the HTML file works perfectly in any browser (Chrome, Firefox, Edge, Safari). Just open this and use Ctrl+P → Save as PDF to get the PDF yourself:

DNA Nucleic Acids Master Notes

HTML File · HTML

That will give you a perfect PDF with all colors, flowcharts and tables preserved. Let me know if you're still having trouble!

Bro I want you to make a proper, easy, understandable, high yield, detailed pdf notes with understandable and creative flow charts, tables and diagrams from the given pdf. Read every detail from the given pdf and then make proper point to point notes with explanations, examples, flow charts and etc, make it for an mbbs first year student from foundation module

Reading File
Running Command

python3 -c " from pypdf import PdfReader path = '/home/daytona/workspace/attachments/cebb7e5a-bf83-4146-adfb-46cd1dee2e97/Dr_U_Satyanarayana,_U_Chakrapani_Biochemistry_Else_260626_192232(1).PDF' reader = PdfReader(path) print('Total pages:', len(reader.pages)) # Print first page to see what topic print(reader.pages[0].extract_text()[:600]) "

Running Command

python3 -c " from pypdf import PdfReader path = '/home/daytona/workspace/attachments/cebb7e5a-bf83-4146-adfb-46cd1dee2e97/Dr_U_Satyanarayana,_U_Chakrapani_Biochemistry_Else_260626_192232(1).PDF' reader = PdfReader(path) full_text = '' for i, page in enumerate(reader.pages): full_text += f'\n\n===== PAGE {i+1} =====\n\n' full_text += page.extract_text() with open('/home/daytona/workspace/satyanarayana_wb_acid.txt', 'w') as f: f.write(full_text) print('Done. Total chars:', len(full_text)) print('Total pages:', len(reader.pages)) "

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Writing File

~/Water_Electrolyte_AcidBase_Notes.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Water, Electrolyte & Acid-Base Balance — MBBS Notes</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', Arial, sans-serif;
  background: #f5f7fa;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.75;
}

/* ============ COVER PAGE ============ */
.cover {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
  color: white;
  padding: 70px 60px 50px;
  min-height: 260px;
  position: relative;
  overflow: hidden;
}
.cover::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.cover::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
}
.cover-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 30px;
  padding: 5px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.cover h1 {
  font-size: 2.6em;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.cover h1 span { color: #93c5fd; }
.cover h2 {
  font-size: 1.05em;
  font-weight: 400;
  opacity: 0.75;
  margin-bottom: 28px;
}
.cover-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.cover-meta span {
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 500;
}

/* ============ TOC ============ */
.toc {
  background: white;
  max-width: 820px;
  margin: 30px auto;
  border-radius: 14px;
  padding: 32px 36px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  page-break-after: always;
}
.toc h2 {
  font-size: 1.15em;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.toc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8faff;
  border-left: 3px solid #3b82f6;
  font-size: 12px;
  font-weight: 500;
  color: #1e3a8a;
}
.toc-num {
  background: #1e3a8a;
  color: white;
  border-radius: 50%;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  flex-shrink: 0;
}

/* ============ SECTIONS ============ */
.section {
  background: white;
  max-width: 820px;
  margin: 22px auto;
  border-radius: 14px;
  padding: 32px 36px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  page-break-inside: avoid;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid #e2e8f0;
}
.section-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4em;
  flex-shrink: 0;
}
.icon-blue { background: #dbeafe; }
.icon-green { background: #dcfce7; }
.icon-purple { background: #ede9fe; }
.icon-orange { background: #fed7aa; }
.icon-red { background: #fee2e2; }
.icon-teal { background: #ccfbf1; }
.icon-yellow { background: #fef9c3; }
.section-header h2 {
  font-size: 1.25em;
  font-weight: 700;
  color: #0f172a;
}
.section-header h2 small {
  display: block;
  font-size: 0.68em;
  font-weight: 400;
  color: #64748b;
  margin-top: 2px;
}

h3 {
  font-size: 1em;
  font-weight: 700;
  color: #1e3a8a;
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
h3::before {
  content: '';
  display: inline-block;
  width: 4px; height: 16px;
  background: #3b82f6;
  border-radius: 2px;
  flex-shrink: 0;
}
h4 {
  font-size: 0.92em;
  font-weight: 600;
  color: #374151;
  margin: 14px 0 6px;
}
p { margin-bottom: 10px; font-size: 12.5px; }
ul, ol { padding-left: 20px; margin-bottom: 10px; }
li { margin: 4px 0; font-size: 12.5px; }

/* ============ CALLOUT BOXES ============ */
.box {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 14px 0;
  font-size: 12.5px;
}
.box-title {
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.box-key { background: #eff6ff; border-left: 4px solid #2563eb; }
.box-key .box-title { color: #1d4ed8; }
.box-mnemonic { background: #fefce8; border-left: 4px solid #ca8a04; }
.box-mnemonic .box-title { color: #92400e; }
.box-clinical { background: #f0fdf4; border-left: 4px solid #16a34a; }
.box-clinical .box-title { color: #15803d; }
.box-warning { background: #fff7ed; border-left: 4px solid #ea580c; }
.box-warning .box-title { color: #c2410c; }
.box-formula { background: #f5f3ff; border-left: 4px solid #7c3aed; }
.box-formula .box-title { color: #6d28d9; }
.box-exam { background: #fdf2f8; border-left: 4px solid #c026d3; }
.box-exam .box-title { color: #a21caf; }

.formula-big {
  text-align: center;
  font-size: 1.1em;
  font-weight: 700;
  color: #4c1d95;
  background: #f5f3ff;
  border: 2px solid #a78bfa;
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
  font-family: 'Courier New', monospace;
}

/* ============ TABLES ============ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 12px;
  border-radius: 10px;
  overflow: hidden;
}
th {
  background: #1e3a8a;
  color: white;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
}
td {
  padding: 9px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}
tr:nth-child(even) td { background: #f8faff; }
tr:hover td { background: #eff6ff; }
.td-green { color: #15803d; font-weight: 600; }
.td-red { color: #dc2626; font-weight: 600; }
.td-blue { color: #1d4ed8; font-weight: 600; }
.td-orange { color: #c2410c; font-weight: 600; }
.td-purple { color: #7c3aed; font-weight: 600; }

/* ============ FLOWCHARTS ============ */
.fc-wrap {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
  background: #f8faff;
}
.fc-title {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.fc-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fc-row-center { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.fc-box {
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  min-width: 140px;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.fc-pill { border-radius: 30px !important; padding: 8px 20px !important; }
.fc-start { background: #1e3a8a; color: white; }
.fc-end { background: #0f172a; color: white; }
.fc-process { background: #dbeafe; color: #1e3a8a; border: 1.5px solid #93c5fd; }
.fc-decision { background: #fef9c3; color: #78350f; border: 1.5px solid #fbbf24; }
.fc-result { background: #dcfce7; color: #14532d; border: 1.5px solid #86efac; }
.fc-danger { background: #fee2e2; color: #7f1d1d; border: 1.5px solid #fca5a5; }
.fc-purple { background: #ede9fe; color: #4c1d95; border: 1.5px solid #a78bfa; }
.fc-orange { background: #fed7aa; color: #7c2d12; border: 1.5px solid #fb923c; }
.fc-arrow { font-size: 1.4em; color: #94a3b8; text-align: center; line-height: 1; }
.fc-label { font-size: 10.5px; color: #64748b; font-style: italic; text-align: center; margin: -2px 0; }
.fc-h-arrow { font-size: 1.3em; color: #94a3b8; }

/* Visual compartment diagram */
.compartment-wrap {
  display: flex;
  gap: 14px;
  margin: 16px 0;
  align-items: stretch;
}
.comp-box {
  flex: 1;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  border: 2px solid;
}
.comp-body { border-color: #1e3a8a; background: #eff6ff; }
.comp-icf { border-color: #7c3aed; background: #f5f3ff; }
.comp-ecf { border-color: #059669; background: #f0fdf4; }
.comp-interstitial { border-color: #d97706; background: #fffbeb; }
.comp-plasma { border-color: #dc2626; background: #fef2f2; }
.comp-box h4 { font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.comp-box .vol { font-size: 1.5em; font-weight: 800; }
.comp-box .pct { font-size: 10px; opacity: 0.7; }
.comp-body h4 { color: #1e3a8a; }
.comp-icf h4 { color: #7c3aed; }
.comp-ecf h4 { color: #059669; }
.comp-interstitial h4 { color: #d97706; }
.comp-plasma h4 { color: #dc2626; }

/* Buffer system visual */
.buffer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
.buffer-card {
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  border: 2px solid;
}
.buf-bicarb { border-color: #2563eb; background: #eff6ff; }
.buf-phosphate { border-color: #16a34a; background: #f0fdf4; }
.buf-protein { border-color: #9333ea; background: #faf5ff; }
.buffer-card h4 { font-size: 11.5px; font-weight: 700; margin-bottom: 6px; }
.buf-bicarb h4 { color: #1d4ed8; }
.buf-phosphate h4 { color: #15803d; }
.buf-protein h4 { color: #7e22ce; }
.buffer-card .pair { font-size: 11px; font-weight: 600; font-family: monospace; margin: 4px 0; }
.buffer-card .note { font-size: 10.5px; color: #64748b; margin-top: 6px; }
.buffer-card .pct { font-size: 1.4em; font-weight: 800; margin: 6px 0; }

/* Acid-base disorder visual */
.disorder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}
.disorder-card {
  border-radius: 10px;
  padding: 16px;
  border: 2px solid;
}
.dis-met-acid { border-color: #dc2626; background: #fff1f2; }
.dis-resp-acid { border-color: #ea580c; background: #fff7ed; }
.dis-met-alk { border-color: #2563eb; background: #eff6ff; }
.dis-resp-alk { border-color: #0891b2; background: #ecfeff; }
.disorder-card h4 { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.dis-met-acid h4 { color: #dc2626; }
.dis-resp-acid h4 { color: #ea580c; }
.dis-met-alk h4 { color: #2563eb; }
.dis-resp-alk h4 { color: #0891b2; }
.dis-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 30px;
  margin-bottom: 8px;
}
.tag-acid { background: #fee2e2; color: #991b1b; }
.tag-alk { background: #dbeafe; color: #1e40af; }
.disorder-card ul { padding-left: 16px; font-size: 11.5px; }
.disorder-card li { margin: 3px 0; }
.comp-change {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  font-size: 11px;
  color: #475569;
}

/* Electrolyte comparison strips */
.electrolyte-strip {
  display: flex;
  gap: 10px;
  margin: 12px 0;
  align-items: stretch;
}
.elec-ecf, .elec-icf {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  font-size: 12px;
}
.elec-ecf { background: #f0fdf4; border: 2px solid #16a34a; }
.elec-icf { background: #f5f3ff; border: 2px solid #7c3aed; }
.elec-ecf h4 { color: #15803d; margin-bottom: 8px; font-size: 12px; }
.elec-icf h4 { color: #6d28d9; margin-bottom: 8px; font-size: 12px; }
.ion-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.ion-row:last-child { border-bottom: none; }
.ion-name { font-weight: 600; }
.ion-val { color: #374151; }

/* Step boxes */
.steps { margin: 14px 0; }
.step {
  display: flex;
  gap: 12px;
  margin: 8px 0;
  align-items: flex-start;
}
.step-num {
  width: 26px; height: 26px;
  background: #1e3a8a;
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-body { flex: 1; background: #f8faff; border-radius: 8px; padding: 10px 14px; border-left: 3px solid #93c5fd; font-size: 12px; }
.step-body strong { color: #1d4ed8; }

/* Highlight badges */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 4px;
}
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-orange { background: #fed7aa; color: #92400e; }
.badge-purple { background: #ede9fe; color: #6d28d9; }

/* Two-col layout */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.mini-card { background: #f8faff; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 12px; font-size: 12px; }
.mini-card h4 { margin-bottom: 6px; font-size: 12px; color: #1e3a8a; }

/* Page breaks */
.page-break { page-break-before: always; }

/* Footer */
.footer { text-align: center; padding: 30px; color: #94a3b8; font-size: 11px; max-width: 820px; margin: 0 auto; }

/* Chloride shift visual */
.chloride-wrap {
  display: flex;
  gap: 0;
  margin: 14px 0;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.chl-col {
  flex: 1;
  padding: 14px;
  font-size: 12px;
}
.chl-blood { background: #fef2f2; border-right: 2px dashed #fca5a5; }
.chl-rbc { background: #eff6ff; border-right: 2px dashed #93c5fd; }
.chl-lumen { background: #f0fdf4; }
.chl-col h4 { font-size: 11px; text-align: center; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.chl-blood h4 { color: #dc2626; }
.chl-rbc h4 { color: #1d4ed8; }
.chl-lumen h4 { color: #15803d; }
.arrow-item { text-align: center; font-size: 11px; margin: 4px 0; }

/* High yield quick review */
.hq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}
.hq-card {
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  font-size: 11.5px;
}
.hq-blue { background: #dbeafe; border: 1.5px solid #3b82f6; }
.hq-green { background: #dcfce7; border: 1.5px solid #22c55e; }
.hq-red { background: #fee2e2; border: 1.5px solid #ef4444; }
.hq-purple { background: #ede9fe; border: 1.5px solid #a855f7; }
.hq-orange { background: #ffedd5; border: 1.5px solid #f97316; }
.hq-teal { background: #ccfbf1; border: 1.5px solid #14b8a6; }
.hq-card h4 { font-size: 10.5px; font-weight: 700; margin-bottom: 4px; }
.hq-blue h4 { color: #1d4ed8; }
.hq-green h4 { color: #15803d; }
.hq-red h4 { color: #dc2626; }
.hq-purple h4 { color: #7c3aed; }
.hq-orange h4 { color: #c2410c; }
.hq-teal h4 { color: #0f766e; }
.hq-val { font-size: 1.3em; font-weight: 800; }
</style>
</head>
<body>

<!-- ===== COVER ===== -->
<div class="cover">
  <div class="cover-badge">MBBS Foundation Module · Biochemistry</div>
  <h1>💧 Water, Electrolyte<br>& <span>Acid-Base Balance</span></h1>
  <h2>Chapter 21 — Satyanarayana & Chakrapani Biochemistry<br>High-Yield Notes for First Year MBBS Students</h2>
  <div class="cover-meta">
    <span>📚 Source: Satyanarayana Biochemistry</span>
    <span>🎯 High-Yield · Point-to-Point</span>
    <span>🩺 Clinical Correlations Included</span>
    <span>📊 Flowcharts & Tables</span>
  </div>
</div>

<!-- ===== TABLE OF CONTENTS ===== -->
<div class="toc">
  <h2>📋 Table of Contents</h2>
  <div class="toc-grid">
    <div class="toc-item"><div class="toc-num">1</div>Water and Life — Functions & Distribution</div>
    <div class="toc-item"><div class="toc-num">2</div>Water Turnover & Balance (Intake vs Output)</div>
    <div class="toc-item"><div class="toc-num">3</div>Electrolytes — ECF vs ICF Composition</div>
    <div class="toc-item"><div class="toc-num">4</div>Osmolarity, Osmolality & Plasma Osmolality</div>
    <div class="toc-item"><div class="toc-num">5</div>Hormonal Regulation — ADH & Aldosterone</div>
    <div class="toc-item"><div class="toc-num">6</div>Dehydration & Overhydration</div>
    <div class="toc-item"><div class="toc-num">7</div>Blood Buffers (3 Systems)</div>
    <div class="toc-item"><div class="toc-num">8</div>Henderson-Hasselbalch Equation</div>
    <div class="toc-item"><div class="toc-num">9</div>Respiratory Regulation of pH</div>
    <div class="toc-item"><div class="toc-num">10</div>Renal Regulation of pH (4 Mechanisms)</div>
    <div class="toc-item"><div class="toc-num">11</div>Acid-Base Disorders (4 Types)</div>
    <div class="toc-item"><div class="toc-num">12</div>Clinical Causes & Compensation</div>
  </div>
</div>

<!-- ===== SECTION 1: WATER ===== -->
<div class="section">
  <div class="section-header">
    <div class="section-icon icon-blue">💧</div>
    <h2>1. Water and Life — Functions & Body Distribution
      <small>The most important compound for life | "Solvent of Life"</small>
    </h2>
  </div>

  <div class="box box-key">
    <div class="box-title">⭐ Why Water is "The Solvent of Life"</div>
    Water makes up ~60% of adult body weight. Without water, no biochemical reaction can occur. It is the medium, the reactant, and the transport vehicle — all in one.
  </div>

  <h3>Functions of Water (Remember: A-R-T-T)</h3>
  <ul>
    <li><strong>A</strong>queous medium — provides the environment for all biochemical reactions</li>
    <li><strong>R</strong>eactant — directly participates in metabolic reactions (e.g. hydrolysis)</li>
    <li><strong>T</strong>ransport vehicle — carries solutes (ions, nutrients, waste) throughout the body</li>
    <li><strong>T</strong>emperature regulation — high specific heat and evaporative cooling (sweating)</li>
  </ul>

  <div class="box box-mnemonic">
    <div class="box-title">🧠 Mnemonic: A-R-T-T</div>
    "<strong>A</strong>lways <strong>R</strong>emember To drink <strong>T</strong>oday" → Aqueous medium, Reactant, Transport, Temperature regulation
  </div>

  <h3>Body Water Distribution — 70 kg Man (Total = 42 Litres)</h3>

  <div class="compartment-wrap">
    <div class="comp-box comp-body">
      <h4>TOTAL BODY WATER</h4>
      <div class="vol">42 L</div>
      <div class="pct">~60% of body weight</div>
    </div>
    <div style="display:flex;flex-direction:column;justify-content:center;font-size:1.5em;color:#94a3b8;">→</div>
    <div style="flex:2;display:flex;flex-direction:column;gap:10px;">
      <div class="comp-box comp-icf">
        <h4>ICF — Intracellular Fluid</h4>
        <div class="vol">28 L</div>
        <div class="pct">2/3 of total body water</div>
      </div>
      <div class="comp-box comp-ecf">
        <h4>ECF — Extracellular Fluid</h4>
        <div class="vol">14 L</div>
        <div class="pct">1/3 of total body water</div>
      </div>
    </div>
    <div style="display:flex;flex-direction:column;justify-content:center;font-size:1.5em;color:#94a3b8;">→</div>
    <div style="flex:2;display:flex;flex-direction:column;gap:10px;">
      <div class="comp-box comp-interstitial">
        <h4>Interstitial Fluid</h4>
        <div class="vol">10.5 L</div>
        <div class="pct">75% of ECF</div>
      </div>
      <div class="comp-box comp-plasma">
        <h4>Plasma</h4>
        <div class="vol">3.5 L</div>
        <div class="pct">25% of ECF</div>
      </div>
    </div>
  </div>

  <table>
    <tr><th>Compartment</th><th>Volume (70 kg man)</th><th>% of Body Weight</th><th>Note</th></tr>
    <tr><td>Total Body Water</td><td class="td-blue">42 L</td><td>60%</td><td>Men 55–70%, Women 45–60%</td></tr>
    <tr><td>Intracellular Fluid (ICF)</td><td class="td-purple">28 L</td><td>40%</td><td>Inside cells; 2/3 of TBW</td></tr>
    <tr><td>Extracellular Fluid (ECF)</td><td class="td-green">14 L</td><td>20%</td><td>Outside cells; 1/3 of TBW</td></tr>
    <tr><td>Interstitial Fluid</td><td>10.5 L</td><td>15%</td><td>Between cells; part of ECF</td></tr>
    <tr><td>Plasma</td><td class="td-red">3.5 L</td><td>5%</td><td>Within blood vessels; part of ECF</td></tr>
  </table>

  <div class="box box-warning">
    <div class="box-title">⚠️ Why Women Have Less Body Water</div>
    Women and obese individuals have relatively <strong>less body water</strong> because adipose (fat) tissue is stored in an <strong>anhydrous (water-free) form</strong>. More fat = less water per kg of body weight.
  </div>
</div>

<!-- ===== SECTION 2: WATER BALANCE ===== -->
<div class="section">
  <div class="section-header">
    <div class="section-icon icon-teal">⚖️</div>
    <h2>2. Water Turnover & Balance
      <small>Daily intake = Daily output ≈ 2500 mL</small>
    </h2>
  </div>

  <div class="fc-wrap">
    <div class="fc-title">💧 Daily Water Balance (Intake vs Output)</div>
    <div style="display:flex;gap:30px;justify-content:center;flex-wrap:wrap;">
      <div>
        <div style="text-align:center;font-weight:700;color:#1e3a8a;margin-bottom:8px;font-size:12px;">INTAKE (2500 mL/day)</div>
        <div class="steps">
          <div class="step"><div class="step-num" style="background:#1d4ed8;">1</div><div class="step-body"><strong>Drinking water & beverages</strong> — 1500 mL (main source)</div></div>
          <div class="step"><div class="step-num" style="background:#1d4ed8;">2</div><div class="step-body"><strong>Water in solid foods</strong> — 700 mL</div></div>
          <div class="step"><div class="step-num" style="background:#1d4ed8;">3</div><div class="step-body"><strong>Metabolic (endogenous) water</strong> — 300 mL (from oxidation of food)</div></div>
        </div>
      </div>
      <div style="display:flex;align-items:center;font-size:2em;color:#94a3b8;">=</div>
      <div>
        <div style="text-align:center;font-weight:700;color:#dc2626;margin-bottom:8px;font-size:12px;">OUTPUT (2500 mL/day)</div>
        <div class="steps">
          <div class="step"><div class="step-num" style="background:#dc2626;">1</div><div class="step-body"><strong>Urine</strong> — 1500 mL (largest output, controlled by kidneys)</div></div>
          <div class="step"><div class="step-num" style="background:#dc2626;">2</div><div class="step-body"><strong>Skin (insensible sweat)</strong> — 450 mL</div></div>
          <div class="step"><div class="step-num" style="background:#dc2626;">3</div><div class="step-body"><strong>Lungs (expired air)</strong> — 400 mL</div></div>
          <div class="step"><div class="step-num" style="background:#dc2626;">4</div><div class="step-body"><strong>Feces</strong> — 150 mL</div></div>
        </div>
      </div>
    </div>
  </div>

  <h3>How Thirst Controls Water Intake</h3>
  <div class="fc-wrap">
    <div class="fc-title">THIRST MECHANISM — Flowchart</div>
    <div class="fc-col">
      <div class="fc-box fc-process">↑ Plasma Osmolality (e.g., dehydration, high salt intake)</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-decision">Thirst Centre in Hypothalamus stimulated</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-result">Sensation of Thirst → Person drinks water</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-process">Plasma osmolality returns to normal (285–295 mOsm/kg)</div>
    </div>
  </div>

  <h3>Metabolic (Endogenous) Water Production</h3>
  <table>
    <tr><th>Nutrient Oxidized</th><th>Water Produced (per 100g)</th></tr>
    <tr><td>Carbohydrate</td><td class="td-blue">55 mL</td></tr>
    <tr><td>Fat</td><td class="td-green">107 mL (highest!)</td></tr>
    <tr><td>Protein</td><td class="td-orange">41 mL</td></tr>
  </table>

  <div class="box box-clinical">
    <div class="box-title">🐪 Clinical Pearl — Camel Analogy</div>
    Camels survive in deserts because fat in their humps produces large amounts of metabolic water when oxidized. Same principle explains why fats yield the most metabolic water.
  </div>
</div>

<!-- ===== SECTION 3: ELECTROLYTES ===== -->
<div class="section page-break">
  <div class="section-header">
    <div class="section-icon icon-green">⚡</div>
    <h2>3. Electrolytes — ECF vs ICF Composition
      <small>Na⁺ outside, K⁺ inside — maintained by Na⁺-K⁺ pump</small>
    </h2>
  </div>

  <div class="box box-key">
    <div class="box-title">⭐ Golden Rule of Electrolytes</div>
    <strong>Na⁺ = Principal EXTRACELLULAR cation</strong> &nbsp;|&nbsp; <strong>K⁺ = Principal INTRACELLULAR cation</strong><br>
    The total concentration of cations = anions in each compartment → maintains <strong>electrical neutrality</strong>
  </div>

  <div class="electrolyte-strip">
    <div class="elec-ecf">
      <h4>🟢 ECF (Extracellular Fluid) — Plasma</h4>
      <div style="font-size:11px;font-weight:600;margin-bottom:8px;">CATIONS (mEq/L)</div>
      <div class="ion-row"><span class="ion-name">Na⁺ (MAIN)</span><span class="ion-val">142 mEq/L ⭐</span></div>
      <div class="ion-row"><span class="ion-name">K⁺</span><span class="ion-val">5 mEq/L</span></div>
      <div class="ion-row"><span class="ion-name">Ca²⁺</span><span class="ion-val">5 mEq/L</span></div>
      <div class="ion-row"><span class="ion-name">Mg²⁺</span><span class="ion-val">2 mEq/L</span></div>
      <div style="font-size:11px;font-weight:600;margin:8px 0;">ANIONS (mEq/L)</div>
      <div class="ion-row"><span class="ion-name">Cl⁻ (MAIN)</span><span class="ion-val">103 mEq/L ⭐</span></div>
      <div class="ion-row"><span class="ion-name">HCO₃⁻</span><span class="ion-val">27 mEq/L</span></div>
      <div class="ion-row"><span class="ion-name">Proteins</span><span class="ion-val">16 mEq/L</span></div>
      <div class="ion-row"><span class="ion-name">Others</span><span class="ion-val">small amounts</span></div>
    </div>
    <div style="display:flex;align-items:center;font-size:1.2em;color:#94a3b8;padding:0 8px;">↔<br><span style="font-size:0.6em;writing-mode:vertical-rl;transform:rotate(180deg);color:#64748b;">Na⁺-K⁺ Pump</span></div>
    <div class="elec-icf">
      <h4>🟣 ICF (Intracellular Fluid) — Muscle</h4>
      <div style="font-size:11px;font-weight:600;margin-bottom:8px;">CATIONS (mEq/L)</div>
      <div class="ion-row"><span class="ion-name">K⁺ (MAIN)</span><span class="ion-val">150 mEq/L ⭐</span></div>
      <div class="ion-row"><span class="ion-name">Mg²⁺</span><span class="ion-val">26 mEq/L</span></div>
      <div class="ion-row"><span class="ion-name">Na⁺</span><span class="ion-val">10 mEq/L</span></div>
      <div style="font-size:11px;font-weight:600;margin:8px 0;">ANIONS (mEq/L)</div>
      <div class="ion-row"><span class="ion-name">HPO₄²⁻ (MAIN)</span><span class="ion-val">100 mEq/L ⭐</span></div>
      <div class="ion-row"><span class="ion-name">Proteins</span><span class="ion-val">65 mEq/L</span></div>
      <div class="ion-row"><span class="ion-name">Organic acids</span><span class="ion-val">small amounts</span></div>
      <div class="ion-row"><span class="ion-name">HCO₃⁻</span><span class="ion-val">10 mEq/L (low)</span></div>
    </div>
  </div>

  <div class="box box-mnemonic">
    <div class="box-title">🧠 Mnemonic: "Sodium Stays Outside, Potassium Prefers Privacy (Inside)"</div>
    <strong>Na⁺</strong> = Naturally outside (ECF) &nbsp;|&nbsp; <strong>K⁺</strong> = Keeps itself inside (ICF)<br>
    Anions: <strong>Cl⁻ &amp; HCO₃⁻</strong> outside (ECF) &nbsp;|&nbsp; <strong>HPO₄²⁻ &amp; Proteins</strong> inside (ICF)
  </div>

  <h3>Na⁺-K⁺ ATPase Pump (Maintains the Gradient)</h3>
  <div class="fc-wrap">
    <div class="fc-title">Na⁺-K⁺ PUMP — 3 Na⁺ OUT, 2 K⁺ IN per cycle</div>
    <div class="fc-row-center">
      <div class="fc-box fc-danger">3 Na⁺ pumped OUT of cell</div>
      <div class="fc-h-arrow">⇄</div>
      <div class="fc-box fc-process">ATP → ADP + Pi<br>(Energy required)</div>
      <div class="fc-h-arrow">⇄</div>
      <div class="fc-box fc-result">2 K⁺ pumped INTO cell</div>
    </div>
    <div class="fc-label" style="margin-top:8px;">Net result: Na⁺ high outside, K⁺ high inside. This gradient is essential for nerve impulse, muscle contraction and cell volume regulation.</div>
  </div>
</div>

<!-- ===== SECTION 4: OSMOLALITY ===== -->
<div class="section">
  <div class="section-header">
    <div class="section-icon icon-purple">🔬</div>
    <h2>4. Osmolarity, Osmolality & Plasma Osmolality
      <small>Normal plasma osmolality = 285–295 mOsm/kg</small>
    </h2>
  </div>

  <div class="two-col">
    <div class="mini-card">
      <h4>Osmolarity</h4>
      Number of moles (or millimoles) per <strong>litre of SOLUTION</strong><br>
      Unit: mOsm/L<br>
      <span style="font-size:11px;color:#64748b;">Used in simple lab calculations</span>
    </div>
    <div class="mini-card">
      <h4>Osmolality</h4>
      Number of moles (or millimoles) per <strong>kg of SOLVENT</strong><br>
      Unit: mOsm/kg<br>
      <span style="font-size:11px;color:#64748b;">Used clinically (more accurate for body fluids)</span>
    </div>
  </div>

  <div class="box box-key">
    <div class="box-title">⭐ Plasma Osmolality = 285–295 mOsm/kg</div>
    Sodium and its associated anions contribute approximately <strong>90%</strong> of plasma osmolality. That's why Na⁺ is the key ion controlling plasma tonicity.
  </div>

  <h3>Formula to Calculate Plasma Osmolality</h3>
  <div class="formula-big">
    Plasma Osmolality = 2(Na⁺) + 2(K⁺) + Urea + Glucose
    <div style="font-size:0.65em;font-weight:400;margin-top:6px;color:#6d28d9;">(All values in mmol/L; factor of 2 for Na⁺ and K⁺ accounts for their associated anions)</div>
  </div>

  <div class="box box-clinical">
    <div class="box-title">🩺 Clinical Application — Osmolal Gap</div>
    <strong>Osmolal Gap</strong> = Measured osmolality − Calculated osmolality<br>
    Normal gap &lt; 10 mOsm/kg. A <strong>high osmolal gap</strong> suggests presence of unmeasured osmoles like alcohol (methanol, ethanol), mannitol, or ethylene glycol poisoning.
  </div>

  <h3>Isotonic, Hypotonic & Hypertonic Solutions</h3>
  <table>
    <tr><th>Solution Type</th><th>Osmolality vs Plasma</th><th>Effect on Red Blood Cells</th><th>Clinical Use</th></tr>
    <tr><td class="td-green"><strong>Isotonic</strong></td><td>Equal (~285–295 mOsm)</td><td>No change (normal shape)</td><td>0.9% NaCl, 5% glucose — IV fluid</td></tr>
    <tr><td class="td-red"><strong>Hypertonic</strong></td><td>Higher than plasma</td><td>Crenation (cell shrinks)</td><td>Correcting hyponatremia</td></tr>
    <tr><td class="td-blue"><strong>Hypotonic</strong></td><td>Lower than plasma</td><td>Lysis (cell swells &amp; bursts)</td><td>Causes cells to swell</td></tr>
  </table>
</div>

<!-- ===== SECTION 5: HORMONAL REGULATION ===== -->
<div class="section">
  <div class="section-header">
    <div class="section-icon icon-orange">🏥</div>
    <h2>5. Hormonal Regulation of Water & Electrolyte Balance
      <small>ADH controls water | Aldosterone controls Na⁺ | ANP opposes both</small>
    </h2>
  </div>

  <h3>ADH (Antidiuretic Hormone / Vasopressin)</h3>
  <div class="fc-wrap">
    <div class="fc-title">ADH — REGULATION FLOWCHART</div>
    <div class="fc-col">
      <div class="fc-box fc-danger">↑ Plasma Osmolality OR ↓ Blood Volume</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-decision">Osmoreceptors in Hypothalamus activated</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-process">ADH released from Posterior Pituitary</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-result">↑ Water reabsorption in renal collecting ducts</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-result">↓ Urine volume (concentrated urine) → Plasma osmolality normalizes</div>
    </div>
  </div>

  <div class="box box-clinical">
    <div class="box-title">🩺 Diabetes Insipidus</div>
    <strong>ADH deficiency</strong> → kidneys cannot reabsorb water → very large volume of dilute urine (polyuria) → severe dehydration. Not related to blood sugar — named "insipidus" (tasteless) vs diabetes mellitus (sweet urine).
  </div>

  <h3>Aldosterone — Na⁺ & K⁺ Regulation (RAAS)</h3>
  <div class="fc-wrap">
    <div class="fc-title">RAAS — RENIN-ANGIOTENSIN-ALDOSTERONE SYSTEM</div>
    <div class="fc-col">
      <div class="fc-box fc-danger">↓ Blood pressure / ↓ Blood volume / ↓ Na⁺</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-process">Kidney JGA cells release <strong>RENIN</strong></div>
      <div class="fc-arrow">↓</div>
      <div class="fc-row-center">
        <div class="fc-box fc-decision">Angiotensinogen (liver)</div>
        <div class="fc-h-arrow">→ Renin →</div>
        <div class="fc-box fc-process">Angiotensin I</div>
        <div class="fc-h-arrow">→ ACE →</div>
        <div class="fc-box fc-purple">Angiotensin II</div>
      </div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-orange">Adrenal cortex releases <strong>ALDOSTERONE</strong></div>
      <div class="fc-arrow">↓</div>
      <div class="fc-row-center">
        <div class="fc-box fc-result">↑ Na⁺ reabsorption by kidney tubules</div>
        <div style="font-size:1em;color:#94a3b8;padding:0 8px;">+</div>
        <div class="fc-box fc-danger">↑ K⁺ excretion in urine</div>
      </div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-result">↑ Blood pressure and blood volume restored</div>
    </div>
  </div>

  <div class="box box-mnemonic">
    <div class="box-title">🧠 Mnemonic: "RAAS Saves Sodium, Loses Potassium"</div>
    Aldosterone = <strong>Al</strong>ways <strong>saves</strong> sodium (reabsorbs Na⁺) and <strong>loses</strong> potassium (excretes K⁺)<br>
    <strong>ACE inhibitors</strong> (like enalapril) block this — used in hypertension treatment
  </div>

  <h3>ANP — Atrial Natriuretic Peptide (Opposes RAAS)</h3>
  <ul>
    <li>Released from <strong>atrial cells</strong> when blood volume/pressure is too HIGH</li>
    <li>Actions: ↑ Na⁺ excretion (natriuresis), ↑ urine output (diuresis), ↓ renin &amp; aldosterone</li>
    <li>Net effect: REDUCES blood volume and blood pressure</li>
    <li>Think of ANP as the body's natural "anti-RAAS"</li>
  </ul>
</div>

<!-- ===== SECTION 6: DEHYDRATION ===== -->
<div class="section page-break">
  <div class="section-header">
    <div class="section-icon icon-red">🏜️</div>
    <h2>6. Dehydration & Overhydration
      <small>Clinical conditions of water imbalance</small>
    </h2>
  </div>

  <h3>Dehydration</h3>
  <p><strong>Definition:</strong> A condition characterized by water depletion in the body — due to insufficient intake, excessive loss, or both.</p>

  <div class="two-col">
    <div class="mini-card">
      <h4>Type 1: Water Loss Alone</h4>
      <ul>
        <li>ADH deficiency (Diabetes Insipidus)</li>
        <li>Excessive sweating (fever, hot climate)</li>
        <li>Insensible loss (breathing, skin)</li>
      </ul>
    </div>
    <div class="mini-card">
      <h4>Type 2: Water + Electrolyte Loss</h4>
      <ul>
        <li>Diarrhea &amp; vomiting (most common)</li>
        <li>Burns (large fluid loss from skin)</li>
        <li>Renal disease, Adrenocortical dysfunction</li>
      </ul>
    </div>
  </div>

  <h3>What Happens in Dehydration — Step by Step</h3>
  <div class="steps">
    <div class="step"><div class="step-num">1</div><div class="step-body"><strong>ECF volume decreases</strong> → electrolyte concentration rises → osmotic pressure increases</div></div>
    <div class="step"><div class="step-num">2</div><div class="step-body"><strong>Water drawn from ICF</strong> → cells shrink → disturbed metabolism → ↑ protein breakdown</div></div>
    <div class="step"><div class="step-num">3</div><div class="step-body"><strong>ADH secretion increases</strong> → kidneys retain water → urine volume very low (oliguria)</div></div>
    <div class="step"><div class="step-num">4</div><div class="step-body"><strong>Plasma proteins &amp; blood urea INCREASE</strong> (concentrated due to less water)</div></div>
    <div class="step"><div class="step-num">5</div><div class="step-body"><strong>Electrolyte loss</strong> — Na⁺, K⁺ also lost along with water</div></div>
  </div>

  <h3>Clinical Features by Severity</h3>
  <table>
    <tr><th>Degree</th><th>% Body Weight Lost</th><th>Clinical Features</th></tr>
    <tr><td class="td-green">Mild</td><td>&lt;5%</td><td>Thirst, dry mouth, slight headache</td></tr>
    <tr><td class="td-orange">Moderate</td><td>5–10%</td><td>Decreased skin turgor, sunken eyes, oliguria, tachycardia</td></tr>
    <tr><td class="td-red">Severe</td><td>&gt;10%</td><td>↑ Pulse, ↓ BP, sunken eyeballs, lethargy, confusion, coma</td></tr>
  </table>

  <div class="box box-clinical">
    <div class="box-title">💊 Treatment of Dehydration</div>
    <ul>
      <li>Mild/Moderate: <strong>Oral Rehydration Solution (ORS)</strong> — water + electrolytes by mouth</li>
      <li>Severe or unable to drink: <strong>IV isotonic saline (0.9% NaCl) or 5% glucose</strong></li>
      <li>If electrolytes lost: replace Na⁺ and K⁺ carefully with monitoring</li>
    </ul>
  </div>

  <h3>Cholera — Classic Example of Osmotic Dehydration</h3>
  <div class="fc-wrap">
    <div class="fc-title">CHOLERA PATHOPHYSIOLOGY</div>
    <div class="fc-col">
      <div class="fc-box fc-process">Vibrio cholerae ingested (contaminated water/food)</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-decision">Bacterium colonizes gut → secretes CHOLERA TOXIN</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-orange">Toxin activates adenylyl cyclase → ↑↑ cAMP in intestinal cells</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-danger">Intestinal cells secrete massive amounts of Cl⁻, Na⁺, K⁺, HCO₃⁻ into gut lumen</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-danger">Water follows osmotically → "Rice water stools" (up to 10–20 L/day!)</div>
      <div class="fc-arrow">↓</div>
      <div class="fc-box fc-danger">Severe dehydration, metabolic acidosis, hypokalemia → DEATH if untreated</div>
    </div>
    <div style="margin-top:10px;" class="box box-clinical">
      <div class="box-title">💊 Treatment: ORS</div>
      Oral Rehydration Solution (ORS) — discovered to be as effective as IV fluids in most cases. Na⁺ in ORS co-transports glucose into intestinal cells, pulling water with it (SGLT1 transporter still works even with cholera toxin).
    </div>
  </div>

  <h3>Overhydration (Water Intoxication)</h3>
  <ul>
    <li><strong>Definition:</strong> Excess water accumulation in body</li>
    <li><strong>Cause:</strong> Excessive IV fluid infusion, SIADH (Syndrome of Inappropriate ADH), renal failure</li>
    <li><strong>Result:</strong> Hyponatremia (diluted Na⁺), cellular swelling → cerebral edema → confusion, seizures, coma</li>
    <li><strong>Treatment:</strong> Fluid restriction, hypertonic saline in severe cases</li>
  </ul>
</div>

<!-- ===== SECTION 7: BLOOD BUFFERS ===== -->
<div class="section">
  <div class="section-header">
    <div class="section-icon icon-yellow">🛡️</div>
    <h2>7. Blood Buffers — Three Lines of Defense
      <small>Buffer → Lungs → Kidneys (speed: fast → medium → slow but permanent)</small>
    </h2>
  </div>

  <div class="box box-key">
    <div class="box-title">⭐ KEY CONCEPT: What is a Buffer?</div>
    A buffer is a solution of a <strong>weak acid (HA)</strong> and its <strong>salt (BA) with a strong base</strong>.<br>
    A buffer <strong>resists change in pH</strong> when acid or alkali is added — it acts as a "shock absorber" for H⁺ ions.<br>
    <strong>IMPORTANT:</strong> Buffers <em>cannot remove</em> H⁺ ions permanently — they only temporarily neutralize them. The kidneys must ultimately eliminate H⁺.
  </div>

  <h3>Three Lines of Defense for pH Maintenance</h3>
  <div class="fc-wrap">
    <div class="fc-title">THREE LINES OF pH DEFENSE</div>
    <div class="fc-row-center">
      <div style="text-align:center;">
        <div class="fc-box fc-process" style="width:160px;">LINE 1: BUFFERS<br><small>Seconds–Minutes</small></div>
        <div style="font-size:10px;color:#64748b;margin-top:4px;">⚡ Fastest<br>Temporary fix</div>
      </div>
      <div class="fc-h-arrow">→</div>
      <div style="text-align:center;">
        <div class="fc-box fc-decision" style="width:160px;">LINE 2: LUNGS<br><small>Minutes–Hours</small></div>
        <div style="font-size:10px;color:#64748b;margin-top:4px;">🫁 Medium speed<br>Short-term</div>
      </div>
      <div class="fc-h-arrow">→</div>
      <div style="text-align:center;">
        <div class="fc-box fc-result" style="width:160px;">LINE 3: KIDNEYS<br><small>Hours–Days</small></div>
        <div style="font-size:10px;color:#64748b;margin-top:4px;">🩺 Slowest<br>Permanent solution</div>
      </div>
    </div>
  </div>

  <h3>The 3 Blood Buffer Systems</h3>
  <div class="buffer-grid">
    <div class="buffer-card buf-bicarb">
      <h4>1. BICARBONATE BUFFER</h4>
      <div class="pair">NaHCO₃ / H₂CO₃</div>
      <div class="pct">53%</div>
      <div style="font-size:11px;font-weight:700;color:#1d4ed8;">MOST IMPORTANT!</div>
      <div class="note">Mainly in ECF/plasma<br>Regulated by lungs (CO₂) and kidneys (HCO₃⁻)</div>
    </div>
    <div class="buffer-card buf-phosphate">
      <h4>2. PHOSPHATE BUFFER</h4>
      <div class="pair">Na₂HPO₄ / NaH₂PO₄</div>
      <div class="pct">~5%</div>
      <div style="font-size:11px;font-weight:700;color:#15803d;">Mainly in ICF &amp; urine</div>
      <div class="note">pKa = 6.8 (effective in urine)<br>Key for titratable acidity in kidney</div>
    </div>
    <div class="buffer-card buf-protein">
      <h4>3. PROTEIN BUFFER</h4>
      <div class="pair">Protein-H / Protein⁻</div>
      <div class="pct">~40%</div>
      <div style="font-size:11px;font-weight:700;color:#7e22ce;">Largest capacity!</div>
      <div class="note">Hemoglobin (Hb) is the most important protein buffer (in RBCs). Plasma proteins also contribute.</div>
    </div>
  </div>

  <div class="box box-mnemonic">
    <div class="box-title">🧠 Mnemonic: "BPP" — Buffers from Best to Proteins</div>
    <strong>B</strong>icarbonate (most important clinically) → <strong>P</strong>hosphate (important in urine) → <strong>P</strong>roteins (largest buffering capacity)
  </div>
</div>

<!-- ===== SECTION 8: H-H EQUATION ===== -->
<div class="section">
  <div class="section-header">
    <div class="section-icon icon-purple">🧮</div>
    <h2>8. Henderson-Hasselbalch Equation
      <small>The master equation for understanding blood pH</small>
    </h2>
  </div>

  <h3>Derivation (Step-by-Step)</h3>
  <div class="steps">
    <div class="step"><div class="step-num">1</div><div class="step-body">Carbonic acid dissociates: <strong>H₂CO₃ ⇌ H⁺ + HCO₃⁻</strong></div></div>
    <div class="step"><div class="step-num">2</div><div class="step-body">By law of mass action: <strong>[H⁺] = Ka × [H₂CO₃] / [HCO₃⁻]</strong></div></div>
    <div class="step"><div class="step-num">3</div><div class="step-body">Taking negative log: <strong>pH = pKa + log([HCO₃⁻] / [H₂CO₃])</strong></div></div>
  </div>

  <div class="formula-big">
    pH = pKa + log [HCO₃⁻] / [H₂CO₃]
    <div style="font-size:0.6em;font-weight:400;color:#6d28d9;margin-top:6px;">
      Henderson-Hasselbalch Equation — applies to ANY buffer pair
    </div>
  </div>

  <h3>Applied to Bicarbonate Buffer in Blood</h3>
  <div class="formula-big">
    pH = 6.1 + log [HCO₃⁻] / [H₂CO₃]
    <div style="font-size:0.65em;font-weight:400;margin-top:6px;color:#4c1d95;">
      At normal pH 7.4: &nbsp;[HCO₃⁻] = 24 mEq/L &nbsp;|&nbsp; [H₂CO₃] = 1.2 mEq/L &nbsp;|&nbsp; Ratio = 20:1
    </div>
  </div>

  <div class="box box-key">
    <div class="box-title">⭐ The Critical 20:1 Ratio</div>
    At pH 7.4: <strong>[HCO₃⁻] : [H₂CO₃] = 20 : 1</strong><br>
    The pH does NOT depend on absolute values — it depends on the <strong>ratio</strong>.<br>
    As long as this 20:1 ratio is maintained, blood pH stays at 7.4 — this is why compensation works!
  </div>

  <div class="box box-formula">
    <div class="box-title">📐 H₂CO₃ ↔ CO₂ Connection</div>
    H₂CO₃ = CO₂ dissolved in blood. Since CO₂ is controlled by breathing:<br>
    <strong>[H₂CO₃] = 0.03 × pCO₂</strong><br>
    Normal pCO₂ = 40 mmHg → [H₂CO₃] = 0.03 × 40 = 1.2 mEq/L<br>
    So the equation becomes: <strong>pH = 6.1 + log [HCO₃⁻] / (0.03 × pCO₂)</strong>
  </div>

  <table>
    <tr><th>Parameter</th><th>Normal Value</th><th>Controlled by</th></tr>
    <tr><td>Blood pH</td><td class="td-blue">7.35–7.45</td><td>All 3 mechanisms</td></tr>
    <tr><td>HCO₃⁻ (bicarbonate)</td><td class="td-green">22–26 mEq/L (avg 24)</td><td>Kidneys (metabolic)</td></tr>
    <tr><td>H₂CO₃ (carbonic acid)</td><td class="td-orange">1.2 mEq/L</td><td>Lungs (respiratory)</td></tr>
    <tr><td>pCO₂</td><td class="td-purple">35–45 mmHg (avg 40)</td><td>Lungs (respiratory)</td></tr>
    <tr><td>pO₂</td><td>80–100 mmHg</td><td>Lungs</td></tr>
  </table>
</div>

<!-- ===== SECTION 9: RESPIRATORY ===== -->
<div class="section page-break">
  <div class="section-header">
    <div class="section-icon icon-blue">🫁</div>
    <h2>9. Respiratory Regulation of Blood pH
      <small>Fast but temporary — lungs control CO₂ = control of H₂CO₃</small>
    </h2>
  </div>

  <h3>Basic Principle</h3>
  <p>CO₂ produced by cells combines with water → H₂CO₃ → which lowers pH. The lungs blow off CO₂ in exhaled air, reducing H₂CO₃ and raising pH. The <strong>respiratory centre in the medulla oblongata</strong> controls breathing rate and is highly sensitive to blood pH.</p>

  <div class="fc-wrap">
    <div class="fc-title">RESPIRATORY pH CONTROL — FEEDBACK LOOP</div>
    <div class="fc-row-center">
      <div style="text-align:center;">
        <div class="fc-box fc-danger">↓ pH (acidosis)</div>
        <div style="font-size:10px;margin-top:4px;">More H⁺, more CO₂</div>
      </div>
      <div class="fc-h-arrow">→</div>
      <div class="fc-box fc-decision">Medullary respiratory centre detects ↓ pH</div>
      <div class="fc-h-arrow">→</div>
      <div class="fc-box fc-process">HYPERVENTILATION (↑ breathing rate)</div>
      <div class="fc-h-arrow">→</div>
      <div class="fc-box fc-result">↑ CO₂ blown off → ↓ H₂CO₃ → ↑ pH back to 7.4</div>
    </div>
    <div style="height:10px;"></div>
    <div class="fc-row-center">
      <div style="text-align:center;">
        <div class="fc-box fc-result">↑ pH (alkalosis)</div>
        <div style="font-size:10px;margin-top:4px;">Less H⁺, less CO₂</div>
      </div>
      <div class="fc-h-arrow">→</div>
      <div class="fc-box fc-decision">Medullary centre detects ↑ pH</div>
      <div class="fc-h-arrow">→</div>
      <div class="fc-box fc-orange">HYPOVENTILATION (↓ breathing rate)</div>
      <div class="fc-h-arrow">→</div>
      <div class="fc-box fc-danger">CO₂ retained → ↑ H₂CO₃ → ↓ pH back to 7.4</div>
    </div>
  </div>

  <div class="box box-warning">
    <div class="box-title">⚠️ Limitation of Respiratory Compensation</div>
    Respiratory control is <strong>RAPID (minutes)</strong> but only a <strong>SHORT-TERM solution</strong>. Hyperventilation cannot continue indefinitely — the muscles tire and CO₂ levels must be maintained for adequate tissue oxygenation. For permanent correction, the kidneys must act.
  </div>

  <h3>Hemoglobin as a Buffer — The Isohydric Transport</h3>
  <div class="fc-wrap">
    <div class="fc-title">CHLORIDE SHIFT & HEMOGLOBIN BUFFERING</div>
    <div class="chloride-wrap">
      <div class="chl-col chl-blood">
        <h4>🩸 BLOOD (Plasma)</h4>
        <div class="arrow-item">CO₂ produced by tissues</div>
        <div class="arrow-item">↓ diffuses into RBC</div>
        <div class="arrow-item" style="color:#64748b;font-style:italic;">Cl⁻ moves INTO RBC<br>(electrical neutrality)</div>
        <div class="arrow-item">HCO₃⁻ diffuses OUT into plasma</div>
      </div>
      <div class="chl-col chl-rbc">
        <h4>🔴 RBC (Erythrocyte)</h4>
        <div class="arrow-item">CO₂ + H₂O → H₂CO₃</div>
        <div class="arrow-item">↓ Carbonic Anhydrase (CA)</div>
        <div class="arrow-item">H₂CO₃ → H⁺ + HCO₃⁻</div>
        <div class="arrow-item">H⁺ buffered by <strong>Hemoglobin</strong></div>
        <div class="arrow-item">HCO₃⁻ exits into plasma</div>
        <div class="arrow-item">Cl⁻ enters RBC (chloride shift)</div>
      </div>
      <div class="chl-col chl-lumen">
        <h4>🫁 IN LUNGS (reversal)</h4>
        <div class="arrow-item">O₂ binds to Hb</div>
        <div class="arrow-item">↓ Hb releases H⁺</div>
        <div class="arrow-item">H⁺ + HCO₃⁻ → H₂CO₃</div>
        <div class="arrow-item">↓ Carbonic Anhydrase</div>
        <div class="arrow-item">H₂CO₃ → CO₂ + H₂O</div>
        <div class="arrow-item">CO₂ exhaled</div>
      </div>
    </div>
    <div style="font-size:11px;text-align:center;color:#475569;margin-top:8px;">
      This entire process of CO₂ transport as HCO₃⁻ with minimal pH change is called <strong>Isohydric Transport</strong>
    </div>
  </div>

  <div class="box box-mnemonic">
    <div class="box-title">🧠 Mnemonic: "Chloride Shifts In when bicarb goes Out"</div>
    At tissues: HCO₃⁻ leaves RBC → Cl⁻ enters RBC (to balance charge)<br>
    At lungs: Cl⁻ leaves RBC → HCO₃⁻ enters RBC (reversed)<br>
    Enzyme: <strong>Carbonic Anhydrase</strong> (CA) — catalyzes CO₂ + H₂O ⇌ H₂CO₃ (also called carbonate dehydratase)
  </div>
</div>

<!-- ===== SECTION 10: RENAL ===== -->
<div class="section">
  <div class="section-header">
    <div class="section-icon icon-green">🫘</div>
    <h2>10. Renal Regulation of pH — 4 Mechanisms
      <small>Slowest but the only PERMANENT solution to acid-base imbalance</small>
    </h2>
  </div>

  <div class="box box-key">
    <div class="box-title">⭐ Why Kidneys Are Most Important</div>
    Buffers = temporary shock absorbers. Lungs = short-term fix. Only the kidneys can <strong>permanently eliminate H⁺</strong> from the body or regenerate HCO₃⁻. Normal urine pH range = <strong>4.5–8.0</strong> (can go as low as 4.5 in acidosis!).
  </div>

  <h3>The 4 Renal Mechanisms</h3>

  <div class="steps">
    <div class="step">
      <div class="step-num">1</div>
      <div class="step-body">
        <strong>Secretion of H⁺ ions (H⁺-Na⁺ exchange)</strong><br>
        Renal tubular cells generate H⁺ and HCO₃⁻ from CO₂ + H₂O (via carbonic anhydrase). H⁺ is <strong>pumped into tubular lumen</strong> in exchange for Na⁺. The Na⁺ is reabsorbed into blood with HCO₃⁻. This directly reduces blood [H⁺] and replenishes HCO₃⁻ stores.
      </div>
    </div>
    <div class="step">
      <div class="step-num">2</div>
      <div class="step-body">
        <strong>Reabsorption of Bicarbonate (HCO₃⁻)</strong><br>
        Filtered HCO₃⁻ in the tubular lumen combines with secreted H⁺ → forms H₂CO₃ → split by carbonic anhydrase → CO₂ + H₂O. CO₂ re-enters the tubular cell → regenerates HCO₃⁻ → returned to blood. <em>This conserves bicarbonate, not eliminates acid.</em>
      </div>
    </div>
    <div class="step">
      <div class="step-num">3</div>
      <div class="step-body">
        <strong>Excretion of Titratable Acid (Phosphate Buffer)</strong><br>
        H⁺ secreted into tubular lumen combines with <strong>Na₂HPO₄</strong> (dibasic phosphate) to form <strong>NaH₂PO₄</strong> (monobasic) — this is excreted as titratable acid. Na⁺ from the phosphate is reabsorbed with HCO₃⁻.<br>
        Titratable acidity = milliliters of N/10 NaOH to titrate 1L of urine back to pH 7.4.<br>
        Urine pH can drop to as low as <strong>4.5</strong>.
      </div>
    </div>
    <div class="step">
      <div class="step-num">4</div>
      <div class="step-body">
        <strong>Excretion of Ammonium Ions (NH₄⁺)</strong><br>
        Glutamine in renal tubular cells → hydrolyzed to <strong>NH₃</strong> (by glutaminase) + → NH₃ diffuses into lumen → combines with H⁺ → forms <strong>NH₄⁺</strong> (ammonium ion) → excreted in urine. This is the most important mechanism in <strong>chronic acidosis</strong> — the kidney can increase NH₄⁺ excretion 10-fold.<br>
        By excreting NH₄⁺, the kidney gets rid of H⁺ while regenerating HCO₃⁻.
      </div>
    </div>
  </div>

  <div class="fc-wrap">
    <div class="fc-title">SUMMARY — RENAL MECHANISMS AT A GLANCE</div>
    <table style="margin:0;">
      <tr><th>Mechanism</th><th>What is secreted?</th><th>What is reabsorbed?</th><th>Importance</th></tr>
      <tr><td>H⁺ secretion</td><td class="td-red">H⁺ into lumen</td><td class="td-green">Na⁺ + HCO₃⁻ into blood</td><td>Primary mechanism</td></tr>
      <tr><td>HCO₃⁻ reabsorption</td><td>—</td><td class="td-green">HCO₃⁻ conserved</td><td>Prevents HCO₃⁻ loss</td></tr>
      <tr><td>Titratable acid (phosphate)</td><td class="td-red">NaH₂PO₄ in urine</td><td class="td-green">Na⁺ + HCO₃⁻</td><td>Excretes acid, buffers urine</td></tr>
      <tr><td>Ammonium (NH₄⁺)</td><td class="td-red">NH₄⁺ in urine</td><td class="td-green">HCO₃⁻ regenerated</td><td>Most important in chronic acidosis</td></tr>
    </table>
  </div>
</div>

<!-- ===== SECTION 11: ACID-BASE DISORDERS ===== -->
<div class="section page-break">
  <div class="section-header">
    <div class="section-icon icon-red">⚗️</div>
    <h2>11. Acid-Base Disorders — The 4 Types
      <small>The most high-yield topic in all of Biochemistry for clinical exams</small>
    </h2>
  </div>

  <div class="box box-key">
    <div class="box-title">⭐ Master Concept</div>
    pH depends on the ratio: <strong>[HCO₃⁻] / [H₂CO₃]</strong><br>
    ↓ pH (acidosis) = HCO₃⁻ falls OR H₂CO₃ rises<br>
    ↑ pH (alkalosis) = HCO₃⁻ rises OR H₂CO₃ falls<br>
    <strong>Metabolic = problem with HCO₃⁻ | Respiratory = problem with H₂CO₃ (CO₂)</strong>
  </div>

  <div class="disorder-grid">
    <div class="disorder-card dis-met-acid">
      <div class="dis-tag tag-acid">ACIDOSIS · METABOLIC</div>
      <h4>1. Metabolic Acidosis</h4>
      <strong>Primary change:</strong> ↓ HCO₃⁻ → ↓ pH<br><br>
      <strong>Causes:</strong>
      <ul>
        <li>Diabetic ketoacidosis (ketone bodies)</li>
        <li>Lactic acidosis (exercise, shock, sepsis)</li>
        <li>Renal failure (can't excrete H⁺)</li>
        <li>Diarrhea (HCO₃⁻ loss in stool)</li>
        <li>Ingestion of acids (salicylate poisoning)</li>
      </ul>
      <div class="comp-change">
        <strong>Compensation:</strong> Lungs (hyperventilation) ↓ pCO₂ → ↓ H₂CO₃<br>
        <em>(Kussmaul's breathing in DKA)</em>
      </div>
    </div>

    <div class="disorder-card dis-resp-acid">
      <div class="dis-tag tag-acid">ACIDOSIS · RESPIRATORY</div>
      <h4>2. Respiratory Acidosis</h4>
      <strong>Primary change:</strong> ↑ H₂CO₃ (↑ pCO₂) → ↓ pH<br><br>
      <strong>Causes:</strong>
      <ul>
        <li>Severe asthma (can't exhale CO₂)</li>
        <li>COPD / emphysema</li>
        <li>Cardiac arrest (respiratory failure)</li>
        <li>Narcotic overdose (respiratory depression)</li>
        <li>Neuromuscular diseases</li>
      </ul>
      <div class="comp-change">
        <strong>Compensation:</strong> Kidneys retain HCO₃⁻ and excrete more H⁺ (takes days)
      </div>
    </div>

    <div class="disorder-card dis-met-alk">
      <div class="dis-tag tag-alk">ALKALOSIS · METABOLIC</div>
      <h4>3. Metabolic Alkalosis</h4>
      <strong>Primary change:</strong> ↑ HCO₃⁻ → ↑ pH<br><br>
      <strong>Causes:</strong>
      <ul>
        <li>Vomiting (loss of HCl from stomach)</li>
        <li>Hypokalemia (K⁺ deficiency)</li>
        <li>Excessive antacid intake</li>
        <li>IV sodium bicarbonate overdose</li>
        <li>Primary hyperaldosteronism</li>
      </ul>
      <div class="comp-change">
        <strong>Compensation:</strong> Lungs (hypoventilation) ↑ pCO₂ → ↑ H₂CO₃
      </div>
    </div>

    <div class="disorder-card dis-resp-alk">
      <div class="dis-tag tag-alk">ALKALOSIS · RESPIRATORY</div>
      <h4>4. Respiratory Alkalosis</h4>
      <strong>Primary change:</strong> ↓ H₂CO₃ (↓ pCO₂) → ↑ pH<br><br>
      <strong>Causes:</strong>
      <ul>
        <li>Hyperventilation (anxiety, panic attack)</li>
        <li>High altitude (low O₂ → breathe faster)</li>
        <li>Severe anemia</li>
        <li>Salicylate (aspirin) overdose — early stage</li>
        <li>Fever, mechanical over-ventilation</li>
      </ul>
      <div class="comp-change">
        <strong>Compensation:</strong> Kidneys excrete more HCO₃⁻ and retain H⁺ (takes days)
      </div>
    </div>
  </div>

  <h3>Master Summary Table — All 4 Disorders</h3>
  <table>
    <tr><th>Disorder</th><th>pH</th><th>HCO₃⁻</th><th>pCO₂</th><th>Primary Cause</th><th>Compensation</th></tr>
    <tr>
      <td><strong>Metabolic Acidosis</strong></td>
      <td class="td-red">↓</td>
      <td class="td-red">↓ (PRIMARY)</td>
      <td>↓ (compensatory)</td>
      <td>↓ HCO₃⁻</td>
      <td>Lungs: hyperventilate</td>
    </tr>
    <tr>
      <td><strong>Respiratory Acidosis</strong></td>
      <td class="td-red">↓</td>
      <td>↑ (compensatory)</td>
      <td class="td-red">↑ (PRIMARY)</td>
      <td>↑ CO₂/H₂CO₃</td>
      <td>Kidneys: retain HCO₃⁻</td>
    </tr>
    <tr>
      <td><strong>Metabolic Alkalosis</strong></td>
      <td class="td-blue">↑</td>
      <td class="td-blue">↑ (PRIMARY)</td>
      <td>↑ (compensatory)</td>
      <td>↑ HCO₃⁻</td>
      <td>Lungs: hypoventilate</td>
    </tr>
    <tr>
      <td><strong>Respiratory Alkalosis</strong></td>
      <td class="td-blue">↑</td>
      <td>↓ (compensatory)</td>
      <td class="td-blue">↓ (PRIMARY)</td>
      <td>↓ CO₂/H₂CO₃</td>
      <td>Kidneys: excrete HCO₃⁻</td>
    </tr>
  </table>

  <div class="box box-mnemonic">
    <div class="box-title">🧠 Mnemonic: "ROME" — Remember Opposite &amp; Metabolic Equal</div>
    <strong>R</strong>espiratory: pH and pCO₂ move in <strong>O</strong>pposite directions (resp acidosis: ↓pH, ↑pCO₂)<br>
    <strong>M</strong>etabolic: pH and HCO₃⁻ move in <strong>E</strong>qual (same) direction (met acidosis: ↓pH, ↓HCO₃⁻)
  </div>
</div>

<!-- ===== SECTION 12: CLINICAL + COMPENSATION ===== -->
<div class="section">
  <div class="section-header">
    <div class="section-icon icon-orange">🩺</div>
    <h2>12. Clinical Causes, Compensation & ABG Interpretation
      <small>How to approach acid-base problems clinically</small>
    </h2>
  </div>

  <h3>How Compensation Works</h3>
  <p>When an acid-base disorder occurs, the body activates homeostatic mechanisms to <strong>restore pH toward 7.4</strong>. This is called <strong>compensation</strong> — it may be partial or complete.</p>

  <div class="fc-wrap">
    <div class="fc-title">COMPENSATION STRATEGY</div>
    <div class="fc-row-center">
      <div style="text-align:center;max-width:200px;">
        <div class="fc-box fc-danger">Metabolic Disorder<br>(HCO₃⁻ changed)</div>
        <div style="font-size:10px;margin-top:4px;">e.g., DKA → ↓ HCO₃⁻</div>
      </div>
      <div class="fc-h-arrow">→</div>
      <div style="text-align:center;max-width:200px;">
        <div class="fc-box fc-process">RESPIRATORY COMPENSATION<br>(Lungs adjust CO₂)</div>
        <div style="font-size:10px;margin-top:4px;">Rapid response<br>(minutes to hours)</div>
      </div>
    </div>
    <div style="height:12px;"></div>
    <div class="fc-row-center">
      <div style="text-align:center;max-width:200px;">
        <div class="fc-box fc-orange">Respiratory Disorder<br>(CO₂ changed)</div>
        <div style="font-size:10px;margin-top:4px;">e.g., COPD → ↑ CO₂</div>
      </div>
      <div class="fc-h-arrow">→</div>
      <div style="text-align:center;max-width:200px;">
        <div class="fc-box fc-result">RENAL COMPENSATION<br>(Kidneys adjust HCO₃⁻)</div>
        <div style="font-size:10px;margin-top:4px;">Slow response<br>(hours to days)</div>
      </div>
    </div>
  </div>

  <h3>Step-by-Step ABG Interpretation (Exam Gold)</h3>
  <div class="steps">
    <div class="step"><div class="step-num">1</div><div class="step-body"><strong>Look at pH:</strong> &lt;7.35 = Acidosis &nbsp;|&nbsp; &gt;7.45 = Alkalosis &nbsp;|&nbsp; 7.35–7.45 = Normal</div></div>
    <div class="step"><div class="step-num">2</div><div class="step-body"><strong>Look at pCO₂:</strong> &gt;45 = Respiratory acidosis &nbsp;|&nbsp; &lt;35 = Respiratory alkalosis</div></div>
    <div class="step"><div class="step-num">3</div><div class="step-body"><strong>Look at HCO₃⁻:</strong> &lt;22 = Metabolic acidosis &nbsp;|&nbsp; &gt;26 = Metabolic alkalosis</div></div>
    <div class="step"><div class="step-num">4</div><div class="step-body"><strong>Check compensation:</strong> Is the other component moving in the same direction as primary? If yes → compensated. Is pH normal? If yes → fully compensated.</div></div>
    <div class="step"><div class="step-num">5</div><div class="step-body"><strong>Use ROME rule</strong> to confirm: Respiratory = Opposite, Metabolic = Equal</div></div>
  </div>

  <h3>Classic Clinical Scenarios — High Yield for Exams</h3>
  <table>
    <tr><th>Clinical Scenario</th><th>Disorder</th><th>Key Mechanism</th></tr>
    <tr><td>Diabetic ketoacidosis (DKA)</td><td class="td-red">Metabolic Acidosis</td><td>↑ Ketone bodies (acetoacetate, β-hydroxybutyrate) → ↑ H⁺ → ↓ HCO₃⁻</td></tr>
    <tr><td>Lactic acidosis (shock, vigorous exercise)</td><td class="td-red">Metabolic Acidosis</td><td>Anaerobic metabolism → lactic acid → ↑ H⁺</td></tr>
    <tr><td>Renal failure (chronic)</td><td class="td-red">Metabolic Acidosis</td><td>Kidney can't excrete H⁺ or regenerate HCO₃⁻</td></tr>
    <tr><td>Severe vomiting (e.g. pyloric stenosis)</td><td class="td-blue">Metabolic Alkalosis</td><td>Loss of HCl from stomach → ↑ HCO₃⁻ remains</td></tr>
    <tr><td>Hypokalemia</td><td class="td-blue">Metabolic Alkalosis</td><td>K⁺ exits cell, H⁺ enters → ↑ intracellular H⁺ → ↑ HCO₃⁻ in plasma</td></tr>
    <tr><td>Severe asthma / COPD</td><td class="td-orange">Respiratory Acidosis</td><td>Can't exhale CO₂ → ↑ pCO₂ → ↑ H₂CO₃ → ↓ pH</td></tr>
    <tr><td>Cardiac arrest</td><td class="td-orange">Respiratory Acidosis</td><td>No breathing → CO₂ accumulates</td></tr>
    <tr><td>Anxiety/panic attack (hyperventilation)</td><td class="td-purple">Respiratory Alkalosis</td><td>Blow off too much CO₂ → ↓ pCO₂ → ↓ H₂CO₃ → ↑ pH</td></tr>
    <tr><td>High altitude</td><td class="td-purple">Respiratory Alkalosis</td><td>Low O₂ → hyperventilate → ↓ pCO₂</td></tr>
    <tr><td>Salicylate (aspirin) poisoning (early)</td><td class="td-purple">Respiratory Alkalosis</td><td>Aspirin directly stimulates respiratory centre → hyperventilation</td></tr>
    <tr><td>Salicylate (aspirin) poisoning (late)</td><td class="td-red">Metabolic Acidosis</td><td>Accumulation of salicylate (acid) → ↓ HCO₃⁻</td></tr>
    <tr><td>Cholera / severe diarrhea</td><td class="td-red">Metabolic Acidosis</td><td>Loss of HCO₃⁻ in stool → ↓ plasma HCO₃⁻</td></tr>
  </table>

  <div class="box box-exam">
    <div class="box-title">🎯 Exam Tip — Salicylate Poisoning is Tricky!</div>
    Salicylate (aspirin) poisoning causes <strong>MIXED disorder</strong>:<br>
    <strong>Early:</strong> Respiratory alkalosis (aspirin stimulates breathing centre → hyperventilation)<br>
    <strong>Late:</strong> Metabolic acidosis (salicylate is an acid, causes lactic acid accumulation)<br>
    Final result: <strong>Mixed respiratory alkalosis + metabolic acidosis</strong> — very common exam question!
  </div>
</div>

<!-- ===== QUICK REVIEW / HIGH YIELD NUMBERS ===== -->
<div class="section">
  <div class="section-header">
    <div class="section-icon icon-yellow">⭐</div>
    <h2>Quick Review — High-Yield Numbers to Memorize</h2>
  </div>

  <div class="hq-grid">
    <div class="hq-card hq-blue"><h4>Normal Blood pH</h4><div class="hq-val">7.35–7.45</div></div>
    <div class="hq-card hq-green"><h4>Total Body Water (70kg)</h4><div class="hq-val">42 L (60%)</div></div>
    <div class="hq-card hq-purple"><h4>ICF Volume</h4><div class="hq-val">28 L (2/3)</div></div>
    <div class="hq-card hq-teal"><h4>ECF Volume</h4><div class="hq-val">14 L (1/3)</div></div>
    <div class="hq-card hq-red"><h4>Plasma Volume</h4><div class="hq-val">3.5 L</div></div>
    <div class="hq-card hq-orange"><h4>Normal Plasma Osmolality</h4><div class="hq-val">285–295 mOsm/kg</div></div>
    <div class="hq-card hq-blue"><h4>Normal pCO₂</h4><div class="hq-val">35–45 mmHg</div></div>
    <div class="hq-card hq-green"><h4>Normal HCO₃⁻</h4><div class="hq-val">22–26 mEq/L</div></div>
    <div class="hq-card hq-purple"><h4>HCO₃⁻ : H₂CO₃ Ratio</h4><div class="hq-val">20 : 1</div></div>
    <div class="hq-card hq-teal"><h4>pKa of HCO₃⁻ buffer</h4><div class="hq-val">6.1</div></div>
    <div class="hq-card hq-red"><h4>Min urine pH (kidney)</h4><div class="hq-val">4.5</div></div>
    <div class="hq-card hq-orange"><h4>Daily water intake/output</h4><div class="hq-val">2500 mL</div></div>
  </div>

  <div class="box box-exam" style="margin-top:20px;">
    <div class="box-title">🎯 MOST COMMON EXAM QUESTIONS from this Chapter</div>
    <ol>
      <li>Draw and explain the Henderson-Hasselbalch equation for the bicarbonate buffer system</li>
      <li>Explain the three lines of defense for maintaining blood pH</li>
      <li>What is the chloride shift? What is isohydric transport?</li>
      <li>Describe metabolic acidosis with clinical causes and compensation</li>
      <li>Write about the renal mechanisms for maintaining acid-base balance</li>
      <li>What is dehydration? Describe its types, features and treatment</li>
      <li>Explain the RAAS and its role in electrolyte regulation</li>
      <li>What is the osmolal gap? How is plasma osmolality calculated?</li>
      <li>Differentiate ICF and ECF electrolyte composition</li>
      <li>Explain acid-base disorder in DKA / cholera / salicylate poisoning</li>
    </ol>
  </div>
</div>

<div class="footer">
  <p>Notes compiled from: <strong>Satyanarayana & Chakrapani Biochemistry — Chapter 21: Water, Electrolyte and Acid-Base Balance</strong></p>
  <p style="margin-top:4px;">Prepared for MBBS First Year | Foundation Module | Biochemistry</p>
  <p style="margin-top:4px;">All values, flowcharts and clinical correlations sourced directly from the textbook PDF</p>
</div>

</body>
</html>
Running Command

chromium --headless --no-sandbox --disable-gpu \ --print-to-pdf="/home/daytona/workspace/Water_Electrolyte_AcidBase_Notes.pdf" \ --print-to-pdf-no-header \ --disable-pdf-tagging \ "file:///home/daytona/workspace/Water_Electrolyte_AcidBase_Notes.html" 2>&1 | tail -3

Running Command

python3 -c " from pypdf import PdfReader, PdfWriter import os reader = PdfReader('/home/daytona/workspace/Water_Electrolyte_AcidBase_Notes.pdf') print('Pages:', len(reader.pages)) print('Size:', os.path.getsize('/home/daytona/workspace/Water_Electrolyte_AcidBase_Notes.pdf') // 1024, 'KB') # rewrite for clean cross-platform compatibility writer = PdfWriter() for page in reader.pages: writer.add_page(page) with open('/home/daytona/workspace/Water_Electrolyte_AcidBase_FINAL.pdf','wb') as f: writer.write(f) print('Final size:', os.path.getsize('/home/daytona/workspace/Water_Electrolyte_AcidBase_FINAL.pdf') // 1024, 'KB') print('OK') "

Done bro! 25-page PDF ready. Download here:

Water Electrolyte AcidBase FINAL

PDF Document · PDF


What's inside (everything from the 17-page PDF):

#SectionWhat you get
1Water & LifeFunctions (A-R-T-T mnemonic), body compartments diagram with exact volumes
2Water BalanceDaily intake vs output flowchart (2500 mL), metabolic water table, thirst mechanism
3ElectrolytesECF vs ICF visual comparison strip, Na⁺-K⁺ pump flowchart
4OsmolalityFormula, isotonic/hypertonic/hypotonic table, osmolal gap clinical note
5Hormonal RegulationFull RAAS flowchart (Renin→Angiotensin→Aldosterone), ADH flowchart, ANP
6DehydrationTypes, step-by-step what happens, severity table, cholera pathophysiology flowchart, ORS explanation
7Blood Buffers3 buffer systems cards (Bicarbonate 53%, Phosphate, Protein), 3 lines of defense flowchart
8Henderson-HasselbalchStep-by-step derivation, 20:1 ratio explained, normal ABG values table
9Respiratory pHFeedback loop flowchart, chloride shift diagram, isohydric transport, Kussmaul breathing
10Renal pH (4 mechanisms)Step-by-step all 4 mechanisms, summary table, titratable acid, NH₄⁺ excretion
114 Acid-Base DisordersColor-coded disorder cards, master comparison table, ROME mnemonic
12Clinical Causes + ABG12 clinical scenarios table, ABG interpretation steps, salicylate poisoning trick
Quick Review12 high-yield numbers grid + top 10 exam questions

Bro convert it into html

The HTML file already exists from when I built it! Here it is:

Water Electrolyte AcidBase Notes

HTML File · HTML

That's the exact same content as the PDF — just open it in any browser (Chrome, Firefox, Edge, Safari) and it'll render with all the colors, flowcharts, tables, and diagrams perfectly.
If you want to save it as PDF from the browser: Ctrl+P → Save as PDF and you'll get a clean copy too.

Bro I want you to make a proper, easy, understandable, high yield, detailed pdf notes with understandable and creative flow charts, tables and diagrams from the given pdf. Read every detail from the given pdf and then make proper point to point notes with explanations, examples, flow charts and etc, make it for an mbbs first year student from foundation module

Running Command

python3 -c " from pypdf import PdfReader path = '/home/daytona/workspace/attachments/cebb7e5a-bf83-4146-adfb-46cd1dee2e97/Dr_U_Satyanarayana,_U_Chakrapani_Biochemistry_Else_260630_013335.PDF' reader = PdfReader(path) print('Total pages:', len(reader.pages)) # Print first 2 pages to identify topic for i in range(min(3, len(reader.pages))): print(f'\n--- PAGE {i+1} ---') print(reader.pages[i].extract_text()[:800]) "

Running Command

python3 -c " from pypdf import PdfReader path = '/home/daytona/workspace/attachments/cebb7e5a-bf83-4146-adfb-46cd1dee2e97/Dr_U_Satyanarayana,_U_Chakrapani_Biochemistry_Else_260630_013335.PDF' reader = PdfReader(path) full = '' for i, page in enumerate(reader.pages): full += f'\n\n===== PAGE {i+1} =====\n\n' + page.extract_text() with open('/home/daytona/workspace/membranes_raw.txt','w') as f: f.write(full) print('Done:', len(full), 'chars,', len(reader.pages), 'pages') "

Reading File
Reading File
Reading File
Reading File
Reading File
Writing File

~/Membranes_Biophysical_Notes.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Biological Membranes, Transport & Biophysical Chemistry — MBBS Notes</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Inter',Arial,sans-serif;background:#f4f6fb;color:#1e293b;font-size:13px;line-height:1.75}

/* COVER */
.cover{background:linear-gradient(135deg,#0f172a 0%,#1a3a5c 45%,#0e7490 100%);color:white;padding:65px 55px 50px;position:relative;overflow:hidden}
.cover::before{content:'';position:absolute;top:-80px;right:-80px;width:300px;height:300px;border-radius:50%;background:rgba(255,255,255,0.04)}
.cover::after{content:'';position:absolute;bottom:-50px;left:-50px;width:220px;height:220px;border-radius:50%;background:rgba(255,255,255,0.03)}
.cv-badge{display:inline-block;background:rgba(255,255,255,0.15);border:1px solid rgba(255,255,255,0.3);border-radius:30px;padding:5px 18px;font-size:10.5px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;margin-bottom:18px}
.cover h1{font-size:2.5em;font-weight:800;line-height:1.2;margin-bottom:8px;letter-spacing:-0.5px}
.cover h1 span{color:#67e8f9}
.cover h2{font-size:1em;font-weight:400;opacity:.75;margin-bottom:24px}
.cv-meta{display:flex;gap:12px;flex-wrap:wrap}
.cv-meta span{background:rgba(255,255,255,0.1);border-radius:6px;padding:5px 14px;font-size:11px;font-weight:500}

/* TOC */
.toc{background:white;max-width:840px;margin:28px auto;border-radius:14px;padding:30px 36px;box-shadow:0 2px 18px rgba(0,0,0,0.07)}
.toc-h{font-size:1.1em;font-weight:700;color:#0f172a;margin-bottom:18px;display:flex;align-items:center;gap:8px}
.toc-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 20px}
.toc-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:8px;background:#f0f9ff;border-left:3px solid #0891b2;font-size:11.5px;font-weight:500;color:#0c4a6e}
.toc-num{background:#0891b2;color:white;border-radius:50%;width:22px;height:22px;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;flex-shrink:0}
.ch-divider{max-width:840px;margin:20px auto;padding:10px 36px;background:linear-gradient(90deg,#0891b2,#0e7490);color:white;border-radius:10px;font-size:12px;font-weight:700;letter-spacing:1px;text-transform:uppercase}

/* SECTIONS */
.section{background:white;max-width:840px;margin:20px auto;border-radius:14px;padding:30px 36px;box-shadow:0 2px 18px rgba(0,0,0,0.07)}
.sec-hdr{display:flex;align-items:center;gap:14px;margin-bottom:22px;padding-bottom:14px;border-bottom:2px solid #e2e8f0}
.sec-icon{width:44px;height:44px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:1.4em;flex-shrink:0}
.ic-cyan{background:#cffafe} .ic-blue{background:#dbeafe} .ic-green{background:#dcfce7}
.ic-purple{background:#ede9fe} .ic-orange{background:#ffedd5} .ic-red{background:#fee2e2}
.ic-yellow{background:#fef9c3} .ic-teal{background:#ccfbf1} .ic-pink{background:#fce7f3}
.sec-hdr h2{font-size:1.2em;font-weight:700;color:#0f172a}
.sec-hdr h2 small{display:block;font-size:.65em;font-weight:400;color:#64748b;margin-top:2px}

h3{font-size:.98em;font-weight:700;color:#0e7490;margin:18px 0 9px;display:flex;align-items:center;gap:8px}
h3::before{content:'';display:inline-block;width:4px;height:15px;background:#0891b2;border-radius:2px;flex-shrink:0}
h4{font-size:.9em;font-weight:600;color:#334155;margin:12px 0 5px}
p{margin-bottom:10px;font-size:12.5px}
ul,ol{padding-left:20px;margin-bottom:10px}
li{margin:4px 0;font-size:12.5px}
strong{color:#0f172a}

/* CALLOUTS */
.box{border-radius:10px;padding:13px 17px;margin:13px 0;font-size:12.5px}
.box-t{font-weight:700;font-size:11px;text-transform:uppercase;letter-spacing:.8px;margin-bottom:7px;display:flex;align-items:center;gap:5px}
.bx-key{background:#f0f9ff;border-left:4px solid #0891b2} .bx-key .box-t{color:#0c4a6e}
.bx-mem{background:#fefce8;border-left:4px solid #ca8a04} .bx-mem .box-t{color:#92400e}
.bx-clin{background:#f0fdf4;border-left:4px solid #16a34a} .bx-clin .box-t{color:#15803d}
.bx-warn{background:#fff7ed;border-left:4px solid #ea580c} .bx-warn .box-t{color:#c2410c}
.bx-form{background:#f5f3ff;border-left:4px solid #7c3aed} .bx-form .box-t{color:#6d28d9}
.bx-exam{background:#fdf2f8;border-left:4px solid #c026d3} .bx-exam .box-t{color:#a21caf}

.formula{text-align:center;font-size:1.05em;font-weight:700;color:#4c1d95;background:#f5f3ff;border:2px solid #a78bfa;border-radius:8px;padding:13px;margin:11px 0;font-family:'Courier New',monospace}
.formula small{display:block;font-size:.6em;font-weight:400;color:#6d28d9;margin-top:5px}

/* TABLES */
table{width:100%;border-collapse:collapse;margin:13px 0;font-size:12px;border-radius:10px;overflow:hidden}
th{background:#0e7490;color:white;padding:10px 12px;text-align:left;font-weight:600;font-size:11.5px}
td{padding:9px 12px;border-bottom:1px solid #e2e8f0;vertical-align:top}
tr:nth-child(even) td{background:#f0f9ff}
tr:hover td{background:#e0f2fe}
.tc{color:#0e7490;font-weight:600} .tg{color:#15803d;font-weight:600}
.tr{color:#dc2626;font-weight:600} .tp{color:#7c3aed;font-weight:600}
.to{color:#c2410c;font-weight:600}

/* FLOWCHARTS */
.fc{border:2px solid #e2e8f0;border-radius:12px;padding:18px;margin:15px 0;background:#f8faff}
.fc-t{text-align:center;font-size:11px;font-weight:700;color:#0e7490;text-transform:uppercase;letter-spacing:1px;margin-bottom:15px}
.fc-col{display:flex;flex-direction:column;align-items:center;gap:3px}
.fc-row{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;margin:5px 0}
.fb{border-radius:8px;padding:9px 16px;font-size:12px;font-weight:600;text-align:center;min-width:130px;display:inline-block;box-shadow:0 1px 4px rgba(0,0,0,0.1)}
.fpill{border-radius:30px!important}
.f-start{background:#0f172a;color:white} .f-end{background:#0e7490;color:white}
.f-proc{background:#e0f2fe;color:#0c4a6e;border:1.5px solid #7dd3fc}
.f-dec{background:#fef9c3;color:#78350f;border:1.5px solid #fbbf24}
.f-res{background:#dcfce7;color:#14532d;border:1.5px solid #86efac}
.f-dan{background:#fee2e2;color:#7f1d1d;border:1.5px solid #fca5a5}
.f-pur{background:#ede9fe;color:#4c1d95;border:1.5px solid #a78bfa}
.f-ora{background:#ffedd5;color:#7c2d12;border:1.5px solid #fb923c}
.f-arr{font-size:1.4em;color:#94a3b8;text-align:center;line-height:1}
.f-lbl{font-size:10px;color:#64748b;font-style:italic;text-align:center;margin:-1px 0}
.f-harr{font-size:1.3em;color:#94a3b8;padding:0 2px}
.f-vs{font-size:.9em;color:#94a3b8;padding:0 6px;font-weight:600}

/* STEPS */
.steps{margin:13px 0}
.step{display:flex;gap:12px;margin:7px 0;align-items:flex-start}
.sn{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex-shrink:0;margin-top:1px}
.sn-c{background:#0891b2;color:white}
.sn-g{background:#16a34a;color:white}
.sn-p{background:#7c3aed;color:white}
.sb{flex:1;background:#f0f9ff;border-radius:8px;padding:9px 13px;border-left:3px solid #7dd3fc;font-size:12px}
.sb strong{color:#0c4a6e}

/* BADGES */
.badge{display:inline-block;font-size:10px;font-weight:700;padding:2px 8px;border-radius:20px;vertical-align:middle;margin-left:3px}
.bd-c{background:#cffafe;color:#164e63} .bd-g{background:#dcfce7;color:#14532d}
.bd-r{background:#fee2e2;color:#991b1b} .bd-p{background:#ede9fe;color:#4c1d95}
.bd-o{background:#ffedd5;color:#7c2d12}

/* TWO-COL */
.two{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin:11px 0}
.mc{background:#f8faff;border:1.5px solid #e2e8f0;border-radius:8px;padding:12px;font-size:12px}
.mc h4{margin-bottom:6px;font-size:12px;color:#0e7490}

/* THREE-COL */
.three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;margin:12px 0}

/* COMPARISON CARDS */
.cmp-card{border-radius:10px;padding:14px;border:2px solid}
.cmp-a{background:#f0f9ff;border-color:#0891b2} .cmp-a h4{color:#0c4a6e}
.cmp-b{background:#f0fdf4;border-color:#16a34a} .cmp-b h4{color:#15803d}
.cmp-c{background:#fdf2f8;border-color:#c026d3} .cmp-c h4{color:#a21caf}
.cmp-d{background:#fff7ed;border-color:#ea580c} .cmp-d h4{color:#c2410c}
.cmp-e{background:#f5f3ff;border-color:#7c3aed} .cmp-e h4{color:#6d28d9}
.cmp-f{background:#fef9c3;border-color:#ca8a04} .cmp-f h4{color:#92400e}
.cmp-card h4{font-size:12px;font-weight:700;margin-bottom:8px}
.cmp-card ul{padding-left:14px;font-size:11.5px}
.cmp-card li{margin:3px 0}

/* TRANSPORT VISUAL */
.transport-wrap{display:flex;gap:0;margin:14px 0;border:2px solid #e2e8f0;border-radius:12px;overflow:hidden}
.trp-col{flex:1;padding:14px}
.trp-1{background:#fef9c3} .trp-2{background:#dbeafe} .trp-3{background:#dcfce7}
.trp-col h4{font-size:11.5px;text-align:center;padding-bottom:6px;margin-bottom:8px;border-bottom:1px solid rgba(0,0,0,0.08)}
.trp-1 h4{color:#92400e} .trp-2 h4{color:#1d4ed8} .trp-3 h4{color:#15803d}
.trp-row{text-align:center;font-size:11px;margin:4px 0}
.trp-col .tag{display:inline-block;padding:2px 8px;border-radius:30px;font-size:10px;font-weight:700;margin-top:6px}
.tag-y{background:#fbbf24;color:#78350f} .tag-b{background:#93c5fd;color:#1e3a8a} .tag-g{background:#86efac;color:#14532d}

/* TRANSPORT SYSTEMS */
.uni-sym-anti{display:flex;gap:12px;margin:14px 0}
.usa-card{flex:1;border-radius:10px;padding:14px;text-align:center;border:2px solid}
.usa-u{background:#f0f9ff;border-color:#0891b2} .usa-u h4{color:#0c4a6e}
.usa-s{background:#f0fdf4;border-color:#16a34a} .usa-s h4{color:#15803d}
.usa-a{background:#fff7ed;border-color:#ea580c} .usa-a h4{color:#c2410c}
.usa-card h4{font-size:12px;font-weight:700;margin-bottom:6px}
.usa-card .diagram{font-family:monospace;font-size:12px;margin:8px 0;font-weight:700}
.usa-card .ex{font-size:10.5px;color:#64748b;font-style:italic;margin-top:4px}

/* MEMBRANE STRUCTURE */
.mem-layers{border:2px solid #0891b2;border-radius:12px;overflow:hidden;margin:14px 0}
.mem-row{padding:11px 16px;text-align:center;font-size:12px;font-weight:500}
.mem-ext{background:#f0fdf4;border-bottom:1px dashed #86efac} 
.mem-prot-o{background:#dbeafe;border-bottom:2px solid #0891b2}
.mem-lipid-top{background:#fef9c3;border-bottom:1px dashed #fbbf24}
.mem-lipid-bot{background:#fef9c3;border-bottom:2px solid #0891b2}
.mem-prot-i{background:#dbeafe;border-bottom:1px dashed #93c5fd}
.mem-int{background:#f0fdf4}
.mem-label{font-size:10.5px;color:#64748b;font-style:italic}

/* pH SCALE */
.ph-scale{display:flex;margin:14px 0;border-radius:10px;overflow:hidden;height:50px}
.ph-seg{flex:1;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;color:white;flex-direction:column}
.ph-0{background:#991b1b} .ph-1{background:#b91c1c} .ph-2{background:#c2410c} .ph-3{background:#d97706}
.ph-4{background:#b45309} .ph-5{background:#ca8a04} .ph-6{background:#4d7c0f}
.ph-7{background:#15803d} .ph-8{background:#0f766e} .ph-9{background:#0369a1}
.ph-10{background:#1d4ed8} .ph-11{background:#4338ca} .ph-12{background:#6d28d9}
.ph-13{background:#7e22ce} .ph-14{background:#581c87}
.ph-markers{display:flex;justify-content:space-between;font-size:10px;color:#64748b;padding:4px 0;margin-bottom:8px}

/* COLLOID SIZES */
.size-bar{display:flex;gap:10px;margin:14px 0;align-items:stretch}
.size-seg{flex:1;border-radius:8px;padding:12px;text-align:center;font-size:11.5px;border:2px solid}
.size-t{background:#f0fdf4;border-color:#16a34a} .size-t h4{color:#15803d}
.size-c{background:#f0f9ff;border-color:#0891b2} .size-c h4{color:#0c4a6e}
.size-p{background:#fee2e2;border-color:#dc2626} .size-p h4{color:#991b1b}
.size-val{font-size:1.3em;font-weight:800;margin:4px 0}

/* HQ GRID */
.hqg{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0}
.hqc{border-radius:10px;padding:12px;text-align:center;font-size:11.5px}
.hqc h4{font-size:10px;font-weight:700;margin-bottom:4px}
.hq1{background:#cffafe;border:1.5px solid #06b6d4} .hq1 h4{color:#164e63}
.hq2{background:#dcfce7;border:1.5px solid #22c55e} .hq2 h4{color:#14532d}
.hq3{background:#ede9fe;border:1.5px solid #a855f7} .hq3 h4{color:#6d28d9}
.hq4{background:#fee2e2;border:1.5px solid #ef4444} .hq4 h4{color:#991b1b}
.hq5{background:#fef9c3;border:1.5px solid #eab308} .hq5 h4{color:#713f12}
.hq6{background:#ffedd5;border:1.5px solid #f97316} .hq6 h4{color:#7c2d12}
.hqv{font-size:1.2em;font-weight:800}

/* Donnan */
.donnan{display:flex;gap:0;margin:14px 0;border:2px solid #7c3aed;border-radius:12px;overflow:hidden}
.don-col{flex:1;padding:14px;font-size:12px}
.don-l{background:#f5f3ff;border-right:3px dashed #a78bfa}
.don-r{background:#fdf2f8}
.don-col h4{font-size:11px;text-align:center;font-weight:700;margin-bottom:8px;padding-bottom:5px;border-bottom:1px solid rgba(0,0,0,0.08)}
.don-l h4{color:#6d28d9} .don-r h4{color:#a21caf}
.don-row{display:flex;justify-content:space-between;padding:3px 0;border-bottom:1px solid rgba(0,0,0,0.05);font-size:11.5px}

/* Page break */
.pb{page-break-before:always}

/* Footer */
.footer{text-align:center;padding:28px;color:#94a3b8;font-size:11px;max-width:840px;margin:0 auto}
</style>
</head>
<body>

<!-- COVER -->
<div class="cover">
  <div class="cv-badge">MBBS Foundation Module · Biochemistry</div>
  <h1>🔬 Biological Membranes, Transport<br>&amp; <span>Biophysical Chemistry</span></h1>
  <h2>Chapters 33 &amp; 40 — Satyanarayana &amp; Chakrapani Biochemistry<br>High-Yield Notes for First Year MBBS</h2>
  <div class="cv-meta">
    <span>📚 Source: Satyanarayana Biochemistry</span>
    <span>🎯 Point-to-Point · High Yield</span>
    <span>🩺 Clinical Correlations</span>
    <span>📊 Flowcharts &amp; Diagrams</span>
  </div>
</div>

<!-- TOC -->
<div class="toc">
  <div class="toc-h">📋 Table of Contents</div>
  <div class="toc-grid">
    <div class="toc-item"><div class="toc-num">1</div>Plasma Membrane — Overview &amp; Composition</div>
    <div class="toc-item"><div class="toc-num">2</div>Membrane Structure — Fluid Mosaic Model</div>
    <div class="toc-item"><div class="toc-num">3</div>Membrane Proteins — Extrinsic vs Intrinsic</div>
    <div class="toc-item"><div class="toc-num">4</div>Transport Mechanisms — 3 Types</div>
    <div class="toc-item"><div class="toc-num">5</div>Na⁺-K⁺ Pump in Detail</div>
    <div class="toc-item"><div class="toc-num">6</div>Transport Systems — Uniport, Symport, Antiport</div>
    <div class="toc-item"><div class="toc-num">7</div>Cotransport, Proton Pump &amp; Endocytosis/Exocytosis</div>
    <div class="toc-item"><div class="toc-num">8</div>Diseases of Transport</div>
    <div class="toc-item"><div class="toc-num">9</div>Properties of Water (Biophysical)</div>
    <div class="toc-item"><div class="toc-num">10</div>Acids, Bases, pH — Definitions &amp; pH Scale</div>
    <div class="toc-item"><div class="toc-num">11</div>Colloids — Types, Properties &amp; Applications</div>
    <div class="toc-item"><div class="toc-num">12</div>Donnan Membrane Equilibrium</div>
  </div>
</div>

<!-- CHAPTER 33 DIVIDER -->
<div class="ch-divider">📗 Chapter 33 — Biological Membranes and Transport</div>

<!-- SECTION 1: MEMBRANE OVERVIEW -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-cyan">🔵</div>
    <h2>1. Plasma Membrane — Overview &amp; Chemical Composition
      <small>The "envelope" of the cell | Protective barrier + Communication gateway</small>
    </h2>
  </div>

  <div class="box bx-key">
    <div class="box-t">⭐ What is the Plasma Membrane?</div>
    The plasma membrane is an <strong>envelope surrounding the cell</strong>. It:<br>
    1. <strong>Separates</strong> and protects the cell from the external environment<br>
    2. Acts as a <strong>connecting system</strong> between the cell and its environment<br>
    3. Also surrounds subcellular organelles: nucleus, mitochondria, lysosomes
  </div>

  <h3>Chemical Composition of Membranes</h3>
  <table>
    <tr><th>Component</th><th>Type</th><th>Examples</th><th>Key Property</th></tr>
    <tr><td class="tc"><strong>Lipids</strong></td><td>Amphipathic lipids</td><td>Phospholipids, glycolipids, cholesterol</td><td>Have hydrophobic AND hydrophilic groups — forms bilayer</td></tr>
    <tr><td class="tg"><strong>Proteins</strong></td><td>Extrinsic &amp; Intrinsic</td><td>Cytochrome c, hormone receptors, cytochrome P450</td><td>Embedded in or on the lipid bilayer</td></tr>
    <tr><td class="tp"><strong>Carbohydrates</strong></td><td>Complex polysaccharides</td><td>Glycocalyx (oligosaccharides)</td><td>Coats animal cell membranes; interacts with collagen of intercellular matrix</td></tr>
  </table>

  <div class="box bx-clin">
    <div class="box-t">🩺 Glycocalyx — Why It Matters</div>
    The thick coating of complex polysaccharides on animal cell membranes is called the <strong>glycocalyx</strong>. The oligosaccharides of glycocalyx interact with <strong>collagen of intercellular matrix</strong> in tissues — important for cell recognition, adhesion and immunity.
  </div>

  <div class="box bx-mem">
    <div class="box-t">🧠 Mnemonic: "LPC — Lipid, Protein, Carbohydrate"</div>
    <strong>L</strong>iving cells have <strong>P</strong>roper <strong>C</strong>oating → Lipids + Proteins + Carbohydrates
  </div>
</div>

<!-- SECTION 2: FLUID MOSAIC MODEL -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-blue">🎨</div>
    <h2>2. Membrane Structure — Fluid Mosaic Model
      <small>Singer &amp; Nicolson model (1972) — most accepted</small>
    </h2>
  </div>

  <h3>Two Key Models</h3>
  <div class="two">
    <div class="mc" style="border-left:3px solid #94a3b8;">
      <h4>🏛️ Davson-Danielle Model (1935) — OLD</h4>
      <ul>
        <li>Proposed a simple lipid bilayer</li>
        <li>Proteins sandwiched outside the bilayer</li>
        <li>Did not explain all membrane functions</li>
        <li>Now considered incomplete</li>
      </ul>
    </div>
    <div class="mc" style="border-left:3px solid #0891b2;">
      <h4>✅ Fluid Mosaic Model — Singer &amp; Nicolson (1972) — CURRENT</h4>
      <ul>
        <li>Membrane = lipid bilayer + irregularly embedded globular proteins</li>
        <li>Membrane thickness = <strong>5–8 nm</strong></li>
        <li>Lipid and protein subunits → appearance of <strong>mosaic</strong> (like ceramic tiles)</li>
        <li>Unlike fixed tiles, the membrane <strong>freely moves = FLUID</strong></li>
        <li>Membrane is <strong>asymmetric</strong> (irregular protein distribution)</li>
      </ul>
    </div>
  </div>

  <h3>Structure of the Lipid Bilayer</h3>
  <div class="mem-layers">
    <div class="mem-row mem-ext">🌿 <strong>EXTRACELLULAR SPACE</strong> — Glycocalyx, water, ions<div class="mem-label">(Outside the cell)</div></div>
    <div class="mem-row mem-prot-o">🔵 <strong>PERIPHERAL (Extrinsic) PROTEINS</strong> — loosely bound on outer surface</div>
    <div class="mem-row mem-lipid-top">🟡 <strong>HYDROPHILIC HEADS</strong> of phospholipids (polar, face outward — love water)</div>
    <div class="mem-row mem-lipid-bot" style="background:#fde68a;">〰️ <strong>HYDROPHOBIC TAILS</strong> (nonpolar, face INWARD — avoid water) ← core of bilayer</div>
    <div class="mem-row mem-lipid-top">🟡 <strong>HYDROPHILIC HEADS</strong> of phospholipids (polar, face inward — love water)</div>
    <div class="mem-row mem-prot-i">🔵 <strong>INTEGRAL (Intrinsic) PROTEINS</strong> — deeply embedded, span the bilayer</div>
    <div class="mem-row mem-int">🏠 <strong>INTRACELLULAR SPACE</strong> — Cytoplasm, organelles<div class="mem-label">(Inside the cell)</div></div>
  </div>

  <div class="box bx-key">
    <div class="box-t">⭐ Key Features of the Lipid Bilayer</div>
    <ul>
      <li><strong>Hydrophobic tails face EACH OTHER</strong> at the core (nonpolar, water-hating)</li>
      <li><strong>Hydrophilic heads face OUTWARD</strong> (polar, water-loving) — one side faces cytoplasm, other faces outside</li>
      <li>This arrangement is <strong>thermodynamically stable</strong> — minimizes free energy</li>
      <li>Cholesterol is embedded between phospholipids → controls membrane <strong>fluidity</strong></li>
    </ul>
  </div>
</div>

<!-- SECTION 3: MEMBRANE PROTEINS -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-purple">🧩</div>
    <h2>3. Membrane Proteins — Extrinsic vs Intrinsic
      <small>Two types based on how tightly they are bound to the membrane</small>
    </h2>
  </div>

  <div class="two">
    <div class="cmp-card cmp-a">
      <h4>1. Extrinsic (Peripheral) Proteins</h4>
      <ul>
        <li><strong>Loosely held</strong> to the surface of the membrane</li>
        <li>Can be <strong>easily separated</strong> (by gentle washing)</li>
        <li>Located on the <strong>outer or inner surface</strong> only</li>
        <li><strong>Example:</strong> Cytochrome c of mitochondria</li>
        <li>Involved in: signal transduction, enzyme activity</li>
      </ul>
    </div>
    <div class="cmp-card cmp-b">
      <h4>2. Intrinsic (Integral) Proteins</h4>
      <ul>
        <li><strong>Tightly bound</strong> to the lipid bilayer</li>
        <li>Can only be separated by <strong>detergents or organic solvents</strong></li>
        <li>Span <strong>across the entire bilayer</strong> (transmembrane)</li>
        <li><strong>Examples:</strong> Hormone receptors, Cytochrome P450</li>
        <li>Involved in: transport, receptors, channels</li>
      </ul>
    </div>
  </div>

  <div class="box bx-mem">
    <div class="box-t">🧠 Mnemonic: "Extrinsic = Easy to remove | Intrinsic = Integral, needs detergent"</div>
    <strong>Extrinsic</strong> = on the EXterior surface → Easy to peel off<br>
    <strong>Intrinsic</strong> = Integrated deeply → needs Intense treatment (detergent/solvent) to remove
  </div>
</div>

<!-- SECTION 4: TRANSPORT MECHANISMS -->
<div class="section pb">
  <div class="sec-hdr">
    <div class="sec-icon ic-teal">🚚</div>
    <h2>4. Transport Across Membranes — 3 Mechanisms
      <small>Biological membranes are relatively impermeable → controlled transport needed</small>
    </h2>
  </div>

  <div class="box bx-key">
    <div class="box-t">⭐ Why is Controlled Transport Necessary?</div>
    Biological membranes are <strong>relatively impermeable</strong> barriers. The membrane controls exactly what enters and exits the cell — essential for maintaining the right internal environment (homeostasis). Three distinct mechanisms exist.
  </div>

  <div class="transport-wrap">
    <div class="trp-col trp-1">
      <h4>1. PASSIVE DIFFUSION</h4>
      <div class="trp-row">⚡ No energy needed (ATP)</div>
      <div class="trp-row">📉 High → Low concentration</div>
      <div class="trp-row">🚫 No carrier protein</div>
      <div class="trp-row">Only for small nonpolar molecules</div>
      <div class="trp-row"><strong>Examples:</strong></div>
      <div class="trp-row">O₂, CO₂, N₂, steroid hormones, ethanol, fatty acids</div>
      <span class="tag tag-y">NO ENERGY</span>
    </div>
    <div class="trp-col trp-2">
      <h4>2. FACILITATED DIFFUSION</h4>
      <div class="trp-row">⚡ No energy needed</div>
      <div class="trp-row">📉 High → Low concentration</div>
      <div class="trp-row">✅ CARRIER PROTEIN required</div>
      <div class="trp-row">For polar/large molecules</div>
      <div class="trp-row"><strong>Ping-Pong model:</strong></div>
      <div class="trp-row">Carrier changes shape to move solute</div>
      <div class="trp-row"><strong>Examples:</strong> Glucose into RBCs, amino acids</div>
      <div class="trp-row" style="font-size:10.5px;color:#1d4ed8;">Insulin ↑ glucose transport in muscle &amp; adipose</div>
      <span class="tag tag-b">NO ENERGY</span>
    </div>
    <div class="trp-col trp-3">
      <h4>3. ACTIVE TRANSPORT</h4>
      <div class="trp-row">⚡ NEEDS ATP (energy)</div>
      <div class="trp-row">📈 Low → High concentration</div>
      <div class="trp-row">✅ CARRIER PROTEIN required</div>
      <div class="trp-row">Works AGAINST gradient</div>
      <div class="trp-row"><strong>Driven by ion-pump ATPases</strong></div>
      <div class="trp-row"><strong>Example:</strong> Na⁺-K⁺ pump</div>
      <div class="trp-row">Ca²⁺ pump, H⁺-K⁺ pump</div>
      <span class="tag tag-g">NEEDS ATP</span>
    </div>
  </div>

  <h3>Comparison Table</h3>
  <table>
    <tr><th>Feature</th><th>Passive Diffusion</th><th>Facilitated Diffusion</th><th>Active Transport</th></tr>
    <tr><td>Energy (ATP)</td><td class="tg">Not required</td><td class="tg">Not required</td><td class="tr">Required</td></tr>
    <tr><td>Direction</td><td>High → Low (↓ gradient)</td><td>High → Low (↓ gradient)</td><td class="tr">Low → High (↑ gradient)</td></tr>
    <tr><td>Carrier protein</td><td class="tg">Not required</td><td class="tc">Required</td><td class="tc">Required</td></tr>
    <tr><td>Saturation</td><td>No</td><td>Yes (limited carriers)</td><td>Yes (limited pumps)</td></tr>
    <tr><td>Specificity</td><td>Low</td><td>High</td><td>High</td></tr>
    <tr><td>Inhibition</td><td>Not inhibited</td><td>Can be inhibited</td><td>Can be inhibited</td></tr>
    <tr><td>Examples</td><td>O₂, CO₂, steroids</td><td>Glucose into RBC</td><td>Na⁺-K⁺ pump</td></tr>
  </table>

  <h3>Facilitated Diffusion — Ping-Pong Model</h3>
  <div class="fc">
    <div class="fc-t">PING-PONG (ALTERNATE CONFORMATION) MODEL</div>
    <div class="fc-col">
      <div class="fc-row">
        <div class="fb f-proc" style="min-width:180px;">Solute binds to carrier protein on<br>HIGH concentration side (PING state)</div>
      </div>
      <div class="f-arr">↓</div>
      <div class="f-lbl">Carrier protein undergoes conformational change</div>
      <div class="f-arr">↓</div>
      <div class="fb f-res" style="min-width:180px;">Carrier flips to PONG state → exposes binding site on LOW concentration side</div>
      <div class="f-arr">↓</div>
      <div class="fb f-res" style="min-width:180px;">Solute released on LOW concentration side</div>
      <div class="f-arr">↓</div>
      <div class="fb f-proc" style="min-width:180px;">Carrier returns to original PING state (ready for next cycle)</div>
    </div>
    <p style="text-align:center;font-size:11px;color:#64748b;margin-top:8px;">
      ⭐ Regulated by hormones: <strong>Insulin</strong> increases glucose transport in muscle &amp; adipose tissue; <strong>amino acid transport</strong> in liver is also regulated this way.
    </p>
  </div>
</div>

<!-- SECTION 5: Na-K PUMP -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-red">⚙️</div>
    <h2>5. Na⁺-K⁺ Pump — Primary Active Transport
      <small>The most important pump in the body | Uses 30–40% of all cellular ATP!</small>
    </h2>
  </div>

  <div class="box bx-key">
    <div class="box-t">⭐ Why do Cells Need the Na⁺-K⁺ Pump?</div>
    Cells must maintain <strong>high K⁺ inside</strong> and <strong>low Na⁺ inside</strong> for:<br>
    ✅ Nerve impulse generation &nbsp;|&nbsp; ✅ Muscle contraction &nbsp;|&nbsp; ✅ Cell volume regulation &nbsp;|&nbsp; ✅ Nutrient uptake (cotransport)
  </div>

  <div class="fc">
    <div class="fc-t">Na⁺-K⁺ ATPase PUMP — Step-by-Step Mechanism</div>
    <div class="fc-col">
      <div class="fb f-proc" style="min-width:300px;">STEP 1: 3 Na⁺ ions bind inside the cell to the pump protein (Na⁺-K⁺ ATPase)</div>
      <div class="f-arr">↓</div>
      <div class="fb f-dec" style="min-width:300px;">STEP 2: ATP hydrolyzed → ADP + Pᵢ → energy released → pump protein phosphorylated</div>
      <div class="f-arr">↓</div>
      <div class="fb f-dan" style="min-width:300px;">STEP 3: Conformational change → 3 Na⁺ expelled to OUTSIDE the cell</div>
      <div class="f-arr">↓</div>
      <div class="fb f-res" style="min-width:300px;">STEP 4: 2 K⁺ ions from outside bind to the pump</div>
      <div class="f-arr">↓</div>
      <div class="fb f-res" style="min-width:300px;">STEP 5: Dephosphorylation → pump returns to original shape → 2 K⁺ released INSIDE the cell</div>
      <div class="f-arr">↓</div>
      <div class="fb f-proc" style="min-width:300px;">RESULT: 3 Na⁺ out, 2 K⁺ in, 1 ATP consumed per cycle</div>
    </div>
  </div>

  <div class="box bx-mem">
    <div class="box-t">🧠 Mnemonic: "3 Na Out, 2 K In — ATP gives energy to spin"</div>
    <strong>3 Na⁺ OUT</strong> (three letters in "OUT") &nbsp;|&nbsp; <strong>2 K⁺ IN</strong> (two letters in "IN")<br>
    One ATP consumed per cycle → net charge movement → electrogenic pump (creates slight negative charge inside cell)
  </div>

  <table>
    <tr><th>Feature</th><th>Detail</th></tr>
    <tr><td>Enzyme involved</td><td class="tc">Na⁺-K⁺ ATPase (also called Sodium-Potassium pump ATPase)</td></tr>
    <tr><td>Ions transported per cycle</td><td><strong>3 Na⁺ OUT</strong> + <strong>2 K⁺ IN</strong></td></tr>
    <tr><td>Energy source</td><td class="tr">1 ATP per cycle (hydrolyzed to ADP + Pᵢ)</td></tr>
    <tr><td>% of body ATP used</td><td class="tr">30–40% of total cellular ATP consumption!</td></tr>
    <tr><td>Inhibitor</td><td class="tr"><strong>Ouabain</strong> — extracted from seeds of African shrub; used as arrow poison by tribal hunters. Blocks K⁺ binding site.</td></tr>
    <tr><td>Effect of inhibition</td><td>Na⁺ accumulates inside → water enters → cell swells → cell death</td></tr>
  </table>

  <div class="box bx-clin">
    <div class="box-t">🩺 Clinical Relevance — Ouabain &amp; Cardiac Glycosides</div>
    <strong>Ouabain</strong> (and related cardiac glycosides like <strong>digoxin</strong>) inhibit Na⁺-K⁺ ATPase. In the heart, this increases intracellular Na⁺ → Na⁺-Ca²⁺ exchanger brings more Ca²⁺ in → stronger heart contractions. Used in <strong>congestive heart failure</strong>.
  </div>
</div>

<!-- SECTION 6: TRANSPORT SYSTEMS -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-green">🔄</div>
    <h2>6. Transport Systems — Uniport, Symport, Antiport
      <small>Three ways molecules move together through membranes</small>
    </h2>
  </div>

  <div class="uni-sym-anti">
    <div class="usa-card usa-u">
      <h4>UNIPORT</h4>
      <div class="diagram">A →</div>
      <p style="font-size:11.5px;">Single molecule transported<br>in ONE direction<br>through membrane</p>
      <p style="font-size:11px;color:#64748b;">Example: <strong>Glucose transport</strong> into erythrocytes (RBCs) via GLUT-1 transporter</p>
    </div>
    <div class="usa-card usa-s">
      <h4>SYMPORT</h4>
      <div class="diagram">A → →  B</div>
      <p style="font-size:11.5px;">TWO different molecules<br>transported in the <strong>SAME direction</strong><br>simultaneously</p>
      <p style="font-size:11px;color:#64748b;">Example: <strong>Na⁺ + Glucose</strong> transport into intestinal mucosal cells from gut lumen (SGLT1)</p>
    </div>
    <div class="usa-card usa-a">
      <h4>ANTIPORT</h4>
      <div class="diagram">A → ← B</div>
      <p style="font-size:11.5px;">TWO different molecules<br>transported in <strong>OPPOSITE directions</strong><br>simultaneously</p>
      <p style="font-size:11px;color:#64748b;">Examples: <strong>Cl⁻ and HCO₃⁻ exchange</strong> in RBCs (chloride shift) | Na⁺-K⁺ pump itself</p>
    </div>
  </div>

  <div class="box bx-mem">
    <div class="box-t">🧠 Mnemonic: "USA — Uni is alone, Sym is same, Anti is against"</div>
    <strong>U</strong>niport = <strong>U</strong>nique (one molecule alone)<br>
    <strong>S</strong>ymport = <strong>S</strong>ame direction (syn = together, same)<br>
    <strong>A</strong>ntiport = <strong>A</strong>gainst (anti = opposite direction)
  </div>

  <div class="box bx-key">
    <div class="box-t">⭐ Secondary Active Transport</div>
    Symport and Antiport systems are called <strong>secondary active transport systems</strong>. They use the electrochemical gradient (created by Na⁺-K⁺ pump — primary active transport) as their energy source. The movement of Na⁺ down its gradient drives the co-transport of another molecule against its gradient.
  </div>
</div>

<!-- SECTION 7: COTRANSPORT, PROTON PUMP, ENDO/EXOCYTOSIS -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-orange">🔁</div>
    <h2>7. Cotransport, Proton Pump, Endocytosis &amp; Exocytosis
      <small>Special transport mechanisms for ions and macromolecules</small>
    </h2>
  </div>

  <h3>Cotransport System</h3>
  <p><strong>Cotransport</strong> = transport of one substance is <strong>coupled to the spontaneous movement of another</strong>. The symport and antiport systems are the classic examples.</p>
  <p><strong>Example:</strong> Glucose absorption in intestine — Na⁺ moves down its gradient (spontaneous), glucose moves against its gradient (powered by Na⁺'s movement). ATP is then needed to pump Na⁺ back out via Na⁺-K⁺ ATPase.</p>

  <h3>Proton Pump (H⁺-K⁺ ATPase) — Stomach</h3>
  <div class="fc">
    <div class="fc-t">PROTON PUMP — HOW STOMACH HCl IS MADE</div>
    <div class="fc-col">
      <div class="fb f-proc" style="min-width:280px;">Gastric parietal cells: H⁺-K⁺ ATPase activated</div>
      <div class="f-arr">↓</div>
      <div class="fb f-dec" style="min-width:280px;">1 ATP hydrolyzed → 2H⁺ pumped OUT (into stomach lumen) in exchange for 2K⁺ pumped IN</div>
      <div class="f-arr">↓</div>
      <div class="fb f-dan" style="min-width:280px;">Cl⁻ ions secreted through Cl⁻ channels into lumen</div>
      <div class="f-arr">↓</div>
      <div class="fb f-dan" style="min-width:280px;">H⁺ + Cl⁻ → HCl (Hydrochloric acid) in stomach</div>
      <div class="f-arr">↓</div>
      <div class="fb f-res" style="min-width:280px;">Stomach lumen maintains highly acidic pH ≈ 1</div>
    </div>
  </div>

  <div class="box bx-clin">
    <div class="box-t">💊 Clinical — Proton Pump Inhibitors (PPIs)</div>
    <strong>Omeprazole</strong> (and pantoprazole, lansoprazole) are drugs that <strong>inhibit H⁺-K⁺ ATPase</strong> (the proton pump). This blocks HCl production → used to treat:<br>
    ✅ Peptic ulcer disease &nbsp;|&nbsp; ✅ Gastroesophageal reflux (GERD) &nbsp;|&nbsp; ✅ H. pylori eradication
  </div>

  <h3>Transport of Macromolecules — Endocytosis &amp; Exocytosis</h3>
  <div class="two">
    <div class="cmp-card cmp-a">
      <h4>🔽 ENDOCYTOSIS ("endo" = into)</h4>
      <ul>
        <li>Cell <strong>takes in</strong> macromolecules from outside</li>
        <li>Membrane wraps around the molecule → vesicle forms → pulled inside</li>
        <li><strong>Example:</strong> Uptake of LDL (low-density lipoprotein) by cells for cholesterol</li>
        <li>Types: Phagocytosis (solids), Pinocytosis (liquids), Receptor-mediated endocytosis</li>
      </ul>
    </div>
    <div class="cmp-card cmp-b">
      <h4>🔼 EXOCYTOSIS ("exo" = outside)</h4>
      <ul>
        <li>Cell <strong>releases</strong> macromolecules to the outside</li>
        <li>Vesicle fuses with plasma membrane → contents expelled outside</li>
        <li><strong>Examples:</strong> Secretion of hormones (insulin, PTH), neurotransmitters, digestive enzymes</li>
        <li>Essential for secretory cells (pancreas, nerve terminals)</li>
      </ul>
    </div>
  </div>

  <div class="fc">
    <div class="fc-t">ENDOCYTOSIS vs EXOCYTOSIS — Direction of Movement</div>
    <div class="fc-row">
      <div style="text-align:center;">
        <div class="fb f-proc">Macromolecule OUTSIDE cell</div>
        <div class="f-arr">↓</div>
        <div class="f-lbl">Membrane invaginates, forms vesicle</div>
        <div class="f-arr">↓</div>
        <div class="fb f-res">Vesicle INSIDE the cell = ENDOCYTOSIS</div>
        <div style="margin-top:6px;font-size:11px;color:#15803d;">e.g. LDL uptake</div>
      </div>
      <div style="font-size:2em;color:#94a3b8;padding:0 20px;align-self:center;">⇄</div>
      <div style="text-align:center;">
        <div class="fb f-res">Vesicle with product INSIDE cell</div>
        <div class="f-arr">↓</div>
        <div class="f-lbl">Vesicle fuses with plasma membrane</div>
        <div class="f-arr">↓</div>
        <div class="fb f-dan">Product RELEASED OUTSIDE = EXOCYTOSIS</div>
        <div style="margin-top:6px;font-size:11px;color:#dc2626;">e.g. Insulin secretion</div>
      </div>
    </div>
  </div>
</div>

<!-- SECTION 8: DISEASES -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-red">🏥</div>
    <h2>8. Diseases Due to Loss of Membrane Transport Systems
      <small>When transporters fail — clinical consequences</small>
    </h2>
  </div>

  <table>
    <tr><th>Disease</th><th>Transporter Affected</th><th>Consequence</th></tr>
    <tr>
      <td><strong>Hartnup's Disease</strong></td>
      <td>Neutral amino acid transporter<br>(intestinal cells &amp; renal tubules)</td>
      <td>Decreased absorption/reabsorption of neutral amino acids (tryptophan, etc.) → pellagra-like skin rash, neurological symptoms</td>
    </tr>
    <tr>
      <td><strong>Cystinuria</strong></td>
      <td>Dibasic amino acid transporter<br>(renal tubules)</td>
      <td>↑ Excretion of cystine, lysine, arginine, ornithine in urine → <strong>renal cystine stones</strong> (kidney stones)</td>
    </tr>
    <tr>
      <td><strong>Glucose Malabsorption</strong></td>
      <td>Sodium-glucose transporter (SGLT)</td>
      <td>Decreased glucose uptake → glucose in stool → diarrhea, malnutrition</td>
    </tr>
    <tr>
      <td><strong>Vitamin D–Resistant Rickets</strong></td>
      <td>Phosphate reabsorption transporter<br>(renal tubule)</td>
      <td>Decreased phosphate reabsorption → hypophosphatemia → defective bone mineralization despite normal Vitamin D</td>
    </tr>
  </table>

  <div class="box bx-clin">
    <div class="box-t">🩺 Clinical Pearls — Membrane Fluidity &amp; Diseases</div>
    Changes in membrane fluidity have been implicated in:
    <ul>
      <li><strong>LCAT deficiency</strong> (Lecithin-cholesterol acyltransferase) — abnormal lipid in membranes</li>
      <li><strong>Hypertension</strong> — altered Na⁺ transport in vascular smooth muscle</li>
      <li><strong>Alzheimer's disease</strong> — changes in neuronal membrane lipid composition</li>
      <li>Disturbances in osmosis → diarrhea, edema, inflammation</li>
    </ul>
  </div>

  <div class="box bx-exam">
    <div class="box-t">🎯 Quick Summary — Chapter 33 (Most Asked)</div>
    <ol>
      <li>Fluid Mosaic Model — who proposed it? (Singer &amp; Nicolson, 1972)</li>
      <li>Difference between passive, facilitated and active transport</li>
      <li>Na⁺-K⁺ pump: ratio (3:2), inhibitor (ouabain), % ATP used (30-40%)</li>
      <li>Uniport vs Symport vs Antiport with examples</li>
      <li>Endocytosis vs Exocytosis with examples</li>
      <li>Clinical diseases — Hartnup's, Cystinuria</li>
    </ol>
  </div>
</div>

<!-- CHAPTER 40 DIVIDER -->
<div class="ch-divider pb">📘 Chapter 40 — Overview of Biophysical Chemistry</div>

<!-- SECTION 9: WATER PROPERTIES -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-cyan">💧</div>
    <h2>9. Unique Properties of Water — Biophysical Significance
      <small>Water = simplest yet most important molecule for life</small>
    </h2>
  </div>

  <h3>Structure of the Water Molecule</h3>
  <ul>
    <li>Chemical formula: H₂O</li>
    <li>Bond angle: <strong>104.5°</strong> (bent/V-shaped molecule)</li>
    <li>O-H bond length: <strong>0.958 Å</strong></li>
    <li>Water is a <strong>polar molecule</strong> — O has δ⁻ charge, H has δ⁺ charge</li>
    <li>This polarity allows water molecules to form <strong>hydrogen bonds</strong> with each other</li>
  </ul>

  <div class="box bx-key">
    <div class="box-t">⭐ Why H-Bonds Are Vital</div>
    Each water molecule can form <strong>up to 4 hydrogen bonds</strong> with neighbouring molecules. Individual H-bonds are weak, but collectively they give water its unique properties. H-bonds are also critical for maintaining <strong>3D structures of biomolecules</strong> (proteins, DNA).
  </div>

  <h3>Unique Properties of Water — High Yield!</h3>
  <table>
    <tr><th>Property</th><th>Explanation</th><th>Biological/Clinical Significance</th></tr>
    <tr><td class="tc"><strong>High specific heat</strong></td><td>Absorbs a lot of heat before temperature rises</td><td>Body temperature regulation — prevents overheating</td></tr>
    <tr><td class="tc"><strong>High heat of vaporization</strong></td><td>Needs a lot of energy to evaporate</td><td>Sweating efficiently cools the body (latent heat)</td></tr>
    <tr><td class="tc"><strong>Expands on freezing</strong></td><td>Ice is less dense (0.92 g/mL) than liquid water (1.0 g/mL)</td><td>Ice floats → aquatic life survives under ice layer in winter</td></tr>
    <tr><td class="tc"><strong>High surface tension</strong></td><td>Due to H-bonds between surface molecules</td><td>Lung alveoli — surfactant reduces surface tension to prevent collapse</td></tr>
    <tr><td class="tc"><strong>Universal solvent</strong></td><td>Dissolves ionic and polar substances</td><td>Medium for all biochemical reactions</td></tr>
    <tr><td class="tc"><strong>Cohesion &amp; Adhesion</strong></td><td>Water molecules stick to each other and to other surfaces</td><td>Capillary action in blood vessels, plant water transport</td></tr>
    <tr><td class="tc"><strong>Ampholyte</strong></td><td>Can act as BOTH acid and base</td><td>Water self-ionizes → Kw = [H⁺][OH⁻] = 10⁻¹⁴ at 25°C</td></tr>
  </table>

  <div class="box bx-warn">
    <div class="box-t">⚠️ Ice Floats — Why This is Critical for Life</div>
    Water <strong>expands on freezing</strong> (unlike most substances which contract). Ice (density 0.92 g/mL) is less dense than water (1.0 g/mL) → <strong>ice floats on top</strong> of lakes and seas. This insulates the water below, allowing aquatic organisms to survive. If ice sank, lakes would freeze solid from the bottom up — killing all aquatic life!
  </div>

  <h3>Dissociation of Water</h3>
  <div class="formula">
    H₂O ⇌ H⁺ + OH⁻
    <small>Water self-ionizes (very slightly — weak electrolyte)</small>
  </div>
  <ul>
    <li>H⁺ reacts with another water molecule → <strong>hydronium ion (H₃O⁺)</strong></li>
    <li>Dissociation constant of water: <strong>Kw = [H⁺][OH⁻] = 10⁻¹⁴</strong> at 25°C</li>
    <li>In pure water: <strong>[H⁺] = [OH⁻] = 10⁻⁷ mol/L</strong> → neutral solution</li>
  </ul>
</div>

<!-- SECTION 10: ACIDS, BASES, pH -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-yellow">⚗️</div>
    <h2>10. Acids, Bases &amp; pH — Definitions &amp; pH Scale
      <small>Brønsted-Lowry definitions | Sorenson's pH concept (1909)</small>
    </h2>
  </div>

  <h3>Definitions</h3>
  <div class="three">
    <div class="cmp-card cmp-a">
      <h4>ACID</h4>
      <ul>
        <li>A proton (H⁺) <strong>donor</strong></li>
        <li>Releases H⁺ in solution</li>
        <li><strong>Strong acid</strong> → fully dissociates (HCl, H₂SO₄)</li>
        <li><strong>Weak acid</strong> → partially dissociates (H₂CO₃, HCN)</li>
        <li>Strong acid has <strong>weak conjugate base</strong></li>
      </ul>
    </div>
    <div class="cmp-card cmp-b">
      <h4>BASE</h4>
      <ul>
        <li>A proton (H⁺) <strong>acceptor</strong></li>
        <li>Removes H⁺ from solution</li>
        <li><strong>Conjugate base</strong> = acid minus proton</li>
        <li>Weak acid has <strong>strong conjugate base</strong></li>
        <li>Example: HCN (weak acid) → CN⁻ (strong base)</li>
      </ul>
    </div>
    <div class="cmp-card cmp-e">
      <h4>ALKALI</h4>
      <ul>
        <li>Metallic hydroxides: NaOH, KOH</li>
        <li>Dissociate into metal ion + OH⁻</li>
        <li>OH⁻ acts as a base (accepts H⁺)</li>
        <li>Not technically a base by definition, but functionally equivalent</li>
      </ul>
    </div>
  </div>

  <div class="box bx-key">
    <div class="box-t">⭐ Ampholytes — Molecules That Are BOTH Acid AND Base</div>
    An <strong>ampholyte</strong> (also called amphoteric substance) can function as both an acid and a base.<br>
    Best example = <strong>Water</strong>: H₂O can donate H⁺ (act as acid) OR accept H⁺ (act as base)<br>
    Amino acids are also ampholytes — important in protein chemistry!
  </div>

  <h3>pH — Concept and Scale</h3>
  <div class="box bx-form">
    <div class="box-t">📐 pH Definition</div>
    Introduced by <strong>Sorenson in 1909</strong>. pH = <strong>negative logarithm of H⁺ ion concentration</strong>
    <div class="formula" style="margin-top:10px;">pH = −log[H⁺]</div>
    pH ranges from <strong>0 to 14</strong> (corresponds to 1 M to 10⁻¹⁴ M H⁺ concentration)
  </div>

  <div class="ph-markers">
    <span>0</span><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span><span>11</span><span>12</span><span>13</span><span>14</span>
  </div>
  <div class="ph-scale">
    <div class="ph-seg ph-0"><span>0</span><span style="font-size:8px;">1M</span></div>
    <div class="ph-seg ph-1"><span>1</span></div>
    <div class="ph-seg ph-2"><span>2</span></div>
    <div class="ph-seg ph-3"><span>3</span></div>
    <div class="ph-seg ph-4"><span>4</span></div>
    <div class="ph-seg ph-5"><span>5</span></div>
    <div class="ph-seg ph-6"><span>6</span></div>
    <div class="ph-seg ph-7" style="border:3px solid white;"><span>7</span><span style="font-size:8px;">NEUTRAL</span></div>
    <div class="ph-seg ph-8"><span>8</span></div>
    <div class="ph-seg ph-9"><span>9</span></div>
    <div class="ph-seg ph-10"><span>10</span></div>
    <div class="ph-seg ph-11"><span>11</span></div>
    <div class="ph-seg ph-12"><span>12</span></div>
    <div class="ph-seg ph-13"><span>13</span></div>
    <div class="ph-seg ph-14"><span>14</span></div>
  </div>
  <div style="display:flex;justify-content:space-between;font-size:10.5px;font-weight:600;margin-top:4px;">
    <span style="color:#991b1b;">←— ACIDIC (H⁺ &gt; OH⁻) ——</span>
    <span style="color:#15803d;">NEUTRAL (pH 7)</span>
    <span style="color:#1d4ed8;">—— BASIC/ALKALINE (OH⁻ &gt; H⁺) —→</span>
  </div>

  <h3>Important pH Values to Memorize</h3>
  <table>
    <tr><th>Fluid/Solution</th><th>Approximate pH</th><th>Nature</th></tr>
    <tr><td>Gastric juice (stomach)</td><td class="tr"><strong>1.0–1.5</strong></td><td>Strongly acidic</td></tr>
    <tr><td>Urine (normal)</td><td class="to"><strong>4.5–8.0</strong></td><td>Acidic to slightly alkaline</td></tr>
    <tr><td>Saliva</td><td><strong>6.5–7.5</strong></td><td>Near neutral</td></tr>
    <tr><td>Pure water</td><td class="tg"><strong>7.0</strong></td><td>Neutral</td></tr>
    <tr><td>Blood (normal)</td><td class="tc"><strong>7.35–7.45</strong></td><td>Slightly alkaline</td></tr>
    <tr><td>Pancreatic juice</td><td><strong>8.0</strong></td><td>Alkaline</td></tr>
    <tr><td>Bile</td><td><strong>7.8–8.6</strong></td><td>Alkaline</td></tr>
  </table>

  <h3>Molarity vs Normality</h3>
  <div class="two">
    <div class="mc">
      <h4>Molarity (M)</h4>
      Number of moles of solute per <strong>litre of solution</strong><br>
      Based on <strong>molecular weight</strong><br>
      Unit: mol/L or M
    </div>
    <div class="mc">
      <h4>Normality (N)</h4>
      Number of equivalents per <strong>litre of solution</strong><br>
      Based on <strong>equivalent weight</strong> = MW ÷ total positive valence<br>
      Unit: mEq/L (milliequivalents per litre) for smaller concentrations<br>
      <small>For NaOH: Molecular wt = Equivalent wt | For H₂SO₄: Equivalent wt = MW ÷ 2</small>
    </div>
  </div>
</div>

<!-- SECTION 11: COLLOIDS -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-pink">🫧</div>
    <h2>11. Colloidal State — Types, Properties &amp; Applications
      <small>Thomas Graham (1861) — "Father of Colloidal Chemistry"</small>
    </h2>
  </div>

  <h3>Graham's Classification</h3>
  <div class="two">
    <div class="cmp-card cmp-f">
      <h4>CRYSTALLOIDS</h4>
      <ul>
        <li>Freely pass through parchment membrane</li>
        <li>Form TRUE SOLUTIONS</li>
        <li>Particle size &lt;1 nm</li>
        <li>Examples: Sugar, urea, NaCl</li>
      </ul>
    </div>
    <div class="cmp-card cmp-e">
      <h4>COLLOIDS (Greek: "glue-like")</h4>
      <ul>
        <li>Retained by parchment membrane (cannot pass)</li>
        <li>Form COLLOIDAL SOLUTIONS</li>
        <li>Particle size 1–100 nm</li>
        <li>Examples: Gum, gelatin, albumin (serum protein)</li>
        <li>Note: Any substance can be made colloidal (e.g., NaCl in benzene)</li>
      </ul>
    </div>
  </div>

  <h3>Particle Size — States of Matter</h3>
  <div class="size-bar">
    <div class="size-seg size-t">
      <h4>TRUE SOLUTION</h4>
      <div class="size-val">&lt;1 nm</div>
      <div>Completely clear, homogeneous</div>
      <div style="font-size:11px;margin-top:4px;">e.g., salt water, glucose solution</div>
    </div>
    <div style="display:flex;align-items:center;font-size:1.4em;color:#94a3b8;padding:0 6px;">→</div>
    <div class="size-seg size-c">
      <h4>COLLOIDAL STATE</h4>
      <div class="size-val">1–100 nm</div>
      <div>Intermediate, heterogeneous</div>
      <div style="font-size:11px;margin-top:4px;">e.g., proteins in plasma, starch</div>
    </div>
    <div style="display:flex;align-items:center;font-size:1.4em;color:#94a3b8;padding:0 6px;">→</div>
    <div class="size-seg size-p">
      <h4>PRECIPITATE</h4>
      <div class="size-val">&gt;100 nm</div>
      <div>Visible particles, settles out</div>
      <div style="font-size:11px;margin-top:4px;">e.g., sand in water</div>
    </div>
  </div>

  <h3>Phases of Colloids (Two-Phase System)</h3>
  <div class="two">
    <div class="mc">
      <h4>Dispersed Phase</h4>
      The substance that is dispersed (like solute)<br>
      E.g., protein molecules, colloidal particles<br>
      May be solid, liquid or gas
    </div>
    <div class="mc">
      <h4>Dispersion Medium (Continuous Phase)</h4>
      The medium in which dispersed phase is suspended (like solvent)<br>
      E.g., water (in most biological colloids)
    </div>
  </div>

  <h3>Types of Colloids &amp; Examples</h3>
  <table>
    <tr><th>Type</th><th>Dispersed Phase</th><th>Dispersion Medium</th><th>Examples</th></tr>
    <tr><td class="tc"><strong>Sol</strong></td><td>Solid</td><td>Liquid</td><td>Gold sol, starch solution, blood</td></tr>
    <tr><td class="tg"><strong>Gel</strong></td><td>Liquid</td><td>Solid</td><td>Gelatin, agar, pectin</td></tr>
    <tr><td class="tp"><strong>Emulsion</strong></td><td>Liquid</td><td>Liquid</td><td>Milk, mayonnaise, lymph</td></tr>
    <tr><td class="to"><strong>Foam</strong></td><td>Gas</td><td>Liquid</td><td>Whipped cream, soap bubbles</td></tr>
    <tr><td class="tr"><strong>Aerosol</strong></td><td>Solid/Liquid</td><td>Gas</td><td>Smoke, fog, spray</td></tr>
  </table>

  <h3>Important Properties of Colloids</h3>
  <div class="three">
    <div class="cmp-card cmp-a">
      <h4>Tyndall Effect</h4>
      Colloids scatter light (beam of light becomes visible). Used to distinguish colloids from true solutions. Blood in light shows Tyndall effect.
    </div>
    <div class="cmp-card cmp-b">
      <h4>Brownian Movement</h4>
      Colloidal particles show continuous random zigzag motion due to bombardment by solvent molecules. Prevents settling.
    </div>
    <div class="cmp-card cmp-e">
      <h4>Electrophoresis</h4>
      Colloidal particles (proteins) carry charges → move toward oppositely charged electrode in electric field. Used clinically to separate serum proteins.
    </div>
    <div class="cmp-card cmp-d">
      <h4>Adsorption</h4>
      Colloids have large surface area → can adsorb substances on their surface. Used in activated charcoal in poisoning.
    </div>
    <div class="cmp-card cmp-f">
      <h4>Coagulation / Precipitation</h4>
      Adding electrolytes → neutralize charge → particles clump together → coagulate. e.g., adding alum (KAl(SO₄)₂) to water purification.
    </div>
    <div class="cmp-card cmp-c">
      <h4>Dialysis</h4>
      Colloids cannot pass through semipermeable membrane. Used in <strong>kidney dialysis (hemodialysis)</strong> — removes small toxic molecules (crystalloids) while retaining proteins (colloids) in blood.
    </div>
  </div>

  <div class="box bx-clin">
    <div class="box-t">🩺 Clinical Applications of Colloidal Properties</div>
    <ul>
      <li><strong>Electrophoresis</strong> — separates serum proteins (albumin, α₁, α₂, β, γ globulins) for diagnosis of multiple myeloma, liver disease</li>
      <li><strong>Hemodialysis</strong> — based on dialysis; removes urea, creatinine (crystalloids) but retains plasma proteins (colloids)</li>
      <li><strong>Activated charcoal</strong> — adsorption property; used in poisoning to adsorb toxins in gut</li>
      <li><strong>Colloid osmotic pressure</strong> (oncotic pressure) — plasma proteins (albumin) exert osmotic pressure → keeps fluid in blood vessels. Low albumin → fluid leaks → edema</li>
    </ul>
  </div>
</div>

<!-- SECTION 12: DONNAN MEMBRANE EQUILIBRIUM -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-purple">⚖️</div>
    <h2>12. Donnan Membrane Equilibrium
      <small>Why protein-containing compartments have different ion concentrations</small>
    </h2>
  </div>

  <div class="box bx-key">
    <div class="box-t">⭐ What is Donnan Membrane Equilibrium?</div>
    When a semipermeable membrane separates a solution containing a <strong>non-diffusible ion (e.g., protein anion — Pr⁻)</strong> from a solution without it, the distribution of diffusible ions (Na⁺, Cl⁻) across the membrane is <strong>UNEQUAL</strong>. This unequal distribution is the Donnan Membrane Equilibrium.
  </div>

  <h3>Visual Diagram</h3>
  <div class="donnan">
    <div class="don-col don-l">
      <h4>Side A (contains Pr⁻)</h4>
      <div class="don-row"><span>Pr⁻ (protein)</span><span style="color:#dc2626;font-weight:700;">NON-DIFFUSIBLE</span></div>
      <div class="don-row"><span>Na⁺</span><span style="color:#1d4ed8;font-weight:700;">↑ HIGH (attracted to Pr⁻)</span></div>
      <div class="don-row"><span>Cl⁻</span><span style="color:#15803d;font-weight:700;">↓ LOW (repelled by Pr⁻)</span></div>
      <div class="don-row"><span>Total ions</span><span style="color:#7c3aed;font-weight:700;">↑ HIGHER</span></div>
      <div class="don-row"><span>Osmotic pressure</span><span style="color:#dc2626;font-weight:700;">↑ HIGHER</span></div>
    </div>
    <div class="don-col don-r">
      <h4>Side B (no Pr⁻)</h4>
      <div class="don-row"><span>Pr⁻ (protein)</span><span style="color:#64748b;">ABSENT</span></div>
      <div class="don-row"><span>Na⁺</span><span style="color:#1d4ed8;">↓ LOWER</span></div>
      <div class="don-row"><span>Cl⁻</span><span style="color:#15803d;font-weight:700;">↑ HIGH</span></div>
      <div class="don-row"><span>Total ions</span><span style="color:#7c3aed;">↓ LOWER</span></div>
      <div class="don-row"><span>Osmotic pressure</span><span style="color:#64748b;">↓ LOWER</span></div>
    </div>
  </div>

  <h3>The 4 Rules of Donnan Equilibrium</h3>
  <div class="steps">
    <div class="step"><div class="sn sn-p">1</div><div class="sb"><strong>Non-diffusible ion (Pr⁻) influences diffusible ions</strong> — the protein anion distorts the distribution of Na⁺ and Cl⁻ across the membrane</div></div>
    <div class="step"><div class="sn sn-p">2</div><div class="sb"><strong>Oppositely charged ions (Na⁺) concentrate on the protein side</strong> — Na⁺ is attracted to the negative protein → higher Na⁺ on Pr⁻ side</div></div>
    <div class="step"><div class="sn sn-p">3</div><div class="sb"><strong>Similarly charged ions (Cl⁻) are higher on the non-protein side</strong> — Cl⁻ is repelled by Pr⁻ → higher Cl⁻ on the side without protein</div></div>
    <div class="step"><div class="sn sn-p">4</div><div class="sb"><strong>Total ion concentration is higher on the protein side</strong> → higher osmotic pressure on that side → water tends to move toward protein side (contributes to edema if proteins leak out of vessels)</div></div>
  </div>

  <h3>Applications of Donnan Equilibrium</h3>
  <table>
    <tr><th>Application</th><th>Explanation</th></tr>
    <tr>
      <td><strong>Difference in ionic concentrations of body fluids</strong></td>
      <td>Lymph and interstitial fluids have <strong>lower cations (Na⁺, K⁺)</strong> and <strong>higher anions (Cl⁻)</strong> compared to plasma — because plasma has more protein (Pr⁻) that attracts cations and repels anions</td>
    </tr>
    <tr>
      <td><strong>Membrane hydrolysis (Donnan potential)</strong></td>
      <td>The relative strength of H⁺ and OH⁻ ions, and therefore the pH, is influenced by the presence of non-diffusible proteins on one side of a membrane</td>
    </tr>
    <tr>
      <td><strong>Edema (clinical)</strong></td>
      <td>Low plasma albumin (hypoalbuminemia) → less colloid osmotic pressure → Donnan equilibrium disrupted → fluid accumulates in interstitial space → <strong>pitting edema</strong></td>
    </tr>
    <tr>
      <td><strong>RBC vs Plasma</strong></td>
      <td>RBCs contain high protein → higher Na⁺ inside, higher Cl⁻ in plasma → explains the chloride shift in respiration</td>
    </tr>
  </table>

  <div class="box bx-clin">
    <div class="box-t">🩺 Clinical Importance — Edema</div>
    In conditions like <strong>nephrotic syndrome, liver cirrhosis, malnutrition (kwashiorkor)</strong> — plasma albumin falls → Donnan equilibrium upset → oncotic (colloid osmotic) pressure falls → fluid cannot be retained in vessels → leaks into interstitium → <strong>EDEMA</strong>. Treatment: IV albumin, treat underlying cause.
  </div>
</div>

<!-- QUICK REVIEW -->
<div class="section">
  <div class="sec-hdr">
    <div class="sec-icon ic-yellow">⭐</div>
    <h2>Quick Review — High-Yield Numbers &amp; Facts</h2>
  </div>

  <div class="hqg">
    <div class="hqc hq1"><h4>Membrane Thickness</h4><div class="hqv">5–8 nm</div></div>
    <div class="hqc hq2"><h4>Na⁺-K⁺ Pump Ratio</h4><div class="hqv">3 Na⁺ out : 2 K⁺ in</div></div>
    <div class="hqc hq3"><h4>ATP used by Na⁺-K⁺ pump</h4><div class="hqv">30–40%</div></div>
    <div class="hqc hq4"><h4>Pump Inhibitor</h4><div class="hqv">Ouabain</div></div>
    <div class="hqc hq5"><h4>Fluid Mosaic — Proposed by</h4><div class="hqv">Singer &amp; Nicolson (1972)</div></div>
    <div class="hqc hq6"><h4>Lipid Bilayer — Proposed by</h4><div class="hqv">Davson &amp; Danielle (1935)</div></div>
    <div class="hqc hq1"><h4>Blood pH</h4><div class="hqv">7.35–7.45</div></div>
    <div class="hqc hq2"><h4>Pure Water pH</h4><div class="hqv">7.0</div></div>
    <div class="hqc hq3"><h4>Kw (water dissociation)</h4><div class="hqv">10⁻¹⁴</div></div>
    <div class="hqc hq4"><h4>Colloidal Particle Size</h4><div class="hqv">1–100 nm</div></div>
    <div class="hqc hq5"><h4>pH introduced by</h4><div class="hqv">Sorenson (1909)</div></div>
    <div class="hqc hq6"><h4>Father of Colloid Chemistry</h4><div class="hqv">Thomas Graham (1861)</div></div>
  </div>

  <div class="box bx-exam" style="margin-top:16px;">
    <div class="box-t">🎯 Most Asked Exam Questions — Both Chapters</div>
    <ol>
      <li>Describe the Fluid Mosaic model of membrane structure. (Ch.33)</li>
      <li>Distinguish between passive diffusion, facilitated diffusion and active transport. Give examples.</li>
      <li>Explain the Na⁺-K⁺ pump mechanism with a diagram. What is Ouabain?</li>
      <li>What are uniport, symport and antiport systems? Give one example each.</li>
      <li>Explain endocytosis and exocytosis with examples.</li>
      <li>Write about the clinical conditions due to defects in membrane transport (Hartnup's, Cystinuria).</li>
      <li>Describe the unique properties of water with biological significance. (Ch.40)</li>
      <li>Define pH. Draw and explain the pH scale with important biological pH values.</li>
      <li>What is the colloidal state? Describe the properties of colloids with clinical applications.</li>
      <li>Explain the Donnan membrane equilibrium and its applications (edema, ionic distribution).</li>
    </ol>
  </div>
</div>

<div class="footer">
  <p>Notes compiled from: <strong>Satyanarayana &amp; Chakrapani Biochemistry — Chapter 33 (Biological Membranes &amp; Transport) &amp; Chapter 40 (Biophysical Chemistry)</strong></p>
  <p style="margin-top:4px;">Prepared for MBBS First Year | Foundation Module | Biochemistry</p>
</div>

</body>
</html>
Running Command

chromium --headless --no-sandbox --disable-gpu \ --print-to-pdf="/home/daytona/workspace/Membranes_Biophysical_Notes_RAW.pdf" \ --print-to-pdf-no-header \ "file:///home/daytona/workspace/Membranes_Biophysical_Notes.html" 2>&1 | tail -3 python3 -c " from pypdf import PdfReader, PdfWriter import os reader = PdfReader('/home/daytona/workspace/Membranes_Biophysical_Notes_RAW.pdf') writer = PdfWriter() for page in reader.pages: writer.add_page(page) with open('/home/daytona/workspace/Membranes_Biophysical_Notes_FINAL.pdf','wb') as f: writer.write(f) print('Pages:', len(reader.pages)) print('Size:', round(os.path.getsize('/home/daytona/workspace/Membranes_Biophysical_Notes_FINAL.pdf')/1024), 'KB') "

Done! 19-page PDF ready. Here are both formats:
📄 PDF:

Membranes Biophysical Notes FINAL

PDF Document · PDF

🌐 HTML (open in browser):

Membranes Biophysical Notes

HTML File · HTML


What's inside (everything from the 10-page PDF):

#SectionContent
1Plasma Membrane OverviewComposition (LPC mnemonic), Glycocalyx
2Fluid Mosaic ModelDavson-Danielle (old) vs Singer-Nicolson (current), lipid bilayer visual diagram
3Membrane ProteinsExtrinsic vs Intrinsic — comparison card, removal methods, examples
4Transport Mechanisms3-column visual comparison (Passive/Facilitated/Active), comparison table
5Na⁺-K⁺ Pump5-step mechanism flowchart, 3:2 ratio, Ouabain, 30-40% ATP, cardiac glycosides
6Transport SystemsUniport/Symport/Antiport — visual diagrams with arrows, examples, ROME-like mnemonic
7Cotransport + Proton PumpHCl production flowchart, Omeprazole (PPIs), Endocytosis vs Exocytosis
8Diseases of TransportHartnup's, Cystinuria, LCAT deficiency, Alzheimer's
9Properties of WaterH-bond structure, unique properties table, ice float explanation, Kw formula
10Acids, Bases, pHDefinitions, Ampholytes, colour-coded pH scale, important pH values, Molarity vs Normality
11ColloidsGraham's classification, particle size diagram, all colloidal properties, clinical apps (dialysis, electrophoresis)
12Donnan EquilibriumVisual compartment diagram, 4 rules, body fluid applications, edema mechanism
Quick Review12 high-yield numbers + top 10 exam questions

Bro I want you to remove the topics of properties of water, colloid and donnan equilibrium and just add the topic of buffer

Bro I want you to remove the topics of properties of water, colloid and donnan equilibrium and just add the topic of buffer, viscosity and surface area from the given pdf. And without them don't remove an else. And then make a pdf note of it

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.