<?php
// CFS Lithography University
// Standalone masterclasses from Elementary School to PhD and Distinguished Industry Fellows.
declare(strict_types=1);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Lithography University | CFS Masterclasses (Elementary to PhD)</title>
    <meta name="description" content="CFS Lithography University: comprehensive 7-level masterclasses and interactive simulation laboratories from elementary school to PhD and distinguished industry fellows. The master science and optical engineering of semiconductor lithography: Abbe and Rayleigh diffraction criteria, KrF/ArF excimer lasers, immersion ArFi (NA=1.35), Source-Mask Optimization (SMO), multi-patterning pitch division (SADP/SAQP), Mo/Si Bragg mirror EUV optics, and 0.55 High-NA anamorphic scanners.">
    <link rel="canonical" href="https://www.chipfoundryservices.com/lithography.php">
    <meta property="og:type" content="website">
    <meta property="og:site_name" content="ChipFoundryServices">
    <meta property="og:title" content="Lithography University | CFS Masterclasses">
    <meta property="og:description" content="The master science and optical engineering of semiconductor lithography: Abbe and Rayleigh diffraction criteria, KrF/ArF excimer lasers, immersion ArFi (NA=1.35), Source-Mask Optimization (SMO), multi-patterning pitch division (SADP/SAQP), Mo/Si Bragg mirror EUV optics, and 0.55 High-NA anamorphic scanners.">
    <meta property="og:url" content="https://www.chipfoundryservices.com/lithography.php">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js" crossorigin="anonymous" onload="if(typeof renderMath==='function')renderMath();"></script>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            background: #070c12;
            color: #f1f5f9;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            line-height: 1.55;
            -webkit-font-smoothing: antialiased;
        }
        a { color: #10a37f; text-decoration: none; transition: color 0.15s; }
        a:hover { color: #34d399; text-decoration: underline; }

        /* Top Header */
        .header {
            position: sticky; top: 0; z-index: 1000;
            background: rgba(11, 17, 24, 0.94);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid #1e293b;
            padding: 12px 24px;
            display: flex; align-items: center; justify-content: space-between;
        }
        .header-brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15rem; color: #fff; }
        .header-brand svg { stroke: #10a37f; }
        .header-nav { display: flex; align-items: center; gap: 14px; font-size: 0.85rem; flex-wrap: wrap; }
        .header-nav a { color: #cbd5e1; font-weight: 500; }
        .header-nav a:hover { color: #10a37f; text-decoration: none; }
        .header-nav .univ-badge {
            background: rgba(16, 163, 127, 0.2);
            color: #34d399;
            border: 1px solid rgba(16, 163, 127, 0.4);
            padding: 2px 8px;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Hero */
        .hero {
            background: radial-gradient(circle at 50% 20%, rgba(16, 163, 127, 0.15) 0%, rgba(7, 12, 18, 0) 70%);
            padding: 60px 24px 40px;
            text-align: center;
            border-bottom: 1px solid #1e293b;
        }
        .hero-badge {
            display: inline-flex; align-items: center; gap: 6px;
            background: rgba(16, 163, 127, 0.15);
            border: 1px solid rgba(16, 163, 127, 0.4);
            color: #34d399;
            padding: 5px 14px;
            border-radius: 9999px;
            font-size: 0.82rem;
            font-weight: 700;
            margin-bottom: 20px;
            letter-spacing: 0.6px;
            text-transform: uppercase;
        }
        .hero h1 {
            font-size: 2.8rem;
            font-weight: 850;
            color: #ffffff;
            margin-bottom: 16px;
            line-height: 1.15;
            letter-spacing: -0.8px;
        }
        .hero h1 span {
            background: linear-gradient(135deg, #10a37f, #34d399, #6ee7b7);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .hero p {
            max-width: 840px;
            margin: 0 auto 24px;
            font-size: 1.1rem;
            color: #94a3b8;
            line-height: 1.6;
        }

        /* Hero Stats */
        .hero-stats {
            display: flex;
            justify-content: center;
            gap: 32px;
            flex-wrap: wrap;
            margin-top: 24px;
        }
        .stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .stat-val {
            font-size: 1.5rem;
            font-weight: 800;
            color: #ffffff;
        }
        .stat-val span { color: #10a37f; }
        .stat-lbl {
            font-size: 0.8rem;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Level Bar */
        .level-bar-wrap {
            position: sticky; top: 57px; z-index: 990;
            background: #090f17;
            border-bottom: 1px solid #1e293b;
            padding: 10px 24px;
            display: flex;
            justify-content: center;
        }
        .level-bar {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            max-width: 1200px;
            width: 100%;
            scrollbar-width: none;
        }
        .level-bar::-webkit-scrollbar { display: none; }
        .level-btn {
            background: #111a28;
            border: 1px solid #1e293b;
            color: #94a3b8;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
            transition: all 0.2s;
        }
        .level-btn:hover {
            border-color: #10a37f;
            color: #f1f5f9;
            background: #162232;
        }
        .level-btn.active {
            background: #10a37f;
            color: #ffffff;
            border-color: #10a37f;
            box-shadow: 0 0 12px rgba(16, 163, 127, 0.4);
        }
        .level-btn .badge {
            background: rgba(0, 0, 0, 0.25);
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 0.72rem;
            font-weight: 700;
        }

        /* Main Container */
        .main-wrap, .main-container {
            max-width: 1240px;
            margin: 0 auto;
            padding: 40px 24px 80px;
        }

        /* Level Content */
        .level-container { display: none; animation: fadeIn 0.3s ease; }
        .level-container.active { display: block; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

        .level-header {
            margin-bottom: 32px;
            padding-bottom: 20px;
            border-bottom: 1px solid #1e293b;
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            flex-wrap: wrap;
            gap: 16px;
        }
        .level-meta-badge {
            font-size: 0.78rem;
            font-weight: 800;
            color: #10a37f;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 6px;
        }
        .level-title {
            font-size: 2rem;
            font-weight: 850;
            color: #ffffff;
            letter-spacing: -0.5px;
            line-height: 1.2;
        }
        .level-subtitle {
            font-size: 1rem;
            color: #94a3b8;
            max-width: 780px;
            margin-top: 6px;
        }

        /* Module Grid */
        .modules-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
            gap: 24px;
            margin-bottom: 40px;
        }
        .module-card {
            background: #0d1520;
            border: 1px solid #1e293b;
            border-radius: 12px;
            padding: 26px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: transform 0.2s, border-color 0.2s;
        }
        .module-card:hover {
            border-color: rgba(16, 163, 127, 0.4);
            transform: translateY(-2px);
        }
        .module-num {
            font-size: 0.75rem;
            font-weight: 800;
            color: #10a37f;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 8px;
        }
        .module-card h3 {
            font-size: 1.25rem;
            font-weight: 750;
            color: #ffffff;
            margin-bottom: 12px;
            line-height: 1.3;
        }
        .module-card p {
            font-size: 0.92rem;
            color: #cbd5e1;
            margin-bottom: 12px;
            line-height: 1.6;
        }
        .module-card ul {
            list-style: none;
            margin-bottom: 16px;
        }
        .module-card ul li {
            position: relative;
            padding-left: 18px;
            font-size: 0.88rem;
            color: #94a3b8;
            margin-bottom: 6px;
            line-height: 1.5;
        }
        .module-card ul li::before {
            content: "•";
            position: absolute; left: 4px;
            color: #10a37f;
            font-weight: bold;
        }
        .formula-box {
            background: #080e16;
            border: 1px solid #1e293b;
            border-left: 3px solid #10a37f;
            border-radius: 6px;
            padding: 12px 16px;
            font-size: 0.95rem;
            color: #e2e8f0;
            margin-top: 14px;
            overflow-x: auto;
            text-align: center;
        }
        .formula-box .katex-display {
            margin: 0.35em 0 !important;
        }

        /* Interactive Lab */
        .lab-card {
            background: #0c1420;
            border: 1px solid #1e293b;
            border-radius: 14px;
            padding: 28px;
            margin-bottom: 40px;
        }
        .lab-header {
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 1px solid #162232;
        }
        .lab-tag {
            font-size: 0.78rem;
            font-weight: 800;
            color: #34d399;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 4px;
        }
        .lab-title { font-size: 1.5rem; font-weight: 800; color: #fff; }
        .lab-subtitle { font-size: 0.92rem; color: #94a3b8; margin-top: 4px; }
        .lab-content {
            display: grid;
            grid-template-columns: 320px 1fr;
            gap: 28px;
        }
        @media (max-width: 900px) {
            .lab-content { grid-template-columns: 1fr; }
        }
        .controls-grid {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        .control-item { display: flex; flex-direction: column; gap: 6px; }
        .ctrl-lbl {
            font-size: 0.82rem;
            font-weight: 600;
            color: #cbd5e1;
            display: flex;
            justify-content: space-between;
        }
        .ctrl-val { color: #10a37f; font-weight: 700; font-family: monospace; }
        .ctrl-slider {
            width: 100%;
            height: 6px;
            background: #1a273a;
            border-radius: 3px;
            outline: none;
            -webkit-appearance: none;
        }
        .ctrl-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px; height: 16px;
            border-radius: 50%;
            background: #10a37f;
            cursor: pointer;
            transition: transform 0.1s;
        }
        .ctrl-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
        .canvas-box {
            background: #070c12;
            border: 1px solid #1a273a;
            border-radius: 10px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-height: 280px;
        }
        .readout-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 14px;
            margin-top: 20px;
        }
        .readout-item {
            background: #0d1520;
            border: 1px solid #1e293b;
            padding: 12px;
            border-radius: 8px;
            text-align: center;
        }
        .ro-label { font-size: 0.72rem; color: #64748b; text-transform: uppercase; font-weight: 700; }
        .ro-val { font-size: 1.25rem; font-weight: 800; color: #34d399; font-family: monospace; margin-top: 4px; }

        /* Quiz */
        .quiz-section {
            background: #0a111b;
            border: 1px solid #1e293b;
            border-radius: 14px;
            padding: 28px;
            margin-bottom: 40px;
        }
        .quiz-header {
            margin-bottom: 24px;
            padding-bottom: 14px;
            border-bottom: 1px solid #162232;
        }
        .quiz-tag {
            font-size: 0.78rem;
            font-weight: 800;
            color: #10a37f;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 4px;
        }
        .quiz-title { font-size: 1.4rem; font-weight: 800; color: #fff; }
        .quiz-q-wrap {
            margin-bottom: 24px;
            padding-bottom: 20px;
            border-bottom: 1px solid #162232;
        }
        .quiz-q-wrap:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
        .quiz-q-text {
            font-size: 1rem;
            font-weight: 600;
            color: #f1f5f9;
            margin-bottom: 14px;
        }
        .quiz-options {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
        }
        .quiz-option {
            background: #111a28;
            border: 1px solid #1e293b;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 0.9rem;
            color: #cbd5e1;
            text-align: left;
            cursor: pointer;
            transition: all 0.2s;
        }
        .quiz-option:hover {
            border-color: #334155;
            background: #162232;
            color: #fff;
        }
        .quiz-option.correct {
            border-color: #10a37f;
            background: rgba(16, 163, 127, 0.15);
            color: #34d399;
            font-weight: 600;
        }
        .quiz-option.incorrect {
            border-color: #ef4444;
            background: rgba(239, 68, 68, 0.15);
            color: #f87171;
        }
        .quiz-exp, .quiz-explanation {
            margin-top: 10px;
            font-size: 0.85rem;
            color: #34d399;
            background: rgba(16, 163, 127, 0.1);
            border-left: 3px solid #10a37f;
            padding: 8px 12px;
            border-radius: 0 6px 6px 0;
            display: none;
        }

        /* Certificate Card */
        .cert-card {
            background: linear-gradient(135deg, rgba(16, 163, 127, 0.1) 0%, rgba(13, 21, 32, 0.8) 100%);
            border: 1px solid rgba(16, 163, 127, 0.35);
            border-radius: 12px;
            padding: 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 16px;
            margin-top: 30px;
        }
        .cert-info h4 { font-size: 1.15rem; color: #fff; margin-bottom: 4px; }
        .cert-info p { font-size: 0.85rem; color: #94a3b8; }
        .cert-btn {
            background: #10a37f;
            color: #fff;
            border: none;
            padding: 10px 22px;
            border-radius: 8px;
            font-size: 0.88rem;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.2s;
        }
        .cert-btn:hover { background: #0e8c6d; }

        /* Fellow Medal */
        .fellow-medal-box {
            background: linear-gradient(135deg, #1c1917 0%, #0d1520 100%);
            border: 2px solid #f59e0b;
            border-radius: 16px;
            padding: 36px;
            text-align: center;
            margin-top: 40px;
            box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
        }
        .medal-icon { margin-bottom: 16px; font-size: 2.5rem; }
        .medal-title {
            font-size: 1.8rem;
            font-weight: 850;
            color: #fbbf24;
            margin-bottom: 8px;
            letter-spacing: -0.5px;
        }
        .medal-desc {
            max-width: 680px;
            margin: 0 auto 20px;
            font-size: 0.95rem;
            color: #d1d5db;
            line-height: 1.6;
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .modal.active { display: flex; }
        .modal-content {
            background: #0d1520;
            border: 1px solid #1e293b;
            border-radius: 16px;
            max-width: 600px;
            width: 100%;
            padding: 32px;
            position: relative;
            text-align: center;
        }
        .modal-close {
            position: absolute; top: 16px; right: 16px;
            background: none; border: none; font-size: 1.5rem; color: #94a3b8; cursor: pointer;
        }

        /* Footer */
        .footer {
            background: #04080d;
            border-top: 1px solid #1e293b;
            padding: 40px 24px;
            color: #64748b;
            font-size: 0.82rem;
        }
        .footer a { color: #94a3b8; }
        .footer a:hover { color: #10a37f; }

        @media (max-width: 768px) {
            .hero h1 { font-size: 2.1rem; }
            .level-title { font-size: 1.5rem; }
            .modules-grid { grid-template-columns: 1fr; }
        }
    </style>
</head>
<body>

<!-- Header -->
<header class="header">
    <div class="header-brand">
        <a href="/" style="display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none;">
            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <rect x="2" y="2" width="20" height="20" rx="4"></rect>
                <path d="M6 18h12M6 14h12M6 10h12M6 6h12"></path>
            </svg>
            <span>ChipFoundryServices</span>
        </a>
    </div>
    <nav class="header-nav">
        <a href="/materials.php">Materials</a><a href="/devices.php">Devices</a><a href="/transistor.php">Transistors</a><a href="/lithography.php" style="color: #10a37f; font-weight: 700;">Lithography <span class="univ-badge">Active</span></a><a href="/gateengineering.php">Gate Eng</a><a href="/latencyengineering.php">Latency</a><a href="/powerengineering.php">Power</a><a href="/performanceengineering.php">Performance</a><a href="/areareduction.php">Area</a><a href="/costengineering.php">Cost</a><a href="/timetomarket.php">TTM</a><a href="/computing.php">Computing</a><a href="/datascience.php">Data Science</a><a href="/statistics.php">Statistics</a><a href="/materialscience.php">Material Sci</a><a href="/promptengineering.php">Prompt</a><a href="/featureengineering.php">Features</a><a href="/pca.php">PCA</a><a href="/contextengineering.php">Context</a><a href="/memoryengineering.php">Memory</a><a href="/graphengineering.php">Graphs</a><a href="/skillsengineering.php">Skills</a><a href="/harnessengineering.php">Harness</a><a href="/tagengineering.php">Tags</a><a href="/loopengineering.php">Loops</a><a href="/automation.php">Automation</a><a href="/pythonagentfoundry.php">Agent Foundry</a><a href="/waferfoundry.php">Wafer Foundry</a><a href="/linuxprogramming.php">Linux</a><a href="/cprogramming.php">C</a><a href="/cppprogramming.php">C++</a><a href="/pythonprogramming.php">Python</a><a href="/ai.php">AI Univ</a>
    </nav>
</header>

<!-- Hero Section -->
<section class="hero">
    <div class="hero-badge">
        <span>⚡</span> From Rayleigh Diffraction Scaling & 193nm Immersion to Extreme Ultraviolet (EUV) & High-NA 0.55 Anamorphic Systems
    </div>
    <h1>Lithography <span>University</span></h1>
    <p>The master science and optical engineering of semiconductor lithography: Abbe and Rayleigh diffraction criteria, KrF/ArF excimer lasers, immersion ArFi (NA=1.35), Source-Mask Optimization (SMO), multi-patterning pitch division (SADP/SAQP), Mo/Si Bragg mirror EUV optics, and 0.55 High-NA anamorphic scanners.</p>
    <div class="hero-stats">
        <div class="stat-item">
            <div class="stat-val">7 <span>Levels</span></div>
            <div class="stat-lbl">Elementary to Fellow</div>
        </div>
        <div class="stat-item">
            <div class="stat-val">21 <span>Modules</span></div>
            <div class="stat-lbl">Rigorous Curriculum</div>
        </div>
        <div class="stat-item">
            <div class="stat-val">7 <span>Sim Labs</span></div>
            <div class="stat-lbl">Real-Time Engines</div>
        </div>
        <div class="stat-item">
            <div class="stat-val">7 <span>Diplomas</span></div>
            <div class="stat-lbl">Industry Fellow Laureate</div>
        </div>
    </div>
</section>

<!-- Level Switcher Bar -->
<div class="level-bar-wrap">
    <div class="level-bar">
        <button class="level-btn active" onclick="switchLevel(1)"><span class="badge">L1</span> Elementary</button>
        <button class="level-btn" onclick="switchLevel(2)"><span class="badge">L2</span> Middle School</button>
        <button class="level-btn" onclick="switchLevel(3)"><span class="badge">L3</span> High School</button>
        <button class="level-btn" onclick="switchLevel(4)"><span class="badge">L4</span> College BS</button>
        <button class="level-btn" onclick="switchLevel(5)"><span class="badge">L5</span> Master's MS</button>
        <button class="level-btn" onclick="switchLevel(6)"><span class="badge">L6</span> PhD / Post-Doc</button>
        <button class="level-btn" onclick="switchLevel(7)"><span class="badge">L7</span> Industry Fellow</button>
    </div>
</div>

<main class="main-wrap">

<!-- LEVEL 1: DRAWING WITH BEAMS OF LIGHT -->
<div class="level-container active" id="level-1">
    <div class="level-header">
        <div>
            <div class="level-meta-badge">Academic Level 1 • Ages 6–10</div>
            <div class="level-title">Drawing with Beams of Light</div>
            <div class="level-subtitle">Discover how giant optical machines use invisible light rays to print billions of microscopic switches.</div>
        </div>
    </div>

    <div class="modules-grid">
        <div class="module-card">
            <div>
                <div class="module-num">Module 1.1</div>
                <h3>Printing Giant Blueprints Onto Tiny Chips</h3>
                <p>Have you ever used a flashlight to make shadow puppets on a wall? Photolithography works in reverse! Engineers draw giant blueprints of electronic circuits that could cover an entire building floor.</p>
                <p>A giant camera called a stepper or scanner shines bright light through a glass stencil (called a photomask) and uses ultra-precise lenses to shrink the shadow down 4 times smaller, projecting it onto a silicon wafer!</p>
                <ul>
                    <li><strong>Photomask:</strong> A quartz glass plate with chrome metal patterns acting as an optical stencil.</li><li><strong>Demagnification:</strong> Precision lenses shrinking image patterns down by $4\times$ onto the chip.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\text{Optical Reduction } M = \frac{1}{4} \quad (\text{4x Mask-to-Wafer Scaling})$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 1.2</div>
                <h3>Colors of Light: Why Blue is Better Than Red</h3>
                <p>Light travels in waves, like ripples in a swimming pool. Red light has big, wide waves, while blue and violet light have much shorter, tighter ripples.</p>
                <p>If you try to draw a microscopic smiley face with a giant fat marker, it blurs into a blob. To draw lines narrower than a virus, chipmakers use deep ultraviolet light with waves so tiny that human eyes cannot see them at all!</p>
                <ul>
                    <li><strong>Wavelength ($\lambda$):</strong> The distance between light wave crests.</li><li><strong>Resolution:</strong> Shorter light wavelengths can draw much sharper and narrower lines.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\lambda_{\text{Red}} \approx 700\,\text{nm} \quad \text{vs.} \quad \lambda_{\text{UV}} \approx 193\,\text{nm} \quad \text{vs.} \quad \lambda_{\text{EUV}} = 13.5\,\text{nm}$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 1.3</div>
                <h3>The Step-and-Scan Machine</h3>
                <p>A silicon wafer is as big as a dinner plate (300 millimeters across), but a camera lens can only focus on one small stamp-sized square at a time (called an exposure field).</p>
                <p>Lithography machines move at blistering speeds! The stage glides on cushions of air, flashing ultraviolet light on one chip, stepping instantly to the next, and exposing an entire wafer with billions of transistors in under 20 seconds.</p>
                <ul>
                    <li><strong>Scanner Stage:</strong> Ultra-fast magnetic levitation stage moving with sub-nanometer accuracy.</li><li><strong>Exposure Field:</strong> Standard rectangular exposure zone ($26\,\text{mm} \times 33\,\text{mm}$).</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\text{Stage Acceleration } a \ge 15g \quad (\approx 150\,\text{m/s}^2)$$
            </div>
        </div>
    </div>
    <!-- Lab 1 -->
    <div class="lab-card" id="lab_lvl_1">
        <div class="lab-header">
            <div class="lab-tag">⚡ Interactive Laboratory L1</div>
            <div class="lab-title">Optical Reduction & Pitch Calculator</div>
            <div class="lab-subtitle">Observe how lens demagnification transforms a 100nm mask feature into a miniature silicon circuit feature.</div>
        </div>
        <div class="lab-content">
            <div class="controls-grid">
                <div class="control-item">
                    <div class="ctrl-lbl"><span>Mask Feature Size (nm)</span><span class="ctrl-val" id="lth_mask_cd_l1_val">120</span></div>
                    <input type="range" class="ctrl-slider" id="lth_mask_cd_l1" min="60" max="240" step="10" value="120" oninput="document.getElementById('lth_mask_cd_l1_val').innerText = this.value + ''; updateLab_lithography_1();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>Lens Demagnification</span><span class="ctrl-val" id="lth_mag_l1_val">4x Optical Reduction</span></div>
                    <input type="range" class="ctrl-slider" id="lth_mag_l1" min="0" max="100" step="1" value="4x Optical Reduction" oninput="document.getElementById('lth_mag_l1_val').innerText = this.value + ''; updateLab_lithography_1();">
                </div>
            </div>
            <div class="canvas-box">
                <div style="font-size: 0.85rem; font-weight: 700; color: #10a37f; margin-bottom: 8px;">REAL-TIME SIMULATION TELEMETRY</div>
                <div style="flex:1; display:flex; align-items:center; justify-content:center; background:#04080d; border-radius:8px; border:1px dashed #1e293b; padding:16px; text-align:center;">
                    <div style="font-size:0.92rem; color:#94a3b8; max-width:440px;">
                        Interactive physics simulator running client-side transfer models, carrier drift-diffusion kinetics, and boundary potential solvers.
                    </div>
                </div>
                <div class="readout-grid">
            <div class="readout-item">
                <div class="ro-label">Printed Wafer Feature Size</div>
                <div class="ro-val" id="lth_wafer_cd_l1">30.0 nm</div>
            </div>            <div class="readout-item">
                <div class="ro-label">Scaling Comparison</div>
                <div class="ro-val" id="lth_scale_l1">3,000x Thinner than Human Hair</div>
            </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Quiz 1 -->
    <div class="quiz-section">
        <div class="quiz-header">
            <div class="quiz-tag">🎓 Level 1 Examination</div>
            <div class="quiz-title">Level 1 Conceptual Mastery Assessment</div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l1_q1">
            <div class="quiz-q-text">What is the primary role of a photomask in semiconductor photolithography?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q1', 0)">A) It acts as a master photographic stencil that blocks or transmits light to project circuit designs onto the wafer</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q1', 1)">B) It is a glass shield used to protect the fab operator from dust</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q1', 2)">C) It serves as the battery that powers the lithography laser</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q1', 3)">D) It cleans the wafer surface with chemical soap</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l1_q1"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l1_q2">
            <div class="quiz-q-text">Why do advanced semiconductor scanners use ultraviolet and extreme ultraviolet light rather than visible red light?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q2', 0)">A) Shorter wavelengths undergo less diffraction, allowing much narrower, denser circuit features to be resolved</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q2', 1)">B) Red light is too expensive to manufacture</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q2', 2)">C) Ultraviolet light does not require electricity</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q2', 3)">D) Visible light causes the silicon wafer to dissolve immediately</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l1_q2"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l1_q3">
            <div class="quiz-q-text">What is the standard optical demagnification ratio used by most commercial DUV and EUV scanners?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q3', 0)">A) 4x (the image on the wafer is 4 times smaller than the pattern on the mask)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q3', 1)">B) 100x magnification (making the chip huge)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q3', 2)">C) 1x (contact printing without lenses)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l1_q3', 3)">D) 0.1x reduction</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l1_q3"></div>
        </div>
    </div>
    <!-- Certificate 1 -->
    <div class="cert-card">
        <div class="cert-info">
            <h4>Level 1 Completed: Drawing with Beams of Light Mastery Certificate</h4>
            <p>Conferred for mastery of Level 1 (Academic Level 1 • Ages 6–10) curriculum, simulation laboratory, and assessment evaluation.</p>
        </div>
        <div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center;">
            <button class="cert-btn" onclick="generateCert(1)">View Credential 🎓</button>
            <button class="cert-btn" style="background:#10a37f; color:#fff;" onclick="switchLevel(2)">Advance to Level 2 &rarr;</button>
        </div>
    </div>
</div>

<!-- LEVEL 2: THE WAVELENGTH ROADMAP: G-LINE TO DUV -->
<div class="level-container" id="level-2">
    <div class="level-header">
        <div>
            <div class="level-meta-badge">Academic Level 2 • Ages 11–13</div>
            <div class="level-title">The Wavelength Roadmap: G-Line to DUV</div>
            <div class="level-subtitle">Trace the history of lithography light sources from mercury vapor arc lamps to excimer lasers.</div>
        </div>
    </div>

    <div class="modules-grid">
        <div class="module-card">
            <div>
                <div class="module-num">Module 2.1</div>
                <h3>Mercury Arc Lamps: G-Line & I-Line</h3>
                <p>In the early decades of Silicon Valley, lithography machines used high-pressure mercury arc lamps. Electricity passing through mercury vapor excited atoms to emit distinct spectral emission peaks.</p>
                <p>The G-line (436 nm, blue light) powered early microprocessors through the 1980s. As transistors shrank, engineers transitioned to the I-line (365 nm, near-ultraviolet), utilizing fused silica lenses to prevent glass solarization and thermal absorption.</p>
                <ul>
                    <li><strong>G-Line (436 nm):</strong> Mercury emission line used for $1.0\,\mu\text{m}$ to $0.8\,\mu\text{m}$ CMOS.</li><li><strong>I-Line (365 nm):</strong> Mercury emission line driving $0.5\,\mu\text{m}$ to $0.35\,\mu\text{m}$ sub-micron scaling.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\Delta E = h \cdot \nu = \frac{h \cdot c}{\lambda} \quad (E_{I\text{-line}} \approx 3.40\,\text{eV})$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 2.2</div>
                <h3>Excimer Lasers: KrF (248 nm) & ArF (193 nm)</h3>
                <p>To break below $0.25\,\mu\text{m}$, mercury lamps lacked sufficient photon brilliance. Physicists turned to pulsed excimer lasers ('excited dimers') using noble gas halides that only exist in excited molecular states.</p>
                <p>Krypton Fluoride (KrF) lasers emit at 248 nm in the deep ultraviolet (DUV). Later, Argon Fluoride (ArF) lasers emitting at 193 nm took over. These lasers fire thousands of ultra-short pulses per second with gigawatt peak power, delivering monochromatic light with sub-picometer spectral bandwidth.</p>
                <ul>
                    <li><strong>KrF Laser (248 nm):</strong> Enabled $0.25\,\mu\text{m}$ down to $130\,\text{nm}$ logic.</li><li><strong>ArF Laser (193 nm):</strong> Workhorse laser driving $90\,\text{nm}$ down through modern nodes.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$Ar + F_2 \xrightarrow{\text{HV Discharge}} ArF^* \xrightarrow{\text{Stimulated Emission}} Ar + F + h\nu\,(193\,\text{nm})$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 2.3</div>
                <h3>Numerical Aperture (NA) & Lens Quality</h3>
                <p>Wavelength is only half the resolution equation. The other half is the lens system's ability to capture widely diffracted light angles, quantified by the Numerical Aperture ($NA = n \sin\theta$).</p>
                <p>A larger lens captures steeper light rays, delivering sharper images. Modern DUV projection optics contain over 30 massive, flawless calcium fluoride ($CaF_2$) and synthetic quartz lenses, polished so smooth that if expanded to the size of Germany, no bump would be higher than 1 millimeter!</p>
                <ul>
                    <li><strong>Numerical Aperture (NA):</strong> Dimensionless metric of light-gathering acceptance angle.</li><li><strong>Aberration Correction:</strong> Multi-element lens barrels weighing over 1 ton with wavefront errors $&lt; \lambda/100$.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$NA = n \cdot \sin\theta_{\max} \quad (n = 1.00 \text{ in atmospheric dry air})$$
            </div>
        </div>
    </div>
    <!-- Lab 2 -->
    <div class="lab-card" id="lab_lvl_2">
        <div class="lab-header">
            <div class="lab-tag">⚡ Interactive Laboratory L2</div>
            <div class="lab-title">Spectral Emission & Photon Energy Explorer</div>
            <div class="lab-subtitle">Select historical lithography light sources to calculate photon energy, spectral band, and achievable resolution limit.</div>
        </div>
        <div class="lab-content">
            <div class="controls-grid">
                <div class="control-item">
                    <div class="ctrl-lbl"><span>Illumination Light Source</span><span class="ctrl-val" id="lth_source_l2_val">ArF Excimer Laser (193 nm)</span></div>
                    <input type="range" class="ctrl-slider" id="lth_source_l2" min="0" max="100" step="1" value="ArF Excimer Laser (193 nm)" oninput="document.getElementById('lth_source_l2_val').innerText = this.value + ''; updateLab_lithography_2();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>Lens Numerical Aperture (NA)</span><span class="ctrl-val" id="lth_na_l2_val">0.85</span></div>
                    <input type="range" class="ctrl-slider" id="lth_na_l2" min="0.35" max="0.93" step="0.02" value="0.85" oninput="document.getElementById('lth_na_l2_val').innerText = this.value + ''; updateLab_lithography_2();">
                </div>
            </div>
            <div class="canvas-box">
                <div style="font-size: 0.85rem; font-weight: 700; color: #10a37f; margin-bottom: 8px;">REAL-TIME SIMULATION TELEMETRY</div>
                <div style="flex:1; display:flex; align-items:center; justify-content:center; background:#04080d; border-radius:8px; border:1px dashed #1e293b; padding:16px; text-align:center;">
                    <div style="font-size:0.92rem; color:#94a3b8; max-width:440px;">
                        Interactive physics simulator running client-side transfer models, carrier drift-diffusion kinetics, and boundary potential solvers.
                    </div>
                </div>
                <div class="readout-grid">
            <div class="readout-item">
                <div class="ro-label">Photon Energy (eV)</div>
                <div class="ro-val" id="lth_energy_l2">6.42 eV</div>
            </div>            <div class="readout-item">
                <div class="ro-label">Estimated Resolution (k1=0.4)</div>
                <div class="ro-val" id="lth_cd_l2">90.8 nm</div>
            </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Quiz 2 -->
    <div class="quiz-section">
        <div class="quiz-header">
            <div class="quiz-tag">🎓 Level 2 Examination</div>
            <div class="quiz-title">Level 2 Conceptual Mastery Assessment</div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l2_q1">
            <div class="quiz-q-text">What gaseous halogen mixture is discharged in an ArF excimer laser to generate 193nm deep ultraviolet light?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q1', 0)">A) Argon gas and fluorine gas in a neon buffer gas</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q1', 1)">B) Pure steam and carbon dioxide</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q1', 2)">C) Melted sodium chloride</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q1', 3)">D) Nitrogen and helium balloons</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l2_q1"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l2_q2">
            <div class="quiz-q-text">How does increasing the Numerical Aperture (NA) of a projection lens affect lithographic resolution?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q2', 0)">A) It captures higher diffraction orders at wider angles, allowing smaller features to be resolved on the wafer</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q2', 1)">B) It makes the printed lines ten times wider</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q2', 2)">C) It decreases the amount of light that enters the camera</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q2', 3)">D) It converts ultraviolet light into visible infrared heat</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l2_q2"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l2_q3">
            <div class="quiz-q-text">Why could standard optical crown glass not be used for 193nm lithography projection lenses?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q3', 0)">A) Standard glass strongly absorbs 193nm photons and suffers severe thermal expansion and darkening (solarization)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q3', 1)">B) Standard glass dissolves into liquid under laser pulses</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q3', 2)">C) Standard glass is magnetic and attracts dust</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l2_q3', 3)">D) Standard glass is impossible to cut into circles</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l2_q3"></div>
        </div>
    </div>
    <!-- Certificate 2 -->
    <div class="cert-card">
        <div class="cert-info">
            <h4>Level 2 Completed: The Wavelength Roadmap: G-Line to DUV Mastery Certificate</h4>
            <p>Conferred for mastery of Level 2 (Academic Level 2 • Ages 11–13) curriculum, simulation laboratory, and assessment evaluation.</p>
        </div>
        <div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center;">
            <button class="cert-btn" onclick="generateCert(2)">View Credential 🎓</button>
            <button class="cert-btn" style="background:#10a37f; color:#fff;" onclick="switchLevel(3)">Advance to Level 3 &rarr;</button>
        </div>
    </div>
</div>

<!-- LEVEL 3: THE RAYLEIGH SCALING EQUATIONS & DOF -->
<div class="level-container" id="level-3">
    <div class="level-header">
        <div>
            <div class="level-meta-badge">Academic Level 3 • Ages 14–18</div>
            <div class="level-title">The Rayleigh Scaling Equations & DOF</div>
            <div class="level-subtitle">Formulate mathematical resolution limits, depth of focus trade-offs, and k1 process difficulty.</div>
        </div>
    </div>

    <div class="modules-grid">
        <div class="module-card">
            <div>
                <div class="module-num">Module 3.1</div>
                <h3>Lord Rayleigh's Resolution Criterion</h3>
                <p>In classical wave optics, Lord Rayleigh established that two point light sources can be resolved if the central maximum of the Airy diffraction disk of one coincides with the first minimum of the other.</p>
                <p>In semiconductor lithography, Rayleigh's criterion is adapted to predict minimum printed Critical Dimension (CD): $CD = k_1 \frac{\lambda}{NA}$. Here, $k_1$ is a dimensionless process factor reflecting the sophistication of the resist, illumination, and optical correction technology.</p>
                <ul>
                    <li><strong>Physical Limit ($k_1 = 0.25$):</strong> Theoretical limit for single-exposure coherent optics.</li><li><strong>Modern Production ($k_1 \sim 0.28 - 0.35$):</strong> Aggressive sub-wavelength patterning regime.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$CD = k_1 \cdot \frac{\lambda}{NA} \quad \implies \quad k_1 = \frac{CD \cdot NA}{\lambda}$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 3.2</div>
                <h3>Depth of Focus (DOF) & The Lithographer's Dilemma</h3>
                <p>While increasing Numerical Aperture ($NA$) shrinks CD linearly, it extracts a brutal penalty on Depth of Focus ($DOF$). Rayleigh's second equation shows that $DOF$ scales inversely with the SQUARE of the numerical aperture: $DOF = k_2 \frac{\lambda}{NA^2}$.</p>
                <p>This creates 'The Lithographer's Dilemma': boosting NA to print smaller transistors drastically flattens the focal plane down to tens of nanometers. If the wafer has even slight topography or warpage, circuits defocus into blurred blobs.</p>
                <ul>
                    <li><strong>Depth of Focus ($DOF$):</strong> Axial focal tolerance over which CD remains within $\pm 10\%$.</li><li><strong>Quadratic Penalty ($NA^2$):</strong> Doubling NA cuts depth of focus by a factor of 4.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$DOF = k_2 \cdot \frac{\lambda}{NA^2} = k_2 \cdot \frac{\lambda}{n^2 \sin^2\theta}$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 3.3</div>
                <h3>Coherence, Wavefront Error & Zernike Polynomials</h3>
                <p>Real-world lenses are imperfect. Wavefront deviations from ideal spherical waves degrade contrast and cause feature distortion. Optical aberrations are decomposed mathematically into orthogonal Zernike polynomials ($Z_n^m$).</p>
                <p>Key aberrations include spherical aberration ($Z_4^0$), coma ($Z_3^{\pm 1}$, causing left-right pattern asymmetry), and astigmatism ($Z_2^{\pm 2}$, causing horizontal vs. vertical line CD divergence). Advanced scanners utilize active optical manipulators that deform lens elements dynamically to nullify aberrations.</p>
                <ul>
                    <li><strong>Wavefront Aberration Function ($W(
ho,\theta)$):</strong> Phase deviation across the exit pupil.</li><li><strong>Zernike Decomposition:</strong> Orthogonal expansion isolating tilt, defocus, astigmatism, coma, and spherical error.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$W(\rho,\theta) = \sum_{j=1}^\infty c_j \cdot Z_j(\rho,\theta) \quad (\text{RMS Wavefront Error: } \sigma_W \le \lambda / 150)$$
            </div>
        </div>
    </div>
    <!-- Lab 3 -->
    <div class="lab-card" id="lab_lvl_3">
        <div class="lab-header">
            <div class="lab-tag">⚡ Interactive Laboratory L3</div>
            <div class="lab-title">Rayleigh CD & Depth of Focus Trade-Off Solver</div>
            <div class="lab-subtitle">Calculate minimum printed Critical Dimension (CD) and Depth of Focus (DOF) across varying NA and k1 process factors.</div>
        </div>
        <div class="lab-content">
            <div class="controls-grid">
                <div class="control-item">
                    <div class="ctrl-lbl"><span>Exposure Wavelength</span><span class="ctrl-val" id="lth_lam_l3_val">ArF Laser (193 nm)</span></div>
                    <input type="range" class="ctrl-slider" id="lth_lam_l3" min="0" max="100" step="1" value="ArF Laser (193 nm)" oninput="document.getElementById('lth_lam_l3_val').innerText = this.value + ''; updateLab_lithography_3();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>Numerical Aperture (NA)</span><span class="ctrl-val" id="lth_na_l3_val">0.9</span></div>
                    <input type="range" class="ctrl-slider" id="lth_na_l3" min="0.5" max="1.35" step="0.05" value="0.9" oninput="document.getElementById('lth_na_l3_val').innerText = this.value + ''; updateLab_lithography_3();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>Process Factor k1</span><span class="ctrl-val" id="lth_k1_l3_val">0.35</span></div>
                    <input type="range" class="ctrl-slider" id="lth_k1_l3" min="0.28" max="0.6" step="0.02" value="0.35" oninput="document.getElementById('lth_k1_l3_val').innerText = this.value + ''; updateLab_lithography_3();">
                </div>
            </div>
            <div class="canvas-box">
                <div style="font-size: 0.85rem; font-weight: 700; color: #10a37f; margin-bottom: 8px;">REAL-TIME SIMULATION TELEMETRY</div>
                <div style="flex:1; display:flex; align-items:center; justify-content:center; background:#04080d; border-radius:8px; border:1px dashed #1e293b; padding:16px; text-align:center;">
                    <div style="font-size:0.92rem; color:#94a3b8; max-width:440px;">
                        Interactive physics simulator running client-side transfer models, carrier drift-diffusion kinetics, and boundary potential solvers.
                    </div>
                </div>
                <div class="readout-grid">
            <div class="readout-item">
                <div class="ro-label">Printed Critical Dimension (CD)</div>
                <div class="ro-val" id="lth_cd_out_l3">75.1 nm</div>
            </div>            <div class="readout-item">
                <div class="ro-label">Usable Depth of Focus (DOF)</div>
                <div class="ro-val" id="lth_dof_out_l3">142.9 nm</div>
            </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Quiz 3 -->
    <div class="quiz-section">
        <div class="quiz-header">
            <div class="quiz-tag">🎓 Level 3 Examination</div>
            <div class="quiz-title">Level 3 Conceptual Mastery Assessment</div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l3_q1">
            <div class="quiz-q-text">According to the Rayleigh scaling equation, what happens to Depth of Focus (DOF) when you double the Numerical Aperture (NA)?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q1', 0)">A) Depth of Focus is reduced by a factor of 4 (drops to 25% of original)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q1', 1)">B) Depth of Focus doubles</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q1', 2)">C) Depth of Focus remains exactly the same</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q1', 3)">D) Depth of Focus increases to infinity</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l3_q1"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l3_q2">
            <div class="quiz-q-text">What is the theoretical physical lower limit of the process factor (k1) for a single optical exposure with coherent illumination?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q2', 0)">A) k1 = 0.25 (at which point only the 0th and one 1st diffraction orders can enter the pupil)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q2', 1)">B) k1 = 0.001</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q2', 2)">C) k1 = 1.00</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q2', 3)">D) k1 = 10.0</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l3_q2"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l3_q3">
            <div class="quiz-q-text">What optical aberration causes symmetrical horizontal and vertical transistor lines to focus at different axial focal planes?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q3', 0)">A) Astigmatism</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q3', 1)">B) Chromatic dispersion</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q3', 2)">C) Thermal blooming</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l3_q3', 3)">D) Poisson speckle</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l3_q3"></div>
        </div>
    </div>
    <!-- Certificate 3 -->
    <div class="cert-card">
        <div class="cert-info">
            <h4>Level 3 Completed: The Rayleigh Scaling Equations & DOF Mastery Certificate</h4>
            <p>Conferred for mastery of Level 3 (Academic Level 3 • Ages 14–18) curriculum, simulation laboratory, and assessment evaluation.</p>
        </div>
        <div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center;">
            <button class="cert-btn" onclick="generateCert(3)">View Credential 🎓</button>
            <button class="cert-btn" style="background:#10a37f; color:#fff;" onclick="switchLevel(4)">Advance to Level 4 &rarr;</button>
        </div>
    </div>
</div>

<!-- LEVEL 4: IMMERSION LITHOGRAPHY (ARFI) & HYPER-NA -->
<div class="level-container" id="level-4">
    <div class="level-header">
        <div>
            <div class="level-meta-badge">Academic Level 4 • Undergraduate (Freshman–Sophomore)</div>
            <div class="level-title">Immersion Lithography (ArFi) & Hyper-NA</div>
            <div class="level-subtitle">Discover how filling the lens gap with ultrapure water broke the NA = 1.0 barrier.</div>
        </div>
    </div>

    <div class="modules-grid">
        <div class="module-card">
            <div>
                <div class="module-num">Module 4.1</div>
                <h3>Breaking the Unity NA Limit ($NA &gt; 1.0$)</h3>
                <p>In dry lithography, the gap between the bottom lens element and the wafer is filled with air ($n=1.000$). Because $\sin\theta \le 1.0$, the maximum achievable numerical aperture was fundamentally capped below 1.0 (practically $\sim 0.93$).</p>
                <p>In 2003, Burn Lin and semiconductor pioneers introduced Immersion Lithography (ArFi). By injecting a film of ultrapure water (refractive index $n = 1.44$ at 193 nm) into the sub-millimeter gap between the final lens element and the wafer, the effective wavelength shrank to $\lambda / n = 134\,\text{nm}$!</p>
                <ul>
                    <li><strong>Ultrapure Water (UPW):</strong> Purified to $&lt; 1\,\text{ppt}$ dissolved organics with $n = 1.437$ at 193 nm.</li><li><strong>Hyper-NA ($NA = 1.35$):</strong> Boosted NA by $44\%$ without requiring a new laser wavelength.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\lambda_{\text{eff}} = \frac{\lambda_0}{n_{\text{fluid}}} \implies CD = k_1 \frac{\lambda_0}{n_{\text{fluid}} \sin\theta_{\max}} = k_1 \frac{\lambda_0}{NA}$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 4.2</div>
                <h3>Fluid Dynamics of the Immersion Hood</h3>
                <p>During scanning, the wafer stage accelerates at $15g$, traversing across the immersion hood at speeds exceeding 600 mm/sec. Maintaining a stable, bubble-free water meniscus without liquid loss requires sophisticated fluid containment.</p>
                <p>The immersion hood uses dual air-curtain seals and vacuum scavenging ports. If a single micro-droplet escapes ('droplet defect') or evaporates, evaporative cooling causes local thermal contraction ($\Delta T$) that induces nanometer-scale overlay distortion.</p>
                <ul>
                    <li><strong>Meniscus Stability:</strong> Dynamic contact angle engineering preventing fluid film rupture.</li><li><strong>Micro-Bubble Defectivity:</strong> Nanobubbles scattering 193nm laser light, printing false printed hole defects.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\text{Capillary Number } Ca = \frac{\mu \cdot v}{\gamma} \le Ca_{\text{crit}} \approx 0.05 \quad (\text{Meniscus Retention Limit})$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 4.3</div>
                <h3>Polarization Optics & Vector Diffraction</h3>
                <p>At hyper-NA angles ($NA = 1.35$), light rays converge at steep angles exceeding $70^\circ$. Under scalar diffraction theory, light is treated as simple scalar waves; at these extreme angles, full vector electromagnetic theory must be applied.</p>
                <p>Light polarized perpendicular to the plane of incidence (TE or s-polarized) interferes constructively with 100% contrast. Conversely, light polarized parallel to the plane of incidence (TM or p-polarized) has electric field vectors pointing in opposite directions, canceling interference and washing out image contrast to near zero!</p>
                <ul>
                    <li><strong>Azimuthal & Radial Polarization:</strong> Polarization manipulators aligning electric fields to maintain pure TE interference.</li><li><strong>Vector Image Contrast:</strong> $C = \frac{I_{\max} - I_{\min}}{I_{\max} + I_{\min}} \propto \cos(2\theta)$ for TM polarization.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\text{Interference Intensity: } I(\mathbf{r}) = |\mathbf{E}_1|^2 + |\mathbf{E}_2|^2 + 2(\mathbf{E}_1 \cdot \mathbf{E}_2)\cos(\Delta\phi)$$
            </div>
        </div>
    </div>
    <!-- Lab 4 -->
    <div class="lab-card" id="lab_lvl_4">
        <div class="lab-header">
            <div class="lab-tag">⚡ Interactive Laboratory L4</div>
            <div class="lab-title">Immersion ArFi vs Dry Scanner Simulator</div>
            <div class="lab-subtitle">Compare dry optical scanning vs immersion water ArFi across lens numerical aperture and TE/TM polarization contrast.</div>
        </div>
        <div class="lab-content">
            <div class="controls-grid">
                <div class="control-item">
                    <div class="ctrl-lbl"><span>Immersion Medium</span><span class="ctrl-val" id="lth_med_l4_val">Ultrapure Water (n = 1.44)</span></div>
                    <input type="range" class="ctrl-slider" id="lth_med_l4" min="0" max="100" step="1" value="Ultrapure Water (n = 1.44)" oninput="document.getElementById('lth_med_l4_val').innerText = this.value + ''; updateLab_lithography_4();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>Max Ray Angle theta (deg)</span><span class="ctrl-val" id="lth_theta_l4_val">68</span></div>
                    <input type="range" class="ctrl-slider" id="lth_theta_l4" min="45" max="72" step="1" value="68" oninput="document.getElementById('lth_theta_l4_val').innerText = this.value + ''; updateLab_lithography_4();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>Polarization State</span><span class="ctrl-val" id="lth_pol_l4_val">Linear TE (s-polarized)</span></div>
                    <input type="range" class="ctrl-slider" id="lth_pol_l4" min="0" max="100" step="1" value="Linear TE (s-polarized)" oninput="document.getElementById('lth_pol_l4_val').innerText = this.value + ''; updateLab_lithography_4();">
                </div>
            </div>
            <div class="canvas-box">
                <div style="font-size: 0.85rem; font-weight: 700; color: #10a37f; margin-bottom: 8px;">REAL-TIME SIMULATION TELEMETRY</div>
                <div style="flex:1; display:flex; align-items:center; justify-content:center; background:#04080d; border-radius:8px; border:1px dashed #1e293b; padding:16px; text-align:center;">
                    <div style="font-size:0.92rem; color:#94a3b8; max-width:440px;">
                        Interactive physics simulator running client-side transfer models, carrier drift-diffusion kinetics, and boundary potential solvers.
                    </div>
                </div>
                <div class="readout-grid">
            <div class="readout-item">
                <div class="ro-label">Effective Numerical Aperture (NA)</div>
                <div class="ro-val" id="lth_eff_na_l4">1.335 (Hyper-NA)</div>
            </div>            <div class="readout-item">
                <div class="ro-label">Optical Aerial Image Contrast</div>
                <div class="ro-val" id="lth_img_contrast_l4">96.4% (Ultra-High Contrast)</div>
            </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Quiz 4 -->
    <div class="quiz-section">
        <div class="quiz-header">
            <div class="quiz-tag">🎓 Level 4 Examination</div>
            <div class="quiz-title">Level 4 Conceptual Mastery Assessment</div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l4_q1">
            <div class="quiz-q-text">How does 193nm Immersion Lithography (ArFi) achieve a Numerical Aperture exceeding 1.0 (e.g. NA = 1.35)?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q1', 0)">A) By filling the working distance gap with ultrapure water (n = 1.44), shortening the optical wavelength inside the medium</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q1', 1)">B) By applying an anti-reflective fluoropolymer topcoat that eliminates diffraction orders</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q1', 2)">C) By frequency-doubling the ArF excimer laser beam to 96.5 nm via non-linear crystals</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q1', 3)">D) By operating the projection lens barrel in high-vacuum cryogenic conditions</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l4_q1"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l4_q2">
            <div class="quiz-q-text">Why does TM (p-polarized) light produce severely degraded aerial image contrast at hyper-NA angles (&gt; 60°)?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q2', 0)">A) Electric field vectors of interfering beams point in opposite directions, canceling out the interference term by cos(2θ)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q2', 1)">B) TM light burns holes in the silicon wafer</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q2', 2)">C) Water absorbs TM light completely within 1 nanometer</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q2', 3)">D) The scanner lens rotates backward under TM light</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l4_q2"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l4_q3">
            <div class="quiz-q-text">What defect mechanism occurs if the immersion fluid hood loses liquid during high-speed stage scanning?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q3', 0)">A) Escaped water droplets leave watermark stain defects and cause localized thermal evaporative cooling distortion</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q3', 1)">B) The wafer catches fire from friction</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q3', 2)">C) The cleanroom ceiling collapses from humidity</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l4_q3', 3)">D) The laser shuts down permanently</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l4_q3"></div>
        </div>
    </div>
    <!-- Certificate 4 -->
    <div class="cert-card">
        <div class="cert-info">
            <h4>Level 4 Completed: Immersion Lithography (ArFi) & Hyper-NA Mastery Certificate</h4>
            <p>Conferred for mastery of Level 4 (Academic Level 4 • Undergraduate (Freshman–Sophomore)) curriculum, simulation laboratory, and assessment evaluation.</p>
        </div>
        <div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center;">
            <button class="cert-btn" onclick="generateCert(4)">View Credential 🎓</button>
            <button class="cert-btn" style="background:#10a37f; color:#fff;" onclick="switchLevel(5)">Advance to Level 5 &rarr;</button>
        </div>
    </div>
