Skip to content

Commit d82f2a4

Browse files
Match AfterQuery header spacing and typography
1 parent 24db793 commit d82f2a4

File tree

9 files changed

+88
-63
lines changed

9 files changed

+88
-63
lines changed

web/app/fonts/CMUSerif-Bold.ttf

217 KB
Binary file not shown.

web/app/fonts/CMUSerif-Italic.ttf

282 KB
Binary file not shown.

web/app/fonts/CMUSerif-Regular.ttf

230 KB
Binary file not shown.
9.82 KB
Binary file not shown.
9.82 KB
Binary file not shown.
9.88 KB
Binary file not shown.

web/app/globals.css

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
@tailwind utilities;
44

55
:root {
6-
--page: #faf7fc;
7-
--page-soft: #f4eef4;
6+
--page: #fef7ff;
7+
--page-soft: #fdf7ff;
88
--paper: #fffdfc;
99
--paper-strong: #ffffff;
1010
--paper-muted: #f7f1eb;
@@ -32,28 +32,16 @@ html {
3232

3333
body {
3434
margin: 0;
35+
font-family: var(--font-serif);
3536
font-weight: 400;
36-
letter-spacing: 0.005em;
3737
color: var(--ink);
38-
background:
39-
linear-gradient(to right, transparent 80px, rgba(185, 174, 195, 0.45) 80px, rgba(185, 174, 195, 0.45) 81px, transparent 81px, transparent calc(100% - 81px), rgba(185, 174, 195, 0.45) calc(100% - 81px), rgba(185, 174, 195, 0.45) calc(100% - 80px), transparent calc(100% - 80px)),
40-
linear-gradient(180deg, var(--page) 0%, var(--page-soft) 48%, #f8f2ea 100%);
38+
background: var(--page);
4139
min-height: 100vh;
4240
position: relative;
4341
}
4442

4543
body::before {
46-
content: "";
47-
position: fixed;
48-
inset: 0;
49-
pointer-events: none;
50-
background:
51-
radial-gradient(circle at top left, rgba(61, 104, 220, 0.08), transparent 24%),
52-
radial-gradient(circle at top right, rgba(244, 216, 202, 0.3), transparent 28%),
53-
radial-gradient(rgba(110, 98, 114, 0.14) 0.8px, transparent 0.8px);
54-
background-size: auto, auto, 16px 16px;
55-
opacity: 0.38;
56-
mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.34), transparent 78%);
44+
content: none;
5745
}
5846

5947
::selection {
@@ -68,8 +56,8 @@ a {
6856
.site-shell {
6957
margin: 0 auto;
7058
width: 100%;
71-
max-width: 1260px;
72-
padding: 0 28px 88px;
59+
max-width: 1320px;
60+
padding: 0 32px 96px;
7361
}
7462

7563
.site-panel {
@@ -106,7 +94,7 @@ a {
10694
gap: 10px;
10795
font-family: var(--font-serif);
10896
font-size: 18px;
109-
font-style: normal;
97+
font-style: italic;
11098
font-weight: 400;
11199
letter-spacing: 0.01em;
112100
color: var(--muted);
@@ -128,31 +116,33 @@ a {
128116
}
129117

130118
.button-primary {
119+
font-family: var(--font-mono);
131120
border-radius: 999px;
132121
background: var(--accent);
133122
color: #fffdfa;
134-
box-shadow: 0 12px 24px rgba(61, 104, 220, 0.18);
135-
transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
123+
transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
136124
}
137125

138126
.button-primary:hover,
139127
.button-secondary:hover {
140-
transform: translateY(-1px);
128+
transform: none;
141129
}
142130

143131
.button-primary:hover {
144-
box-shadow: 0 16px 28px rgba(61, 104, 220, 0.24);
132+
background: #2c56d1;
145133
}
146134

147135
.button-secondary {
136+
font-family: var(--font-mono);
148137
border-radius: 999px;
149138
border: 1px solid var(--line-strong);
150139
background: rgba(255, 255, 255, 0.74);
151140
color: var(--ink);
152-
transition: transform 160ms ease, border-color 160ms ease;
141+
transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
153142
}
154143

155144
.eyebrow-tab {
145+
font-family: var(--font-mono);
156146
border-bottom: 1px solid rgba(185, 174, 195, 0.5);
157147
padding: 16px 12px;
158148
text-align: center;
@@ -172,6 +162,7 @@ a {
172162
}
173163

174164
.editorial-link {
165+
font-family: var(--font-mono);
175166
color: var(--muted);
176167
text-decoration: underline;
177168
text-decoration-color: rgba(106, 100, 114, 0.45);
@@ -198,6 +189,7 @@ a {
198189
align-items: center;
199190
gap: 10px;
200191
padding: 0;
192+
font-family: var(--font-mono);
201193
font-size: 13px;
202194
color: var(--muted);
203195
}
@@ -212,6 +204,7 @@ a {
212204
}
213205

214206
.footer-link {
207+
font-family: var(--font-mono);
215208
color: var(--muted);
216209
text-decoration: underline;
217210
text-decoration-color: rgba(106, 100, 114, 0.34);
@@ -224,10 +217,38 @@ a {
224217
text-decoration-color: rgba(29, 26, 36, 0.55);
225218
}
226219

220+
.nav-link {
221+
display: inline-flex;
222+
align-items: center;
223+
border-bottom: 1px solid rgba(29, 26, 36, 0.58);
224+
padding-bottom: 1px;
225+
font-family: var(--font-mono);
226+
font-size: 0.95rem;
227+
font-weight: 500;
228+
line-height: 1;
229+
color: var(--ink);
230+
transition: color 160ms ease, border-color 160ms ease;
231+
}
232+
233+
.nav-link:hover {
234+
color: rgba(29, 26, 36, 0.72);
235+
border-bottom-color: rgba(29, 26, 36, 0.34);
236+
}
237+
238+
.nav-link.is-active {
239+
border-bottom-color: rgba(29, 26, 36, 0.9);
240+
}
241+
242+
button,
243+
input,
244+
select,
245+
textarea {
246+
font-family: var(--font-mono);
247+
}
248+
227249
@media (max-width: 768px) {
228250
body {
229-
background:
230-
linear-gradient(180deg, var(--page) 0%, var(--page-soft) 52%, #f8f2ea 100%);
251+
background: var(--page);
231252
}
232253

233254
.site-shell {

web/app/layout.tsx

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
import type { Metadata } from "next";
22
import localFont from "next/font/local";
3-
import { IBM_Plex_Mono } from "next/font/google";
43

54
import { Nav } from "@/components/nav";
65
import { Providers } from "@/components/providers";
76
import { SiteFooter } from "@/components/site-footer";
87
import "./globals.css";
98

10-
const josefinSans = localFont({
9+
const cmuSerif = localFont({
1110
src: [
12-
{ path: "./fonts/JosefinSans-Light.ttf", weight: "300", style: "normal" },
13-
{ path: "./fonts/JosefinSans-Regular.ttf", weight: "400", style: "normal" },
14-
{ path: "./fonts/JosefinSans-Medium.ttf", weight: "500", style: "normal" },
15-
{ path: "./fonts/JosefinSans-SemiBold.ttf", weight: "600", style: "normal" }
11+
{ path: "./fonts/CMUSerif-Regular.ttf", weight: "400", style: "normal" },
12+
{ path: "./fonts/CMUSerif-Italic.ttf", weight: "400", style: "italic" },
13+
{ path: "./fonts/CMUSerif-Bold.ttf", weight: "700", style: "normal" }
1614
],
17-
variable: "--font-sans",
15+
variable: "--font-serif",
1816
display: "swap"
1917
});
20-
const yesevaOne = localFont({
21-
src: [{ path: "./fonts/YesevaOne-Regular.ttf", weight: "400", style: "normal" }],
22-
variable: "--font-serif",
18+
const plexMono = localFont({
19+
src: [
20+
{ path: "./fonts/IBMPlexMono-Regular.woff2", weight: "400", style: "normal" },
21+
{ path: "./fonts/IBMPlexMono-Medium.woff2", weight: "500", style: "normal" },
22+
{ path: "./fonts/IBMPlexMono-SemiBold.woff2", weight: "600", style: "normal" }
23+
],
24+
variable: "--font-mono",
2325
display: "swap"
2426
});
25-
const plexMono = IBM_Plex_Mono({ subsets: ["latin"], variable: "--font-mono", weight: ["400", "500"] });
2627

2728
export const metadata: Metadata = {
2829
metadataBase: new URL("https://world-model-gym.vercel.app"),
@@ -61,11 +62,11 @@ export const metadata: Metadata = {
6162

6263
export default function RootLayout({ children }: { children: React.ReactNode }) {
6364
return (
64-
<html lang="en" className={`${josefinSans.variable} ${yesevaOne.variable} ${plexMono.variable}`}>
65-
<body className="font-[var(--font-sans)] text-[var(--ink)]">
65+
<html lang="en" className={`${cmuSerif.variable} ${plexMono.variable}`}>
66+
<body className="text-[var(--ink)]">
6667
<Providers>
6768
<Nav />
68-
<main className="site-shell pt-8">{children}</main>
69+
<main className="site-shell pt-[108px] md:pt-[124px]">{children}</main>
6970
<SiteFooter />
7071
</Providers>
7172
</body>

web/components/nav.tsx

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,60 @@ export function Nav() {
1414
const pathname = usePathname();
1515

1616
return (
17-
<header className="site-shell sticky top-0 z-30 border-b border-[rgba(185,174,195,0.42)] bg-[rgba(250,247,252,0.9)] py-5 backdrop-blur">
18-
<div className="grid items-center gap-5 md:grid-cols-[auto_1fr_auto]">
19-
<div className="flex items-center gap-3">
20-
<div className="flex h-11 w-11 items-center justify-center rounded-[14px] border border-[rgba(29,26,36,0.12)] bg-[var(--ink)] font-[var(--font-serif)] text-lg font-semibold text-white">
17+
<header className="fixed inset-x-0 top-0 z-40 bg-[rgba(254,247,255,0.96)] font-[var(--font-mono)]">
18+
<div className="mx-auto flex min-h-[78px] max-w-[1320px] items-center justify-between gap-8 px-6 py-4 md:px-10 xl:px-12">
19+
<Link href="/" className="flex shrink-0 items-center gap-4">
20+
<div className="flex h-10 w-10 items-center justify-center rounded-[8px] bg-[var(--ink)] text-[1.35rem] font-semibold text-white">
2121
W
2222
</div>
23-
<div>
24-
<p className="text-sm font-semibold leading-none text-[var(--ink)]">
25-
WorldModel <span className="brand-accent">Gym</span>
23+
<div className="leading-none">
24+
<p className="text-[0.95rem] font-medium tracking-[-0.03em] text-[var(--ink)]">
25+
WorldModel Gym
2626
</p>
27-
<p className="mt-1 text-[10px] font-semibold uppercase tracking-[0.22em] text-[var(--muted)]">
27+
<p className="mt-1 text-[0.62rem] uppercase tracking-[0.28em] text-[var(--muted)]">
2828
Research Benchmark Platform
2929
</p>
3030
</div>
31-
</div>
31+
</Link>
3232

33-
<nav className="hidden items-center justify-center gap-8 text-sm font-medium text-[var(--muted)] md:flex">
33+
<nav className="hidden flex-1 items-center justify-center gap-7 text-sm text-[var(--ink)] lg:flex xl:gap-10">
3434
{links.map((link) => (
3535
<Link
3636
key={link.href}
3737
href={link.href}
38-
className={`editorial-link ${pathname === link.href ? "text-[var(--ink)] !decoration-[rgba(29,26,36,0.55)]" : ""}`}
38+
className={`nav-link ${pathname === link.href ? "is-active" : ""}`}
3939
>
4040
{link.label}
4141
</Link>
4242
))}
43+
</nav>
44+
45+
<div className="flex items-center justify-end gap-4">
46+
<a
47+
href="https://github.com/biru-codeastromer/WorldModel-Gym"
48+
target="_blank"
49+
rel="noreferrer"
50+
className="nav-link hidden lg:inline-flex"
51+
>
52+
GitHub
53+
</a>
4354
<Link
4455
href="/upload"
45-
className="button-primary px-5 py-3 text-sm font-semibold"
56+
className="button-primary px-5 py-2.5 text-sm font-medium"
4657
>
4758
Get Started
4859
</Link>
4960
<a
5061
href="https://github.com/biru-codeastromer/WorldModel-Gym"
5162
target="_blank"
5263
rel="noreferrer"
53-
className="button-secondary px-4 py-3 text-sm font-semibold"
64+
className="nav-link inline-flex lg:hidden"
5465
>
5566
GitHub
5667
</a>
57-
</nav>
58-
59-
<div className="flex items-center justify-end gap-3">
60-
<Link
61-
href="/upload"
62-
className="button-primary px-4 py-3 text-sm font-semibold md:hidden"
63-
>
64-
Start
65-
</Link>
6668
</div>
6769
</div>
70+
<div className="pointer-events-none absolute inset-x-0 top-full h-6 bg-gradient-to-b from-[rgba(254,247,255,0.92)] to-transparent" />
6871
</header>
6972
);
7073
}

0 commit comments

Comments
 (0)