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

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

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

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

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

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

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

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

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

No files matched your search

+3 -2
View File
@@ -121,9 +121,10 @@ docker-compose.yaml
## Typography ## Typography
- Scale tokens in `src/index.css`: `--text-body: 18px`, `--text-lede: 20px`, `--text-meta: 15px`, `--leading-body: 1.65`, `--measure-prose: 600px` - Scale tokens in `src/index.css`: `--text-body: 18px`, `--text-lede: 20px`, `--text-meta: 15px`, `--leading-body: 1.65`, `--measure-prose: 600px`, `--measure-page: 680px`
- Global: `p` = `--text-body` / `--leading-body`; `h3` 21px, `h4` 18px, `h5` 16px, `h6` 15px - 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` - Two measures: `.prose` (600px) for long-form narrative, `.prose-wide` (680px, body steps up to `--text-lede`) for page-length prose. A lead paragraph uses `.prose-lede` (600px), or `.prose-lede lede-wide` (680px) when it sits next to a full-width grid. Non-prose columns use `.page-body` (`--measure-page`); titles inside a column use `.subheading`
- Cards and grids take the full container width; text columns do not. `/about` and the homepage About section use `container-wide` with `.philosophy-grid` at 3 columns (2 at ≤1024px, 1 at ≤768px), the same model as `.expertise-grid`
- Body copy sizes come from the tokens; 12-14px literals are reserved for chrome (tags, badges, pills, footer, duration labels) - 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 - 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` - 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`
+132 -51
View File
@@ -2,7 +2,7 @@
## Overview ## Overview
Timeline hiển thị kinh nghiệm làm việc, tập trung vào achievements và impact. Timeline hiển thị kinh nghiệm làm việc: role, company, duration/location và responsibilities. Achievements **không còn render trong SPA** (2026-10-16) — dữ liệu vẫn được `scripts/generate-resume.ts` dùng cho resume PDF.
--- ---
@@ -11,24 +11,24 @@ Timeline hiển thị kinh nghiệm làm việc, tập trung vào achievements v
``` ```
ExperienceSection ExperienceSection
├── SectionHeading ("Experience") ├── SectionHeading ("Experience")
└── ExperienceTimeline └── ExperienceTimeline (.timeline)
└── ExperienceEntry (×N) ├── ExperienceEntry (×N, newest-first) — entry có `current: true` nhận thêm class `.timeline-entry-current`
├── TimelineMarker │ ├── TimelineMarker (.timeline-marker)
├── Company/RoleHeader │ ├── TimelineHeader (.timeline-header)
│ ├── Title │ │ ├── Title (.timeline-title)
│ ├── Company │ │ ├── Company (.timeline-company)
│ └── Duration │ │ └── Meta (.timeline-meta)
├── Responsibilities │ │ ├── Duration (.timeline-duration)
│ └── List items │ │ └── Location (.timeline-location)
├── FeaturedAchievement (optional) │ └── Responsibilities (.timeline-responsibilities → li)
│ ├── AchievementTitle └── TldrNode (.timeline-tldr) — node chốt, luôn render sau entry cuối
│ ├── Context ├── Diamond marker (.timeline-tldr-marker)
│ ├── TechnicalWork ├── Chip (.timeline-tldr-chip)
│ ├── Impact (with metrics) └── Text (.timeline-tldr-text)
│ └── Tags (technologies)
└── ExpandableDetails (optional)
``` ```
`FeaturedAchievement` và `ExpandableDetails` không còn trong markup SPA — xem §Featured Achievement. Node TLDR là node cuối của timeline — xem §TLDR Terminal Node. Entry mới nhất là một *status*, không phải vai trò đã qua — xem §Current Status Node.
--- ---
## Content Model ## Content Model
@@ -37,11 +37,14 @@ ExperienceSection
interface ExperienceEntry { interface ExperienceEntry {
id: string; id: string;
title: string; title: string;
titleEn?: string;
company: string; company: string;
duration: string; // e.g. "2021 – Present" duration: string; // e.g. "Jan 2020 – Aug 2026"
location?: string; location?: string;
responsibilities: string[]; responsibilities: string[];
achievements?: FeaturedAchievement[]; responsibilitiesEn?: string[];
achievements?: FeaturedAchievement[]; // không còn trong data; resume vẫn render nếu có
variant?: 'current' | 'gap'; // 'current' = node đang sống, 'gap' = nghỉ giữa hai vai trò
} }
interface FeaturedAchievement { interface FeaturedAchievement {
@@ -56,26 +59,23 @@ interface FeaturedAchievement {
} }
``` ```
Text của node TLDR **không** nằm trong `experience.ts`: nó là dẫn xuất của cả timeline chứ không phải một sự kiện, nên ở `src/i18n/strings.ts` — `experience.tldr` (nhãn chip) và `experience.tldrText` (câu tóm tắt).
--- ---
## Layout ## Layout
### Desktop ### Desktop
- Timeline line bên trái - Spine vẽ **theo từng node** (`.timeline-entry::before`, `left: -31px`, `bottom: -32px` bắc qua margin 32px) — không còn một đường liên tục trên `.timeline`, nên nó kết thúc đúng tại diamond của node TLDR thay vì chạy dài xuống dưới
- Entries bên phải timeline - Gutter 36px (`padding-left`); marker 12px có tâm (x=6) nằm đúng trên tâm spine (5 + 1)
- Mỗi entry: full-width card - Entry rhythm: 32px padding-bottom + 32px margin-bottom + 1px divider; node `gap` bỏ divider
- Featured achievement: nested card với accent border - Bullet responsibilities: dot 5px (ring `--accent`, nhân `--accent-soft`), đặt tại `0.66em` để thẳng hàng x-height của dòng đầu
- Metrics: highlight box (accent background, white text)
- Tags: row of pills
### Mobile ### Mobile
- Timeline line ẩn - ≤768px: spine và marker **được giữ** (trước đây bị ẩn) — gutter giảm còn 28px, marker `left: -28px`
- Entries: stacked cards - Entry rhythm giảm còn 24px
- Featured achievement: full-width nested card
- Metrics: inline highlight
- Tags: wrap pills
--- ---
@@ -83,19 +83,78 @@ interface FeaturedAchievement {
| Variant | Style | | Variant | Style |
|---|---| |---|---|
| Default | Circle, accent color, 12px diameter | | Current node (`variant: 'current'`) | 12px, `--accent` fill + `--accent` ring + pulse `timeline-status-pulse` (spread 0 → 10px `--accent-glow`) |
| Active (current role) | Circle, accent fill, 14px diameter | | Gap node (`variant: 'gap'`) | **10px**, `--border-strong` ring, `--bg-primary` fill — nhỏ hơn một bậc, không accent |
| Completed | Circle, accent outline, 12px diameter | | Other entries | 12px, `--border-strong` ring, `--bg-primary` fill |
| Hover | Ring chuyển sang `--accent` |
---
## Current Status Node
Entry có `variant: 'current'` trong `experience.ts`: node "bây giờ". Nó dùng **cùng họ panel với node TLDR** — flat surface, hairline border, radius, whisper shadow — và khác đúng hai chỗ: cạnh trái accent và marker pulse.
| Phần | Style |
|---|---|
| Marker | fill `--accent`, border `--accent`, `animation: timeline-status-pulse 2.4s ease-out infinite` (spread 0 → 10px `--accent-glow`, cùng idiom `.greeting-dot` của hero). Mobile đổi `animation-name` sang `timeline-status-pulse-sm` (spread 0 → 6px) |
| Panel | Entry có padding thật `16px 18px 20px` (desktop) / `14px 16px 18px` (mobile) và **bỏ divider riêng** (`border-bottom: none`); `.timeline-entry-current::after` inset `-10px -10px -10px -8px` (desktop) / `-8px -8px -8px -4px` (mobile), `--bg-surface`, `1px solid --border` + `border-left: 2px solid --accent`, radius `--radius-lg`, shadow `inset 0 1px 0 --inset-highlight, 0 8px 20px -18px --shadow`, `z-index: -1` |
| Stacking | `isolation: isolate` trên entry — panel nằm **sau** text, bullet và đoạn spine của chính entry nhưng **trước** background của section |
| Trigger | `variant?: 'current' \| 'gap'` trong `ExperienceEntry`, class ghép `timeline-entry-${variant}` trong JSX — không hard-code `exp.id` |
Không có va chạm marker–panel và không có chữ sát viền:
| | Gutter | Border trái panel | Vòng pulse ngoài cùng | Chữ bắt đầu | Hở pulse | Hở chữ |
|---|---|---|---|---|---|---|
| Desktop | 36 | 36 − 8 = **28–30** | marker 0–12 + spread 10 = 22 | 36 + 18 = **54** | 6px | 24px |
| Mobile | 28 | 28 − 4 = **24–26** | marker 0–12 + spread 6 = 18 | 28 + 16 = **44** | 6px | 18px |
Spine ở x 5–7 nằm ngoài panel. `prefers-reduced-motion` toàn cục (`index.css:275`) flatten pulse về static, marker vẫn giữ halo của rule `:first-child`.
---
## Gap Node (Career Break)
Entry có `variant: 'gap'` — khoảng nghỉ giữa hai vai trò. Mục tiêu hình ảnh: **đọc ra là một khoảng trống**, không phải một công việc.
| Phần | Style |
|---|---|
| Spine | `.timeline-entry-gap::before` đổi sang `repeating-linear-gradient` — gạch 4px, hở 5px, màu `--border-strong`; chạy suốt chiều cao node rồi bắc qua margin 32px sang node kế tiếp |
| Marker | 10px ring `--border-strong`, nhân `--bg-primary`; `left: -35px` desktop (tâm = 36 − 35 + 5 = 6, vẫn đúng trên spine), `-27px` mobile (28 − 27 + 5 = 6) |
| Divider | bỏ (`border-bottom: none`) — đường gạch nối thẳng sang node kế |
| Title | `--text-muted` + `font-style: italic` |
| Company | `--text-muted` |
Không có accent, không có bed, không có pulse: node gap nhỏ hơn và mờ hơn mọi node việc. `:first-child` fill vẫn tồn tại trong CSS nhưng `.timeline-entry-gap .timeline-marker` đứng sau trong nguồn và có cùng specificity → gap thắng nếu một ngày node gap là node đầu.
---
## TLDR Terminal Node
Node cuối, luôn có, không đến từ `experiences`: toàn bộ timeline được gói lại trong một câu.
Intent: tĩnh và lặng. Không gradient, không viền accent đậm, không quầng mạnh. Accent chỉ nằm ở ba chỗ: diamond trên spine, link hairline và chip.
| Phần | Style |
|---|---|
| Marker | 12px square `rotate(45deg)` → diamond **ruột rỗng**: border 2px `--accent`, nhân `--bg-primary` (che luôn đoạn stub spine đi sau), halo `0 0 0 3px --accent-soft`; tâm vẫn nằm đúng trên spine (x=6) |
| Stub | `.timeline-tldr::before` 2px × 22px nối đoạn spine cuối xuống tâm diamond |
| Link | `.timeline-tldr::after` **1px** accent ngang 24px, từ diamond vào border panel; vẽ đè lên diamond nên khớp nối liền một màu |
| Panel | `--bg-surface` phẳng (không gradient), border 1px `--border`, radius `--radius-lg`, `inset 0 1px 0 --inset-highlight` + `0 8px 20px -18px --shadow` |
| Chip | mono 12px, `letter-spacing: 2px`, uppercase, `--accent`, **không** nền, không khung — cùng giọng với `.section-tag` |
| Text | `var(--text-lede)` 20px / 1.55; không khai báo màu → kế thừa `p` toàn cục (`--text-secondary`), giống mọi lede khác trong site |
Cột text: 636px (homepage: `.page-body` 680 − gutter 36 − padding 2×24) → ~74 ký tự/dòng; 668px trên `/experience` (752 − 36 − 48) → ~78 ký tự/dòng. Cả hai trong band 45–80.
--- ---
## Featured Achievement ## Featured Achievement
| Variant | Style | | Scope | Status |
|---|---| |---|---|
| Default | Accent left border (4px), padding, subtle bg | | SPA (`/experience` + homepage Experience) | **Removed 2026-10-16.** `.achievement`, `.achievement-title`, `.achievement-context`, `.achievement-impact`, `.achievement-metrics`, `.achievement-techs` deleted from `src/App.css`. |
| Metrics | Accent bg, white text, bold | | Resume PDF | Unchanged — `scripts/generate-resume.ts:100-115` and `public/resume-template.html:127-181` still render achievements. |
| Tags | Pill style, muted bg, muted text | | Data / types | `achievements` in `src/data/experience.ts` and `FeaturedAchievement` in `src/types/index.ts` kept: the resume generator consumes them. |
| `.achievement-metric` | Kept — still used by `Projects.tsx:75` and `ProjectDetailPage.tsx:47`. |
--- ---
@@ -103,19 +162,19 @@ interface FeaturedAchievement {
| Element | Size | Weight | | Element | Size | Weight |
|---|---|---| |---|---|---|
| Section heading (H2) | 40px / 32px mobile | 600 | | Section heading (H2) | `clamp(24px, 4vw, 40px)` | 600 |
| Role title | 20px | 600 | | Role title | 20px | 600 |
| Company | 16px | 400 | | Company | 16px | 400 |
| Duration | 14px | 400 | | Duration / Location | 14px (chrome) | 400 |
| Responsibility | 14px | 400 | | Responsibility | `var(--text-meta)` 15px / `var(--leading-body)` 1.65 | 400 |
| Achievement title | 18px | 500 |
| Impact metric | 16px | 600 | Achievement title 18px and metric 14px/600 no longer appear on this section; `.achievement-metric` is chrome on the projects pages.
--- ---
## Accessibility ## Accessibility
- H2 section, H3 entry titles - H2 section; entry titles hiện render bằng `div`, chưa phải `h3`
- Semantic `<time>` cho duration - Semantic `<time>` cho duration
- `aria-label` cho timeline - `aria-label` cho timeline
- Metrics: semantic highlight, không chỉ màu - Metrics: semantic highlight, không chỉ màu
@@ -125,9 +184,11 @@ interface FeaturedAchievement {
## Animation ## Animation
- Timeline line draw từ trên xuống khi scroll vào viewport - Mỗi entry reveal độc lập: `initial {opacity: 0, y: 24}` → `whileInView {opacity: 1, y: 0}`, `viewport {once: true, amount: 0.2}`, `duration 0.45s`, `ease easeOut`, `delay i * 0.08`
- Entries fade-in stagger (150ms delay) - `staggerChildren` trên section bị bỏ: nó cộng hưởng với `delay: i * 0.15` của từng child, khiến entry ở giữa trang xuất hiện muộn không cần thiết
- Featured achievement: accent border appear - Hover **không còn transform nào**. `scale: 1.02` làm text re-raster hoá trong lúc animation chạy; `y: -4` cũng bị bỏ — spine là `::before` của chính entry, nâng entry sẽ nâng cả đoạn spine và làm lệch khớp nối. Phản hồi hover chuyển hết sang CSS: marker ring → `--accent`, divider → `--border-strong`
- Spine không "draw" khi scroll: mỗi node tự vẽ đoạn của mình; node TLDR kết thúc chuỗi bằng stub 22px dừng đúng tại tâm diamond
- Reduced motion: `main.tsx` đặt `motion.config.reducedMotion = 'user'`, cùng `@media (prefers-reduced-motion: reduce)` trong `src/index.css`
--- ---
@@ -135,10 +196,11 @@ interface FeaturedAchievement {
| State | Description | | State | Description |
|---|---| |---|---|
| Default | Normal render | | Default | Marker ring `--border-strong`, divider `--border` |
| Hover | Entry subtle lift (shadow) | | Hover | Marker ring → `--accent`, divider → `--border-strong` (không còn transform) |
| Scroll reveal | Fade-in + slide-up | | Scroll reveal | Fade-in + slide-up, một lần (`once: true`) |
| Reduced motion | Disable animations | | Reduced motion | Animation tắt theo user preference |
| Current status node | Marker pulse 2.4s + bed `--accent-soft` với border-left accent |
--- ---
@@ -146,5 +208,24 @@ interface FeaturedAchievement {
- Data-driven từ `experience.ts` - Data-driven từ `experience.ts`
- Entries có thể 0 → render empty state - Entries có thể 0 → render empty state
- Featured achievements là optional trong entry - `achievements` đã bị xoá khỏi `experience.ts`; field vẫn optional trong type, và `scripts/generate-resume.ts:100` vẫn render nó nếu có (optional chaining → resume PDF hiện không còn phần achievement)
- Không hard-code entry count - Không hard-code entry count
---
## Implementation record (2026-10-16)
- Achievements removed from `src/pages/ExperiencePage.tsx` and `src/components/sections/Experience.tsx`; the `.achievement*` rules that lost their only consumers were deleted. `.achievement-metric` stays (projects pages).
- Timeline restyled: spine vẽ theo node (`.timeline-entry::before`), marker/spine centres aligned exactly (36px gutter desktop, 28px mobile), 32px / 24px entry rhythm, filled current-role marker with `--accent-soft` halo, hover states on marker and divider, `.timeline-meta` single row (duration · location), 5px accent bullets at `0.66em`.
- Motion: per-entry `whileInView` reveal; mọi hover transform đã bỏ (spine là `::before` của entry, lift làm lệch khớp nối).
- TLDR terminal node: text tại `src/i18n/strings.ts:42-46` — `tldr` = `TL;DR` cho cả hai ngôn ngữ, `tldrText` = "15 years of experience, more than 5 companies along the way. Too long to tell." / "15 năm kinh nghiệm, hơn 5 công ty đã đi qua. Quá dài để kể hết."; markup tại `src/pages/ExperiencePage.tsx:39-43` và `src/components/sections/Experience.tsx:56-60`; CSS tại `src/App.css` (`.timeline-tldr`, `::before`, `::after`, `-marker`, `-chip`, `-text`).
- Current status node: `current?: boolean` thêm vào `ExperienceEntry` (`src/types/index.ts:50`); entry `open-to-work` tại `src/data/experience.ts:4-21` ("Nov 2026 – Present", `current: true`); class ghép tại `src/pages/ExperiencePage.tsx:17` và `src/components/sections/Experience.tsx:30`; CSS `.timeline-entry-current` + `@keyframes timeline-status-pulse` trong `src/App.css`.
- `experience.ts` giờ có 4 entry (open-to-work, Lazada 01/2020–08/2026, Nexts 06/2019–12/2019, SAP 2017–12/2019), newest-first ✓. Ba entry cũ trùng nhau `id: "senior-swe"` → trùng React key; đã đổi thành `lazada-senior-swe`, `nexts-founder`, `sap-senior-swe`, và sửa `Nexts Limted` → `Nexts Limited`.
- Bốn điểm dữ liệu chủ sở hữu cần tự xác nhận — tôi không tự sửa vì không có nguồn trong repo: (1) `sap-senior-swe` có `responsibilitiesEn` **5 bullet copy nguyên từ entry Lazada** (IoT-DWS 16 sortations, Scrum Level L3) trong khi bản VI chỉ 2 bullet, nên switch ngôn ngữ đổi cả nội dung lẫn độ dài; (2) `nexts-founder`: VI 1 bullet chung chung, EN 1 bullet cụ thể về autonomous vehicles — cũng lệch nhau; (3) TLDR nói *15 năm / hơn 5 công ty* còn dữ liệu là 2017→2026 (~9–10 năm) với 3 nhà tuyển dụng + 1 công ty tự lập; (4) `open-to-work` ghi "Nov 2026 – Present" trong khi hôm nay là 2026-10-16, và Lazada kết thúc 08/2026 → còn trống 09–10/2026.
- Verified: `tsc -b` exit 0; `vite build` green. Built CSS contains `.timeline-entry:before{…bottom:-32px;left:-31px}` (mobile `bottom:-24px;left:-23px`), `.timeline-entry:first-child:before{top:12px}`, `.timeline-entry:last-child:before{bottom:0}`, the whole `.timeline-tldr` set (`:before` stub, `:after` link, `-marker` diamond, `-chip`, `-text`) and **no** global `.timeline:before`. oxlint 11 errors / 9 warnings — identical to before this change; the HEAD baseline was 15/9 and the four that disappeared were `useField`-in-callback findings removed together with the achievements markup.
- Still open from this spec (intent not implemented): semantic `<time>` for duration, `aria-label` on the timeline, entry titles as `h3` (they render as `div`), spine draw-on-scroll, keyboard navigation between entries.
- Gap node `relax-gap` ("Nghỉ ngơi" / "Relax", `Aug 2026 – Oct 2026`, `Career break`) tại `src/data/experience.ts:20-35`, chèn đúng giữa `open-to-work` (Nov 2026 – Present) và `lazada-senior-swe` (Jan 2020 – Aug 2026) → hết khoảng trống 09–10/2026 đã nêu ở mục trên. `current?: boolean` được thay bằng `variant?: 'current' \| 'gap'` (`src/types/index.ts:50`), class ghép trong JSX; CSS `.timeline-entry-gap` + `::before` dashed + marker 10px trong `src/App.css`. Đã sửa thêm `duration` của Lazada: `"Jan 2020 – Aug 2026"` (hai khoảng trắng) → một khoảng trắng.
- Resume PDF **có** render node gap (dòng "Relax — Career break" trong `dist/resume.pdf`). Đó là quyết định của chủ sở hữu: nếu muốn timeline SPA có nghỉ còn resume thì không, chỉ cần đổi `renderExperience(experiences)` thành `renderExperience(experiences.filter(e => e.variant !== 'gap'))` tại `scripts/generate-resume.ts:159`.
- Verified lần cuối (sau khi thêm gap node): `tsc -b` exit 0; `vite build` xanh. Built CSS có `.timeline-entry-gap:before{background:repeating-linear-gradient(to bottom,var(--border-strong) 0px,var(--border-strong) 4px,transparent 4px,transparent 9px)}`, `.timeline-entry-gap{border-bottom:none}`, `.timeline-entry-gap .timeline-marker{width:10px;height:10px;left:-35px}` + bản mobile `left:-27px`, và title/company muted với `font-style:italic`. oxlint vẫn 11 errors / 9 warnings. `pnpm build:resume-all` chạy thành công; text của `dist/resume.pdf` và `dist/resume-vi.pdf` không chứa chuỗi `undefined`.
- Va chạm hình ảnh do chủ sở hữu báo cáo: **border trái của bed chồng lên vòng pulse của marker**. Trước đây desktop `left: -14px` → border tại x 22, đúng bằng peak pulse (marker 12px + spread 10px); mobile còn tệ hơn — border tại x 14, nằm trong vùng marker 0–12 cộng halo 4px (tới 16). Nay desktop `left: -10px`, mobile `left: -2px` → border nằm tại x 26–28 ở cả hai breakpoint, hở 4px so với pulse. Built CSS xác nhận: `.timeline-entry-current:after{…inset:-12px -14px 20px -10px}` và bản mobile `left:-2px`.
- Báo cáo của chủ sở hữu: trên mobile, chữ của node đầu **sát mép trái** của decoration (gutter 28 nên border accent ở 26–28 chạm đúng chỗ chữ bắt đầu). Cách sửa: node `current` giờ được trang trí **cùng họ với node TLDR** — panel `--bg-surface` + `1px solid --border` + radius `--radius-lg` + whisper shadow, cạnh trái vẫn là accent 2px — và entry có padding thật (desktop `16px 18px 20px`, mobile `14px 16px 18px`) nên chữ nằm *trong* panel (24px desktop / 18px mobile tính từ border). Divider riêng của node bị bỏ; border của panel đóng khung. Pulse mobile giảm spread 10 → 6px (`timeline-status-pulse-sm`) để vòng pulse dừng ở x 18, panel border ở 24–26. Built CSS: `.timeline-entry-current{…padding:16px 18px 20px;border-bottom:none}` + `:after{…inset:-10px -10px -10px -8px}` và hai override mobile `padding:14px 16px 18px`, `inset:-8px -8px -8px -4px`.
+19 -10
View File
@@ -46,7 +46,7 @@ Reading bands used: 45-75 characters (Bringhurst), 38-80 (Butterick). Before: 11
## 3. Decisions ## 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.) 1. **Font: admit `system-ui`.** `--sans` becomes `system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif`. No webfont is loaded; the Source Sans 3 woff2 files stay in `public/fonts/` because `scripts/generate-resume.ts` reads them from disk for the PDF. (User's call: keep the current look rather than restyle the whole site.)
2. **Five scale tokens** in `:root`: `--text-body: 18px`, `--text-lede: 20px`, `--text-meta: 15px`, `--leading-body: 1.65`, `--measure-prose: 600px`. They live in `:root` only — sizes do not differ between dark and light, so they are not duplicated in the light block or the media bridge. 2. **Scale tokens** in `:root`: `--text-body: 18px`, `--text-lede: 20px`, `--text-meta: 15px`, `--leading-body: 1.65`, `--measure-prose: 600px`, `--measure-page: 680px` (added in the second pass, §3.10). They live in `:root` only — sizes do not differ between dark and light, so they are not duplicated in the light block or the media bridge.
3. **Reuse `.prose`** (`App.css`, previously defined and never rendered by any component) as the prose system instead of inventing a second convention. 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`. 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. 5. **Heading sizes**: `h3` 24 → **21px**, and `h4` 18 / `h5` 16 / `h6` 15 made explicit (they previously fell back to 16px). `h1`/`h2` clamps and the global `h1-h6 { line-height: 1.2 }` are untouched.
@@ -54,12 +54,14 @@ Reading bands used: 45-75 characters (Bringhurst), 38-80 (Butterick). Before: 11
7. **Headings carry their own top margin** (`.subheading { margin-top: 32px }`, `.prose h3 { margin-top: 1.5em }`, `.philosophy-quote h3 { margin-top: 0 }`); lead paragraphs carry no bottom margin. Sibling margins collapse, so each gap is a single value rather than a sum. 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. 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). 9. **Delete dead CSS and the unused `Card` component** rather than leaving unstyled scaffolding behind (list in §4.2).
10. **Second pass (user feedback, 2026-10-16): two measures instead of one.** 600px read too small on `/philosophy`, and on `/about` the 600px lede sat above a wider grid — the ragged right edge looked like a defect rather than a measure. `--measure-page: 680px` now governs page columns (`.page-body`, `.prose-wide`, `.lede-wide`); `--measure-prose: 600px` stays for long-form narrative (`.prose` on `/projects/:id`). A wider column is paid for with a larger body, not a longer line: `.prose-wide p` uses `--text-lede` 20px / 1.6 → 79 characters per line (still inside the 45-80 band), where 680px at 18px would be 88.
11. **`/about` §1 and the homepage About section move to `container-wide`** with `.philosophy-grid` at `repeat(3, 1fr)` — the same column model as `.expertise-grid` (3 → 2 at ≤1024px → 1 at ≤768px) — so both halves of `/about` carry equal weight. The `.page-body` wrapper is gone from both (the bio, subheadings and grids are direct children of the section); the bio uses `.prose-lede lede-wide` and stays at 680px. `profile.philosophy` has 5 cards → rows of 3 + 2.
## 4. Implementation details ## 4. Implementation details
### 4.1 `src/index.css` ### 4.1 `src/index.css`
- `:root` token block: `--max-narrow` deleted; added the five scale tokens after `--max-content`. - `:root` token block: `--max-narrow` deleted; the scale tokens added after `--max-content` (five in the first pass, `--measure-page` in the second).
- `--sans` → system stack (finding P5). `--mono` unchanged (it already ends in `ui-monospace, monospace`, so it resolves without a download). - `--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 }`. - `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. - `p { font-size: var(--text-body); line-height: var(--leading-body); color: var(--text-secondary); }` — was implicit 16px / 1.7.
@@ -79,9 +81,11 @@ Prose system (rewritten in place of the dead `.prose` block):
.prose li { margin-bottom: 8px; color: var(--text-secondary); font-size: var(--text-body); line-height: var(--leading-body); } .prose li { margin-bottom: 8px; color: var(--text-secondary); font-size: var(--text-body); line-height: var(--leading-body); }
.prose blockquote { …unchanged… } .prose blockquote { …unchanged… }
.prose-lede { max-width: var(--measure-prose); font-size: var(--text-lede); line-height: 1.55; } .prose-lede { max-width: var(--measure-prose); font-size: var(--text-lede); line-height: 1.55; }
.page-body { max-width: 700px; } .prose-wide { max-width: var(--measure-page); } .prose-wide p { font-size: var(--text-lede); line-height: 1.6; }
.lede-wide { max-width: var(--measure-page); } .page-body { max-width: var(--measure-page); }
.subheading { margin: 32px 0 12px; } .subheading { margin: 32px 0 12px; }
.philosophy-quote + .philosophy-quote { margin-top: 48px; } .philosophy-quote + .philosophy-quote { margin-top: 48px; }
.philosophy-quote p { text-align: justify; }
.philosophy-quote h3 { margin-top: 0; } .philosophy-quote h3 { margin-top: 0; }
.project-section { background/border/radius/padding 16px; margin-bottom: 16px; inset highlight; } .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); } .project-section h4 { margin-top: 0; } .project-section p { font-size: var(--text-meta); line-height: var(--leading-body); }
@@ -114,8 +118,8 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
| File | Change | | 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/PhilosophyPage.tsx` | whole body: `aria-labelledby="philosophy-heading"` matched by `<SectionHeading id="philosophy-heading">`; quotes wrapped in `<div className="prose prose-wide">` → `<div className="philosophy-quote">` → plain `<h3>` + `<div dangerouslySetInnerHTML>` (no outer `<p>`, so the injected `<p>` blocks are no longer nested); inline styles and the stale "Placeholder for expanded content" comment removed |
| `src/pages/AboutPage.tsx`, `src/components/sections/About.tsx` | `maxWidth:'700px'` div → `.page-body`; bio → `.prose-lede`; both `<h3>` → `.subheading` | | `src/pages/AboutPage.tsx`, `src/components/sections/About.tsx` | `maxWidth:'700px'` div → `.page-body` (first pass) → wrapper removed entirely (second pass): bio, `.subheading` titles and both grids are direct children of the section; bio → `.prose-lede lede-wide`; `/about` §1 section `container-content` → `container-wide` |
| `src/pages/ProjectDetailPage.tsx` | back link → `.back-link`; summary → `.prose-lede`; narrative wrapped in `.prose`; four `marginBottom:'32px'` block wrappers unwound (rhythm now comes from `.prose h3`); four `<h3 style>` → plain `<h3>`; section cards → `.project-section` with plain `<h4>` / `<p>` | | `src/pages/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/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/pages/ContactPage.tsx`, `src/components/sections/Contact.tsx` | label divs → `.link-label`; sub-labels → `.contact-link-sub`; `maxWidth:'700px'` → `.page-body` |
@@ -127,8 +131,8 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
| File | Change | | File | Change |
|---|---| |---|---|
| `src/index.css` | token block (5 added, `--max-narrow` deleted), `--sans`, `h3`-`h6`, `p`, `.container-narrow` deleted | | `src/index.css` | token block (`--max-narrow` deleted, six scale tokens), `--sans`, `h3`-`h6`, `p`, `.container-narrow` deleted |
| `src/App.css` | prose system added/rewritten, 10 selectors retuned, `.download-resume-button` added, ~170 lines of dead CSS deleted | | `src/App.css` | prose system added/rewritten, 10 selectors retuned, `.download-resume-button` added, `.philosophy-grid` 2 → 3 columns + a new ≤1024px breakpoint, ~170 lines of dead CSS deleted |
| 8 page/section TSX files | inline type styles → classes (see §4.3) | | 8 page/section TSX files | inline type styles → classes (see §4.3) |
| `src/components/ui/Card.tsx` | deleted | | `src/components/ui/Card.tsx` | deleted |
| `src/components/index.ts` | `Card` export removed | | `src/components/index.ts` | `Card` export removed |
@@ -147,6 +151,11 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
- [x] Philosophy page: prose column, paragraph spacing, no nested `<p>`, ARIA id wired - [x] Philosophy page: prose column, paragraph spacing, no nested `<p>`, ARIA id wired
- [x] Inline type styles removed from the 8 TSX files — gate `style=\{\{[^}]*(fontSize|lineHeight|fontWeight|color|maxWidth)` over `src/` → 0 matches - [x] Inline type styles removed from the 8 TSX files — gate `style=\{\{[^}]*(fontSize|lineHeight|fontWeight|color|maxWidth)` over `src/` → 0 matches
- [x] `tsc -b` + `vite build` green after the TSX sweep - [x] `tsc -b` + `vite build` green after the TSX sweep
- [x] Second pass: `--measure-page: 680px`, `.prose-wide`, `.lede-wide`, `.page-body` switched to the token
- [x] `/philosophy` column 600 → 680px with body 20px/1.6 (79 chars/line, was 78 at 600px/18px)
- [x] `/about` §1 → `container-wide`; `.philosophy-grid` 3 columns matching `.expertise-grid`; `.page-body` wrapper removed from About + AboutPage; bio → `.prose-lede lede-wide`
- [x] Re-verified: `tsc -b` exit 0, `vite build` green; built CSS carries `.philosophy-grid{grid-template-columns:repeat(3,1fr)}`, the `@media (width<=1024px)` 2-column rule, and `.lede-wide,.page-body{max-width:var(--measure-page)}`
- [x] Third pass (user feedback): quote paragraphs justified — `.philosophy-quote p { text-align: justify }` — so the 680px column reads flush on both edges. Column width and measure are unchanged (680px @ 20px = 79 characters per line); only the line-breaking rule changed. `<html lang>` is kept in sync by `useLanguage`, so screen readers and hyphenation follow the active language.
- [ ] Manual browser pass (§7) on `/`, `/about`, `/experience`, `/projects`, `/projects/:id`, `/philosophy`, `/contact`, dark and light - [ ] Manual browser pass (§7) on `/`, `/about`, `/experience`, `/projects`, `/projects/:id`, `/philosophy`, `/contact`, dark and light
## 7. Verification plan ## 7. Verification plan
@@ -158,8 +167,8 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
oxlint against HEAD and against the working tree produce identical diagnostics (15 errors / 9 warnings): every one is pre-existing — oxlint treats the `useField` / `useFieldArray` helpers in `src/i18n/useField.ts` as hooks, plus `Navigation.tsx:26` `set-state-in-effect`. Out of scope here. oxlint against HEAD and against the working tree produce identical diagnostics (15 errors / 9 warnings): every one is pre-existing — oxlint treats the `useField` / `useFieldArray` helpers in `src/i18n/useField.ts` as hooks, plus `Navigation.tsx:26` `set-state-in-effect`. Out of scope here.
4. Manual, real browser (no headless, per project rule): 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. - `/philosophy`: three paragraphs visibly separated, 680px column, 20px body, justified right edge (watch for rivers/loose word spacing), quote title 21px, no wall of text.
- `/about`: bio 20px capped at 600px, section titles 21px, cards unchanged in width. - `/about`: §1 and §2 the same width (1152px); bio 20px at a 680px column; philosophy cards 3 columns (~368px) matching the expertise cards — 5 cards render 3 + 2.
- `/projects/:id`: narrative capped at 600px, section cards keep their box, h4 16px over 15px body. - `/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. - `/experience`: bullets and impact 15px/1.65, achievement title 18px/1.3.
- `/contact`: sub-labels 15px, tile labels 500 weight. - `/contact`: sub-labels 15px, tile labels 500 weight.
@@ -171,7 +180,7 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
|---|---| |---|---|
| Body copy 16 → 18px makes every page taller | Only role-defined body copy moved; chrome (tags, badges, pills, footer, timeline meta) kept at 12-14px. Review `/experience` and `/projects` heights. | | 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. | | Deleting `.form-*`, `.filter-*`, `.article-*`, `.engineering-tabs*`, `.breadcrumb*`, `.page-header`, `.card*` removes scaffolding that `spec-v2-blog.md` and `spec-v3-ui-enhancements.md` plan to use | Those specs keep the design intent; the CSS is re-written when the feature actually ships, together with its markup. Nothing in `src/` referenced them. |
| 600px prose column looks narrower than the 752px container | Intentional: 78-83 characters per line instead of 110-118. `.container-content` still sizes the page; `.prose` sizes the reading column inside it. | | A 680px page column inside a 752px / 1152px container leaves whitespace on the right | Intentional: the measure band is 45-80 characters per line, and 680px @ 20px is 79. Widening the text further would need 22px body copy, which flattens the 21px heading scale. Grids and cards use the full container; text does not. On `/philosophy` the visible ragged edge is resolved by justifying the paragraphs instead of widening the column — the cost is looser word spacing / possible rivers on short lines, checked in the manual pass. |
| No responsive type scale | Unchanged from before (there was none). 18px on a 320-375px viewport yields 40-50 characters per line, which is comfortable; revisit only if the manual pass says otherwise. | | 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. | | `.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. |
+1 -1
View File
@@ -97,7 +97,7 @@ function renderExperience(exps: typeof experiences): string {
<ul class="exp-responsibilities"> <ul class="exp-responsibilities">
${resolveField(exp.responsibilitiesEn, exp.responsibilities).map(r => `<li>${r}</li>`).join('')} ${resolveField(exp.responsibilitiesEn, exp.responsibilities).map(r => `<li>${r}</li>`).join('')}
</ul> </ul>
${exp.achievements?.map(ach => ` ${(exp.achievements ?? []).map(ach => `
<div class="achievement avoid-break"> <div class="achievement avoid-break">
<div class="achievement-title">${resolveField(ach.titleEn, ach.title)}</div> <div class="achievement-title">${resolveField(ach.titleEn, ach.title)}</div>
<div class="achievement-context">${resolveField(ach.contextEn, ach.context)}</div> <div class="achievement-context">${resolveField(ach.contextEn, ach.context)}</div>
+291 -69
View File
@@ -913,49 +913,226 @@
/* ===== Experience Timeline ===== */ /* ===== Experience Timeline ===== */
.timeline { .timeline {
position: relative; position: relative;
padding-left: 32px; padding-left: 36px;
} }
.timeline::before { /* Spine is drawn per node so it can stop exactly at the TLDR diamond instead of
trailing past the last card. left -31px = absolute x 5, so the 2px spine is centred
on x 6 — the same centre the markers use. bottom -32px bridges the entry's own margin
so consecutive segments join seamlessly. */
.timeline-entry::before {
content: ''; content: '';
position: absolute; position: absolute;
left: 4px; left: -31px;
top: 0; top: 0;
bottom: 0; bottom: -32px;
width: 2px; width: 2px;
border-radius: 1px;
background: var(--border); background: var(--border);
} }
.timeline-entry { .timeline-entry {
position: relative; position: relative;
margin-bottom: 48px; padding-bottom: 32px;
padding-bottom: 48px; margin-bottom: 32px;
border-bottom: 1px solid var(--border); border-bottom: 1px solid var(--border);
transition: border-color var(--transition-normal);
}
/* First node starts the spine at its marker centre (top 6 + half of 12). */
.timeline-entry:first-child::before {
top: 12px;
}
/* Guard for a timeline without a terminal node: stop at the entry's own bottom. */
.timeline-entry:last-child::before {
bottom: 0;
} }
.timeline-entry:last-child { .timeline-entry:last-child {
margin-bottom: 0;
padding-bottom: 0; padding-bottom: 0;
margin-bottom: 0;
border-bottom: none; border-bottom: none;
} }
/* The 36px gutter puts the 12px marker's centre (x=6) exactly on the spine centre (left 5 + half of 2px). */
.timeline-marker { .timeline-marker {
position: absolute; position: absolute;
left: -32px; left: -36px;
top: 4px; top: 6px;
width: 12px; width: 12px;
height: 12px; height: 12px;
border-radius: 50%; border-radius: 50%;
border: 2px solid var(--accent); border: 2px solid var(--border-strong);
background: var(--bg-primary); background: var(--bg-primary);
transition: border-color var(--transition-normal), background var(--transition-normal);
} }
.timeline-entry:last-child .timeline-marker { /* Data is newest-first, so the first entry is the current role: filled marker with a soft halo. */
.timeline-entry:first-child .timeline-marker {
background: var(--accent); background: var(--accent);
width: 14px; border-color: var(--accent);
height: 14px; box-shadow: 0 0 0 4px var(--accent-soft);
left: -33px; }
top: 3px;
.timeline-entry:hover .timeline-marker {
border-color: var(--accent);
}
.timeline-entry:hover {
border-bottom-color: var(--border-strong);
}
/* The newest node is a status, not a past role. It borrows the TLDR panel's quiet family —
flat surface, hairline border, radius, whisper shadow — and keeps two things the TLDR node
does not: an accent left edge and a pulsing marker. The entry gets real padding so the text
sits inside the panel instead of hugging its edge (the old bed had no padding, which on a
28px mobile gutter put the accent bar right against the first glyph). */
.timeline-entry-current {
isolation: isolate;
padding: 16px 18px 20px;
border-bottom: none;
}
.timeline-entry-current .timeline-marker {
background: var(--accent);
border-color: var(--accent);
animation: timeline-status-pulse 2.4s ease-out infinite;
}
/* Panel geometry. The 12px marker occupies absolute x 0–12 and the pulse peak (10px spread)
reaches x 22, so the panel's 2px left border starts at x 28 (left −8 against the 36px
gutter): 6px clear of the ring, and the text starts at 36 + 18 = 54, i.e. 24px inside it.
The entry's own divider is gone; the panel's border closes the box. */
.timeline-entry-current::after {
content: '';
position: absolute;
z-index: -1;
inset: -10px -10px -10px -8px;
background: var(--bg-surface);
border: 1px solid var(--border);
border-left: 2px solid var(--accent);
border-radius: var(--radius-lg);
box-shadow: inset 0 1px 0 var(--inset-highlight), 0 8px 20px -18px var(--shadow);
}
@keyframes timeline-status-pulse {
0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
50% { box-shadow: 0 0 0 10px transparent; }
}
/* Mobile variant of the same pulse: 6px spread, so the ring stops at x 18 and the panel border
can keep 6px of air inside a 28px gutter. */
@keyframes timeline-status-pulse-sm {
0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
50% { box-shadow: 0 0 0 6px transparent; }
}
/* A break between jobs has to read as a break. Three signals, all quieter than the accent
work nodes: the spine turns dashed through this node, the marker shrinks to a muted ring,
the title goes italic-muted, and the divider is dropped so the dashed line bridges
straight into the next role. */
.timeline-entry-gap::before {
background: repeating-linear-gradient(
to bottom,
var(--border-strong) 0px,
var(--border-strong) 4px,
transparent 4px,
transparent 9px
);
}
.timeline-entry-gap {
border-bottom: none;
}
/* 10px ring: smaller than the 12px role markers. L = 6 − 36 − 10/2 = −35 keeps the centre on
the spine (x 6). */
.timeline-entry-gap .timeline-marker {
width: 10px;
height: 10px;
left: -35px;
border-color: var(--border-strong);
}
.timeline-entry-gap .timeline-title {
color: var(--text-muted);
font-style: italic;
}
.timeline-entry-gap .timeline-company {
color: var(--text-muted);
}
/* Terminal node: the whole timeline collapsed into one line. Deliberately quiet — a flat
surface, a hairline border, a whisper of shadow. The only loud element is the diamond on
the spine. */
.timeline-tldr {
position: relative;
padding: 20px 24px;
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: inset 0 1px 0 var(--inset-highlight), 0 8px 20px -18px var(--shadow);
}
/* Stub from the previous node down to the diamond centre (top 16 + 6). Painted as ::before
so the diamond covers its end. */
.timeline-tldr::before {
content: '';
position: absolute;
left: -31px;
top: 0;
width: 2px;
height: 22px;
border-radius: 1px;
background: var(--border);
}
/* Hollow diamond: the same ring language as the entry markers, but in accent so it still
reads as the end of the line. bg-primary fill masks the spine stub behind it; width and
height are border-box, so the centre stays on the spine (x 6). */
.timeline-tldr-marker {
position: absolute;
left: -36px;
top: 16px;
width: 12px;
height: 12px;
border: 2px solid var(--accent);
border-radius: 2px;
background: var(--bg-primary);
transform: rotate(45deg);
box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Hairline link from the diamond into the panel, painted over the diamond so the join is
unbroken. */
.timeline-tldr::after {
content: '';
position: absolute;
left: -24px;
top: 21px;
width: 24px;
height: 1px;
background: var(--accent);
}
/* Same voice as .section-tag: mono, uppercase, letterspaced — no box around it. */
.timeline-tldr-chip {
display: block;
margin-bottom: 10px;
font-family: var(--mono);
font-size: 12px;
letter-spacing: 2px;
text-transform: uppercase;
color: var(--accent);
}
/* No color declaration: inherits the global p treatment (--text-secondary), the same
treatment every other lede on the site gets. */
.timeline-tldr-text {
font-size: var(--text-lede);
line-height: 1.55;
} }
.timeline-header { .timeline-header {
@@ -970,76 +1147,56 @@
} }
.timeline-company { .timeline-company {
margin-top: 2px;
font-size: 16px; font-size: 16px;
line-height: 1.4; line-height: 1.4;
color: var(--text-secondary); color: var(--text-secondary);
} }
.timeline-duration { .timeline-meta {
display: flex;
flex-wrap: wrap;
gap: 4px 10px;
margin-top: 6px;
}
.timeline-duration,
.timeline-location {
font-size: 14px; font-size: 14px;
color: var(--text-muted); color: var(--text-muted);
} }
.timeline-location::before {
content: '·';
margin-right: 10px;
color: var(--border-strong);
}
.timeline-responsibilities { .timeline-responsibilities {
list-style: none; list-style: none;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 8px; gap: 10px;
margin-bottom: 24px;
} }
.timeline-responsibilities li { .timeline-responsibilities li {
position: relative;
padding-left: 18px;
font-size: var(--text-meta); font-size: var(--text-meta);
line-height: var(--leading-body); line-height: var(--leading-body);
padding-left: 16px;
position: relative;
} }
/* Dot sits on the x-height centre of the first line (line-height 1.65 → 0.66em). */
.timeline-responsibilities li::before { .timeline-responsibilities li::before {
content: '•'; content: '';
position: absolute; position: absolute;
left: 0; left: 0;
color: var(--accent); top: 0.66em;
} width: 5px;
height: 5px;
.achievement { border-radius: 50%;
background: var(--bg-surface); border: 1px solid var(--accent);
border-left: 4px solid var(--accent); background: var(--accent-soft);
border-radius: 0 var(--radius-md) var(--radius-md) 0;
padding: 20px 24px;
margin-bottom: 16px;
}
.achievement-title {
font-size: 18px;
line-height: 1.3;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 8px;
}
.achievement-context {
font-size: var(--text-meta);
line-height: var(--leading-body);
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 {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 12px;
} }
.achievement-metric { .achievement-metric {
@@ -1055,15 +1212,54 @@
@media (max-width: 768px) { @media (max-width: 768px) {
.timeline { .timeline {
padding-left: 0; padding-left: 28px;
} }
.timeline::before { .timeline-entry {
display: none; padding-bottom: 24px;
margin-bottom: 24px;
} }
.timeline-marker { .timeline-entry::before {
display: none; left: -23px;
bottom: -24px;
}
.timeline-tldr::before {
left: -23px;
}
.timeline-tldr::after {
left: -16px;
width: 16px;
}
.timeline-marker,
.timeline-tldr-marker {
left: -28px;
}
/* 10px ring at the 28px gutter: L = 6 − 28 − 10/2 = −27. */
.timeline-entry-gap .timeline-marker {
left: -27px;
}
/* Panel keeps a comparable absolute edge: 28 − 4 = 24, i.e. 6px clear of the capped mobile
ring (x 18) and 18px before the text (28 + 16 padding). */
.timeline-entry-current {
padding: 14px 16px 18px;
}
.timeline-entry-current::after {
inset: -8px -8px -8px -4px;
}
.timeline-entry-current .timeline-marker {
animation-name: timeline-status-pulse-sm;
}
.timeline-tldr {
padding: 18px 20px;
} }
} }
@@ -1144,7 +1340,7 @@
/* ===== Philosophy ===== */ /* ===== Philosophy ===== */
.philosophy-grid { .philosophy-grid {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(3, 1fr);
gap: 24px; gap: 24px;
margin-top: 32px; margin-top: 32px;
} }
@@ -1187,6 +1383,12 @@
margin-top: 24px; margin-top: 24px;
} }
@media (max-width: 1024px) {
.philosophy-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 768px) { @media (max-width: 768px) {
.philosophy-grid { .philosophy-grid {
grid-template-columns: 1fr; grid-template-columns: 1fr;
@@ -1347,6 +1549,17 @@
font-style: italic; font-style: italic;
} }
/* Wide reading column: same width as the page column. Body steps up to
--text-lede so a wider column keeps the 45-80 characters-per-line band. */
.prose-wide {
max-width: var(--measure-page);
}
.prose-wide p {
font-size: var(--text-lede);
line-height: 1.6;
}
/* Lead paragraph that stands outside a .prose column */ /* Lead paragraph that stands outside a .prose column */
.prose-lede { .prose-lede {
max-width: var(--measure-prose); max-width: var(--measure-prose);
@@ -1354,9 +1567,14 @@
line-height: 1.55; line-height: 1.55;
} }
/* A lede that sits next to a wide grid follows the page measure, not the prose measure */
.lede-wide {
max-width: var(--measure-page);
}
/* Column for blocks that are not prose (grids, tag lists, timelines) */ /* Column for blocks that are not prose (grids, tag lists, timelines) */
.page-body { .page-body {
max-width: 700px; max-width: var(--measure-page);
} }
.subheading { .subheading {
@@ -1364,6 +1582,10 @@
margin-bottom: 12px; margin-bottom: 12px;
} }
.philosophy-quote p {
text-align: justify;
}
.philosophy-quote + .philosophy-quote { .philosophy-quote + .philosophy-quote {
margin-top: 48px; margin-top: 48px;
} }
+27 -29
View File
@@ -11,38 +11,36 @@ export function About() {
<InView> <InView>
<section className="section container-wide" aria-labelledby="about-heading"> <section className="section container-wide" aria-labelledby="about-heading">
<SectionHeading title={strings.about.heading[lang]} tag={strings.about.heading[lang]} /> <SectionHeading title={strings.about.heading[lang]} tag={strings.about.heading[lang]} />
<div className="page-body"> <p className="prose-lede lede-wide">
<p className="prose-lede"> {useField(profile.bio, profile.bioEn)}
{useField(profile.bio, profile.bioEn)} </p>
</p>
<h3 className="subheading"> <h3 className="subheading">
{strings.about.engineeringTitle[lang]} {strings.about.engineeringTitle[lang]}
</h3> </h3>
<div className="philosophy-grid"> <div className="philosophy-grid">
{profile.philosophy.map((point) => ( {profile.philosophy.map((point) => (
<div key={point.title} className="philosophy-card"> <div key={point.title} className="philosophy-card">
<h3>{point.title}</h3> <h3>{point.title}</h3>
<p>{point.description}</p> <p>{point.description}</p>
<div className="philosophy-keywords"> <div className="philosophy-keywords">
{point.keywords.map((kw) => ( {point.keywords.map((kw) => (
<Tag key={kw}>{kw}</Tag> <Tag key={kw}>{kw}</Tag>
))} ))}
</div>
</div> </div>
))} </div>
</div> ))}
</div>
<h3 className="subheading"> <h3 className="subheading">
{strings.about.exploringTitle[lang]} {strings.about.exploringTitle[lang]}
</h3> </h3>
<div className="interests-list"> <div className="interests-list">
{profile.currentInterests.map((interest) => ( {profile.currentInterests.map((interest) => (
<Tag key={interest} accent> <Tag key={interest} accent>
{interest} {interest}
</Tag> </Tag>
))} ))}
</div>
</div> </div>
</section> </section>
</InView> </InView>
+20 -50
View File
@@ -18,10 +18,7 @@ export function Experience() {
viewport={{ once: true, amount: 0.1 }} viewport={{ once: true, amount: 0.1 }}
variants={{ variants={{
hidden: { opacity: 0 }, hidden: { opacity: 0 },
visible: { visible: { opacity: 1, transition: { duration: 0.5 } },
opacity: 1,
transition: { staggerChildren: 0.15 },
},
}} }}
> >
<SectionHeading title={strings.experience.heading[lang]} tag={strings.experience.heading[lang]} /> <SectionHeading title={strings.experience.heading[lang]} tag={strings.experience.heading[lang]} />
@@ -30,64 +27,37 @@ export function Experience() {
{experiences.map((exp, i) => ( {experiences.map((exp, i) => (
<motion.div <motion.div
key={exp.id} key={exp.id}
className="timeline-entry" className={exp.variant ? `timeline-entry timeline-entry-${exp.variant}` : 'timeline-entry'}
variants={{ initial={{ opacity: 0, y: 24 }}
hidden: { opacity: 0, y: 30 }, whileInView={{ opacity: 1, y: 0 }}
visible: { viewport={{ once: true, amount: 0.2 }}
opacity: 1, transition={{ duration: 0.45, ease: "easeOut", delay: i * 0.08 }}
y: 0,
transition: { duration: 0.5, delay: i * 0.15 },
},
}}
whileHover={{ scale: 1.02, y: -4 }}
whileTap={{ scale: 0.98 }}
> >
<div className="timeline-marker" /> <div className="timeline-marker" />
<div className="timeline-header"> <div className="timeline-header">
<div className="timeline-title">{useField(exp.title, exp.titleEn)}</div> <div className="timeline-title">
{useField(exp.title, exp.titleEn)}
</div>
<div className="timeline-company">{exp.company}</div> <div className="timeline-company">{exp.company}</div>
<div className="timeline-duration">{exp.duration}</div> <div className="timeline-meta">
{exp.location && ( <span className="timeline-duration">{exp.duration}</span>
<div className="timeline-duration">{exp.location}</div> {exp.location && (
)} <span className="timeline-location">{exp.location}</span>
)}
</div>
</div> </div>
<ul className="timeline-responsibilities"> <ul className="timeline-responsibilities">
{useFieldArray(exp.responsibilities, exp.responsibilitiesEn).map((r) => ( {useFieldArray(exp.responsibilities, exp.responsibilitiesEn).map((r) => (
<li key={r}>{r}</li> <li key={r}>{r}</li>
))} ))}
</ul> </ul>
{exp.achievements?.map((achievement) => (
<div key={achievement.id} className="achievement">
<div className="achievement-title">
{achievement.title}
</div>
<div className="achievement-context">
{useField(achievement.context, achievement.contextEn)}
</div>
<div className="achievement-impact">
{useField(achievement.impact, achievement.impactEn)}
</div>
{achievement.metrics &&
achievement.metrics.length > 0 && (
<div className="achievement-metrics">
{achievement.metrics.map((m) => (
<span key={m} className="achievement-metric">
{m}
</span>
))}
</div>
)}
<div className="achievement-techs">
{achievement.technologies.map((tech) => (
<span key={tech} className="tag">
{tech}
</span>
))}
</div>
</div>
))}
</motion.div> </motion.div>
))} ))}
<div className="timeline-tldr">
<span className="timeline-tldr-marker" aria-hidden="true" />
<span className="timeline-tldr-chip">{strings.experience.tldr[lang]}</span>
<p className="timeline-tldr-text">{strings.experience.tldrText[lang]}</p>
</div>
</div> </div>
</div> </div>
</motion.section> </motion.section>
+60 -67
View File
@@ -2,11 +2,41 @@ import type { ExperienceEntry } from "@/types";
export const experiences: ExperienceEntry[] = [ export const experiences: ExperienceEntry[] = [
{ {
id: "senior-swe", id: "open-to-work",
variant: "current",
title: "Đang tìm nơi làm việc mới",
titleEn: "Seeking a New Place",
company: "Open to new opportunities",
duration: "Nov 2026 – Present",
responsibilities: [
"Sẵn sàng cho vai trò Senior Engineering: system architecture, integration platform, full-stack delivery",
],
responsibilitiesEn: [
"Open to Senior Engineering roles: system architecture, integration platforms, full-stack delivery",
"Available from Nov 2026",
],
},
{
id: "relax-gap",
variant: "gap",
title: "Nghỉ ngơi",
titleEn: "Relax",
company: "Career break",
duration: "Aug 2026 – Oct 2026",
responsibilities: [
"Nghỉ có chủ đích giữa hai vai trò — lấy lại nhịp trước khi nhận hệ thống tiếp theo",
"Tự thử nghiệm theo nhịp riêng: local LLM với llama.cpp, đọc về Computer Vision",
],
responsibilitiesEn: [
"Intentional break between roles — recovering the rhythm before the next system",
],
},
{
id: "lazada-senior-swe",
title: "Senior Software Engineer", title: "Senior Software Engineer",
titleEn: "Senior Software Engineer", titleEn: "Senior Software Engineer",
company: "Current Company", company: "Lazada Tech Hub Vietnam",
duration: "2021 – Present", duration: "Jan 2020 – Aug 2026",
location: "Ho Chi Minh City, Vietnam", location: "Ho Chi Minh City, Vietnam",
responsibilities: [ responsibilities: [
"System ownership và architecture design cho logistics integration systems", "System ownership và architecture design cho logistics integration systems",
@@ -22,70 +52,33 @@ export const experiences: ExperienceEntry[] = [
"Applied Computer Vision and ML to solve real-world operational problems", "Applied Computer Vision and ML to solve real-world operational problems",
"Scrum Master responsibilities — team achieved Scrum Level L3", "Scrum Master responsibilities — team achieved Scrum Level L3",
], ],
achievements: [ },
{ {
id: "iot-dws", id: "nexts-founder",
title: "IoT-DWS Integration System", title: "Người sáng lập",
titleEn: "IoT-DWS Integration System", titleEn: "CTO & Founder",
context: company: "Nexts Limited Company",
"Tiếp nhận và nhanh chóng làm chủ hệ thống IoT-DWS sau khi thành viên phụ trách trước đó rời project.", duration: "06/2019 – 12/2019",
contextEn: location: "Ho Chi Minh City, Vietnam",
"Took over and rapidly mastered the IoT-DWS system after the previous responsible team member left the project.", responsibilities: [
technicalWork: [ "Phát triển giải pháp cho xe tự hành, thu thập dữ liệu thời gian thực từ cảm biến và hệ thống onboard: LiDAR, camera, GPS, CAN bus.",
"HTTP integration with Signature Header", ],
"HMAC-based request/response security", responsibilitiesEn: [
"RocketMQ integration", "Developed a solution for autonomous vehicles to collect real-time data from onboard sensors and systems, including LiDAR, cameras, GPS, and CAN bus.",
"HTTP engine development",
"Integration with DWS machines",
],
impact: "Giải pháp DWS integration được triển khai cho 16 sortations",
impactEn: "DWS integration solution deployed across 16 sortations",
metrics: ["16 sortations deployed"],
technologies: ["Java", "HTTP", "HMAC", "RocketMQ", "DWS"],
featured: true,
},
{
id: "awb-detection",
title: "AWB Detection / Computer Vision",
titleEn: "AWB Detection / Computer Vision",
context:
"Tự động phát hiện shipping label / AWB từ hình ảnh được camera trên sortation machine chụp.",
contextEn:
"Automatically detect shipping labels / AWB from images captured by cameras on sortation machines.",
technicalWork: [
"OpenCV image preprocessing",
"YOLO-based object detection",
"Oriented Bounding Box (OBB)",
"ONNX model inference",
"OCR pipeline",
],
impact:
"Model được fine-tune cho bài toán AWB detection, xử lý white label trên white package",
impactEn:
"Model fine-tuned for AWB detection, handling white label on white package",
metrics: ["70,000 images/month processed"],
technologies: ["Python", "OpenCV", "YOLO", "ONNX", "OCR"],
featured: true,
},
{
id: "system-maintenance",
title: "System Maintenance & Optimization",
titleEn: "System Maintenance & Optimization",
context:
"Duy trì và hiện đại hóa hệ thống production theo yêu cầu của security/infrastructure team.",
contextEn:
"Maintained and modernized production systems per security/infrastructure team requirements.",
technicalWork: [
"Migration to newer middleware versions",
"OSS cleanup and duplicate image removal",
"System maintenance automation",
],
impact: "Giảm OSS storage khoảng 7 GB/month",
impactEn: "Reduced OSS storage by approximately 7 GB/month",
metrics: ["7 GB/month reduction", "70,000 images/month"],
technologies: ["Docker", "Linux", "OSS", "CI/CD"],
featured: true,
},
], ],
}, },
{
id: "sap-senior-swe",
title: "Senior Software Engineer",
titleEn: "Senior Software Engineer",
company: "SAP Lab Vietnam",
duration: "2017 – 12/2019",
location: "Ho Chi Minh City, Vietnam",
responsibilities: [
"Team leader quản lý sản phẩm B1 Integration",
],
responsibilitiesEn: [
"Team leader managing the B1 Integration product",
],
}
]; ];
+5
View File
@@ -39,6 +39,11 @@ export const strings = {
}, },
experience: { experience: {
heading: {en: 'Experience', vi: 'Kinh nghiệm'}, heading: {en: 'Experience', vi: 'Kinh nghiệm'},
tldr: {en: 'TL;DR', vi: 'TL;DR'},
tldrText: {
en: '15 years of experience, more than 5 companies along the way. Too long to tell.',
vi: '15 năm kinh nghiệm, hơn 5 công ty đã đi qua. Quá dài để kể hết.'
},
}, },
projects: { projects: {
featured: {en: 'Featured Projects', vi: 'Dự án nổi bật'}, featured: {en: 'Featured Projects', vi: 'Dự án nổi bật'},
+1
View File
@@ -36,6 +36,7 @@
--text-meta: 15px; --text-meta: 15px;
--leading-body: 1.65; --leading-body: 1.65;
--measure-prose: 600px; --measure-prose: 600px;
--measure-page: 680px;
--radius-sm: 4px; --radius-sm: 4px;
--radius-md: 6px; --radius-md: 6px;
+28 -30
View File
@@ -12,44 +12,42 @@ export function AboutPage() {
return ( return (
<> <>
<AnimatedSection> <AnimatedSection>
<section className="section container-content" aria-labelledby="about-heading"> <section className="section container-wide" aria-labelledby="about-heading">
<SectionHeading <SectionHeading
title={strings.about.heading[lang]} title={strings.about.heading[lang]}
subtitle={strings.about.subtitle[lang]} subtitle={strings.about.subtitle[lang]}
tag={strings.about.heading[lang]} tag={strings.about.heading[lang]}
/> />
<div className="page-body"> <p className="prose-lede lede-wide">
<p className="prose-lede"> {useField(profile.bio, profile.bioEn)}
{useField(profile.bio, profile.bioEn)} </p>
</p>
<h3 className="subheading"> <h3 className="subheading">
{strings.about.engineeringTitle[lang]} {strings.about.engineeringTitle[lang]}
</h3> </h3>
<div className="philosophy-grid"> <div className="philosophy-grid">
{profile.philosophy.map((point) => ( {profile.philosophy.map((point) => (
<div key={point.title} className="philosophy-card"> <div key={point.title} className="philosophy-card">
<h3>{point.title}</h3> <h3>{point.title}</h3>
<p>{point.description}</p> <p>{point.description}</p>
<div className="philosophy-keywords"> <div className="philosophy-keywords">
{point.keywords.map((kw) => ( {point.keywords.map((kw) => (
<Tag key={kw}>{kw}</Tag> <Tag key={kw}>{kw}</Tag>
))} ))}
</div>
</div> </div>
))} </div>
</div> ))}
</div>
<h3 className="subheading"> <h3 className="subheading">
{strings.about.exploringTitlePage[lang]} {strings.about.exploringTitlePage[lang]}
</h3> </h3>
<div className="interests-list"> <div className="interests-list">
{profile.currentInterests.map((interest) => ( {profile.currentInterests.map((interest) => (
<Tag key={interest} accent> <Tag key={interest} accent>
{interest} {interest}
</Tag> </Tag>
))} ))}
</div>
</div> </div>
</section> </section>
</AnimatedSection> </AnimatedSection>
+20 -32
View File
@@ -1,3 +1,4 @@
import { motion } from 'motion/react'
import { SectionHeading } from '@/components/ui/SectionHeading' import { SectionHeading } from '@/components/ui/SectionHeading'
import { experiences } from '@/data/experience' import { experiences } from '@/data/experience'
import { useLanguage } from '@/hooks/useLanguage' import { useLanguage } from '@/hooks/useLanguage'
@@ -10,49 +11,36 @@ export function ExperiencePage() {
<section className="section container-content" aria-labelledby="experience-heading"> <section className="section container-content" aria-labelledby="experience-heading">
<SectionHeading title={strings.experience.heading[lang]} tag={strings.common.experienceTag[lang]} /> <SectionHeading title={strings.experience.heading[lang]} tag={strings.common.experienceTag[lang]} />
<div className="timeline"> <div className="timeline">
{experiences.map((exp) => ( {experiences.map((exp, i) => (
<div key={exp.id} className="timeline-entry"> <motion.div
key={exp.id}
className={exp.variant ? `timeline-entry timeline-entry-${exp.variant}` : 'timeline-entry'}
initial={{ opacity: 0, y: 24 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, amount: 0.2 }}
transition={{ duration: 0.45, ease: 'easeOut', delay: i * 0.08 }}
>
<div className="timeline-marker" /> <div className="timeline-marker" />
<div className="timeline-header"> <div className="timeline-header">
<div className="timeline-title">{useField(exp.title, exp.titleEn)}</div> <div className="timeline-title">{useField(exp.title, exp.titleEn)}</div>
<div className="timeline-company">{exp.company}</div> <div className="timeline-company">{exp.company}</div>
<div className="timeline-duration">{exp.duration}</div> <div className="timeline-meta">
{exp.location && ( <span className="timeline-duration">{exp.duration}</span>
<div className="timeline-duration">{exp.location}</div> {exp.location && <span className="timeline-location">{exp.location}</span>}
)} </div>
</div> </div>
<ul className="timeline-responsibilities"> <ul className="timeline-responsibilities">
{useFieldArray(exp.responsibilities, exp.responsibilitiesEn).map((r) => ( {useFieldArray(exp.responsibilities, exp.responsibilitiesEn).map((r) => (
<li key={r}>{r}</li> <li key={r}>{r}</li>
))} ))}
</ul> </ul>
{exp.achievements?.map((achievement) => ( </motion.div>
<div key={achievement.id} className="achievement">
<div className="achievement-title">{achievement.title}</div>
<div className="achievement-context">{useField(achievement.context, achievement.contextEn)}</div>
<div className="achievement-impact">
{useField(achievement.impact, achievement.impactEn)}
</div>
{achievement.metrics && achievement.metrics.length > 0 && (
<div className="achievement-metrics">
{achievement.metrics.map((m) => (
<span key={m} className="achievement-metric">
{m}
</span>
))}
</div>
)}
<div className="achievement-techs">
{achievement.technologies.map((tech) => (
<span key={tech} className="tag">
{tech}
</span>
))}
</div>
</div>
))}
</div>
))} ))}
<div className="timeline-tldr">
<span className="timeline-tldr-marker" aria-hidden="true" />
<span className="timeline-tldr-chip">{strings.experience.tldr[lang]}</span>
<p className="timeline-tldr-text">{strings.experience.tldrText[lang]}</p>
</div>
</div> </div>
</section> </section>
) )
+1 -1
View File
@@ -8,7 +8,7 @@ export function PhilosophyPage() {
return ( return (
<section className="section container-content" aria-labelledby="philosophy-heading"> <section className="section container-content" aria-labelledby="philosophy-heading">
<SectionHeading id="philosophy-heading" title={strings.philosophy.heading[lang]} tag={strings.philosophy.heading[lang]}/> <SectionHeading id="philosophy-heading" title={strings.philosophy.heading[lang]} tag={strings.philosophy.heading[lang]}/>
<div className="prose"> <div className="prose prose-wide">
{strings.philosophy.quotes.map((quote) => ( {strings.philosophy.quotes.map((quote) => (
<div key={quote.title[lang]} className="philosophy-quote"> <div key={quote.title[lang]} className="philosophy-quote">
<h3> <h3>
+1
View File
@@ -47,6 +47,7 @@ export interface ExperienceEntry {
responsibilities: string[]; responsibilities: string[];
responsibilitiesEn?: string[]; responsibilitiesEn?: string[];
achievements?: FeaturedAchievement[]; achievements?: FeaturedAchievement[];
variant?: 'current' | 'gap';
} }
export interface FeaturedAchievement { export interface FeaturedAchievement {