</div>

<!-- LEVEL 5: RESOLUTION ENHANCEMENT (RET) & COMPUTATIONAL LITHO -->
<div class="level-container" id="level-5">
    <div class="level-header">
        <div>
            <div class="level-meta-badge">Academic Level 5 • Advanced Undergraduate (Junior–Senior)</div>
            <div class="level-title">Resolution Enhancement (RET) & Computational Litho</div>
            <div class="level-subtitle">Master Optical Proximity Correction (OPC), phase-shift masks, and Source-Mask Optimization (SMO).</div>
        </div>
    </div>

    <div class="modules-grid">
        <div class="module-card">
            <div>
                <div class="module-num">Module 5.1</div>
                <h3>Optical Proximity Correction (OPC)</h3>
                <p>When printing features smaller than the wavelength of light, severe optical diffraction distorts the pattern. Square corners turn into rounded blobs, line ends pull back ('line-end shortening'), and isolated lines print significantly thinner than dense line arrays.</p>
                <p>Computational Optical Proximity Correction (OPC) pre-distorts the mask layout so the final printed image on the wafer matches the designer's intent. Algorithms add corner serifs, hammerhead line-end extensions, and sub-resolution assist features (SRAFs) that guide light without printing themselves.</p>
                <ul>
                    <li><strong>Sub-Resolution Assist Features (SRAFs):</strong> Narrow dummy chrome bars ($&lt; CD/2$) that scatter light to make isolated lines behave like dense lines.</li><li><strong>Line-End Shortening (LES):</strong> Diffraction pulling back line terminals, bridged using hammerheads.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\text{Target Mask } M(\mathbf{r}) = \mathcal{F}^{-1}\left[\frac{\mathcal{F}[I_{\text{target}}(\mathbf{r})]}{H(\mathbf{k})}\right]$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 5.2</div>
                <h3>Phase-Shift Masks (Attenuated & Alternating PSM)</h3>
                <p>Standard binary masks use chrome on quartz, creating binary transmission (100% or 0%) with constant optical phase ($0^\circ$). At feature boundaries, diffraction causes light to spill into dark regions, softening edge transitions.</p>
                <p>Phase-Shift Masks (PSM) etch the quartz plate or deposit molybdenum silicide (MoSi) to introduce a $180^\circ$ phase shift in adjacent apertures. When light waves from adjacent apertures spill over, their opposite phases ($0^\circ$ and $180^\circ$) interfere destructively, forcing light intensity to absolute zero at the edge and doubling image contrast.</p>
                <ul>
                    <li><strong>Attenuated PSM (attPSM):</strong> 6% transmission MoSi layer providing $180^\circ$ phase shift for contact holes.</li><li><strong>Alternating PSM (altPSM):</strong> Etched quartz recesses forcing destructive interference between dense line pairs.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\Delta\phi = \frac{2\pi}{\lambda} (n_{\text{quartz}} - 1) \cdot d_{\text{etch}} = \pi \implies d_{\text{etch}} = \frac{\lambda}{2(n - 1)}$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 5.3</div>
                <h3>Source-Mask Optimization (SMO) & Inverse Litho (ILT)</h3>
                <p>Instead of using simple circular illumination, advanced scanners sculpt the illumination pupil into custom angular profiles: Annular, Dipole, Quadrupole, or Quasar Off-Axis Illumination (OAI). OAI directs light so zero and first diffraction orders symmetrically straddle the lens pupil.</p>
                <p>Source-Mask Optimization (SMO) co-optimizes the source pupil pixels and the photomask pattern simultaneously using massive GPU clusters. Inverse Lithography Technology (ILT) treats pattern transfer as an inverse mathematical problem, generating organic, curvilinear mask shapes that maximize process windows.</p>
                <ul>
                    <li><strong>Inverse Lithography (ILT):</strong> Gradient-based optimization solving full Maxwell equations for curvilinear masks.</li><li><strong>Off-Axis Illumination (OAI):</strong> Suppressing unscattered zero-order light to enhance high-pitch contrast.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\min_{S, M} \iint \left| \mathcal{I}[S, M](x,y) - I_{\text{target}}(x,y) \right|^2 dx\,dy + \alpha \cdot \text{EPE}_{\max}$$
            </div>
        </div>
    </div>
    <!-- Lab 5 -->
    <div class="lab-card" id="lab_lvl_5">
        <div class="lab-header">
            <div class="lab-tag">⚡ Interactive Laboratory L5</div>
            <div class="lab-title">OPC Assist Feature & Phase-Shift Destructive Solver</div>
            <div class="lab-subtitle">Simulate how adding Sub-Resolution Assist Features (SRAFs) and 180° phase shifts recovers aerial image contrast for isolated features.</div>
        </div>
        <div class="lab-content">
            <div class="controls-grid">
                <div class="control-item">
                    <div class="ctrl-lbl"><span>Target Feature Layout</span><span class="ctrl-val" id="lth_feat_type_l5_val">Isolated Line + SRAFs</span></div>
                    <input type="range" class="ctrl-slider" id="lth_feat_type_l5" min="0" max="100" step="1" value="Isolated Line + SRAFs" oninput="document.getElementById('lth_feat_type_l5_val').innerText = this.value + ''; updateLab_lithography_5();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>SRAF Bar Width (nm)</span><span class="ctrl-val" id="lth_sraf_cd_l5_val">25</span></div>
                    <input type="range" class="ctrl-slider" id="lth_sraf_cd_l5" min="15" max="45" step="5" value="25" oninput="document.getElementById('lth_sraf_cd_l5_val').innerText = this.value + ''; updateLab_lithography_5();">
                </div>
            </div>
            <div class="canvas-box">
                <div style="font-size: 0.85rem; font-weight: 700; color: #10a37f; margin-bottom: 8px;">REAL-TIME SIMULATION TELEMETRY</div>
                <div style="flex:1; display:flex; align-items:center; justify-content:center; background:#04080d; border-radius:8px; border:1px dashed #1e293b; padding:16px; text-align:center;">
                    <div style="font-size:0.92rem; color:#94a3b8; max-width:440px;">
                        Interactive physics simulator running client-side transfer models, carrier drift-diffusion kinetics, and boundary potential solvers.
                    </div>
                </div>
                <div class="readout-grid">
            <div class="readout-item">
                <div class="ro-label">Normalized Image Log-Slope (NILS)</div>
                <div class="ro-val" id="lth_nils_l5">2.42 (Robust Printability)</div>
            </div>            <div class="readout-item">
                <div class="ro-label">SRAF Sidelobe Ghost Print Risk</div>
                <div class="ro-val" id="lth_sraf_print_l5">ZERO (Sub-Resolution Suppressed)</div>
            </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Quiz 5 -->
    <div class="quiz-section">
        <div class="quiz-header">
            <div class="quiz-tag">🎓 Level 5 Examination</div>
            <div class="quiz-title">Level 5 Conceptual Mastery Assessment</div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l5_q1">
            <div class="quiz-q-text">What is the primary function of Sub-Resolution Assist Features (SRAFs) in Optical Proximity Correction (OPC)?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q1', 0)">A) They are non-printing dummy structures that scatter diffracted light to make isolated lines optically behave like dense line arrays</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q1', 1)">B) They are electrical wires connecting transistors together</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q1', 2)">C) They reinforce the glass mask against cracking under high laser power</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q1', 3)">D) They print alignment crosshairs for the human operator</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l5_q1"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l5_q2">
            <div class="quiz-q-text">How does an Alternating Phase-Shift Mask (altPSM) achieve infinite theoretical aerial image contrast at the boundary between two features?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q2', 0)">A) Light passing through adjacent apertures is 180° out of phase, causing complete destructive optical interference (intensity = 0) at the boundary</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q2', 1)">B) It uses dark black paint that absorbs 100% of light</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q2', 2)">C) It places a diamond knife between apertures</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q2', 3)">D) It polarizes light into circularly polarized radio waves</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l5_q2"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l5_q3">
            <div class="quiz-q-text">What metric quantifies the optical quality and sharpness of an aerial image in lithographic process modeling?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q3', 0)">A) Normalized Image Log-Slope (NILS)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q3', 1)">B) Brinell hardness number</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q3', 2)">C) Megasonic acoustic decibel level</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l5_q3', 3)">D) Wafer weight in grams</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l5_q3"></div>
        </div>
    </div>
    <!-- Certificate 5 -->
    <div class="cert-card">
        <div class="cert-info">
            <h4>Level 5 Completed: Resolution Enhancement (RET) & Computational Litho Mastery Certificate</h4>
            <p>Conferred for mastery of Level 5 (Academic Level 5 • Advanced Undergraduate (Junior–Senior)) curriculum, simulation laboratory, and assessment evaluation.</p>
        </div>
        <div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center;">
            <button class="cert-btn" onclick="generateCert(5)">View Credential 🎓</button>
            <button class="cert-btn" style="background:#10a37f; color:#fff;" onclick="switchLevel(6)">Advance to Level 6 &rarr;</button>
        </div>
    </div>
