/* ===========================================================
   Ting Li — site v2  ·  "Light academic" theme
   Plain CSS, no build step. Edit freely.
   =========================================================== */

:root {
  --accent:        #3b4cca;   /* indigo */
  --accent-dark:   #2a37a0;
  --accent-soft:   #eef0fb;
  --ink:           #1c2230;   /* body text */
  --ink-soft:      #4a5568;   /* secondary text */
  --line:          #e6e8ef;   /* hairlines */
  --bg:            #ffffff;
  --bg-alt:        #f7f8fc;   /* alternating section bg */
  --maxw:          980px;
  --radius:        14px;
  --shadow:        0 1px 2px rgba(20,30,60,.05), 0 8px 24px rgba(20,30,60,.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 600;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- top navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.2rem; font-weight: 600; color: var(--ink);
  letter-spacing: .2px; margin-right: auto;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.nav a.link {
  color: var(--ink-soft); font-size: .96rem; font-weight: 500;
  padding: 4px 2px; border-bottom: 2px solid transparent;
}
.nav a.link:hover { color: var(--accent); text-decoration: none; }
.nav a.link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  border: 1px solid var(--accent); transition: .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); text-decoration: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 220px; gap: 40px; align-items: center;
}
.hero h1 { font-size: 2.7rem; margin: 0 0 6px; }
.hero .sub { font-size: 1.15rem; color: var(--ink-soft); margin: 0; }
.hero .affil { margin-top: 14px; color: var(--ink-soft); font-size: 1rem; }
.headshot {
  width: 220px; height: 220px; border-radius: 50%; object-fit: cover;
  box-shadow: var(--shadow); border: 4px solid #fff;
}

/* ---------- sections ---------- */
section { padding: 48px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line);
               border-bottom: 1px solid var(--line); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  font-weight: 700; color: var(--accent); font-family: "Inter", sans-serif;
  margin: 0 0 6px;
}
h2.section-title { font-size: 1.9rem; margin: 0 0 18px; }
.lead { font-size: 1.08rem; color: var(--ink-soft); }

/* ---------- stat strip ---------- */
.stats { display: flex; flex-wrap: wrap; gap: 32px; }
.stat { flex: 1 1 140px; }
.stat .n { font-family: "Newsreader", serif; font-size: 2.1rem; color: var(--accent);
           font-weight: 600; line-height: 1; }
.stat .l { color: var(--ink-soft); font-size: .92rem; margin-top: 4px; }

/* ---------- card grid ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.card-fig { display: block; width: 100%; height: 200px; object-fit: contain;
            background: #fff; border: 1px solid var(--line); border-radius: 10px;
            padding: 6px; margin-bottom: 16px; }
.card .credit { display: block; margin-top: 12px; font-size: .78rem; color: var(--ink-soft); }
.card .credit a { color: var(--ink-soft); text-decoration: underline; }
.card .credit a:hover { color: var(--accent); }
.card .tag { display:inline-block; font-size:.72rem; font-weight:700; letter-spacing:.04em;
             text-transform:uppercase; color:var(--accent); background:var(--accent-soft);
             padding:3px 9px; border-radius:999px; margin-bottom:10px; }

/* ---------- people grid ---------- */
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.person { text-align: center; }
.avatar {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 12px;
  object-fit: cover; background: var(--accent-soft); border: 3px solid #fff;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  font-family: "Newsreader", serif; font-size: 2rem; font-weight: 600; color: var(--accent);
}
.person .name { font-weight: 600; }
.person .role { color: var(--ink-soft); font-size: .9rem; }
.person .topic { color: var(--ink-soft); font-size: .85rem; margin-top: 4px; font-style: italic; }

/* ---------- join page ---------- */
.opp { border: 1px solid var(--line); border-radius: var(--radius);
       padding: 26px 28px; margin-bottom: 22px; background: #fff; box-shadow: var(--shadow); }
.opp h3 { font-size: 1.45rem; margin: 0 0 6px; }
.opp .who { color: var(--accent); font-weight: 600; font-size: .9rem;
            text-transform: uppercase; letter-spacing: .06em; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.pill { display:inline-block; padding:7px 14px; border-radius:999px;
        background: var(--accent-soft); color: var(--accent-dark);
        font-size:.9rem; font-weight:600; border:1px solid #dfe3f8; }
.pill:hover { background:#e2e6fb; text-decoration:none; }
.note { background: #fffdf3; border:1px solid #f0e6bf; border-radius:12px;
        padding:14px 18px; font-size:.95rem; color:#5a4f24; }

/* ---------- project list ---------- */
.proj { padding: 18px 0; border-top: 1px solid var(--line); }
.proj:first-of-type { border-top: none; }
.proj h3 { font-size: 1.12rem; margin: 0 0 6px; }
.proj p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ---------- news ---------- */
.news-item { padding: 14px 0; border-top: 1px solid var(--line); display:flex; gap:16px; }
.news-item:first-child { border-top: none; }
.news-date { color: var(--accent); font-weight:600; font-size:.85rem; min-width: 70px; }

/* ---------- footer ---------- */
footer { background: var(--bg-alt); border-top: 1px solid var(--line);
         padding: 36px 0; color: var(--ink-soft); font-size: .92rem; }
footer a { color: var(--ink-soft); text-decoration: underline; }
footer a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .headshot { margin: 0 auto; order: -1; }
  .hero h1 { font-size: 2.1rem; }
  .cards { grid-template-columns: 1fr; }
  .people { grid-template-columns: repeat(2, 1fr); }
  .brand { margin-right: 0; width: 100%; }
}
