fix: portrait glow clipping, nav scroll transparency, better hero sizing
Changes
@@@ -68,7 +68,7 @@position: relative;min-height: 100vh;min-height: 100svh;-- padding: 100px 0 40px;++ padding: clamp(80px, 12vh, 120px) 0 clamp(20px, 4vh, 60px);overflow: hidden;isolation: isolate;}@@@ -98,16 +98,19 @@align-items: center;min-height: 70svh;}-- /* min-width:0 prevents grid cells from overflowing their track */-- .hero__left, .hero__right { min-width: 0; overflow: hidden; }++ /* min-width:0 prevents grid cells overflowing their track.++ overflow:hidden ONLY on left — right needs visible overflow so portrait glow shows */++ .hero__left { min-width: 0; overflow: hidden; }++ .hero__right { display: grid; place-items: center; min-width: 0; }@media (max-width: 880px) {.hero__grid {grid-template-columns: 1fr;min-height: auto;padding-bottom: 32px;}++ .hero__right { order: -1; }.hero__portrait-frame { animation: none; }-- .hero__portrait { width: min(260px, 65vw); }++ .hero__portrait { width: min(220px, 55vw); margin-bottom: 8px; }}.hero__title {@@@ -141,17 +144,18 @@.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.5rem 0; }.hero__chips { display: flex; gap: 8px; flex-wrap: wrap; }-- .hero__right { display: grid; place-items: center; }++ .hero__right { display: grid; place-items: center; min-width: 0; }.hero__portrait {position: relative;-- width: min(360px, 80vw);++ width: min(400px, 44vw);aspect-ratio: 5 / 6;}.hero__portrait-glow {-- position: absolute; inset: -10%;-- background: radial-gradient(closest-side, rgba(76,201,176,.35), transparent 70%);-- filter: blur(20px);++ position: absolute; inset: -22%;++ background: radial-gradient(closest-side, rgba(76,201,176,.42), transparent 70%);++ filter: blur(32px);animation: breathe 8s ease-in-out infinite;++ pointer-events: none;}.hero__portrait-frame {position: relative;@@@ -50,9 +50,17 @@ const links = [<style>.nav {position: sticky; top: 0; z-index: 50;-- backdrop-filter: blur(12px);-- -webkit-backdrop-filter: blur(12px);-- background: color-mix(in oklab, var(--bg) 70%, transparent);++ background: transparent;++ border-bottom: 1px solid transparent;++ backdrop-filter: none;++ -webkit-backdrop-filter: none;++ transition: background .35s ease, border-color .35s ease;++ will-change: background;++ }++ .nav--scrolled {++ backdrop-filter: blur(14px);++ -webkit-backdrop-filter: blur(14px);++ background: color-mix(in oklab, var(--bg) 78%, transparent);border-bottom: 1px solid var(--border);}.nav__row {@@@ -128,6 +136,9 @@ const links = [max-height: 0;transition: max-height 0.3s var(--ease);border-top: 1px solid transparent;++ background: color-mix(in oklab, var(--bg) 94%, transparent);++ backdrop-filter: blur(16px);++ -webkit-backdrop-filter: blur(16px);}.nav__drawer.is-open {max-height: 360px;@@@ -182,4 +193,13 @@ const links = [drawer.setAttribute('aria-hidden', 'true');});});++++ // Scroll-linked transparent → frosted glass++ const navEl = document.querySelector('.nav') as HTMLElement | null;++ const updateNav = () => {++ const hero = document.querySelector('.hero');++ navEl?.classList.toggle('nav--scrolled', window.scrollY > 40 || !hero);++ };++ window.addEventListener('scroll', updateNav, { passive: true });++ updateNav();</script>
@@ -68,7 +68,7 @@
@@ -68,7 +68,7 @@
position: relative;
position: relative;
min-height: 100vh;
min-height: 100vh;
min-height: 100svh;
min-height: 100svh;
- padding: 100px 0 40px;
+ padding: clamp(80px, 12vh, 120px) 0 clamp(20px, 4vh, 60px);
overflow: hidden;
overflow: hidden;
isolation: isolate;
isolation: isolate;
}
}
@@ -98,16 +98,19 @@
@@ -98,16 +98,19 @@
align-items: center;
align-items: center;
min-height: 70svh;
min-height: 70svh;
}
}
- /* min-width:0 prevents grid cells from overflowing their track */
- .hero__left, .hero__right { min-width: 0; overflow: hidden; }
+ /* min-width:0 prevents grid cells overflowing their track.
+ overflow:hidden ONLY on left — right needs visible overflow so portrait glow shows */
+ .hero__left { min-width: 0; overflow: hidden; }
+ .hero__right { display: grid; place-items: center; min-width: 0; }
@media (max-width: 880px) {
@media (max-width: 880px) {
.hero__grid {
.hero__grid {
grid-template-columns: 1fr;
grid-template-columns: 1fr;
min-height: auto;
min-height: auto;
padding-bottom: 32px;
padding-bottom: 32px;
}
}
+ .hero__right { order: -1; }
.hero__portrait-frame { animation: none; }
.hero__portrait-frame { animation: none; }
- .hero__portrait { width: min(260px, 65vw); }
+ .hero__portrait { width: min(220px, 55vw); margin-bottom: 8px; }
}
}
.hero__title {
.hero__title {
@@ -141,17 +144,18 @@
@@ -141,17 +144,18 @@
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.5rem 0; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.5rem 0; }
.hero__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hero__chips { display: flex; gap: 8px; flex-wrap: wrap; }
- .hero__right { display: grid; place-items: center; }
+ .hero__right { display: grid; place-items: center; min-width: 0; }
.hero__portrait {
.hero__portrait {
position: relative;
position: relative;
- width: min(360px, 80vw);
+ width: min(400px, 44vw);
aspect-ratio: 5 / 6;
aspect-ratio: 5 / 6;
}
}
.hero__portrait-glow {
.hero__portrait-glow {
- position: absolute; inset: -10%;
- background: radial-gradient(closest-side, rgba(76,201,176,.35), transparent 70%);
- filter: blur(20px);
+ position: absolute; inset: -22%;
+ background: radial-gradient(closest-side, rgba(76,201,176,.42), transparent 70%);
+ filter: blur(32px);
animation: breathe 8s ease-in-out infinite;
animation: breathe 8s ease-in-out infinite;
+ pointer-events: none;
}
}
.hero__portrait-frame {
.hero__portrait-frame {
position: relative;
position: relative;
@@ -50,9 +50,17 @@ const links = [
@@ -50,9 +50,17 @@ const links = [
<style>
<style>
.nav {
.nav {
position: sticky; top: 0; z-index: 50;
position: sticky; top: 0; z-index: 50;
- backdrop-filter: blur(12px);
- -webkit-backdrop-filter: blur(12px);
- background: color-mix(in oklab, var(--bg) 70%, transparent);
+ background: transparent;
+ border-bottom: 1px solid transparent;
+ backdrop-filter: none;
+ -webkit-backdrop-filter: none;
+ transition: background .35s ease, border-color .35s ease;
+ will-change: background;
+ }
+ .nav--scrolled {
+ backdrop-filter: blur(14px);
+ -webkit-backdrop-filter: blur(14px);
+ background: color-mix(in oklab, var(--bg) 78%, transparent);
border-bottom: 1px solid var(--border);
border-bottom: 1px solid var(--border);
}
}
.nav__row {
.nav__row {
@@ -128,6 +136,9 @@ const links = [
@@ -128,6 +136,9 @@ const links = [
max-height: 0;
max-height: 0;
transition: max-height 0.3s var(--ease);
transition: max-height 0.3s var(--ease);
border-top: 1px solid transparent;
border-top: 1px solid transparent;
+ background: color-mix(in oklab, var(--bg) 94%, transparent);
+ backdrop-filter: blur(16px);
+ -webkit-backdrop-filter: blur(16px);
}
}
.nav__drawer.is-open {
.nav__drawer.is-open {
max-height: 360px;
max-height: 360px;
@@ -182,4 +193,13 @@ const links = [
@@ -182,4 +193,13 @@ const links = [
drawer.setAttribute('aria-hidden', 'true');
drawer.setAttribute('aria-hidden', 'true');
});
});
});
});
+
+ // Scroll-linked transparent → frosted glass
+ const navEl = document.querySelector('.nav') as HTMLElement | null;
+ const updateNav = () => {
+ const hero = document.querySelector('.hero');
+ navEl?.classList.toggle('nav--scrolled', window.scrollY > 40 || !hero);
+ };
+ window.addEventListener('scroll', updateNav, { passive: true });
+ updateNav();
</script>
</script>