</div>

<!-- LEVEL 6: MULTI-PATTERNING PITCH DIVISION: SADP & SAQP -->
<div class="level-container" id="level-6">
    <div class="level-header">
        <div>
            <div class="level-meta-badge">Academic Level 6 • Master of Science (M.S.) & Graduate</div>
            <div class="level-title">Multi-Patterning Pitch Division: SADP & SAQP</div>
            <div class="level-subtitle">Formulate pitch division: LELE, Self-Aligned Double Patterning (SADP), and Quadruple Patterning (SAQP).</div>
        </div>
    </div>

    <div class="modules-grid">
        <div class="module-card">
            <div>
                <div class="module-num">Module 6.1</div>
                <h3>Litho-Etch-Litho-Etch (LELE) & Overlay Limits</h3>
                <p>When immersion lithography reached its single-exposure pitch limit ($P = \lambda / NA \approx 80\,\text{nm}$), engineers split dense circuit patterns onto two separate masks: Mask A and Mask B. Wafers undergo Litho-Etch-Litho-Etch (LELE).</p>
                <p>However, LELE is plagued by overlay error ($\Delta x$). If Mask B shifts by even 1.5 nm relative to Mask A, alternate spaces become wide and narrow ('pitch walking'). At sub-20nm pitches, overlay requirements exceeded scanner mechanical stage precision.</p>
                <ul>
                    <li><strong>Pitch Walking:</strong> Asymmetry in alternating spaces caused by mask-to-mask overlay error.</li><li><strong>Overlay Budget:</strong> Maximum allowable alignment registration error between layers ($&lt; 2.0\,\text{nm}$).</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\text{LELE Half-Pitch: } HP = \frac{P_{\text{single}}}{2} \quad (\text{Overlay Tolerance: } 3\sigma_{\text{overlay}} \le \frac{HP}{5})$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 6.2</div>
                <h3>Self-Aligned Double Patterning (SADP)</h3>
                <p>Self-Aligned Double Patterning (SADP) eliminated lithographic overlay error by replacing the second exposure with chemical deposition and etching. First, a sacrificial mandrel line is patterned using standard lithography.</p>
                <p>Next, a conformal spacer film (e.g. ALD $SiO_2$ or $Si_3N_4$) is deposited with atomic precision over the mandrel. An anisotropic dry etch strips the top and bottom horizontal spacer films, leaving vertical spacer 'sidewalls' hugging the mandrel. Finally, the mandrel is selectively dissolved, doubling line density without any overlay error!</p>
                <ul>
                    <li><strong>Mandrel & Spacer:</strong> Sacrificial core line whose sidewalls template conformal spacer deposition.</li><li><strong>Self-Aligned Perfection:</strong> Pitch is determined strictly by ALD deposition thickness, not optical alignment.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\text{Final Line Width } CD = t_{\text{ALD}} \quad \text{and} \quad P_{\text{final}} = \frac{1}{2} P_{\text{mandrel}}$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 6.3</div>
                <h3>Self-Aligned Quadruple Patterning (SAQP) & Edge Placement Error (EPE)</h3>
                <p>For 10nm and 7nm FinFETs, the industry repeated the spacer process twice: Self-Aligned Quadruple Patterning (SAQP). Repeating the mandrel-spacer sequence splits the original lithography pitch by a factor of 4, printing 16nm pitch fins using 193nm immersion light!</p>
                <p>However, continuous lines must be sliced into functional transistors using 'cut' or 'block' masks. The ultimate yield-limiting metric is Edge Placement Error (EPE)—the statistical sum of lithographic CD variation, line edge roughness, and cut-mask overlay errors.</p>
                <ul>
                    <li><strong>Pitch Quadrupling:</strong> Converting an $80\,\text{nm}$ litho pitch down to a $20\,\text{nm}$ fin pitch.</li><li><strong>Edge Placement Error (EPE):</strong> $EPE = \frac{\Delta CD}{2} + \text{Overlay} + \frac{\text{LER}}{2} \le \text{Margin}$.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$EPE = \sqrt{\left(\frac{3\sigma_{CD}}{2}\right)^2 + (3\sigma_{\text{overlay}})^2 + \left(\frac{3\sigma_{\text{LER}}}{2}\right)^2} \le \frac{Space}{2}$$
            </div>
        </div>
    </div>
    <!-- Lab 6 -->
    <div class="lab-card" id="lab_lvl_6">
        <div class="lab-header">
            <div class="lab-tag">⚡ Interactive Laboratory L6</div>
            <div class="lab-title">SADP / SAQP Pitch Division & EPE Budget Solver</div>
            <div class="lab-subtitle">Calculate final pitch and evaluate Edge Placement Error (EPE) margins comparing single exposure, SADP, and SAQP flows.</div>
        </div>
        <div class="lab-content">
            <div class="controls-grid">
                <div class="control-item">
                    <div class="ctrl-lbl"><span>Patterning Scheme</span><span class="ctrl-val" id="lth_flow_l6_val">SAQP Quad Patterning (Pitch 20nm)</span></div>
                    <input type="range" class="ctrl-slider" id="lth_flow_l6" min="0" max="100" step="1" value="SAQP Quad Patterning (Pitch 20nm)" oninput="document.getElementById('lth_flow_l6_val').innerText = this.value + ''; updateLab_lithography_6();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>Scanner Overlay Error (nm)</span><span class="ctrl-val" id="lth_overlay_l6_val">1.6</span></div>
                    <input type="range" class="ctrl-slider" id="lth_overlay_l6" min="0.8" max="3.5" step="0.1" value="1.6" oninput="document.getElementById('lth_overlay_l6_val').innerText = this.value + ''; updateLab_lithography_6();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>ALD Spacer Thickness Uniformity (nm)</span><span class="ctrl-val" id="lth_ald_ctrl_l6_val">0.3</span></div>
                    <input type="range" class="ctrl-slider" id="lth_ald_ctrl_l6" min="0.1" max="1.0" step="0.1" value="0.3" oninput="document.getElementById('lth_ald_ctrl_l6_val').innerText = this.value + ''; updateLab_lithography_6();">
                </div>
            </div>
            <div class="canvas-box">
                <div style="font-size: 0.85rem; font-weight: 700; color: #10a37f; margin-bottom: 8px;">REAL-TIME SIMULATION TELEMETRY</div>
                <div style="flex:1; display:flex; align-items:center; justify-content:center; background:#04080d; border-radius:8px; border:1px dashed #1e293b; padding:16px; text-align:center;">
                    <div style="font-size:0.92rem; color:#94a3b8; max-width:440px;">
                        Interactive physics simulator running client-side transfer models, carrier drift-diffusion kinetics, and boundary potential solvers.
                    </div>
                </div>
                <div class="readout-grid">
            <div class="readout-item">
                <div class="ro-label">Final Interconnect Pitch</div>
                <div class="ro-val" id="lth_fin_pitch_l6">20.0 nm</div>
            </div>            <div class="readout-item">
                <div class="ro-label">Total Edge Placement Error (EPE)</div>
                <div class="ro-val" id="lth_epe_budget_l6">2.48 nm (YIELD SECURE)</div>
            </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Quiz 6 -->
    <div class="quiz-section">
        <div class="quiz-header">
            <div class="quiz-tag">🎓 Level 6 Examination</div>
            <div class="quiz-title">Level 6 Conceptual Mastery Assessment</div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l6_q1">
            <div class="quiz-q-text">Why does Self-Aligned Double Patterning (SADP) eliminate pitch walking caused by optical scanner overlay error?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q1', 0)">A) Final feature positions and line widths are dictated by conformal ALD spacer thickness and mandrel sidewalls, requiring zero second optical exposure alignment</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q1', 1)">B) SADP uses invisible laser beams that cannot miss</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q1', 2)">C) SADP replaces photolithography with mechanical diamond stamping</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q1', 3)">D) SADP freezes the wafer so it cannot shift</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l6_q1"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l6_q2">
            <div class="quiz-q-text">What is the role of a 'cut' (or 'block') mask in multi-patterning (SADP/SAQP) integration?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q2', 0)">A) Chopping long, continuous parallel dummy spacer lines into distinct, functional transistor gates and source/drain segments</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q2', 1)">B) Slicing the silicon wafer into round pieces</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q2', 2)">C) Cutting the electrical power cables in the fab</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q2', 3)">D) Trimming the edge bead off the wafer rim</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l6_q2"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l6_q3">
            <div class="quiz-q-text">What composite metric defines the complete probability that a via contact will fail to land on its underlying metal wire due to accumulated lithography, overlay, and etch errors?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q3', 0)">A) Edge Placement Error (EPE)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q3', 1)">B) Modulation Transfer Function (MTF)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q3', 2)">C) Total Indicating Reading (TIR)</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l6_q3', 3)">D) Dielectric breakdown voltage</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l6_q3"></div>
        </div>
    </div>
    <!-- Certificate 6 -->
    <div class="cert-card">
        <div class="cert-info">
            <h4>Level 6 Completed: Multi-Patterning Pitch Division: SADP & SAQP Mastery Certificate</h4>
            <p>Conferred for mastery of Level 6 (Academic Level 6 • Master of Science (M.S.) & Graduate) curriculum, simulation laboratory, and assessment evaluation.</p>
        </div>
        <div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center;">
            <button class="cert-btn" onclick="generateCert(6)">View Credential 🎓</button>
            <button class="cert-btn" style="background:#10a37f; color:#fff;" onclick="switchLevel(7)">Advance to Level 7 &rarr;</button>
        </div>
    </div>
