forked from albertwenger/principles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
316 lines (283 loc) · 10.6 KB
/
index.html
File metadata and controls
316 lines (283 loc) · 10.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>De Principiis — On First Principles</title>
<style>
:root {
--bg-primary: #fafafa;
--bg-secondary: #ffffff;
--bg-tertiary: #f0f0f0;
--text-primary: #2a2a2a;
--text-secondary: #555555;
--text-muted: #888888;
--accent: #4a7ab0;
--accent-hover: #3d6a9c;
--border: #e0e0e0;
--shadow: rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] {
--bg-primary: #1a1a2e;
--bg-secondary: #16213e;
--bg-tertiary: #1c2a4a;
--text-primary: #e0e0e0;
--text-secondary: #bbbbbb;
--text-muted: #888888;
--accent: #7faadb;
--accent-hover: #9bc0eb;
--border: #2a3a5e;
--shadow: rgba(0, 0, 0, 0.3);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: var(--bg-primary);
min-height: 100vh;
font-family: Georgia, 'Times New Roman', serif;
color: var(--text-primary);
line-height: 1.7;
transition: background 0.3s, color 0.3s;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 60px 20px;
}
.theme-toggle {
position: fixed;
top: 20px;
right: 20px;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 20px;
padding: 8px 12px;
cursor: pointer;
font-family: inherit;
font-size: 0.85rem;
color: var(--text-secondary);
transition: all 0.2s;
box-shadow: 0 2px 8px var(--shadow);
}
.theme-toggle:hover {
background: var(--bg-tertiary);
}
h1 {
font-size: 2.5em;
color: var(--accent);
margin-bottom: 10px;
font-weight: normal;
}
.latin {
font-style: italic;
color: var(--text-muted);
margin-bottom: 40px;
}
.introduction {
margin-bottom: 50px;
}
.introduction p {
margin-bottom: 1.2em;
color: var(--text-secondary);
}
h2 {
font-size: 1.3em;
color: var(--accent);
margin-bottom: 25px;
font-weight: normal;
border-bottom: 1px solid var(--border);
padding-bottom: 10px;
}
.principles {
list-style: none;
}
.principles li {
margin-bottom: 20px;
padding: 20px;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 8px;
transition: all 0.2s;
box-shadow: 0 2px 8px var(--shadow);
}
.principles li:hover {
background: var(--bg-tertiary);
transform: translateY(-2px);
box-shadow: 0 4px 12px var(--shadow);
}
.principles a {
color: var(--text-primary);
text-decoration: none;
display: block;
}
.principle-title {
font-size: 1.1em;
color: var(--accent);
margin-bottom: 8px;
}
.principle-description {
font-size: 0.95em;
color: var(--text-muted);
}
footer {
margin-top: 60px;
padding-top: 20px;
border-top: 1px solid var(--border);
color: var(--text-muted);
font-size: 0.9em;
}
footer a {
color: var(--accent);
text-decoration: none;
}
footer a:hover {
text-decoration: underline;
}
@media (max-width: 600px) {
.container {
padding: 40px 15px;
}
h1 {
font-size: 2em;
}
.principles li {
padding: 15px;
}
}
</style>
</head>
<body>
<button class="theme-toggle" onclick="toggleTheme()">
<span id="theme-icon">☀️</span> <span id="theme-label">Light</span>
</button>
<div class="container">
<h1>De Principiis</h1>
<p class="latin">On First Principles</p>
<div class="introduction">
<p>
Knowledge is humanity's superpower. It lets us fly through the sky and dive into
the oceans. Like a superhero facing new villains, we need to create new knowledge
to overcome the negative side-effects of our prior knowledge. For instance, right
now we need to figure out how to transition away from fossil fuels and how to
develop next generation antibiotics. And of course "with great power comes great
responsibility." It is exactly because of the superpower of knowledge that we
humans are responsible for the whales, and not the whales for us.
</p>
<p>
Yet there appears to be so much knowledge in the world that it is easy to feel
overwhelmed. The best we can hope for seems to be to spend a lifetime studying
a single leaf on one tree in an endless forest.
</p>
<p>
But is that really so? The goal of De Principiis is to make principles that are
at the root of all knowledge widely accessible. Understanding these principles
makes it easier to comprehend new knowledge and to appreciate the deep connections
between seemingly disparate fields.
</p>
<p>
Each principle below is illustrated with an interactive experiment. Run them
yourself—seeing a principle in action is worth a thousand explanations.
</p>
</div>
<h2>Principles</h2>
<ul class="principles">
<li>
<a href="ants.html">
<div class="principle-title">Emergence</div>
<div class="principle-description">
How patterns arise from noisy movement. Simple rules, followed by many
independent agents, can produce complex collective behavior that none
of them intended or could foresee.
</div>
</a>
</li>
<li>
<a href="nailboard.html">
<div class="principle-title">The Structure of Randomness</div>
<div class="principle-description">
Why individual unpredictability produces collective order. Each ball's
path through the nails is random, but the final distribution is
inevitable—the signature of the normal curve.
</div>
</a>
</li>
<li>
<a href="feedback.html">
<div class="principle-title">Feedback Loops</div>
<div class="principle-description">
Why some systems explode and others stabilize. Positive feedback amplifies
change (runaway growth or collapse); negative feedback resists it
(equilibrium and balance).
</div>
</a>
</li>
<li>
<a href="compounding.html">
<div class="principle-title">Compounding</div>
<div class="principle-description">
Why exponential growth breaks our intuition. Small percentages, applied
repeatedly, produce outcomes that exceed anything our linear minds expect.
The secret behind accelerating progress.
</div>
</a>
</li>
<li>
<a href="evolution.html">
<div class="principle-title">Evolution</div>
<div class="principle-description">
Design without a designer. Watch creatures adapt to their environment
through mutation and selection. Complexity emerges from simple rules —
no one planned it.
</div>
</a>
</li>
<li>
<a href="entropy.html">
<div class="principle-title">Entropy</div>
<div class="principle-description">
Why disorder is overwhelmingly more probable than order. There are
astronomical ways for things to be disordered, but only a few ways
for them to be organized. Maintaining order requires constant work.
</div>
</a>
</li>
</ul>
<footer>
<p>
A project by <a href="https://continuations.com">Albert Wenger</a>
and <a href="https://lumen.albertwenger.me">Lumen</a>.
<br>
Source on <a href="https://github.com/albertwenger/principles">GitHub</a>.
</p>
</footer>
</div>
<script>
function initTheme() {
const saved = localStorage.getItem('deprincipiis-theme');
if (saved === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark');
updateThemeUI('dark');
}
}
function toggleTheme() {
const current = document.documentElement.getAttribute('data-theme');
const next = current === 'dark' ? 'light' : 'dark';
if (next === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark');
} else {
document.documentElement.removeAttribute('data-theme');
}
localStorage.setItem('deprincipiis-theme', next);
updateThemeUI(next);
}
function updateThemeUI(theme) {
document.getElementById('theme-icon').textContent = theme === 'dark' ? '🌙' : '☀️';
document.getElementById('theme-label').textContent = theme === 'dark' ? 'Dark' : 'Light';
}
initTheme();
</script>
</body>
</html>