This is done with media queries in extend\layout.css.
You will see different code for different sizes of browser window. All sizes inherit from default styles and then there are css rules to change behaviour on different sized windows.
There is some padding/margin around the page but removing this completely wouldn’t look great on all devices. It was put in for a reason. Also making changes may not be as simple as changing margin on a single element without affecting other issues and on other sized windows.
In a child theme you could create additional media-queries at the bottom of your child’s style.css to override any default behaviour of the parent theme.