Theory of Complex Heterointerfaces