feat(experience): timeline status + career-break nodes, TLDR terminal node, prose measures

Timeline structure
- Spine drawn per node (.timeline-entry::before) instead of one line on .timeline, so it ends at
  the TLDR diamond; marker and spine centres coincide at x=6 (gutter 36 desktop / 28 mobile)
- TLDR terminal node: markup in ExperiencePage + Experience section, copy in i18n/strings.ts
  (experience.tldr / experience.tldrText), CSS .timeline-tldr* (stub, accent link, hollow
  diamond, chip, text)
- ExperienceEntry gains variant?: 'current' | 'gap'; the class is composed in JSX rather than
  hard-coding entry ids

Node decoration
- current node: TLDR-family panel (--bg-surface, 1px --border, radius-lg, whisper shadow) with a
  2px accent left edge, real entry padding (16/18/20, mobile 14/16/18) and a pulsing marker;
  mobile pulse capped at 6px spread so the ring never touches the panel border
- gap node: dashed spine (repeating-linear-gradient), 10px muted marker, no divider,
  italic-muted title and company

Data
- New relax-gap entry (Aug 2026 – Oct 2026) between open-to-work and lazada-senior-swe; unique
  entry ids; Nexts and SAP bullets aligned across VI/EN

Typography
- Add --measure-page (680px); .prose-wide / .lede-wide; .page-body 700 -> 680; philosophy grid
  3 columns, 2 at <=1024px

Cleanup
- Achievements dropped from the SPA timeline and their dead .achievement* rules deleted
  (.achievement-metric kept: projects pages still use it)

Resume generator
- "${exp.achievements?.map(...).join('')}" short-circuited the whole chain and printed the
  literal "undefined" in every PDF once an entry had no achievements; now (exp.achievements ?? [])

Docs: spec-ui-experience.md, spec-v3-typography.md, AGENTS.md

Verified: tsc -b clean; vite build green; oxlint 11 errors / 9 warnings (HEAD baseline was 15/9 —
the four that disappeared were the achievements markup findings); pnpm build:resume-all renders
both PDFs with the new ordering and no "undefined".
This commit is contained in:
dong.nguyen committed 2026-10-16 23:14:52 +07:00
1 parent d172843738
commit 166eb171b5
14 files changed
+609 -342

No files matched your search

