There's also a big genetic variation in caffeine metabolisation speed between individuals. For some 4 hours before bed might be fine, while for others even 12+ hours before messes up their sleep.
I get by on one cup of coffee before noon now, it seems to work. I'm one of those that feels effects on sleep from just more than one cup or coffee much later than lunch.