Hodge theory for twisted differentials