-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbase.css
More file actions
197 lines (172 loc) · 6.09 KB
/
base.css
File metadata and controls
197 lines (172 loc) · 6.09 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
/* =========================================================
base.css — Offline Python Tutor (adapted from Python Power User)
Design tokens, reset, typography primitives
Dark-mode first. Single, considered palette.
========================================================= */
:root {
/* Surfaces (dark) */
--bg-0: #0c0c0d; /* deepest — page */
--bg-1: #141416; /* elevated surfaces (cards) */
--bg-2: #1c1c1f; /* hovered / inset */
--bg-3: #26262a; /* deeper inset — code */
/* Ink */
--ink-0: #f4f2ee; /* primary text */
--ink-1: #d6d3cd; /* body */
--ink-2: #a09b92; /* muted */
--ink-3: #6a655d; /* subtle, dividers-as-text */
/* Lines */
--line-1: rgba(255,255,255,0.06);
--line-2: rgba(255,255,255,0.10);
--line-focus: rgba(232,161,59,0.45);
/* Accent — warm amber (Python-yellow's calmer cousin) */
--amber: #e8a13b;
--amber-soft: #f1b55a;
--amber-deep: #b87a22;
--amber-wash: rgba(232,161,59,0.10);
/* Secondary accents (used sparingly) */
--leaf: #7aa36b; /* for "ok", #? prompts */
--rust: #c46e4e; /* for warnings in code annotations */
/* Code-token palette (restrained, not rainbow) */
--t-kw: #d49a4b; /* keywords: def, return, if */
--t-builtin: #c8b88a; /* builtins: print, len */
--t-str: #9ab88d; /* strings */
--t-num: #d98f6c; /* numbers */
--t-com: #6a655d; /* comments */
--t-fn: #e8d9a1; /* function call names */
--t-op: #a09b92; /* operators */
--t-punc: #8a857c; /* punctuation */
/* Type scale */
--font-sans: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
--text-xs: 0.75rem; /* 12 */
--text-sm: 0.875rem; /* 14 */
--text-base: 1rem; /* 16 */
--text-md: 1.0625rem; /* 17 — body on desktop */
--text-lg: 1.1875rem; /* 19 */
--text-xl: 1.4375rem; /* 23 */
--text-2xl: 1.75rem; /* 28 */
--text-3xl: 2.25rem; /* 36 */
--text-4xl: 3rem; /* 48 */
--text-hero: clamp(2.25rem, 6.2vw, 4.25rem);
/* Spacing */
--sp-1: 0.25rem;
--sp-2: 0.5rem;
--sp-3: 0.75rem;
--sp-4: 1rem;
--sp-5: 1.25rem;
--sp-6: 1.5rem;
--sp-7: 2rem;
--sp-8: 2.5rem;
--sp-9: 3rem;
--sp-10: 4rem;
--sp-12: 6rem;
/* Radii */
--r-sm: 6px;
--r-md: 10px;
--r-lg: 14px;
--r-xl: 20px;
--r-pill: 999px;
/* Shadows */
--shadow-pop: 0 10px 30px rgba(0,0,0,0.35);
--shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset, 0 12px 24px -18px rgba(0,0,0,0.6);
/* Layout */
--page-max: 1200px;
--prose-max: 68ch;
--radius-card: 14px;
/* Motion */
--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
--dur-1: 140ms;
--dur-2: 240ms;
--dur-3: 420ms;
}
/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--line-focus); outline-offset: 2px; border-radius: 4px; }
/* ---------- Base ---------- */
html, body {
background: var(--bg-0);
color: var(--ink-1);
font-family: var(--font-sans);
font-size: var(--text-base);
line-height: 1.55;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
font-feature-settings: "ss01", "ss02", "cv11";
}
/* Subtle noise/grain on body, barely visible, prevents flat feel */
body::before {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
background-image: radial-gradient(circle at 20% -10%, rgba(232,161,59,0.04), transparent 50%),
radial-gradient(circle at 120% 110%, rgba(232,161,59,0.025), transparent 45%);
z-index: 0;
}
h1, h2, h3, h4 {
font-family: var(--font-sans);
color: var(--ink-0);
letter-spacing: -0.015em;
line-height: 1.1;
font-weight: 700;
}
h1 { font-weight: 900; letter-spacing: -0.025em; }
p { color: var(--ink-1); }
strong { color: var(--ink-0); font-weight: 700; }
em { color: var(--ink-0); font-style: italic; }
code, kbd, samp, pre {
font-family: var(--font-mono);
font-size: 0.93em;
font-variant-ligatures: none;
}
/* Inline code (inside prose) */
p > code, li > code, .prose code:not(pre code), .inline-code {
background: var(--bg-2);
color: var(--amber-soft);
border: 1px solid var(--line-1);
padding: 0.10em 0.38em;
border-radius: 5px;
font-size: 0.88em;
white-space: nowrap;
}
/* Long inline code must wrap on small screens instead of overflowing */
@media (max-width: 759px) {
p > code, li > code, .prose code:not(pre code), .inline-code {
white-space: normal;
overflow-wrap: break-word;
word-break: break-word;
}
}
a { color: var(--ink-0); border-bottom: 1px solid var(--line-2); transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease); }
a:hover { color: var(--amber); border-bottom-color: var(--amber); }
/* Utility */
.eyebrow {
font-family: var(--font-mono);
font-size: var(--text-xs);
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--amber);
font-weight: 500;
}
.amber { color: var(--amber); }
/* Scrollbar — subtle */
* { scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-3); background-clip: padding-box; border: 2px solid transparent; }
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}