Date: 202008
Local time of day: 0601-1200
Location: ZZZ.TRACON, US
Aircraft: Commercial Fixed Wing
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Descent
Airspace: Class B ZZZ
ATC / advisory: TRACON ZZZ
Reporter organization: Air Carrier
Reporter function: First Officer; Pilot Not Flying
Reporter qualification: Flight Crew Air Transport Pilot (ATP); Flight Crew Instrument; Flight Crew Multiengine
Human factors: Distraction
Second reporter function: Captain; Pilot Flying
Anomaly: Conflict Airborne Conflict; Deviation - Altitude Overshoot; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Published Material / Policy; Inflight Event / Encounter Weather / Turbulence
Detector: Person Air Traffic Control
When detected: In-flight
Result: Flight Crew Returned To Clearance
Contributing factors: Environment - Non Weather Related; Procedure; Human Factors
Primary problem: Human Factors

Narrative: Descending via the ZZZZZ into ZZZ there was a small buildup near the ZZZZZ1 waypoint. The Captain deviated just a few degrees to the west of it then proceeded back on course via the ZZZZZ arrival. A few moments later ATC told us to stop the descent immediately because of traffic. I looked up and saw that we were at about 8;580 feet about five miles prior to ZZZZZ2 waypoint. ZZZZZ2 has a restriction of 9;000 feet. We leveled and began the climb back up to 9;000 feet; of which I informed ATC. ATC asked us what happened and the Captain explained the situation. By selecting heading for those few degrees to get around the buildup; the airplane went into vertical speed mode for the descent. Neither of us caught it.I was a little distracted by looking at arrival information on my iPad. I just didn't realize we were in vertical speed mode. I know that's what happens; but I just didn't catch it.Double check the FMA any time changes are made to the different modes of the autopilot.


Second narrative: Cleared to descend via the ZZZZZ; profile descent was working perfectly in the aircraft managed mode; until I selected 2-3 degrees right of course to graze a single cumulus build up on the arrival line followed by a quick jog back to the course line for passenger comfort. (Deviation was about a wingspan width laterally for less than 5 seconds) I selected NAV again to manage the course line and forgot vertical nav had reverted to vertical speed. The level off should have been 9;000 feet and I inadvertently let the aircraft hit a low point of approximately 8;600 feet before I intervened and climbed back up to 9;000 feet.  At approximately the same time I saw my mistake and started climbing ATC called and told us to immediately stop our descent; I was already in the process of returning to the proper altitude. Shortly after our level off the TCAS showed traffic but we already had more than enough separation and the Controller verified this when he queried us for information on why we had descended early/ before ZZZZZ2. I completely and honestly told him of my mismanagement of the FCU/FMS and humbly 'owned' the mistake. His reply was well we caught it before there were any problems...then he gave us a frequency change and I asked if this was going to give me any problems down the road and he said no. Fingers crossed that that is in fact the case.I can't come up with anything other than 'I know better than this' with having thousands of hours in the aircraft. I should have verified my inputs better than I did and paid more attention. A little bump would have been more welcome than a possible altitude violation and I should have just let the aircraft manage itself since it was already doing a fine job until I fat fingered it up.Just paying more attention or asking for a weather deviation would have avoided this situation in the first place. We would have dialed in a hard altitude and vertical speed wouldn't have been an issue. I'm not flying as much as I'd like on reserve to maintain a super level of currency right now with our reduced schedules and would like more flying that's not there to have; since transferring over to the left seat. I completely owned that mistake and as I said above I know better than this and have been trained better than this.  I'll use more care to monitor things especially when it's a change from the normal routine.


Synopsis: Air carrier flight crew reported an altitude deviation due to the aircraft going into vertical speed mode for the descent after deviating for weather.