Colophon
How this site is built. Static pages, real screenshots, and a build that fails if any number on the site is missing its source. Every check runs on every push.
Stack
- Framework
- Astro 7, static output. Zero JavaScript by default.
- Islands
- Preact 10, hydrated only where they’re used: the ⌘K palette, the theme toggle, the mobile menu and the four live demos.
- Language
- TypeScript 5, strict mode throughout.
- Content
- Zod schemas on every content collection.
- Hosting
- Netlify, chosen over Cloudflare Pages mainly for repo-versioned cross-domain redirects and a zero-backend contact form.
Homepage
The top of the homepage is one grid. The copy scrolls in the left column, and each project’s figure, a real screenshot, sits in the right. On a wide screen with motion on, the figures share one sticky cell and become a deck in 3-D.
Every pose in that deck is derived in CSS from one custom property, --p: the scroll position, measured in projects. A small script only measures the copy blocks, eases --p toward its target and tracks the pointer.
--h: clamp(0, calc(1 - var(--p)), 1);
--e: calc(var(--i) - max(var(--p), 1));
--up: clamp(0, var(--e), 4);
--dn: clamp(0, calc(-1 * var(--e)), 1.1);i, --e is how far it sits from the front of the deck: 0 in front, 1 next, −1 just gone.Without motion, without JavaScript or on a narrow screen, each figure follows its project in the flow, so the same markup reads as a plain page.
The staged projects carry small widgets to play with, driven by the same pure logic as the full demos. They are server-rendered in a resting state and hydrate from one lazily loaded module, after the first sign of a person.
Type
Three variable faces, self-hosted as WOFF2 subsets. Each family declares one file per Unicode range, so a page downloads only what it renders. The Latin files are preloaded, and metric-matched fallback faces keep the swap from shifting layout. No Google Fonts CDN, no third-party font requests.
Display
Funnel Display
When should you trust a model? 0123456789
Text
Inter
Triple major in Finance, Computer Science and Economics at Santa Clara University. I build multi-model AI, fintech infrastructure and market simulations.
Data
Geist Mono
npm run check && npm run test && npm run lint && npm run build
Color
Monochrome, dark by default. One muted steel is kept for focus rings, link hover and marking a disagreement. The color on a page is the work’s own: two hues taken from each capture light the space behind its frame, and two data-state tokens mark a ledger that balances or breaks, a candle up or down.
A film-grain layer on the dark theme keeps those glows from banding.

#14b8d4#e0306e--bg-0The pageDark#08090aLight#f7f8f8--bg-1PanelsDark#0f1011Light#ffffff--bg-2Raised surfaces: the palette, menus, the toastDark#141516Light#eeeff0--fg-1Primary textDark#f7f8f8Light#08090a--fg-2Secondary textDark#8a8f98Light#55595f--fg-3Labels and metaDark#7d818aLight#676b73--fg-4Decoration only, never body textDark#5c6068Light#8a8e95--lineHairlinesDarkrgba(255, 255, 255, 0.08)Lightrgba(0, 0, 0, 0.08)--steelFocus rings, link hover, a disagreementDark#8fa3b8Light#4a5d72--posData state: a ledger that balances, a candle upDark#63c394Light#18794e--negData state: a ledger that breaks, a candle downDark#f0666fLight#c42b3a
Budgets
- Lighthouse performance, mobileTarget: 100Gate in CI: Fails under 90
- Lighthouse accessibility, best practices and SEOTarget: 100Gate in CI: Fails under 95
- Largest contentful paint, throttled 4GTarget: under 1.2 sGate in CI: Warns over 1.2 s
- Cumulative layout shiftTarget: 0Gate in CI: Warns over 0
- Interaction to next paintTarget: under 100 msGate in CI: Total blocking time warns over 200 ms
- Homepage JavaScript, gzippedTarget: under 90 KBGate in CI: Fails over 23 KB on load, 52 KB with the chunks that load later
- Any other page’s JavaScript, gzippedNo separate targetGate in CI: Fails over 28 KB on load
The targets are goals. The gates are what fails a push, and this column is read from lighthouserc.json and scripts/bundle-budget.json when the site builds. Lighthouse runs 3 times on each of 4 pages (the homepage, /work, one case study and one paper) and gates on the median.
Accessibility
- Standard
- WCAG 2.2 AA, in both themes.
- Keyboard
- Full keyboard access, with a visible focus ring on every stop.
- Motion
- Every animation is gated on one class, set before first paint.
prefers-reduced-motiongets a static page, and Pause motion freezes everything in place. - Contrast
- Text tokens hold 4.5:1 on every surface in both themes. A unit test reads the token file and fails if one slips.
- No JavaScript
- Every page reads in full without it.
Sources
Content integrity is enforced by the build. Every project’s status badge, every metric and every key finding needs a source in its frontmatter: a repo path, a FINDINGS.md line or a dated confirmation. The Zod schema rejects an entry that skips one, so the build itself fails.
A separate script scans the built site for a short list of banned terms (never committed to the repo) so nothing private ends up published by accident, and a second script fails the build on any leftover draft-only placeholder note. Both run again in CI on every push.
Checks
- Content schemasA metric, a status or a key finding with no source fails here, before anything else runs.
astro sync - TypecheckTypeScript in strict mode, pages and components included.
astro check - Unit testsVitest covers the schemas, the lints and the pure logic behind the live demos: the tie-out engine’s integer-cents math and the order-book model.
vitest run - Copy lintFails on buzzwords in site copy.
lint-copy.mjs - BuildStatic output, every page pre-rendered.
astro build - Draft notesFails on any leftover draft-only placeholder note in the built site.
lint-todo.mjs - Content security policyFails on any script or third-party resource in the build that the policy would block.
seo-csp.test.ts - Résumé PDFThe committed PDF has to match the built page’s text and links, and stay one page.
resume-pdf.test.ts - Banned termsScans the source tree, the commits in the push and the built site for a short private list, never committed to the repo, so nothing private is published by accident.
lint-banned-terms.mjs - LinksEvery internal link, fragment and asset offline, then every external URL.
check-links.mjs, lychee - LighthouseMobile, 3 runs on each of 4 pages, gated on the median.
lhci autorun - Bundle sizeGzipped JavaScript per page against the budget file.
bundle-size.mjs - Smoke testsPlaywright loads every route at 1280 and 360 px: HTTP 200, exactly one h1, no console errors, no failed requests, no sideways scroll. Then the palette, the theme toggle, the motion switch, the mobile menu and the four live demos, end to end.
playwright --project=smoke - Accessibilityaxe with the WCAG A and AA rule tags, through 2.2, on every route: in dark, in light, with motion forced on and at 360 px.
playwright --project=a11y
28 decisions on record.
Every non-obvious choice, the host included, is logged as it’s made in DECISIONS.md, an ADR-lite log in the repo.
The whole site goes public at launch, at github.com/mit37/mitanshm.com: the same repo this page is served from.