High side mosfet 12V switch from isolated 3V3 GPIO
This design has a very high margin with good choices for On/Off margin.
With 10:1 CTR on the design or 10% output and is well exceeded by guaranteed CTR.

Keep in mind Vce loses gain when saturated and rises above 0.5V quickly to 1V at which point the worst-case FET leakage is guaranteed to be Id=-250 nA max where it is possible that 2mA LED drive &quot;could&quot; work to turn on.

The Ron is 56 mohm max at Vgs= - 10 and a little bit less at -12V.  Your load is equivalent to 12V/0.1A = 120 Ohms so a switch resistance ratio of 1% max is desirable so 0.056/120  or overkill but fine.

Rg is redundant with Rce equivalent resistance Vce(sat)/Ic = 0.2V/1.18mA = 169 ohm approx.


Good job.