Help with site headers

1. How can I make the header to not hide the title when a click on a table of content item?

When you go and click on one of the items on the table of content, then you get scrolled to the item. It scrolls to the right part of the content, but the sticky header hides it.

2. I want the logo and header to shrink on page scroll

I tried doing that: