/* ------------------------------------------------------------------
   Yejia (Martha) Liu — personal site
   Single deliberately simple stylesheet. No frameworks.
   ------------------------------------------------------------------ */

:root {
  --bg:         #fbfaf6;
  --surface:    #ffffff;
  --ink:        #1f2024;
  --ink-soft:   #44464d;
  --ink-mute:   #7a7c84;
  --rule:       #e7e3d8;
  --accent:     #2a5d8c;          /* deep blue */
  --accent-soft:#6a93b8;
  --tag-bg:     #eef2f7;
  --max-width:  1100px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Serif 4", "Source Serif Pro", "Iowan Old Style",
               "Apple Garamond", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
a:hover { border-bottom-color: var(--accent); }

em { font-style: italic; }
strong { font-weight: 600; }

/* ---------- Page wrap ---------- */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 32px 40px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: start;
}

/* ---------- Sidebar ---------- */

.sidebar {
  position: sticky;
  top: 40px;
  text-align: center;
}

.avatar {
  width: 200px;
  height: 200px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  display: block;
  margin: 0 auto 20px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 8px 28px rgba(50,40,30,0.10);
}

.sidebar h1 {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.25rem;
  color: var(--ink);
}

.sidebar .role {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  color: var(--ink-mute);
  margin: 0 0 1.25rem;
  line-height: 1.4;
}

.sidebar .location {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--ink-mute);
  margin: 0 0 1.25rem;
}
.sidebar .location i { margin-right: 6px; }

.socials {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.socials a {
  border-bottom: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.12s ease, filter 0.15s ease;
}
.socials a:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  border-bottom: none;
}
.socials .s-email    { color: #d44638; }
.socials .s-cv       { color: #2a5d6e; }
.socials .s-scholar  { color: #4285f4; }
.socials .s-github   { color: #181717; }
.socials .s-linkedin { color: #0a66c2; }

/* ---------- Main content ---------- */

.main { min-width: 0; }

.bio { margin-bottom: 56px; }
.bio p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}
.bio p:last-child { margin-bottom: 0; }

section { margin-bottom: 56px; }
section:last-of-type { margin-bottom: 40px; }

h2.section-title {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  margin: 0 0 1.4rem;
  padding-bottom: 0.55rem;
  color: var(--ink);
  position: relative;
  border-bottom: 1px solid var(--rule);
}
h2.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- News ---------- */

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}
.news-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  align-items: baseline;
}
.news-date {
  color: var(--ink-mute);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}
.news-body { color: var(--ink-soft); }
.news-body strong { color: var(--ink); font-weight: 600; }

/* ---------- Publications ---------- */

.pub-year {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.4rem 0 0.6rem;
  padding: 0.3rem 0.75rem;
  display: inline-block;
  background: var(--tag-bg);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
}
.pub-year:first-child { margin-top: 0; }

.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-list li {
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--rule);
  color: var(--ink-soft);
}
.pub-list li:last-child { border-bottom: none; }
.pub-list .pub-title {
  color: var(--ink);
  font-weight: 600;
}
.pub-list .pub-venue {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-mute);
  font-style: italic;
  font-size: 0.95rem;
}
.pub-list .me { font-weight: 600; color: var(--ink); }

/* ---------- Teaching ---------- */

.teaching-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.teaching-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--rule);
  color: var(--ink-soft);
}
.teaching-list li:last-child { border-bottom: none; }
.teaching-list .role-title { color: var(--ink); font-weight: 600; }
.teaching-list .course { color: var(--ink-soft); }
.teaching-list .term {
  color: var(--ink-mute);
  font-size: 0.92rem;
  white-space: nowrap;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  padding: 24px 0 8px;
  color: var(--ink-mute);
  font-size: 0.9rem;
  text-align: center;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .wrap {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 22px 32px;
  }
  .sidebar {
    position: static;
    top: auto;
  }
  .avatar { width: 160px; height: 160px; }
  .news-list li {
    grid-template-columns: 90px 1fr;
    gap: 14px;
  }
  .teaching-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .news-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
