A 16-year-old teenager presents with breast enlargement and tenderness for over three years, causing embarrassment and pain. On examination, he is obese, with no abnormalities in vital signs or lab tests. You prescribe tamoxifen to address his symptoms. What is the mechanism of action of tamoxifen?