~cytrogen/blog-public

blog-public/css/base.css -rw-r--r-- 10.4 KiB
88eebf3dCytrogen Deploy 2026-02-19 08:34:27 3 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
@charset "UTF-8";
:root {
  --color-primary: #5454f8;
  --color-secondary: #267B54;
  --color-accent: #4088b8;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --text-primary: #2c3e50; /* Main text - WCAG AA compliant on white */
  --text-secondary: #64748b; /* Supporting text - improved contrast */
  --text-tertiary: #94a3b8; /* Muted text */
  --text-inverse: #ffffff; /* Text on dark backgrounds */
  --surface-background: #ffffff;
  --surface-elevated: #f8fafc; /* Cards, dropdowns */
  --surface-overlay: #f1f5f9; /* Modals, overlays */
  --surface-interactive: #e2e8f0; /* Hover states */
  --border-primary: #e2e8f0; /* Main borders */
  --border-secondary: #cbd5e1; /* Subtle borders */
  --border-interactive: var(--color-primary); /* Focus, active borders */
  --code-background: #f8fafc;
  --code-text: #475569;
  --code-keyword: #e96900; /* Light theme uses orange */
  --code-string: #22c55e;
  --code-number: #8b5cf6;
  --code-comment: #94a3b8;
  --color-primary-hover: color-mix(in srgb, var(--color-primary) 85%, black);
  --color-secondary-hover: color-mix(in srgb, var(--color-secondary) 85%, black);
  --surface-interactive-hover: color-mix(in srgb, var(--surface-interactive) 80%, var(--color-primary));
  --font-size-body: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); /* ~18px to 22px */
  --spacing-paragraph: clamp(1rem, 0.8rem + 0.4vw, 1.5rem); /* 1rem to 1.5rem */
  --font-size-h1: clamp(2.25rem, 1.75rem + 2.8vw, 3.5rem); /* ~36px to 56px */
  --font-size-h2-h3: clamp(1.5rem, 1.3rem + 1vw, 2.125rem); /* ~24px to 34px */
  --font-size-h4-h6: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem); /* ~20px to 26px */
  --font-size-nav: clamp(1rem, 0.95rem + 0.15vw, 1.125rem); /* ~16px to 18px */
  --font-size-small: clamp(0.875rem, 0.8rem + 0.3vw, 1rem); /* ~14px to 16px */
  --font-size-code: clamp(1rem, 0.95rem + 0.4vw, 1.25rem); /* Increased to match body text better */
}

[data-theme=dark] {
  --color-primary: #818cf8; /* Higher contrast on dark */
  --color-secondary: #34d399;
  --color-accent: #60a5fa;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #f87171;
  --text-primary: #f1f5f9; /* 15.3:1 contrast ratio */
  --text-secondary: #cbd5e1; /* 10.4:1 contrast ratio */
  --text-tertiary: #94a3b8; /* 6.1:1 contrast ratio */
  --text-inverse: #0f172a;
  --surface-background: #0f172a; /* Dark navy for better contrast */
  --surface-elevated: #1e293b; /* Elevated surfaces */
  --surface-overlay: #334155; /* Overlays and modals */
  --surface-interactive: #475569; /* Interactive elements */
  --border-primary: #334155; /* Visible borders */
  --border-secondary: #1e293b; /* Subtle separators */
  --code-background: #1e293b;
  --code-text: #e2e8f0;
  --code-keyword: #60a5fa;
  --code-string: #34d399;
  --code-number: #a78bfa;
  --code-comment: #64748b;
  --color-primary-hover: color-mix(in srgb, var(--color-primary) 80%, white);
  --color-secondary-hover: color-mix(in srgb, var(--color-secondary) 80%, white);
  --surface-interactive-hover: color-mix(in srgb, var(--surface-interactive) 70%, var(--color-primary));
}

::-moz-selection {
  color: var(--surface-background);
  background-color: var(--color-primary);
}

::selection {
  color: var(--surface-background);
  background-color: var(--color-primary);
}

::-moz-selection {
  color: var(--surface-background);
  background-color: var(--color-primary);
}

html {
  font-family: "Georgia", "Times New Roman", "Times", "Source Han Serif CN", "Source Han Serif JP", "Noto Serif SC", "Source Han Serif SC", "Noto Serif JP", "Songti SC", "SimSun", serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html, html body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-size-body);
  line-height: 1.8;
  background-color: var(--surface-background);
  font-family: "Georgia", "Times New Roman", "Times", "Source Han Serif CN", "Source Han Serif JP", "Noto Serif SC", "Source Han Serif SC", "Noto Serif JP", "Songti SC", "SimSun", serif;
}

article,
aside,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section {
  display: block;
}

audio,
canvas,
progress,
video {
  display: inline-block;
  vertical-align: baseline;
}

audio:not([controls]) {
  display: none;
  height: 0;
}

[hidden],
template {
  display: none;
}

a {
  background-color: transparent;
  color: var(--color-primary);
  text-decoration: none;
}
a:active, a:hover {
  outline: 0;
}

abbr[title] {
  border-bottom: 1px dotted;
}

b,
strong {
  font-weight: bold;
}

u {
  text-decoration: underline;
  -webkit-text-decoration-style: wavy;
          text-decoration-style: wavy;
  -webkit-text-decoration-color: currentColor;
          text-decoration-color: currentColor;
  text-underline-offset: clamp(4px, 0.1em, 6px);
}

dfn {
  font-style: italic;
}

