Prove that the sum of the squares of two odd integers cannot be a perfect square.

The author wrote the follow proof:

Assume, to the contrary, that there exist odd integers and such that , where . Then and , where . Thus

where is odd integer. If is even, then for some integer and so , where is an even integers; while is odd, than is odd. Produce a contradiction in each case.

Remark: I just don't see how z can be anything else be even. To me it's obvious explicitly implied that is even, which by some theorem, is also even.

Question: Which part of the proof gave the author the reason to believe that it's odd? Further how in the case of it being even be a contradiction to being a perfect square?

I just can't see it. Could someone please show me the author's intent?