The site had a Content-Security-Policy, but only as a meta tag, and its script-src allowed 'unsafe-inline'. That makes the policy close to useless against injected scripts, because an injected inline script is exactly what it permits. Meta tags also cannot express directives such as frame-ancestors, and CloudFront's managed security headers policy sends no CSP at all.
Before touching anything I listed every inline script across the 15 pages. There were only four distinct ones: a two-line theme initialiser (in two slightly different forms), the contact form handler and the portfolio filter. There were no inline event handlers and no javascript: links. JSON-LD blocks are data rather than scripts, so the policy does not apply to them.
Each script became a file under assets/js and loads from the same place in the page, synchronously, so behaviour does not change. A small Python script did the replacement and asserted the expected counts: 14 theme initialisers, one form handler, one filter, and zero inline scripts left.
I loaded the pages locally under the strict policy and watched the console for violations, checked that the dark theme was applied, and clicked through the portfolio filter, which went from 10 cards to 2 and back to 10. I did not submit the contact form because it would send a real message. For that page the check was that the script loads without errors and that the form endpoint is on the allow-list.
I deployed the pages first, with the stricter policy in the meta tag, and only then changed the policy that CloudFront sends as a header. If the header had changed first, a browser holding an older cached page would have blocked its inline scripts. The custom response headers policy keeps every value of the managed one (HSTS, nosniff, frame options, referrer policy) and adds the CSP and a Permissions-Policy. Rolling back is one setting: point the behaviour back at the managed policy.
The site now scores A+ with 110 points and 12 of 12 tests passing on the Mozilla HTTP Observatory. The style-src directive still allows inline styles, because the template uses style attributes widely. Removing that is a bigger cleanup with less payoff, so I left it, and I would rather say so than imply the policy is stricter than it is.