What strategic plan, for the White player, needed to implemented in the middlegame? I played a game yesterday on chess.com with the Pirc Defence. I am kind of weak in the endgame but I was concerned about the middlegame plan. Was my approach the wrong one? Why, and where, did I lose?

[FEN ""]
[Event "Live Chess"]
[Site "Chess.com"]
[Date "2017.05.22"]
[Round "-"]
[White "ISeth"]
[Black "qwcnm"]
[Result "0-1"]
[BlackElo "1954"]
[ECO "B07"]
[TimeControl "900+10"]
[WhiteElo "1869"]
[EndTime "6:21:19 PDT"]
[Termination "qwcnm won by resignation"]

1.e4 c6 2.d4 d6 3.g3 h6 4.Bg2 g5 5.c4 Bg7 6.Ne2 Nd7 7.Nbc3 Nf8 8.Be3 Nf6
9.h3 Ne6 10.d5 cxd5 11.Nxd5 Nxd5 12.exd5 Nc5 13.Bd4 Qa5+ 14.Nc3 O-O 15.Bxg7
Kxg7 16.O-O Bf5 17.Qd4+ f6 18.Rfe1 Rfe8 19.g4 Bg6 20.Ne4 Nd7 21.Ng3 Ne5
22.Be4 Rac8 23.b3 Qc5 24.Qxc5 Rxc5 25.Bxg6 Kxg6 26.Kg2 a6 27.Ne4 Rc7 28.Rec1
Rec8 29.a4 b5 30.axb5 axb5 31.c5 Nd3 32.Rc3 Nxc5 33.Nxc5 Rxc5 34.Rxc5 Rxc5
35.Rd1 Rc3 36.Re1 Kf7 37.Re3 Rxe3 38.fxe3 e6 39.e4 exd5 40.exd5 f5 41.Kf3
f4 42.h4 Kf6 43.hxg5+ hxg5 44.Ke4 b4 45.Kd4 f3 46.Ke3 Ke5 47.Kxf3 Kxd5
48.Ke3 Ke5 49.Kd3 d5 50.Ke3 d4+ 51.Kd3 Kd5 52.Kd2 Ke4 53.Ke2 d3+ 54.Kd2
Kd4 55.Kd1 Kc3 56.Kc1 Kxb3 57.Kd2 Kc4 58.Ke3 Kc3   0-1


You can see that black wasted some tempos with his Knight in the opening, so I decided to strike in the centre with d5 or e5. I played d5 and was expecting some fireworks and tactical superiority, but could not achieve anything. 

Can anyone suggest something better?
If you look at the position round about move 20 you see that you are already strategically worse. Black has a very good bishop and you have a very bad one thanks to your pawns on c4 and d5. Your pawn on c4 is much weaker in the endgame than black's on e7. You have set up the conditions for black to launch a winning minority attack on the queenside which he eventually did.

Your best chance at that stage in the game was to launch your own kingside attack. To that end you needed to keep pieces on the board and not swap them off as you did. On move 19, instead of g4, double rooks on the e file starting with Re3, then push your f pawn to break open his kingside. His pawns on d6 and e7 form a block making it difficult for him to bring his queen and a8 rook over to the defense. That should give you good chances of winning on the kingside before he wins on the queenside.

As it was you swapped off into a losing endgame. 

Going back further in the game you can see that your pawn push to d5 set up the conditions for his win. In that kind of position you should be looking for the e5 push instead. If you can make that work then you will be much better.