The alchemy of the perfect pop song, according to the elusive songwriting genius behind hits by Britney Spears and Taylor Swift