</div>

<!-- LEVEL 7: EXTREME ULTRAVIOLET (EUV 13.5NM) & HIGH-NA 0.55 -->
<div class="level-container" id="level-7">
    <div class="level-header">
        <div>
            <div class="level-meta-badge">Academic Level 7 • Ph.D., Research Scientist & Technical Fellow</div>
            <div class="level-title">Extreme Ultraviolet (EUV 13.5nm) & High-NA 0.55</div>
            <div class="level-subtitle">Architect High-NA anamorphic 0.55 optics, Mo/Si Bragg reflection mirrors, and 3D EUV mask physics.</div>
        </div>
    </div>

    <div class="modules-grid">
        <div class="module-card">
            <div>
                <div class="module-num">Module 7.1</div>
                <h3>EUV Physics: Laser-Produced Plasma & Bragg Optics</h3>
                <p>Extreme Ultraviolet (EUV) light at 13.5 nm is absorbed by literally all matter—including air and optical glass. EUV scanners operate under high vacuum using reflective optics rather than transmission lenses.</p>
                <p>Light is generated by dropping molten tin droplets ($25\,\mu\text{m}$ diameter) at 50,000 droplets/sec and blasting them twice with high-power pulsed $CO_2$ lasers (pre-pulse to pancake, main pulse to ignite a 400,000°C tin plasma emitting 13.5nm photons). The light is collected by molybdenum-silicon (Mo/Si) multilayer Bragg mirrors (40 to 50 bilayers, each $6.8\,\text{nm}$ thick, reflecting $\sim 70\%$ at normal incidence).</p>
                <ul>
                    <li><strong>Laser-Produced Plasma (LPP):</strong> Blasting 50,000 tin droplets/sec with pulsed $CO_2$ lasers to emit 13.5nm light.</li><li><strong>Mo/Si Bragg Multilayers:</strong> Alternating nanometer layers exploiting constructive interference to achieve $70\%$ reflectivity.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\text{Bragg Condition: } m\lambda = 2d \sqrt{n^2 - \cos^2\theta} \quad (d_{\text{Mo/Si}} \approx 6.8\,\text{nm})$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 7.2</div>
                <h3>High-NA EUV (0.55 NA) & Anamorphic Magnification</h3>
                <p>To scale beyond 2nm logic without quadruple EUV multi-patterning, ASML developed High-NA EUV, increasing the numerical aperture from 0.33 to 0.55. However, at $0.55\,NA$, ray angles on the reflective photomask exceed $11^\circ$, causing severe 3D mask shadowing from the thick absorber.</p>
                <p>To overcome mask shadowing without requiring wafer field size shrinkage, optical designers invented Anamorphic Magnification: the optical reduction is $4\times$ in the horizontal ($X$) axis, but $8\times$ in the vertical ($Y$) axis! This cuts ray angles on the mask in half along the critical pitch axis while splitting standard exposure fields in half ('half-field' $26\,\text{mm} \times 16.5\,\text{mm}$).</p>
                <ul>
                    <li><strong>Anamorphic Magnification ($4	imes_X / 8	imes_Y$):</strong> Asymmetric reduction preserving mask ray angles below $6^\circ$.</li><li><strong>Half-Field Stitching:</strong> Exposing large AI accelerator chips ($&gt; 400\,\text{mm}^2$) by stitching two adjacent half-fields seamlessly.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$M_X = \frac{1}{4} \quad \text{and} \quad M_Y = \frac{1}{8} \implies CD_{\min} = 0.30 \cdot \frac{13.5\,\text{nm}}{0.55} \approx 7.3\,\text{nm}$$
            </div>
        </div>
        <div class="module-card">
            <div>
                <div class="module-num">Module 7.3</div>
                <h3>3D Mask Effects, Low-n Absorbers & Pellicles</h3>
                <p>Traditional EUV masks use 60nm thick tantalum-based absorbers ($TaN/TaBO$). Because absorber thickness exceeds wavelength by nearly five times ($60\,\text{nm} / 13.5\,\text{nm} &gt; 4.4$), light passing through trenches undergoes complex waveguide transmission, creating phase shifts, telecentricity errors, and best-focus shifts through pitch.</p>
                <p>High-NA EUV transitions to 'Low-n' or attenuated Phase-Shift EUV masks using ruthenium ($Ru$), cobalt ($Co$), or platinum ($Pt$) alloys with refractive index $n &lt; 0.90$. These materials attenuate light via destructive phase interference at half the physical thickness ($&lt; 30\,\text{nm}$), completely eradicating 3D shadowing and non-telecentric overlay drift.</p>
                <ul>
                    <li><strong>Low-n Absorber Materials:</strong> Sub-30nm Ru/Co alloys providing phase-shift contrast without mask shadow.</li><li><strong>Carbon Nanotube (CNT) Pellicle:</strong> Ultra-thin freestanding membrane transmitting $&gt; 90\%$ EUV while blocking particles.</li>
                </ul>
            </div>
            <div class="formula-box">
                $$\text{Shadowing Width } w_{\text{shadow}} = h_{\text{absorber}} \cdot \tan\theta_{\text{mask}} \quad (\theta_{\text{mask}} = \arcsin(NA_{\text{wafer}} / M))$$
            </div>
        </div>
    </div>
    <!-- Lab 7 -->
    <div class="lab-card" id="lab_lvl_7">
        <div class="lab-header">
            <div class="lab-tag">⚡ Interactive Laboratory L7</div>
            <div class="lab-title">High-NA EUV 0.55 Anamorphic Field & Shadowing Solver</div>
            <div class="lab-subtitle">Calculate mask incident angles, shadowing width, and half-field exposure stitching overhead comparing 0.33 NA vs 0.55 NA High-NA systems.</div>
        </div>
        <div class="lab-content">
            <div class="controls-grid">
                <div class="control-item">
                    <div class="ctrl-lbl"><span>EUV Scanner Generation</span><span class="ctrl-val" id="lth_na_gen_l7_val">0.55 NA High-NA EUV (EXE:5000)</span></div>
                    <input type="range" class="ctrl-slider" id="lth_na_gen_l7" min="0" max="100" step="1" value="0.55 NA High-NA EUV (EXE:5000)" oninput="document.getElementById('lth_na_gen_l7_val').innerText = this.value + ''; updateLab_lithography_7();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>Mask Absorber Class</span><span class="ctrl-val" id="lth_abs_mat_l7_val">Low-n Ruthenium Alloy (28 nm, Zero Shadow)</span></div>
                    <input type="range" class="ctrl-slider" id="lth_abs_mat_l7" min="0" max="100" step="1" value="Low-n Ruthenium Alloy (28 nm, Zero Shadow)" oninput="document.getElementById('lth_abs_mat_l7_val').innerText = this.value + ''; updateLab_lithography_7();">
                </div>                <div class="control-item">
                    <div class="ctrl-lbl"><span>Die Height in Y-axis (mm)</span><span class="ctrl-val" id="lth_chip_y_l7_val">22</span></div>
                    <input type="range" class="ctrl-slider" id="lth_chip_y_l7" min="10" max="32" step="1" value="22" oninput="document.getElementById('lth_chip_y_l7_val').innerText = this.value + ''; updateLab_lithography_7();">
                </div>
            </div>
            <div class="canvas-box">
                <div style="font-size: 0.85rem; font-weight: 700; color: #10a37f; margin-bottom: 8px;">REAL-TIME SIMULATION TELEMETRY</div>
                <div style="flex:1; display:flex; align-items:center; justify-content:center; background:#04080d; border-radius:8px; border:1px dashed #1e293b; padding:16px; text-align:center;">
                    <div style="font-size:0.92rem; color:#94a3b8; max-width:440px;">
                        Interactive physics simulator running client-side transfer models, carrier drift-diffusion kinetics, and boundary potential solvers.
                    </div>
                </div>
                <div class="readout-grid">
            <div class="readout-item">
                <div class="ro-label">Single-Exposure Resolution Limit</div>
                <div class="ro-val" id="lth_res_l7">7.36 nm (Sub-2nm Logic Ready)</div>
            </div>            <div class="readout-item">
                <div class="ro-label">Field Stitching Status</div>
                <div class="ro-val" id="lth_stitch_l7">STITCH REQUIRED: Die (22mm) > Half-Field (16.5mm)</div>
            </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Quiz 7 -->
    <div class="quiz-section">
        <div class="quiz-header">
            <div class="quiz-tag">🎓 Level 7 Examination</div>
            <div class="quiz-title">Level 7 Conceptual Mastery Assessment</div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l7_q1">
            <div class="quiz-q-text">Why does High-NA EUV (0.55 NA) utilize an anamorphic 4x_X / 8x_Y magnification lens rather than standard 4x symmetric reduction?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q1', 0)">A) An 8x vertical reduction halves the incident ray angles on the reflective mask, avoiding severe 3D absorber shadowing while keeping mask sizes standard</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q1', 1)">B) It makes computer screens wider</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q1', 2)">C) It halves the cost of the scanner</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q1', 3)">D) It uses half as much electricity</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l7_q1"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l7_q2">
            <div class="quiz-q-text">Why must all EUV optical trains operate inside high vacuum and utilize Mo/Si multilayer Bragg reflection mirrors instead of refractive glass lenses?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q2', 0)">A) 13.5nm EUV photons are intensely absorbed by all atmospheric gases and glass materials, requiring reflective interference mirrors</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q2', 1)">B) High vacuum keeps the machine quiet</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q2', 2)">C) Reflective mirrors are made of cheap aluminum foil</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q2', 3)">D) Air causes the tin droplet to explode too early</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l7_q2"></div>
        </div>
        <div class="quiz-q-wrap" id="q-lithography_l7_q3">
            <div class="quiz-q-text">What major operational advantage is provided by Low-n absorber materials (e.g. Ru or Co alloys) over legacy TaN in advanced EUV masks?</div>
            <div class="quiz-options">
                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q3', 0)">A) They achieve destructive phase cancellation with half the physical absorber thickness (&lt; 30nm), slashing 3D mask shadowing and telecentricity drift</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q3', 1)">B) They make the mask transparent to visible light</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q3', 2)">C) They can be wiped clean with alcohol and paper towels</button>                <button class="quiz-option" onclick="checkQuiz('lithography_l7_q3', 3)">D) They eliminate the need for pulsed CO2 lasers</button>
            </div>
            <div class="quiz-explanation" id="exp-lithography_l7_q3"></div>
        </div>
    </div>
    <!-- Certificate 7 -->
    <div class="cert-card">
        <div class="cert-info">
            <h4>Level 7 Completed: Extreme Ultraviolet (EUV 13.5nm) & High-NA 0.55 Mastery Certificate</h4>
            <p>Conferred for mastery of Level 7 (Academic Level 7 • Ph.D., Research Scientist & Technical Fellow) curriculum, simulation laboratory, and assessment evaluation.</p>
        </div>
        <div style="display:flex; gap:10px; flex-wrap:wrap; align-items:center;">
            <button class="cert-btn" onclick="generateCert(7)">View Credential 🎓</button>
            
        </div>
    </div>
    <!-- FELLOW MEDAL BOX -->
    <div class="fellow-medal-box">
        <div class="medal-icon">🏅</div>
        <div class="medal-title">Distinguished Fellow in Optical Nanopatterning & Extreme Ultraviolet Physics</div>
        <div class="medal-desc">
            Highest academic honor conferred by ChipFoundryServices OS for demonstrated mastery across all 7 curriculum tiers, interactive simulation laboratories, and verified examination standards.
        </div>
        <button class="cert-btn" style="background:#f59e0b; color:#000; font-weight:800;" onclick="generateCert(7)">Claim Fellowship Honors 📜</button>
    </div>
