How NIR Spectroscopy Works: Physics, Chemometrics, and Instrument Design