Skip to content
LAM
Read Home Blog
Make Projects HTML Tools Games
Touch grass Notes Resume Links
Home Blog HTML Projects
Tools Games Notes Resume Links
Back Foundation Physics: Complete Course Physics
Download Open
Show description 2,391 chars · Physics

Foundation Physics: Complete Course

Foundation Physics: Complete Course




Foundation Physics

Complete Course: From Basic Concepts to Modern Physics



Physics Course Modules


Fundamentals & Units

Kinematics

Dynamics & Forces

Energy & Work

Momentum

Rotational Motion

Thermodynamics

Waves & Sound

Electricity

Magnetism

Light & Optics

Modern Physics

Glossary







Physics Fundamentals & Units


Physics is the study of matter, energy, and their interactions. Everything in physics builds from fundamental quantities and mathematical relationships.


SI Base Units




Quantity

Unit

Symbol

Dimension




Length

meter

m

[L]




Mass

kilogram

kg

[M]




Time

second

s

[T]




Electric Current

ampere

A

[I]




Temperature

kelvin

K

[Θ]




Amount of Substance

mole

mol

[N]




Luminous Intensity

candela

cd

[J]







Derived Units & Dimensional Analysis


Common Derived Units


Velocity: m/s = [L][T]^(-1)
Acceleration: m/s² = [L][T]^(-2)
Force: N = kg⋅m/s² = [M][L][T]^(-2)
Energy: J = N⋅m = kg⋅m²/s² = [M][L]²[T]^(-2)
Power: W = J/s = [M][L]²[T]^(-3)





Scientific Notation & Significant Figures


Scientific Notation: Express large/small numbers as a × 10^n where 1 ≤ a < 10

Examples:


Speed of light: c = 3.00 × 10⁸ m/s

Planck's constant: h = 6.626 × 10^(-34) J⋅s

Electron mass: m_e = 9.109 × 10^(-31) kg






Dimensional Analysis Tip: Always check that your equation's dimensions match on both sides. This catches most algebra mistakes and helps verify formula correctness.






Kinematics: Motion Without Forces


Kinematics describes motion using position, velocity, and acceleration without considering the forces that cause motion.


Basic Kinematic Variables


Position, Velocity, and Acceleration


Position: x(t)
Velocity: v = dx/dt
Acceleration: a = dv/dt = d²x/dt²



x = position (m)
v = velocity (m/s)
a = acceleration (m/s²)
t = time (s)





Kinematic Equations (Constant Acceleration)


The Big Four Kinematic Equations


v = v₀ + at
x = x₀ + v₀t + ½at²
v² = v₀² + 2a(x - x₀)
x = x₀ + ½(v₀ + v)t



v₀ = initial velocity
v = final velocity
a = acceleration (constant)
x₀ = initial position
x = final position
t = time






Example: Free Fall Problem

Problem: A ball is dropped from a height of 45 meters.…

Foundation Physics: Complete Course

