A method for detecting a target fluid in a fluid sample comprising a first fluid and the target fluid using photoacoustic spectroscopy (PAS), comprises a) providing a light source configured to introduce an optical signal having at least one wavelength into the fluid sample; b) modulating the optical signal at a desired modulation frequency such that the optical signal generates an acoustic signal in the fluid sample; c) measuring the acoustic signal in a resonant acoustic detector; and d) using the phase of the acoustic signal to detect the presence of the target fluid