It could have easily turned around in the endgame, but then again it is exedingly rare if not unheard of to play a perfect endgame... Good old endgames just don't happen anymore in grandmaster chess, so it's interesting to see the ones we can play.
Successful Endgame!

You played the endgame very well. Granted, Black made some critical mistakes, but punishing them is what chess is about, right? For example, on move 25, instead of passively playing Re8, Black should have played Rd8, sacrificing the e5 pawn to activate his rook. Here are some helpful principles for Rook and pawn endgames:
- Generally, a rook on the 7th rank is powerful and worth sacrificing a pawn to get since it both attacks pawns on their home rank and hampers the enemy king's mobility if it hasn't gotten off the back rank yet.
- Rooks belong behind passed pawns.
- Passed pawns must be pushed!(you did a good job of following this one)
- Above all, the defender cannot afford to play passively!(except in some special positions) This will generally lead to a slow death, much like what your opponent suffered.
If you understand these 4 basic principles, you will already have excellent knowledge of the most common(and hardest) endgame. Good luck and may your Rook and Pawn endgames be successful! You can even take the 1st step by seeing how you, or your opponent, could have or did use the above principles to their advantage.
This is from a game I recently won, along with annotations and commentary. Analysis and tips are greatly appreciated, as always, since I'm but a mere patzer hoping to improve his overall game.
It was the first down-to-the-bare-bones endgame I recall facing here on Chess.com, and I think I played it decently.