Why are nitrogenous bases of DNA hydrophobic if they can hydrogen bond?
Is it that they are only relatively hydrophobic?
This forum explains it but does not give an example of the structure.
These two concepts are not mutually exclusive. You have constructed a false dichotomy. Both of these facts are true:
There are other examples of hydrophobicity and H-bonds co-existing. For example on the interior of proteins.