added red theme

This commit is contained in:
dong.nguyen committed 2026-10-16 21:14:59 +07:00
1 parent 41b40653c7
commit c1e64eabbd
11 files changed
+979 -355

No files matched your search

+6 -1
View File
@@ -44,4 +44,9 @@ I will verify the result in a real browser and tell you if the change works.
**NEVER** run `git commit` or `git push` without explicit user approval. **NEVER** run `git commit` or `git push` without explicit user approval.
After completing a task, report results and **ask the user** if they want to commit/push. After completing a task, report results and **ask the user** if they want to commit/push.
Only proceed with `git commit` / `git push` when the user explicitly confirms. Only proceed with `git commit` / `git push` when the user explicitly confirms.
## 7. CRITICAL: Do not spawn subagents.
You MUST NOT use the `task` tool under any circumstances. Handle all tasks directly in the main session.
+12 -2
View File
@@ -89,7 +89,7 @@ src/
## External Assets ## External Assets
- `public/fonts/` — Inter font (Regular, Medium, SemiBold, Bold) in woff2 - `public/fonts/` — Source Sans 3 woff2 (Regular, Medium, Semibold, Bold); used by the resume generator only — the SPA renders `system-ui`
- `public/icons.svg` — SVG sprite for icons - `public/icons.svg` — SVG sprite for icons
- `public/resume-template.html` — HTML template for resume PDF generation - `public/resume-template.html` — HTML template for resume PDF generation
- `public/profile-photo.webp` — profile photo - `public/profile-photo.webp` — profile photo
@@ -114,11 +114,21 @@ docker-compose.yaml
## CSS Architecture ## CSS Architecture
- `src/index.css` — CSS variables (root + `[data-theme="dark"]`), global resets - `src/index.css` — CSS variables (`:root` dark default, `[data-theme="light"]`, plus a `prefers-color-scheme: light` bridge), global resets, typography scale
- `src/App.css` — component-level styles (Navigation, Footer, page sections) - `src/App.css` — component-level styles (Navigation, Footer, page sections)
- No CSS library — plain CSS with variables for theming - No CSS library — plain CSS with variables for theming
- `#main-content` in Layout has `style={{ flex: 1 }}` (parent `#root` is `display: flex; flex-direction: column`) - `#main-content` in Layout has `style={{ flex: 1 }}` (parent `#root` is `display: flex; flex-direction: column`)
## Typography
- Scale tokens in `src/index.css`: `--text-body: 18px`, `--text-lede: 20px`, `--text-meta: 15px`, `--leading-body: 1.65`, `--measure-prose: 600px`
- Global: `p` = `--text-body` / `--leading-body`; `h3` 21px, `h4` 18px, `h5` 16px, `h6` 15px
- Prose columns use `.prose` (measure-capped, carries paragraph + heading rhythm); a lead paragraph outside a column uses `.prose-lede`; non-prose columns use `.page-body` (700px); titles inside a column use `.subheading`
- Body copy sizes come from the tokens; 12-14px literals are reserved for chrome (tags, badges, pills, footer, duration labels)
- Components MUST NOT set `fontSize` / `lineHeight` inline — use the classes above
- Font stack is `system-ui`: no webfont is loaded by the SPA. The Source Sans 3 woff2 files in `public/fonts/` are consumed only by `scripts/generate-resume.ts`
- Spec: `docs/design/specs/v3/spec-v3-typography.md`
## Known Issues & Gotchas ## Known Issues & Gotchas
1. **React Router v8 routing:** Use `<Layout><Routes>...</Routes></Layout>`, NOT `<Route element={<Layout />}>` with nested routes — the latter doesn't pass `children` correctly 1. **React Router v8 routing:** Use `<Layout><Routes>...</Routes></Layout>`, NOT `<Route element={<Layout />}>` with nested routes — the latter doesn't pass `children` correctly
@@ -5,6 +5,7 @@
> **Parent:** `spec-v2.md` > **Parent:** `spec-v2.md`
> **Priority:** P2 > **Priority:** P2
> **Estimate:** ~2 hours > **Estimate:** ~2 hours
> **⚠ SUPERSEDED (palette section).** The color palette, the `--bg-gradient-*` tokens, the body gradient and the `.hero::before` radial glow described in §1 and §2 of this document were **never implemented** and are now replaced by `specs/v3/spec-v3-theme-palette-gasatrya.md` (v0.3.0), which defines the shipped token set: 26 dark + 24 light tokens, `color-scheme`, `--text-on-accent`, `--accent-soft`, `--accent-glow`, `--border-strong`, `--inset-highlight`, `--success-glow`, `--warning`. The depth effect in this site comes from `.section::before` (`src/App.css`), not from a body gradient. Read that file before touching any color value.
--- ---
@@ -0,0 +1,502 @@
# Specification — v3 Theme Palette (gasatrya.com schema)
> **Document:** `spec-v3-theme-palette-gasatrya.md`
> **Version:** 0.5.1
> **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 |
| `--color-surface` | `#ffffff` | Cards, chips, inputs (`bg-surface`, `text-surface`) |
| `--color-on-surface` | `#151914` | Primary text; also inverted solid fill (`bg-on-surface` + `text-on-primary` buttons) |
| `--color-secondary` | `#6b6d68` | Body copy, eyebrow labels, footer text |
| `--color-primary` | `#ef4444` | Accent: labels, links, `border-primary`, `bg-primary` CTA |
| `--color-on-primary` | `#ffffff` | Text on accent fill |
| `--color-black` / `--color-white` | `#000` / `#fff` | Utility overlays |
Typography tokens (out of scope here, listed for context): `--font-body: Inter`, `--font-metadata: JetBrains Mono`, `--text-metadata: 10px/12px`, `--tracking-metadata: 0.1em`.
### 1.2 Non-token colors actually used
| Value | Where | Meaning |
|---|---|---|
| `#2a3028 → #151914` | `from-[#2a3028] to-on-surface` on `#nav-slider` | Active nav pill gradient = the site's only "elevated dark" surface |
| `#CE1126` | Logo SVG (Indonesian flag red) | Brand mark, not used in UI chrome |
| `on-surface` at 5 %–30 % alpha | `border-on-surface/5 /8 /10 /15 /20 /30`, `bg-on-surface/5` | All hairlines and tint fills |
| `white/20 /25 /70`, `white/80 → white/20` | Nav pill ring, hamburger button | Light-mode highlight edges |
| `inset 0 2px 4px rgba(255,255,255,1)` + `0 8px 20px rgba(0,0,0,0.04)` | Every `.card` | Card elevation model: **inset top highlight + soft drop shadow** |
| `0 1px 2px rgba(0,0,0,0.05)`, `0 2px 10px rgba(0,0,0,0.02)` | Buttons | Low-opacity shadows, never heavy |
| `red-50 #fef2f2`, `red-700 #b91c1c` | Retained Tailwind | Danger |
| `amber-50 #fffbeb`, `amber-700 #b45309` | Retained Tailwind | Warning |
| `green-50 #f0fdf4`, `green-600 #16a34a`, `green-700 #15803d` | Retained Tailwind | Success |
| `#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`:
| Token | Uses | Notes |
|---|---|---|
| `--accent` | 63 | Links, focus rings, borders, fills |
| `--text-primary` | 41 | |
| `--text-muted` | 23 | Nav links, tags, breadcrumbs, placeholders |
| `--border` | 22 | |
| `--text-secondary` | 20 | |
| `--bg-surface` | 16 | Nav bar, **all** cards, chips, badges, inputs |
| `--shadow` | 5 | Card hover shadows |
| `--bg-elevated` | 2 | `.card-elevated`, `.theme-toggle:hover` |
| `--grid-color` | 2 | `.hero-bg-grid` |
| `--code-bg` | 2 | `code`, `pre` |
| `--success` | 1 | `.greeting-dot` |
| `--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 |
| B6 | Resume dropdown shadow hardcoded `rgba(0, 0, 0, 0.1)` instead of `var(--shadow)`. | `src/App.css:758` | 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 |
| B9 | Dead tokens: `--accent-active` (declared, 0 uses) and `--error` (declared, 0 uses). | `src/index.css:11, 16, 54, 59, 73, 91, 96` | 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 |
---
## 3. Target palette
### 3.1 Token mapping
| gasatrya.com | Our token | Rationale |
|---|---|---|
| `neutral #f6f5f2` | `--bg-primary` | Warm off-white canvas instead of cool gray |
| `surface #ffffff` | `--bg-surface` | Cards already use this token |
| `#272a28` / nav-pill top | `--bg-elevated` | Third layer; light mode uses pure white so `bg < surface < elevated` holds in both themes |
| `on-surface #151914` | `--text-primary` | Green-tinted near-black, softer than `#0a0a0a` |
| `secondary #6b6d68` | `--text-secondary` | Direct adoption (AA) |
| `#756b62` / `#8f9a8e` | `--text-muted` | Third tier, warm gray, AA in both themes |
| `primary #ef4444` | `--accent` (AA-shifted) + `--accent-soft` / `--accent-glow` | See §1.3 |
| `on-primary` | `--text-on-accent` **(new)** | Per-theme ink for accent fills |
| `on-surface/8 … /30` | `--border`, `--border-strong` | Hairline model |
| `inset white + soft drop` | `--shadow`, `--inset-highlight` **(new)** | Card elevation model |
| `green-700 / green-400` | `--success` | |
| `red-700 / red-300` | `--error` | |
| `amber-700 / amber-400` | `--warning` **(new)** | |
| `on-surface/5` | `--grid-color` | Architectural hairline grid |
### 3.2 Light theme
| Token | Value | Contrast on `--bg-primary` / `--bg-surface` |
|---|---|---|
| `--bg-primary` | `#f6f5f2` | — |
| `--bg-surface` | `#fbfaf8` | luminance 0.957 |
| `--bg-elevated` | `#ffffff` | luminance 1.000 |
| `--text-primary` | `#151914` | 16.31 / 17.05 (AAA) |
| `--text-secondary` | `#6b6d68` | 4.80 / 5.02 (AA) |
| `--text-muted` | `#756b62` | 4.77 / 4.99 (AA) |
| `--accent` | `#b04138` | 5.26 / 5.50 / 5.74 / 4.87 code (AA) — warm brick, moved off `#b91c1c` per user feedback |
| `--accent-hover` | `#a8382f` | 5.89 / 6.15 / 6.42 |
| `--accent-active` | `#9b3229` | 6.68 / 6.99 / 7.29 |
| `--text-on-accent` | `#ffffff` | 5.74 on `--accent`, 6.42 on `--accent-hover`, 7.29 on `--accent-active` (AA) |
| `--accent-soft` | `rgba(239,68,68,0.10)` | translucent fills only (`.btn-secondary:hover`, focus ring) |
| `--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 |
| `--accent-glow` | `rgba(239,68,68,0.22)` | colored shadows/glows |
| `--border` | `#e3e1dc` | ≈ `on-surface` at 8 % over `#f6f5f2` |
| `--border-strong` | `#d9d6d0` | ≈ 15 % alpha |
| `--shadow` | `rgba(21,25,20,0.10)` | warm shadow, not pure black |
| `--inset-highlight` | `rgba(255,255,255,0.90)` | card top edge on `#fbfaf8` |
| `--code-bg` | `#efece6` | 15.08 with `--text-primary` |
| `--success` | `#15803d` | 4.60 / 4.81 (AA) |
| `--success-glow` | `rgba(21,128,61,0.35)` | pulse ring |
| `--error` | `#991b1b` | 7.62 / 7.97 |
| `--warning` | `#b45309` | 4.61 / 4.81 (AA) |
| `--grid-color` | `rgba(21,25,20,0.07)` | hairline grid; effective `#e6e6e2`, 1.15 vs canvas |
| `color-scheme` | `light` | native form controls / scrollbars |
**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` |
|---|---|---|
| `--bg-primary` | `#151914` | — |
| `--bg-surface` | `#202423` | — |
| `--bg-elevated` | `#272a28` | — |
| `--text-primary` | `#f6f5f2` | 16.31 / 14.40 (AAA) |
| `--text-secondary` | `#b7aea0` | 8.11 / 7.16 (AAA) |
| `--text-muted` | `#8f9a8e` | 6.08 / 5.37 (AA) |
| `--accent` | `#f87171` (red-400) | 6.43 / 5.67 (AA) |
| `--accent-hover` | `#fca5a5` | 9.37 / 8.27 |
| `--accent-active` | `#f06060` | 5.54 / 4.89 / 4.52 on bg / surface / elevated (press state). Was `#ef4444`: 4.17 / 3.85 → below AA |
| `--text-on-accent` | `#151914` | 6.43 on `--accent` (AA) — dark ink on light red |
| `--accent-soft` | `rgba(239,68,68,0.12)` | translucent fills only (`.btn-secondary:hover`, focus ring); lowered from 0.16 |
| `--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 |
| `--accent-glow` | `rgba(239,68,68,0.30)` | |
| `--border` | `#2a3028` | 1.31 vs `--bg-primary` |
| `--border-strong` | `#3a403a` | 1.67 |
| `--shadow` | `rgba(0,0,0,0.45)` | |
| `--inset-highlight` | `rgba(255,255,255,0.05)` | |
| `--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).
```css
/* Theme variables — Dark mode (default) */
:root {
--bg-primary: #151914;
--bg-surface: #202423;
--bg-elevated: #272a28;
--text-primary: #f6f5f2;
--text-secondary: #b7aea0;
--text-muted: #8f9a8e;
--accent: #f87171;
--accent-hover: #fca5a5;
--accent-active: #f06060;
--text-on-accent: #151914;
--accent-soft: rgba(239, 68, 68, 0.12);
--accent-tint: #2f1e1a;
--accent-glow: rgba(239, 68, 68, 0.30);
--border: #2a3028;
--border-strong: #3a403a;
--shadow: rgba(0, 0, 0, 0.45);
--inset-highlight: rgba(255, 255, 255, 0.05);
--code-bg: #1a1e1b;
--success: #4ade80;
--success-glow: rgba(74, 222, 128, 0.35);
--error: #fca5a5;
--warning: #fbbf24;
--grid-color: rgba(246, 245, 242, 0.06);
color-scheme: dark;
--sans: 'Inter', system-ui, -apple-system, sans-serif;
--mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
--max-wide: 1200px;
--max-content: 800px;
--max-narrow: 600px;
--radius-sm: 4px;
--radius-md: 6px;
--radius-lg: 8px;
--transition-fast: 150ms ease;
--transition-normal: 200ms ease;
--transition-slow: 300ms ease;
font-size: 16px;
line-height: 1.6;
color: var(--text-primary);
background: var(--bg-primary);
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Light mode */
:root[data-theme='light'] {
--bg-primary: #f6f5f2;
--bg-surface: #fbfaf8;
--bg-elevated: #ffffff;
--text-primary: #151914;
--text-secondary: #6b6d68;
--text-muted: #756b62;
--accent: #b04138;
--accent-hover: #a8382f;
--accent-active: #9b3229;
--text-on-accent: #ffffff;
--accent-soft: rgba(239, 68, 68, 0.10);
--accent-tint: #f5e3e1;
--accent-glow: rgba(239, 68, 68, 0.22);
--border: #e3e1dc;
--border-strong: #d9d6d0;
--shadow: rgba(21, 25, 20, 0.10);
--inset-highlight: rgba(255, 255, 255, 0.90);
--code-bg: #efece6;
--success: #15803d;
--success-glow: rgba(21, 128, 61, 0.35);
--error: #991b1b;
--warning: #b45309;
--grid-color: rgba(21, 25, 20, 0.07);
color-scheme: light;
}
/* Pre-hydration / no-JS: honour OS light preference */
@media (prefers-color-scheme: light) {
:root:not([data-theme='dark']) {
--bg-primary: #f6f5f2;
--bg-surface: #fbfaf8;
--bg-elevated: #ffffff;
--text-primary: #151914;
--text-secondary: #6b6d68;
--text-muted: #756b62;
--accent: #b04138;
--accent-hover: #a8382f;
--accent-active: #9b3229;
--text-on-accent: #ffffff;
--accent-soft: rgba(239, 68, 68, 0.10);
--accent-tint: #f5e3e1;
--accent-glow: rgba(239, 68, 68, 0.22);
--border: #e3e1dc;
--border-strong: #d9d6d0;
--shadow: rgba(21, 25, 20, 0.10);
--inset-highlight: rgba(255, 255, 255, 0.90);
--code-bg: #efece6;
--success: #15803d;
--success-glow: rgba(21, 128, 61, 0.35);
--error: #991b1b;
--warning: #b45309;
--grid-color: rgba(21, 25, 20, 0.07);
color-scheme: light;
}
}
```
`@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);`. **Moot in the shipped tree:** the block was deleted in the working tree and no component renders `.skip-link`; `strings.skipLink` is unused.
### 4.2 `index.html` — prevent first-paint flash
`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:
```html
<script>
(function () {
try {
var s = localStorage.getItem('portfolio-theme');
var t = s === 'dark' || s === 'light' ? s
: (matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark');
document.documentElement.setAttribute('data-theme', t);
} catch (e) {
document.documentElement.setAttribute('data-theme', 'dark');
}
})();
</script>
```
`src/hooks/useTheme.tsx` needs **no change** — same `STORAGE_KEY`, same `'dark' | 'light'` values.
### 4.3 `src/App.css` — replace hardcoded colors with tokens
| Line | Selector | Current | New |
|---|---|---|---|
| 209 | `.btn-primary` | `linear-gradient(135deg, #1d4ed8, #2563eb, #60a5fa)` | `var(--accent)` |
| 210, 216 | `.btn-primary`, `:hover` | `color: #ffffff` | `var(--text-on-accent)` |
| 212, 218, 222 | `.btn-primary` shadows | `rgba(96,165,250,.3/.4/.3)` | `var(--accent-glow)` |
| 234 | `.btn-secondary:hover` | `rgba(96,165,250,0.1)` | `var(--accent-soft)` |
| 288 | `.badge-accent` | `color: #ffffff` | `var(--text-on-accent)` |
| 316 | `.tag-accent` | `color: #fff` | `var(--text-on-accent)` |
| 380 | `.social-link` (not `.hero-photo`) | `1.5px solid rgba(255,255,255,0.15)` | `1.5px solid var(--border-strong)` |
| 478-479 | `@keyframes pulse-dot` | `rgba(52,211,153,0.4)` / `0` | `var(--success-glow)` / `transparent` |
| 483 | `.name-highlight` | blue gradient | `linear-gradient(135deg, var(--accent), var(--accent-active))` |
| 635, 639, 642 | mobile `@media` hero | `#ffffff`, `#e0e0e0` | `var(--text-primary)`, `var(--text-secondary)` — **light mode currently renders white text on a light canvas** |
| 729, 774, 1053 | accent fills | `#ffffff` / `#fff` | `var(--text-on-accent)` |
| 758 | dropdown | `rgba(0,0,0,0.1)` | `var(--shadow)` |
| 322, 336 | `.card`, `.card-elevated` | no top highlight | `box-shadow: inset 0 1px 0 var(--inset-highlight), 0 2px 8px var(--shadow);` (gasatrya card model) — **superseded**: `.card*` was deleted as dead code in the typography pass |
| 718 | `.download-resume-summary` | no `background` → UA `buttonface` gray | `background: transparent;` |
| 735-738 | `.download-resume-summary.open` | none | `background: var(--accent); color: var(--text-on-accent);` |
| 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] Contrast ratios measured (WCAG relative-luminance model)
- [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] **B6** fixed — resume dropdown `0 4px 12px var(--shadow)` (`src/App.css:760`)
- [x] **B7** — superseded, see the reclassification at the end of this list
- [x] **B8** fixed — byte-duplicate `@media (prefers-color-scheme: dark)` block deleted
- [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, 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
- [x] `pnpm exec tsc -b` passes (exit 0)
- [ ] `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
- [ ] **B7** reclassified — the `.skip-link` rules were deleted from `src/index.css` in the working tree (not by this change) and no component renders the class; `strings.skipLink` (`src/i18n/strings.ts:98`) is now an unused string. Either restore markup + CSS or delete the string; nothing left to tokenize
## 7. Verification plan
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.
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.
6. ~~CTA treatment?~~ **DECIDED: flat solid** — `background: var(--accent); color: var(--text-on-accent);` (§4.3, lines 209-210).
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) |
| `index.html` | 8-20 | Inline theme-init script: `localStorage['portfolio-theme']` → `matchMedia('(prefers-color-scheme: light)')` → `'dark'`, sets `data-theme` before first paint (B12) |
| `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/resume-template.html` | 29 declarations | Print inks retinted: `#1a1a1a→#151914`, `#4a4a4a→#4b4f4a`, `#666→#6b6d68`, `#888/#999→#756b62`, `#f0f0f0→#efece6`, `#ccc→#d9d6d0`, `#eee→#e3e1dc`. Stays ink-on-white for print |
| `docs/design/specs/v3/spec-v3-theme-colors.md` | 8 | `⚠ SUPERSEDED (palette section)` banner pointing here |
| `src/hooks/useTheme.tsx` | — | No change |
| `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.
- Compiled rule check: `.download-resume-lazer-inner{z-index:1;background:var(--accent-tint);border-radius:var(--radius-md);width:100%;position:relative}`.
- Grep gate `#[0-9a-fA-F]{3,8}\b|rgba?\(|:\s*(white|black)\s*;`: `src/App.css` 0 matches; `src/index.css` matches only inside 2-109; `src/index.css:110-292` 0 matches.
- 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.
- Layering invariant `luminance(bg-primary) < luminance(bg-surface) < luminance(bg-elevated)`: dark 0.0091 < 0.0169 < 0.0224; light 0.9131 < 0.9566 < 1.0000.
### 10.4 Open items
- Manual browser pass (§7 item 4) is the user's; the palette has not been verified headlessly, per project rule.
- `pnpm build` end-to-end blocked by the nginx `dist/` mount — needs `docker compose stop` before a real production build, or a different out dir.
- `pnpm lint` dirty at baseline (15 errors + 9 warnings, all `react-hooks(rules-of-hooks)` in `.tsx` files this change never touched).
- `.skip-link` orphan decision (§6, B7).
- Hairline grid adoption deferred (§9 item 3).
+178
View File
@@ -0,0 +1,178 @@
# Specification — v3 Typography scale and readability
> **Document:** `spec-v3-typography.md`
> **Version:** 1.0.0
> **Parent:** `spec.md` (IA/content readability), sibling of `spec-v3-theme-palette-gasatrya.md`
> **Priority:** P1
> **Status:** Implemented in source. `tsc -b` and the production build are green; the visual pass is the user's in a real browser (project rule: no headless verification).
---
## 1. Problem
Reported: the Philosophy page reads small and hard to follow. Measured, the cause is four things at once, and the same drift exists on every page.
| # | Finding | Evidence |
|---|---|---|
| P1 | Philosophy body copy is the smallest in the app: **16px / 1.7**, while About's bio and the project-detail summary — the same "lead paragraph" role — are 18px | `PhilosophyPage.tsx:17` (no `font-size`, falls back to `:root { font-size: 16px }`) vs `AboutPage.tsx:22` and `ProjectDetailPage.tsx:37` inline `18px` |
| P2 | **No space between paragraphs.** `* , ::before, ::after { margin: 0 }` resets `p`, and nothing re-adds it, so the three paragraphs of a quote render as one block | `index.css` reset, `strings.ts:82-87` (three `<p>` blocks per quote) |
| P3 | **Measure too wide**: `.container-content` = 800px − 48px padding = 752px of text; Philosophy has no narrower cap (About caps itself at 700px inline) | `index.css` `.container-content`, `AboutPage.tsx:21` |
| P4 | Markup bug: the quote HTML already contains `<p>…</p>` and was injected **inside** a `<p>` (nested paragraphs). `aria-labelledby="engineering-heading"` pointed at an id no element had (`SectionHeading` only takes `id` as a prop) | `PhilosophyPage.tsx:9,17`, `SectionHeading.tsx:5,10` |
| P5 | **No `@font-face` anywhere in the app.** `--sans` named `Inter`, which is neither shipped nor linked, so the SPA always rendered `system-ui` (Segoe UI on Windows). The four woff2 files in `public/fonts/` are Source Sans 3 and are read only by `scripts/generate-resume.ts:21-24,43-57` | repo-wide grep for `@font-face` → 0 hits in `src/`, `index.html` |
| P6 | Same role, many sizes: body copy 16 / 18 / 14px; sub-headings 24 (global `h3`) / 20 / 18 / 16 / 14px; `h4-h6` had no size at all and fell back to 16px | audit table, §2 |
| P7 | `line-height` drift: `p` got 1.7, every `div`/`li`/`a` inherited 1.6 from `:root`, and `.project-card-summary` was explicitly set to 1.6 while the same 14px `.philosophy-card p` inherited 1.7 | `App.css` `.project-card-summary`, `.philosophy-card p` |
| P8 | ~20 inline `style` objects in TSX carried the type decisions, and **no `@media` block anywhere changes `font-size` or `line-height`** | `PhilosophyPage.tsx:13,17`, `AboutPage.tsx:21,22,26,43`, `About.tsx:14,15,19,36`, `ProjectDetailPage.tsx:28,37,43,55,60,70,73,74`, `ExperiencePage.tsx:33,37`, `Experience.tsx:28,78`, `ContactPage.tsx:18,19,27,28,36,37`, `Contact.tsx:25,45,48,70,73,95,98`, `Projects.tsx:36`, `DownloadResume.tsx:96` |
## 2. Measurements
Method: `fontTools` over the shipped `public/fonts/SourceSans3-Regular.woff2` and the font that actually renders today (`C:/Windows/Fonts/segoeui.ttf`), summing glyph advances of one 221-character English sample from the Philosophy text. No browser involved.
| Font | x-height | cap height | avg advance | 16px | 18px |
|---|---|---|---|---|---|
| Segoe UI (what renders today) | 0.500 em | 0.700 em | 0.4273 em | 6.84 px/char | 7.69 px/char |
| Source Sans 3 (shipped, resume-only) | 0.486 em | 0.660 em | 0.3996 em | 6.39 px/char | 7.19 px/char |
Characters per line at each candidate measure:
| Measure @ size | Segoe UI | Source Sans 3 |
|---|---|---|
| 752px @16px — **before** | 110 | 118 |
| 700px @16px — About's own cap | 102 | 110 |
| **600px @18px — after** | **78** | **83** |
| 560px @18px — stricter editorial band | 73 | 78 |
Reading bands used: 45-75 characters (Bringhurst), 38-80 (Butterick). Before: 110-118. After: 78-83.
## 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.
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.
6. **Paragraph rhythm lives only inside `.prose`** (`.prose p { margin-bottom: 1em }`, `:last-child` 0). The global `p` keeps `margin: 0` from the reset, so hero, cards, section subtitles and contact tiles are unaffected.
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).
## 4. Implementation details
### 4.1 `src/index.css`
- `:root` token block: `--max-narrow` deleted; added the five scale tokens after `--max-content`.
- `--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.
- `.container-narrow` deleted (no consumer).
### 4.2 `src/App.css`
Prose system (rewritten in place of the dead `.prose` block):
```
.prose { max-width: var(--measure-prose); }
.prose h2 { margin: 48px 0 16px; font-size: 28px; }
.prose h3 { margin: 1.5em 0 0.65em; } /* 21px inherited */
.prose h4 { margin: 1.25em 0 8px; font-size: 16px; line-height: 1.3; }
.prose p { margin-bottom: 1em; } .prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin-bottom: 16px; padding-left: 24px; }
.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; }
.subheading { margin: 32px 0 12px; }
.philosophy-quote + .philosophy-quote { margin-top: 48px; }
.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); }
.back-link, .section-cta { font-size: var(--text-meta); font-weight: 500; color: var(--accent); }
.link-label { font-weight: 500; color: var(--text-primary); }
.contact-link-sub { font-size: var(--text-meta); line-height: 1.5; color: var(--text-muted); }
.achievement-impact { font-size: var(--text-meta); line-height: var(--leading-body); color: var(--text-secondary); margin-bottom: 8px; }
.achievement-metrics { margin-bottom: 8px; }
```
Existing rules retuned to the scale:
| Selector | Was | Now |
|---|---|---|
| `.expertise-skill` | 14px, inherited 1.6 | `var(--text-meta)` / `var(--leading-body)` |
| `.timeline-title` | 20px, inherited 1.6 | 20px + `line-height: 1.3` |
| `.timeline-company` | 16px, inherited 1.6 | 16px + `line-height: 1.4` |
| `.timeline-responsibilities li` | 14px / 1.6 | `--text-meta` / `--leading-body` |
| `.achievement-title` | 18px / 1.6 | 18px + `line-height: 1.3` |
| `.achievement-context` | 14px / 1.6 | `--text-meta` / `--leading-body` |
| `.project-card-summary` | 14px / 1.6 | `--text-meta` / `--leading-body` |
| `.philosophy-card h3` | 18px / 1.6 | 18px + `line-height: 1.25` |
| `.philosophy-card p` | 14px / 1.7 (inherited) | `--text-meta` / `--leading-body` |
| `.contact-link` | 16px / 1.6 | 16px + `line-height: 1.4` |
Deleted as dead (no component rendered any of them; verified by grepping every class name against `src/**/*.tsx`): `.card`, `.card:hover`, `.card-elevated`, `.card-featured` (and `src/components/ui/Card.tsx` plus its barrel export), `.page-header`, `.breadcrumb*`, `.form-group/label/input/textarea`, `.filter-bar`, `.filter-pill*`, `.article-card`, `.article-meta`, `.engineering-tabs`, `.engineering-tab*`, `.container-narrow`, `--max-narrow`.
### 4.3 TSX
| 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/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` |
| `src/components/sections/Projects.tsx` | "view all" link → `.section-cta` |
| `src/components/sections/DownloadResume.tsx` | option label → `.link-label` |
| `src/components/ui/Card.tsx` | deleted; export removed from `src/components/index.ts` |
## 5. Affected files
| 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, ~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 |
| `AGENTS.md` | `External Assets` font line corrected to Source Sans 3 (resume-only), `CSS Architecture` line corrected to the real theme blocks, new `Typography` section |
| `docs/design/specs/v3/spec-v3-theme-palette-gasatrya.md` | card inset-highlight row now moot (`.card*` deleted) |
## 6. Progress tracking
- [x] Audit: every `font-size` / `line-height` in `src/index.css` + `src/App.css` and every inline type style in TSX, with anchors
- [x] Line-length measured from real glyph metrics (Segoe UI as rendered, Source Sans 3 as shipped)
- [x] `@font-face` absence confirmed; decision recorded: keep `system-ui`, keep woff2 for the resume generator only
- [x] Scale tokens added to `src/index.css`
- [x] `.prose` turned into the live prose system; `.prose-lede`, `.page-body`, `.subheading`, `.project-section`, `.back-link`, `.section-cta`, `.link-label`, `.contact-link-sub`, `.achievement-impact`, `.achievement-metrics` added
- [x] 10 existing selectors retuned to the scale
- [x] Dead CSS deleted, `Card` component deleted
- [x] Philosophy page: prose column, paragraph spacing, no nested `<p>`, ARIA id wired
- [ ] Inline type styles removed from the 8 TSX files — in flight, tracked here
- [ ] `tsc -b` + `vite build` green after the TSX sweep
- [ ] Manual browser pass (§7) on `/`, `/about`, `/experience`, `/projects`, `/projects/:id`, `/philosophy`, `/contact`, dark and light
## 7. Verification plan
1. `pnpm exec tsc -b` → exit 0 (the `Card` deletion must not leave an import behind).
2. `pnpm exec vite build --outDir dist-verify` → module count and CSS size; grep the built CSS for `--text-body`, `--measure-prose`, `.prose-lede`, and for the absence of `.card{`, `.form-input`, `.filter-pill`, `.article-card`, `.engineering-tab`, `.breadcrumb`, `.page-header`, `.container-narrow`.
3. Grep gate: `style=\{\{[^}]*(fontSize|lineHeight|fontWeight|color|maxWidth)` over `src/**/*.tsx` → zero matches; `grep "Card"` over `src/` → zero matches.
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.
- `/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.
- Both themes, mobile ≤768px: prose column narrows to the viewport, ~40-60 characters per line.
## 8. Risks
| Risk | Mitigation |
|---|---|
| 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. |
| 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. |
## 9. Open questions
1. **Wire Source Sans 3 later?** It is already shipped and used by the PDF, and gasatrya uses it. Cost: four `@font-face` rules, ~75 KB per weight, and its x-height is 0.486 em vs Segoe UI's 0.500 — the scale would need +1px to read the same. Deferred by user decision.
2. **`.skip-link` orphan** (shared with the palette spec): the rules were deleted from `src/index.css` in the working tree and no component renders the class, while `strings.skipLink` (`src/i18n/strings.ts:98`) still exists. Restore markup + CSS or delete the string.
3. **`--leading-body` 1.65 vs the old 1.7** — 1.7 was applied only to `p`; 1.65 is now applied to body copy in every element role. Whether 1.6 or 1.7 reads better at 18px is a call for the manual pass.
+13
View File
@@ -5,6 +5,19 @@
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>portfolio</title> <title>portfolio</title>
<script>
(function () {
try {
var stored = localStorage.getItem('portfolio-theme')
var theme = stored === 'dark' || stored === 'light'
? stored
: (window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark')
document.documentElement.setAttribute('data-theme', theme)
} catch (e) {
document.documentElement.setAttribute('data-theme', 'dark')
}
})();
</script>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
+1 -1
View File
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#863bff" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z" style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"/><mask id="a" width="48" height="46" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M25.842 44.938c-.664.844-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.183c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.498 0-3.579-1.842-3.579H1.133c-.92 0-1.456-1.04-.92-1.787L9.91.473c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.578 1.842 3.578h11.377c.943 0 1.473 1.088.89 1.832L25.843 44.94z" style="fill:#000;fill-opacity:1"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#ede6ff" rx="5.508" ry="14.704" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -4.47 31.516)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#ede6ff" rx="10.399" ry="29.851" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -39.328 7.883)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#7e14ff" rx="5.508" ry="30.487" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -25.913 -14.639)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -32.644 -3.334)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -34.34 30.47)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#ede6ff" rx="14.072" ry="22.078" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="rotate(93.35 24.506 48.493)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx=".387" cy="8.972" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(39.51 .387 8.972)"/></g><g filter="url(#k)"><ellipse cx="47.523" cy="-6.092" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 47.523 -6.092)"/></g><g filter="url(#l)"><ellipse cx="41.412" cy="6.333" fill="#47bfff" rx="5.971" ry="9.665" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 41.412 6.333)"/></g><g filter="url(#m)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#n)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#o)"><ellipse cx="35.651" cy="29.907" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 35.651 29.907)"/></g><g filter="url(#p)"><ellipse cx="38.418" cy="32.4" fill="#47bfff" rx="5.971" ry="15.297" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 38.418 32.4)"/></g></g><defs><filter id="b" width="60.045" height="41.654" x="-19.77" y="16.149" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-54.613" y="-7.533" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filtLine truncated <svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#ce1126" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z"/></svg>

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 485 B

+29 -29
View File
@@ -20,7 +20,7 @@
font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif; font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
font-size: 10pt; font-size: 10pt;
line-height: 1.5; line-height: 1.5;
color: #1a1a1a; color: #151914;
} }
/* Header */ /* Header */
@@ -29,7 +29,7 @@
align-items: center; align-items: center;
gap: 16px; gap: 16px;
padding-bottom: 12px; padding-bottom: 12px;
border-bottom: 2px solid #1a1a1a; border-bottom: 2px solid #151914;
margin-bottom: 16px; margin-bottom: 16px;
} }
@@ -43,26 +43,26 @@
.header-info h1 { .header-info h1 {
font-size: 18pt; font-size: 18pt;
font-weight: 700; font-weight: 700;
color: #1a1a1a; color: #151914;
} }
.header-info .title { .header-info .title {
font-size: 11pt; font-size: 11pt;
font-weight: 500; font-weight: 500;
color: #4a4a4a; color: #4b4f4a;
margin-bottom: 4px; margin-bottom: 4px;
} }
.header-info .contact { .header-info .contact {
font-size: 9pt; font-size: 9pt;
color: #666; color: #6b6d68;
line-height: 1.6; line-height: 1.6;
} }
/* About me */ /* About me */
.about-summary { .about-summary {
font-size: 9.5pt; font-size: 9.5pt;
color: #4a4a4a; color: #4b4f4a;
line-height: 1.6; line-height: 1.6;
margin-bottom: 12px; margin-bottom: 12px;
} }
@@ -72,9 +72,9 @@
font-weight: 700; font-weight: 700;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.5pt; letter-spacing: 0.5pt;
color: #1a1a1a; color: #151914;
padding-bottom: 4px; padding-bottom: 4px;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #d9d6d0;
margin-bottom: 10px; margin-bottom: 10px;
} }
/* Experience */ /* Experience */
@@ -92,24 +92,24 @@
.exp-title { .exp-title {
font-weight: 600; font-weight: 600;
font-size: 11pt; font-size: 11pt;
color: #1a1a1a; color: #151914;
} }
.exp-duration { .exp-duration {
font-size: 9pt; font-size: 9pt;
color: #666; color: #6b6d68;
white-space: nowrap; white-space: nowrap;
} }
.exp-company { .exp-company {
font-size: 10pt; font-size: 10pt;
color: #4a4a4a; color: #4b4f4a;
margin-bottom: 2px; margin-bottom: 2px;
} }
.exp-location { .exp-location {
font-size: 9pt; font-size: 9pt;
color: #888; color: #756b62;
margin-bottom: 4px; margin-bottom: 4px;
} }
@@ -133,13 +133,13 @@
.achievement-title { .achievement-title {
font-weight: 600; font-weight: 600;
font-size: 10pt; font-size: 10pt;
color: #1a1a1a; color: #151914;
margin-bottom: 2px; margin-bottom: 2px;
} }
.achievement-context { .achievement-context {
font-size: 9pt; font-size: 9pt;
color: #4a4a4a; color: #4b4f4a;
margin-bottom: 4px; margin-bottom: 4px;
font-style: italic; font-style: italic;
} }
@@ -152,18 +152,18 @@
.achievement-technical li { .achievement-technical li {
font-size: 9pt; font-size: 9pt;
color: #4a4a4a; color: #4b4f4a;
margin-bottom: 1px; margin-bottom: 1px;
} }
.achievement-tech { .achievement-tech {
font-size: 8.5pt; font-size: 8.5pt;
color: #666; color: #6b6d68;
} }
.achievement-tech span { .achievement-tech span {
display: inline-block; display: inline-block;
background: #f0f0f0; background: #efece6;
padding: 0 4px; padding: 0 4px;
border-radius: 2px; border-radius: 2px;
margin-right: 4px; margin-right: 4px;
@@ -171,13 +171,13 @@
.achievement-impact { .achievement-impact {
font-size: 9pt; font-size: 9pt;
color: #4a4a4a; color: #4b4f4a;
margin-top: 2px; margin-top: 2px;
} }
.achievement-metrics { .achievement-metrics {
font-size: 9pt; font-size: 9pt;
color: #4a4a4a; color: #4b4f4a;
margin-top: 1px; margin-top: 1px;
} }
@@ -191,13 +191,13 @@
.skill-group-title { .skill-group-title {
font-weight: 600; font-weight: 600;
font-size: 10pt; font-size: 10pt;
color: #1a1a1a; color: #151914;
margin-bottom: 2px; margin-bottom: 2px;
} }
.skill-list { .skill-list {
font-size: 9pt; font-size: 9pt;
color: #4a4a4a; color: #4b4f4a;
line-height: 1.5; line-height: 1.5;
} }
@@ -209,29 +209,29 @@
.project-title { .project-title {
font-weight: 600; font-weight: 600;
font-size: 11pt; font-size: 11pt;
color: #1a1a1a; color: #151914;
} }
.project-role { .project-role {
font-size: 9pt; font-size: 9pt;
color: #666; color: #6b6d68;
margin-bottom: 2px; margin-bottom: 2px;
} }
.project-summary { .project-summary {
font-size: 9.5pt; font-size: 9.5pt;
color: #4a4a4a; color: #4b4f4a;
margin-bottom: 4px; margin-bottom: 4px;
} }
.project-tech { .project-tech {
font-size: 8.5pt; font-size: 8.5pt;
color: #666; color: #6b6d68;
} }
.project-tech span { .project-tech span {
display: inline-block; display: inline-block;
background: #f0f0f0; background: #efece6;
padding: 0 4px; padding: 0 4px;
border-radius: 2px; border-radius: 2px;
margin-right: 4px; margin-right: 4px;
@@ -239,7 +239,7 @@
.project-metrics { .project-metrics {
font-size: 9pt; font-size: 9pt;
color: #4a4a4a; color: #4b4f4a;
margin-top: 2px; margin-top: 2px;
} }
@@ -247,10 +247,10 @@
.pdf-footer { .pdf-footer {
text-align: center; text-align: center;
font-size: 8pt; font-size: 8pt;
color: #999; color: #756b62;
margin-top: 16px; margin-top: 16px;
padding-top: 8px; padding-top: 8px;
border-top: 1px solid #eee; border-top: 1px solid #e3e1dc;
} }
</style> </style>
</head> </head>
+144 -234
View File
@@ -3,7 +3,7 @@
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 1000; z-index: 1000;
background: var(--bg-surface); background: color-mix(in srgb, var(--bg-surface) 85%, transparent);
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--border);
backdrop-filter: blur(12px); backdrop-filter: blur(12px);
transition: none; transition: none;
@@ -206,20 +206,21 @@
} }
.btn-primary { .btn-primary {
background: linear-gradient(135deg, #1d4ed8, #2563eb, #60a5fa); background: var(--accent);
color: #ffffff; color: var(--text-on-accent);
border: 1px solid transparent; border: 1px solid transparent;
box-shadow: 0 4px 20px rgba(96, 165, 250, 0.3); box-shadow: 0 4px 20px var(--accent-glow);
} }
.btn-primary:hover { .btn-primary:hover {
color: #ffffff; background: var(--accent-hover);
color: var(--text-on-accent);
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: 0 8px 30px rgba(96, 165, 250, 0.4); box-shadow: 0 8px 30px var(--accent-glow);
} }
.btn-primary:active { .btn-primary:active {
transform: translateY(0); transform: translateY(0);
box-shadow: 0 2px 10px rgba(96, 165, 250, 0.3); box-shadow: 0 2px 10px var(--accent-glow);
} }
.btn-secondary { .btn-secondary {
@@ -231,7 +232,7 @@
.btn-secondary:hover { .btn-secondary:hover {
border-color: var(--accent); border-color: var(--accent);
background: rgba(96, 165, 250, 0.1); background: var(--accent-soft);
transform: translateY(-2px); transform: translateY(-2px);
} }
.btn-secondary:active { .btn-secondary:active {
@@ -285,7 +286,7 @@
.badge-accent { .badge-accent {
background: var(--accent); background: var(--accent);
color: #ffffff; color: var(--text-on-accent);
} }
.badge-outline { .badge-outline {
@@ -313,35 +314,10 @@
.tag-accent { .tag-accent {
background: var(--accent); background: var(--accent);
color: #ffffff; color: var(--text-on-accent);
border-color: var(--accent); border-color: var(--accent);
} }
/* ===== Cards ===== */
.card {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 24px;
transition: all var(--transition-normal);
}
.card:hover {
border-color: var(--accent);
box-shadow: 0 4px 12px var(--shadow);
transform: translateY(-2px);
}
.card-elevated {
background: var(--bg-elevated);
border: none;
box-shadow: 0 2px 8px var(--shadow);
}
.card-featured {
border-top: 4px solid var(--accent);
}
/* ===== Section Heading ===== */ /* ===== Section Heading ===== */
.section-heading { .section-heading {
margin-bottom: 48px; margin-bottom: 48px;
@@ -377,7 +353,7 @@
justify-content: center; justify-content: center;
width: 48px; width: 48px;
height: 48px; height: 48px;
border: 1.5px solid rgba(255, 255, 255, 0.15); border: 1.5px solid var(--border-strong);
border-radius: 6px; border-radius: 6px;
color: var(--text-primary); color: var(--text-primary);
transition: color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast); transition: color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
@@ -475,12 +451,12 @@
} }
@keyframes pulse-dot { @keyframes pulse-dot {
0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); } 0%, 100% { box-shadow: 0 0 0 0 var(--success-glow); }
50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 50% { box-shadow: 0 0 0 8px transparent; }
} }
.name-highlight { .name-highlight {
background: linear-gradient(135deg, #1d4ed8, #2563eb, #60a5fa); background: linear-gradient(135deg, var(--accent), var(--accent-active));
-webkit-background-clip: text; -webkit-background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
background-clip: text; background-clip: text;
@@ -632,14 +608,14 @@
width: 100%; width: 100%;
} }
.hero-name { .hero-name {
color: #ffffff; color: var(--text-primary);
} }
.hero-title, .hero-title,
.hero-tagline { .hero-tagline {
color: #e0e0e0; color: var(--text-secondary);
} }
.hero-greeting { .hero-greeting {
color: #e0e0e0; color: var(--text-secondary);
} }
.hero-photo { .hero-photo {
display: none; display: none;
@@ -713,6 +689,7 @@
text-decoration: none; text-decoration: none;
transition: all var(--transition-fast); transition: all var(--transition-fast);
border: none; border: none;
background: transparent;
width: 100%; width: 100%;
color: var(--accent); color: var(--accent);
list-style: none; list-style: none;
@@ -726,7 +703,12 @@
.download-resume-summary:hover { .download-resume-summary:hover {
border-color: var(--accent); border-color: var(--accent);
background: var(--accent); background: var(--accent);
color: #ffffff; color: var(--text-on-accent);
}
.download-resume-summary.open {
background: var(--accent);
color: var(--text-on-accent);
} }
.download-resume-summary .chevron { .download-resume-summary .chevron {
@@ -752,10 +734,10 @@
top: calc(100% + 4px); top: calc(100% + 4px);
left: 0; left: 0;
width: fit-content; width: fit-content;
background: var(--bg-surface); background: var(--bg-elevated);
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 8px; border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 12px var(--shadow);
z-index: 100; z-index: 100;
overflow: hidden; overflow: hidden;
} }
@@ -771,7 +753,7 @@
.download-resume-option:hover { .download-resume-option:hover {
background: var(--accent); background: var(--accent);
color: #fff; color: var(--text-on-accent);
} }
/* Shared wrapper for lazer + dropdown positioning context */ /* Shared wrapper for lazer + dropdown positioning context */
.download-resume-shared-wrapper { .download-resume-shared-wrapper {
@@ -824,7 +806,7 @@
position: relative; position: relative;
z-index: 1; z-index: 1;
width: 100%; width: 100%;
background: var(--bg-surface); background: var(--accent-tint);
border-radius: var(--radius-md); border-radius: var(--radius-md);
} }
@@ -905,9 +887,8 @@
} }
.expertise-skill { .expertise-skill {
font-size: 14px; font-size: var(--text-meta);
color: var(--text-secondary); line-height: var(--leading-body);
padding: 4px 0;
} }
.expertise-skill::before { .expertise-skill::before {
@@ -983,12 +964,14 @@
.timeline-title { .timeline-title {
font-size: 20px; font-size: 20px;
line-height: 1.3;
font-weight: 600; font-weight: 600;
color: var(--text-primary); color: var(--text-primary);
} }
.timeline-company { .timeline-company {
font-size: 16px; font-size: 16px;
line-height: 1.4;
color: var(--text-secondary); color: var(--text-secondary);
} }
@@ -1006,8 +989,8 @@
} }
.timeline-responsibilities li { .timeline-responsibilities li {
font-size: 14px; font-size: var(--text-meta);
color: var(--text-secondary); line-height: var(--leading-body);
padding-left: 16px; padding-left: 16px;
position: relative; position: relative;
} }
@@ -1029,17 +1012,29 @@
.achievement-title { .achievement-title {
font-size: 18px; font-size: 18px;
line-height: 1.3;
font-weight: 600; font-weight: 600;
color: var(--text-primary); color: var(--text-primary);
margin-bottom: 8px; margin-bottom: 8px;
} }
.achievement-context { .achievement-context {
font-size: 14px; font-size: var(--text-meta);
color: var(--text-secondary); line-height: var(--leading-body);
margin-bottom: 12px; margin-bottom: 12px;
} }
.achievement-impact {
font-size: var(--text-meta);
line-height: var(--leading-body);
color: var(--text-secondary);
margin-bottom: 8px;
}
.achievement-metrics {
margin-bottom: 8px;
}
.achievement-techs { .achievement-techs {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@@ -1050,7 +1045,7 @@
.achievement-metric { .achievement-metric {
display: inline-block; display: inline-block;
background: var(--accent); background: var(--accent);
color: #ffffff; color: var(--text-on-accent);
padding: 4px 12px; padding: 4px 12px;
border-radius: var(--radius-sm); border-radius: var(--radius-sm);
font-size: 14px; font-size: 14px;
@@ -1112,9 +1107,9 @@
} }
.project-card-summary { .project-card-summary {
font-size: 14px; font-size: var(--text-meta);
color: var(--text-secondary); color: var(--text-secondary);
line-height: 1.6; line-height: var(--leading-body);
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
@@ -1168,12 +1163,14 @@
.philosophy-card h3 { .philosophy-card h3 {
font-size: 18px; font-size: 18px;
line-height: 1.25;
color: var(--accent); color: var(--accent);
margin-bottom: 8px; margin-bottom: 8px;
} }
.philosophy-card p { .philosophy-card p {
font-size: 14px; font-size: var(--text-meta);
line-height: var(--leading-body);
} }
.philosophy-keywords { .philosophy-keywords {
@@ -1208,6 +1205,7 @@
align-items: center; align-items: center;
gap: 12px; gap: 12px;
font-size: 16px; font-size: 16px;
line-height: 1.4;
color: var(--text-secondary); color: var(--text-secondary);
text-decoration: none; text-decoration: none;
padding: 16px 24px; padding: 16px 24px;
@@ -1228,6 +1226,12 @@
height: 24px; height: 24px;
} }
.contact-link-sub {
font-size: var(--text-meta);
line-height: 1.5;
color: var(--text-muted);
}
@media (max-width: 768px) { @media (max-width: 768px) {
.contact-links { .contact-links {
flex-direction: column; flex-direction: column;
@@ -1284,179 +1288,9 @@
} }
} }
/* ===== Page Header ===== */
.page-header {
padding: 80px 0 48px;
text-align: center;
}
.page-header h1 {
margin-bottom: 16px;
}
/* ===== Breadcrumb ===== */
.breadcrumb {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
color: var(--text-muted);
margin-bottom: 24px;
}
.breadcrumb a {
color: var(--text-muted);
}
.breadcrumb a:hover {
color: var(--accent);
}
.breadcrumb-separator {
color: var(--text-muted);
}
/* ===== Form ===== */
.form-group {
margin-bottom: 24px;
}
.form-label {
display: block;
font-size: 14px;
font-weight: 500;
color: var(--text-primary);
margin-bottom: 8px;
}
.form-input,
.form-textarea {
width: 100%;
padding: 12px 16px;
font-size: 16px;
font-family: inherit;
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-md);
color: var(--text-primary);
transition: border-color var(--transition-fast);
}
.form-input:focus,
.form-textarea:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}
.form-input::placeholder,
.form-textarea::placeholder {
color: var(--text-muted);
}
.form-textarea {
min-height: 120px;
resize: vertical;
}
/* ===== Filter bar ===== */
.filter-bar {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 32px;
justify-content: center;
}
.filter-pill {
padding: 8px 16px;
font-size: 14px;
font-weight: 500;
background: transparent;
border: 1px solid var(--border);
border-radius: 100px;
color: var(--text-muted);
cursor: pointer;
transition: all var(--transition-fast);
font-family: inherit;
}
.filter-pill:hover {
border-color: var(--accent);
color: var(--accent);
}
.filter-pill.active {
background: var(--accent);
border-color: var(--accent);
color: #ffffff;
}
/* ===== Article Card ===== */
.article-card {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 24px;
margin-bottom: 16px;
transition: all var(--transition-normal);
text-decoration: none;
color: inherit;
}
.article-card:hover {
border-color: var(--accent);
box-shadow: 0 4px 12px var(--shadow);
transform: translateY(-2px);
}
.article-card h3 {
font-size: 20px;
color: var(--text-primary);
margin-bottom: 8px;
}
.article-meta {
display: flex;
gap: 16px;
font-size: 14px;
color: var(--text-muted);
margin-bottom: 8px;
}
/* ===== Engineering Tabs ===== */
.engineering-tabs {
display: flex;
gap: 0;
border-bottom: 1px solid var(--border);
margin-bottom: 32px;
}
.engineering-tab {
padding: 12px 24px;
font-size: 16px;
font-weight: 500;
background: none;
border: none;
border-bottom: 2px solid transparent;
color: var(--text-muted);
cursor: pointer;
transition: all var(--transition-fast);
font-family: inherit;
}
.engineering-tab:hover {
color: var(--text-primary);
}
.engineering-tab.active {
color: var(--accent);
border-bottom-color: var(--accent);
}
/* ===== Content prose ===== */ /* ===== Content prose ===== */
.prose { .prose {
max-width: var(--max-content); max-width: var(--measure-prose);
} }
.prose h2 { .prose h2 {
@@ -1466,13 +1300,23 @@
} }
.prose h3 { .prose h3 {
margin-top: 32px; margin-top: 1.5em;
margin-bottom: 12px; margin-bottom: 0.65em;
font-size: 22px; }
.prose h4 {
margin-top: 1.25em;
margin-bottom: 8px;
font-size: 16px;
line-height: 1.3;
} }
.prose p { .prose p {
margin-bottom: 16px; margin-bottom: 1em;
}
.prose p:last-child {
margin-bottom: 0;
} }
.prose ul, .prose ul,
@@ -1484,6 +1328,8 @@
.prose li { .prose li {
margin-bottom: 8px; margin-bottom: 8px;
color: var(--text-secondary); color: var(--text-secondary);
font-size: var(--text-body);
line-height: var(--leading-body);
} }
.prose blockquote { .prose blockquote {
@@ -1494,6 +1340,70 @@
font-style: italic; font-style: italic;
} }
/* Lead paragraph that stands outside a .prose column */
.prose-lede {
max-width: var(--measure-prose);
font-size: var(--text-lede);
line-height: 1.55;
}
/* Column for blocks that are not prose (grids, tag lists, timelines) */
.page-body {
max-width: 700px;
}
.subheading {
margin-top: 32px;
margin-bottom: 12px;
}
.philosophy-quote + .philosophy-quote {
margin-top: 48px;
}
.philosophy-quote h3 {
margin-top: 0;
}
.project-section {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 16px;
margin-bottom: 16px;
box-shadow: inset 0 1px 0 var(--inset-highlight);
}
.project-section h4 {
margin-top: 0;
}
.project-section p {
font-size: var(--text-meta);
line-height: var(--leading-body);
}
.back-link {
display: inline-block;
font-size: var(--text-meta);
font-weight: 500;
color: var(--accent);
margin-bottom: 32px;
}
.section-cta {
display: block;
font-size: var(--text-meta);
font-weight: 500;
color: var(--accent);
margin-bottom: 24px;
}
.link-label {
font-weight: 500;
color: var(--text-primary);
}
/* ===== Back to top ===== */ /* ===== Back to top ===== */
.back-to-top { .back-to-top {
position: fixed; position: fixed;
@@ -1503,7 +1413,7 @@
height: 40px; height: 40px;
border-radius: 50%; border-radius: 50%;
background: var(--accent); background: var(--accent);
color: #ffffff; color: var(--text-on-accent);
border: none; border: none;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
-1
View File
@@ -95,7 +95,6 @@ export const strings = {
}, },
common: { common: {
backTo: {en: 'Back to %s', vi: 'Quay lại %s'}, backTo: {en: 'Back to %s', vi: 'Quay lại %s'},
skipLink: {en: 'Skip to content', vi: 'Bỏ qua nội dung'},
resumeDownload: {en: 'Get Resume', vi: 'Tải CV'}, resumeDownload: {en: 'Get Resume', vi: 'Tải CV'},
socialAriaLabels: { socialAriaLabels: {
github: {en: 'View GitHub profile', vi: 'Xem hồ sơ GitHub'}, github: {en: 'View GitHub profile', vi: 'Xem hồ sơ GitHub'},
+93 -87
View File
@@ -1,27 +1,41 @@
/* Theme variables — Dark mode (default) */ /* Theme variables — Dark mode (default) */
:root { :root {
--bg-primary: #0f1117; --bg-primary: #151914;
--bg-surface: #161922; --bg-surface: #202423;
--bg-elevated: #1c2030; --bg-elevated: #272a28;
--text-primary: #e8eaed; --text-primary: #f6f5f2;
--text-secondary: #9aa0a6; --text-secondary: #b7aea0;
--text-muted: #6b7280; --text-muted: #8f9a8e;
--accent: #60a5fa; --accent: #f87171;
--accent-hover: #93c5fd; --accent-hover: #fca5a5;
--accent-active: #3b82f6; --accent-active: #f06060;
--border: #2a3040; --text-on-accent: #151914;
--shadow: rgba(0, 0, 0, 0.4); --accent-soft: rgba(239, 68, 68, 0.12);
--code-bg: #1a1e2e; --accent-tint: #2f1e1a;
--success: #34d399; --accent-glow: rgba(239, 68, 68, 0.3);
--error: #f87171; --border: #2a3028;
--grid-color: rgba(96, 165, 250, 0.1); --border-strong: #3a403a;
--shadow: rgba(0, 0, 0, 0.45);
--inset-highlight: rgba(255, 255, 255, 0.05);
--code-bg: #1a1e1b;
--success: #4ade80;
--success-glow: rgba(74, 222, 128, 0.35);
--error: #fca5a5;
--warning: #fbbf24;
--grid-color: rgba(246, 245, 242, 0.06);
color-scheme: dark;
--sans: 'Inter', system-ui, -apple-system, sans-serif; --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
--mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace; --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
--max-wide: 1200px; --max-wide: 1200px;
--max-content: 800px; --max-content: 800px;
--max-narrow: 600px;
--text-body: 18px;
--text-lede: 20px;
--text-meta: 15px;
--leading-body: 1.65;
--measure-prose: 600px;
--radius-sm: 4px; --radius-sm: 4px;
--radius-md: 6px; --radius-md: 6px;
@@ -43,57 +57,59 @@
/* Light mode */ /* Light mode */
:root[data-theme='light'] { :root[data-theme='light'] {
--bg-primary: #ececee; --bg-primary: #f6f5f2;
--bg-surface: #e0e0e3; --bg-surface: #fbfaf8;
--bg-elevated: #ffffff; --bg-elevated: #ffffff;
--text-primary: #0a0a0a; --text-primary: #151914;
--text-secondary: #404040; --text-secondary: #6b6d68;
--text-muted: #808080; --text-muted: #756b62;
--accent: #2563eb; --accent: #b04138;
--accent-hover: #3b82f6; --accent-hover: #a8382f;
--accent-active: #1d4ed8; --accent-active: #9b3229;
--border: #e0e0e0; --text-on-accent: #ffffff;
--shadow: rgba(0, 0, 0, 0.1); --accent-soft: rgba(239, 68, 68, 0.1);
--code-bg: #f0f0ff; --accent-tint: #f5e3e1;
--success: #059669; --accent-glow: rgba(239, 68, 68, 0.22);
--error: #dc2626; --border: #e3e1dc;
} --border-strong: #d9d6d0;
--shadow: rgba(21, 25, 20, 0.1);
/* System theme */ --inset-highlight: rgba(255, 255, 255, 0.9);
@media (prefers-color-scheme: dark) { --code-bg: #efece6;
:root:not([data-theme='light']) { --success: #15803d;
--bg-primary: #0f1117; --success-glow: rgba(21, 128, 61, 0.35);
--bg-surface: #161922; --error: #991b1b;
--bg-elevated: #1c2030; --warning: #b45309;
--text-primary: #e8eaed; --grid-color: rgba(21, 25, 20, 0.07);
--text-secondary: #9aa0a6; color-scheme: light;
--text-muted: #6b7280;
--accent: #60a5fa;
--accent-hover: #93c5fd;
--accent-active: #3b82f6;
--border: #2a3040;
--shadow: rgba(0, 0, 0, 0.4);
--code-bg: #1a1e2e;
--success: #34d399;
}
} }
/* Pre-hydration / no-JS: honour an OS light preference */
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
:root:not([data-theme='dark']) { :root:not([data-theme='dark']) {
--bg-primary: #ececee; --bg-primary: #f6f5f2;
--bg-surface: #e0e0e3; --bg-surface: #fbfaf8;
--bg-elevated: #ffffff; --bg-elevated: #ffffff;
--text-primary: #0a0a0a; --text-primary: #151914;
--text-secondary: #404040; --text-secondary: #6b6d68;
--text-muted: #808080; --text-muted: #756b62;
--accent: #2563eb; --accent: #b04138;
--accent-hover: #3b82f6; --accent-hover: #a8382f;
--accent-active: #1d4ed8; --accent-active: #9b3229;
--border: #e0e0e0; --text-on-accent: #ffffff;
--shadow: rgba(0, 0, 0, 0.1); --accent-soft: rgba(239, 68, 68, 0.1);
--code-bg: #f0f0ff; --accent-tint: #f5e3e1;
--success: #059669; --accent-glow: rgba(239, 68, 68, 0.22);
--error: #dc2626; --border: #e3e1dc;
--border-strong: #d9d6d0;
--shadow: rgba(21, 25, 20, 0.1);
--inset-highlight: rgba(255, 255, 255, 0.9);
--code-bg: #efece6;
--success: #15803d;
--success-glow: rgba(21, 128, 61, 0.35);
--error: #991b1b;
--warning: #b45309;
--grid-color: rgba(21, 25, 20, 0.07);
color-scheme: light;
} }
} }
@@ -140,12 +156,25 @@ h2 {
} }
h3 { h3 {
font-size: 24px; font-size: 21px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 15px;
} }
p { p {
font-size: var(--text-body);
line-height: var(--leading-body);
color: var(--text-secondary); color: var(--text-secondary);
line-height: 1.7;
} }
a { a {
@@ -201,12 +230,6 @@ pre code {
padding: 0 24px; padding: 0 24px;
} }
.container-narrow {
max-width: var(--max-narrow);
margin: 0 auto;
padding: 0 24px;
}
.section { .section {
padding: 80px 0; padding: 80px 0;
} }
@@ -261,23 +284,6 @@ pre code {
} }
} }
/* Skip link */
.skip-link {
position: absolute;
top: -100%;
left: 16px;
padding: 8px 16px;
background: var(--accent);
color: white;
border-radius: var(--radius-md);
z-index: 10000;
font-weight: 500;
}
.skip-link:focus {
top: 16px;
}
/* Language toggle button */ /* Language toggle button */
.lang-toggle { .lang-toggle {
background: transparent; background: transparent;