From a0f84e12aef5c3f3451e6a42e871fece4cf19d48 Mon Sep 17 00:00:00 2001 From: Terencio Agozzino Date: Sat, 7 Nov 2026 06:50:20 +0100 Subject: [PATCH] fix: land menu links right under the navigation bar The page stopped 80px above each section while the bar is 73px tall on desktop and 61px on phones, so a strip of the previous section showed above the one asked for. The offset now matches the bar. Co-Authored-By: Claude Opus 5.5 --- src/styles/global.css | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/styles/global.css b/src/styles/global.css index 458084e..7f5d86d 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -105,7 +105,9 @@ html { scroll-behavior: smooth; - scroll-padding-top: 80px; + /* The navigation's height, its 1px border included (see Nav.astro), so a + link lands with its section starting right under the bar. */ + scroll-padding-top: 73px; /* What a browser shows past the page's edges: behind Safari's toolbar on iPhone, and when a scroll bounces. The theme's background at the top, the footer's green once the footer is on screen (set in Base.astro), so the @@ -276,6 +278,10 @@ h2 { } @media (max-width: 920px) { + html { + scroll-padding-top: 61px; + } + section { padding: 80px 0; }