4 leds and a button

Tired possibly - stupid I would not say so as your attempt is a constructive step forward.

When you look at

I see requests to turn on leds that are independent of the timing comparison, so this will happen every time you cycle through the loop/if

Is that intended?

The logic could be

  • record start time upon initial button press (state change detection). Do that only once if the button stays pressed
  • if button is still pressed, use current time comparison with that start time to decide which leds should be on or off
  • if button is released, turn everything off
  • rinse and repeat