Just like most games, it seems to me that your opponent gave you the game with 25 Kd7. It seems to me that he would have been much better off with 0-0 or moving the king to either e7 or f7. He was already supporting the bishop with his knight on e5.
If he would have exchanged rooks with you, 0-0 would not have allowed you to take his b5 pawn.
Moving the king into a discovered check with Kd7 is a huge blunder. You punished him accordingly.