---
title: "Minimal Portfolio"
description: "A portfolio that is mostly words, set like a printed page - one narrow column, a big italic name with its initial again as an outline, a drop cap, small-caps headings numbered in outline figures, links underlined in the accent, ruled paper drifting slowly behind. Every section fades in after the last."
slug: "portfolio-minimal"
---

import { DocPage, PageHeader, DocText, DocLink } from "../../lib/components/index";

<DocPage meta={meta}>

<PageHeader slug="portfolio-minimal" title="Minimal Portfolio" introStyle="max-width:42rem;">
  A portfolio that is mostly words, set like a printed page - one narrow column, a big italic name with its initial again as an outline, a drop cap, small-caps headings numbered in outline figures, links underlined in the accent, ruled paper drifting slowly behind. Every section fades in after the last. One of the <DocLink href="website-resume-portfolio.html">Resume &amp; Portfolio</DocLink> styles.
</PageHeader>

<div class="flex flex-wrap items-center gap-2 mb-6">
  <a class="btn" href="full-portfolio-minimal.html" target="_blank" rel="noopener"><i data-lucide="maximize-2"></i> Open full screen</a>
</div>

```html example label="Noor Haddad, writer and engineer" schema="none" hint="Warm paper and one accent (following light / dark), Newsreader with its optical sizes and IBM Plex Mono for the dates: Resume Header (compact) with a shape-circle photo and its status pill; a drop cap (::first-letter); small-caps headings counted in outline figures (-webkit-text-stroke); accent underlines that fill like a marker on hover; a Surface (ruled, drifting) behind the header. data-df-stagger fades the sections in one after another." previewStyle="align-items:stretch;padding:0;"
<style>
  @import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400;1,6..72,500&family=IBM+Plex+Mono:wght@400;500&display=swap');
  /* still minimal - one narrow column, no boxes - but set like a printed page: Newsreader with its optical
     sizes, a drop cap, small-caps headings numbered in outline figures, links underlined in the accent, the
     name in a big italic, its initial again as an outline watermark, ruled paper drifting slowly behind */
  #pf-minimal {
    --background: oklch(0.975 0.01 85);
    --foreground: oklch(0.22 0.02 60);
    --card: oklch(0.99 0.006 85);
    --card-foreground: var(--foreground);
    --muted: oklch(0.94 0.014 85);
    --muted-foreground: oklch(0.47 0.02 60);
    --border: oklch(0.22 0.02 60 / 0.14);
    --primary: oklch(0.52 0.16 32);
    --primary-foreground: oklch(0.99 0.006 85);
    --pf-mark: oklch(0.9 0.09 85);
    --pf-mono: 'IBM Plex Mono', var(--font-mono);
    color-scheme: light;
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    width: 100%;
    padding: 1rem 1.25rem 3rem;
    overflow: clip;
    background: var(--background);
    color: var(--foreground);
    font:
      400 1.125rem/1.7 'Newsreader',
      Georgia,
      serif;
    font-optical-sizing: auto;
  }
  .dark #pf-minimal {
    color-scheme: dark;
    --background: oklch(0.19 0.012 60);
    --foreground: oklch(0.93 0.012 85);
    --card: oklch(0.22 0.014 60);
    --muted: oklch(0.25 0.014 60);
    --muted-foreground: oklch(0.74 0.018 80);
    --border: oklch(0.93 0.012 85 / 0.14);
    --primary: oklch(0.74 0.14 45);
    --primary-foreground: oklch(0.19 0.012 60);
    --pf-mark: oklch(0.42 0.08 70);
  }
  /* ruled paper, drifting a line every few seconds; it fades out below the header */
  #pf-minimal .pf-paper {
    --surface-size: 30px;
    --surface-ink: color-mix(in oklch, var(--primary) 16%, transparent);
    --surface-direction: 270deg;
    --surface-duration: 24s;
    mask-image: linear-gradient(#000, transparent 32rem);
  }
  /* the initial again, as an outline */
  #pf-minimal .pf-watermark {
    position: absolute;
    z-index: -1;
    top: clamp(5.5rem, 9vw, 7.5rem);
    right: max(-2rem, calc(50% - 30rem));
    margin: 0;
    color: transparent;
    -webkit-text-stroke: 1.5px color-mix(in oklch, var(--primary) 45%, transparent);
    font:
      italic 500 clamp(12rem, 30vw, 22rem) / 0.8 'Newsreader',
      Georgia,
      serif;
    pointer-events: none;
    user-select: none;
  }
  /* on a phone the sections wrap below the name: the watermark starts under them */
  @media (max-width: 40rem) {
    #pf-minimal .pf-watermark {
      top: 8rem;
    }
  }
  #pf-minimal .pf-column {
    counter-reset: pf-section;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    max-width: 38rem;
    margin-inline: auto;
  }
  #pf-minimal .mk-resume-header {
    gap: 1.5rem;
    padding: 0;
    border: 0;
  }
  #pf-minimal .mk-resume-header-photo {
    width: 4.5rem;
    height: 4.5rem;
    filter: grayscale(1) sepia(0.25);
  }
  #pf-minimal .mk-resume-header-status {
    font: 500 0.75rem/1.4 var(--pf-mono);
    letter-spacing: 0.02em;
  }
  #pf-minimal .mk-resume-header-name {
    font:
      italic 500 clamp(2.75rem, 6vw, 3.75rem) / 1 'Newsreader',
      Georgia,
      serif;
    letter-spacing: -0.02em;
  }
  #pf-minimal .mk-resume-header-name span {
    color: var(--primary);
  }
  #pf-minimal .mk-resume-header-role {
    margin: 0.35rem 0 0;
    color: var(--muted-foreground);
    font-size: 1.0625rem;
    font-variant-caps: all-small-caps;
    letter-spacing: 0.06em;
  }
  #pf-minimal p {
    margin: 0 0 1rem;
    text-wrap: pretty;
  }
  /* the first paragraph opens with a drop cap */
  #pf-minimal .pf-dropcap::first-letter {
    float: inline-start;
    margin: 0.32rem 0.6rem 0 0;
    color: var(--primary);
    font:
      500 4.6rem/0.72 'Newsreader',
      Georgia,
      serif;
  }
  #pf-minimal .pf-lede {
    font-size: 1.3125rem;
    line-height: 1.6;
  }
  /* links: an accent underline that thickens into a marker on hover */
  #pf-minimal a {
    color: inherit;
    text-decoration: underline 1.5px var(--primary);
    text-underline-offset: 0.22em;
    background: linear-gradient(var(--pf-mark), var(--pf-mark)) 0 100% / 100% 0 no-repeat;
    transition: background-size 0.25s;
  }
  #pf-minimal a:is(:hover, :focus-visible) {
    background-size: 100% 45%;
  }
  /* headings: small caps in the accent, numbered in outline figures */
  #pf-minimal h2 {
    counter-increment: pf-section;
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    margin: 0 0 1.25rem;
    color: var(--primary);
    font-size: 1.0625rem;
    font-weight: 500;
    font-variant-caps: all-small-caps;
    letter-spacing: 0.14em;
  }
  #pf-minimal h2::before {
    content: counter(pf-section, decimal-leading-zero);
    color: transparent;
    -webkit-text-stroke: 1px var(--primary);
    font:
      italic 500 2.5rem/0.8 'Newsreader',
      Georgia,
      serif;
    letter-spacing: 0;
  }
  #pf-minimal .pf-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  #pf-minimal .pf-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.15rem 1rem;
    align-items: baseline;
    padding-block: 0.85rem;
    border-block-end: 1px solid var(--border);
  }
  #pf-minimal .pf-list li:first-child {
    border-block-start: 1px solid var(--border);
  }
  #pf-minimal .pf-list a {
    font-size: 1.25rem;
    font-weight: 500;
    text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in oklch, var(--primary) 45%, transparent);
  }
  #pf-minimal .pf-writing a {
    font-style: italic;
    font-weight: 400;
  }
  #pf-minimal .pf-list span,
  #pf-minimal .pf-list time {
    color: var(--muted-foreground);
    font: 400 0.8125rem/1.4 var(--pf-mono);
    font-variant-numeric: tabular-nums;
  }
  #pf-minimal .pf-list p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted-foreground);
    font-size: 1.0625rem;
  }
  #pf-minimal .pf-now {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  #pf-minimal .pf-now li {
    position: relative;
    padding-inline-start: 1.5rem;
  }
  #pf-minimal .pf-now li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 0.75rem;
    height: 1.5px;
    background: var(--primary);
  }
  #pf-minimal .pf-now li + li {
    margin-block-start: 0.5rem;
  }
  #pf-minimal .pf-now mark {
    padding: 0 0.15em;
    background: linear-gradient(transparent 55%, var(--pf-mark) 55%);
    color: inherit;
  }
  #pf-minimal .pf-quote {
    margin: 0;
    padding: 0.25rem 0 0.25rem 1.5rem;
    border-inline-start: 2px solid var(--primary);
    font:
      italic 400 1.5rem/1.4 'Newsreader',
      Georgia,
      serif;
    text-wrap: balance;
  }
  #pf-minimal .mk-resume-entry-title {
    font-size: 1.1875rem;
    font-weight: 500;
  }
  #pf-minimal :is(.mk-resume-entry-org, .mk-resume-entry-when) {
    font-size: 1rem;
  }
  #pf-minimal .mk-resume-entry-when {
    font-family: var(--pf-mono);
    font-size: 0.8125rem;
  }
  #pf-minimal [hidden] {
    display: none !important;
  }
  /* the Site Header: the name in italic with its accent stop, three sections in small caps - nothing else */
  #pf-minimal .mk-header {
    max-width: 38rem;
    margin: 0 auto clamp(2.5rem, 8vw, 5.5rem);
    background: none;
    color: inherit;
  }
  #pf-minimal .mk-header-inner {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    min-height: 4.5rem;
    padding: 0;
  }
  #pf-minimal .mk-header a {
    text-decoration: none;
  }
  #pf-minimal .mk-header-brand {
    color: inherit;
  }
  #pf-minimal :is(.mk-header-name, .mk-footer-brand-name) {
    color: inherit;
    font:
      italic 500 1.375rem/1 'Newsreader',
      Georgia,
      serif;
    letter-spacing: -0.01em;
  }
  #pf-minimal :is(.mk-header-name, .mk-footer-brand-name) span {
    color: var(--primary);
  }
  #pf-minimal .mk-header-nav {
    display: flex;
    margin-inline-start: auto;
  }
  #pf-minimal .nav-menu-list {
    gap: 1.25rem;
  }
  #pf-minimal .nav-menu-link {
    padding: 0.15rem 0;
    border-radius: 0;
    color: var(--muted-foreground);
    font-size: 1.0625rem;
    font-weight: 500;
    font-variant-caps: all-small-caps;
    letter-spacing: 0.1em;
  }
  #pf-minimal .nav-menu-link:is(:hover, :focus-visible) {
    background: linear-gradient(var(--pf-mark), var(--pf-mark)) 0 100% / 100% 45% no-repeat;
    color: var(--foreground);
  }
  #pf-minimal .nav-menu-link[aria-current] {
    background: none;
    color: var(--primary);
    text-decoration: underline 1.5px var(--primary);
    text-underline-offset: 0.3em;
  }
  /* a project or an essay: the same column, the title in the name's big italic, the text set like a book */
  #pf-minimal .pf-back {
    margin: 0;
    font: 400 0.8125rem/1.4 var(--pf-mono);
  }
  #pf-minimal .pf-back a {
    text-decoration: none;
    color: var(--muted-foreground);
  }
  #pf-minimal .pf-meta {
    margin: 0 0 0.75rem;
    color: var(--muted-foreground);
    font: 400 0.8125rem/1.4 var(--pf-mono);
  }
  #pf-minimal .pf-page-title {
    margin: 0 0 1.25rem;
    font:
      italic 500 clamp(2.25rem, 5.5vw, 3.25rem) / 1.05 'Newsreader',
      Georgia,
      serif;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }
  #pf-minimal .pf-figure {
    margin: 0;
  }
  #pf-minimal .pf-figure img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    filter: grayscale(1) sepia(0.25);
  }
  #pf-minimal .pf-facts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.35rem 1.5rem;
    margin: 0;
    padding-block: 0.85rem;
    border-block: 1px solid var(--border);
  }
  #pf-minimal .pf-facts dt {
    color: var(--primary);
    font-size: 1rem;
    font-variant-caps: all-small-caps;
    letter-spacing: 0.1em;
  }
  #pf-minimal .pf-facts dd {
    margin: 0;
  }
  #pf-minimal .pf-essay p {
    margin: 0 0 1.25rem;
  }
  #pf-minimal .pf-essay p:first-child {
    font-size: 1.3125rem;
    line-height: 1.6;
  }
  #pf-minimal .pf-essay p:first-child::first-letter {
    float: inline-start;
    margin: 0.32rem 0.6rem 0 0;
    color: var(--primary);
    font:
      500 4.6rem/0.72 'Newsreader',
      Georgia,
      serif;
  }
  #pf-minimal .pf-signoff {
    margin: -1rem 0 0;
    color: var(--muted-foreground);
    font-style: italic;
  }
  #pf-minimal .pf-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    padding-block-start: 1.25rem;
    border-block-start: 1px solid var(--border);
  }
  #pf-minimal .pf-pager a {
    display: grid;
    align-content: start;
    gap: 0.2rem;
    text-decoration: none;
  }
  #pf-minimal .pf-pager a + a {
    text-align: end;
  }
  #pf-minimal .pf-pager small {
    color: var(--primary);
    font-size: 1rem;
    font-variant-caps: all-small-caps;
    letter-spacing: 0.1em;
  }
  #pf-minimal .pf-pager span {
    font-size: 1.1875rem;
    font-style: italic;
  }
  /* the Site Footer, simple: one quiet line under the column */
  #pf-minimal .mk-footer {
    max-width: 38rem;
    margin: 4rem auto 0;
    background: none;
    color: inherit;
  }
  #pf-minimal .mk-footer[data-variant='simple'] .mk-footer-inner {
    padding: 1.5rem 0 0;
    border-block-start: 1px solid var(--border);
  }
  #pf-minimal .mk-footer-brand {
    color: inherit;
    text-decoration: none;
  }
  #pf-minimal .mk-footer-links {
    font-size: 1.0625rem;
  }
  #pf-minimal .mk-footer-links a {
    color: inherit;
  }
  #pf-minimal .mk-footer-copy {
    flex-basis: 100%;
    color: var(--muted-foreground);
    font: 400 0.75rem/1.5 var(--pf-mono);
  }
  @media (prefers-reduced-motion: reduce) {
    #pf-minimal a {
      transition: none;
    }
  }
  /* light or dark: the Swap writes the page's dark class - every look has a light and a dark palette */
  #pf-minimal .site-mode {
    flex: none;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--foreground);
  }
  #pf-minimal .site-mode:hover {
    background: var(--accent);
    color: var(--accent-foreground);
  }
  /* -- modes: each look in light and dark, derived from the palettes above (the other mode of each look) -- */
  :root:not(.dark) #pf-minimal {
    --accent: oklch(0.93 0 85);
    --accent-foreground: oklch(0.22 0.02 60);
  }
  .dark #pf-minimal {
    --accent: oklch(0.28 0 60);
    --accent-foreground: oklch(0.93 0.012 85);
  }
  /* -- modes: end -- */
</style>
<div id="pf-minimal">
  <div
    class="surface pf-paper"
    data-variant="background"
    data-pattern="ruled"
    data-motion="drift"
    aria-hidden="true"
  ></div>
  <p class="pf-watermark" aria-hidden="true">N.</p>
  <header class="mk-header">
    <div class="mk-header-inner">
      <a class="mk-header-brand" href="#/" data-router-link
        ><span class="mk-header-name">Noor Haddad<span>.</span></span></a
      >
      <nav class="mk-header-nav" aria-label="Main">
        <ul class="nav-menu-list">
          <li class="nav-menu-item"><a class="nav-menu-link" href="#/projects" data-router-link>Projects</a></li>
          <li class="nav-menu-item"><a class="nav-menu-link" href="#/writing" data-router-link>Writing</a></li>
          <li class="nav-menu-item"><a class="nav-menu-link" href="#/work" data-router-link>Work</a></li>
        </ul>
      </nav>
      <div class="mk-header-actions">
        <label class="swap site-mode" data-variant="rotate" data-size="sm">
          <input type="checkbox" data-site-mode aria-label="Dark mode" />
          <span class="swap-on" aria-hidden="true"><i data-lucide="moon"></i></span>
          <span class="swap-off" aria-hidden="true"><i data-lucide="sun"></i></span>
        </label>
      </div>
    </div>
  </header>
  <div class="pf-column" data-pf-view="home" data-df-stagger style="--df-motion-stagger-step: 120ms">
    <div data-df-entrance="fade">
      <header class="mk-resume-header" data-variant="compact">
        <img class="mk-resume-header-photo shape-circle" src="images/photos/338-200x200-gray.webp" alt="Noor Haddad" />
        <div class="mk-resume-header-body">
          <p class="mk-resume-header-status"
            ><span class="indicator-dot" data-variant="success" aria-hidden="true"></span> Open to a staff role in
            2027</p
          >
          <h1 class="mk-resume-header-name">Noor Haddad<span>.</span></h1>
          <p class="mk-resume-header-role">Engineer and writer · Amman and Berlin</p>
        </div>
      </header>
    </div>
    <section aria-label="About" data-df-entrance="fade">
      <p class="pf-dropcap pf-lede"
        >I build tools for people who write - editors, version history, the boring parts of publishing. Right now at
        <a href="#/work" data-router-link>Ink &amp; Paper</a>, before that at
        <a href="#/work" data-router-link>Ghostline</a>.</p
      >
      <p
        >I also write about software that respects your attention, in English and Arabic. The
        <a href="#/writing" data-router-link>essays</a> are below; the code is
        <a href="https://github.com/" target="_blank" rel="noopener">on GitHub</a>.</p
      >
    </section>
    <section aria-labelledby="pf-min-now" data-df-entrance="fade">
      <h2 id="pf-min-now">Now</h2>
      <ul class="pf-now">
        <li>Rebuilding our editor's <mark>undo on a CRDT</mark>.</li>
        <li>Reading <i>The Shape of Design</i>, again.</li>
        <li>Learning to bake ka'ak properly.</li>
      </ul>
    </section>
    <section aria-labelledby="pf-min-projects" data-df-entrance="fade" data-pf-section="projects">
      <h2 id="pf-min-projects">Projects</h2>
      <ul class="pf-list">
        <li>
          <a href="#/projects/quill" data-router-link>Quill</a>
          <span>2026</span>
          <p>A Markdown editor that keeps every version, offline.</p>
        </li>
        <li>
          <a href="#/projects/rtl-kit" data-router-link>rtl-kit</a>
          <span>2024</span>
          <p>Bidirectional text, done right, for web components.</p>
        </li>
        <li>
          <a href="#/projects/margins" data-router-link>Margins</a>
          <span>2022</span>
          <p>Comments beside any web page, stored in your browser.</p>
        </li>
      </ul>
    </section>
    <section id="writing" aria-labelledby="pf-min-writing" data-df-entrance="fade" data-pf-section="writing">
      <h2 id="pf-min-writing">Writing</h2>
      <ul class="pf-list pf-writing">
        <li
          ><a href="#/writing/undo" data-router-link>Undo is a feature, not a stack</a
          ><time datetime="2026-10-02">Oct 2026</time></li
        >
        <li
          ><a href="#/writing/right-to-left" data-router-link>Right to left is not a mirror</a
          ><time datetime="2026-03-18">Mar 2026</time></li
        >
        <li
          ><a href="#/writing/quiet-notification" data-router-link>The quiet notification</a
          ><time datetime="2025-08-30">Aug 2025</time></li
        >
        <li
          ><a href="#/writing/ten-years" data-router-link>Ten years of text editors</a
          ><time datetime="2025-01-12">Jan 2025</time></li
        >
      </ul>
    </section>
    <blockquote class="pf-quote" data-df-entrance="fade"
      >Software should wait for you, not the other way round.</blockquote
    >
    <section aria-labelledby="pf-min-work" data-df-entrance="fade" data-pf-section="work">
      <h2 id="pf-min-work">Work</h2>
      <ol class="mk-resume-entries">
        <li class="mk-resume-entry">
          <div class="mk-resume-entry-body">
            <div class="mk-resume-entry-head">
              <h3 class="mk-resume-entry-title">Senior engineer, editor</h3>
              <p class="mk-resume-entry-org"><span>Ink &amp; Paper, Berlin</span></p>
              <p class="mk-resume-entry-when"><time datetime="2023">2023</time> - today</p>
            </div>
          </div>
        </li>
        <li class="mk-resume-entry">
          <div class="mk-resume-entry-body">
            <div class="mk-resume-entry-head">
              <h3 class="mk-resume-entry-title">Engineer</h3>
              <p class="mk-resume-entry-org"><span>Ghostline, Amman</span></p>
              <p class="mk-resume-entry-when"><time datetime="2019">2019</time> - <time datetime="2023">2023</time></p>
            </div>
          </div>
        </li>
      </ol>
    </section>
  </div>
  <article class="pf-column pf-page" data-pf-view="projects" aria-labelledby="pf-min-project-title" hidden>
    <p class="pf-back"><a href="#/projects" data-router-link>← All projects</a></p>
    <header class="pf-page-head">
      <p class="pf-meta"><span data-case="kind">Markdown editor</span> · <span data-case="year">2026</span></p>
      <h1 class="pf-page-title" id="pf-min-project-title" data-case="title">Quill</h1>
      <p class="pf-lede" data-case="summary">A Markdown editor that keeps every version, offline.</p>
    </header>
    <figure class="pf-figure">
      <img
        data-case-img="0"
        data-w="1200"
        data-h="750"
        src="images/photos/180-1200x750.webp"
        alt="A laptop beside an open notebook with wireframe sketches"
      />
    </figure>
    <dl class="pf-facts">
      <dt>Built with</dt>
      <dd data-case="stack">TypeScript, a CRDT, IndexedDB</dd>
      <dt>Status</dt>
      <dd data-case="status">Open source, about 2,400 people use it daily</dd>
    </dl>
    <section aria-labelledby="pf-min-what">
      <h2 id="pf-min-what">What it is</h2>
      <p data-case="brief"
        >Quill is a plain Markdown editor for people who write long things - theses, books, documentation. It saves
        every keystroke as history, so there is no Save button and no file you can lose.</p
      >
    </section>
    <section aria-labelledby="pf-min-how">
      <h2 id="pf-min-how">How it works</h2>
      <p data-case="work"
        >The document is a CRDT stored in IndexedDB; the history is the CRDT's own log, so scrolling back through a
        month of edits is reading, not reconstructing. Sync between devices is optional and goes through a relay that
        only ever sees encrypted changes.</p
      >
    </section>
    <section aria-labelledby="pf-min-now-project">
      <h2 id="pf-min-now-project">Where it stands</h2>
      <p data-case="result"
        >Version 2 shipped in September. The undo described in my October essay started here, before it moved to
        work.</p
      >
    </section>
    <nav class="pf-pager" aria-label="More projects">
      <a href="#/projects/margins" data-router-link data-case-link="prev"
        ><small>Previous</small><span data-case-title="prev">Margins</span></a
      >
      <a href="#/projects/rtl-kit" data-router-link data-case-link="next"
        ><small>Next</small><span data-case-title="next">rtl-kit</span></a
      >
    </nav>
  </article>
  <article class="pf-column pf-page" data-pf-view="writing" aria-labelledby="pf-min-essay-title" hidden>
    <p class="pf-back"><a href="#/writing" data-router-link>← All writing</a></p>
    <header class="pf-page-head">
      <p class="pf-meta"><time data-case="date">2 October 2026</time> · <span data-case="minutes">5 min read</span></p>
      <h1 class="pf-page-title" id="pf-min-essay-title" data-case="title">Undo is a feature, not a stack</h1>
    </header>
    <div class="pf-essay" data-case-paras="body">
      <p
        >Every editor I have worked on started with the same undo: a stack of the last hundred changes, popped one at a
        time. It works until two people edit the same document, or one person edits it on two devices - then the stack
        is a lie about whose change comes next.</p
      >
    </div>
    <p class="pf-signoff">- Noor</p>
    <nav class="pf-pager" aria-label="More writing">
      <a href="#/writing/ten-years" data-router-link data-case-link="prev"
        ><small>Previous</small><span data-case-title="prev">Ten years of text editors</span></a
      >
      <a href="#/writing/right-to-left" data-router-link data-case-link="next"
        ><small>Next</small><span data-case-title="next">Right to left is not a mirror</span></a
      >
    </nav>
  </article>
  <footer class="mk-footer" data-variant="simple">
    <div class="mk-footer-inner">
      <a class="mk-footer-brand" href="#/" data-router-link
        ><span class="mk-footer-brand-name">Noor Haddad<span>.</span></span></a
      >
      <ul class="mk-footer-links">
        <li><a href="#/projects" data-router-link>Projects</a></li>
        <li><a href="#/writing" data-router-link>Writing</a></li>
        <li><a href="mailto:noor@example.com">noor@example.com</a></li>
        <li><a href="https://github.com/" target="_blank" rel="noopener">GitHub</a></li>
        <li><a href="https://mastodon.social/" target="_blank" rel="noopener">Mastodon</a></li>
      </ul>
      <p class="mk-footer-copy">Last updated November 2026.</p>
    </div>
  </footer>
  <!-- the projects and essays the routes name, in order -->
  <script type="application/json" id="pf-minimal-pages">
    {
      "projects": {
        "quill": {
          "title": "Quill",
          "kind": "Markdown editor",
          "year": "2026",
          "stack": "TypeScript, a CRDT, IndexedDB",
          "status": "Open source, about 2,400 people use it daily",
          "summary": "A Markdown editor that keeps every version, offline.",
          "brief": "Quill is a plain Markdown editor for people who write long things - theses, books, documentation. It saves every keystroke as history, so there is no Save button and no file you can lose.",
          "work": "The document is a CRDT stored in IndexedDB; the history is the CRDT's own log, so scrolling back through a month of edits is reading, not reconstructing. Sync between devices is optional and goes through a relay that only ever sees encrypted changes.",
          "result": "Version 2 shipped in September. The undo described in my October essay started here, before it moved to work.",
          "images": [[180, "A laptop beside an open notebook with wireframe sketches"]]
        },
        "rtl-kit": {
          "title": "rtl-kit",
          "kind": "Web components",
          "year": "2024",
          "stack": "TypeScript, CSS logical properties",
          "status": "Maintained, used by three newsrooms",
          "summary": "Bidirectional text, done right, for web components.",
          "brief": "rtl-kit is a small set of web components and CSS rules for pages that mix Arabic or Hebrew with English: inputs, lists, breadcrumbs, a date picker and the icons that should and should not turn around.",
          "work": "Everything is written with logical properties, every user-typed string is isolated, and each component ships a test page that shows the wrong version beside the right one. There is no JavaScript where a CSS rule will do.",
          "result": "Three newsrooms use it for their Arabic editions, and two of its rules are now in a browser vendor's own guide to bidirectional layouts.",
          "images": [[4, "Hands writing in a notebook beside a laptop"]]
        },
        "margins": {
          "title": "Margins",
          "kind": "Browser extension",
          "year": "2022",
          "stack": "WebExtensions, IndexedDB",
          "status": "Retired in 2025, the code stays online",
          "summary": "Comments beside any web page, stored in your browser.",
          "brief": "Margins let you write notes beside any paragraph of any web page, the way you would in the margin of a book - and kept them on your own computer, not on a server.",
          "work": "Each note is anchored to a quote and its surrounding words, so it finds its place again after the page changes. Notes live in IndexedDB and can be exported as Markdown, one file per page.",
          "result": "It reached 9,000 readers before browsers changed their extension rules. I retired it rather than rebuild it on worse terms; the anchoring code lives on in Quill.",
          "images": [[201, "Glasses resting on a closed laptop on a wooden desk"]]
        }
      },
      "writing": {
        "undo": {
          "title": "Undo is a feature, not a stack",
          "date": "2 October 2026",
          "minutes": "5 min read",
          "body": [
            "Every editor I have worked on started with the same undo: a stack of the last hundred changes, popped one at a time. It works until two people edit the same document, or one person edits it on two devices - then the stack is a lie about whose change comes next.",
            "In a shared document, undo has to mean: take back what I did. Not: take back the last thing that happened. That sounds like a small difference. It is the difference between a colleague's paragraph surviving your Ctrl+Z and quietly disappearing.",
            "At Ink & Paper we rebuilt undo on top of the CRDT that already merges our edits. Each change records who made it and what it replaced; undo writes a new change that restores the old value, and it travels to everyone else like any other edit. Nothing is popped, nothing is rewritten.",
            "The surprise was how much else got simpler. Version history, restoring one paragraph and offline merges are now the same feature seen from three sides - which is what they always were."
          ]
        },
        "right-to-left": {
          "title": "Right to left is not a mirror",
          "date": "18 March 2026",
          "minutes": "6 min read",
          "body": [
            "When a product adds Arabic, someone usually flips the whole layout with one attribute and calls it done. Half of it works. The other half - the arrows, the progress bars, the numbers, the code - turns into a puzzle for the people it was meant for.",
            "Not everything should turn around. A play button points the way time runs, not the way the text runs. Phone numbers, code and most charts stay left to right inside a right-to-left sentence. A back arrow mirrors; a clock does not.",
            "The fix is mostly CSS: logical properties instead of left and right, a direction on the parts that hold text in another script, and isolation around anything a user typed. rtl-kit is that list turned into components, with a page that shows each rule wrong and right.",
            "The best review I ever got came from a reader in Amman: it feels like it was written in Arabic first. That is the bar - not a mirror of the English page, but a page that never needed one."
          ]
        },
        "quiet-notification": {
          "title": "The quiet notification",
          "date": "30 August 2025",
          "minutes": "4 min read",
          "body": [
            "Most notifications are written for the product's numbers, not for the person who gets them. They arrive at the wrong time, say too little to act on and too much to ignore, and each one teaches people to turn the next one off.",
            "We started counting how often a notification led to the thing it asked for. For our message about someone viewing your document, the answer was one in two hundred. We deleted it the same week, and nobody wrote in to ask where it went.",
            "The ones that survived share three rules: they name what changed, they can be answered without opening the app, and they wait. A comment on your paragraph can wait until you open the document; a request to approve a deadline cannot.",
            "Quiet is not the same as rare. It means the reader decides when the interruption happens, and the product earns the next one by being right about the last."
          ]
        },
        "ten-years": {
          "title": "Ten years of text editors",
          "date": "12 January 2025",
          "minutes": "7 min read",
          "body": [
            "I wrote my first editor in 2015: a textarea with a preview beside it. Since then I have worked on five more, and the textarea is still the hardest part to beat.",
            "The browser gives you selection, input methods for every script, spell checking, accessibility and undo for free - and all of them break the moment you replace the textarea with something cleverer. Most of my career has been putting those things back.",
            "What changed in ten years is not the hard parts but the expectations. People now assume an editor works offline, syncs between devices and never loses a word. Those are database problems wearing a text cursor.",
            "If I could tell the 2015 version of me one thing, it would be to read the input events specification before writing a line of code. It would have saved me about four years."
          ]
        }
      }
    }
  </script>
</div>
<script type="module">
  // df$ comes with the component bundle - a full-screen page loads it after this module
  addEventListener('DOMContentLoaded', () => {
    // light or dark: the switch writes the page's dark class (every look has both palettes); it follows the class when
    // something else sets it (the docs card follows the site's mode)
    const siteMode = df$('#pf-minimal [data-site-mode]');
    const syncMode = () => siteMode.prop('checked', document.documentElement.classList.contains('dark'));
    siteMode.on('change', () => {
      document.documentElement.classList.toggle('dark', siteMode.prop('checked'));
      document.dispatchEvent(new CustomEvent('defuss-theme-change'));
    });
    new MutationObserver(syncMode).observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
    syncMode();
  });
</script>
<script type="module">
  // routing: defuss-dom-router owns the address - the home page, its sections, a page per project and per essay
  import { createRouter } from 'https://cdn.jsdelivr.net/npm/defuss-dom-router@0.1.1/dist/index.js';

  addEventListener('DOMContentLoaded', async () => {
    const ROOT = '#pf-minimal';
    const site = df$(ROOT).get(0);
    // each kind of page is a view filled from the data block, at #/<kind>/<slug>
    const PAGES = JSON.parse(df$('#pf-minimal-pages').text());
    const SECTIONS = ['projects', 'writing', 'work'];
    const routes = [
      { id: 'home', path: '/' },
      { id: 'page', path: '/:kind/:slug' },
      { id: 'section', path: '/:section' },
      { id: 'missing', path: '*' },
    ];
    // a page from the data block: its texts, its paragraphs, its pictures, the pages before and after it
    const fill = (kind, slug) => {
      const items = PAGES[kind];
      const order = Object.keys(items);
      const item = items[slug];
      const at = order.indexOf(slug);
      const near = { prev: order[(at + order.length - 1) % order.length], next: order[(at + 1) % order.length] };
      const view = df$(ROOT + ' [data-pf-view="' + kind + '"]');
      view.find('[data-case]').each((_i, el) => {
        df$(el).text(item[el.dataset.case]);
      });
      view.find('[data-case-paras]').each((_i, box) => {
        const body = df$(box).html('');
        for (const text of item[box.dataset.caseParas]) body.append(df$('<p></p>').text(text));
      });
      view.find('[data-case-img]').each((_i, img) => {
        const [id, alt] = item.images[Number(img.dataset.caseImg)];
        df$(img)
          .attr('src', 'images/photos/' + id + '-' + img.dataset.w + 'x' + img.dataset.h + '.webp')
          .attr('alt', alt);
      });
      for (const [rel, to] of Object.entries(near)) {
        view.find('[data-case-link="' + rel + '"]').attr('href', '#/' + kind + '/' + to);
        view.find('[data-case-title="' + rel + '"]').text(items[to].title);
      }
    };
    const still = matchMedia('(prefers-reduced-motion: reduce)').matches;
    let shown = null;
    let last = null;
    // one view shown, the header marks where the reader is; a section route scrolls there, a new page opens at its top
    const show = (to) => {
      const { kind, slug, section } = to.params;
      const page = to.routeId === 'page' && Object.hasOwn(PAGES, kind) && Object.hasOwn(PAGES[kind], slug);
      const at = to.routeId === 'section' && SECTIONS.includes(section) ? section : null;
      const name = page ? kind : 'home';
      if (page) fill(kind, slug);
      df$(ROOT + ' [data-pf-view]').each((_i, view) => {
        view.hidden = view.dataset.pfView !== name;
      });
      const here = page ? '#/' + kind : at ? '#/' + at : null;
      df$(ROOT + ' .mk-header-nav a').each((_i, link) => {
        df$(link).attr('aria-current', link.getAttribute('href') === here ? 'page' : null);
      });
      // the page opens where its address says - at once, once its pictures have laid it out; a click glides there
      const target = at ? df$(ROOT + ' [data-pf-section="' + at + '"]').get(0) : shown ? site : null;
      const behavior = shown === name && !still ? 'smooth' : 'instant';
      const go = () => target?.scrollIntoView({ behavior, block: 'start' });
      if (!shown && document.readyState !== 'complete') addEventListener('load', go, { once: true });
      else go();
      shown = name;
      last = to;
    };
    // a link to where the reader already is leaves the address as it is - it still scrolls there
    df$(site).on('click', (event) => {
      const link = event.target.closest('a[data-router-link]');
      if (link && last && link.getAttribute('href') === (location.hash || '#/')) show(last);
    });
    // the page scrolls itself (to a section) - the router's own scroll would stop that glide
    const router = createRouter({
      mode: 'hash',
      scroll: 'manual',
      routes,
      prepare: ({ to }) => ({ commit: () => show(to) }),
    });
    router.attachLinks(site);
    if ((await router.start()).status === 'rejected') {
      // no address the router may own - a docs preview is an about:srcdoc frame: the same routes match its hash
      const preview = createRouter({ mode: 'hash', routes, baseUrl: 'https://preview.invalid/' });
      const follow = () => show(preview.resolve(location.hash.startsWith('#/') ? location.hash : '#/'));
      addEventListener('hashchange', follow);
      follow();
    }
  });
</script>
```

<DocText>Built from <DocLink href="resume-header.html">Resume Header</DocLink> (compact) with its status pill and <DocLink href="resume-entry.html">Resume Entry</DocLink>. The page sets its own paper palette (with a dark twin) and two typefaces; the quiet comes from the narrow measure, the details from type alone - a drop cap, outline figures and an outline initial, small caps, accent underlines. The ruled paper is a <DocLink href="surface.html">Surface</DocLink> drifting slowly (still under reduced motion); <code>shape-circle</code> is a <DocLink href="shapes.html">Shapes</DocLink> utility; <DocLink href="motion.html">Motion</DocLink>'s stagger fades the sections in.</DocText>

</DocPage>
