> **Parent:** `spec-v3-theme-colors.md` (supersedes its palette section)
> **Priority:** P1
> **Estimate:** ~1.5 hours
> **Status:** Implemented. All 13 registered bugs (B1–B13) fixed in source; `tsc -b` clean, grep gate clean, palette verified in a production build. `pnpm build` end-to-end is blocked by a container lock on `dist/` (see §6), and the visual pass is the user's in a real browser.
---
## 1. Source extraction — gasatrya.com
Evidence: `https://gasatrya.com/_astro/Layout.Dha3C6DX.css` (Tailwind v4 `@theme` output, 95 641 bytes) plus raw HTML of `/`, `/about/`, `/work/`, `/services/`, `/blog/`, `/guides/`.
The site is **light-only** — no `data-theme`, no `prefers-color-scheme`, no `dark:` variant anywhere in its CSS or HTML. The dark palette below is therefore *derived* from the site's own dark-tone values found in its CSS bundle (`#202423`, `#272a28`, `#2a3028`, `#b7aea0`, `#eee5d7`), not copied from a live dark mode.
### 1.1 Declared theme tokens
| Tailwind token | Value | Role on the site |
|---|---|---|
| `--color-neutral` | `#f6f5f2` | Page background (warm off-white), `bg-neutral` on every section |
| `#2468b7`, `#d1b77c`, `#9bb18c`, `#f5eee3`, `#eee5d7`, `#b7aea0`, `#756b62`, `#7c302b`, `#302a25`, `#272a28`, `#202321`, `#202423`, `#4a4840` | Arbitrary Tailwind values present in the bundle but **not used on any fetched page** | Secondary warm/gold/sage palette + dark panel tones; used as the reference set for the derived dark theme |
### 1.3 Measured contrast of the source palette
| Pair | Ratio | WCAG |
|---|---|---|
| `#151914` on `#f6f5f2` | 16.31 | AAA |
| `#151914` on `#ffffff` | 17.78 | AAA |
| `#6b6d68` on `#f6f5f2` | 4.80 | AA |
| `#6b6d68` on `#ffffff` | 5.23 | AA |
| `#ef4444` on `#f6f5f2` | **3.45** | **fail AA** (needs 4.5 for body text) |
| `#ef4444` on `#ffffff` | **3.76** | **fail AA** |
| `#ffffff` on `#ef4444` | **3.76** | **fail AA** for button text |
Finding: gasatrya.com's accent red is only AA-safe for large/bold text. Their accent text is 10–12 px uppercase semibold, which is *not* WCAG "large text". Adopting `#ef4444` verbatim into our system would put body-size links and CTA labels below AA. Decision in §3: keep the source hue, split it into an **AA-safe functional accent** plus a **vivid red used only for tints/glows** (`rgba` fills, shadows, gradients — where contrast rules do not apply to text).
---
## 2. Current state of our theme system
`src/index.css` declares four palette blocks (`:root` dark default, `[data-theme='light']`, `prefers-color-scheme: dark`, `prefers-color-scheme: light`). Token audit over `src/App.css` + `src/index.css` + all `src/**/*.tsx`:
| `--accent-active` | **0** | Declared, never used |
| `--error` | **0** | Declared, never used |
### 2.1 Bug register found during the audit
Every item below is reproduced from source text, not inferred. B1 and B2 are the two blocking bugs; the palette migration cannot be trusted until they are fixed, because both bypass the token system.
| ID | Bug | Evidence | Severity |
|---|---|---|---|
| **B1** | **Light mode renders invisible hero text on mobile.** Inside the `max-width: 768px` block, `.hero-name` is hardcoded `#ffffff` and `.hero-title` / `.hero-tagline` / `.hero-greeting` are hardcoded `#e0e0e0`. In light mode the page canvas is a light warm white, so white-on-light text. Repro: light theme, viewport ≤ 768 px, route `/`. | `src/App.css:635, 639, 642` | **P0** |
| **B2** | **The primary CTA and the hero name ignore the theme system entirely.**`.btn-primary` uses `linear-gradient(135deg, #1d4ed8, #2563eb, #60a5fa)` with `rgba(96,165,250,0.3/0.4/0.3)` shadows and `color: #ffffff`; `.name-highlight` repeats the same blue gradient; `.btn-secondary:hover` uses `rgba(96,165,250,0.1)`. Re-valuing `--accent` leaves the two most visible elements on the page blue — the palette change would look half-applied. | `src/App.css:209, 210, 212, 216, 218, 222, 234, 483` | **P0** |
| B3 | Accent-fill text hardcoded white. With `--text-on-accent: #151914` in the new dark theme, these rules keep `#ffffff` on `#f87171` → 3.76:1, below AA. | `src/App.css:210, 216, 288, 316, 729, 774, 1053, 1392, 1506` (9 sites; see B13) | P1 |
| B4 | `.social-link` border is `rgba(255,255,255,0.15)` — invisible on a light canvas. (`.hero-photo` has no border; the original row named the wrong selector.) | `src/App.css:380` | P1 |
| B5 | `@keyframes pulse-dot` hardcodes `rgba(52,211,153,0.4)`, so the status dot's glow stays emerald even when `--success` changes. | `src/App.css:478-479` | P2 |
| B7 | `.skip-link` uses literal `white` instead of the accent ink token. | `src/index.css:271` | P2 |
| B8 | Dead palette block: `@media (prefers-color-scheme: dark)` restates `:root` byte-for-byte, so it can never change a value. | `src/index.css:63-79` | P3 |
| B10 | Spec record inaccurate: `spec-v3-theme-colors.md` checks off "`body` has 180deg gradient", "Hero has radial glow overlay above" and `--bg-gradient-start/end`, but no such variables, `body` gradient or `.hero::before` exist in `src/index.css` / `src/App.css` today. Actual depth comes from `.section::before` using `var(--bg-primary)`. §3.4 decides **not** to re-introduce a body gradient. | `spec-v3-theme-colors.md:72-124, 179-181` vs `src/index.css:1-98`, `src/App.css:408-421` | P3 |
| B11 | `.nav` sets `backdrop-filter: blur(12px)` over an opaque `var(--bg-surface)`; the blur has no effect without alpha. | `src/App.css:6-8` | P3 |
| B12 | First-paint flash: `useTheme` writes `data-theme` during React render, so an OS-light visitor is painted dark until hydration. | `src/hooks/useTheme.tsx:34-39`, `index.html:9-11` | P2 |
| **B13** | Audit miss, later caught by the grep gate: `.form-input:focus` / `.form-textarea:focus` painted a blue focus ring `rgba(96,165,250,0.1)`, and two further accent-fill sites (`.filter-pill.active`, `.back-to-top`) carried `#ffffff`. | `src/App.css:1351, 1392, 1506` | P1 |
> **Correction 2026-10-17.** `--accent-soft` and `--accent-glow` no longer take their hue from the third red `#ef4444`. The site now has two palettes, so both are derived from **the accent in force**: red-dark `rgba(248,113,113,0.12)` / `rgba(248,113,113,0.30)`, red-light `rgba(176,65,56,0.10)` / `rgba(176,65,56,0.22)`, blue-dark `rgba(96,165,250,0.12)` / `rgba(96,165,250,0.30)`, blue-light `rgba(37,99,235,0.1)` / `rgba(37,99,235,0.22)`. The **alpha** values in the tables below are unchanged — only the hue source moved. Record: `spec-v3-theme-palette-switch.md` §5 "Red, re-derived" and its §10 decision 1.
| `--accent-tint` | `#f5e3e1` | **opaque** panel = `--accent-soft` composited over `--bg-primary`; masks the conic lazer under `.download-resume-lazer-inner`. Accent text on it 4.63 |
**Layering invariant:**`luminance(--bg-primary) < luminance(--bg-surface) < luminance(--bg-elevated)` must hold in both themes — dark `0.0091 < 0.0169 < 0.0224`, light `0.9131 < 0.9566 < 1.0000`. A first draft of this spec put `--bg-elevated: #fbfaf7` below `--bg-surface: #ffffff` in light mode, which would have made `.card-elevated` and the resume dropdown read as recessed instead of raised; corrected above.
### 3.3 Dark theme (derived, same hue family)
Inversion rule: `on-surface` becomes the canvas, `neutral` becomes the text; surfaces step up through the site's own dark tones `#202423` → `#272a28`; accent moves up the red ramp to red-400 so it clears AA on dark.
| Token | Value | Contrast on `--bg-primary` / `--bg-surface` |
| `--accent-tint` | `#2f1e1a` | **opaque** panel = `--accent-soft` composited over `--bg-primary`; needed because a translucent panel cannot mask the conic lazer under `.download-resume-lazer-inner`. Accent text on it 5.74 |
| `--code-bg` | `#1a1e1b` | 15.47 with `--text-primary` |
| `--success` | `#4ade80` | 10.20 / 9.01 |
| `--success-glow` | `rgba(74,222,128,0.35)` | |
| `--error` | `#fca5a5` | 9.37 / 8.27 |
| `--warning` | `#fbbf24` | 10.65 / 9.40 |
| `--grid-color` | `rgba(246,245,242,0.06)` | |
| `color-scheme` | `dark` | |
`--accent` and `--error` intentionally share the red family (the source design does the same: accent red-500 + danger red-700). `--error` is currently unused in code; when it is used it must be paired with an icon/label, not color alone.
### 3.4 Explicit non-goals
- **No body gradient.** `spec-v3-theme-colors.md` planned `--bg-gradient-start/end` on `body`; those variables never landed. The source site uses a *flat* warm canvas plus hairline rules for depth. Keep flat, keep `.section::before`.
- **No `light-dark()` / `oklch()` rewrite.** Hex + `rgba()` keeps the palette readable and dependency-free.
- **No rename of existing tokens.** Existing names stay; only values change, plus 8 additive tokens (`--text-on-accent`, `--accent-soft`, `--accent-glow`, `--accent-tint`, `--border-strong`, `--inset-highlight`, `--success-glow`, `--warning` — additive only, nothing removed except dead code in §4.2).
- **`public/resume-template.html` keeps its print palette.** A PDF must stay ink-on-white; only the ink hexes are re-tinted (§5, optional item).
---
## 4. Implementation Details
### 4.1 `src/index.css` — replace lines 1-98
New structure: **one dark block + one light block + one media bridge** (removes the byte-duplicate dark media block).
`@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { … } }` is **deleted**: its values are identical to `:root`, so it can never change anything.
`.skip-link` (`src/index.css:265-275`): `background: var(--accent); color: white;` → `color: var(--text-on-accent);`. **Closed:** the block was deleted in the working tree, no component renders `.skip-link`, and `strings.skipLink` has been removed too — `grep -i skip` over `src/` → 0 matches.
`useTheme` sets `data-theme` during React render (`src/hooks/useTheme.tsx:39`), i.e. after hydration. Before that the CSS default (dark) paints, so an OS-light visitor sees a dark flash. Add before the module script:
| 635, 639, 642 | mobile `@media` hero | `#ffffff`, `#e0e0e0` | `var(--text-primary)`, `var(--text-secondary)` — **light mode currently renders white text on a light canvas** |
| 766 | `.download-resume-options` | `var(--bg-surface)` | `var(--bg-elevated)` — floating menu is the top layer |
| 835 | `.download-resume-lazer-inner` | `var(--bg-surface)` | `var(--accent-tint)` — **opaque**, so it masks the conic sweep and the lazer shows only in the 2 px ring |
**In scope (B11).**`.nav` (`src/App.css:6`) sets `backdrop-filter: blur(12px)` over an opaque `var(--bg-surface)`, so the blur cannot read. `background: color-mix(in srgb, var(--bg-surface) 85%, transparent);` makes it meaningful in both themes.
### 4.4 Brand consistency (in scope)
-`public/favicon.svg`: replace `#863bff` with brand red `#ce1126`**twice** — the `fill="#863bff"` attribute and `style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"`. The `color(display-p3 …)` clause is deleted rather than guessed at, because a display-p3 triple is not an sRGB triple; `style="fill:#ce1126;fill-opacity:1"` is the honest form.
-`public/resume-template.html`: retint print inks only — `#1a1a1a → #151914`, `#4a4a4a → #4b4f4a`, `#666 → #6b6d68`, `#888 → #756b62`, `#f0f0f0 → #efece6`, `#ccc → #d9d6d0`. Print output stays ink-on-white; no dark background in the PDF.
-`public/icons.svg` stays **out of scope**: it hardcodes `#08060d` / `#aa3bff` but is not referenced anywhere in `src/` (every component inlines `currentColor` SVGs). Separate cleanup if it is ever used.
---
## 5. Affected Files
| File | Change |
|---|---|
| `src/index.css:1-98` | Replace 4 palette blocks with 2 blocks + 1 media bridge; add 8 tokens; add `color-scheme`; delete dead dark media block |
| `src/index.css:265-275` | `.skip-link` color → token — **moot**: the block was deleted in the working tree and the class is not rendered |
| `index.html:8-11` | Insert theme-init script |
| `src/App.css` | 24 hardcoded-color replacements (209-234, 288, 316, 380, 478-479, 483, 635-642, 729, 758, 774, 1053, 1351, 1392, 1506) + inset highlight on the card model (since deleted as dead code) + `.nav` alpha + Download Resume panel (718, 735-738, 766, 835) |
| `docs/design/specs/v3/spec-v3-theme-colors.md` | Mark palette section superseded by this document |
| `src/hooks/useTheme.tsx` | No change |
| `public/resume-template.html` | Print-ink retint per §4.4 (in scope) |
| `public/favicon.svg` | `#863bff` → `#ce1126` in the `fill` attribute and the inline `style` (in scope) |
| `src/App.css:6` | `.nav` background alpha so `backdrop-filter` works — B11 (in scope) |
---
## 6. Progress Tracking
- [x] Source palette extracted from live CSS bundle + 12 page HTMLs
- [x] Current token usage audited (26 declared / 24 used / 2 dead)
- [x] Spec written with target light + dark palettes
- [x] Design decisions approved: full red adoption, dark CSS default, flat solid CTA, red-family `--error`, scope = nav alpha + resume print inks + favicon brand red
- [x] Go-ahead to edit source files
- [x]**B1** fixed — mobile hero text now `var(--text-primary)` / `var(--text-secondary)` (`src/App.css:637, 641, 644`). On-screen confirmation is the user's step below.
- [x]**B2** fixed — `.btn-primary` flat `var(--accent)` + `var(--text-on-accent)`, hover `var(--accent-hover)`, all three shadows `var(--accent-glow)`, `.btn-secondary:hover``var(--accent-soft)`, `.name-highlight``linear-gradient(135deg, var(--accent), var(--accent-active))`
- [x]**B3** fixed — 9 accent-fill sites now `var(--text-on-accent)`: `.btn-primary` 210/217, `.badge-accent` 289, `.tag-accent` 317, `.download-resume-summary:hover` 731, `.download-resume-option:hover` 776, `.achievement-metric` 1055, `.filter-pill.active` 1394, `.back-to-top` 1508. The original audit listed 5; the grep gate caught the rest (see B13)
- [x]**B4** fixed — selector corrected: the `rgba(255,255,255,0.15)` border was on `.social-link`, not `.hero-photo` (`.hero-photo` has no border). Now `1.5px solid var(--border-strong)` (`src/App.css:382`)
- [x]**B5** fixed — `@keyframes pulse-dot` uses `var(--success-glow)` and `transparent` (`src/App.css:480-481`); the custom property resolves against the animated element `.greeting-dot`
- [x]**B9** closed — `--accent-active` now has a consumer (`.name-highlight` gradient stop, dark press ramp); `--error` is defined in both themes and held in reserve for error states, always paired with an icon or label
- [x]**B10** closed — superseded banner added at the head of `spec-v3-theme-colors.md`
- [x]**B11** fixed — `.nav` background `color-mix(in srgb, var(--bg-surface) 85%, transparent)` (`src/App.css:6`); the compiled rule also carries `-webkit-backdrop-filter`
- [x]**B12** fixed — inline theme-init script at `index.html:8-20`, runs before first paint
- [x]`src/index.css` palette rewritten — `:root` dark default (2-51), `:root[data-theme='light']` (54-79), `@media (prefers-color-scheme: light)` bridge for `:root:not([data-theme='dark'])` (82-109); 8 new tokens + `color-scheme`
- [x] Card inset highlight applied — `.card` base, `.card:hover`, `.card-elevated` — **superseded**: the whole `.card*` block was deleted as dead code in the typography pass (`spec-v3-typography.md` §4.2); `--inset-highlight` is still consumed, by `.project-section`
- [x]**B13** fixed — late-found hardcoded values from the grep gate: blue focus ring `rgba(96,165,250,0.1)` → `var(--accent-soft)` (`src/App.css:1351`)
- [ ]`pnpm lint` clean — **not clean, and not from this change**: 15 errors + 9 warnings at the time, every one in a `.tsx` file this change never touched (`react-hooks(rules-of-hooks)` on `useField` / `useFieldArray` called inside callbacks). Modified files are `src/App.css`, `src/index.css`, `index.html`, `public/favicon.svg`, `public/resume-template.html` and two spec documents. Update 2026-10-16: after the achievements markup was removed from the timeline the count is **11 errors / 9 warnings** — the four that disappeared were `rules-of-hooks` findings inside that markup
- [ ]`pnpm build` end-to-end — blocked by an environment lock, not by the palette: Vite's `emptyDir` throws `EPERM` on `dist\assets` because `docker-compose.yaml:7` mounts `./dist:/usr/share/nginx/html:ro`. Proof the sources build: `pnpm exec vite build --outDir dist-verify` → 538 modules transformed, 26.15 kB CSS, no errors (temp out dir deleted)
- [ ] Verified in real browser (user): `/`, `/projects`, `/projects/:id`, `/experience`, `/contact`, `/philosophy`, mobile ≤768px, both themes
- [x] Acceptance, code half: grep gate (`#[0-9a-fA-F]{3,8}\b|rgba?\(`) returns **zero** matches in `src/App.css` and in `src/index.css` outside the three palette declaration blocks
- [x]`public/favicon.svg` — Vite's violet `V` recoloured to brand red `#ce1126`. The masked violet/blue gradient ellipses were dropped rather than recoloured: faking a red gradient across 17 blurred ellipses buys nothing at 16 px, and the `color(display-p3 …)` clause was deleted instead of guessed at
- [x]`public/resume-template.html` print inks retinted (§4.4) — 29 declarations. Mapping extended with `#999 → #756b62` and `#eee → #e3e1dc` so the 8 pt footer stays ≥ AA on white
- [x] Decision record complete in §9
- [x] Acceptance, contrast half: re-measured from the final `src/index.css` with a WCAG relative-luminance script over the `:root` blocks — **light: 0 AA failures**; **dark: 1 failure** (`--accent-active``#ef4444` = 4.17 on `--bg-surface`, 3.85 on `--bg-elevated`), fixed by re-valuing it to `#f06060` → 5.54 / 4.89 / 4.52. `--text-primary` 16.31 in both themes (≥ 7.0); layering invariant holds (dark 0.0091 < 0.0169 < 0.0224, light 0.9131 < 0.9566 < 1.0000)
- [x] Second pass (user feedback): light ramp softened to `#b04138` / `#a8382f` / `#9b3229`; dark `--accent-soft` 0.16 → 0.12
- [x] Second pass: Download Resume — `.download-resume-summary``background: transparent` (removes the UA buttonface gray that sat behind the red label), `.download-resume-summary.open` → solid accent + `--text-on-accent`, `.download-resume-options` → `var(--bg-elevated)`; the panel tint itself is corrected in the third pass below
- [x] Re-measured after the second pass: dark min 4.52, light min 4.60, **zero AA failures**, including the accent label on the tinted resume panel (4.63 light / 5.74 dark) and white ink on the new light accent (5.74)
- [x] Rebuilt after the second pass: `tsc -b` exit 0; `vite build` 538 modules, 26.04 kB CSS — built CSS carries `#b04138`, `#a8382f`, `#9b3229` (×2 each: light block + media bridge) and `#f06060`, with no `#b91c1c`, no `#7f1d1d`, no blue
- [x] Third pass (user feedback): the translucent `--accent-soft` panel let the conic lazer sweep show through the whole button — replaced with the new **opaque** token `--accent-tint` (light `#f5e3e1`, dark `#2f1e1a`) on `.download-resume-lazer-inner` (`src/App.css:835`), so the sweep is visible only in the 2 px ring
- [x] Third pass verified: `tsc -b` exit 0; `vite build` → 26.11 kB CSS; compiled rule is `.download-resume-lazer-inner{…background:var(--accent-tint)…}` and the built CSS carries `#2f1e1a`×1 and `#f5e3e1`×2 (light block + bridge). Accent label on the solid tint: 4.63 light / 5.74 dark; primary ink on it 14.36 / 14.58
- [x]**B7** closed — the `.skip-link` rules were deleted from `src/index.css` in the working tree (not by this change), no component renders the class, and `strings.skipLink` has since been removed as well; nothing left to tokenize or delete
1.`pnpm lint` and `pnpm build` — no type/lint regressions.
2. Grep gate: `#[0-9a-fA-F]{3,8}` and `rgba(` must return **zero** matches in `src/App.css` and `src/index.css` outside the palette declaration blocks.
3. Contrast re-measure from the final file (script over `:root` blocks) — all pairs re-verified numerically.
4. Manual, in a real browser (per project rule, no headless verification): toggle dark ↔ light on each route; check nav, cards, tags, badges, code blocks, `.name-highlight` gradient text, mobile hero, `.theme-toggle`, focus rings; reload with OS light and no stored preference to confirm no dark flash.
## 8. Risks
| Risk | Mitigation |
|---|---|
| Accent hue change blue → red shifts the site's whole identity | Accent is the only hue change; surfaces/text stay neutral. Review on `/projects` grid and hero before wider rollout. |
| `--accent` vs `--error` both red | `--error` unused today; icon+label required wherever introduced |
| Removing the dark media block changes no-JS behavior | `:root` already carries the dark palette; block is value-identical, so behavior is unchanged |
| `color-scheme` changes native scrollbar/form colors | Intended; verify `.form-input`/`.form-textarea` in both themes |
| `var()` inside `@keyframes pulse-dot` | Custom properties resolve against the animated element; `.greeting-dot` inherits the theme block. Fallback if a browser misbehaves: keep two literal rgba values in the keyframes |
## 9. Open Questions
1.~~Light `--accent`: `#b91c1c` or brand flag red `#CE1126`?~~**DECIDED: `#b91c1c`** (Tailwind red-700) at the time of writing — **now superseded by decision 9**, which moved the light ramp to `#b04138 / #a8382f / #9b3229` after the user found the original too heavy. `#CE1126` stays available as a brand-only value for `public/favicon.svg` / og images (§4.4).
2.~~Keep the vivid `#ef4444` visible anywhere in the UI?~~**DECIDED: no literal `#ef4444` in text or fills.** It survives only as `rgba(239,68,68,…)` inside `--accent-soft` / `--accent-glow`. Correction made during implementation: the dark press token shipped as **`#f06060`**, not `#ef4444` — measured `#ef4444` was 4.17 on `--bg-surface` and 3.85 on `--bg-elevated` (below AA); `#f06060` measures 5.54 / 4.89 / 4.52 and still reads as a pressed, more saturated red against the `#f87171` base.
- **Correction 2026-10-17:** the `rgba(239,68,68,…)` composites no longer survive either. Both were re-derived onto the accent in force — `rgba(248,113,113,…)` dark, `rgba(176,65,56,…)` light — so no `#ef4444` remains in any form (`spec-v3-theme-palette-switch.md` §5, decision 1 in its §10).
3.~~Adopt gasatrya's architectural hairline grid?~~**DEFERRED** to a separate v3 layout spec. Keep the current 60 px `.hero-bg-grid`; only its `--grid-color` value changes.
4.~~Identity shift blue → red?~~**DECIDED: full red adoption.** All 63 `--accent` consumers move onto the red ramp and every blue value is removed from `src/` (CTA gradient, `.name-highlight` gradient, blue `--grid-color`, blue glow shadows).
5.~~CSS default theme?~~**DECIDED: keep dark as the `:root` default.**`useTheme.getInitialTheme()` and the §4.2 init script both resolve the OS preference, so the CSS default only governs the no-JS baseline. Zero structural churn.
7.~~`--error` hue?~~**DECIDED: keep the red family** (light `#991b1b`, dark `#fca5a5`), mirroring the source's accent-red-500 / danger-red-700 split. Rule attached: `--error` must always ship with an icon or label, never color alone.
8.**Scope confirmed for this pass:** B11 nav translucency, `public/resume-template.html` print-ink retint, `public/favicon.svg` → brand red `#CE1126`. Hairline grid (item 3) deferred.
9.~~Light accent / hover / active too strong?~~**DECIDED (second pass, user feedback): the light ramp moved one step lighter** — `#b91c1c / #991b1b / #7f1d1d` → **`#b04138 / #a8382f / #9b3229`** (L 0.133 / 0.114 / 0.094, hue 4°, saturation ~45% — a warm brick instead of maroon). Ratios 5.26 / 5.50 / 5.74 on canvas / surface / elevated, 4.87 on `--code-bg`, white ink on the accent 5.74. **Ceiling recorded:** on a `#f6f5f2` canvas AA caps accent luminance at L ≤ 0.164, so the lightest usable red is ≈`#c4453c` (4.52 on canvas but 4.17 on `--code-bg` → rejected). Anything lighter than ≈`#bf4a41` fails AA as *text*; the source `#ef4444` is 3.45. A lighter look must therefore come as fill + ink, not as text.
10.**Download Resume panel (second + third pass).**`.download-resume-summary` is a `<button>` with no `background` declaration, so the UA `buttonface` gray painted behind the red label → `background: transparent` (`src/App.css:718`). The panel behind it was first set to `var(--accent-soft)`, which the user correctly rejected: **a translucent background cannot mask the spinning conic lazer** (`.download-resume-lazer-border` / `-glow` are `inset: -200%` siblings under the panel), so the sweep showed across the whole button instead of only the 2 px ring. Final state: a new **opaque** token `--accent-tint` (light `#f5e3e1`, dark `#2f1e1a` — the exact composite of `--accent-soft` over `--bg-primary`) on `.download-resume-lazer-inner` (`:835`), which masks the sweep and leaves the ring. Open state fills solid `var(--accent)` with `--text-on-accent` (`:735-738`); the floating menu `.download-resume-options` → `var(--bg-elevated)` (`:766`). Dark `--accent-soft` 0.16 → 0.12 (`.btn-secondary:hover`, focus ring only now). Accent text on the tint: 4.63 light / 5.74 dark.
---
## 10. Implementation record (shipped, 2026-10-16)
### 10.1 Files changed
| File | Lines | Change |
|---|---|---|
| `src/index.css` | 292 | Palette rewritten: `:root` dark default (2-51), `:root[data-theme='light']` (54-79), `@media (prefers-color-scheme: light)` bridge on `:root:not([data-theme='dark'])` (82-109). Value-identical `@media (prefers-color-scheme: dark)` block deleted; `color-scheme: dark` / `light` added; 8 additive tokens; every surface, ink, accent, border, shadow, code, status and grid value now matches §3 |
| `src/App.css` | 1533 | 24 hardcoded colors replaced by tokens (209-234, 288, 316, 380, 478-479, 483, 635-642, 729, 758, 774, 1053, 1351, 1392, 1506); `.nav` background `color-mix(in srgb, var(--bg-surface) 85%, transparent)` so `backdrop-filter` reads (B11); inset highlight added to the card model (that `.card*` block was later deleted as dead code in the typography pass, and `--inset-highlight` now backs `.project-section`); `@keyframes pulse-dot` → `var(--success-glow)` / `transparent`; `.name-highlight` gradient `var(--accent) → var(--accent-active)`; mobile hero inks → text tokens; Download Resume panel (718, 735-738, 766, 835) |
| `public/favicon.svg` | 485 B | Rewritten to the V monogram in brand red `#ce1126`; Vite's masked ellipses and the `color(display-p3 …)` clause removed |
| `public/icons.svg` | — | Out of scope: hardcodes `#08060d` / `#aa3bff` but is referenced from no file in `src/` |
### 10.2 Review passes
| Pass | Trigger | Outcome |
|---|---|---|
| 1 | Self-audit after the first rewrite | Contrast script found one AA failure: dark `--accent-active``#ef4444` = 4.17 on `--bg-surface`, 3.85 on `--bg-elevated` → re-valued to `#f06060` (5.54 / 4.89 / 4.52) |
| 2 | User: light accent too strong | Light ramp `#b91c1c / #991b1b / #7f1d1d` → `#b04138 / #a8382f / #9b3229`; dark `--accent-soft` 0.16 → 0.12; UA `buttonface` gray under the Download Resume label killed with `background: transparent` (`src/App.css:718`); `.download-resume-summary.open` given a solid accent fill; `.download-resume-options` → `var(--bg-elevated)` |
| 3 | User: the transparent button let the lazer show across the whole button | Root cause: the masking panel had the **translucent**`var(--accent-soft)`, so the `inset: -200%` conic sweep under it painted through the entire surface. New **opaque** token `--accent-tint` (`#f5e3e1` / `#2f1e1a` = `--accent-soft` composited over `--bg-primary`) on `.download-resume-lazer-inner` (`src/App.css:835`); the sweep is now visible only in the 2 px ring of `.download-resume-lazer-wrapper` |
### 10.3 Verification log (final run)
-`pnpm exec tsc -b` → exit 0.
-`pnpm exec vite build --outDir dist-verify` → 538 modules, `index.css` 26.11 kB (gzip 5.46 kB), built in 137 ms, no errors; temp out dir deleted after every run. `pnpm build` itself is still blocked by the `dist/` mount in `docker-compose.yaml:7`.
- Built-CSS hex census: `#b04138`, `#a8382f`, `#9b3229`, `#f5e3e1`, `#e3e1dc`, `#d9d6d0`, `#f6f5f2`, `#fbfaf8`, `#efece6`, `#991b1b`, `#b45309`, `#15803d`, `#ffffff` all ×2 (light block + bridge); `#2f1e1a`, `#f87171`, `#fca5a5`, `#f06060`, `#b7aea0`, `#8f9a8e`, `#4ade80`, `#fbbf24`, `#3a403a`, `#2a3028`, `#272a28`, `#202423`, `#1a1e1b`, `#151914` (×4: dark ink + dark `--text-on-accent` + shadow composites) once per dark block. Alpha composites appear as 8-digit hex (`#ef44441f` = `--accent-soft` dark, `#ef444438` = `--accent-glow`, `#15191412` = light `--shadow`, `#00000073` = dark `--shadow`, `#ffffffe6` = light `--inset-highlight`). No `#b91c1c`, no `#7f1d1d`, no `#96 165 250`-family blue. The only remaining literal `#fff` / `#000` pairs belong to `src/assets/vite.svg`'s own `<style>` block, not to the theme.
- **Correction 2026-10-17** (the census above predates the palette switch): the alpha composites are now `#f871711f` / `#f871714d` (dark `--accent-soft` / `--accent-glow`) and `#b041381a`×2 / `#b0413838`×2 (light soft/glow, once in the light block and once in the bridge). No `#ef4444` in any form remains, and the `#96 165 250` blue family now appears legitimately — but only inside the two `data-palette='blue'` blocks and their own preview token (`#2563eb`), never in a red block.
- **Gate ranges after the palette switch (2026-10-17):** `src/App.css` still 0 hex/`rgba()` matches; `src/index.css` literals are confined to `2-150` (the four palette blocks plus the preview block) and the bridge `152-180`. The new menu block `src/App.css:190-367` is token-only.
- Contrast (WCAG relative-luminance script over the final `:root` blocks): **light min 4.60, dark min 4.52, zero AA failures**. `--text-primary` 16.31 both themes. Accent on the opaque tint 4.63 (light) / 5.74 (dark); primary ink on the tint 14.36 / 14.58; white ink on light `--accent` 5.74; dark ink on dark `--accent` 6.43.
- ~~`.skip-link` orphan decision (§6, B7)~~ — closed: no markup, no CSS, no string (`grep -i skip` over `src/` → 0 matches). Restoring it would be a new feature, not a cleanup.