Here is the sentence:
Hungry for dinner, the surface is where Gert the goldfish waited in anticipation
of food flakes.
You rule! You recognized that too many words separate the modifier from its target. Hungry for dinner, a phrase, is describing surface when its target should be Gert.
To fix the problem, you should organize the sentence like this: Hungry for dinner, Gert the goldfish waited at the surface in anticipation of food flakes.