/* Shared stylesheet for joyyjiao.github.io */

:root {
  --ink: #111111;
  --muted: #444444;
  --rule: #e2e5e9;
  --bg: #ffffff;
  --measure: 46rem;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: var(--ink); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 0.15em; }
.wrap { max-width: var(--measure); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

/* Header and navigation */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}
.site-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); }
.site-name:hover { text-decoration: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav a { color: var(--muted); padding-bottom: 0.2rem; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Text */
main { padding: 2.5rem 0 3rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.3; color: var(--ink); }
h1 { font-size: 2rem; margin: 0 0 0.25rem; }
h2 {
  font-size: 1.4rem;
  margin: 2.75rem 0 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule);
}
main > h2:first-child, main > section:first-child > h2:first-child { margin-top: 0; }
h3 { font-size: 1.15rem; margin: 0 0 0.35rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.email { overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 0.15em; }

/* Home */
.intro { display: grid; grid-template-columns: 11rem 1fr; gap: 2rem; align-items: start; }
.intro img { display: block; width: 100%; height: auto; border-radius: 4px; }
.position { color: var(--muted); margin-bottom: 1.25rem; }

/* Papers */
.paper { margin: 0 0 2rem; }
.paper h3 { font-size: 1.15rem; }
.paper .meta { color: var(--muted); font-size: 0.95rem; margin: 0.15rem 0 0.6rem; }
.talks { color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem; }
.talks p { margin: 0 0 0.2rem; }
.talks ul { list-style: none; margin: 0; padding: 0; }
.talks li { margin: 0 0 0.15rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0; padding: 0; list-style: none; }
.links a {
  display: inline-block;
  font-size: 0.9rem;
  padding: 0.1rem 0.75rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
}
.links a:hover, .links a:focus-visible { background: var(--ink); color: #fff; text-decoration: none; }

/* Teaching */
.entry { margin: 0 0 1.75rem; }
.entry-head { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 1rem; }
.entry-head h3 { margin: 0; }
.entry .when { color: var(--muted); font-size: 0.95rem; white-space: nowrap; }
.entry .where { color: var(--muted); margin: 0.1rem 0 0.5rem; }

/* CV */
.cv-frame { display: block; width: 100%; height: 85vh; margin-top: 1.25rem; border: 1px solid var(--rule); border-radius: 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { padding-top: 1.25rem; padding-bottom: 2rem; }
.site-footer p { margin: 0; }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  main { padding-top: 1.75rem; }
  h1 { font-size: 1.7rem; }
  .intro { grid-template-columns: 1fr; gap: 1.25rem; }
  .intro img { width: 9rem; }
  .cv-frame { height: 70vh; }
}
