Nf6 blocked your own escape diagonal. He set a trap for you and your queen got stuck in it.
Always consider how your queen could be attacked and where she can go. Kind of like the king, you don't want the queen to be checkmated either. Sorry to state the obvious.