/* Shared by every post in /writing. Matches the landing page in site/index.html. */
* { box-sizing: border-box; }
html { background: #f4f2ee; }
body { margin: 0; color: #1a1a1a; font-family: Georgia, "Times New Roman", serif; display: flex; justify-content: center; padding: min(16vh, 140px) 24px 96px; min-height: 100vh; }
main { max-width: 520px; width: 100%; animation: in .3s ease .05s both; }
@keyframes in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { main { animation: none; } }

nav { font-size: 14px; letter-spacing: 2px; color: #888; margin: 0 0 40px; }
nav a { border: 0; transition: color .3s ease; }
nav a:hover, nav a:focus-visible { color: #1a1a1a; }
nav span { margin: 0 10px; }
nav.end { margin: 56px 0 0; }

h1 { font-weight: normal; font-size: clamp(24px, 4vw, 30px); line-height: 1.35; margin: 0 0 14px; }
.intro { font-size: 17px; line-height: 1.65; color: #555; margin: 0 0 6px; }
time { display: block; font-size: 13px; color: #888; margin: 0 0 34px; }

article { font-size: 17px; line-height: 1.7; color: #2a2a2a; }
article p, article ul, article ol, article blockquote, article pre, article figure { margin: 0 0 1.2em; }
article h2 { font-weight: normal; font-size: 20px; line-height: 1.4; margin: 1.8em 0 .6em; }
/* Subsections in longer posts: h3 under an h2, h4 under an h3. */
article h3 { font-weight: bold; font-size: 17px; line-height: 1.45; margin: 1.8em 0 .5em; }
article h4 { font-weight: normal; font-style: italic; font-size: 17px; line-height: 1.45; margin: 1.5em 0 .4em; }
article ul, article ol { padding-left: 1.3em; }
article li { margin: 0 0 .3em; }
article blockquote { padding: 0 0 0 18px; border-left: 1px solid #c9c5bd; color: #555; font-style: italic; }
article code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; background: #ebe8e2; padding: 1px 4px; border-radius: 3px; }
article pre { background: #ebe8e2; padding: 14px 16px; border-radius: 4px; overflow-x: auto; line-height: 1.5; }
article pre code { background: none; padding: 0; }
article img { max-width: 100%; height: auto; display: block; }
article figcaption { font-size: 13px; color: #888; margin-top: 8px; }
/* A linked tweet, shown as a card like X's embeds: <a class="tweet"> with .who, .text, optional .quoted, and .when spans. */
article .tweet { display: block; margin: 0 0 1.4em; padding: 14px 16px; background: #fbfaf8; border: 1px solid #dcd8d0; border-radius: 12px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.5; color: #1a1a1a; transition: border-color .25s ease, background .25s ease; }
article .tweet:hover, article .tweet:focus-visible { border-color: #a8a399; background: #fff; }
.tweet span { display: block; }
.tweet .who { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; margin: 0 0 6px; }
.tweet .who b, .tweet .who span { white-space: nowrap; }
.tweet .who span { color: #888; }
.tweet .who svg { width: 15px; height: 15px; margin-left: auto; fill: #1a1a1a; flex: none; }
.tweet .quoted { margin: 10px 0 0; padding: 10px 12px; border: 1px solid #dcd8d0; border-radius: 10px; font-size: 14px; }
.tweet .quoted .who { margin-bottom: 4px; }
.tweet .when { margin: 10px 0 0; color: #888; font-size: 13px; }

article hr { border: 0; text-align: center; margin: 2em 0; }
article hr::after { content: "\00b7\2003\00b7\2003\00b7"; color: #aaa; }

a { color: inherit; text-decoration: none; border-bottom: 1px solid #c9c5bd; }
a:hover, a:focus-visible { border-color: #1a1a1a; outline: none; }
