diff --git a/src/worker.ts b/src/worker.ts
index b013d42..be7c703 100644
--- a/src/worker.ts
+++ b/src/worker.ts
@@ -157,20 +157,30 @@ function webPage(resumeHtml: string): string {
`;
- const dlButton = `↓ Download PDF`;
+ const topBar =
+ `
`;
- let out = resumeHtml;
- // Inject metadata + styles right after (resume.html has a bare ).
+ // Order matters: do the injection on the RAW resume first, so the
+ // regex can only match the real body tag — not a literal "" that
+ // appears inside a CSS comment in the head we inject below.
+ let out = resumeHtml.replace(//i, `${topBar}`);
+ // Then inject metadata + styles right after (resume.html has a bare ).
out = out.replace(//i, `${head}`);
- // Drop the floating button just inside .
- out = out.replace(//i, `${dlButton}`);
return out;
}