The resume PDF lacks a professional summary section. Currently it goes directly from header to experience, which is less informative for recruiters who scan the top of a resume first.
The `{{BIO}}` placeholder is resolved in `scripts/generate-resume.ts` (line 145) but never rendered in the HTML template — dead code.
### 2. Inter Font Poor Vietnamese Support
Current font **Inter** does not render Vietnamese diacritics well in PDF output. Characters like `ơ`, `ư`, `đ`, `ê`, `ô` may appear broken or misaligned.
**Decision:** Replace Inter with **Source Sans 3** (Adobe open-source) — excellent Vietnamese support, professional style, similar to Inter's clean aesthetic.
### 3. No HTML Preview Mode for Debugging
When debugging PDF layout, the only option is to generate the full PDF and open it. This requires:
- Running Playwright (slow)
- Waiting for Chromium to launch
- Generating PDF (2-3s)
- Opening PDF viewer
Layout iteration takes 5-10 seconds per cycle. Adding a preview mode that opens HTML directly in the browser would reduce iteration to <1 second.
---
## Goal
1. Add "About me" section with bio content after header, before Experience
2. Add `--preview` flag to open rendered HTML in browser (no PDF generation)
3. Add `build:resume-preview` npm script for convenience
4. Replace Inter font with Source Sans 3 for better Vietnamese support
---
## Current Implementation
### Script: `scripts/generate-resume.ts`
Bio resolved but not rendered:
```typescript
// Line 145 — resolves bio but template has no {{BIO}} placeholder
**Note:** Download fonts from [Adobe Fonts / Google Fonts](https://fonts.google.com/specimen/Source+Sans+3). Extract `.woff2` files from the TTF/OTF originals using a converter if needed.
### Section Reordering: Projects → Skills
**Current order:** Header → About me → Experience → Skills → Projects
**New order:** Header → About me → Experience → Projects → Skills
**Rationale:** Skills are more generic/less impactful than Projects. Placing Projects before Skills gives recruiters a clearer view of concrete work experience before technical skills.
**Change:** Swap the Projects and Skills `<div class="section">` blocks in `public/resume-template.html` (around lines 280-292).
### Step 1: Add CSS for About me Section
**File:**`public/resume-template.html:56-60`
Add after `.header-info .contact` style block:
```css
/* About me */
.about-summary{
font-size:9.5pt;
color:#4a4a4a;
line-height:1.6;
margin-bottom:12px;
page-break-inside:avoid;
}
```
### Step 2: Add About me Section to Template
**File:**`public/resume-template.html:272-273`
Insert between header `</div>` and Experience `<div class="section">`:
**Note:** The section uses `.section` class which has `page-break-before: always` for subsequent sections. Since About me comes right after header (first section), it will NOT trigger a page break — it flows naturally after the header on the same page.
### Step 3: Reorder Sections (Projects → Skills)
**File:**`public/resume-template.html:280-292`
Swap the Projects and Skills `<div class="section">` blocks:
```html
<!-- Experience -->
<divclass="section">...</div>
<!-- Projects -->
<divclass="section">...</div>
<!-- Skills -->
<divclass="section">...</div>
```
### Step 4: Add --preview Flag to Script
**File:**`scripts/generate-resume.ts`
Add preview mode detection after language parsing (around line 15):
| 1 | "About me" section appears after header, before Experience | ✅ |
| 2 | Bio content uses `resolveField` for bilingual support | ✅ |
| 3 | About me section title is bilingual (EN: "About me", VI: "Về tôi") | ✅ |
| 4 | About me section has page-break-inside: avoid | ✅ |
| 5 | About me flows on same page as header (no forced page break) | ✅ |
| 7 | `{{TAGLINE}}` dead code removed | ✅ |
| 8 | `build:resume-all` still generates both EN and VI PDFs | ✅ |
| 9 | `{{BIO}}` placeholder now rendered in template (no longer dead code) | ✅ |
| 10 | Source Sans 3 replaces Inter — Vietnamese diacritics render correctly | ✅ |
---
## Tradeoffs
| Aspect | Detail |
|--------|--------|
| About me page break | Uses `.section` class (page-break-before on subsequent sections) — About me is second section, header is first, so no page break triggered |
| Preview mode lifecycle | `await new Promise(() => {})` — process stays alive until Ctrl+C or browser window closed |
| Bio length | ~2 lines in English, ~2-3 lines in Vietnamese — fits comfortably on page 1 after header |
| CSS specificity | `.about-summary` is standalone class, no conflict with existing styles |
| Font change | Source Sans 3 ~900KB (4 weights) vs Inter ~800KB — slight size increase (~100KB) |
---
## Files Changed
| File | Action | Lines |
| `public/fonts/` | Replace | 4 files: Inter → Source Sans 3 (Regular, Medium, Semibold, Bold) |
| 1 | `@font-face` font-family was `'Inter'` but body uses `'Source Sans 3'` — PDF would fallback to system font | Changed `scripts/generate-resume.ts:55` to `font-family: 'Source Sans 3'` |
| 2 | `${exp.achievements?.map(...).join('')}` printed the literal text `undefined` in every PDF as soon as an entry had no `achievements` — optional chaining short-circuits the whole chain and the template literal stringifies the `undefined` result (found 2026-10-16, after `achievements` was dropped from `src/data/experience.ts`) | `scripts/generate-resume.ts:100` — now `(exp.achievements ?? []).map(...).join('')` |