---
version: "alpha"
name: "Terminal Dossier"
description: "The visual and interaction system for Alex Pedersen's personal website."
colors:
background: "#181818"
surface: "#202020"
surface-alt: "#242424"
border: "#3a3a3a"
primary: "#edbc63"
on-primary: "#181818"
text: "#ffffff"
text-muted: "#c9c9c9"
code-background: "#242424"
focus: "#edbc63"
typography:
font-family: 'ui-monospace, "Cascadia Code", "Source Code Pro", menlo, monospace'
body-size: "1rem"
body-line-height: 1.6
heading-weight: 600
heading-size-tokens: [--heading-h1-size, --heading-h2-size, --heading-h3-size, --heading-h4-size, --heading-h5-size, --heading-h6-size]
spacing:
scale: [4px, 8px, 12px, 16px, 24px, 32px, 48px, 64px]
mobile-padding: 16px
desktop-padding: 64px
section-gap: 48px
row-padding: 24px
layout:
page-max-width: 900px
copy-max-width: 64ch
project-image-aspect: "2 / 1"
compact-control-size: 44px
shell-breakpoint: 700px
project-columns-breakpoint: 800px
motion:
duration-exit: 80ms
duration-press: 100ms
duration-fast: 150ms
duration-page: 200ms
easing-out: "cubic-bezier(0.23, 1, 0.32, 1)"
active-scale: 0.97
---
# Design for Alex Pedersen's website
## Overview
Help visitors inspect Alex's work, understand his technical focus, read a useful note, or find a contact link. The interface is a dark reading column with monospace type, square controls, gold links, restrained screenshots, and thin dividers. The work and writing provide the substance.
This is the canonical visual guide at [alexpedersen.dev/design.md](https://alexpedersen.dev/design.md). For identity and supported claims, use [brand.md](https://alexpedersen.dev/brand.md). For language, titles, and tone, use [voice.md](https://alexpedersen.dev/voice.md).
## Integrate with the existing site
- Use the shared page shell, CSS variables, focus states, and accessibility preferences described below.
- Reuse the established project and note rows, profile, focus areas, and contact patterns. Articles add summaries, FAQs, and related notes when relevant.
- Keep image treatment, typography, and navigation consistent across pages. Spanish is at `/` and English at `/en`.
- The frontmatter palette also describes the colors used in social preview images. Keep it aligned with the visible interface.
- This document describes the existing site. Keep new designs consistent with its observable patterns.
## Work in three passes
### Establish the page's purpose
Identify the existing route, content source, locale, and task the visitor needs to complete. A homepage shows selected work; archives expose projects or notes; an article presents its answer and supporting detail. Keep related content together and preserve the shared contact section.
### Reuse the visual system
Start with the shared shell and the closest existing component. Use the tokens below, preserve the document hierarchy, and check long titles and technical strings. Keep screenshots within their frames and let rows stack as the viewport narrows.
### Check the finished result
- Inspect a narrow viewport around `360px`, the `700px` shell change, the `800px` project split, and a wide desktop viewport.
- Check long headings, readable descriptions, image crops, wrapping contact links, and table or code overflow.
- Tab through links: the skip link, focus indicator, whole-row focus, and visible labels must work. Keep new-tab announcements for external project and contact links.
- Check hover only on devices that support it, active feedback, reduced motion, and increased contrast.
- Confirm that the published interface follows the documented tokens and patterns, and that its public guides remain readable as Markdown.
## Authoritative visual system
### Color and surfaces
| CSS token | Value | Current role |
| --- | --- | --- |
| `--c-bg` | `#181818` | Page canvas and dark text on gold |
| `--c-surface` | `#202020` | Available subtle surface token |
| `--c-surface-alt` | `#242424` | Media frames, code blocks, scrollbar tracks |
| `--c-border` | `#3a3a3a` | Dividers, frames, code and tag borders |
| `--c-accent` | `#edbc63` | Links, controls, focus, metadata, square bullets |
| `--c-text` | `#ffffff` | Headings and primary text |
| `--c-text-dim` | `#c9c9c9` | Descriptions and body paragraphs |
| `--c-text-muted` | `var(--c-text-dim)` | Secondary label alias |
The site declares a dark color scheme. Preserve solid surfaces, square geometry, and the existing accent. Project images retain their own colors inside the frame. Do not derive new interface palettes from them.
There are no card shadows, gradients used as decoration, glass surfaces, rounded controls, or light theme. The table overflow mask is a functional edge fade, not a decorative background.
### Typography
The interface uses `ui-monospace, "Cascadia Code", "Source Code Pro", menlo, monospace`. Page typography uses system fonts; social preview images use JetBrains Mono.
| Token | Value |
| --- | --- |
| `--fs-sm` | `0.875rem` |
| `--fs-base` | `1rem` |
| `--fs-md` | `clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem)` |
| `--fs-lg` | `clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem)` |
| `--fs-xl` | `clamp(1.75rem, 1.5rem + 1vw, 2rem)` |
| `--fs-2xl` | `clamp(2.5rem, 5vw, 3rem)` |
| `--fs-code` | `0.95em` |
Body weight is `400`, heading and control weight `600`. Body leading is `1.6`. Body size increases from `16px` to `17px` at `700px`, `17.5px` at `900px`, and `18px` at `1100px`. Heading sizes use root-relative units and do not inherit those body-size changes. Descriptions explicitly set to `--fs-base` stay `16px`. Metadata is `--fs-sm`, gold, with tabular numerals where applicable. The general `--fs-*` scale above remains available for non-heading text and controls.
#### Heading hierarchy
All semantic headings use the shared rules in `src/styles/headings.css`, imported once by `Layout.astro`. Each level has a dedicated `--heading-hN-size` token. Use the semantic level required by the document; never choose a tag for its appearance. Use one `h1` per HTML page and descend through consecutive levels within each section. A sibling section returns to its parent's level.
| Level / token | Size | At 375px / 1440px | Weight | Line height | Tracking | Case | Color | Default margin (top right bottom left) |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `h1` / `--heading-h1-size` | `clamp(2.25rem, 1.75rem + 2vw, 3rem)` | 36px / 48px | 600 | 1.1 | -0.02em | uppercase | `--c-text` | `0 0 24px 0` |
| `h2` / `--heading-h2-size` | `clamp(1.625rem, 1.375rem + 0.75vw, 2rem)` | 26px / 32px | 600 | 1.2 | 0.03em | uppercase | `--c-text` | `0 0 24px 0` |
| `h3` / `--heading-h3-size` | `clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem)` | 20px / 24px | 600 | 1.3 | 0 | authored case | `--c-text` | `0 0 16px 0` |
| `h4` / `--heading-h4-size` | `1.125rem` | 18px / 18px | 600 | 1.35 | 0 | authored case | `--c-text` | `0 0 12px 0` |
| `h5` / `--heading-h5-size` | `1rem` | 16px / 16px | 600 | 1.4 | 0 | authored case | `--c-text` | `0 0 8px 0` |
| `h6` / `--heading-h6-size` | `0.875rem` | 14px / 14px | 600 | 1.4 | 0.06em | uppercase | `--c-accent` | `0 0 8px 0` |
Pixel examples assume a `16px` root. All levels use the existing monospace stack, normal font style, balanced wrapping, `overflow-wrap: anywhere`, and `16px` scroll offset. Sizes remain strictly ordered at every viewport: h1 is at least 36px while h2 never exceeds 32px at the default root size. Long article titles use the same h1 rule as the homepage, archives, bio, privacy page, and 404 page; there is no mobile title-size exception or desktop h1 jump.
**Spacing and interaction exceptions:** `.section-title`, `.detail-title`, `.profile-name`, `.card-title`, and `.focus-area-category` use zero margins because their containers supply spacing. Section headers supply `32px` below `700px` and `24px` above it. Summary h2 has `8px` bottom margin; FAQ and related-note h2 have `16px`. These classes must not override heading size, leading, tracking, case, or weight. Linked card titles are gold and invert to dark text on a gold background on supported hover. Keyboard focus uses an immediate whole-row outline without image scaling or animated feedback. These interactions preserve the level's typography. Non-heading author and navigation names keep their separate compact styles.
**Prose rhythm:** h2 adds `48px` top margin, h3 `32px`, h4/h5 `24px`, and h6 `16px`. A heading that is the first child of `.prose` has no top margin. Bottom margins follow the table. Use real headings in Markdown (`##` through `######` inside articles); do not simulate headings with bold paragraphs. h4–h6 are reserved for deeper content; current published pages use h1–h3.
**Visual reference:** the following illustration shows all six levels at the desktop maximum, with default spacing and a short body-text sample. It is a specification illustration, not a screenshot of a published page.

```html
Technical notes
Automation setup
Workspace configuration
Authentication options
Token storage
Local environment
```
On homepages, section titles are h2 and row titles h3. On archives, the page title is h1 and row titles h2, so row typography follows that semantic promotion. Article summaries, prose sections, FAQ, related notes, and contact all share h2 typography. Focus categories use h3. The developer guide documents the regression command, and CI checks all built routes at nine viewport widths.
### Space and layout
The spacing variables are `--space-1: 4px`, `--space-2: 8px`, `--space-3: 12px`, `--space-4: 16px`, `--space-5: 24px`, `--space-6: 32px`, `--space-8: 48px`, and `--space-10: 64px`.
The shared shell has `16px` padding below `700px`. At `700px` it is centered with a `900px` maximum width and `64px` padding included in that width. Reading copy is bounded by `--copy-width: 64ch`.
Main sections use a `48px` gap. Divided lists use `24px` vertical row padding and a `1px` divider between rows, with no outer padding before the first or after the last row. Section heading spacing is `32px` below `700px` and `24px` above.
Projects stack image above text below `800px`. At `800px` they use two equal columns with a `32px` gap. Focus areas stack below `700px`; above that they use a category column up to `240px` and a `48px` column gap. Archive actions stay below lists, full-width below `700px` and content-width above.
### Profile and navigation
The homepage profile uses an uppercase name, optional handle, and the localized `intro` from the bio collection. Inner pages use a plain gold `<` followed by the compact name (`--fs-lg`) as one home link, without a box, fill, or border. The link has a minimum `44px` width and height for touch input. Notes add the same localized `intro` below that link at `--fs-sm` (14px), with a `12px` gap; the homepage biography stays at `--fs-base` (16px). The article or archive title remains the page's only h1. Do not repeat an author block within the article. Keep the description outside the home link so only the arrow and name act as navigation.
The compact home link turns gold and underlines its name on fine-pointer hover. Keyboard focus uses the shared visible `2px` gold outline without animation. The arrow is decorative (`aria-hidden`); the visible name and localized hidden home label identify the link. Preserve its existing `<` symbol. Keep other link and button labels free of directional arrows.
### Links and controls
Inline links are gold. In prose and biography content they have a `1px` underline with a `4px` offset. On fine-pointer hover, standard links invert to gold background and dark text.
`.control` is an outlined gold rectangle; `.control-primary` adds gold fill and dark text. Controls use uppercase monospace text, weight `600`, `1px` tracking, `--fs-md`, at least `44px` height, and `12px` horizontal padding. Hover fills the outlined variant and clears the filled variant. Press uses `scale(0.97)`.
Below `700px`, controls use `16px` type, `0.5px` tracking, `8px 12px` padding, and a `44px` minimum width and height. Text links stay in the surrounding prose rhythm rather than becoming button boxes.
Visible focus is a `2px` gold outline with a `2px` offset. Project and note links transfer that outline to the whole row. The skip link becomes visible when focused and targets the main content.
The existing `.tag` primitive is transparent, lowercase, `14px`, with a graphite border, gold text, `4px 12px` padding, and a `44px` minimum height. Do not turn tags into rounded pills.
### Work, notes, and contact
Project rows have a `2 / 1` image frame with `object-fit: cover`, graphite border, and dark fill. Project imagery uses a consistent crop within that frame. The title and year are gold; descriptions are muted and limited to `42ch`.
Each project row is one link to the project's external URL, opens a new tab, and includes an accessible announcement. Notes use text-only linked rows. Hover inverts the title treatment without filling the whole row; project media scales to `1.025` on supported hover. Keyboard focus uses an immediate whole-row outline without image scaling or animated feedback.
Focus areas use h3 category headings in authored case and wrapping `14px` items with `4px` gold square bullets. Contact is a wrapping prose sentence of external social links, not a button group. Preserve its inline punctuation and localized joiner.
### Article detail
The title divider uses `32px` padding and margin below it, reduced to `24px` on narrow screens. Author information lives in the shared site header above the article title. An optional answer summary follows the title. That summary has a `1px` gold border, white text, an h2 summary heading, and `16px` padding, reduced to `12px` below `700px`.
Article prose uses the shared reading width. Blockquotes use a `2px` gold left rule. Code blocks have graphite borders, dark alternate fill, `16px` padding, and horizontal scrolling. Tables also scroll horizontally; headers are small uppercase gold text above a `2px` gold rule, with graphite row dividers.
FAQ and related-note sections use the shared h2 headings and divided content. Article navigation follows related notes and uses the shared archive control to return to the notes list.
### Geometry, motion, and preferences
Use square edges throughout. Separate content through spacing, `1px` borders, and the existing dark fills. Do not add shadows or floating elevation.
Motion follows a purpose-first approach: use it to soften a page replacement or acknowledge a pointer action, keep frequent interactions short, and make keyboard actions immediate. The available timing tokens are `80ms` exit, `100ms` press, `150ms` fast, and `200ms` page, with `cubic-bezier(0.23, 1, 0.32, 1)`. Specify the properties that transition; do not use `transition: all`. Page navigation animates opacity only. Avoid slides, zooms, bounce, blur, or animated layout dimensions.
Initial page content appears immediately. Do not introduce page-load reveals, staggered entrances, mount fades or slides, or `@starting-style` entrance effects. View transitions apply only when navigating between pages.
#### Astro view transitions
All HTML pages share one Astro `ClientRouter` through `PageTransitions.astro` in `Layout.astro`. Pointer navigation crossfades the named `page-content` and `site-header` regions: the outgoing snapshots fade out in `80ms`, and the incoming snapshots fade in over `200ms`, concurrently, with no delay. The root and `site-contact` regions use `transition:animate="none"`. Snapshot groups do not animate position or size, so the header and contact section never fly between different page layouts. The profile uses its containing header region's identity.
Use a unique `transition:name` for each region. Match shared components by their role, and replace their DOM normally. Do not use `transition:persist` for the profile or contact section: locale-specific text, home links, biographies, and contact labels must update on navigation. Astro handles language attributes, page metadata, route announcements, and history scrolling; keep those built-in behaviors.
Keyboard and assistive activation skip the view-transition animation. Back and forward navigation also stays immediate. Register the input and lifecycle listeners once in a bundled module, record the decision for each navigation during `astro:before-preparation`, and call `event.viewTransition.skipTransition()` during `astro:before-swap`. Do not cancel navigation or replace the router's swap function just to remove animation. Keyboard focus styles are immediate, and keyboard activation does not scale controls or images.
Use `fallback="none"`: browsers without the native View Transition API keep full-page navigation. With JavaScript disabled, all links still work normally. External links, new-tab project links, downloads, and same-page fragments retain their normal behavior. New page-specific scripts should initialize on `astro:page-load`; avoid accumulating document-level listeners across swaps.
Verify every generated route in both locales, including note details, privacy, and 404. Check unique region names, metadata and language updates, keyboard and skip-link focus, route announcements, reduced motion, history and scroll restoration, interrupted navigation, unsupported browsers, and JavaScript-disabled navigation. Inspect transition pseudo-elements as well as ordinary elements when checking animation. These choices apply [Emil Kowalski's animation principles](https://emilkowal.ski/ui/you-dont-need-animations) alongside [Astro's view-transition guidance](https://docs.astro.build/en/guides/view-transitions/).
CI runs the Chromium navigation suite after building. Locally, start a preview on port `49174` and run `VIEW_TRANSITIONS_ORIGIN=http://127.0.0.1:49174 pnpm exec vitest run tests/view-transitions.test.ts`. Set `VIEW_TRANSITIONS_BROWSER=webkit` to repeat the same checks in WebKit, or `VIEW_TRANSITIONS_WIDTH=360` for a narrow touch viewport. The suite discovers all built HTML routes; the normal unit-test command skips it when no preview origin is provided.
Reduced motion skips navigation animations and removes press and image transforms while retaining pointer color, background, border, and opacity transitions at `80ms`. The reduced-motion CSS also disables view-transition pseudo-element animations. Keyboard focus remains immediate under every motion preference. Increased contrast changes borders to `#777777` and secondary text to `#ececec`. Reduced transparency disables backdrop filters; the normal interface already uses solid surfaces.
## Keep this guide accurate
Keep this guide aligned with the visible interface when tokens or shared patterns change. Preserve consistent colors across the site and social previews. Use the linked brand and writing guides for their respective subjects.
The organization of this guide was informed by [Vercel's design document](https://vercel.com/design.md): begin with the reader's task, integrate with the host project, then document the visual system and verification. Its brand, assets, CSS, and design rules do not define this website.