Instead of knight taking d6 on move 9, if you had moved d3, you could have exchanged knights or given your knight an escape square. And like Ilywrin suggested, if you made the move f4 instead of taking that pawn at the end!??? You would be completely winning.