Design of the 65 nm CLICpix demonstrator chip