/* Shu Yang — personal academic site */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f1f1d;
  --muted: #6b6a66;
  --line: #e6e3dc;
  --accent: #2f6f4f;
  --accent-soft: #e8f1ec;
  --tag: #f0eee8;
  --max: 1180px;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161614;
    --surface: #1e1e1b;
    --text: #ece9e2;
    --muted: #a39f96;
    --line: #2d2d29;
    --accent: #8cc7a6;
    --accent-soft: #1f2d26;
    --tag: #26261f;
  }
}
:root[data-theme="dark"] {
  --bg: #161614;
  --surface: #1e1e1b;
  --text: #ece9e2;
  --muted: #a39f96;
  --line: #2d2d29;
  --accent: #8cc7a6;
  --accent-soft: #1f2d26;
  --tag: #26261f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { font-size: 22px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 2.2rem; margin: 0 0 .25rem; }
h2 { font-size: 1.45rem; margin: 2.6rem 0 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; }
p { margin: 0 0 1rem; }
ul { padding-left: 1.2rem; margin: 0 0 1rem; }
li { margin: .3rem 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--tag); padding: .1em .35em; border-radius: 4px; }
blockquote { margin: 1rem 0; padding: .6rem 1rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
blockquote p:last-child { margin: 0; }

/* layout */
.cover {
  height: 300px;
  background: url("assets/cover.jpg") center 35% / cover no-repeat;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px 4rem; }
.subpage .wrap { padding-top: 2rem; }

/* header */
.profile { display: flex; align-items: flex-end; gap: 1.4rem; margin-top: -80px; flex-wrap: wrap; }
.avatar {
  width: 184px; height: 184px; border-radius: 50%;
  object-fit: cover; border: 4px solid var(--bg); background: var(--bg);
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.identity { padding-bottom: .3rem; }
.identity .role { color: var(--muted); margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: .9rem 0 0; padding: 0; list-style: none; font-size: .95rem; }
.links li::after { content: ""; }

nav.top { font-size: .95rem; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; color: var(--muted); }
nav.top a { color: var(--text); }
nav.top a:hover { color: var(--accent); }

/* lists */
.news li, .pub li { margin: .55rem 0; }
.date { display: inline-block; min-width: 4.6em; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .92em; }
.venue { display: inline-block; font-size: .78rem; padding: .05em .5em; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-right: .4em; vertical-align: 1px; white-space: nowrap; }
.oral { background: #fbe9c4; color: #7a4e00; }
:root[data-theme="dark"] .oral { background: #3c2f12; color: #f3c56b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .oral { background: #3c2f12; color: #f3c56b; } }
.pub .title { font-weight: 500; }
.pub .meta { color: var(--muted); font-size: .92em; }
.pub .meta a { margin-right: .5em; }
.sub { list-style: circle; margin-top: .3rem; }
.sub li { margin: .25rem 0; }

.blog-list { list-style: none; padding: 0; }
.blog-list li { padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.blog-list .t { font-weight: 500; }
.blog-list .d { color: var(--muted); font-size: .9em; margin-left: .5em; }
.blog-list .note { display: block; color: var(--muted); font-size: .9em; }

.featured {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1rem 0;
}
.featured h3 { margin: 0 0 .3rem; }
.featured .authors { color: var(--muted); font-size: .93em; margin-bottom: .5rem; }
.kw { font-size: .85em; color: var(--muted); }

details summary { cursor: pointer; color: var(--muted); font-size: .95rem; margin: .4rem 0; }
details summary:hover { color: var(--accent); }

footer { margin-top: 3.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* blog post */
.post-head { margin-bottom: 2rem; }
.post-head h1 { font-size: 1.9rem; }
.post-head .byline { color: var(--muted); font-size: .95em; }
.post h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.post h3 { font-size: 1.08rem; }
.post .toc { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1.2rem; font-size: .95em; }
.post .toc ul { margin: 0; }
.post .refs { font-size: .92em; }
.post .origin { font-size: .9em; color: var(--muted); }
.back { display: inline-block; margin-bottom: 1.2rem; font-size: .95em; }

@media (max-width: 1100px) {
  html { font-size: 18px; }
  .cover { height: 220px; }
  .avatar { width: 136px; height: 136px; }
  .profile { margin-top: -60px; }
}
@media (max-width: 560px) {
  html { font-size: 16px; }
  h1 { font-size: 1.8rem; }
  .cover { height: 150px; }
  .avatar { width: 104px; height: 104px; }
  .profile { margin-top: -44px; gap: .9rem; }
  .date { display: block; min-width: 0; }
}
