Task: Detect User-Preferred Mode
Task Description: Automatically detect the user's system theme preference (light or dark mode) and set it as the default display for the website.

Detailed Description
Ask ChatGPT
Detect User-Preferred Mode
Objective
Automatically detect the user's system theme preference (light or dark mode) and set it as the default display for the website.
Why It Matters
Respecting user preferences improves UX and shows attention to modern web standards. Most operating systems now support light/dark mode preferences.
What You Need To Do
- Use the
prefers-color-schemeCSS media query or JavaScriptmatchMediaAPI - Set the website's initial theme based on the user's system preference
- Ensure the theme toggle still works for manual overrides