How to reduce the number of pins for three 7 led segment?
You can probably reduce the GPIOs usage as follow :


Instead of using 7 GPIOs for 7 x tact switches, you can use a 3x3 matrix for 9 switches : 6 GPIOs
(you can add 2 more tact switches)
Instead of using 6 GPIOs for 6 x leds you can use a 2x3 matrix for 6 leds : 5 GPIOs  
Instead of using 21 GPIOS for 3 x 7segment you can put it on a 7 bits bus, and use 3 more pin to control the 7-segment : 10 GPIOs  




For switches you need to scan the matrix rows and to know what tact is pushed, and for the led and 7segment you need to refresh quickly, because of eyes afterglow (remanence) the user could not see the flickering/blinking, user think light is fixed on this different leds.

Before : 34 GPIOs
After : 21 GPIOs (With 2 more switches)

You can also consider the 6 leds as a "fake 7segment" ans reuse your 7 bits bus to control them, you only need 1 GPIO to select this "fake 7 segment".

Before : 34 GPIOs
After : 17 GPIOs (With 2 more switches)