SAN FRANCISCO — Ellen Pao spent much of Tuesday answering tough questions about her late-night texting and parking lot liaisons with a married partner at Kleiner Perkins Caufield & Byers.

Orrick, Herrington & Sutcliffe partner Lynne Hermle, lead lawyer for the venture-capital firm, used her cross-examination of Pao to spotlight the affair, undermine Pao’s professional abilities and raise questions about her story that being a woman was what stood in the way of her promotion at the venture-capital firm.