56,364 bytes · HTML source
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Foundation Physics: Complete Course</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Georgia', 'Times New Roman', serif;
            background: linear-gradient(135deg, #000000 0%, #1a0f0a 50%, #000000 100%);
            color: #ffffff;
            line-height: 1.7;
            min-height: 100vh;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        h1 {
            text-align: center;
            color: #ff8c00;
            font-size: 3em;
            margin-bottom: 10px;
            text-shadow: 0 0 30px rgba(255, 140, 0, 0.6);
            font-weight: bold;
        }

        .subtitle {
            text-align: center;
            color: #ffa500;
            margin-bottom: 40px;
            font-size: 1.3em;
            font-style: italic;
        }

        .nav {
            background: rgba(26, 15, 10, 0.9);
            border: 2px solid #ff8c00;
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 35px;
            backdrop-filter: blur(10px);
            box-shadow: 0 0 20px rgba(255, 140, 0, 0.3);
        }

        .nav h2 {
            color: #ff8c00;
            margin-bottom: 20px;
            text-align: center;
            font-size: 1.5em;
        }

        .nav-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 15px;
        }

        .nav-item {
            background: linear-gradient(45deg, rgba(255, 140, 0, 0.1), rgba(255, 165, 0, 0.15));
            border: 1px solid #ff8c00;
            border-radius: 8px;
            padding: 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            font-weight: bold;
        }

        .nav-item:hover {
            background: linear-gradient(45deg, rgba(255, 140, 0, 0.2), rgba(255, 165, 0, 0.3));
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(255, 140, 0, 0.4);
        }

        .section {
            background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
            border: 2px solid #ff8c00;
            border-radius: 15px;
            padding: 35px;
            margin-bottom: 35px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        }

        h2 {
            color: #ff8c00;
            font-size: 2em;
            margin-bottom: 25px;
            border-bottom: 3px solid #ffa500;
            padding-bottom: 15px;
            text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
        }

        h3 {
            color: #ffa500;
            margin: 30px 0 20px 0;
            font-size: 1.4em;
            border-left: 4px solid #ff8c00;
            padding-left: 15px;
        }

        h4 {
            color: #ffb84d;
            margin: 25px 0 15px 0;
            font-size: 1.2em;
        }

        .formula-box {
            background: #000000;
            border: 2px solid #ff8c00;
            border-radius: 10px;
            padding: 25px;
            margin: 20px 0;
            text-align: center;
            box-shadow: inset 0 2px 10px rgba(255, 140, 0, 0.2);
        }

        .formula {
            font-size: 1.8em;
            color: #ffffff;
            font-family: 'Times New Roman', serif;
            margin: 10px 0;
            font-weight: bold;
        }

        .formula-name {
            color: #ffa500;
            font-size: 1.1em;
            margin-bottom: 10px;
            font-weight: bold;
        }

        .formula-vars {
            color: #ffb84d;
            font-size: 0.9em;
            margin-top: 10px;
            text-align: left;
            line-height: 1.4;
        }

        .concept-box {
            background: rgba(255, 140, 0, 0.1);
            border: 1px solid #ff8c00;
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
        }

        .law-box {
            background: linear-gradient(45deg, rgba(255, 140, 0, 0.15), rgba(255, 165, 0, 0.1));
            border: 2px solid #ff8c00;
            border-radius: 12px;
            padding: 25px;
            margin: 25px 0;
            box-shadow: 0 0 15px rgba(255, 140, 0, 0.3);
        }

        .law-title {
            color: #ff8c00;
            font-size: 1.3em;
            font-weight: bold;
            margin-bottom: 15px;
            text-align: center;
        }

        .example-box {
            background: #1a1a1a;
            border: 1px solid #ffa500;
            border-radius: 8px;
            padding: 20px;
            margin: 20px 0;
            border-left: 5px solid #ff8c00;
        }

        .example-title {
            color: #ffa500;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .warning {
            background: rgba(255, 69, 0, 0.15);
            border: 2px solid #ff4500;
            border-radius: 8px;
            padding: 15px;
            margin: 15px 0;
        }

        .warning::before {
            content: "⚠️ ";
            color: #ff6347;
        }

        .tip {
            background: rgba(255, 165, 0, 0.15);
            border: 1px solid #ffa500;
            border-radius: 8px;
            padding: 15px;
            margin: 15px 0;
        }

        .tip::before {
            content: "💡 ";
            color: #ffa500;
        }

        .units-table {
            background: #1a1a1a;
            border: 1px solid #ff8c00;
            border-radius: 8px;
            padding: 20px;
            margin: 20px 0;
            overflow-x: auto;
        }

        .units-table table {
            width: 100%;
            border-collapse: collapse;
        }

        .units-table th {
            background: #ff8c00;
            color: #000000;
            padding: 12px;
            font-weight: bold;
            border: 1px solid #ffa500;
        }

        .units-table td {
            padding: 10px;
            border: 1px solid #333333;
            color: #ffffff;
        }

        .units-table tr:nth-child(even) {
            background: rgba(255, 140, 0, 0.05);
        }

        .diagram {
            background: #000000;
            border: 2px solid #ff8c00;
            border-radius: 10px;
            padding: 25px;
            margin: 25px 0;
            text-align: center;
            font-family: monospace;
            color: #ffffff;
        }

        .vector {
            color: #ff8c00;
            font-weight: bold;
            font-size: 1.2em;
        }

        .force-arrow {
            color: #ffa500;
            font-size: 1.5em;
        }

        .glossary {
            background: rgba(26, 15, 10, 0.8);
            border-radius: 12px;
            padding: 25px;
            margin: 25px 0;
            border: 1px solid #ff8c00;
        }

        .glossary-term {
            color: #ff8c00;
            font-weight: bold;
            font-size: 1.1em;
            margin-top: 20px;
        }

        .glossary-def {
            color: #ffffff;
            margin-left: 25px;
            margin-bottom: 15px;
            line-height: 1.6;
        }

        .interactive {
            background: rgba(255, 140, 0, 0.1);
            border: 2px dashed #ff8c00;
            border-radius: 12px;
            padding: 25px;
            margin: 25px 0;
            text-align: center;
        }

        .button {
            background: linear-gradient(45deg, #ff8c00, #ffa500);
            color: #000000;
            border: none;
            padding: 12px 25px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1em;
            font-weight: bold;
            margin: 8px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
        }

        .button:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 12px rgba(255, 140, 0, 0.5);
        }

        .problem-steps {
            background: #1a1a1a;
            border-left: 4px solid #ff8c00;
            padding: 20px;
            margin: 20px 0;
        }

        .step {
            margin: 15px 0;
            padding-left: 20px;
        }

        .step-num {
            color: #ff8c00;
            font-weight: bold;
            font-size: 1.1em;
        }

        .footer {
            text-align: center;
            color: #888888;
            margin-top: 50px;
            padding: 25px;
            border-top: 2px solid #ff8c00;
        }

        .highlight {
            background: rgba(255, 140, 0, 0.3);
            padding: 2px 6px;
            border-radius: 4px;
            color: #ffffff;
            font-weight: bold;
        }

        p {
            margin-bottom: 15px;
        }

        ul, ol {
            margin: 15px 0;
            padding-left: 30px;
        }

        li {
            margin-bottom: 8px;
            color: #ffffff;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Foundation Physics</h1>
        <div class="subtitle">Complete Course: From Basic Concepts to Modern Physics</div>

        <div class="nav">
            <h2>Physics Course Modules</h2>
            <div class="nav-grid">
                <div class="nav-item" onclick="scrollToSection('fundamentals')">Fundamentals & Units</div>
                <div class="nav-item" onclick="scrollToSection('kinematics')">Kinematics</div>
                <div class="nav-item" onclick="scrollToSection('dynamics')">Dynamics & Forces</div>
                <div class="nav-item" onclick="scrollToSection('energy')">Energy & Work</div>
                <div class="nav-item" onclick="scrollToSection('momentum')">Momentum</div>
                <div class="nav-item" onclick="scrollToSection('rotation')">Rotational Motion</div>
                <div class="nav-item" onclick="scrollToSection('thermal')">Thermodynamics</div>
                <div class="nav-item" onclick="scrollToSection('waves')">Waves & Sound</div>
                <div class="nav-item" onclick="scrollToSection('electric')">Electricity</div>
                <div class="nav-item" onclick="scrollToSection('magnetism')">Magnetism</div>
                <div class="nav-item" onclick="scrollToSection('optics')">Light & Optics</div>
                <div class="nav-item" onclick="scrollToSection('modern')">Modern Physics</div>
                <div class="nav-item" onclick="scrollToSection('glossary')">Glossary</div>
            </div>
        </div>

        <div class="section" id="fundamentals">
            <h2>Physics Fundamentals & Units</h2>
            
            <p>Physics is the study of matter, energy, and their interactions. Everything in physics builds from fundamental quantities and mathematical relationships.</p>

            <h3>SI Base Units</h3>
            <div class="units-table">
                <table>
                    <tr>
                        <th>Quantity</th>
                        <th>Unit</th>
                        <th>Symbol</th>
                        <th>Dimension</th>
                    </tr>
                    <tr>
                        <td>Length</td>
                        <td>meter</td>
                        <td>m</td>
                        <td>[L]</td>
                    </tr>
                    <tr>
                        <td>Mass</td>
                        <td>kilogram</td>
                        <td>kg</td>
                        <td>[M]</td>
                    </tr>
                    <tr>
                        <td>Time</td>
                        <td>second</td>
                        <td>s</td>
                        <td>[T]</td>
                    </tr>
                    <tr>
                        <td>Electric Current</td>
                        <td>ampere</td>
                        <td>A</td>
                        <td>[I]</td>
                    </tr>
                    <tr>
                        <td>Temperature</td>
                        <td>kelvin</td>
                        <td>K</td>
                        <td>[Θ]</td>
                    </tr>
                    <tr>
                        <td>Amount of Substance</td>
                        <td>mole</td>
                        <td>mol</td>
                        <td>[N]</td>
                    </tr>
                    <tr>
                        <td>Luminous Intensity</td>
                        <td>candela</td>
                        <td>cd</td>
                        <td>[J]</td>
                    </tr>
                </table>
            </div>

            <h3>Derived Units & Dimensional Analysis</h3>
            <div class="formula-box">
                <div class="formula-name">Common Derived Units</div>
                <div class="formula">
                    Velocity: m/s = [L][T]^(-1)<br>
                    Acceleration: m/s² = [L][T]^(-2)<br>
                    Force: N = kg⋅m/s² = [M][L][T]^(-2)<br>
                    Energy: J = N⋅m = kg⋅m²/s² = [M][L]²[T]^(-2)<br>
                    Power: W = J/s = [M][L]²[T]^(-3)
                </div>
            </div>

            <h3>Scientific Notation & Significant Figures</h3>
            <div class="concept-box">
                <p><strong>Scientific Notation:</strong> Express large/small numbers as a × 10^n where 1 ≤ a < 10</p>
                <p><strong>Examples:</strong></p>
                <ul>
                    <li>Speed of light: c = 3.00 × 10⁸ m/s</li>
                    <li>Planck's constant: h = 6.626 × 10^(-34) J⋅s</li>
                    <li>Electron mass: m_e = 9.109 × 10^(-31) kg</li>
                </ul>
            </div>

            <div class="tip">
                <strong>Dimensional Analysis Tip:</strong> Always check that your equation's dimensions match on both sides. This catches most algebra mistakes and helps verify formula correctness.
            </div>
        </div>

        <div class="section" id="kinematics">
            <h2>Kinematics: Motion Without Forces</h2>
            
            <p>Kinematics describes motion using position, velocity, and acceleration without considering the forces that cause motion.</p>

            <h3>Basic Kinematic Variables</h3>
            <div class="formula-box">
                <div class="formula-name">Position, Velocity, and Acceleration</div>
                <div class="formula">
                    Position: x(t)<br>
                    Velocity: v = dx/dt<br>
                    Acceleration: a = dv/dt = d²x/dt²
                </div>
                <div class="formula-vars">
                    x = position (m)<br>
                    v = velocity (m/s)<br>
                    a = acceleration (m/s²)<br>
                    t = time (s)
                </div>
            </div>

            <h3>Kinematic Equations (Constant Acceleration)</h3>
            <div class="formula-box">
                <div class="formula-name">The Big Four Kinematic Equations</div>
                <div class="formula">
                    v = v₀ + at<br>
                    x = x₀ + v₀t + ½at²<br>
                    v² = v₀² + 2a(x - x₀)<br>
                    x = x₀ + ½(v₀ + v)t
                </div>
                <div class="formula-vars">
                    v₀ = initial velocity<br>
                    v = final velocity<br>
                    a = acceleration (constant)<br>
                    x₀ = initial position<br>
                    x = final position<br>
                    t = time
                </div>
            </div>

            <div class="example-box">
                <div class="example-title">Example: Free Fall Problem</div>
                <p><strong>Problem:</strong> A ball is dropped from a height of 45 meters. How long does it take to hit the ground?</p>
                
                <div class="problem-steps">
                    <div class="step">
                        <span class="step-num">Step 1:</span> Identify known values<br>
                        y₀ = 45 m, y = 0 m, v₀ = 0 m/s, a = -9.8 m/s²
                    </div>
                    <div class="step">
                        <span class="step-num">Step 2:</span> Choose appropriate equation<br>
                        y = y₀ + v₀t + ½at²
                    </div>
                    <div class="step">
                        <span class="step-num">Step 3:</span> Substitute and solve<br>
                        0 = 45 + 0 + ½(-9.8)t²<br>
                        -45 = -4.9t²<br>
                        t² = 45/4.9 = 9.18<br>
                        t = 3.03 seconds
                    </div>
                </div>
            </div>

            <h3>2D Projectile Motion</h3>
            <div class="formula-box">
                <div class="formula-name">Projectile Motion Components</div>
                <div class="formula">
                    Horizontal: x = v₀ₓt = v₀cos(θ)t<br>
                    Vertical: y = v₀ᵧt - ½gt² = v₀sin(θ)t - ½gt²<br>
                    Range: R = (v₀²sin(2θ))/g<br>
                    Max Height: H = (v₀²sin²(θ))/(2g)
                </div>
                <div class="formula-vars">
                    v₀ = initial speed<br>
                    θ = launch angle<br>
                    g = 9.8 m/s² (gravitational acceleration)<br>
                    R = horizontal range<br>
                    H = maximum height
                </div>
            </div>
        </div>

        <div class="section" id="dynamics">
            <h2>Dynamics: Forces and Newton's Laws</h2>
            
            <p>Dynamics explains why objects move by studying the forces acting on them. Newton's three laws form the foundation of classical mechanics.</p>

            <div class="law-box">
                <div class="law-title">Newton's First Law (Law of Inertia)</div>
                <p>An object at rest stays at rest, and an object in motion stays in motion at constant velocity, unless acted upon by a net external force.</p>
                <div class="formula">ΣF = 0 ⟹ a = 0</div>
            </div>

            <div class="law-box">
                <div class="law-title">Newton's Second Law</div>
                <p>The acceleration of an object is directly proportional to the net force and inversely proportional to its mass.</p>
                <div class="formula">ΣF = ma</div>
                <div class="formula-vars">
                    ΣF = net force (N)<br>
                    m = mass (kg)<br>
                    a = acceleration (m/s²)
                </div>
            </div>

            <div class="law-box">
                <div class="law-title">Newton's Third Law</div>
                <p>For every action, there is an equal and opposite reaction.</p>
                <div class="formula">F₁₂ = -F₂₁</div>
            </div>

            <h3>Common Forces</h3>
            <div class="formula-box">
                <div class="formula-name">Force Equations</div>
                <div class="formula">
                    Weight: W = mg<br>
                    Normal Force: N (perpendicular to surface)<br>
                    Friction: f = μN<br>
                    Spring Force: F = -kx<br>
                    Gravitational: F = G(m₁m₂)/r²
                </div>
                <div class="formula-vars">
                    μ = coefficient of friction<br>
                    k = spring constant (N/m)<br>
                    x = displacement from equilibrium<br>
                    G = 6.674 × 10^(-11) N⋅m²/kg²
                </div>
            </div>

            <div class="diagram">
Free Body Diagram Example:
<br><br>
                  <span class="force-arrow">↑</span> N (Normal Force)
<br>
        <span class="force-arrow">←</span> f  [BLOCK]  F <span class="force-arrow">→</span>
<br>
                  <span class="force-arrow">↓</span> mg (Weight)
<br><br>
Net Force: ΣF = F - f = ma
            </div>

            <div class="example-box">
                <div class="example-title">Example: Inclined Plane</div>
                <p><strong>Problem:</strong> A 10 kg box slides down a 30° incline with μ = 0.2. Find the acceleration.</p>
                
                <div class="problem-steps">
                    <div class="step">
                        <span class="step-num">Step 1:</span> Break weight into components<br>
                        mg∥ = mg sin(30°) = 10 × 9.8 × 0.5 = 49 N (down incline)<br>
                        mg⊥ = mg cos(30°) = 10 × 9.8 × 0.866 = 84.9 N (into incline)
                    </div>
                    <div class="step">
                        <span class="step-num">Step 2:</span> Find normal force<br>
                        N = mg⊥ = 84.9 N
                    </div>
                    <div class="step">
                        <span class="step-num">Step 3:</span> Calculate friction<br>
                        f = μN = 0.2 × 84.9 = 17.0 N (up incline)
                    </div>
                    <div class="step">
                        <span class="step-num">Step 4:</span> Apply Newton's 2nd Law<br>
                        ΣF = mg∥ - f = 49 - 17 = 32 N<br>
                        a = ΣF/m = 32/10 = 3.2 m/s²
                    </div>
                </div>
            </div>
        </div>

        <div class="section" id="energy">
            <h2>Energy, Work, and Power</h2>
            
            <p>Energy is the capacity to do work. The conservation of energy is one of the most fundamental principles in physics.</p>

            <h3>Types of Energy</h3>
            <div class="formula-box">
                <div class="formula-name">Mechanical Energy</div>
                <div class="formula">
                    Kinetic Energy: KE = ½mv²<br>
                    Gravitational PE: PE = mgh<br>
                    Elastic PE: PE = ½kx²<br>
                    Total Mechanical Energy: E = KE + PE
                </div>
                <div class="formula-vars">
                    m = mass (kg)<br>
                    v = velocity (m/s)<br>
                    h = height (m)<br>
                    k = spring constant (N/m)<br>
                    x = compression/extension (m)
                </div>
            </div>

            <h3>Work and Power</h3>
            <div class="formula-box">
                <div class="formula-name">Work-Energy Theorem</div>
                <div class="formula">
                    Work: W = F⋅d⋅cos(θ)<br>
                    W = ΔKE = KE_final - KE_initial<br>
                    Power: P = W/t = F⋅v<br>
                    Efficiency: η = (Useful Energy Out)/(Total Energy In)
                </div>
                <div class="formula-vars">
                    W = work done (J)<br>
                    F = force (N)<br>
                    d = displacement (m)<br>
                    θ = angle between F and d<br>
                    P = power (W = J/s)<br>
                    η = efficiency (dimensionless)
                </div>
            </div>

            <div class="law-box">
                <div class="law-title">Conservation of Energy</div>
                <p>Energy cannot be created or destroyed, only transformed from one form to another.</p>
                <div class="formula">E_initial = E_final</div>
                <div class="formula">KE₁ + PE₁ = KE₂ + PE₂ (no friction)</div>
            </div>

            <div class="example-box">
                <div class="example-title">Example: Pendulum Energy</div>
                <p><strong>Problem:</strong> A 2 kg pendulum swings from 1.5 m height. What's its speed at the bottom?</p>
                
                <div class="problem-steps">
                    <div class="step">
                        <span class="step-num">Step 1:</span> Energy at top<br>
                        KE₁ = 0 (starts from rest)<br>
                        PE₁ = mgh = 2 × 9.8 × 1.5 = 29.4 J
                    </div>
                    <div class="step">
                        <span class="step-num">Step 2:</span> Energy at bottom<br>
                        PE₂ = 0 (reference level)<br>
                        KE₂ = ½mv² (unknown)
                    </div>
                    <div class="step">
                        <span class="step-num">Step 3:</span> Apply conservation<br>
                        29.4 = ½ × 2 × v²<br>
                        v² = 29.4<br>
                        v = 5.42 m/s
                    </div>
                </div>
            </div>
        </div>

        <div class="section" id="momentum">
            <h2>Momentum and Collisions</h2>
            
            <p>Momentum describes the motion of objects and is always conserved in isolated systems, making it crucial for analyzing collisions.</p>

            <h3>Linear Momentum</h3>
            <div class="formula-box">
                <div class="formula-name">Momentum and Impulse</div>
                <div class="formula">
                    Momentum: p = mv<br>
                    Impulse: J = FΔt = Δp<br>
                    Conservation: p_total_initial = p_total_final
                </div>
                <div class="formula-vars">
                    p = momentum (kg⋅m/s)<br>
                    m = mass (kg)<br>
                    v = velocity (m/s)<br>
                    J = impulse (N⋅s)<br>
                    F = average force (N)<br>
                    Δt = time interval (s)
                </div>
            </div>

            <h3>Types of Collisions</h3>
            <div class="formula-box">
                <div class="formula-name">Collision Analysis</div>
                <div class="formula">
                    Elastic: KE conserved + momentum conserved<br>
                    v₁f = ((m₁-m₂)/(m₁+m₂))v₁ᵢ + ((2m₂)/(m₁+m₂))v₂ᵢ<br><br>
                    Inelastic: Only momentum conserved<br>
                    m₁v₁ᵢ + m₂v₂ᵢ = (m₁+m₂)v_f<br><br>
                    Coefficient of Restitution: e = -(v₁f - v₂f)/(v₁ᵢ - v₂ᵢ)
                </div>
                <div class="formula-vars">
                    e = 1 (perfectly elastic)<br>
                    e = 0 (perfectly inelastic)<br>
                    0 < e < 1 (real collisions)
                </div>
            </div>
        </div>

        <div class="section" id="rotation">
            <h2>Rotational Motion</h2>
            
            <p>Rotational motion involves objects spinning about an axis. The concepts parallel linear motion but use angular quantities.</p>

            <h3>Angular Kinematics</h3>
            <div class="formula-box">
                <div class="formula-name">Rotational Equations</div>
                <div class="formula">
                    Angular Position: θ (radians)<br>
                    Angular Velocity: ω = dθ/dt<br>
                    Angular Acceleration: α = dω/dt<br>
                    ω = ω₀ + αt<br>
                    θ = θ₀ + ω₀t + ½αt²
                </div>
                <div class="formula-vars">
                    θ = angular position (rad)<br>
                    ω = angular velocity (rad/s)<br>
                    α = angular acceleration (rad/s²)<br>
                    1 revolution = 2π radians
                </div>
            </div>

            <h3>Rotational Dynamics</h3>
            <div class="formula-box">
                <div class="formula-name">Torque and Moment of Inertia</div>
                <div class="formula">
                    Torque: τ = rF sin(θ) = Iα<br>
                    Moment of Inertia: I = Σmᵢrᵢ²<br>
                    Rotational KE: KE_rot = ½Iω²<br>
                    Angular Momentum: L = Iω
                </div>
                <div class="formula-vars">
                    τ = torque (N⋅m)<br>
                    r = distance from axis (m)<br>
                    I = moment of inertia (kg⋅m²)<br>
                    L = angular momentum (kg⋅m²/s)
                </div>
            </div>
        </div>

        <div class="section" id="thermal">
            <h2>Thermodynamics</h2>
            
            <p>Thermodynamics studies heat, temperature, and energy transfer. It bridges mechanics with statistical physics and chemistry.</p>

            <h3>Temperature and Heat</h3>
            <div class="formula-box">
                <div class="formula-name">Temperature Scales</div>
                <div class="formula">
                    Celsius to Kelvin: K = °C + 273.15<br>
                    Fahrenheit: °F = (9/5)°C + 32<br>
                    Heat Transfer: Q = mcΔT<br>
                    Heat Capacity: C = mc
                </div>
                <div class="formula-vars">
                    Q = heat energy (J)<br>
                    m = mass (kg)<br>
                    c = specific heat capacity (J/kg⋅K)<br>
                    ΔT = temperature change (K or °C)<br>
                    C = heat capacity (J/K)
                </div>
            </div>

            <h3>Laws of Thermodynamics</h3>
            <div class="law-box">
                <div class="law-title">First Law of Thermodynamics</div>
                <p>Energy is conserved: the change in internal energy equals heat added minus work done by the system.</p>
                <div class="formula">ΔU = Q - W</div>
                <div class="formula-vars">
                    ΔU = change in internal energy (J)<br>
                    Q = heat added to system (J)<br>
                    W = work done by system (J)
                </div>
            </div>

            <div class="law-box">
                <div class="law-title">Second Law of Thermodynamics</div>
                <p>Entropy of an isolated system always increases. Heat flows naturally from hot to cold.</p>
                <div class="formula">ΔS ≥ 0 (isolated system)</div>
                <div class="formula">Efficiency: η = 1 - T_cold/T_hot (Carnot limit)</div>
            </div>

            <h3>Ideal Gas Law</h3>
            <div class="formula-box">
                <div class="formula-name">Gas Properties</div>
                <div class="formula">
                    PV = nRT = NkT<br>
                    Kinetic Theory: PV = (1/3)Nm⟨v²⟩<br>
                    Average KE: ⟨KE⟩ = (3/2)kT
                </div>
                <div class="formula-vars">
                    P = pressure (Pa)<br>
                    V = volume (m³)<br>
                    n = moles, N = number of molecules<br>
                    R = 8.314 J/mol⋅K, k = 1.381 × 10^(-23) J/K<br>
                    T = absolute temperature (K)
                </div>
            </div>
        </div>

        <div class="section" id="waves">
            <h2>Waves and Sound</h2>
            
            <p>Waves transfer energy without transferring matter. Understanding wave properties is essential for sound, light, and quantum mechanics.</p>

            <h3>Wave Properties</h3>
            <div class="formula-box">
                <div class="formula-name">Wave Equation</div>
                <div class="formula">
                    v = fλ<br>
                    y(x,t) = A sin(kx - ωt + φ)<br>
                    Wave number: k = 2π/λ<br>
                    Angular frequency: ω = 2πf
                </div>
                <div class="formula-vars">
                    v = wave speed (m/s)<br>
                    f = frequency (Hz)<br>
                    λ = wavelength (m)<br>
                    A = amplitude (m)<br>
                    k = wave number (rad/m)<br>
                    ω = angular frequency (rad/s)<br>
                    φ = phase constant (rad)
                </div>
            </div>

            <h3>Sound Waves</h3>
            <div class="formula-box">
                <div class="formula-name">Sound Properties</div>
                <div class="formula">
                    Speed in air: v = 343 m/s (at 20°C)<br>
                    Intensity: I = P/A = (1/2)ρvω²A²<br>
                    Sound Level: β = 10 log(I/I₀)<br>
                    Doppler Effect: f' = f((v ± v_observer)/(v ± v_source))
                </div>
                <div class="formula-vars">
                    I = intensity (W/m²)<br>
                    I₀ = 10^(-12) W/m² (threshold of hearing)<br>
                    β = sound level (dB)<br>
                    ρ = air density (kg/m³)<br>
                    + when approaching, - when receding
                </div>
            </div>

            <div class="concept-box">
                <p><strong>Wave Interference:</strong></p>
                <ul>
                    <li><strong>Constructive:</strong> Waves add when in phase (path difference = nλ)</li>
                    <li><strong>Destructive:</strong> Waves cancel when out of phase (path difference = (n+½)λ)</li>
                    <li><strong>Standing Waves:</strong> Form when waves reflect and interfere with themselves</li>
                </ul>
            </div>
        </div>

        <div class="section" id="electric">
            <h2>Electricity and Electric Fields</h2>
            
            <p>Electric phenomena arise from electric charges and their interactions. Understanding electricity is fundamental to modern technology.</p>

            <h3>Electric Force and Field</h3>
            <div class="formula-box">
                <div class="formula-name">Coulomb's Law and Electric Field</div>
                <div class="formula">
                    Electric Force: F = k(q₁q₂)/r²<br>
                    Electric Field: E = F/q = kQ/r²<br>
                    Field of Point Charge: E = kq/r²<br>
                    Force on Charge in Field: F = qE
                </div>
                <div class="formula-vars">
                    k = 8.99 × 10⁹ N⋅m²/C² (Coulomb's constant)<br>
                    q = electric charge (C)<br>
                    r = distance (m)<br>
                    E = electric field strength (N/C)
                </div>
            </div>

            <h3>Electric Potential</h3>
            <div class="formula-box">
                <div class="formula-name">Potential Energy and Voltage</div>
                <div class="formula">
                    Electric PE: U = kq₁q₂/r<br>
                    Electric Potential: V = U/q = kQ/r<br>
                    Potential Difference: ΔV = W/q<br>
                    Relation to Field: E = -dV/dr
                </div>
                <div class="formula-vars">
                    U = electric potential energy (J)<br>
                    V = electric potential (V = J/C)<br>
                    ΔV = voltage (V)<br>
                    Work moves charge against field
                </div>
            </div>

            <h3>Electric Circuits</h3>
            <div class="formula-box">
                <div class="formula-name">Circuit Analysis</div>
                <div class="formula">
                    Ohm's Law: V = IR<br>
                    Power: P = IV = I²R = V²/R<br>
                    Series: R_total = R₁ + R₂ + R₃...<br>
                    Parallel: 1/R_total = 1/R₁ + 1/R₂ + 1/R₃...
                </div>
                <div class="formula-vars">
                    V = voltage (V)<br>
                    I = current (A)<br>
                    R = resistance (Ω)<br>
                    P = power (W)
                </div>
            </div>

            <div class="diagram">
Circuit Diagram Symbols:
<br><br>
Battery: ——|+|—————|—|——
<br>
Resistor: ————/\/\/\————
<br>
Current: ————————→————————
<br><br>
Kirchhoff's Laws:
<br>
∑I_in = ∑I_out (current law)
<br>
∑V = 0 (voltage law around loop)
            </div>
        </div>

        <div class="section" id="magnetism">
            <h2>Magnetism and Electromagnetic Induction</h2>
            
            <p>Moving electric charges create magnetic fields, and changing magnetic fields create electric fields. This relationship underlies all electromagnetic phenomena.</p>

            <h3>Magnetic Force</h3>
            <div class="formula-box">
                <div class="formula-name">Magnetic Force Laws</div>
                <div class="formula">
                    Force on Moving Charge: F = qvB sin(θ)<br>
                    Force on Current: F = ILB sin(θ)<br>
                    Magnetic Field of Wire: B = (μ₀I)/(2πr)<br>
                    Force Between Wires: F/L = (μ₀I₁I₂)/(2πr)
                </div>
                <div class="formula-vars">
                    B = magnetic field (T = Tesla)<br>
                    μ₀ = 4π × 10^(-7) T⋅m/A<br>
                    θ = angle between v and B<br>
                    L = length of conductor (m)
                </div>
            </div>

            <h3>Electromagnetic Induction</h3>
            <div class="formula-box">
                <div class="formula-name">Faraday's and Lenz's Laws</div>
                <div class="formula">
                    Magnetic Flux: Φ = BA cos(θ)<br>
                    Faraday's Law: ε = -dΦ/dt<br>
                    Motional EMF: ε = BLv<br>
                    Self-Inductance: ε = -L(dI/dt)
                </div>
                <div class="formula-vars">
                    Φ = magnetic flux (Wb = Weber)<br>
                    ε = induced EMF (V)<br>
                    L = inductance (H = Henry)<br>
                    Lenz's Law: induced current opposes change
                </div>
            </div>
        </div>

        <div class="section" id="optics">
            <h2>Light and Optics</h2>
            
            <p>Light exhibits both wave and particle properties. Geometric optics describes light rays, while wave optics explains interference and diffraction.</p>

            <h3>Geometric Optics</h3>
            <div class="formula-box">
                <div class="formula-name">Reflection and Refraction</div>
                <div class="formula">
                    Law of Reflection: θᵢ = θᵣ<br>
                    Snell's Law: n₁ sin(θ₁) = n₂ sin(θ₂)<br>
                    Critical Angle: sin(θc) = n₂/n₁<br>
                    Mirror Equation: 1/f = 1/dₒ + 1/dᵢ
                </div>
                <div class="formula-vars">
                    θᵢ = incident angle<br>
                    θᵣ = reflected angle<br>
                    n = index of refraction<br>
                    f = focal length<br>
                    dₒ = object distance<br>
                    dᵢ = image distance
                </div>
            </div>

            <h3>Lens Optics</h3>
            <div class="formula-box">
                <div class="formula-name">Thin Lens Equation</div>
                <div class="formula">
                    Lens Equation: 1/f = 1/dₒ + 1/dᵢ<br>
                    Magnification: m = -dᵢ/dₒ = hᵢ/hₒ<br>
                    Lens Maker's Equation: 1/f = (n-1)(1/R₁ - 1/R₂)<br>
                    Power: P = 1/f (diopters)
                </div>
                <div class="formula-vars">
                    m = magnification (dimensionless)<br>
                    h = height<br>
                    R = radius of curvature<br>
                    Positive f = converging lens<br>
                    Negative f = diverging lens
                </div>
            </div>

            <h3>Wave Optics</h3>
            <div class="formula-box">
                <div class="formula-name">Interference and Diffraction</div>
                <div class="formula">
                    Double Slit: d sin(θ) = mλ (bright fringes)<br>
                    Single Slit: a sin(θ) = mλ (dark fringes)<br>
                    Grating: d sin(θ) = mλ<br>
                    Resolution: θ = 1.22λ/D (Rayleigh criterion)
                </div>
                <div class="formula-vars">
                    d = slit separation<br>
                    a = slit width<br>
                    m = order (0, ±1, ±2...)<br>
                    D = aperture diameter<br>
                    λ = wavelength
                </div>
            </div>
        </div>

        <div class="section" id="modern">
            <h2>Modern Physics Introduction</h2>
            
            <p>Modern physics emerged in the early 1900s with relativity and quantum mechanics, revealing the strange behavior of very fast, very small, or very massive objects.</p>

            <h3>Special Relativity</h3>
            <div class="formula-box">
                <div class="formula-name">Einstein's Relativity</div>
                <div class="formula">
                    Time Dilation: Δt = γΔt₀<br>
                    Length Contraction: L = L₀/γ<br>
                    Lorentz Factor: γ = 1/√(1 - v²/c²)<br>
                    Mass-Energy: E = mc²<br>
                    Total Energy: E² = (pc)² + (mc²)²
                </div>
                <div class="formula-vars">
                    c = 3.00 × 10⁸ m/s (speed of light)<br>
                    γ = Lorentz factor<br>
                    Δt₀ = proper time<br>
                    L₀ = proper length<br>
                    p = relativistic momentum
                </div>
            </div>

            <h3>Quantum Mechanics Basics</h3>
            <div class="formula-box">
                <div class="formula-name">Quantum Foundations</div>
                <div class="formula">
                    Planck's Equation: E = hf<br>
                    de Broglie Wavelength: λ = h/p<br>
                    Photoelectric Effect: hf = φ + KE_max<br>
                    Uncertainty Principle: ΔxΔp ≥ ℏ/2
                </div>
                <div class="formula-vars">
                    h = 6.626 × 10^(-34) J⋅s (Planck's constant)<br>
                    ℏ = h/(2π) (reduced Planck's constant)<br>
                    φ = work function (J)<br>
                    Δx = position uncertainty<br>
                    Δp = momentum uncertainty
                </div>
            </div>

            <h3>Atomic Physics</h3>
            <div class="formula-box">
                <div class="formula-name">Atomic Structure</div>
                <div class="formula">
                    Bohr Model: rₙ = n²(ℏ²/mke²)<br>
                    Energy Levels: Eₙ = -13.6 eV/n²<br>
                    Photon Emission: hf = E_initial - E_final<br>
                    Binding Energy: BE = (Z⋅m_H + N⋅m_n - M_atom)c²
                </div>
                <div class="formula-vars">
                    n = principal quantum number<br>
                    m = electron mass<br>
                    k = Coulomb's constant<br>
                    e = elementary charge<br>
                    Z = atomic number, N = neutron number
                </div>
            </div>
        </div>

        <div class="section">
            <h2>Problem-Solving Strategy</h2>
            
            <div class="concept-box">
                <h3>Universal Physics Problem-Solving Method</h3>
                <ol>
                    <li><strong>Understand:</strong> Read carefully, identify what's given and what's asked</li>
                    <li><strong>Visualize:</strong> Draw diagrams, free body diagrams, or circuit diagrams</li>
                    <li><strong>Plan:</strong> Choose relevant principles and equations</li>
                    <li><strong>Execute:</strong> Apply mathematics carefully, track units</li>
                    <li><strong>Check:</strong> Verify units, magnitude, and physical reasonableness</li>
                </ol>
            </div>

            <div class="tip">
                <strong>Always start with fundamentals!</strong> Most complex problems can be solved using basic principles like F=ma, conservation of energy, or conservation of momentum.
            </div>

            <div class="warning">
                <strong>Common Mistakes:</strong> Forgetting to convert units, using wrong sign conventions, not drawing proper diagrams, confusing scalar and vector quantities, mixing up formulas from different topics.
            </div>

            <div class="interactive">
                <h4>Quick Reference Calculator</h4>
                <p>Use these for quick conversions and checks:</p>
                <button class="button" onclick="showConstants()">Physical Constants</button>
                <button class="button" onclick="showConversions()">Unit Conversions</button>
                <button class="button" onclick="showFormulas()">Key Formulas</button>
                
                <div id="reference-content" style="display: none; margin-top: 20px; text-align: left;">
                    <!-- Dynamic content will appear here -->
                </div>
            </div>
        </div>

        <div class="section" id="glossary">
            <h2>Physics Glossary</h2>
            
            <div class="glossary">
                <div class="glossary-term">Acceleration</div>
                <div class="glossary-def">Rate of change of velocity; a = dv/dt. Measured in m/s².</div>

                <div class="glossary-term">Angular Momentum</div>
                <div class="glossary-def">Rotational analog of linear momentum; L = Iω. Conserved in absence of external torques.</div>

                <div class="glossary-term">Electric Field</div>
                <div class="glossary-def">Force per unit charge; E = F/q. Describes the electric force environment around charges.</div>

                <div class="glossary-term">Energy</div>
                <div class="glossary-def">Capacity to do work. Comes in many forms: kinetic, potential, thermal, electromagnetic, etc.</div>

                <div class="glossary-term">Entropy</div>
                <div class="glossary-def">Measure of disorder in a system. Always increases in isolated systems (2nd Law of Thermodynamics).</div>

                <div class="glossary-term">Force</div>
                <div class="glossary-def">Push or pull that can change an object's motion; F = ma. Measured in Newtons (N).</div>

                <div class="glossary-term">Frequency</div>
                <div class="glossary-def">Number of oscillations per second; f = 1/T. Measured in Hertz (Hz).</div>

                <div class="glossary-term">Inertia</div>
                <div class="glossary-def">Tendency of objects to resist changes in motion. Related to mass in Newton's 1st Law.</div>

                <div class="glossary-term">Interference</div>
                <div class="glossary-def">Superposition of waves resulting in amplification (constructive) or cancellation (destructive).</div>

                <div class="glossary-term">Momentum</div>
                <div class="glossary-def">Quantity of motion; p = mv. Conserved in isolated systems.</div>

                <div class="glossary-term">Power</div>
                <div class="glossary-def">Rate of energy transfer; P = W/t = dE/dt. Measured in Watts (W).</div>

                <div class="glossary-term">Potential Energy</div>
                <div class="glossary-def">Stored energy due to position or configuration. Can be gravitational, elastic, electric, etc.</div>

                <div class="glossary-term">Quantum</div>
                <div class="glossary-def">Discrete packet of energy; E = hf. Energy comes in quantized amounts, not continuous.</div>

                <div class="glossary-term">Torque</div>
                <div class="glossary-def">Rotational force; τ = rF sin(θ). Causes angular acceleration.</div>

                <div class="glossary-term">Vector</div>
                <div class="glossary-def">Quantity with both magnitude and direction (velocity, force, field). Distinguished from scalars.</div>

                <div class="glossary-term">Wavelength</div>
                <div class="glossary-def">Distance between adjacent peaks in a wave; λ = v/f. Fundamental wave property.</div>

                <div class="glossary-term">Work</div>
                <div class="glossary-def">Energy transfer when force acts through distance; W = F⋅d⋅cos(θ). Measured in Joules (J).</div>
            </div>
        </div>

        <div class="section">
            <h2>Physics in the Real World</h2>
            
            <div class="concept-box">
                <h3>Applications You Use Daily</h3>
                <p><strong>Smartphones:</strong> Semiconductors (quantum mechanics), touchscreens (capacitance), GPS (relativity), cameras (optics), speakers (waves)</p>
                
                <p><strong>Transportation:</strong> Internal combustion engines (thermodynamics), electric vehicles (electromagnetic induction), aerodynamics (fluid mechanics)</p>
                
                <p><strong>Medicine:</strong> X-rays (electromagnetic radiation), MRI (nuclear magnetic resonance), ultrasound (wave physics), laser surgery (optics)</p>
                
                <p><strong>Energy:</strong> Solar panels (photoelectric effect), nuclear power (mass-energy equivalence), wind turbines (rotational mechanics)</p>
            </div>

            <div class="tip">
                <strong>Study Strategy:</strong> Physics concepts build on each other. Master the math behind each concept, practice lots of problems, and always connect new ideas to what you already know. Draw pictures for everything!
            </div>

            <div class="warning">
                <strong>Math Prerequisites:</strong> You'll need algebra, trigonometry, and basic calculus. Don't skip the math - physics IS applied mathematics describing the natural world.
            </div>
        </div>

        <div class="footer">
            <p>Foundation Physics Course | From Classical Mechanics to Modern Physics</p>
            <p>Master the mathematics of the universe!</p>
        </div>
    </div>

    <script>
        function scrollToSection(id) {
            document.getElementById(id).scrollIntoView({
                behavior: 'smooth'
            });
        }

        function showConstants() {
            const content = document.getElementById('reference-content');
            content.style.display = 'block';
            content.innerHTML = `
                <h4 style="color: #ff8c00;">Fundamental Physical Constants</h4>
                <div style="background: #1a1a1a; padding: 15px; border-radius: 8px; font-family: monospace;">
                    Speed of light: c = 3.00 × 10⁸ m/s<br>
                    Planck constant: h = 6.626 × 10⁻³⁴ J⋅s<br>
                    Gravitational constant: G = 6.674 × 10⁻¹¹ N⋅m²/kg²<br>
                    Elementary charge: e = 1.602 × 10⁻¹⁹ C<br>
                    Electron mass: mₑ = 9.109 × 10⁻³¹ kg<br>
                    Proton mass: mₚ = 1.673 × 10⁻²⁷ kg<br>
                    Avogadro's number: Nₐ = 6.022 × 10²³ mol⁻¹<br>
                    Boltzmann constant: k = 1.381 × 10⁻²³ J/K<br>
                    Gas constant: R = 8.314 J/mol⋅K<br>
                    Permittivity of free space: ε₀ = 8.854 × 10⁻¹² C²/N⋅m²
                </div>
            `;
        }

        function showConversions() {
            const content = document.getElementById('reference-content');
            content.style.display = 'block';
            content.innerHTML = `
                <h4 style="color: #ff8c00;">Essential Unit Conversions</h4>
                <div style="background: #1a1a1a; padding: 15px; border-radius: 8px; font-family: monospace;">
                    <strong>Length:</strong><br>
                    1 km = 1000 m = 10³ m<br>
                    1 cm = 0.01 m = 10⁻² m<br>
                    1 mm = 0.001 m = 10⁻³ m<br>
                    1 inch = 2.54 cm<br>
                    1 mile = 1.609 km<br><br>
                    
                    <strong>Energy:</strong><br>
                    1 J = 1 N⋅m = 1 kg⋅m²/s²<br>
                    1 kWh = 3.6 × 10⁶ J<br>
                    1 eV = 1.602 × 10⁻¹⁹ J<br>
                    1 calorie = 4.184 J<br><br>
                    
                    <strong>Time:</strong><br>
                    1 hour = 3600 s<br>
                    1 year ≈ 3.156 × 10⁷ s<br><br>
                    
                    <strong>Angles:</strong><br>
                    1 revolution = 2π rad = 360°<br>
                    1 rad = 57.3°
                </div>
            `;
        }

        function showFormulas() {
            const content = document.getElementById('reference-content');
            content.style.display = 'block';
            content.innerHTML = `
                <h4 style="color: #ff8c00;">Quick Formula Reference</h4>
                <div style="background: #1a1a1a; padding: 15px; border-radius: 8px; font-family: monospace;">
                    <strong>Mechanics:</strong><br>
                    F = ma, p = mv, KE = ½mv², PE = mgh<br>
                    W = F⋅d⋅cos(θ), P = W/t<br><br>
                    
                    <strong>Electricity:</strong><br>
                    F = kq₁q₂/r², E = kq/r², V = kq/r<br>
                    V = IR, P = IV<br><br>
                    
                    <strong>Waves:</strong><br>
                    v = fλ, f = 1/T<br><br>
                    
                    <strong>Thermodynamics:</strong><br>
                    PV = nRT, Q = mcΔT<br>
                    ΔU = Q - W<br><br>
                    
                    <strong>Modern:</strong><br>
                    E = mc², E = hf, λ = h/p
                </div>
            `;
        }

        // Add some interactive highlighting
        document.addEventListener('DOMContentLoaded', function() {
            const formulaBoxes = document.querySelectorAll('.formula-box');
            formulaBoxes.forEach(box => {
                box.addEventListener('click', function() {
                    this.style.boxShadow = 'inset 0 2px 10px rgba(255, 140, 0, 0.4), 0 0 20px rgba(255, 140, 0, 0.3)';
                    setTimeout(() => {
                        this.style.boxShadow = 'inset 0 2px 10px rgba(255, 140, 0, 0.2)';
                    }, 1000);
                });
            });
        });
    </script>
</body>
</html>