MOSFETS and high impedance output
Output will be high-Z in 2 cases:

1) When CLK=0 and D=1

2) When CLK=1 and D=0

If you want high-Z for both values of D you need to feed different values for CLK and notCLK inputs.