Writing

Notes from real work — what broke, what fixed it, and what it taught me.

The flash of wrong theme, and why React alone cannot fix it

13 August 2026

I made my portfolio default to dark on laptops and light on phones. Deciding the theme inside React guarantees a flash of the wrong one — the fix is a blocking inline script, and a MutationObserver to prove the flash is gone.

Your gradient button probably fails WCAG — mine hit 1.81:1

6 August 2026

Contrast checkers test one colour pair. A gradient is an infinite number of pairs, and my indigo-to-cyan button passed at one end while failing badly at the other. The fix was a second gradient reserved for filled surfaces.

GITHUB_TOKEN cannot enable GitHub Pages — and neither error tells you that

1 August 2026

My Pages deploy failed twice with two different errors that both pointed nowhere. The real cause: the default Actions token is not allowed to create a Pages site, and the fix lives in a settings screen, not in the workflow.