Engineering light absorption at critical coupling via bound states in the continuum