Enjoyment appears at the boundary between boredom and anxiety, when the challenges are just balanced with the person’s capacity to act.

Mikael Krogerus The Decision Book: Fifty Models for Strategic Thinking (Fully Revised Edition)

LessWrong How to Be Happy - LessWrong

Mihaly Csikszentmihalyi Flow: The Psychology of Happiness