As the voltage across the capacitor increases ... and exactly like the inductor’s. So even with no real math, you can get a feel for why this works. All components we use are not ideal.