Fundamentals of solar cells