I found this quote back in September.
CSS is a programming language. As unintuitive as it might feel to you at times, it's not just these random things that happen. It's built using very specific rules. The problem is that most people never learn those rules.
We start learning CSS by learning the syntax, which is super simple. That tricks us into thinking that it's a simple language.
Don't let the simple syntax trick you. Dive into it and learn how it works.
— Kevin Powell, Software Engineer & CSS Educator