Task: complete the SAME dialog repair in script.js only. Current stable browser audit remains9/10. All other functions still pass. Do not rewrite files or touch search/filter/form/theme/image/layout/project data.

The last round added a close button, but the rendered links still do not open usable dialogs. This round uses evaluator-supplied algorithmic guidance and current-source anchors, not autonomous diagnosis. Apply exactly the needed small changes:

A. Inside renderProjects, filtered.forEach already provides the real project object p and creates article. The unique existing anchor is: grid.appendChild(article);
During each article creation, attach a click listener to THAT article's current .project__link, prevent the default anchor action, and call openProject with the current real p object. This survives every re-render and does not depend on a missing data-id. Do not rely on the old global pre-render link NodeList. Remove the obsolete global binding block if necessary.

B. In openProject the existing unique assignment is: overlay.className = 'modal';
The existing CSS requires .modal--open to make it visible and interactive. Set that open state when creating the overlay.

C. The close button already exists and is focused. It is the only focusable control in this dialog. Handle Tab and Shift+Tab inside the overlay so focus stays on that button; keep Escape, click close, overlay removal and focus return to the originally clicked link working. Use the current closeBtn in this function, not a nonexistent identifier.

Use read_file and small replace_text patches, each old/new<=4000 chars. Run check_files, then end with brief final text. No finish, write_file or generate_image tools are available. Do not provide an unapplied code block.


Limits:24 tool attempts,24000 total output tokens, maximum16384 per response. Only small exact replacements; do not rewrite entire files.
