From 03533159539538d07bc68b2e041f28f6b998a0b2 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Tue, 14 Jul 2026 15:59:05 +0300 Subject: [PATCH] fix(theme): clamp h3 so it never overtakes the nav h1 --- src/shared/styles/theme.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/styles/theme.css b/src/shared/styles/theme.css index 7cee16b..1ce1b34 100644 --- a/src/shared/styles/theme.css +++ b/src/shared/styles/theme.css @@ -213,7 +213,10 @@ font-size: var(--text-3xl); } h3 { - font-size: var(--text-2xl); + /* 5vw is tuned to stay under the nav h1 across the whole range: it only + * reaches the nav's 32px exactly at the 640px breakpoint where the nav + * itself steps up, so h3 never overtakes it. */ + font-size: clamp(1.5rem, 5vw, var(--text-2xl)); } h4 { font-size: var(--text-xl);