</div>
<!-- Certificate Modal -->
<div class="modal" id="certModal">
    <div class="modal-content">
        <button class="modal-close" onclick="closeCertModal()">&times;</button>
        <div style="font-size: 2.2rem; margin-bottom: 10px;">🎓</div>
        <div style="font-size: 0.8rem; font-weight: 800; color: #10a37f; text-transform: uppercase; letter-spacing: 1px;" id="certSubtitle">ACADEMIC CREDENTIAL</div>
        <h2 style="font-size: 1.6rem; color: #fff; margin: 8px 0 16px;" id="certTitle">Certificate of Mastery</h2>
        <p style="font-size: 0.95rem; color: #cbd5e1; line-height: 1.6; margin-bottom: 24px;" id="certDesc">For demonstrated proficiency in the curriculum modules, laboratory simulations, and assessment evaluations.</p>
        
        <div style="background: #080e16; border: 1px solid #1e293b; border-radius: 8px; padding: 14px; margin-bottom: 20px; font-size: 0.85rem; color: #94a3b8; text-align: left;">
            <div style="display:flex; justify-content:space-between; margin-bottom: 6px;">
                <span>Verification ID:</span>
                <span style="color: #34d399; font-family: monospace; font-weight: 700;" id="certHash">CFS-XXX-1-ABCD1234</span>
            </div>
            <div style="display:flex; justify-content:space-between; margin-bottom: 6px;">
                <span>Issuer:</span>
                <span style="color: #fff;">ChipFoundryServices OS Academy</span>
            </div>
            <div style="display:flex; justify-content:space-between;">
                <span>Date:</span>
                <span style="color: #fff;" id="certDate">September 2026</span>
            </div>
        </div>
        
        <button class="cert-btn" style="width: 100%;" onclick="window.print()">Print / Save PDF</button>
    </div>
