Hi, David.
It is neither; it is just the way we say in Spanish: "before learing Spanish..." you will find sentences such as "antes de conocerla, ya la quería", for example. Or: "antes de que comenzara este viaje, no pensaba en esto". The point being that there is no rule regarding "antes de" + "infinitive".
Best,