★ Reader · not a PDF ★

A book. A toy.

12 interactive widgets hidden in 16 chapters. Spin a casino. Plot your luck. Toggle dark mode. Watch your free-will break.

12 interactives 16 chapters 0 frameworks ~28kb shell
FREEWILL?
play this →
play this →

A reading system by Mike Perina

Not a PDF.
A reader.

Sixteen chapters, each with its own interactive widget — a casino simulator, a luck calculator, a perception trick, a hedonic-curve plotter. Custom typography, reading-progress gauge, dark mode, a 720-pixel column that knows when you've stopped scrolling. Hand-built in vanilla HTML, CSS, and JavaScript. Zero framework.

Built, written, designed, and shipped by Mike Perina

The reading frame

Every detail of the chrome was decided.

A serif body at 1.1rem, a teal-and-cream palette that reverses in dark mode, a 720-pixel column that holds eight to twelve words per line. Each chapter loads in its own page — no SPA, no spinner, no Lighthouse penalty. Just paper-on-the-web with reading instrumentation underneath.

reprogramming-reality.tangent.build / chapter-1

Reading-progress gauge

A red-orange bar pinned to the top of every chapter, tied to scroll position with a live percentage label — so the reader always knows how far in they are. Updates on requestAnimationFrame, not scroll-spam.

Dark mode that respects the palette

A single toggle inverts the entire color system through CSS custom properties. Cream becomes teal, teal becomes cream, the red-orange stays — because contrast is the point, not theme-switching as decoration.

720-pixel reading column

Georgia / Times New Roman at 1.1rem with 1.8 line-height. The width is set so an average reader holds the whole line on a single eye sweep. No reflow, no awkward two-line widows, no measured-by-accident type.

Per-chapter URLs

Each chapter is its own file — /chapters/chapter-1.html, /chapter-2, and so on. Bookmarkable, shareable, indexable. No "next" button hijacking the URL bar.

Back-button that knows the room

A persistent “← All chapters” affordance at the top-left, hover-animated, that doesn't disappear when you scroll. Built so the reader never feels lost in a chapter.

Keyboard-first navigation

Arrow keys flip between chapters. Space and Page-Down scroll. Escape exits the reading-progress overlay. The chrome stays out of the way until you ask for it.

The differentiator

Twelve interactives, embedded at the right moments.

Most chapters reach a point where the argument can't be made with another paragraph. So the chapter pauses, and a custom widget — built in vanilla JavaScript, no React, no library — appears inline. You play with it. The paradox is no longer abstract.

Chapter I · Free Will

Awareness Gap

Click through a sequence of "decisions" and watch how many of them were already made by the time you noticed. Visualizes the 0.3-second delay between intent and awareness.

canvas~6kb
Chapter II · Validation

Engagement Predictor

Type any post. The widget predicts how many likes it gets based on word count, emotional valence, and time of day. Then asks: would you still post it if you knew?

NLP-lite~9kb
Chapter III · The NPC

CRT Test

A three-question Cognitive Reflection Test embedded in the page. Wrong answers are the gut answers. Right answers require pausing. Most readers fail at least one.

survey~3kb
Chapter IV · Reality

Perception Trick

An interactive optical illusion that recalibrates as you stare. Demonstrates the chapter's claim — you're not seeing the world, you're seeing a prediction of it.

SVG~4kb
Chapter V · Comfort

Comfort Map

Drag a marker across a 2D grid of "what's familiar" vs "what's chosen." Watch your comfort zone redraw itself in real-time as you reveal what you've never tried.

dragcanvas
Chapter VI · Hedonic

Hedonic Curve

Plot any pleasure on the curve — money, food, attention. The widget shows the diminishing-returns slope, then asks where on the curve you currently are. Painfully accurate.

d3-ish~11kb
Chapter X · Nature/Nurture

Brothers Blueprint

Set the genes, set the environment, watch two siblings diverge across a simulated lifetime. The first widget where the reader has to decide which parameter is "fair."

sim~14kb
Chapter X · Nature/Nurture

Resilience Builder

Layer five protective factors against three stressors. Watch which combinations produce a child who can withstand which kinds of breaks. Companion to Brothers Blueprint.

sim~10kb
Chapter X · Nature/Nurture

Twin Simulator

Identical twins, separated at birth. Decide the two environments. See how much of "personality" the simulator credits to each side. Calibrated against actual twin-study data.

sim~12kb
Chapter XIII · Luck

Casino Simulator

Press “spin” a hundred times. The widget shows your bankroll trajectory and the house's edge converging on its theoretical value. The luckiest reader still loses.

RNGanimated
Chapter XIII · Luck

Luck Calculator

Enter your surface area — relationships, time online, conversations started. The widget outputs your "luck-rate" — the number of opportunities per month statistically arriving at your door.

formula~5kb
Chapter XIII · Luck

Network Visualizer

A live-force-graph of weak ties versus strong ties. Drag nodes around. Watch how a single weak-tie reconnect ripples through twelve degrees of separation in real time.

force-graph~16kb
All twelve widgets are vanilla JS. No bundler, no React, no library larger than vanilla requestAnimationFrame. Each one is its own file under /js/interactives/, lazy-loaded only on the chapters that summon it.

The architecture

Static, instant, indexable.

The whole book ships as static HTML. No build step, no framework, no server. The slowest chapter loads in under 280ms on a 3G connection. Search engines see every word — including the closing transcript.

Stack
Vanilla HTML + CSS + JavaScript. No transpiler. Edit a file, push, ship.
Pages
One file per chapter under /chapters/chapter-N.html — plus an index, an about page, and a chapter-list page. Static IDs, static URLs, static everything.
Interactives
Twelve standalone modules under /js/interactives/. Each one self-contained — no shared state, no framework. Loaded only on the chapter that needs it.
Routing
Vercel rewrites: /chapter/:slug → /chapter-template.html for clean shareable URLs without breaking the static model.
Performance
~28kb shell + ~6-16kb per interactive. Lighthouse 100/100/100/100 on every chapter. No CLS, no LCP delay.
PWA
manifest.json + icons + offline-capable shell — installable as an app on iOS/Android home screens, reads with no connection.
Deploy
Vercel, autodeploys from github.com/3dmikep-deploy/reprogramming-reality. CI-less. Edit-to-live in 18 seconds.
/chapters/chapter-13.html · Casino Simulator

The design system

Eight tokens. One book.

The whole reader runs on a handful of CSS custom properties. Change one, change the whole book. The palette is Bauhaus-by-way-of-Penguin: cream, teal, red-orange, with a calm light-cream as the resting state for sub-elements.

#E8D5B7
Bg cream
#F4E8D0
Light cream
#1B3A3A
Dark teal
#4A7C7E
Medium teal
#B85450
Red orange
Gradient
Day → Night
#0A1A1A
Dark-mode bg
Pattern
Page texture