Skip to content

Commit 99e8148

Browse files
jokester-zzzclaude
andcommitted
style: improve layout, typography, and hero scroll animation
- Increase base font size from 18px to 20px - Widen page container from 1120px to 1320px (padding 28px → 40px) - Expand hero to 100vh so Research Directions appear below the fold - Remove border between news items - Smooth hero image animation: extend range to 15% hero height, add ease-in-out curve, add will-change hint Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4763d9b commit 99e8148

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

assets/css/main.css

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
/* ── Reset & Base ── */
5050
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
51-
html { font-size: 18px; scroll-behavior: smooth; }
51+
html { font-size: 20px; scroll-behavior: smooth; }
5252

5353
body {
5454
font-family: var(--font-body);
@@ -67,7 +67,7 @@ a:hover { text-decoration: none; }
6767
img { max-width: 100%; height: auto; display: block; }
6868

6969
/* ── Layout ── */
70-
.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
70+
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
7171
.page-content { padding: 56px 0 96px; }
7272

7373
/* ── Page load animation ── */
@@ -249,7 +249,7 @@ img { max-width: 100%; height: auto; display: block; }
249249
width: 100vw;
250250
margin-left: calc(-50vw + 50%);
251251
margin-top: -116px;
252-
min-height: 85vh;
252+
min-height: 100vh;
253253
display: flex;
254254
align-items: flex-start;
255255
position: relative;
@@ -279,6 +279,7 @@ img { max-width: 100%; height: auto; display: block; }
279279
z-index: 0;
280280
border-radius: var(--radius-lg);
281281
background: linear-gradient(145deg, var(--accent) 0%, var(--accent-mid) 60%, var(--accent-light) 100%);
282+
will-change: top, bottom, right, width, border-radius;
282283
}
283284

284285
.hero-bg-img {
@@ -293,7 +294,7 @@ img { max-width: 100%; height: auto; display: block; }
293294
position: relative;
294295
z-index: 2;
295296
width: 100%;
296-
max-width: 1120px;
297+
max-width: 1320px;
297298
margin: 0 auto;
298299
padding: 400px 28px 60px;
299300
}
@@ -405,10 +406,8 @@ img { max-width: 100%; height: auto; display: block; }
405406
gap: 20px;
406407
align-items: baseline;
407408
padding: 14px 0;
408-
border-bottom: 1px solid var(--border-light);
409409
transition: padding-left 0.2s;
410410
}
411-
.news-item:last-child { border-bottom: none; }
412411
.news-item:hover { padding-left: 4px; }
413412

414413
.news-date {

assets/js/hero.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
var rafId = null;
1616

1717
function lerp(a, b, t) { return a + (b - a) * t; }
18+
function ease(t) { return t < 0.5 ? 2*t*t : -1+(4-2*t)*t; } // ease-in-out quad
1819

1920
function update() {
2021
rafId = null;
@@ -27,7 +28,7 @@
2728

2829
var scrollY = window.scrollY || window.pageYOffset;
2930
var heroH = section.offsetHeight;
30-
var t = Math.max(0, Math.min(1, scrollY / (heroH * 0.10)));
31+
var t = ease(Math.max(0, Math.min(1, scrollY / (heroH * 0.15))));
3132

3233
// Measure actual DOM positions at current zoom level — stays correct at any scale
3334
var heroRect = section.getBoundingClientRect();

0 commit comments

Comments
 (0)