/* chenminxia.com — single hand-written stylesheet, no frameworks.
   Typography follows tonycookson.com: Inter for body and UI text,
   EB Garamond for the name, section headings, and paper titles. */

:root {
  --ink: #1e1e1e;
  --muted: #636363;
  --accent: #00684b;      /* INSEAD green (from the official logo) */
  --accent-dark: #004f39;
  --rule: #dedad3;
  --bg: #faf9f6;
  --maxw: 960px;    /* centered content column, as on tonycookson.com */
  --sidepad: clamp(1.25rem, 5vw, 2.5rem);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 15.5px/1.7 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

header.site {
  position: sticky; top: 0; z-index: 100;
  background: var(--accent-dark);
  padding: 0 var(--sidepad);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.header-inner {
  min-height: 52px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
}
.site-name {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  margin-right: auto;
}
nav.site a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-left: 1.6rem;
  transition: color 0.18s;
}
nav.site a:hover { color: #ffffff; }
nav.site a[aria-current="page"] {
  color: #ffffff;
  border-bottom: 2px solid rgba(255, 255, 255, 0.85);
  padding-bottom: 2px;
}

main {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--sidepad));
  margin: 0 auto;
  padding: 3rem var(--sidepad) 4rem;
  flex: 1;
}

h1 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--accent-dark);
  margin: 0 0 0.35rem;
}
h2 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent-dark);
  margin: 3rem 0 0;
}
h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin: 0.75rem 0 1.5rem;
}
h2:first-child { margin-top: 0; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

/* home */
.hero {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.hero img {
  width: 200px;
  height: auto;
  flex-shrink: 0;
}
.hero .intro { flex: 1 1 20rem; }
.hero .intro > p { font-size: 0.93rem; line-height: 1.75; }
.role { color: var(--muted); font-size: 0.92rem; margin: 0 0 0.9rem; }
.market-badge {
  display: inline-block;
  background: #e8f1ed;
  color: var(--accent-dark);
  border: 1px solid #b9d4c9;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  margin-bottom: 1.2rem;
}
.update-note {
  color: var(--muted);
  font-style: italic;
  font-size: 0.85rem;
  margin: 0 0 1.1rem;
}
.interests {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 1.1rem;
}
.interests strong { color: var(--accent-dark); font-weight: 600; }
.contact { margin-top: 1.4rem; color: var(--muted); font-size: 0.9rem; }
.contact a { white-space: nowrap; }

/* research: papers as a hairline-separated list */
.paper {
  padding: 1.4rem 0;
  margin: 0;
  border-bottom: 1px solid var(--rule);
}
h2 + .paper, h2 + article.paper { border-top: 1px solid var(--rule); }
.paper h3 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.3rem;
}
.paper h3 a { color: inherit; text-decoration: none; transition: color 0.15s; }
.paper h3 a:hover { color: var(--accent); }
.paper .meta {
  color: var(--muted);
  font-size: 0.83rem;
  margin: 0 0 0.35rem;
}
.paper p.blurb { font-size: 0.9rem; line-height: 1.7; margin: 0.4rem 0 0.6rem; }
/* unfolded abstract: text in the left column; the right column is reserved
   for a future headline figure from each paper (drop a .sig figure in). */
.abs-cols { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: flex-start; }
.abs-cols > p, .abs-cols > .blurb { flex: 1 1 26rem; max-width: 48rem; margin: 0.4rem 0 0; }
.abs-cols > .sig { flex: 1 1 20rem; max-width: 28rem; margin: 0.4rem 0 0; }
details {
  margin-top: 0.4rem;
  border-left: 3px solid var(--rule);
  padding-left: 0.9rem;
}
details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
details[open] summary { color: var(--accent-dark); }
details p { font-size: 0.9rem; line-height: 1.7; color: #333333; }
.sig { margin: 1rem auto 0; max-width: 30rem; }
.sig img {
  width: 100%;
  display: block;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: #ffffff;
}
.sig figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0.45rem;
}

/* teaching */
.teach-block { margin-bottom: 2rem; }
.teach-block h3 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}
.teach-block ul { margin: 0; padding-left: 1.2rem; }
.teach-block li { margin-bottom: 0.45rem; font-size: 0.93rem; }
.teach-note { color: var(--muted); font-size: 0.85rem; }

footer.site {
  margin-top: auto;
  background: var(--accent-dark);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-size: 0.8rem;
  padding: 2rem var(--sidepad);
}
footer.site a { color: rgba(255, 255, 255, 0.85); }
footer.site .footer-inner { margin: 0 auto; }

@media (max-width: 34rem) {
  .hero { gap: 1.4rem; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.55rem; }
}