</div></main>

<!-- Footer -->
<footer class="footer">
    <div style="max-width: 1200px; margin: 0 auto 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px;">
        <div>
            <h4 style="color: #fff; margin-bottom: 10px;">Transistor Pillars</h4>
            <div style="display: flex; flex-direction: column; gap: 6px; font-size: 0.83rem;">
                <a href="/pointcontact.php">Point Contact University</a>
                <a href="/junction.php">Junction University</a>
                <a href="/bipolar.php">Bipolar University</a>
                <a href="/fet.php">FET University</a>
                <a href="/planarprocess.php">Planar Process University</a>
                <a href="/finfet.php">FinFET University</a>
                <a href="/gaa.php">GAA University</a>
                <a href="/cfet.php">CFET University</a>
                <a href="/gateengineering.php">Gate Engineering University</a>
            </div>
        </div>
        <div>
            <h4 style="color: #fff; margin-bottom: 10px;">PPA+C Optimization</h4>
            <div style="display: flex; flex-direction: column; gap: 6px; font-size: 0.83rem;">
                <a href="/latencyengineering.php">Latency Engineering University</a>
                <a href="/powerengineering.php">Power Engineering University</a>
                <a href="/performanceengineering.php">Performance Engineering University</a>
                <a href="/areareduction.php">Area Reduction University</a>
                <a href="/costengineering.php">Cost Engineering University</a>
                <a href="/timetomarket.php">Time to Market Strategy University</a>
            </div>
        </div>
        <div>
            <h4 style="color: #fff; margin-bottom: 10px;">AI &amp; Data Systems</h4>
            <div style="display: flex; flex-direction: column; gap: 6px; font-size: 0.83rem;">
                <a href="/computing.php">Computing University</a>
                <a href="/datascience.php">Data Science University</a>
                <a href="/statistics.php">Statistics University</a>
                <a href="/materialscience.php">Material Science &amp; Eng Univ</a>
                <a href="/promptengineering.php">Prompt Engineering University</a>
                <a href="/featureengineering.php">Feature Engineering &amp; Reduction</a>
                <a href="/pca.php">PCA University</a>
                <a href="/contextengineering.php">Context Engineering University</a>
                <a href="/memoryengineering.php">Memory Engineering University</a>
                <a href="/graphengineering.php">Graph Engineering University</a>
            </div>
        </div>
        <div>
            <h4 style="color: #fff; margin-bottom: 10px;">Foundry &amp; Agentic AI</h4>
            <div style="display: flex; flex-direction: column; gap: 6px; font-size: 0.83rem;">
                <a href="/skillsengineering.php">Skills Engineering University</a>
                <a href="/harnessengineering.php">Harness Engineering University</a>
                <a href="/tagengineering.php">Tag Engineering University</a>
                <a href="/loopengineering.php">Loop Engineering University</a>
                <a href="/automation.php">Automation University</a>
                <a href="/pythonagentfoundry.php">Python Agent Foundry University</a>
                <a href="/waferfoundry.php">Wafer Foundry University</a>
            </div>
        </div>
        <div>
            <h4 style="color: #fff; margin-bottom: 10px;">Systems &amp; Languages</h4>
            <div style="display: flex; flex-direction: column; gap: 6px; font-size: 0.83rem;">
                <a href="/linuxprogramming.php">Linux Programming University</a>
                <a href="/cprogramming.php">C Programming University</a>
                <a href="/cppprogramming.php">C++ Programming University</a>
                <a href="/pythonprogramming.php">Python Programming University</a>
                <a href="/chipdesign.php">Chip Design University</a>
                <a href="/wafermanufacturing.php">Wafer Manufacturing University</a>
                <a href="/sandstosilicon.php">From Sands to Silicon University</a>
            </div>
        </div>
    </div>
    <p style="text-align: center; color: #64748b; font-size: 0.8rem; margin-top: 20px;">&copy; 2026 ChipFoundryServices.com &bull; The Global Benchmark in Transistor Science, VLSI Systems &amp; Autonomous EDA Intelligence.</p>
