Vertically stacked silicon nanowire photodetectors for spectral reconstruction