Toward a modular theory of trophic interactions