Why not use setup() and loop(), not main?
No need to constantly update OCR1A, set it once.
Its wise to reset TCNT1 to zero once you've changed the OCR1x registers.
I think it works as is except pin 10 isn't changing - change
PORTB ^= ( 1<< PB2 );
to
PORTB ^= PB2 ;
to fix that.
, not PB2 to fix that.
Not sure what PB2 is, I suspect its a bit number not a bitmask