I built this site with plain HTML, CSS and JavaScript — no frameworks, no build tools, no npm. Just files in a folder. That was a deliberate choice, and I think it was the right one.
Why not React, or Next, or…
The honest answer is that for a personal portfolio, the overhead isn't worth it. A React app for a site with six sections and a contact form is like using a sledgehammer to hang a picture. Vanilla HTML is fast, readable, and deploys to GitHub Pages in one push.
The slightly less honest answer is that I find raw DOM manipulation more satisfying. When something works, you know exactly why it works.
The particle canvas
The thing most people ask about is the particle image in the hero section. The idea is simple — sample pixel colours from a source image, spawn a particle at each dark pixel, and animate them back to their base positions when the mouse moves away.
The repulsion on hover is just: find distance to mouse, if inside a radius apply a force pushing the particle away, otherwise ease it back to its base position at 6% per frame.
The games
Each game — Connect 4, Noughts & Crosses, Hangman, Battleships — is a self-contained HTML file with its own CSS and JavaScript. The Connect 4 and Noughts & Crosses AIs use minimax with alpha-beta pruning, which sounds impressive but is really just exhaustive search with early termination when a branch can't improve the best known outcome.
Battleships uses a checkerboard shot pattern for the search phase (more efficient than random because ships are at least 2 cells long) and switches to targeted adjacent-cell hunting after a hit.
What I'd do differently
- CSS custom properties from day one — I added them midway and it was messy
- A consistent naming convention for classes before writing any HTML
- Mobile design first — desktop-first CSS always needs more responsive overrides
The source is on GitHub if you want to poke around.
Comments