De nada is typically used as a courteous response following Gracias. On the other hand, Por nada is used when you were working on something but there was no outcome, meaning you worked for nothing. After Gracias!, Por nada would be a disrespectful response, in my view. For nothing; for nothing.