A hardboiled detective is a fictional private investigator or police officer characterized by a tough demeanor, cynical worldview, and a strong sense of justice. This archetype often navigates through gritty urban settings while solving complex crimes, reflecting the moral ambiguity and harsh realities of society.