</footer>

<script>
function renderMath() {
    if (typeof renderMathInElement === 'function') {
        renderMathInElement(document.body, {
            delimiters: [
                {left: '$$', right: '$$', display: true},
                {left: '$', right: '$', display: false}
            ],
            throwOnError: false
        });
    }
    if (typeof katex === 'object' && typeof katex.render === 'function') {
        document.querySelectorAll('.formula-box').forEach(function(el) {
            if (!el.querySelector('.katex')) {
                var raw = el.innerText.trim();
                if (raw.startsWith('$$') && raw.endsWith('$$')) {
                    raw = raw.slice(2, -2).trim();
                } else if (raw.startsWith('$') && raw.endsWith('$')) {
                    raw = raw.slice(1, -1).trim();
                }
                if (raw) {
                    try {
                        katex.render(raw, el, { displayMode: true, throwOnError: false });
                    } catch(e) {
                        console.warn("KaTeX render fallback error:", e);
                    }
                }
            }
        });
    }
}

// Level Switcher
function switchLevel(lvl) {
    document.querySelectorAll('.level-container').forEach(function(el) { el.classList.remove('active'); });
    document.querySelectorAll('.level-btn').forEach(function(el) { el.classList.remove('active'); });
    var target = document.getElementById('level-' + lvl);
    if (target) target.classList.add('active');
    var btns = document.querySelectorAll('.level-btn');
    if (btns[lvl - 1]) btns[lvl - 1].classList.add('active');
    window.location.hash = 'level-' + lvl;
    window.scrollTo({ top: target.offsetTop - 120, behavior: 'smooth' });
    renderMath();
}

// Assessment Quiz Answers
var quizAnswers = {
    "lithography_l1_q1": {
        "correct": 0,
        "exp": "A photomask consists of high-purity quartz with patterned opaque absorber layers (e.g. chromium or MoSi) that define the spatial layout of circuit elements."
    },
    "lithography_l1_q2": {
        "correct": 0,
        "exp": "Diffraction limits resolution: smaller wavelengths ($\\lambda$) reduce diffraction spreading, directly enabling the printing of smaller critical dimensions ($CD \\propto \\lambda$)."
    },
    "lithography_l1_q3": {
        "correct": 0,
        "exp": "Standard industrial steppers and scanners use a $4\times$ reduction lens ($M = 1/4$), simplifying mask fabrication by allowing mask features to be 4 times larger than target wafer dimensions."
    },
    "lithography_l2_q1": {
        "correct": 0,
        "exp": "ArF excimer lasers excite argon ($Ar$) and fluorine ($F_2$) with high-voltage pulsed electrical discharge to form transient excited dimers ($ArF^*$) that emit at 193.3 nm upon dissociative decay."
    },
    "lithography_l2_q2": {
        "correct": 0,
        "exp": "A higher NA collects steeper diffracted wave vectors ($\theta_{\\max}$), reconstructing higher spatial frequencies and shrinking minimum critical dimensions."
    },
    "lithography_l2_q3": {
        "correct": 0,
        "exp": "Standard silicate glasses are opaque to deep UV ($< 200\\,\\text{nm}$); high-purity synthetic fused silica ($SiO_2$) and single-crystal calcium fluoride ($CaF_2$) are required for 193nm transmission."
    },
    "lithography_l3_q1": {
        "correct": 0,
        "exp": "Because $DOF = k_2 \\lambda / NA^2$, doubling the numerical aperture ($2\times$) quadruples the denominator ($4\times$), compressing the depth of focus down to one quarter."
    },
    "lithography_l3_q2": {
        "correct": 0,
        "exp": "At $k_1 = 0.25$, half-pitch equals $\\lambda / (4 \\cdot NA)$. For two-beam interference, this represents the absolute physical threshold where zero-order and one first-order diffraction beam can enter the lens pupil."
    },
    "lithography_l3_q3": {
        "correct": 0,
        "exp": "Astigmatism occurs when sagittal and tangential rays focus at different longitudinal positions, causing horizontal features to be in sharp focus while vertical features are blurred."
    },
    "lithography_l4_q1": {
        "correct": 0,
        "exp": "Ultrapure water has a refractive index $n = 1.437$ at 193 nm. Because $NA = n \\sin\theta$, the water medium allows ray angles that would otherwise undergo total internal reflection in air, pushing NA up to 1.35."
    },
    "lithography_l4_q2": {
        "correct": 0,
        "exp": "In vector interference, the cross term is proportional to $\\mathbf{E}_1 \\cdot \\mathbf{E}_2 = |\\mathbf{E}|^2 \\cos(2\theta)$. When $2\theta \u0007pprox 90^\\circ$ ($\theta \u0007pprox 45^\\circ$), the dot product drops to zero, destroying fringe contrast."
    },
    "lithography_l4_q3": {
        "correct": 0,
        "exp": "Un-scavenged immersion water droplets evaporate rapidly on the wafer, causing evaporative watermark stains, particle deposition, and local temperature drops that induce nanometer-scale overlay registration errors."
    },
    "lithography_l5_q1": {
        "correct": 0,
        "exp": "SRAFs are narrow features placed adjacent to isolated tracks; being below the resolution limit, they do not print themselves, but their diffracted light boosts image slope and depth of focus."
    },
    "lithography_l5_q2": {
        "correct": 0,
        "exp": "When electric fields with phases of $0^\\circ$ ($+E$) and $180^\\circ$ ($-E$) overlap in transition, the net electric field passes through zero, producing an intensity ($I = |E|^2$) of absolute zero."
    },
    "lithography_l5_q3": {
        "correct": 0,
        "exp": "NILS ($w \\cdot \frac{d\\ln I}{dx}$) normalizes the slope of the log-aerial image intensity at the nominal feature edge; higher NILS ($> 2.0$) guarantees wide exposure latitude."
    },
    "lithography_l6_q1": {
        "correct": 0,
        "exp": "In SADP, spacer loops are formed by depositing a conformal ALD film onto mandrel sidewalls; the spacer thickness $t_{ALD}$ alone defines the feature size, decoupling the critical dimension from optical overlay errors."
    },
    "lithography_l6_q2": {
        "correct": 0,
        "exp": "Spacer-based pitch division can only generate endless nested continuous loops; cut/block masks use secondary lithography exposures to excise unwanted line segments and define individual circuit gates."
    },
    "lithography_l6_q3": {
        "correct": 0,
        "exp": "Edge Placement Error (EPE) is the statistical vector sum of all process variations\u2014including mask errors, optical proximity errors, line edge roughness, and layer-to-layer overlay misregistration."
    },
    "lithography_l7_q1": {
        "correct": 0,
        "exp": "At $0.55\\,NA$, symmetric $4\times$ reduction would require ray angles $> 11^\\circ$ on the reflective mask, causing devastating shadowing. Doubling magnification to $8\times$ in $Y$ keeps mask ray angles below $6^\\circ$ without expanding mask size."
    },
    "lithography_l7_q2": {
        "correct": 0,
        "exp": "EUV light has photon energy of $91.8\\,\\text{eV}$, which is absorbed strongly by photoionization in all matter; hence, EUV requires high vacuum ($< 10^{-6}\\,\\text{Torr}$) and near-normal reflective Mo/Si Bragg interference mirrors."
    },
    "lithography_l7_q3": {
        "correct": 0,
        "exp": "Low-n materials ($n < 0.90$) utilize attenuated phase shifting; destructive interference between the absorber and clear areas allows a thin $< 30\\,\\text{nm}$ absorber to deliver high contrast without 3D geometric shadowing."
    }
};

