Get angle between direction and plane

Hi, I have banged my head about this for a while now and seem to be too stupid to understand how to solve it. How would I go about to get the angle of x in the picture? (Ie the angle between the blue line and the plane)

This thread had it all. For the lazy:

Ray ray = new Ray(transform.position, transform.forward);
        if (Physics.Raycast(ray, out RaycastHit hit, 100))
        {
            float angle = Vector3.Angle(hit.normal, -ray.direction);
        }