I leave tomorrow night for 18 days in Peru. The trip will include a hike in the Huaraz Andes, a trip to Cuzco and Machu Picchu, and perhaps a few days in the Amazon.
What kind of clothes should I bring? I'm having a tough time finding consistent information on the weather conditions, particularly in Huaraz. Won't it be cold? Considering my itinerary, should I pack mostly shorts/t-shirts, or heavier pants/sweaters? A light windproof/waterproof jacket, or a heavier one with some layers? A 0degree sleeping bag, or a -7degree?
Thanks so much!

It's winter in Peru so only shorts and t-shirts definitely won't cut it.
you should bring layers of clothes that you can wear on top of each other, or peel off as it gets warmer. So preferably three thin longsleeves that can be worn on top of each other instead of one bulky sweater. Thermal underwear is a great layer, especially the type that doesn't get clammy (so no cotton). They can double as pajamas.
In the cold evenings wear your layers plus a fleece (I prefer the ones that zip all the way open in the front like a vest) and a windbreaker.
If you still get cold you can always buy an alpaca woolen sweater in Peru.
For the hikes you may be able to rent a sleeping bag (what does it say in the guidebook?); for the other days you won't need one. All hotels and hostels proviade enough blankets (but just make sure and have a look at the room before you accept it). You could bring a silk sleeping bag liner for extra comfort, cleanliness and warmth (about 5 added degrees). But I don't know if you still have time to buy one.
In the Amazon it will probably be warm but even there long trousers may be more comfortable to protect you from mosquitos and other insects.

It is a particular cold winter this year - a state of emergency has been declared in the Southern Andes because people there just don't have the clothing for the conditions they are currently experiencing. Even on the coast, where it is usually warmer, it is still jumpers during the day. It is cheap to buy 'alpaca' jumpers here so don't worry if you find it's colder than you thought, you have an excuse to get more souvenirs.

Unusually cold this year in Peru, although it is the southern part of Peru which is suffering of 0 to -20 degrees C. in the highest parts of the Andes. During the day the sun is still strong enough to warm the day, but at night and early in the morning weather conditions can change drastically in Puno and areqas above the 3500 METERS ABOVE SEA LEVEL and to a lesser amount in CUzco. hUARAZ (CITY) is 3000 meters.
I only wore the shorts I brought once. Totally not worth it - I could have just taken the same zip-off pants and worn those without packign the extra weight. I never got to wear my bikinis either (first, we never made it to the waterfalls in aguas calientes, or the hot springs, and the jacuzzi in our hotel in cusco was out, and so on and so forth). So no real need for those.
I wore a fleece hoodie every day, but also had a rainjacket (which was better for the jungle). I bought mittens and a hat there because I was so cold at night. Somedays I'd strip down to a long-sleeved t-shirt.
Overall, in late May it was pretty cold in Cusco, a little warmer in Aguas Calientes, and semi-warm in the jungle (70 degrees) and then the coast (Trujillo, Lima) was like 70 and overcast.