Choosing the right parameters for a Pulse wave simulation in a CAD schematic
The inverting input is not referenced to any DC voltage therefore it floats. It needs to have negative feedback via a resistor to keep it centred between the power rails. My recommendation is to use a feedback resistor (maybe 10 kohm) and also add a 10 kohm in series with C1. Make C1 a lot higher in value too.

The circuit I propose would have a gain of 1 and will remove the DC offset from the input signal. That is what I believe you are looking for. An op-amp's gain cannot be adequately defined purely by the ratio of capacitors.