Well, my knowledge of electronics is not enough to discuss amplifiers or comparators, but I know there are sensors with both analogic and digital outputs like this one (that I´m currently using on a line follower):
But the one that it´s pointed on the project seems to be digital. If so, a better approach is to digital.Read() HIGH or LOW signal and use the trimpot to adjust the sensibility of the sensor acording to the distance that it is from the floor. Just place the sensor where it will be and calibrate it with the trimpot (it´s very sensitive. So, move it slowly).
See that OP mentions that he could read correctly if the sensor is close to the line.
If I´m writing nonsense and the sensor can be analog.Read(), it would be nice to change "if" conditions threshold. Considering that white is 1023 and black is 33, there´s no need to use 35 or 36. Using 200 will be enough.
And yes, the color of the floor and ambient light level will influence the measurements.