after learning about mosfets... it seams that that when the switch isn't triggered... it will stay on? hmmm...
Explanation:
When the switch is closed, 12V is directly applied to the gate, the light turns full on, and the capacitor charges via R3. When the switch opens, the charge on the capacitor keeps the mosfet turned on, and it slowly discharges via R3 and R1. As it discharges, the gate voltage drops slowly, so the mosfet turns off slowly, and the light fades out.