The three layers of the shaft are the medulla, cortex, and cuticle. The medulla is the innermost layer of the hair shaft, consisting of soft keratinized cells. The cortex is the middle layer, providing strength, elasticity, and color to the hair. The cuticle is the outermost layer, consisting of overlapping scales that protect the hair shaft and give it a smooth appearance. These three layers work together to maintain the structure and integrity of the hair shaft.