:root {
  --bg: #fffefb;
  --text: #22211f;
  --muted: #6b6862;
  --line: #e6e2da;
  --link: #2b65ec;
  --link-hover: #157dec;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191918;
    --text: #e9e6e0;
    --muted: #a09c94;
    --line: #35342f;
    --link: #8cb0ff;
    --link-hover: #b3caff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.65 Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

main.wrap { padding-top: 2.5rem; padding-bottom: 3rem; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }

h1, h2 { line-height: 1.25; font-weight: normal; }
h1 { font-size: 2rem; margin: 0 0 1.5rem; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 1rem; }

img { max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.site-name { color: var(--text); font-size: 1.15rem; text-decoration: none; }
.site-name:hover { color: var(--text); }
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--text); }
.site-header nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--link);
  text-decoration-thickness: 2px;
}

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.site-footer a { color: var(--muted); }

.links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

/* Home */
.intro { display: flex; align-items: center; gap: 1.75rem; margin-bottom: 2rem; }
.intro img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; flex: none; }
.intro h1 { margin-bottom: 0.25rem; }
.tagline { margin: 0 0 0.5rem; color: var(--muted); }
.more { margin: 1rem 0 0; }

/* Story timeline */
.timeline { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.5rem 1.25rem; }
.timeline li:last-child { padding-bottom: 0.25rem; }
.timeline li::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  left: -7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
  border: 2px solid var(--bg);
}
.timeline li:first-child::before { background: var(--link); }
.timeline-years { color: var(--muted); font-size: 0.875rem; }
.timeline h3 { margin: 0; font-size: 1.1rem; font-weight: normal; line-height: 1.4; }
.timeline p { margin: 0.2rem 0 0; }

.lede { color: var(--muted); margin-top: -0.75rem; }

/* Lists of posts */
.post-list li { padding: 0.35rem 0; }
.post-list time { display: block; color: var(--muted); font-size: 0.875rem; }
.post-list-full li { padding: 0.75rem 0; }
.post-list-full a { font-size: 1.2rem; line-height: 1.35; }
.post-list-full p { margin: 0.35rem 0 0; color: var(--muted); }

/* Publications */
.pub { padding: 0.75rem 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.pub strong { color: var(--text); font-weight: normal; }
.pub-title { display: block; margin-bottom: 0.2rem; font-size: 1.05rem; line-height: 1.4; }
.pub-project { margin-top: 0.2rem; font-size: 0.85rem; }
.pub-project a { color: inherit; }

.year-list li { display: flex; gap: 1rem; padding: 0.3rem 0; }
.year-list span { flex: none; width: 3rem; color: var(--muted); }

/* Posts */
.post-header { margin-bottom: 2rem; }
.post-header h1 { margin-bottom: 0.5rem; }
.post-header time { color: var(--muted); }
.back { margin: 2.5rem 0 0; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  h1 { font-size: 1.7rem; }
  .intro { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .intro img { width: 120px; height: 120px; }
}
