Transistor, PWM and LEDs

Sadly, not really a 100% drop in replacement.

BC series have a different pinout than JEDEC based parts, Jedec = EBC versus BC = CBE, which means you had the transistor in backwards.