/* =========================================================
   Yinya Huang — personal site styles
   ========================================================= */

:root {
  --accent: #1565c0;        /* primary blue — buttons / active states */
  --accent-dark: #0d3c78;   /* hover / darker */
  --link: #003399;          /* hyperlinks — deep blue (lupan) */
  --ink: #111111;           /* headings — black */
  --text: #1c1c1c;          /* body text */
  --muted: #6b7280;         /* secondary text / icons */
  --rule: #e5e7eb;          /* hairlines */
  --nav-h: 3.75rem;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  padding-top: var(--nav-h);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.12rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

p { margin-bottom: 1rem; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--link); text-decoration: underline; }

/* ---------- Navbar (light) ---------- */
.navbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.navbar .navbar-brand {
  color: var(--ink) !important;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.navbar .nav-link {
  color: var(--muted) !important;
  font-weight: 500;
  padding-left: .9rem !important;
  padding-right: .9rem !important;
}
.navbar .nav-link:hover { color: var(--accent) !important; }

/* ---------- Profile header ---------- */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 2.75rem;
  padding-top: 3rem;
  padding-bottom: .5rem;
}
.profile-photo { flex: 0 0 240px; text-align: center; }
.profile-photo img {
  width: 100%;
  max-width: 240px;
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(20, 33, 61, .14);
}
.profile-bio { flex: 1 1 auto; min-width: 0; }
.profile-bio ul { padding-left: 1.15rem; }
.profile-bio li { margin-bottom: 0; line-height: 1.5; }
.profile-bio li::marker { color: #111111; }

/* social icons under photo */
.social-links {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
  gap: .85rem;
  font-size: 1.5rem;
}
.social-links a { color: var(--accent); }
.social-links a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Section headings ---------- */
h3 {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  /* fixed-navbar anchor offset */
  padding-top: calc(var(--nav-h) + 1.5rem);
  margin-top: calc(-1 * var(--nav-h));
  margin-bottom: 1.25rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule);
}
/* retire the old divider that followed each heading */
h3 + hr { display: none; }

/* ---------- News list ---------- */
#div-news { padding-top: 1.5rem; }
#div-news ul { list-style: none; padding-left: 0; }
#div-news li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0;
  line-height: 1.5;
}
#div-news li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #111111;
}
#div-news li strong { color: #111111; }

/* show more / less */
#more { display: none; }
#showMoreBtn {
  display: inline-block;
  margin-top: .6rem;
  padding: .35rem 1.1rem;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
}
#showMoreBtn:hover { background: var(--accent); color: #fff; }

/* ---------- Publication category filter ---------- */
.category-buttons { text-align: left; margin-bottom: 1.25rem; }
.category-btn {
  background: #f4f6f9;
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: .5rem 1.1rem;
  margin: .25rem .35rem .25rem 0;
  font-size: .92rem;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
  outline: none;
}
.category-btn:hover { border-color: var(--accent); color: var(--accent); }
.category-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.publication-item { transition: all .3s ease; }
.publication-item.hidden { display: none; }
.publication-item.hidden + hr { display: none; }

/* small inline logo (e.g. highlight icon) */
#logo { width: 1.4em; margin-right: 4px; border: 0; vertical-align: -2px; }

/* generic images inside content */
.container img:not(.profile-photo img):not(#logo) { max-width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .profile-header { flex-direction: column; align-items: center; text-align: left; gap: 1.5rem; }
  .profile-photo { flex-basis: auto; }
  body { font-size: 1rem; }
  h3 { font-size: 1.45rem; }
}
