The nav is data, not markup. The merchant builds the menu in the admin. You loop it from , so you never touch the header when they change it.
{% for link in linklists['main-menu'].links %}
<a href="{{ link.url }}">{{ link.title }}</a>
{% endfor %}
A dropdown is nested links: a link can have its own link.links. And link.active is true for the link to the current page.
We read 'main-menu' directly here. In production the handle comes from a link_list setting so the merchant picks the menu.