.emphasis,
.em {
  -webkit-text-emphasis: filled circle;
          text-emphasis: filled circle;
  font-weight: normal;
  line-height: inherit; /* 保持原有行高 */
  display: inline; /* 确保行内显示 */
}

.emphasis-dot {
  -webkit-text-emphasis: filled dot;
          text-emphasis: filled dot;
  -webkit-text-emphasis-color: var(--color-primary);
          text-emphasis-color: var(--color-primary);
  line-height: inherit;
  display: inline;
}

.emphasis-circle {
  -webkit-text-emphasis: filled circle;
          text-emphasis: filled circle;
  -webkit-text-emphasis-color: var(--color-primary);
          text-emphasis-color: var(--color-primary);
  line-height: inherit;
  display: inline;
}

.emphasis-triangle {
  -webkit-text-emphasis: filled triangle;
          text-emphasis: filled triangle;
  -webkit-text-emphasis-color: var(--color-primary);
          text-emphasis-color: var(--color-primary);
  line-height: inherit;
  display: inline;
}

.emphasis-sesame {
  -webkit-text-emphasis: filled sesame;
          text-emphasis: filled sesame;
  -webkit-text-emphasis-color: var(--color-primary);
          text-emphasis-color: var(--color-primary);
  line-height: inherit;
  display: inline;
}

mark {
  background: var(--color-warning);
  color: var(--text-inverse);
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

p {
  margin: var(--spacing-paragraph) 0;
}

ul,
ol {
  margin: 1rem 0;
}
ul.nav, ul.post-list,
ol.nav,
ol.post-list {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

img {
  border: 0;
  max-width: 100%;
  margin: 1rem auto;
  display: block;
}

svg:not(:root) {
  overflow: hidden;
}

figure {
  margin: 1em 40px;
}

hr {
  box-sizing: content-box;
  height: 1px;
  border: 0;
  border-top: 1px solid var(--color-border, #e1e4e8);
  margin: 1.5rem 0;
}

pre {
  overflow: auto;
  color: var(--code-text);
  font-size: var(--font-size-code);
  background-color: var(--code-background);
  font-family: "JetBrains Mono", "SF Mono", Consolas, "Liberation Mono", Menlo, "Courier New", "Source Han Sans SC", "Source Han Code JP", monospace;
}

code {
  margin: 0 2px;
  padding: 3px 5px;
  color: var(--code-keyword);
  border-radius: 2px;
  white-space: inherit;
  font-size: var(--font-size-code);
  background-color: var(--code-background);
  font-family: "JetBrains Mono", "SF Mono", Consolas, "Liberation Mono", Menlo, "Courier New", "Source Han Sans SC", "Source Han Code JP", monospace;
}

h1 code {
  font-size: 0.65em;
}

h2 code,
h3 code {
  font-size: 0.75em;
}

h4 code,
h5 code,
h6 code {
  font-size: 0.8em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Open Sans", "Open Sans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Noto Sans JP", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
}

body, p, article, section, li, dd, dt {
  font-family: "Georgia", "Times New Roman", "Times", "Source Han Serif CN", "Source Han Serif JP", "Noto Serif SC", "Source Han Serif SC", "Noto Serif JP", "Songti SC", "SimSun", serif;
}

nav, button, input, select, textarea, .nav, .button, .menu, .site-nav, .nav-link {
  font-family: "Open Sans", "Open Sans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Noto Sans JP", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
input,
optgroup,
select,
textarea {
  color: inherit;
  font: inherit;
  margin: 0;
}

button {
  overflow: visible;
  text-transform: none;
}

button,
html input[type=button],
input[type=reset],
input[type=submit] {
  -webkit-appearance: button;
  cursor: pointer;
}
button[disabled],
html input[type=button][disabled],
input[type=reset][disabled],
input[type=submit][disabled] {
  cursor: default;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

input {
  line-height: normal;
}
input[type=checkbox], input[type=radio] {
  box-sizing: border-box;
  padding: 0;
}
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button {
  height: auto;
}
input[type=search] {
  -webkit-appearance: textfield;
  box-sizing: content-box;
}
input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration {
  -webkit-appearance: none;
}

table {
  width: 100%;
  margin: 1em auto;
  border-collapse: collapse;
  border-spacing: 0;
}
table thead {
  background-color: var(--surface-interactive);
}
table thead th {
  padding: 5px;
  min-width: 20px;
}
table tbody tr:nth-child(2n) {
  background-color: var(--surface-elevated);
}
table tbody td {
  padding: 5px;
  vertical-align: text-top;
}

fieldset {
  border: 1px solid var(--border-primary);
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}

legend {
  border: 0;
  padding: 0;
}

textarea {
  overflow: auto;
}

optgroup {
  font-weight: bold;
}

.container {
  margin: 0 10px 2em;
}

.hidden {
  display: none !important;
}

/*
ruby {
  ruby-align: center;
  position: relative;
  display: inline-block;

  rt {
    font-size: 0.6em;
    color: var(--text-secondary);
    line-height: 1;
    text-align: center;
    font-weight: normal;

    // 强制设置正确的 ruby 位置
    ruby-position: over;
    -webkit-ruby-position: over;
    -moz-ruby-position: over;

    // 确保显示为 ruby 文本
    display: ruby-text;

    // 防止继承 text-emphasis 样式
    text-emphasis: none;
    text-emphasis-style: none;
  }
}
*/
img.emoji {
  width: 1em !important;
  height: 1em !important;
  vertical-align: -0.1em !important;
  margin: 0 !important;
  display: inline-block !important;
}