wop commited on
Commit
1fed7bb
·
verified ·
1 Parent(s): 73e2d74

Update style.css

Browse files
Files changed (1) hide show
  1. style.css +81 -17
style.css CHANGED
@@ -2,16 +2,19 @@
2
 
3
  :root {
4
  --bg: #0b0c0f;
5
-
6
- --text: #d6d6d6; /* main reading text */
7
- --heading: #e9e9e9; /* headings */
8
- --muted: #9aa0a6; /* secondary text */
9
 
10
  --surface: rgba(255,255,255,0.04);
11
  --surface-2: rgba(255,255,255,0.06);
12
  --border: rgba(255,255,255,0.08);
13
 
14
  --accent: #33b0d8;
 
 
 
 
15
  }
16
 
17
  /* -------------------- BASE -------------------- */
@@ -22,10 +25,25 @@
22
  box-sizing: border-box;
23
  }
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  body {
26
  background: var(--bg);
27
  color: var(--text);
28
- font-family: Inter, sans-serif;
29
  line-height: 1.75;
30
  -webkit-font-smoothing: antialiased;
31
  text-rendering: optimizeLegibility;
@@ -40,27 +58,43 @@ p {
40
  color: var(--text);
41
  }
42
 
 
 
 
 
 
 
 
43
  a {
44
  color: var(--accent);
45
  text-decoration: none;
 
46
  }
47
 
48
  a:hover {
49
  opacity: 0.85;
50
  }
51
 
 
 
 
 
 
 
 
 
 
52
  /* -------------------- BACKGROUND -------------------- */
53
 
54
  .background {
55
  position: fixed;
56
  inset: 0;
57
  z-index: -1;
58
-
59
  background:
60
  radial-gradient(circle at 20% 20%, rgba(51,176,216,0.12), transparent 35%),
61
  radial-gradient(circle at 80% 10%, rgba(120,90,255,0.08), transparent 40%),
62
  radial-gradient(circle at 50% 90%, rgba(51,176,216,0.05), transparent 45%),
63
- #0b0c0f;
64
  }
65
 
66
  /* -------------------- LAYOUT -------------------- */
@@ -76,10 +110,11 @@ a:hover {
76
  }
77
 
78
  .hero h1 {
79
- font-size: 4rem;
 
80
  font-weight: 800;
81
  letter-spacing: -0.05em;
82
-
83
  background: linear-gradient(to right, #e9e9e9, #33b0d8);
84
  -webkit-background-clip: text;
85
  -webkit-text-fill-color: transparent;
@@ -107,13 +142,19 @@ a:hover {
107
 
108
  .post-card {
109
  padding: 26px;
110
- border-radius: 18px;
111
-
112
  background: var(--surface);
113
  border: 1px solid var(--border);
114
-
115
  backdrop-filter: blur(18px);
116
  -webkit-backdrop-filter: blur(18px);
 
 
 
 
 
 
 
 
117
  }
118
 
119
  .post-card h2 {
@@ -140,9 +181,15 @@ a:hover {
140
  padding: 80px 24px;
141
  }
142
 
 
 
 
 
 
143
  .article h1 {
144
- font-size: 3rem;
145
  margin-bottom: 18px;
 
146
  }
147
 
148
  .article h2 {
@@ -174,6 +221,7 @@ blockquote {
174
  border-left: 3px solid var(--accent);
175
  color: #cfd3d7;
176
  font-size: 1.05rem;
 
177
  }
178
 
179
  /* -------------------- CODE -------------------- */
@@ -193,7 +241,6 @@ code {
193
  color: #cfd3d7;
194
  }
195
 
196
- /* inline code */
197
  p code {
198
  background: rgba(255,255,255,0.06);
199
  padding: 2px 6px;
@@ -208,6 +255,8 @@ table {
208
  border-collapse: collapse;
209
  margin: 24px 0;
210
  font-size: 0.95rem;
 
 
211
  }
212
 
213
  th, td {
@@ -230,12 +279,27 @@ tr:hover {
230
  background: rgba(255,255,255,0.03);
231
  }
232
 
233
- /* -------------------- SMALL UX -------------------- */
234
 
235
  ::selection {
236
  background: rgba(51,176,216,0.25);
237
  }
238
 
239
- html {
240
- scroll-behavior: smooth;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  }
 
2
 
3
  :root {
4
  --bg: #0b0c0f;
5
+ --text: #d6d6d6;
6
+ --heading: #e9e9e9;
7
+ --muted: #9aa0a6;
 
8
 
9
  --surface: rgba(255,255,255,0.04);
10
  --surface-2: rgba(255,255,255,0.06);
11
  --border: rgba(255,255,255,0.08);
12
 
13
  --accent: #33b0d8;
14
+
15
+ /* NEW: Standardize transitions and radius */
16
+ --transition: 0.2s ease;
17
+ --radius: 18px;
18
  }
19
 
20
  /* -------------------- BASE -------------------- */
 
25
  box-sizing: border-box;
26
  }
27
 
28
+ html {
29
+ /* IMPROVED: Wrapped in media query for accessibility */
30
+ scroll-behavior: smooth;
31
+ }
32
+
33
+ @media (prefers-reduced-motion: reduce) {
34
+ html {
35
+ scroll-behavior: auto;
36
+ }
37
+ * {
38
+ transition: none !important;
39
+ animation: none !important;
40
+ }
41
+ }
42
+
43
  body {
44
  background: var(--bg);
45
  color: var(--text);
46
+ font-family: Inter, system-ui, sans-serif; /* IMPROVED: added system-ui fallback */
47
  line-height: 1.75;
48
  -webkit-font-smoothing: antialiased;
49
  text-rendering: optimizeLegibility;
 
58
  color: var(--text);
59
  }
60
 
61
+ /* NEW: Global image constraint to prevent layout breakage */
62
+ img {
63
+ max-width: 100%;
64
+ height: auto;
65
+ border-radius: var(--radius);
66
+ }
67
+
68
  a {
69
  color: var(--accent);
70
  text-decoration: none;
71
+ transition: opacity var(--transition);
72
  }
73
 
74
  a:hover {
75
  opacity: 0.85;
76
  }
77
 
78
+ /* NEW: Accessibility focus states for keyboard users */
79
+ a:focus-visible,
80
+ .post-card a:focus-visible {
81
+ outline: 2px solid var(--accent);
82
+ outline-offset: 4px;
83
+ border-radius: 4px;
84
+ opacity: 1;
85
+ }
86
+
87
  /* -------------------- BACKGROUND -------------------- */
88
 
89
  .background {
90
  position: fixed;
91
  inset: 0;
92
  z-index: -1;
 
93
  background:
94
  radial-gradient(circle at 20% 20%, rgba(51,176,216,0.12), transparent 35%),
95
  radial-gradient(circle at 80% 10%, rgba(120,90,255,0.08), transparent 40%),
96
  radial-gradient(circle at 50% 90%, rgba(51,176,216,0.05), transparent 45%),
97
+ var(--bg); /* IMPROVED: Use variable instead of hardcoded hex */
98
  }
99
 
100
  /* -------------------- LAYOUT -------------------- */
 
110
  }
111
 
112
  .hero h1 {
113
+ /* IMPROVED: Fluid typography for responsiveness */
114
+ font-size: clamp(2.5rem, 8vw, 4rem);
115
  font-weight: 800;
116
  letter-spacing: -0.05em;
117
+ line-height: 1.1; /* IMPROVED: tighter line height for large headings */
118
  background: linear-gradient(to right, #e9e9e9, #33b0d8);
119
  -webkit-background-clip: text;
120
  -webkit-text-fill-color: transparent;
 
142
 
143
  .post-card {
144
  padding: 26px;
145
+ border-radius: var(--radius);
 
146
  background: var(--surface);
147
  border: 1px solid var(--border);
 
148
  backdrop-filter: blur(18px);
149
  -webkit-backdrop-filter: blur(18px);
150
+
151
+ /* NEW: Subtle interaction polish */
152
+ transition: transform var(--transition), border-color var(--transition);
153
+ }
154
+
155
+ .post-card:hover {
156
+ transform: translateY(-3px);
157
+ border-color: rgba(51, 176, 216, 0.3); /* Tint border with accent on hover */
158
  }
159
 
160
  .post-card h2 {
 
181
  padding: 80px 24px;
182
  }
183
 
184
+ /* NEW: Prevent long words/URLs from breaking the layout */
185
+ .article p, .article h1, .article h2 {
186
+ overflow-wrap: break-word;
187
+ }
188
+
189
  .article h1 {
190
+ font-size: clamp(2rem, 6vw, 3rem); /* IMPROVED: Fluid typography */
191
  margin-bottom: 18px;
192
+ line-height: 1.2;
193
  }
194
 
195
  .article h2 {
 
221
  border-left: 3px solid var(--accent);
222
  color: #cfd3d7;
223
  font-size: 1.05rem;
224
+ font-style: italic; /* NEW: helps distinguish visually */
225
  }
226
 
227
  /* -------------------- CODE -------------------- */
 
241
  color: #cfd3d7;
242
  }
243
 
 
244
  p code {
245
  background: rgba(255,255,255,0.06);
246
  padding: 2px 6px;
 
255
  border-collapse: collapse;
256
  margin: 24px 0;
257
  font-size: 0.95rem;
258
+ display: block; /* NEW: allows horizontal scrolling on mobile */
259
+ overflow-x: auto;
260
  }
261
 
262
  th, td {
 
279
  background: rgba(255,255,255,0.03);
280
  }
281
 
282
+ /* -------------------- SMALL UX & SCROLLBARS -------------------- */
283
 
284
  ::selection {
285
  background: rgba(51,176,216,0.25);
286
  }
287
 
288
+ /* NEW: Custom Scrollbar for dark mode polish */
289
+ ::-webkit-scrollbar {
290
+ width: 10px;
291
+ height: 10px;
292
+ }
293
+
294
+ ::-webkit-scrollbar-track {
295
+ background: var(--bg);
296
+ }
297
+
298
+ ::-webkit-scrollbar-thumb {
299
+ background: rgba(255,255,255,0.1);
300
+ border-radius: 5px;
301
+ }
302
+
303
+ ::-webkit-scrollbar-thumb:hover {
304
+ background: rgba(255,255,255,0.2);
305
  }