Sometimes it just happens , its often calcium deficiency thats why the stems turn red/purple . You can fix this by simply adding a little bit of CalMg to your nutrient solution mix . Another symptom you might see is yellowing vains in the leaves that is also Cal Mg deficiency more magnesium tho . Everything in your grow seems to be fine and it looks like your almost ready to harvest ! I really wouldnt worry about it to much at this stage but it's always something to improve on in you next grow's ! I hope this information helps you to understand what the deficiency's look like and how to correct them . -Happy Growing!