Turning led off after 30 seconds
This part ..

PORTA =0b00000001; // turn on fet 
_delay_ms(30000);
DDRA=0b00000000;


should probably look like this ..

PORTA =0b00000001; // turn on fet 
_delay_ms(30000);
PORTA=0b00000000;


i.e., you don't want to redefine the direction of the pin, you want to change its state.