/* Zhengwu Zhang — faculty site stylesheet (hand-written, no framework) */
:root {
  --navy: #13294B;        /* UNC navy */
  --carolina: #4B9CD3;    /* Carolina Blue */
  --carolina-dark: #2f7fb5;
  --carolina-tint: #eef6fb;
  --text: #1f2933;
  --muted: #5b6470;
  --border: #e3e7ea;
  --bg: #ffffff;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 920px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--carolina-dark); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); font-weight: 600; line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.6rem; margin-top: 2.4rem; padding-bottom: .35rem; border-bottom: 2px solid var(--carolina); }
h3 { font-size: 1.2rem; margin-top: 1.6rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1rem; }
li { margin-bottom: .35rem; }
strong { font-weight: 600; }
.muted { color: var(--muted); }

/* Header / navigation */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--maxw); margin: 0 auto; padding: .8rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem;
}
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--navy); letter-spacing: .01em; }
.brand:hover { text-decoration: none; color: var(--carolina-dark); }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: inline-block; padding: .35rem 0; font-size: .95rem; font-weight: 500; color: var(--text);
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--carolina-dark); text-decoration: none; border-bottom-color: var(--border); }
.nav a.active { color: var(--navy); border-bottom-color: var(--carolina); }

/* Page container */
main { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
.page-title { margin-bottom: 1.5rem; }
.page-title h1 { font-size: 2.1rem; }
.lead { font-size: 1.08rem; }

/* About page hero */
.hero { display: flex; gap: 2.4rem; align-items: center; margin-bottom: 1.5rem; }
.hero img { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; flex: 0 0 190px; border: 4px solid var(--carolina-tint); box-shadow: 0 2px 10px rgba(19,41,75,.12); }
.hero > div { min-width: 0; flex: 1 1 auto; }
.hero h1 { margin-bottom: .3rem; }
.hero .title { font-size: 1.15rem; color: var(--navy); font-weight: 500; margin-bottom: .45rem; }
.hero .affil { color: var(--text); margin: 0; line-height: 1.5; white-space: nowrap; }
.hero .affil a { color: var(--text); }
.hero .affil a:hover { color: var(--carolina-dark); }
.hero .contact { color: var(--muted); font-size: .95rem; margin: .45rem 0 0; white-space: nowrap; }
.links { display: flex; flex-wrap: wrap; gap: .5rem .6rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.links a {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  padding: .28rem .65rem; border: 1px solid var(--border); border-radius: 999px;
  font-size: .86rem; color: var(--navy); background: #fff;
}
.links a:hover { border-color: var(--carolina); background: var(--carolina-tint); text-decoration: none; }
.links i { color: var(--carolina-dark); font-size: 1rem; }

.callout {
  background: var(--carolina-tint); border-left: 4px solid var(--carolina);
  padding: .9rem 1.1rem; border-radius: 4px; margin: 1.4rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.interests { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .35rem 1.5rem; list-style: none; padding: 0; margin: .6rem 0 0; }
.interests li { margin: 0; padding-left: 1.1rem; position: relative; color: var(--navy); font-weight: 500; white-space: nowrap; }
.interests li::before { content: ""; position: absolute; left: 0; top: .6em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--carolina); }

/* Research */
.area { margin-bottom: 1.2rem; }
.area h2 { border-bottom: none; padding-bottom: 0; margin-top: 2rem; }

/* Publications */
.pub-year { margin-top: 2.2rem; }
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li {
  padding: .7rem 0 .7rem 1rem; margin: 0;
  border-left: 3px solid var(--carolina-tint);
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
.pubs li:hover { border-left-color: var(--carolina); }
.pubs li:last-child { border-bottom: none; }
.pubs .t { font-weight: 600; color: var(--navy); }
.pubs .t:hover { color: var(--carolina-dark); }
.pubs .v { color: var(--muted); }
.pubs .v i, .pubs .v em { color: var(--text); }
.pubs .note { display: inline-block; margin-left: .3rem; padding: 0 .45rem; font-size: .78rem; border-radius: 3px; background: #fff4d6; color: #7a5a00; }
.pubs .me { font-weight: 700; }

/* Teaching */
.courses { list-style: none; padding: 0; margin: 0; }
.courses li { padding: .55rem 0; border-bottom: 1px solid var(--border); }
.courses li:last-child { border-bottom: none; }
.courses .code { font-weight: 600; color: var(--navy); margin-right: .4rem; }
.courses .term { color: var(--muted); font-size: .92rem; margin-left: .4rem; }

/* Awards & grants */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: none; }
.timeline .when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .95rem; padding-top: .05rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; }
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 1.2rem 1.25rem; font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { flex-direction: column; align-items: center; text-align: center; }
  .hero img { width: 150px; height: 150px; flex-basis: auto; }
  .hero .affil, .hero .contact { white-space: normal; }
  .links { justify-content: center; }
  .timeline li { grid-template-columns: 1fr; gap: .1rem; }
  h1 { font-size: 2rem; }
}
@media print {
  .site-header, .site-footer { display: none; }
  main { padding: 0; max-width: none; }
  a { color: inherit; }
}
