/* ============================================================
   Weiqiang Zhou — Academic Personal Website
   Style: Bold Academic
   ============================================================ */

:root {
  --navy:        #1e3a8a;
  --navy-dark:   #162d6e;
  --navy-light:  #2563eb;
  --accent:      #3b82f6;
  --accent-soft: #dbe4ff;
  --bg:          #f0f4ff;
  --white:       #ffffff;
  --text:        #1e293b;
  --text-mid:    #475569;
  --text-muted:  #64748b;
  --border:      #dbe4ff;
  --border-mid:  #bfcfee;
  --card-shadow: 0 1px 4px rgba(30,58,138,0.07);
  --nav-h:       60px;
  --radius-sm:   5px;
  --radius-md:   8px;
  --radius-lg:   12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 17.5px;
  line-height: 1.7;
}

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

/* ── NAV ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  background: var(--navy);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.2px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-bottom-color: rgba(255,255,255,0.6);
  text-decoration: none;
}

/* ── LAYOUT ──────────────────────────────────────────────── */
.main { padding-top: var(--nav-h); }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── HERO (homepage) ─────────────────────────────────────── */
.hero {
  background: var(--navy);
  padding: 48px 0 44px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; right: 80px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
}

.hero-inner {
  display: flex;
  gap: 36px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-avatar {
  flex-shrink: 0;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-info h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.hero-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2px;
}

.hero-affil {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
}

.hero-bio {
  font-size: 1.0rem;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 18px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.chip {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 3px 11px;
  border-radius: 16px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.18s, transform 0.18s;
}

.hero-link:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.link-scholar { background: #fff; color: var(--navy); }
.link-github  { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.link-email   { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.link-twitter { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25); }

/* ── PAGE HEADER (inner pages) ───────────────────────────── */
.page-header {
  background: var(--navy);
  padding: 36px 0 30px;
}

.page-header h1 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 5px;
}

.page-header p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.page-header p a {
  color: rgba(255,255,255,0.85);
}

/* ── SECTIONS ────────────────────────────────────────────── */
.section {
  padding: 40px 0;
}

.section-white {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── NEWS ────────────────────────────────────────────────── */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-item {
  display: flex;
  gap: 16px;
  align-items: baseline;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 18px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.news-item:hover {
  box-shadow: 0 3px 12px rgba(30,58,138,0.12);
  border-color: var(--border-mid);
}

.news-date {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  min-width: 76px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-text {
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.5;
}

.news-text a { color: var(--accent); }
.news-text a:hover { color: var(--navy); }

/* ── PUBLICATIONS ────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 16px 0 4px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-right: 2px;
}

.filter-btn {
  padding: 4px 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  color: var(--text-mid);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}

.filter-btn:hover { border-color: var(--navy); color: var(--navy); }

.filter-btn.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.pub-year-group { margin: 28px 0 0; }

.pub-year-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pub-year-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pub-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 18px 15px 14px;
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.pub-item:hover {
  box-shadow: 0 3px 12px rgba(30,58,138,0.12);
  border-color: var(--border-mid);
}

.pub-year-badge {
  flex-shrink: 0;
  background: var(--navy);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.pub-body { flex: 1; min-width: 0; }

.pub-title {
  font-weight: 600;
  font-size: 1.0rem;
  margin-bottom: 4px;
  line-height: 1.42;
  color: var(--text);
}

.pub-title a { color: var(--text); }
.pub-title a:hover { color: var(--navy); text-decoration: underline; }

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  font-style: italic;
}

.pub-links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pub-link-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid;
  transition: filter 0.15s;
}

.pub-link-tag:hover { filter: brightness(0.88); text-decoration: none; }
.tag-doi    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.tag-note   { background: #f8fafc; color: #64748b; border-color: #cbd5e1; }
.tag-collab { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }

/* ── SOFTWARE CARDS ──────────────────────────────────────── */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.sw-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.sw-card:hover {
  box-shadow: 0 5px 18px rgba(30,58,138,0.13);
  transform: translateY(-2px);
}

.sw-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--navy);
  border-radius: 4px;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 9px;
  align-self: flex-start;
  text-transform: uppercase;
}

.sw-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

.sw-tagline {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: -6px;
}

.sw-desc {
  font-size: 0.94rem;
  color: var(--text-mid);
  line-height: 1.62;
  flex: 1;
}

.sw-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.sw-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 15px;
  border-radius: 6px;
  font-size: 0.80rem;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.18s, transform 0.18s;
}

.sw-link:hover { filter: brightness(0.88); transform: translateY(-1px); text-decoration: none; }
.sw-link-primary   { background: var(--navy); color: var(--white); }
.sw-link-secondary { background: var(--accent-soft); color: var(--navy); border: 1px solid var(--border); }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--navy-dark);
  padding: 28px 0;
  text-align: center;
  margin-top: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.18s;
}

.footer-links a:hover { color: rgba(255,255,255,0.9); }

.footer-copy {
  font-size: 0.77rem;
  color: rgba(255,255,255,0.35);
}

/* ── UTILITIES ───────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── MOBILE ──────────────────────────────────────────────── */
@media (max-width: 680px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-avatar { width: 90px; height: 90px; }
  .hero-info h1 { font-size: 1.6rem; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.80rem; }
  .software-grid { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 1.4rem; }
}
