Asteroseismic measurement of surface-to-core rotation in a main-sequence star