Skip to content
Mazin.
Back to work

6 November 2026 · 3 min read

How this portfolio is built

I wanted a portfolio that behaves like the products I build: fast, readable in Arabic, and honest about what it shows.

One codebase, two languages

The site is a Next.js App Router project with next-intl. Every page exists at /en and /ar. Arabic is not a translation bolted on afterwards — layouts use logical CSS properties (margin-inline-start, text-align: start), so the same components flip correctly in right-to-left.

A hero that respects the device

The hero pairs an editorial portrait with a cursor-reactive particle backdrop. The portrait is plain DOM and CSS with a few motion springs, so it costs almost nothing; the particles are three.js, lazy-loaded.

  • With prefers-reduced-motion, or without WebGL, the particle field is skipped and the portrait simply stays still.
  • Rendering pauses when the hero is off screen or the tab is hidden.
  • Each case study has its own 3D stage: a floating laptop and phone showing that project's real screenshots, with a plain CSS mockup as the fallback.

Content as typed data

Each case study is a typed TypeScript object with English and Arabic copy side by side. Adding a project means adding one file — the work index, the case-study page, the command palette and the sitemap all pick it up.

Small things that matter

A ⌘K command palette, a theme set before first paint to avoid a flash, per-page metadata with hreflang alternates, structured data and share images generated in both languages, and a contact form that posts through a server action so no keys reach the browser.