A smooth projective variety Z is said to be Calabi-Yau if its canonical bundle is trivial. I will discuss recent joint work with Taelman, in which we use derived algebraic geometry to study how Calabi-Yau varieties in characteristic p deform. More precisely, we show that if Z has degenerating Hodge–de Rham spectral sequence and torsion-free crystalline cohomology, then its mixed characteristic deformations are unobstructed; this is an analogue of the classical BTT theorem in characteristic zero. If Z is ordinary, we show that it moreover admits a canonical lift to characteristic zero; this extends classical Serre-Tate theory. Our work generalises results of Achinger–Zdanowicz, Bogomolov-Tian-Todorov, Deligne–Nygaard, Ekedahl–Shepherd-Barron, Schröer, Serre–Tate, and Ward.