/* zhiru-liu.github.io — minimal stylesheet. No framework, no JS. */

:root {
  --bg: #ffffff;
  --fg: #1f1f1f;
  --muted: #6b6b6b;
  --link: #1a5fb4;
  --rule: #e4e4e4;
  --max-width: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --fg: #e6e6e6;
    --muted: #9a9a9a;
    --link: #8ab4f8;
    --rule: #2c2c2c;
  }
}

html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
}
main { flex: 1 0 auto; width: 100%; box-sizing: border-box; max-width: var(--max-width); margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1rem; }
img { max-width: 100%; }

/* header: name on the left, two-item nav on the right */
.site-header {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: .25rem 1.5rem; margin-bottom: 2.5rem;
}
.site-header .name { font-weight: 600; font-size: 1.15rem; color: var(--fg); }
.site-header nav a { color: var(--muted); margin-left: 1.25rem; }
.site-header nav a[aria-current="page"] { color: var(--fg); }

/* about page */
.profile {
  float: right; width: 200px; height: 200px; border-radius: 4px;
  object-fit: cover; margin: .25rem 0 1rem 2rem;
}
.links { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }

/* publications page */
h1 { font-size: 1.5rem; font-weight: 600; margin: 0 0 .5rem; }
.note { color: var(--muted); }
.year {
  font-size: 1rem; font-weight: 600; color: var(--muted);
  margin: 2.25rem 0 .9rem; padding-bottom: .3rem; border-bottom: 1px solid var(--rule);
}
.pubs { list-style: none; padding: 0; margin: 0; }
.pub { display: grid; grid-template-columns: 88px 1fr; gap: 1rem; margin-bottom: 1.5rem; align-items: start; }
.pub .thumb { width: 88px; }
/* thumbnails keep their aspect ratio and fit inside an 88x120 box (no cropping) */
.pub .thumb img { display: block; width: auto; height: auto; max-width: 88px; max-height: 120px; }
/* TEST: in dark mode, invert thumbnails so white figure backgrounds don't glare;
   hue-rotate keeps colours roughly recognisable. Delete this block to leave figures as-is. */
@media (prefers-color-scheme: dark) {
  .pub .thumb img { filter: invert(1) hue-rotate(180deg); }
}
.pub .title { font-weight: 600; }
.pub .authors, .pub .venue { color: var(--muted); font-size: .95rem; }
.pub .me { color: var(--fg); text-decoration: underline; text-underline-offset: .15em; }

/* footer: centered, sits at the bottom of the viewport on short pages */
footer { text-align: center; font-size: .8rem; color: var(--muted); padding: 1.5rem 1.25rem; }
footer a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); }

@media (max-width: 600px) {
  .profile { float: none; display: block; margin: 0 auto 1.5rem; }
  .pub { grid-template-columns: 64px 1fr; gap: .75rem; }
  .pub .thumb { width: 64px; }
  .pub .thumb img { max-width: 64px; max-height: 90px; }
}
