-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
428 lines (387 loc) · 11.9 KB
/
style.css
File metadata and controls
428 lines (387 loc) · 11.9 KB
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
/* =============================================================================
KOKIRI COLORSCHEME THEME
-------------------------------------------------------------------------
WHAT: CSS custom properties for Kokiri brand colors across light/dark modes
WHY: Centralized color management ensures consistency with HYPERfix.nvim
HOW: CSS variables defined in :root and [data-theme="light"] selectors
============================================================================= */
:root {
/* Dark theme (Kokiri primary) */
--bg-color: #071524;
--text-color: #a2faa2;
--card-bg: #122030;
--header-bg: #2f3e4f;
--header-text: #a1ceff;
--accent: #a8c5ff;
--accent-hover: #93e5ff;
--secondary: #e8bfff;
--secondary-hover: #ffbca1;
--logo-color: #a8c5ff;
--footer-bg: #2f3e4f;
--footer-text: #a1ceff;
--comment-color: #5cb25e;
--constant-color: #e8bfff;
--string-color: #c5f19c;
--keyword-color: #a2faa2;
--special-color: #7ffbdd;
}
/* Light theme (Kokiri inverted for readability) */
[data-theme="light"] {
--bg-color: #f0f1f5;
--text-color: #122030;
--card-bg: #f7f8fb;
--header-bg: #e8ecf5;
--header-text: #122030;
--accent: #5a7eb5;
--accent-hover: #4a6a9f;
--secondary: #9a6df0;
--secondary-hover: #ffbca1;
--logo-color: #5a7eb5;
--footer-bg: #e8ecf5;
--footer-text: #122030;
--comment-color: #5cb25e;
--constant-color: #9a6df0;
--string-color: #2d6938;
--keyword-color: #2d6938;
--special-color: #0f8ea0;
}
/* =============================================================================
GLOBAL STYLES & BOX SIZING
-------------------------------------------------------------------------
WHAT: Base document styles, typography, and responsive box model
WHY: Establish consistent baseline and prevent layout overflow on mobile
HOW: box-sizing: border-box on all elements; body color/transition vars
============================================================================= */
* {
box-sizing: border-box;
}
body {
background: var(--bg-color);
color: var(--text-color);
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
transition:
background 0.5s ease,
color 0.5s ease;
}
/* =============================================================================
HEADER & NAVIGATION
-------------------------------------------------------------------------
WHAT: Top-level header with theme toggle, banner, name, tagline, buttons
WHY: Introduction section with quick-access navigation and branding
HOW: Flex layout for buttons; absolute positioning for theme toggle
============================================================================= */
header {
background: var(--header-bg);
color: var(--header-text);
padding: 1.5rem;
text-align: center;
position: relative;
}
h1,
h2 {
margin-top: 0;
color: var(--text-color);
}
h2 {
border-bottom: 2px solid var(--accent);
padding-bottom: 0.3rem;
}
#banner-img,
.banner {
display: block;
margin: 0 auto;
max-width: 1000px;
width: 100%;
height: auto;
}
/* =============================================================================
THEME TOGGLE BUTTON
-------------------------------------------------------------------------
WHAT: Fixed circular button for light/dark mode switching (top-right)
WHY: Quick-access theme switcher without disrupting layout flow
HOW: position: absolute; border matches accent; hover inverts colors
============================================================================= */
#theme-toggle {
position: absolute;
top: 1rem;
right: 1rem;
padding: 0.4rem 0.6rem;
border: 2px solid var(--accent);
border-radius: 50%;
cursor: pointer;
font-size: 1.2rem;
background: var(--card-bg);
color: var(--accent);
transition:
background 0.5s ease,
transform 0.5s ease,
color 0.5s ease;
}
#theme-toggle:hover {
background: var(--accent);
color: var(--bg-color);
transform: scale(1.1);
}
/* =============================================================================
BUTTONS & NAVIGATION
-------------------------------------------------------------------------
WHAT: Flex layout for horizontally-aligned button groups (badges, links)
WHY: Reusable container for navigation and action buttons
HOW: Flex with gap; .card variant left-aligns for card context
============================================================================= */
.buttons {
margin-top: 1rem;
display: flex;
gap: 0.25rem;
flex-wrap: wrap;
justify-content: center;
}
.buttons.card {
justify-content: left;
}
/* =============================================================================
MAIN CONTENT CARDS
-------------------------------------------------------------------------
WHAT: Project/content card containers with background, shadow, padding
WHY: Visual separation and grouping of content sections
HOW: Fixed max-width 900px, centered with margin auto, smooth transitions
============================================================================= */
.project-card {
background: var(--card-bg);
color: var(--text-color);
border-radius: 10px;
padding: 1.5rem;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
margin: 2rem auto;
max-width: 900px;
transition:
background 0.5s ease,
color 0.5s ease;
}
.project-card.sub {
background: var(--header-bg);
}
/* Semantic class for featured/spotlight project (inherits project-card style) */
.project-card.spotlight {
/* NOTE: No additional styles; uses base .project-card styling */
}
.project-card ul {
margin-top: 0.5rem;
}
/* =============================================================================
CODE & TYPOGRAPHY
-------------------------------------------------------------------------
WHAT: Styling for code blocks, pre blocks, and semantic text elements
WHY: Visual distinction for technical content and code examples
HOW: monospace font, accent color borders, background contrast
============================================================================= */
pre {
display: inline-block;
overflow-x: auto;
background: var(--header-bg);
border-left: 3px solid var(--accent);
padding: 0.5rem 1rem;
border-radius: 4px;
}
code {
background: var(--header-bg);
color: var(--string-color);
padding: 0.2rem 0.4rem;
border-radius: 3px;
}
.ascii-logo {
font-family: "Courier New", monospace;
font-size: 12px;
line-height: 1.1;
white-space: pre;
color: var(--logo-color);
text-align: center;
margin: 1rem 0;
display: block;
}
/* =============================================================================
SEMANTIC COLOR CLASSES
-------------------------------------------------------------------------
WHAT: Utility classes for syntax-highlighting and content semantics
WHY: Reusable styling aligned with Kokiri code highlighting palette
HOW: Apply color variables to .comment, .string, .keyword, etc.
============================================================================= */
.comment {
color: var(--comment-color);
}
.string {
color: var(--string-color);
}
.keyword {
color: var(--keyword-color);
font-weight: bold;
}
.constant {
color: var(--constant-color);
}
.special {
color: var(--special-color);
}
/* =============================================================================
IMAGE CONTAINERS
-------------------------------------------------------------------------
WHAT: Styling for preview containers and images within project cards
WHY: Flexible image layout with consistent borders and spacing
HOW: Flex layout for preview; images scale responsively
============================================================================= */
.preview {
display: flex;
gap: 1rem;
flex-wrap: wrap;
justify-content: center;
}
.preview img {
width: 100%;
max-width: 100%;
height: auto;
border: 1px solid var(--accent);
border-radius: 2px;
}
/* Responsive images in project cards (not within grid) */
.project-card > img {
width: 100%;
max-width: 100%;
height: auto;
display: block;
}
/* =============================================================================
MEDIA GALLERY & GRID LAYOUT
-------------------------------------------------------------------------
WHAT: Responsive grid for project screenshots and image galleries
WHY: Display project media (screenshots, demos) in organized layouts
HOW: CSS Grid with auto columns; responsive images with borders
============================================================================= */
.media-gallery {
margin-top: 1.5rem;
width: 100%;
}
.media-gallery h4,
.video-container h4 {
color: var(--accent);
margin-bottom: 0.8rem;
font-size: 1rem;
}
.gallery-grid {
display: grid;
grid-template-columns: auto auto;
gap: 1rem;
margin-bottom: 1rem;
width: 100%;
}
.gallery-grid img {
width: 100%;
height: auto;
max-width: 100%;
border: 1px solid var(--accent);
border-radius: 6px;
margin-top: 10px;
transition:
transform 0.3s ease,
box-shadow 0.3s ease;
}
.gallery-grid img:hover {
transform: scale(1.02);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
/* =============================================================================
VIDEO CONTAINER
-------------------------------------------------------------------------
WHAT: Responsive video player styling with border and spacing
WHY: Consistent video presentation matching image gallery design
HOW: width: 100%, border styling, rounded corners, margin offset
============================================================================= */
.video-container {
margin-top: 1.5rem;
}
.video-container video {
width: 100%;
height: auto;
max-width: 100%;
border: 1px solid var(--accent);
border-radius: 8px;
margin-top: 10px;
}
/* =============================================================================
FOOTER
-------------------------------------------------------------------------
WHAT: Bottom page section with background, padding, and metadata text
WHY: Separate visual and semantic footer from main content
HOW: Footer element uses footer-bg colors; small centered text
============================================================================= */
footer {
background: var(--footer-bg);
color: var(--footer-text);
text-align: center;
padding: 1rem;
font-size: 0.9rem;
margin-top: 2rem;
}
/* =============================================================================
IMAGE FULLSCREEN MODAL
-------------------------------------------------------------------------
WHAT: Fullscreen modal overlay for viewing images at full size
WHY: Allow users to inspect project screenshots and media in detail
HOW: Fixed overlay with centered image; click overlay/close btn/ESC to exit
============================================================================= */
.image-modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.9);
z-index: 1000;
justify-content: center;
align-items: center;
padding: 2rem;
}
.image-modal.active {
display: flex;
}
.image-modal-content {
position: relative;
max-width: 90%;
max-height: 90vh;
display: flex;
flex-direction: column;
align-items: center;
}
.image-modal img {
max-width: 100%;
max-height: 85vh;
object-fit: contain;
border-radius: 8px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.image-modal-close {
position: absolute;
top: 1rem;
right: 1rem;
background: rgba(255, 255, 255, 0.15);
border: 2px solid rgba(255, 255, 255, 0.5);
color: white;
font-size: 28px;
padding: 5px 15px;
cursor: pointer;
border-radius: 4px;
transition:
background 0.2s,
border-color 0.2s;
}
.image-modal-close:hover {
background: rgba(255, 255, 255, 0.25);
border-color: rgba(255, 255, 255, 0.8);
}
/* Make gallery images clickable with hover feedback */
.gallery-grid img {
cursor: pointer;
}