Hirzebruch and Hoefer have found inequalitites satisfied by curves in ball quotients or modular varieties. These attain equality if and only of the curve is a Shimura curve. We explain a new proof of these results and some higher dimensional generalizations which were established in joint work with Eckart Viehweg and Kang Zuo. The proofs which work so far in Shimura varieties of type SO(2,n) use the Simpson correspondence in the non-compact case of variations of Hodge structures and theorems on uniformization. We also study the inverse problem of deciding when a subvariety is Shimura, provided it contains sufficiently many Shimura divisors. During my time as a postdoc at UCLA I was introduced into many subjects needed in our work, Mark was my main source of influence in those days (a while ago, say before IPAM).