Pedro Acosta secured his maiden MotoGP victory with a stunning performance for KTM at the Red Bull Ring in Austria, while Jorge Martin finished second to extend his championship lead.