Aims. We analyze the high-resolution time-resolved VLT/uves spectra of PG 1336−018, a rapidly pulsating subdwarf B (sdB) primary in a close orbit with an M5 companion, with the aim to detect the pulsational signal of the primary in line-profile variations. Methods. After removing the dominant radial-velocity component inherent to the orbital motion and taking only out-of-eclipse data we computed cross-correlation functions (CCFs) for each individual spectrum and assumed these to approximate the average line profile. We computed predictions of line-profile variations for pulsating sdB stars and present their diagnostic value for mode identification. Results. We detect the pulsation mode at 5435 μHz in the line-profile variations of the CCFs which allows us to characterize the detected pulsation mode of PG 1336−018. Conclusions. We model the pulsational perturbations of synthetic spectra for a star with physical parameters like PG 1336−018 and confront them with the observed spectra. We find that low order Balmer lines can be used as diagnostic tool to identify pulsation modes. A detailed line-profile analysis of the perturbed time-series spectra excludes the = |m| = (3, 3), (1, 0), (2, 1) and (2, 0) modes, but does not allow a unique mode identification among the radial or sectoral dipole or quadrupole modes.