Rational Design of Nanostructured Surfaces for Energy Conversion and Wettability