1 /* Base styles for all elements */
2 .prose * {
3 margin: 0;
4 padding: 0;
5 font-size: var(--font-size-m);
6 }
7
8 /* Main content container */
9 .prose {
10 margin-bottom: 8rem;
11 }
12
13 /* Post title section */
14 .prose .title {
15 margin-bottom: 2.5em;
16 }
17
18 .prose .title h1 {
19 margin: 0 0 0.25rem 0;
20 }
21
22 /* Headings (h1-h5) */
23 .prose h1,
24 .prose h2,
25 .prose h3,
26 .prose h4,
27 .prose h5 {
28 font-size: var(--font-size-m);
29 font-weight: var(--font-weight-bold);
30 line-height: 1.75;
31 margin: 3.25em 0 1em 0;
32 }
33
34 /* Bold text */
35 .prose strong,
36 .prose b {
37 font-weight: var(--font-weight-bold);
38 }
39
40 /* Italic text */
41 .prose em {
42 font-family: var(--font-serif);
43 font-style: italic;
44 letter-spacing: 0;
45 }
46
47 /* Links */
48 .prose a {
49 color: var(--accent);
50 text-decoration: underline;
51 text-decoration-color: var(--text-tertiary);
52 transition: text-decoration-color 0.2s ease-out;
53 }
54
55 .prose a:hover {
56 color: var(--accent);
57 text-decoration-color: var(--accent);
58 }
59
60 /* Paragraphs */
61 .prose p {
62 line-height: 1.75;
63 margin-bottom: 1.25em;
64 }
65
66 /* Tables */
67 .prose table {
68 table-layout: fixed;
69 width: 100%;
70 border-collapse: separate;
71 border-spacing: 0;
72 margin: 1.25em 0;
73 font-size: var(--font-size-m);
74 border: 1px solid var(--border);
75 border-radius: 8px;
76 overflow: hidden;
77 }
78
79 /* Table cells */
80 .prose th,
81 .prose td {
82 border: none;
83 border-right: 1px solid var(--border);
84 border-bottom: 1px solid var(--border);
85 padding: 0.5em 1em;
86 text-align: left;
87 }
88
89 .prose th:last-child,
90 .prose td:last-child {
91 border-right: none;
92 }
93
94 .prose tr:last-child td {
95 border-bottom: none;
96 }
97
98 .prose th {
99 background: var(--astro-code-background);
100 font-weight: var(--font-weight-bold);
101 }
102
103 /* Images */
104 .prose img {
105 max-width: 100%;
106 height: auto;
107 display: block;
108 margin: 1.25em 0;
109 }
110
111 .prose figure {
112 margin-bottom: 1.25em;
113 text-align: center;
114 }
115
116 .prose figure img {
117 margin-bottom: 0.75em;
118 }
119
120 .prose figure figcaption {
121 color: var(--text-secondary);
122 font-size: var(--font-size-s);
123 text-align: center;
124 }
125
126 .prose p > img {
127 position: relative;
128 margin-bottom: 1.25em;
129 }
130
131 .prose p > img::after {
132 content: attr(alt);
133 display: block;
134 position: absolute;
135 left: 0;
136 width: 100%;
137 text-align: center;
138 color: var(--text-secondary);
139 font-size: var(--font-size-s);
140 margin-top: 0.75em;
141 }
142
143 .prose .img-caption {
144 display: block;
145 text-align: center;
146 color: var(--text-secondary);
147 font-size: var(--font-size-s);
148 margin-bottom: 1.25em;
149 }
150
151 /* Inline code */
152 .prose code {
153 padding: 3px 4px;
154 border-radius: 5px;
155 background-color: var(--code-bg);
156 font-family: var(--font-mono);
157 font-size: 0.9em;
158 font-feature-settings:
159 'liga' 0,
160 'calt' 0;
161 -webkit-font-feature-settings:
162 'liga' 0,
163 'calt' 0;
164 }
165
166 /* Blockquotes */
167 .prose blockquote {
168 border-left: 1.5px solid var(--border);
169 margin: 0 0 1.25em 0;
170 padding: 0 0 0 1.25em;
171 text-align: left;
172 }
173
174 .prose blockquote p {
175 margin: 0;
176 }
177
178 .prose blockquote cite {
179 display: inline-block;
180 margin-top: 0.5em;
181 }
182
183 /* Unordered lists */
184 .prose ul {
185 list-style-type: none;
186 padding-left: 0;
187 margin-left: 1rem;
188 margin-bottom: 1.25em;
189 line-height: 1.75;
190 }
191
192 .prose ul ul {
193 margin-left: 0.75rem;
194 margin-top: 0.5em;
195 margin-bottom: 0.5em;
196 }
197
198 .prose ul li {
199 position: relative;
200 padding-left: 0.25rem;
201 margin-bottom: 0.5em;
202 }
203
204 .prose ul li:last-child {
205 margin-bottom: 0;
206 }
207
208 .prose ul li > ul {
209 margin-top: 0.5em;
210 margin-bottom: 0.5em;
211 }
212
213 .prose ul li::before {
214 content: '•';
215 position: absolute;
216 left: -1.375rem;
217 top: -0.05em;
218 width: 1.5rem;
219 text-align: center;
220 color: var(--text-tertiary);
221 }
222
223 /* Ordered lists */
224 .prose ol {
225 list-style-position: outside;
226 padding-left: 0;
227 margin-left: 1.25rem;
228 margin-bottom: 1.25em;
229 counter-reset: item;
230 }
231
232 .prose ol li {
233 display: block;
234 position: relative;
235 margin-bottom: 0.5em;
236 }
237
238 .prose ol li:last-child {
239 margin-bottom: 0;
240 }
241
242 .prose ol li::before {
243 content: counter(item) '.';
244 counter-increment: item;
245 position: absolute;
246 left: -1.15rem;
247 width: 1.5rem;
248 text-align: left;
249 color: var(--text-secondary);
250 font-variant-numeric: tabular-nums;
251 font-feature-settings:
252 'tnum' 1,
253 'zero' 0,
254 'cv01' 1,
255 'cv02' 1,
256 'calt' 1,
257 'ss03' 1,
258 'liga' 1,
259 'ordn' 1;
260 }
261
262 /* Task lists */
263 .prose ul.contains-task-list {
264 list-style: none;
265 margin-left: 0;
266 white-space: nowrap;
267 }
268
269 .prose ul.contains-task-list li::before {
270 content: none;
271 }
272
273 .prose ul.contains-task-list li.task-list-item {
274 padding-left: 0.125em;
275 margin-bottom: 0.5em;
276 }
277
278 .prose ul.contains-task-list li.task-list-item:last-child {
279 margin-bottom: 0;
280 }
281
282 /* Task list checkboxes */
283 .prose ul.contains-task-list li.task-list-item input[type='checkbox'] {
284 margin-right: 0.375em;
285 position: relative;
286 top: 0.175em;
287 width: 1em;
288 height: 1em;
289 border: 1.35px solid var(--text-tertiary);
290 border-radius: 4px;
291 background: transparent;
292 appearance: none;
293 -webkit-appearance: none;
294 }
295
296 .prose ul.contains-task-list li.task-list-item input[type='checkbox']:checked {
297 position: relative;
298 background: var(--code-bg);
299 border: 1.35px solid var(--text-tertiary);
300 opacity: 0.75;
301 }
302
303 .prose ul.contains-task-list li.task-list-item input[type='checkbox']:checked::before {
304 content: '✓';
305 font-family: var(--font-sans);
306 color: var(--text-primary);
307 opacity: 0.75;
308 font-weight: var(--font-weight-bold);
309 position: absolute;
310 left: 0.15em;
311 top: 0.05em;
312 font-size: 0.75em;
313 line-height: 1;
314 }
315
316 .prose ul.contains-task-list li.task-list-item input[type='checkbox'] + * {
317 display: inline;
318 margin-left: 0;
319 line-height: 1.75;
320 white-space: nowrap;
321 }
322
323 /* .prose ul.contains-task-list li.task-list-item:has(input[type='checkbox']:checked) {
324 text-decoration: line-through;
325 } */
326
327 /* Subscript and superscript */
328 .prose sup,
329 .prose sub,
330 .prose sup a {
331 margin: 0 0.125em;
332 font-size: 0.875em;
333 line-height: 1;
334 }
335
336 /* Horizontal rule */
337 .prose hr {
338 margin: 2.5em 0;
339 height: auto;
340 border: none;
341 background: none;
342 text-align: center;
343 position: relative;
344 }
345
346 .prose hr::before {
347 content: '***';
348 font-family: var(--font-mono);
349 color: var(--text-tertiary);
350 font-size: 0.875em;
351 letter-spacing: 0.25em;
352 }
353
354 /* Keyboard input */
355 .prose kbd {
356 font-family: var(--font-mono);
357 font-size: var(--font-size-s);
358 border: 1px solid var(--text-tertiary);
359 padding: 1px 4px;
360 border-radius: 5px;
361 min-width: 1.75em;
362 display: inline-block;
363 text-align: center;
364 /* box-shadow: inset 0 -2.5px 0 var(--border); */
365 }
366
367 /* Highlighted text */
368 .prose mark {
369 background-color: var(--mark);
370 color: var(--text-primary);
371 padding: 3px 1px;
372 }
373
374 /* Footnotes */
375 .prose .footnotes {
376 margin-top: 4rem;
377 padding-top: 1.75rem;
378 position: relative;
379 }
380
381 .prose .footnotes::before {
382 content: '';
383 position: absolute;
384 top: 0;
385 left: 0;
386 width: 4rem;
387 height: 1px;
388 background-color: var(--border);
389 }
390
391 .prose cite {
392 font-style: normal;
393 }
394
395 /* Footnote references */
396 .prose [data-footnote-backref] {
397 position: relative;
398 font-family: var(--font-mono);
399 font-size: var(--font-size-l);
400 top: -0.05em;
401 }
402
403 .prose [data-footnote-ref] {
404 font-size: 1em;
405 font-variant-numeric: tabular-nums;
406 font-feature-settings:
407 'tnum' 1,
408 'zero' 0,
409 'cv01' 1,
410 'cv02' 1,
411 'calt' 1,
412 'ss03' 1,
413 'liga' 1,
414 'ordn' 1;
415 }
416
417 .prose [data-footnote-ref],
418 .prose [data-footnote-backref] {
419 color: var(--text-secondary);
420 text-decoration: none;
421 transition: color 0.2s ease-out;
422 padding-right: 0.5em;
423 }
424
425 .prose [data-footnote-ref]:hover,
426 .prose [data-footnote-backref]:hover {
427 color: var(--text-primary);
428 }
429
430 /* Code blocks */
431 .prose pre {
432 background-color: var(--astro-code-background);
433 border-radius: 8px;
434 padding: 1.25em 1.5em;
435 margin: 1.25em 0;
436 overflow-x: auto;
437 }
438
439 @media (max-width: 768px) {
440 .prose pre {
441 padding: 1em 1.25em;
442 }
443 }
444
445 .prose pre > code {
446 font-family: var(--font-mono);
447 font-feature-settings:
448 'liga' 0,
449 'calt' 0;
450 display: block;
451 white-space: pre-wrap;
452 word-break: break-word;
453 overflow-wrap: anywhere;
454 padding: 0;
455 margin: 0;
456 background: none;
457 border: none;
458 line-height: 1.5;
459 border-radius: 0;
460 }
461
462 .prose pre > code * {
463 font-size: var(--font-size-s);
464 }
465
466 /* KaTeX Math Rendering */
467
468 /* Hide MathML fallback to prevent duplication */
469 .katex-mathml {
470 display: none !important;
471 }
472
473 /* Ensure display math is centered */
474 .katex-display {
475 text-align: center;
476 margin: 1.5em 0;
477 }
478
479 /* Reset any conflicting styles that might interfere with KaTeX */
480 .katex * {
481 box-sizing: content-box;
482 }
483
484 /* Ensure KaTeX elements inherit color properly */
485 .katex,
486 .katex * {
487 color: inherit;
488 }
489
490 /* Specific fixes for common CSS framework conflicts */
491 .katex .base,
492 .katex .strut,
493 .katex .mathit,
494 .katex .mathrm,
495 .katex .mathbf,
496 .katex .mathsf,
497 .katex .mathtt {
498 line-height: initial;
499 vertical-align: baseline;
500 }
501
502 /* Dark mode support */
503 @media (prefers-color-scheme: dark) {
504 .katex,
505 .katex * {
506 color: inherit;
507 }
508 }
509
510 /* Reading Time */
511 .reading-time {
512 color: var(--text-secondary);
513 letter-spacing: -0.025em;
514 }
515
516 .reading-time .separator {
517 margin: 0 0.25em;
518 }
519
520 /* Video */
521 .prose iframe {
522 width: 100%;
523 aspect-ratio: 16/9;
524 border: none;
525 border-radius: 6px;
526 margin: 0.25em 0 0 0;
527 }
528
529 /* Spotify */
530 .prose iframe[src*='spotify.com'] {
531 aspect-ratio: auto;
532 }