Bulgaria gained its independence from the Ottoman Empire in 1878 , and for the next century the population grew at a relatively constant rate , before falling into decline from the 1980s until today .