You can remove R3 and add a 12 volt zener diode to ground to prevent the gate voltage from going over 12 volts. Or you could move the bottom end of R3 to ground and the drain of the FET to Vout.
The 2N7002 is not a logic level FET. The gate threshold may be as high as 3 volts so it may not turn on real good. But it may well work as 3 volts is the high end of the spec.
The 2N7002 is not a logic level FET. The gate threshold may be as high as 3 volts so it may not turn on real good. But it may well work as 3 volts is the high end of the spec.