/* Notes: same palette and type as the portfolio, laid out as a single reading column. */
:root {
  --accent: 114 47 55;
  --bg: #ffffff;
  --surface: #f5f5f5;
  --ink: #000000;
  --muted: #4b5563;
  --faint: #6b7280;
  --rule: #e5e7eb;
  --chip: #f3f4f6;
  --sans: "Source Sans 3", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
html.dark {
  --accent: 187 119 96;
  --bg: #161616;
  --surface: #222222;
  --ink: #e5e5e5;
  --muted: #a3a3a3;
  --faint: #8a8a8a;
  --rule: #3d3d3d;
  --chip: #242424;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
}
a { color: rgb(var(--accent)); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }

.skip {
  position: absolute; left: 1rem; top: 1rem; transform: translateY(-200%); z-index: 100;
  padding: .5rem 1rem; background: rgb(var(--accent)); color: #fff; border-radius: .25rem;
}
.skip:focus { transform: none; }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.bar-inner {
  max-width: 44rem; margin: 0 auto; padding: .85rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.bar img { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; flex: none; }
.bar .who { font-weight: 600; color: var(--ink); line-height: 1.2; }
.bar .who small {
  display: block; font-weight: 500; font-size: .75rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.bar .who:hover { text-decoration: none; }
.bar .who:hover small { color: rgb(var(--accent)); }
.bar .sp { flex: 1; }
.bar .nav {
  font-size: .8125rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.bar .nav:hover { color: rgb(var(--accent)); text-decoration: none; }
.theme {
  display: inline-flex; align-items: center; justify-content: center; padding: .5rem; cursor: pointer;
  border: 1px solid var(--rule); border-radius: .25rem; background: var(--bg); color: var(--muted);
}
.theme:hover { border-color: rgb(var(--accent)); color: rgb(var(--accent)); }
.theme svg { width: 1.25rem; height: 1.25rem; display: block; }
.theme .sun { display: none; }
html.dark .theme .sun { display: block; }
html.dark .theme .moon { display: none; }

/* Column */
main { max-width: 44rem; margin: 0 auto; padding: 0 1.5rem 3rem; }
.label {
  font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.label .dot { margin: 0 .35em; color: var(--faint); }

/* Index */
.intro { padding: 3rem 0 1.75rem; border-bottom: 1px solid var(--rule); }
.intro h1 { font: 700 clamp(2rem, 6vw, 2.5rem)/1.15 var(--serif); letter-spacing: -.01em; margin: 0 0 .6rem; }
.intro p { margin: 0; color: var(--muted); font-size: 1.0625rem; max-width: 34rem; }

.timeline { list-style: none; margin: 0; padding: 2rem 0 0; }
.timeline li { position: relative; margin: 0; padding: 0 0 2.25rem 2.5rem; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: .45rem; width: .75rem; height: .75rem; box-sizing: border-box;
  border-radius: 50%; border: 2px solid rgb(var(--accent)); background: var(--bg); box-shadow: 0 0 0 4px var(--bg);
}
.timeline li::after {
  content: ""; position: absolute; left: 5px; top: 1.2rem; bottom: 0; width: 2px; background: var(--rule);
}
.timeline li:last-child::after { height: 4rem; bottom: auto; background: linear-gradient(var(--rule), transparent); }
.timeline h2 { font: 600 1.4rem/1.3 var(--serif); margin: .25rem 0 .4rem; }
.timeline h2 a { color: var(--ink); }
.timeline h2 a:hover { color: rgb(var(--accent)); text-decoration: none; }
.timeline p { margin: 0 0 .6rem; color: var(--muted); }
.empty { padding: 3rem 0; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font-size: .75rem; font-weight: 500; padding: .15rem .55rem; border-radius: 999px;
  background: var(--chip); color: var(--muted); border: 1px solid var(--rule);
}

/* Post */
article header { padding: 3rem 0 1.5rem; }
article header h1 { font: 700 clamp(1.9rem, 6vw, 2.5rem)/1.2 var(--serif); letter-spacing: -.01em; margin: .6rem 0 1rem; }
.prose { font-family: var(--serif); font-size: 1.125rem; line-height: 1.7; }
.prose p { margin: 0 0 1.25rem; }
.prose h2 { font: 600 1.45rem/1.3 var(--sans); margin: 2.4rem 0 .75rem; letter-spacing: -.005em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote {
  margin: 0 0 1.25rem; padding: .75rem 1rem .75rem 1.1rem; background: var(--surface);
  border-left: 4px solid rgb(var(--accent)); border-radius: .25rem; color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--chip); padding: .1em .35em; border-radius: .25rem; }
.prose pre {
  margin: 0 0 1.25rem; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--rule);
  border-radius: .25rem; overflow-x: auto; line-height: 1.5;
}
.prose pre code { background: none; padding: 0; }
.prose .math { margin: 0 0 1.25rem; overflow-x: auto; overflow-y: hidden; }
.prose .math .katex-display { margin: .25rem 0; }
.prose .katex { font-size: 1.05em; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

/* Files card */
.files { margin: 2.5rem 0 0; padding: 1rem 1.1rem 1.1rem; background: var(--surface); border-left: 4px solid rgb(var(--accent)); border-radius: .25rem; }
.files h2 {
  margin: 0 0 .6rem; font: 600 .75rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--accent));
}
.files ul { list-style: none; margin: 0; padding: 0; }
.files li { margin: 0 0 .65rem; }
.files li:last-child { margin-bottom: 0; }
.files a { font-weight: 600; }
.files .meta { display: block; font-size: .9rem; color: var(--muted); }

/* Share row */
.share { display: flex; align-items: center; gap: .5rem; margin: 1.25rem 0 0; }
.share .label { margin-right: .25rem; }
.sbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; padding: 0; cursor: pointer;
  border: 1px solid var(--rule); border-radius: .25rem; background: var(--bg); color: var(--ink);
}
.sbtn:hover { border-color: var(--ink); text-decoration: none; }
.sbtn svg { width: 1.2rem; height: 1.2rem; display: block; }
.copied { font-size: .875rem; color: rgb(var(--accent)); min-width: 6rem; }

/* Footer */
footer { border-top: 1px solid var(--rule); }
footer .in {
  max-width: 44rem; margin: 0 auto; padding: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  font-size: .875rem; color: var(--muted);
}
footer .in .sp { flex: 1; }
.postnav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: .95rem; }

@media (max-width: 520px) {
  .bar .who small { display: none; }
  .bar-inner { padding: .75rem 1rem; gap: .75rem; }
  main { padding: 0 1rem 2.5rem; }
  .prose { font-size: 1.0625rem; }
}
@media print {
  .bar, footer, .theme, .skip, .share { display: none !important; }
  body { background: #fff; color: #000; }
  main { max-width: none; padding: 0; }
}
