Skip to content

Commit dba14ea

Browse files
committed
feat: update "Services" navigation to link to the tech stack section and redesign the mobile navigation UI and animations.
1 parent 8860ad2 commit dba14ea

3 files changed

Lines changed: 48 additions & 37 deletions

File tree

src/components/Header.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const homePath = `/${lang}/`;
2727
>
2828
</a>
2929
<ul class="nav-links">
30-
<li><a href={`${homePath}#services`}>{t("nav_services")}</a></li>
3130
<li><a href={`${homePath}#about`}>{t("nav_about")}</a></li>
31+
<li><a href={`${homePath}#stack`}>{t("nav_services")}</a></li>
3232
<li><a href={`/${lang}/projects/`}>{t("nav_portfolio")}</a></li>
3333
<li><a href={`/${lang}/blog/`}>{t("nav_blog")}</a></li>
3434
<li><a href={`/${lang}/brief/`}>{t("nav_brief")}</a></li>
@@ -55,8 +55,8 @@ const homePath = `/${lang}/`;
5555
<div class="mobile-nav-overlay"></div>
5656
<div class="mobile-nav">
5757
<ul>
58-
<li><a href={`${homePath}#services`}>{t("nav_services")}</a></li>
5958
<li><a href={`${homePath}#about`}>{t("nav_about")}</a></li>
59+
<li><a href={`${homePath}#stack`}>{t("nav_services")}</a></li>
6060
<li><a href={`/${lang}/projects/`}>{t("nav_portfolio")}</a></li>
6161
<li><a href={`/${lang}/blog/`}>{t("nav_blog")}</a></li>
6262
<li><a href={`/${lang}/brief/`}>{t("nav_brief")}</a></li>

src/components/sections/About.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const homePath = `/${lang}/`;
4444
</div>
4545
</div>
4646

47-
<div class="tech-stack-detailed fade-in">
47+
<div id="stack" class="tech-stack-detailed fade-in">
4848
<h3 class="tech-stack-title">{t("about_tech")}</h3>
4949
<div class="tech-categories">
5050
<div class="tech-category-card">

src/styles/style.css

Lines changed: 45 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
html {
99
scroll-behavior: smooth;
10+
scrollbar-gutter: stable;
1011
}
1112

1213
body {
@@ -430,35 +431,39 @@ nav {
430431
transform: translateY(-9px) rotate(-45deg);
431432
}
432433

434+
/* --- Mobile Navigation --- */
433435
.mobile-nav {
434436
display: flex;
435437
flex-direction: column;
436438
align-items: center;
437439
justify-content: flex-start;
438-
/* Change from space-between to allow natural scroll */
439440
position: fixed;
440-
top: 0;
441-
right: 0;
442-
width: 85%;
443-
max-width: 400px;
444-
height: 100vh;
445-
height: 100dvh;
441+
top: 80px;
442+
/* Below header */
443+
right: 50%;
444+
transform: translateX(50%) translateY(-20px);
445+
/* Center horizontally, slightly above for animation */
446+
width: min(calc(100% - 40px), 320px);
447+
height: auto;
448+
max-height: calc(100vh - 100px);
446449
background-color: var(--glass-bg);
447450
backdrop-filter: blur(24px) saturate(180%);
448451
-webkit-backdrop-filter: blur(24px) saturate(180%);
449-
transform: translateX(100%);
450-
opacity: 1;
451-
visibility: visible;
452-
transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
452+
border: 1px solid var(--glass-border);
453+
border-radius: 24px;
454+
opacity: 0;
455+
visibility: hidden;
456+
transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
453457
z-index: 2000;
454-
padding: 100px 30px calc(40px + env(safe-area-inset-bottom));
455-
box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
458+
padding: 24px;
459+
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
456460
overflow-y: auto;
457-
/* Enable scroll if content is too tall */
458461
}
459462

460463
.mobile-nav.open {
461-
transform: translateX(0);
464+
opacity: 1;
465+
visibility: visible;
466+
transform: translateX(50%) translateY(0);
462467
}
463468

464469
.mobile-nav-overlay {
@@ -478,22 +483,20 @@ nav {
478483
}
479484

480485
.dark-theme .mobile-nav {
481-
background-color: rgba(17, 17, 26, 0.8);
486+
background-color: rgba(17, 17, 26, 0.9);
482487
backdrop-filter: blur(24px) saturate(180%);
483488
-webkit-backdrop-filter: blur(24px) saturate(180%);
484-
border-left: 1px solid rgba(255, 255, 255, 0.08);
489+
box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
485490
}
486491

487492
.light-theme .mobile-nav {
488-
background-color: rgba(255, 255, 255, 0.82);
493+
background-color: rgba(255, 255, 255, 0.9);
489494
backdrop-filter: blur(24px) saturate(180%);
490495
-webkit-backdrop-filter: blur(24px) saturate(180%);
491-
border-left: 1px solid rgba(0, 0, 0, 0.08);
496+
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
492497
}
493498

494-
.mobile-nav.open {
495-
transform: translateX(0);
496-
}
499+
497500

498501
.mobile-nav ul {
499502
list-style: none;
@@ -503,10 +506,10 @@ nav {
503506
}
504507

505508
.mobile-nav li {
506-
margin: 0.75rem 0;
507-
transform: translateY(20px);
509+
margin: 0.5rem 0;
510+
transform: translateY(10px);
508511
opacity: 0;
509-
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
512+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
510513
}
511514

512515
.mobile-nav.open li {
@@ -540,29 +543,37 @@ nav {
540543

541544
.mobile-nav a {
542545
color: var(--text-color);
543-
font-size: clamp(1.2rem, 6vw, 1.6rem);
546+
font-size: 1.1rem;
544547
text-decoration: none;
545548
font-family: var(--font-heading);
546-
font-weight: 700;
549+
font-weight: 600;
547550
transition: color 0.3s ease;
548551
display: block;
549-
padding: 0.4rem 0;
552+
padding: 0.5rem 1rem;
553+
border-radius: 12px;
554+
background: transparent;
550555
}
551556

552557
.mobile-nav a:hover {
553-
color: var(--accent-color-start);
558+
background: var(--tag-bg);
559+
color: var(--text-color);
554560
}
555561

562+
563+
556564
.mobile-controls {
557565
display: flex;
558-
flex-direction: column;
566+
flex-direction: row;
567+
justify-content: center;
559568
align-items: center;
560-
gap: 1.5rem;
569+
gap: 1rem;
561570
width: 100%;
562-
margin-top: auto;
571+
margin-top: 1.5rem;
572+
padding-top: 1.5rem;
573+
border-top: 1px solid var(--border-color);
563574
opacity: 0;
564-
transform: translateY(20px);
565-
transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) 0.4s;
575+
transform: translateY(10px);
576+
transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s;
566577
}
567578

568579
.mobile-nav.open .mobile-controls {

0 commit comments

Comments
 (0)