We demonstrate through precise numerical simulations the possibility of flexible, thin-film solar cells, consisting of crystalline silicon, to achieve power conversion efficiency of 31%. Our optimized photonic crystal architecture consists of a 15 μm thick cell patterned with inverted micro-pyramids with lattice spacing comparable to the wavelength of near-infrared light, enabling strong wave-interference based light trapping and absorption. Unlike previous photonic crystal designs, photogenerated charge carrier flow is guided to a grid of interdigitated back contacts with optimized geometry to minimize Auger recombination losses due to lateral current flow. Front and back surface fields provided by optimized Gaussian doping profiles are shown to play a vital role in enhancing surface passivation. We carefully delineate the drop in power conversion efficiency when surface recombination velocities exceed 100 cm/s and the doping profiles deviate from prescribed values. These results are obtained by exact numerical simulation of Maxwell’s wave equations for light propagation throughout the cell architecture and a state-of-the-art model for charge carrier transport and Auger recombination.