Orthogonal series, approximation theory, and related problems