+132 -51
View File
@@ -2,7 +2,7 @@
## Overview
Timeline hiển thị kinh nghiệm làm việc, tập trung vào achievements và impact.
Timeline hiển thị kinh nghiệm làm việc: role, company, duration/location và responsibilities. Achievements **không còn render trong SPA** (2026-10-16) — dữ liệu vẫn được `scripts/generate-resume.ts` dùng cho resume PDF.
---
@@ -11,24 +11,24 @@ Timeline hiển thị kinh nghiệm làm việc, tập trung vào achievements v
```
ExperienceSection
├── SectionHeading ("Experience")
└── ExperienceTimeline
└── ExperienceEntry (×N)
├── TimelineMarker
├── Company/RoleHeader
│ ├── Title
│ ├── Company
│ └── Duration
├── Responsibilities
│ └── List items
├── FeaturedAchievement (optional)
│ ├── AchievementTitle
│ ├── Context
│ ├── TechnicalWork
│ ├── Impact (with metrics)
│ └── Tags (technologies)
└── ExpandableDetails (optional)
└── ExperienceTimeline (.timeline)
├── ExperienceEntry (×N, newest-first) — entry có `current: true` nhận thêm class `.timeline-entry-current`
│ ├── TimelineMarker (.timeline-marker)
│ ├── TimelineHeader (.timeline-header)
│ │ ├── Title (.timeline-title)
│ │ ├── Company (.timeline-company)
│ │ └── Meta (.timeline-meta)
│ │ ├── Duration (.timeline-duration)
│ │ └── Location (.timeline-location)
│ └── Responsibilities (.timeline-responsibilities → li)
└── TldrNode (.timeline-tldr) — node chốt, luôn render sau entry cuối
├── Diamond marker (.timeline-tldr-marker)
├── Chip (.timeline-tldr-chip)
└── Text (.timeline-tldr-text)
```
`FeaturedAchievement` và `ExpandableDetails` không còn trong markup SPA — xem §Featured Achievement. Node TLDR là node cuối của timeline — xem §TLDR Terminal Node. Entry mới nhất là một *status*, không phải vai trò đã qua — xem §Current Status Node.
---
## Content Model
@@ -37,11 +37,14 @@ ExperienceSection
interface ExperienceEntry {
id: string;
title: string;
titleEn?: string;
company: string;
duration: string; // e.g. "2021 – Present"
duration: string; // e.g. "Jan 2020 – Aug 2026"
location?: string;
responsibilities: string[];
achievements?: FeaturedAchievement[];
responsibilitiesEn?: string[];
achievements?: FeaturedAchievement[]; // không còn trong data; resume vẫn render nếu có
variant?: 'current' | 'gap'; // 'current' = node đang sống, 'gap' = nghỉ giữa hai vai trò
}
interface FeaturedAchievement {
@@ -56,26 +59,23 @@ interface FeaturedAchievement {
}
```
Text của node TLDR **không** nằm trong `experience.ts`: nó là dẫn xuất của cả timeline chứ không phải một sự kiện, nên ở `src/i18n/strings.ts` — `experience.tldr` (nhãn chip) và `experience.tldrText` (câu tóm tắt).
---
## Layout
### Desktop
- Timeline line bên trái
- Entries bên phải timeline
- Mỗi entry: full-width card
- Featured achievement: nested card với accent border
- Metrics: highlight box (accent background, white text)
- Tags: row of pills
- Spine vẽ **theo từng node** (`.timeline-entry::before`, `left: -31px`, `bottom: -32px` bắc qua margin 32px) — không còn một đường liên tục trên `.timeline`, nên nó kết thúc đúng tại diamond của node TLDR thay vì chạy dài xuống dưới
- Gutter 36px (`padding-left`); marker 12px có tâm (x=6) nằm đúng trên tâm spine (5 + 1)
- Entry rhythm: 32px padding-bottom + 32px margin-bottom + 1px divider; node `gap` bỏ divider
- Bullet responsibilities: dot 5px (ring `--accent`, nhân `--accent-soft`), đặt tại `0.66em` để thẳng hàng x-height của dòng đầu
### Mobile
- Timeline line ẩn
- Entries: stacked cards
- Featured achievement: full-width nested card
- Metrics: inline highlight
- Tags: wrap pills
- ≤768px: spine và marker **được giữ** (trước đây bị ẩn) — gutter giảm còn 28px, marker `left: -28px`
- Entry rhythm giảm còn 24px
---
@@ -83,19 +83,78 @@ interface FeaturedAchievement {
| Variant | Style |
|---|---|
| Default | Circle, accent color, 12px diameter |
| Active (current role) | Circle, accent fill, 14px diameter |
| Completed | Circle, accent outline, 12px diameter |
| Current node (`variant: 'current'`) | 12px, `--accent` fill + `--accent` ring + pulse `timeline-status-pulse` (spread 0 → 10px `--accent-glow`) |
| Gap node (`variant: 'gap'`) | **10px**, `--border-strong` ring, `--bg-primary` fill — nhỏ hơn một bậc, không accent |
| Other entries | 12px, `--border-strong` ring, `--bg-primary` fill |
| Hover | Ring chuyển sang `--accent` |
---
## Current Status Node
Entry có `variant: 'current'` trong `experience.ts`: node "bây giờ". Nó dùng **cùng họ panel với node TLDR** — flat surface, hairline border, radius, whisper shadow — và khác đúng hai chỗ: cạnh trái accent và marker pulse.
| Phần | Style |
|---|---|
| Marker | fill `--accent`, border `--accent`, `animation: timeline-status-pulse 2.4s ease-out infinite` (spread 0 → 10px `--accent-glow`, cùng idiom `.greeting-dot` của hero). Mobile đổi `animation-name` sang `timeline-status-pulse-sm` (spread 0 → 6px) |
| Panel | Entry có padding thật `16px 18px 20px` (desktop) / `14px 16px 18px` (mobile) và **bỏ divider riêng** (`border-bottom: none`); `.timeline-entry-current::after` inset `-10px -10px -10px -8px` (desktop) / `-8px -8px -8px -4px` (mobile), `--bg-surface`, `1px solid --border` + `border-left: 2px solid --accent`, radius `--radius-lg`, shadow `inset 0 1px 0 --inset-highlight, 0 8px 20px -18px --shadow`, `z-index: -1` |
| Stacking | `isolation: isolate` trên entry — panel nằm **sau** text, bullet và đoạn spine của chính entry nhưng **trước** background của section |
| Trigger | `variant?: 'current' \| 'gap'` trong `ExperienceEntry`, class ghép `timeline-entry-${variant}` trong JSX — không hard-code `exp.id` |
Không có va chạm marker–panel và không có chữ sát viền:
| | Gutter | Border trái panel | Vòng pulse ngoài cùng | Chữ bắt đầu | Hở pulse | Hở chữ |
|---|---|---|---|---|---|---|
| Desktop | 36 | 36 − 8 = **28–30** | marker 0–12 + spread 10 = 22 | 36 + 18 = **54** | 6px | 24px |
| Mobile | 28 | 28 − 4 = **24–26** | marker 0–12 + spread 6 = 18 | 28 + 16 = **44** | 6px | 18px |
Spine ở x 5–7 nằm ngoài panel. `prefers-reduced-motion` toàn cục (`index.css:275`) flatten pulse về static, marker vẫn giữ halo của rule `:first-child`.
---
## Gap Node (Career Break)
Entry có `variant: 'gap'` — khoảng nghỉ giữa hai vai trò. Mục tiêu hình ảnh: **đọc ra là một khoảng trống**, không phải một công việc.
| Phần | Style |
|---|---|
| Spine | `.timeline-entry-gap::before` đổi sang `repeating-linear-gradient` — gạch 4px, hở 5px, màu `--border-strong`; chạy suốt chiều cao node rồi bắc qua margin 32px sang node kế tiếp |
| Marker | 10px ring `--border-strong`, nhân `--bg-primary`; `left: -35px` desktop (tâm = 36 − 35 + 5 = 6, vẫn đúng trên spine), `-27px` mobile (28 − 27 + 5 = 6) |
| Divider | bỏ (`border-bottom: none`) — đường gạch nối thẳng sang node kế |
| Title | `--text-muted` + `font-style: italic` |
| Company | `--text-muted` |
Không có accent, không có bed, không có pulse: node gap nhỏ hơn và mờ hơn mọi node việc. `:first-child` fill vẫn tồn tại trong CSS nhưng `.timeline-entry-gap .timeline-marker` đứng sau trong nguồn và có cùng specificity → gap thắng nếu một ngày node gap là node đầu.
---
## TLDR Terminal Node
Node cuối, luôn có, không đến từ `experiences`: toàn bộ timeline được gói lại trong một câu.
Intent: tĩnh và lặng. Không gradient, không viền accent đậm, không quầng mạnh. Accent chỉ nằm ở ba chỗ: diamond trên spine, link hairline và chip.
| Phần | Style |
|---|---|
| Marker | 12px square `rotate(45deg)` → diamond **ruột rỗng**: border 2px `--accent`, nhân `--bg-primary` (che luôn đoạn stub spine đi sau), halo `0 0 0 3px --accent-soft`; tâm vẫn nằm đúng trên spine (x=6) |
| Stub | `.timeline-tldr::before` 2px × 22px nối đoạn spine cuối xuống tâm diamond |
| Link | `.timeline-tldr::after` **1px** accent ngang 24px, từ diamond vào border panel; vẽ đè lên diamond nên khớp nối liền một màu |
| Panel | `--bg-surface` phẳng (không gradient), border 1px `--border`, radius `--radius-lg`, `inset 0 1px 0 --inset-highlight` + `0 8px 20px -18px --shadow` |
| Chip | mono 12px, `letter-spacing: 2px`, uppercase, `--accent`, **không** nền, không khung — cùng giọng với `.section-tag` |
| Text | `var(--text-lede)` 20px / 1.55; không khai báo màu → kế thừa `p` toàn cục (`--text-secondary`), giống mọi lede khác trong site |
Cột text: 636px (homepage: `.page-body` 680 − gutter 36 − padding 2×24) → ~74 ký tự/dòng; 668px trên `/experience` (752 − 36 − 48) → ~78 ký tự/dòng. Cả hai trong band 45–80.
---
## Featured Achievement
| Variant | Style |
| Scope | Status |
|---|---|
| Default | Accent left border (4px), padding, subtle bg |
| Metrics | Accent bg, white text, bold |
| Tags | Pill style, muted bg, muted text |
| SPA (`/experience` + homepage Experience) | **Removed 2026-10-16.** `.achievement`, `.achievement-title`, `.achievement-context`, `.achievement-impact`, `.achievement-metrics`, `.achievement-techs` deleted from `src/App.css`. |
| Resume PDF | Unchanged — `scripts/generate-resume.ts:100-115` and `public/resume-template.html:127-181` still render achievements. |
| Data / types | `achievements` in `src/data/experience.ts` and `FeaturedAchievement` in `src/types/index.ts` kept: the resume generator consumes them. |
| `.achievement-metric` | Kept — still used by `Projects.tsx:75` and `ProjectDetailPage.tsx:47`. |
---
@@ -103,19 +162,19 @@ interface FeaturedAchievement {
| Element | Size | Weight |
|---|---|---|
| Section heading (H2) | 40px / 32px mobile | 600 |
| Section heading (H2) | `clamp(24px, 4vw, 40px)` | 600 |
| Role title | 20px | 600 |
| Company | 16px | 400 |
| Duration | 14px | 400 |
| Responsibility | 14px | 400 |
| Achievement title | 18px | 500 |
| Impact metric | 16px | 600 |
| Duration / Location | 14px (chrome) | 400 |
| Responsibility | `var(--text-meta)` 15px / `var(--leading-body)` 1.65 | 400 |
Achievement title 18px and metric 14px/600 no longer appear on this section; `.achievement-metric` is chrome on the projects pages.
---
## Accessibility
- H2 section, H3 entry titles
- H2 section; entry titles hiện render bằng `div`, chưa phải `h3`
- Semantic `<time>` cho duration
- `aria-label` cho timeline
- Metrics: semantic highlight, không chỉ màu
@@ -125,9 +184,11 @@ interface FeaturedAchievement {
## Animation
- Timeline line draw từ trên xuống khi scroll vào viewport
- Entries fade-in stagger (150ms delay)
- Featured achievement: accent border appear
- Mỗi entry reveal độc lập: `initial {opacity: 0, y: 24}` → `whileInView {opacity: 1, y: 0}`, `viewport {once: true, amount: 0.2}`, `duration 0.45s`, `ease easeOut`, `delay i * 0.08`
- `staggerChildren` trên section bị bỏ: nó cộng hưởng với `delay: i * 0.15` của từng child, khiến entry ở giữa trang xuất hiện muộn không cần thiết
- Hover **không còn transform nào**. `scale: 1.02` làm text re-raster hoá trong lúc animation chạy; `y: -4` cũng bị bỏ — spine là `::before` của chính entry, nâng entry sẽ nâng cả đoạn spine và làm lệch khớp nối. Phản hồi hover chuyển hết sang CSS: marker ring → `--accent`, divider → `--border-strong`
- Spine không "draw" khi scroll: mỗi node tự vẽ đoạn của mình; node TLDR kết thúc chuỗi bằng stub 22px dừng đúng tại tâm diamond
- Reduced motion: `main.tsx` đặt `motion.config.reducedMotion = 'user'`, cùng `@media (prefers-reduced-motion: reduce)` trong `src/index.css`
---
@@ -135,10 +196,11 @@ interface FeaturedAchievement {
| State | Description |
|---|---|
| Default | Normal render |
| Hover | Entry subtle lift (shadow) |
| Scroll reveal | Fade-in + slide-up |
| Reduced motion | Disable animations |
| Default | Marker ring `--border-strong`, divider `--border` |
| Hover | Marker ring → `--accent`, divider → `--border-strong` (không còn transform) |
| Scroll reveal | Fade-in + slide-up, một lần (`once: true`) |
| Reduced motion | Animation tắt theo user preference |
| Current status node | Marker pulse 2.4s + bed `--accent-soft` với border-left accent |
---
@@ -146,5 +208,24 @@ interface FeaturedAchievement {
- Data-driven từ `experience.ts`
- Entries có thể 0 → render empty state
- Featured achievements là optional trong entry
- `achievements` đã bị xoá khỏi `experience.ts`; field vẫn optional trong type, và `scripts/generate-resume.ts:100` vẫn render nó nếu có (optional chaining → resume PDF hiện không còn phần achievement)
- Không hard-code entry count
---
## Implementation record (2026-10-16)
- Achievements removed from `src/pages/ExperiencePage.tsx` and `src/components/sections/Experience.tsx`; the `.achievement*` rules that lost their only consumers were deleted. `.achievement-metric` stays (projects pages).
- Timeline restyled: spine vẽ theo node (`.timeline-entry::before`), marker/spine centres aligned exactly (36px gutter desktop, 28px mobile), 32px / 24px entry rhythm, filled current-role marker with `--accent-soft` halo, hover states on marker and divider, `.timeline-meta` single row (duration · location), 5px accent bullets at `0.66em`.
- Motion: per-entry `whileInView` reveal; mọi hover transform đã bỏ (spine là `::before` của entry, lift làm lệch khớp nối).
- TLDR terminal node: text tại `src/i18n/strings.ts:42-46` — `tldr` = `TL;DR` cho cả hai ngôn ngữ, `tldrText` = "15 years of experience, more than 5 companies along the way. Too long to tell." / "15 năm kinh nghiệm, hơn 5 công ty đã đi qua. Quá dài để kể hết."; markup tại `src/pages/ExperiencePage.tsx:39-43` và `src/components/sections/Experience.tsx:56-60`; CSS tại `src/App.css` (`.timeline-tldr`, `::before`, `::after`, `-marker`, `-chip`, `-text`).
- Current status node: `current?: boolean` thêm vào `ExperienceEntry` (`src/types/index.ts:50`); entry `open-to-work` tại `src/data/experience.ts:4-21` ("Nov 2026 – Present", `current: true`); class ghép tại `src/pages/ExperiencePage.tsx:17` và `src/components/sections/Experience.tsx:30`; CSS `.timeline-entry-current` + `@keyframes timeline-status-pulse` trong `src/App.css`.
- `experience.ts` giờ có 4 entry (open-to-work, Lazada 01/2020–08/2026, Nexts 06/2019–12/2019, SAP 2017–12/2019), newest-first ✓. Ba entry cũ trùng nhau `id: "senior-swe"` → trùng React key; đã đổi thành `lazada-senior-swe`, `nexts-founder`, `sap-senior-swe`, và sửa `Nexts Limted` → `Nexts Limited`.
- Bốn điểm dữ liệu chủ sở hữu cần tự xác nhận — tôi không tự sửa vì không có nguồn trong repo: (1) `sap-senior-swe` có `responsibilitiesEn` **5 bullet copy nguyên từ entry Lazada** (IoT-DWS 16 sortations, Scrum Level L3) trong khi bản VI chỉ 2 bullet, nên switch ngôn ngữ đổi cả nội dung lẫn độ dài; (2) `nexts-founder`: VI 1 bullet chung chung, EN 1 bullet cụ thể về autonomous vehicles — cũng lệch nhau; (3) TLDR nói *15 năm / hơn 5 công ty* còn dữ liệu là 2017→2026 (~9–10 năm) với 3 nhà tuyển dụng + 1 công ty tự lập; (4) `open-to-work` ghi "Nov 2026 – Present" trong khi hôm nay là 2026-10-16, và Lazada kết thúc 08/2026 → còn trống 09–10/2026.
- Verified: `tsc -b` exit 0; `vite build` green. Built CSS contains `.timeline-entry:before{…bottom:-32px;left:-31px}` (mobile `bottom:-24px;left:-23px`), `.timeline-entry:first-child:before{top:12px}`, `.timeline-entry:last-child:before{bottom:0}`, the whole `.timeline-tldr` set (`:before` stub, `:after` link, `-marker` diamond, `-chip`, `-text`) and **no** global `.timeline:before`. oxlint 11 errors / 9 warnings — identical to before this change; the HEAD baseline was 15/9 and the four that disappeared were `useField`-in-callback findings removed together with the achievements markup.
- Still open from this spec (intent not implemented): semantic `<time>` for duration, `aria-label` on the timeline, entry titles as `h3` (they render as `div`), spine draw-on-scroll, keyboard navigation between entries.
- Gap node `relax-gap` ("Nghỉ ngơi" / "Relax", `Aug 2026 – Oct 2026`, `Career break`) tại `src/data/experience.ts:20-35`, chèn đúng giữa `open-to-work` (Nov 2026 – Present) và `lazada-senior-swe` (Jan 2020 – Aug 2026) → hết khoảng trống 09–10/2026 đã nêu ở mục trên. `current?: boolean` được thay bằng `variant?: 'current' \| 'gap'` (`src/types/index.ts:50`), class ghép trong JSX; CSS `.timeline-entry-gap` + `::before` dashed + marker 10px trong `src/App.css`. Đã sửa thêm `duration` của Lazada: `"Jan 2020 – Aug 2026"` (hai khoảng trắng) → một khoảng trắng.
- Resume PDF **có** render node gap (dòng "Relax — Career break" trong `dist/resume.pdf`). Đó là quyết định của chủ sở hữu: nếu muốn timeline SPA có nghỉ còn resume thì không, chỉ cần đổi `renderExperience(experiences)` thành `renderExperience(experiences.filter(e => e.variant !== 'gap'))` tại `scripts/generate-resume.ts:159`.
- Verified lần cuối (sau khi thêm gap node): `tsc -b` exit 0; `vite build` xanh. Built CSS có `.timeline-entry-gap:before{background:repeating-linear-gradient(to bottom,var(--border-strong) 0px,var(--border-strong) 4px,transparent 4px,transparent 9px)}`, `.timeline-entry-gap{border-bottom:none}`, `.timeline-entry-gap .timeline-marker{width:10px;height:10px;left:-35px}` + bản mobile `left:-27px`, và title/company muted với `font-style:italic`. oxlint vẫn 11 errors / 9 warnings. `pnpm build:resume-all` chạy thành công; text của `dist/resume.pdf` và `dist/resume-vi.pdf` không chứa chuỗi `undefined`.
- Va chạm hình ảnh do chủ sở hữu báo cáo: **border trái của bed chồng lên vòng pulse của marker**. Trước đây desktop `left: -14px` → border tại x 22, đúng bằng peak pulse (marker 12px + spread 10px); mobile còn tệ hơn — border tại x 14, nằm trong vùng marker 0–12 cộng halo 4px (tới 16). Nay desktop `left: -10px`, mobile `left: -2px` → border nằm tại x 26–28 ở cả hai breakpoint, hở 4px so với pulse. Built CSS xác nhận: `.timeline-entry-current:after{…inset:-12px -14px 20px -10px}` và bản mobile `left:-2px`.
- Báo cáo của chủ sở hữu: trên mobile, chữ của node đầu **sát mép trái** của decoration (gutter 28 nên border accent ở 26–28 chạm đúng chỗ chữ bắt đầu). Cách sửa: node `current` giờ được trang trí **cùng họ với node TLDR** — panel `--bg-surface` + `1px solid --border` + radius `--radius-lg` + whisper shadow, cạnh trái vẫn là accent 2px — và entry có padding thật (desktop `16px 18px 20px`, mobile `14px 16px 18px`) nên chữ nằm *trong* panel (24px desktop / 18px mobile tính từ border). Divider riêng của node bị bỏ; border của panel đóng khung. Pulse mobile giảm spread 10 → 6px (`timeline-status-pulse-sm`) để vòng pulse dừng ở x 18, panel border ở 24–26. Built CSS: `.timeline-entry-current{…padding:16px 18px 20px;border-bottom:none}` + `:after{…inset:-10px -10px -10px -8px}` và hai override mobile `padding:14px 16px 18px`, `inset:-8px -8px -8px -4px`.
+19 -10
View File
@@ -46,7 +46,7 @@ Reading bands used: 45-75 characters (Bringhurst), 38-80 (Butterick). Before: 11
## 3. Decisions
1. **Font: admit `system-ui`.** `--sans` becomes `system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif`. No webfont is loaded; the Source Sans 3 woff2 files stay in `public/fonts/` because `scripts/generate-resume.ts` reads them from disk for the PDF. (User's call: keep the current look rather than restyle the whole site.)
2. **Five scale tokens** in `:root`: `--text-body: 18px`, `--text-lede: 20px`, `--text-meta: 15px`, `--leading-body: 1.65`, `--measure-prose: 600px`. They live in `:root` only — sizes do not differ between dark and light, so they are not duplicated in the light block or the media bridge.
2. **Scale tokens** in `:root`: `--text-body: 18px`, `--text-lede: 20px`, `--text-meta: 15px`, `--leading-body: 1.65`, `--measure-prose: 600px`, `--measure-page: 680px` (added in the second pass, §3.10). They live in `:root` only — sizes do not differ between dark and light, so they are not duplicated in the light block or the media bridge.
3. **Reuse `.prose`** (`App.css`, previously defined and never rendered by any component) as the prose system instead of inventing a second convention.
4. **Role sizes.** Body copy 18px/1.65 everywhere a paragraph is the main content; lead paragraphs 20px/1.55; dense secondary copy (timeline bullets, achievement context and impact, expertise skill lists, card summaries, contact sub-labels) 15px/1.65. Literal 12-14px stays reserved for chrome: `.tag`, `.badge`, `.achievement-metric`, `.footer-text`, `.footer-link`, `.timeline-duration`, `.project-card-cta`, `.lang-toggle`, `pre`.
5. **Heading sizes**: `h3` 24 → **21px**, and `h4` 18 / `h5` 16 / `h6` 15 made explicit (they previously fell back to 16px). `h1`/`h2` clamps and the global `h1-h6 { line-height: 1.2 }` are untouched.
@@ -54,12 +54,14 @@ Reading bands used: 45-75 characters (Bringhurst), 38-80 (Butterick). Before: 11
7. **Headings carry their own top margin** (`.subheading { margin-top: 32px }`, `.prose h3 { margin-top: 1.5em }`, `.philosophy-quote h3 { margin-top: 0 }`); lead paragraphs carry no bottom margin. Sibling margins collapse, so each gap is a single value rather than a sum.
8. **No inline `fontSize` / `lineHeight` / `fontWeight` / text `color` in components.** Layout-only inline styles (`flex`, `gap`, motion `style={{y}}`) are allowed.
9. **Delete dead CSS and the unused `Card` component** rather than leaving unstyled scaffolding behind (list in §4.2).
10. **Second pass (user feedback, 2026-10-16): two measures instead of one.** 600px read too small on `/philosophy`, and on `/about` the 600px lede sat above a wider grid — the ragged right edge looked like a defect rather than a measure. `--measure-page: 680px` now governs page columns (`.page-body`, `.prose-wide`, `.lede-wide`); `--measure-prose: 600px` stays for long-form narrative (`.prose` on `/projects/:id`). A wider column is paid for with a larger body, not a longer line: `.prose-wide p` uses `--text-lede` 20px / 1.6 → 79 characters per line (still inside the 45-80 band), where 680px at 18px would be 88.
11. **`/about` §1 and the homepage About section move to `container-wide`** with `.philosophy-grid` at `repeat(3, 1fr)` — the same column model as `.expertise-grid` (3 → 2 at ≤1024px → 1 at ≤768px) — so both halves of `/about` carry equal weight. The `.page-body` wrapper is gone from both (the bio, subheadings and grids are direct children of the section); the bio uses `.prose-lede lede-wide` and stays at 680px. `profile.philosophy` has 5 cards → rows of 3 + 2.
## 4. Implementation details
### 4.1 `src/index.css`
- `:root` token block: `--max-narrow` deleted; added the five scale tokens after `--max-content`.
- `:root` token block: `--max-narrow` deleted; the scale tokens added after `--max-content` (five in the first pass, `--measure-page` in the second).
- `--sans` → system stack (finding P5). `--mono` unchanged (it already ends in `ui-monospace, monospace`, so it resolves without a download).
- `h3 { font-size: 21px }`; new `h4 { 18px }`, `h5 { 16px }`, `h6 { 15px }`.
- `p { font-size: var(--text-body); line-height: var(--leading-body); color: var(--text-secondary); }` — was implicit 16px / 1.7.
@@ -79,9 +81,11 @@ Prose system (rewritten in place of the dead `.prose` block):
.prose li { margin-bottom: 8px; color: var(--text-secondary); font-size: var(--text-body); line-height: var(--leading-body); }
.prose blockquote { …unchanged… }
.prose-lede { max-width: var(--measure-prose); font-size: var(--text-lede); line-height: 1.55; }
.page-body { max-width: 700px; }
.prose-wide { max-width: var(--measure-page); } .prose-wide p { font-size: var(--text-lede); line-height: 1.6; }
.lede-wide { max-width: var(--measure-page); } .page-body { max-width: var(--measure-page); }
.subheading { margin: 32px 0 12px; }
.philosophy-quote + .philosophy-quote { margin-top: 48px; }
.philosophy-quote p { text-align: justify; }
.philosophy-quote h3 { margin-top: 0; }
.project-section { background/border/radius/padding 16px; margin-bottom: 16px; inset highlight; }
.project-section h4 { margin-top: 0; } .project-section p { font-size: var(--text-meta); line-height: var(--leading-body); }
@@ -114,8 +118,8 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
| File | Change |
|---|---|
| `src/pages/PhilosophyPage.tsx` | whole body: `aria-labelledby="philosophy-heading"` matched by `<SectionHeading id="philosophy-heading">`; quotes wrapped in `<div className="prose">` → `<div className="philosophy-quote">` → plain `<h3>` + `<div dangerouslySetInnerHTML>` (no outer `<p>`, so the injected `<p>` blocks are no longer nested); inline styles and the stale "Placeholder for expanded content" comment removed |
| `src/pages/AboutPage.tsx`, `src/components/sections/About.tsx` | `maxWidth:'700px'` div → `.page-body`; bio → `.prose-lede`; both `<h3>` → `.subheading` |
| `src/pages/PhilosophyPage.tsx` | whole body: `aria-labelledby="philosophy-heading"` matched by `<SectionHeading id="philosophy-heading">`; quotes wrapped in `<div className="prose prose-wide">` → `<div className="philosophy-quote">` → plain `<h3>` + `<div dangerouslySetInnerHTML>` (no outer `<p>`, so the injected `<p>` blocks are no longer nested); inline styles and the stale "Placeholder for expanded content" comment removed |
| `src/pages/AboutPage.tsx`, `src/components/sections/About.tsx` | `maxWidth:'700px'` div → `.page-body` (first pass) → wrapper removed entirely (second pass): bio, `.subheading` titles and both grids are direct children of the section; bio → `.prose-lede lede-wide`; `/about` §1 section `container-content` → `container-wide` |
| `src/pages/ProjectDetailPage.tsx` | back link → `.back-link`; summary → `.prose-lede`; narrative wrapped in `.prose`; four `marginBottom:'32px'` block wrappers unwound (rhythm now comes from `.prose h3`); four `<h3 style>` → plain `<h3>`; section cards → `.project-section` with plain `<h4>` / `<p>` |
| `src/pages/ExperiencePage.tsx`, `src/components/sections/Experience.tsx` | impact div → `.achievement-impact`; metrics wrapper → `.achievement-metrics`; `maxWidth:'700px'` → `.page-body` |
| `src/pages/ContactPage.tsx`, `src/components/sections/Contact.tsx` | label divs → `.link-label`; sub-labels → `.contact-link-sub`; `maxWidth:'700px'` → `.page-body` |
@@ -127,8 +131,8 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
| File | Change |
|---|---|
| `src/index.css` | token block (5 added, `--max-narrow` deleted), `--sans`, `h3`-`h6`, `p`, `.container-narrow` deleted |
| `src/App.css` | prose system added/rewritten, 10 selectors retuned, `.download-resume-button` added, ~170 lines of dead CSS deleted |
| `src/index.css` | token block (`--max-narrow` deleted, six scale tokens), `--sans`, `h3`-`h6`, `p`, `.container-narrow` deleted |
| `src/App.css` | prose system added/rewritten, 10 selectors retuned, `.download-resume-button` added, `.philosophy-grid` 2 → 3 columns + a new ≤1024px breakpoint, ~170 lines of dead CSS deleted |
| 8 page/section TSX files | inline type styles → classes (see §4.3) |
| `src/components/ui/Card.tsx` | deleted |
| `src/components/index.ts` | `Card` export removed |
@@ -147,6 +151,11 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
- [x] Philosophy page: prose column, paragraph spacing, no nested `<p>`, ARIA id wired
- [x] Inline type styles removed from the 8 TSX files — gate `style=\{\{[^}]*(fontSize|lineHeight|fontWeight|color|maxWidth)` over `src/` → 0 matches
- [x] `tsc -b` + `vite build` green after the TSX sweep
- [x] Second pass: `--measure-page: 680px`, `.prose-wide`, `.lede-wide`, `.page-body` switched to the token
- [x] `/philosophy` column 600 → 680px with body 20px/1.6 (79 chars/line, was 78 at 600px/18px)
- [x] `/about` §1 → `container-wide`; `.philosophy-grid` 3 columns matching `.expertise-grid`; `.page-body` wrapper removed from About + AboutPage; bio → `.prose-lede lede-wide`
- [x] Re-verified: `tsc -b` exit 0, `vite build` green; built CSS carries `.philosophy-grid{grid-template-columns:repeat(3,1fr)}`, the `@media (width<=1024px)` 2-column rule, and `.lede-wide,.page-body{max-width:var(--measure-page)}`
- [x] Third pass (user feedback): quote paragraphs justified — `.philosophy-quote p { text-align: justify }` — so the 680px column reads flush on both edges. Column width and measure are unchanged (680px @ 20px = 79 characters per line); only the line-breaking rule changed. `<html lang>` is kept in sync by `useLanguage`, so screen readers and hyphenation follow the active language.
- [ ] Manual browser pass (§7) on `/`, `/about`, `/experience`, `/projects`, `/projects/:id`, `/philosophy`, `/contact`, dark and light
## 7. Verification plan
@@ -158,8 +167,8 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
oxlint against HEAD and against the working tree produce identical diagnostics (15 errors / 9 warnings): every one is pre-existing — oxlint treats the `useField` / `useFieldArray` helpers in `src/i18n/useField.ts` as hooks, plus `Navigation.tsx:26` `set-state-in-effect`. Out of scope here.
4. Manual, real browser (no headless, per project rule):
- `/philosophy`: three paragraphs visibly separated, ~600px column, 18px body, quote title 21px, no wall of text.
- `/about`: bio 20px capped at 600px, section titles 21px, cards unchanged in width.
- `/philosophy`: three paragraphs visibly separated, 680px column, 20px body, justified right edge (watch for rivers/loose word spacing), quote title 21px, no wall of text.
- `/about`: §1 and §2 the same width (1152px); bio 20px at a 680px column; philosophy cards 3 columns (~368px) matching the expertise cards — 5 cards render 3 + 2.
- `/projects/:id`: narrative capped at 600px, section cards keep their box, h4 16px over 15px body.
- `/experience`: bullets and impact 15px/1.65, achievement title 18px/1.3.
- `/contact`: sub-labels 15px, tile labels 500 weight.
@@ -171,7 +180,7 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
|---|---|
| Body copy 16 → 18px makes every page taller | Only role-defined body copy moved; chrome (tags, badges, pills, footer, timeline meta) kept at 12-14px. Review `/experience` and `/projects` heights. |
| Deleting `.form-*`, `.filter-*`, `.article-*`, `.engineering-tabs*`, `.breadcrumb*`, `.page-header`, `.card*` removes scaffolding that `spec-v2-blog.md` and `spec-v3-ui-enhancements.md` plan to use | Those specs keep the design intent; the CSS is re-written when the feature actually ships, together with its markup. Nothing in `src/` referenced them. |
| 600px prose column looks narrower than the 752px container | Intentional: 78-83 characters per line instead of 110-118. `.container-content` still sizes the page; `.prose` sizes the reading column inside it. |
| A 680px page column inside a 752px / 1152px container leaves whitespace on the right | Intentional: the measure band is 45-80 characters per line, and 680px @ 20px is 79. Widening the text further would need 22px body copy, which flattens the 21px heading scale. Grids and cards use the full container; text does not. On `/philosophy` the visible ragged edge is resolved by justifying the paragraphs instead of widening the column — the cost is looser word spacing / possible rivers on short lines, checked in the manual pass. |
| No responsive type scale | Unchanged from before (there was none). 18px on a 320-375px viewport yields 40-50 characters per line, which is comfortable; revisit only if the manual pass says otherwise. |
| `.prose li` at body size could look large in dense lists | Only `.prose` lists are affected; `.expertise-skills` and `.timeline-responsibilities` are outside `.prose` and stay at 15px. |