We propose a definition of the Toledo invariant for representations of
fundamental groups of smooth varieties of general type into semisimple Lie
groups of Hermitian type. This definition allows to generalize the results
known in the classical case of representations of complex hyperbolic lattices
to this new setting: assuming that the rank of the target Lie group is not
greater than two, we prove that the Toledo invariant satisfies a Milnor-Wood
type inequality and we characterize the corresponding maximal representations.Comment: 19 page