Attachinterrupt0 and attachinterrupt1 doesn't work

void light() {
  if (Serial.available()) {
    dim = Serial.read();

Once you enter the ISR, interrupts are disabled - you can't have an interrupt interrupting an interrupt - and Serial uses interrupts, so that will be an issue.