function checkQuiz(qid, optIdx) {
    var a = quizAnswers[qid];
    if (!a) return;
    var container = document.getElementById('q-' + qid);
    if (!container) return;
    var btns = container.querySelectorAll('.quiz-option');
    btns.forEach(function(b, idx) {
        b.classList.remove('correct', 'incorrect');
        if (idx === a.correct) b.classList.add('correct');
        else if (idx === optIdx) b.classList.add('incorrect');
    });
    var exp = document.getElementById('exp-' + qid);
    if (exp) {
        exp.innerText = a.exp;
        exp.style.display = 'block';
        if (typeof renderMath === 'function') renderMath();
    }

}

// Certificate Data
var certData = {
    "1": {
        "title": "Drawing with Beams of Light Mastery Certificate",
        "sub": "Academic Level 1 Laureate",
        "desc": "Conferred for mastery of Level 1 (Academic Level 1 \u2022 Ages 6\u201310) curriculum, simulation laboratory, and assessment evaluation."
    },
    "2": {
        "title": "The Wavelength Roadmap: G-Line to DUV Mastery Certificate",
        "sub": "Academic Level 2 Laureate",
        "desc": "Conferred for mastery of Level 2 (Academic Level 2 \u2022 Ages 11\u201313) curriculum, simulation laboratory, and assessment evaluation."
    },
    "3": {
        "title": "The Rayleigh Scaling Equations & DOF Mastery Certificate",
        "sub": "Academic Level 3 Laureate",
        "desc": "Conferred for mastery of Level 3 (Academic Level 3 \u2022 Ages 14\u201318) curriculum, simulation laboratory, and assessment evaluation."
    },
    "4": {
        "title": "Immersion Lithography (ArFi) & Hyper-NA Mastery Certificate",
        "sub": "Academic Level 4 Laureate",
        "desc": "Conferred for mastery of Level 4 (Academic Level 4 \u2022 Undergraduate (Freshman\u2013Sophomore)) curriculum, simulation laboratory, and assessment evaluation."
    },
    "5": {
        "title": "Resolution Enhancement (RET) & Computational Litho Mastery Certificate",
        "sub": "Academic Level 5 Laureate",
        "desc": "Conferred for mastery of Level 5 (Academic Level 5 \u2022 Advanced Undergraduate (Junior\u2013Senior)) curriculum, simulation laboratory, and assessment evaluation."
    },
    "6": {
        "title": "Multi-Patterning Pitch Division: SADP & SAQP Mastery Certificate",
        "sub": "Academic Level 6 Laureate",
        "desc": "Conferred for mastery of Level 6 (Academic Level 6 \u2022 Master of Science (M.S.) & Graduate) curriculum, simulation laboratory, and assessment evaluation."
    },
    "7": {
        "title": "Extreme Ultraviolet (EUV 13.5nm) & High-NA 0.55 Mastery Certificate",
        "sub": "Academic Level 7 Laureate",
        "desc": "Conferred for mastery of Level 7 (Academic Level 7 \u2022 Ph.D., Research Scientist & Technical Fellow) curriculum, simulation laboratory, and assessment evaluation."
    }
};

function generateCert(lvl) {
    var d = certData[lvl];
    if (!d) return;
    document.getElementById('certTitle').innerText = d.title;
    document.getElementById('certSubtitle').innerText = d.sub;
    document.getElementById('certDesc').innerText = d.desc;
    
    var chars = '0123456789ABCDEF';
    var hash = 'CFS-LTH-' + lvl + '-';
    for (var i = 0; i < 8; i++) hash += chars[Math.floor(Math.random() * 16)];
    document.getElementById('certHash').innerText = hash;
    
    var date = new Date().toLocaleDateString('en-US', { month: 'long', year: 'numeric' });
    document.getElementById('certDate').innerText = date;
    
    document.getElementById('certModal').classList.add('active');
}

function closeCertModal() {
    document.getElementById('certModal').classList.remove('active');
}

// Simulation Laboratory Engines
function updateLab_lithography_1() {

                        const mask = parseFloat(document.getElementById('lth_mask_cd_l1').value);
                        const mag_str = document.getElementById('lth_mag_l1').value;
                        let factor = 4.0;
                        if (mag_str.includes('5x')) factor = 5.0;
                        if (mag_str.includes('8x')) factor = 8.0;
                        const wafer_cd = (mask / factor).toFixed(1);
                        document.getElementById('lth_wafer_cd_l1').textContent = wafer_cd + ' nm';
                        document.getElementById('lth_scale_l1').textContent = Math.round(80000 / wafer_cd) + 'x Thinner than Human Hair';
                    
}
function updateLab_lithography_2() {

                        const src = document.getElementById('lth_source_l2').value;
                        const na = parseFloat(document.getElementById('lth_na_l2').value);
                        let wl = 193.0;
                        if (src.includes('436')) wl = 436.0;
                        if (src.includes('365')) wl = 365.0;
                        if (src.includes('248')) wl = 248.0;
                        if (src.includes('13.5')) wl = 13.5;
                        
                        const ev = (1239.8 / wl).toFixed(2);
                        const cd = (0.4 * wl / na).toFixed(1);
                        document.getElementById('lth_energy_l2').textContent = ev + ' eV';
                        document.getElementById('lth_cd_l2').textContent = cd + ' nm';
                    
}
function updateLab_lithography_3() {

                        const lam_str = document.getElementById('lth_lam_l3').value;
                        const na = parseFloat(document.getElementById('lth_na_l3').value);
                        const k1 = parseFloat(document.getElementById('lth_k1_l3').value);
                        
                        let lam = 193.0;
                        if (lam_str.includes('248')) lam = 248.0;
                        if (lam_str.includes('13.5')) lam = 13.5;
                        
                        const cd = (k1 * lam / na).toFixed(1);
                        // Approximate k2 ~ 0.6
                        const dof = (0.6 * lam / (na * na)).toFixed(1);
                        document.getElementById('lth_cd_out_l3').textContent = cd + ' nm';
                        document.getElementById('lth_dof_out_l3').textContent = dof + ' nm';
                    
}
function updateLab_lithography_4() {

                        const med = document.getElementById('lth_med_l4').value;
                        const theta_deg = parseFloat(document.getElementById('lth_theta_l4').value);
                        const pol = document.getElementById('lth_pol_l4').value;
                        
                        let n = 1.00;
                        if (med.includes('1.44')) n = 1.437;
                        if (med.includes('1.65')) n = 1.650;
                        
                        const theta_rad = theta_deg * Math.PI / 180.0;
                        const na = (n * Math.sin(theta_rad)).toFixed(3);
                        
                        let contrast = 96.0;
                        if (pol.includes('TM')) {
                            // Cosine of 2*theta
                            contrast = (Math.abs(Math.cos(2 * theta_rad)) * 100).toFixed(1);
                        } else if (pol.includes('Unpolarized')) {
                            contrast = ((1 + Math.abs(Math.cos(2 * theta_rad))) * 50).toFixed(1);
                        }
                        document.getElementById('lth_eff_na_l4').textContent = na + ' (' + (na > 1.0 ? 'Hyper-NA' : 'Dry NA') + ')';
                        document.getElementById('lth_img_contrast_l4').textContent = contrast + '% Contrast';
                    
}
function updateLab_lithography_5() {

                        const feat = document.getElementById('lth_feat_type_l5').value;
                        const sraf = parseFloat(document.getElementById('lth_sraf_cd_l5').value);
                        
                        let nils = 1.15;
                        let risk = 'ZERO (Sub-Resolution Suppressed)';
                        if (feat.includes('Isolated Line (No OPC)')) {
                            nils = 1.10;
                            risk = 'POOR CONTRAST: Severe Line-End Pullback';
                        } else if (feat.includes('SRAFs')) {
                            nils = (2.1 + (sraf - 25) * 0.03).toFixed(2);
                            if (sraf > 35) risk = 'WARNING: SRAF Sidelobe Printing as Ghost Line!';
                        } else if (feat.includes('Alternating')) {
                            nils = 3.20;
                            risk = 'OPTIMUM: 180° Destructive Node';
                        } else if (feat.includes('ILT')) {
                            nils = 3.45;
                            risk = 'MAXIMUM NILS: Curvilinear Inverse Solution';
                        }
                        document.getElementById('lth_nils_l5').textContent = nils + ' NILS';
                        document.getElementById('lth_sraf_print_l5').textContent = risk;
                    
}
function updateLab_lithography_6() {

                        const flow = document.getElementById('lth_flow_l6').value;
                        const ovl = parseFloat(document.getElementById('lth_overlay_l6').value);
                        const ald = parseFloat(document.getElementById('lth_ald_ctrl_l6').value);
                        
                        let pitch = 20.0;
                        let epe = 2.48;
                        let state = 'YIELD SECURE';
                        if (flow.includes('Single Immersion')) {
                            pitch = 80.0;
                            epe = (ovl + 2.5).toFixed(2);
                        } else if (flow.includes('SADP')) {
                            pitch = 40.0;
                            epe = Math.sqrt(ovl*ovl + ald*ald*2 + 1.2).toFixed(2);
                        } else if (flow.includes('SAQP')) {
                            pitch = 20.0;
                            epe = Math.sqrt(ovl*ovl*1.4 + ald*ald*4 + 1.0).toFixed(2);
                            if (epe > 3.2) state = 'EDGE PLACEMENT ERROR: Cut Mask Shorts Via!';
                        } else if (flow.includes('EUV')) {
                            pitch = 30.0;
                            epe = Math.sqrt(ovl*ovl + 1.8).toFixed(2);
                        }
                        document.getElementById('lth_fin_pitch_l6').textContent = pitch + ' nm';
                        document.getElementById('lth_epe_budget_l6').textContent = epe + ' nm (' + state + ')';
                    
}
function updateLab_lithography_7() {

                        const gen = document.getElementById('lth_na_gen_l7').value;
                        const mat = document.getElementById('lth_abs_mat_l7').value;
                        const die_y = parseFloat(document.getElementById('lth_chip_y_l7').value);
                        
                        let na = 0.55;
                        let max_field_y = 16.5; // mm (half field)
                        if (gen.includes('0.33')) {
                            na = 0.33;
                            max_field_y = 33.0; // full field
                        } else if (gen.includes('0.75')) {
                            na = 0.75;
                            max_field_y = 11.0;
                        }
                        
                        const cd = (0.30 * 13.5 / na).toFixed(2);
                        let stitch = 'SINGLE FIELD: No Stitch Needed';
                        if (die_y > max_field_y) {
                            stitch = 'STITCH REQUIRED: Die (' + die_y + 'mm) > Field (' + max_field_y + 'mm)';
                        }
                        document.getElementById('lth_res_l7').textContent = cd + ' nm (Single-Exposure Limit)';
                        document.getElementById('lth_stitch_l7').textContent = stitch;
                    
}

// Initial setup on load
document.addEventListener('DOMContentLoaded', function() {
    renderMath();
    var mathRetries = 0;
    var mathInterval = setInterval(function() {
        mathRetries++;
        if (typeof katex !== 'undefined' || mathRetries > 10) {
            renderMath();
            if (typeof katex !== 'undefined' || mathRetries > 10) {
                clearInterval(mathInterval);
            }
        }
    }, 150);
    updateLab_lithography_1();
    updateLab_lithography_2();
    updateLab_lithography_3();
    updateLab_lithography_4();
    updateLab_lithography_5();
    updateLab_lithography_6();
    updateLab_lithography_7();
    
    var hash = window.location.hash;
    if (hash && hash.startsWith('#level-')) {
        var lvl = parseInt(hash.replace('#level-', ''), 10);
        if (lvl >= 1 && lvl <= 7) {
            switchLevel(lvl);
        }
    }
});
</script>
</body>
</html>
