Negotiating secular and sacred in medieval art