|
1 | 1 | *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } |
2 | 2 |
|
3 | 3 | :root { |
4 | | - --bg: #0a0a0a; |
5 | | - --bg-code: #141414; |
6 | | - --border: #222; |
7 | | - --text: #e5e5e5; |
8 | | - --text-dim: #888; |
9 | | - --text-heading: #fff; |
10 | | - --accent: #a5b4fc; |
11 | | - --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; |
12 | | - --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace; |
13 | | -} |
14 | | - |
15 | | -html { font-size: 16px; scroll-behavior: smooth; } |
| 4 | + --bg: #fbfbfa; |
| 5 | + --paper: #ffffff; |
| 6 | + --ink: #17171a; |
| 7 | + --ink-2: #2b2b30; |
| 8 | + --mute: #6b6b73; |
| 9 | + --mute-2: #a0a0a8; |
| 10 | + --line: #e9e8e4; |
| 11 | + --line-2: #f1f0ec; |
| 12 | + --accent: #2a5fb0; |
| 13 | + --accent-bg: #eef3fb; |
| 14 | + --code-bg: #f5f4f0; |
| 15 | + --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; |
| 16 | + --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; |
| 17 | +} |
| 18 | + |
| 19 | +html { scroll-behavior: smooth; } |
16 | 20 |
|
17 | 21 | body { |
18 | | - font-family: var(--font); |
19 | 22 | background: var(--bg); |
20 | | - color: var(--text); |
21 | | - line-height: 1.7; |
| 23 | + color: var(--ink-2); |
| 24 | + font-family: var(--font); |
| 25 | + font-size: 15px; |
| 26 | + line-height: 1.6; |
22 | 27 | -webkit-font-smoothing: antialiased; |
| 28 | + -moz-osx-font-smoothing: grayscale; |
23 | 29 | } |
24 | 30 |
|
25 | | -.container { |
26 | | - max-width: 720px; |
| 31 | +.shell { |
| 32 | + max-width: 1100px; |
27 | 33 | margin: 0 auto; |
28 | | - padding: 4rem 1.5rem 6rem; |
| 34 | + display: grid; |
| 35 | + grid-template-columns: 220px 1fr; |
| 36 | + gap: 64px; |
| 37 | + padding: 56px 32px 120px; |
| 38 | +} |
| 39 | + |
| 40 | +aside.toc { |
| 41 | + position: sticky; |
| 42 | + top: 40px; |
| 43 | + align-self: start; |
| 44 | + font-size: 13.5px; |
| 45 | + color: var(--mute); |
| 46 | +} |
| 47 | +.toc-group { margin-bottom: 22px; } |
| 48 | +.toc-group h5 { |
| 49 | + font-size: 10.5px; |
| 50 | + letter-spacing: 0.12em; |
| 51 | + text-transform: uppercase; |
| 52 | + color: var(--mute-2); |
| 53 | + margin: 0 0 10px; |
| 54 | + font-weight: 600; |
29 | 55 | } |
| 56 | +.toc a { |
| 57 | + display: block; |
| 58 | + color: var(--mute); |
| 59 | + text-decoration: none; |
| 60 | + padding: 4px 0 4px 12px; |
| 61 | + border-left: 1px solid var(--line); |
| 62 | + border-bottom: none; |
| 63 | + line-height: 1.5; |
| 64 | +} |
| 65 | +.toc a:hover { color: var(--ink); border-left-color: var(--mute-2); } |
| 66 | +.toc a.active { color: var(--ink); border-left-color: var(--accent); font-weight: 500; } |
| 67 | + |
| 68 | +main { min-width: 0; max-width: 680px; } |
30 | 69 |
|
31 | 70 | h1 { |
32 | | - font-size: 2rem; |
33 | | - font-weight: 600; |
34 | | - color: var(--text-heading); |
35 | | - letter-spacing: -0.03em; |
36 | | - margin-bottom: 0.75rem; |
| 71 | + font-size: 40px; |
| 72 | + line-height: 1.1; |
| 73 | + letter-spacing: -0.025em; |
| 74 | + font-weight: 500; |
| 75 | + color: var(--ink); |
| 76 | + margin: 0 0 18px; |
| 77 | +} |
| 78 | + |
| 79 | +h1 + p { |
| 80 | + font-size: 17px; |
| 81 | + line-height: 1.55; |
| 82 | + color: var(--ink-2); |
| 83 | + max-width: 58ch; |
| 84 | + margin: 0 0 40px; |
| 85 | + padding-bottom: 40px; |
| 86 | + border-bottom: 1px solid var(--line); |
37 | 87 | } |
38 | 88 |
|
39 | 89 | h2 { |
40 | | - font-size: 1.15rem; |
| 90 | + font-size: 12.5px; |
41 | 91 | font-weight: 600; |
42 | | - color: var(--text-heading); |
43 | | - margin-top: 3rem; |
44 | | - margin-bottom: 1rem; |
45 | | - letter-spacing: -0.01em; |
| 92 | + color: var(--mute); |
| 93 | + letter-spacing: 0.14em; |
| 94 | + text-transform: uppercase; |
| 95 | + margin: 56px 0 18px; |
| 96 | + padding-bottom: 8px; |
| 97 | + border-bottom: 1px solid var(--line); |
| 98 | + scroll-margin-top: 40px; |
46 | 99 | } |
47 | 100 |
|
48 | 101 | h3 { |
49 | | - font-size: 0.95rem; |
| 102 | + font-size: 15px; |
50 | 103 | font-weight: 500; |
51 | | - color: var(--text-dim); |
52 | | - text-transform: uppercase; |
53 | | - letter-spacing: 0.05em; |
54 | | - margin-top: 2rem; |
55 | | - margin-bottom: 0.75rem; |
56 | | -} |
57 | | - |
58 | | -p { |
59 | | - margin-bottom: 1rem; |
| 104 | + color: var(--ink); |
| 105 | + letter-spacing: -0.005em; |
| 106 | + margin: 28px 0 10px; |
| 107 | + scroll-margin-top: 40px; |
60 | 108 | } |
61 | 109 |
|
62 | | -/* First paragraph after h1 — acts as tagline */ |
63 | | -h1 + p { |
64 | | - color: var(--text-dim); |
65 | | - font-size: 1.1rem; |
66 | | - line-height: 1.5; |
67 | | - margin-bottom: 2.5rem; |
68 | | -} |
| 110 | +p { margin: 0 0 16px; color: var(--ink-2); } |
69 | 111 |
|
70 | 112 | a { |
71 | 113 | color: var(--accent); |
72 | 114 | text-decoration: none; |
| 115 | + border-bottom: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); |
| 116 | + transition: border-color 120ms ease; |
73 | 117 | } |
74 | | -a:hover { text-decoration: underline; } |
| 118 | +a:hover { border-bottom-color: var(--accent); } |
75 | 119 |
|
76 | 120 | ul, ol { |
77 | | - margin-bottom: 1rem; |
| 121 | + margin: 0 0 16px; |
78 | 122 | padding-left: 0; |
79 | 123 | list-style: none; |
80 | 124 | } |
81 | 125 |
|
82 | 126 | li { |
83 | 127 | position: relative; |
84 | | - padding-left: 1.25rem; |
85 | | - margin-bottom: 0.4rem; |
| 128 | + padding-left: 20px; |
| 129 | + margin-bottom: 6px; |
| 130 | + color: var(--ink-2); |
86 | 131 | } |
87 | 132 |
|
88 | | -li::before { |
89 | | - content: '—'; |
| 133 | +ul > li::before { |
| 134 | + content: ''; |
90 | 135 | position: absolute; |
91 | | - left: 0; |
92 | | - color: var(--text-dim); |
| 136 | + left: 4px; |
| 137 | + top: 0.7em; |
| 138 | + width: 6px; |
| 139 | + height: 1px; |
| 140 | + background: var(--mute-2); |
93 | 141 | } |
94 | 142 |
|
95 | 143 | ol { counter-reset: ol-counter; } |
96 | | -ol li { counter-increment: ol-counter; } |
97 | | -ol li::before { |
98 | | - content: counter(ol-counter) '.'; |
99 | | - font-weight: 500; |
100 | | - color: var(--text-dim); |
| 144 | +ol > li { counter-increment: ol-counter; padding-left: 26px; } |
| 145 | +ol > li::before { |
| 146 | + content: counter(ol-counter); |
| 147 | + position: absolute; |
| 148 | + left: 0; |
| 149 | + top: 0; |
| 150 | + width: 18px; |
| 151 | + font-family: var(--mono); |
| 152 | + font-size: 11.5px; |
| 153 | + color: var(--accent); |
| 154 | + text-align: right; |
| 155 | + padding-top: 0.35em; |
| 156 | + letter-spacing: 0.02em; |
101 | 157 | } |
102 | 158 |
|
103 | 159 | li strong { |
104 | | - color: var(--text-heading); |
| 160 | + color: var(--ink); |
| 161 | + font-weight: 600; |
105 | 162 | } |
106 | 163 |
|
107 | 164 | code { |
108 | 165 | font-family: var(--mono); |
109 | | - font-size: 0.875rem; |
| 166 | + font-size: 0.88em; |
110 | 167 | } |
111 | 168 |
|
112 | 169 | p code, li code { |
113 | | - background: var(--bg-code); |
114 | | - border: 1px solid var(--border); |
| 170 | + background: var(--code-bg); |
| 171 | + border: 1px solid var(--line); |
115 | 172 | border-radius: 4px; |
116 | | - padding: 0.15em 0.4em; |
| 173 | + padding: 0.1em 0.4em; |
| 174 | + color: var(--ink); |
117 | 175 | } |
118 | 176 |
|
119 | 177 | pre { |
120 | | - background: var(--bg-code); |
121 | | - border: 1px solid var(--border); |
122 | | - border-radius: 8px; |
123 | | - padding: 1.25rem 1.5rem; |
| 178 | + background: var(--code-bg); |
| 179 | + border: 1px solid var(--line); |
| 180 | + border-radius: 10px; |
| 181 | + padding: 16px 18px; |
124 | 182 | overflow-x: auto; |
125 | | - margin-bottom: 1.5rem; |
| 183 | + margin: 0 0 18px; |
126 | 184 | } |
127 | 185 |
|
128 | 186 | pre code { |
129 | | - color: var(--text); |
130 | | - line-height: 1.6; |
| 187 | + font-family: var(--mono); |
| 188 | + font-size: 13px; |
| 189 | + line-height: 1.65; |
| 190 | + color: var(--ink); |
131 | 191 | background: none; |
132 | 192 | border: none; |
133 | 193 | padding: 0; |
134 | 194 | } |
135 | 195 |
|
136 | | -/* Syntax highlight classes applied by JS */ |
137 | | -.hl-comment { color: #555; } |
138 | | -.hl-command { color: var(--text); } |
139 | | -.hl-flag { color: #7dd3fc; } |
140 | | -.hl-string { color: #86efac; } |
| 196 | +.hl-comment { color: var(--mute); } |
| 197 | +.hl-command { color: var(--ink); font-weight: 500; } |
| 198 | +.hl-flag { color: var(--accent); } |
| 199 | +.hl-string { color: #2b6e5a; } |
141 | 200 |
|
142 | | -/* Horizontal rules — used as section dividers */ |
143 | 201 | hr { |
144 | 202 | border: none; |
145 | | - border-top: 1px solid var(--border); |
146 | | - margin: 3rem 0; |
| 203 | + border-top: 1px solid var(--line); |
| 204 | + margin: 48px 0; |
147 | 205 | } |
148 | 206 |
|
149 | 207 | footer { |
150 | | - margin-top: 4rem; |
151 | | - padding-top: 2rem; |
152 | | - border-top: 1px solid var(--border); |
153 | | - color: var(--text-dim); |
154 | | - font-size: 0.85rem; |
| 208 | + margin-top: 72px; |
| 209 | + padding-top: 24px; |
| 210 | + border-top: 1px solid var(--line); |
| 211 | + color: var(--mute); |
| 212 | + font-size: 13px; |
155 | 213 | display: flex; |
156 | 214 | justify-content: space-between; |
157 | 215 | align-items: center; |
158 | 216 | } |
159 | | - |
160 | | -@media (max-width: 640px) { |
161 | | - .container { padding: 2rem 1rem 4rem; } |
162 | | - h1 { font-size: 1.5rem; } |
163 | | - pre { padding: 1rem; font-size: 0.8rem; } |
164 | | - footer { flex-direction: column; gap: 0.5rem; } |
| 217 | +footer a { color: var(--mute); border-bottom: none; } |
| 218 | +footer a:hover { color: var(--ink); } |
| 219 | + |
| 220 | +@media (max-width: 880px) { |
| 221 | + .shell { |
| 222 | + grid-template-columns: 1fr; |
| 223 | + gap: 32px; |
| 224 | + padding: 32px 20px 72px; |
| 225 | + } |
| 226 | + aside.toc { display: none; } |
| 227 | + main { max-width: none; } |
| 228 | + h1 { font-size: 32px; } |
| 229 | + h1 + p { font-size: 16px; margin-bottom: 32px; padding-bottom: 32px; } |
165 | 230 | } |
0 commit comments