Write a function to implement a simple data encryption algorithm.
Implement a Caesar cipher that shifts each English letter by shift positions, wrapping around the alphabet. Preserve uppercase and lowercase characters, leave digits and punctuation unchanged, and support negative or large shifts.
encrypt(text, shift)
Return the encrypted string.
def encrypt(text, shift):