?! Stylish but inaccurate. It does two things, but that weak square is going to be nasty. Better was to prepare b5 by opposing the rook and queen.
17... a5 18. Bc4xd5
? An anti-positional move. It's hard to say what this does. It's a centralized knight, but it's better to live with it than reduce to a hopeless game.
18... exd5 19. Bg5f4 Qc7d8 20. b5
?! Qd2 would break the pin.
20... Bc8g4 21. bxc6 bxc6 22. Rf1d1
? Loses to the immediate g5. Better to lose a pawn on d4 than the game.
22... Qd8f6 23. h3
!? Probably the best practical chance? The plan is to give up the d4 pawn for activity or head to an inferior rook endgame where you can hope for an error.
? This appears to be a miscalculation to the sixth rank. h4, which you did consider, prevents the king from moving. Black is kind of at a loss for how to improve.