An orthogonal series estimate of time-varying regression