:root {
  --text: #1a1a1a;
  --muted: #555;
  --line: #1a1a1a;
  --bg: #fff;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root { --text: #e8e6e3; --muted: #a3a09b; --line: #e8e6e3; --bg: #121212; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 56px 24px 80px; }

a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, .name { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 56px; }
.name { font-size: 2.25rem; margin: 0; line-height: 1.2; }
.name.small { font-size: 1.35rem; text-decoration: none; }
.social { display: flex; gap: 12px; }
.social a {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1.5px solid var(--line); border-radius: 50%;
  text-decoration: none; transition: background .15s, color .15s;
}
.social a:hover { background: var(--text); color: var(--bg); }

/* Sections */
section { margin-bottom: 52px; }
h2 { font-size: 1.5rem; margin: 0 0 18px; }
.intro p { margin: 0 0 16px; }

.links { list-style: none; padding: 0; margin: 0; }
.links li { position: relative; padding-left: 16px; margin-bottom: 8px; }
.links li::before { content: "•"; position: absolute; left: 0; color: var(--muted); }
.links.plain li { color: var(--muted); }

/* Article */
.title { font-size: 2rem; line-height: 1.25; margin: 0 0 8px; }
.meta { color: var(--muted); font-size: .9rem; margin: 0 0 36px; }
.prose h2 { font-size: 1.35rem; margin-top: 40px; }
.prose h3 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; margin-top: 28px; }
.prose img { max-width: 100%; height: auto; }
.prose code { font-size: .9em; background: rgba(127,127,127,.12); padding: 1px 5px; border-radius: 4px; }
.prose pre { border: 1px solid rgba(127,127,127,.25); overflow-x: auto; padding: 16px; border-radius: 6px; font-size: .85rem; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0; padding-left: 16px; border-left: 2px solid var(--line); color: var(--muted); }
.prose table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.prose th, .prose td { border-bottom: 1px solid rgba(127,127,127,.3); padding: 6px 8px; text-align: left; }
.back { margin-top: 48px; }

/* Footer */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 72px; padding-top: 20px; border-top: 1px solid rgba(127,127,127,.25);
  color: var(--muted); font-size: .85rem; }

@media (max-width: 520px) {
  .wrap { padding-top: 36px; }
  .name { font-size: 1.8rem; }
  .social a { width: 36px; height: 36px; }
}
