From ancient festivals to medieval poetry and modern customs, Valentine’s Day has continually adapted to cultural shifts.