Solo travelling South/Central America in July. Suggestions?

Hello everyone,

I’m planning my first solo travel trip to South America this summer. My primary concern is the weather as it seems like this isn’t the best time to go but it’s my last chance so looking to make the most of it nonetheless.

– travelling for ~1 month and will be starting in Mexico City however not looking to stay too long in MC
– I’m relatively young and this will be my first time so looking to stay in hostels and meet other travellers along the way
– open budget but I’m not looking to spend much more than 7-8k incl flights. I’m sure 1 month in SA can be done in less though.
– Again my primary concern is weather as I’m looking to spend at least some time on beaches and really enjoy warm weather. Looking to avoid rain as much as possible.
– countries I’m considering: Mexico, Colombia, Costa Rica, Peru, although I would probably only do 2 maybe 3 of these

What I need help with:
– which cities in the countries I listed above would you recommend that would have both good weather during July and would be a good experience
– activity recommendations in these cities?

This is what I’ve come up with so far as a very rough itinerary but keep in mind I’m very unsure about the weather so again let me countries and cities are worth hitting.

Mexico city to puerto Escondido for 5-7 days

Costa Rica:
San Jose to Puerto Viejo for 5-7 days

Medellin for 5 days + maybe another place

Lima to Cusco for 5-7 days

I’ll probably end up deciding on 2/3 of these and make the trips longer/explore more but nonetheless let me know your thoughts. Would really appreciate it! :)

Solo travelling South/Central America in July. Suggestions?