/* ==========================================================
   PGAI Lab · NUIST — shared stylesheet
   ========================================================== */
:root {
  --blue-900: #0d2f5c;
  --blue-700: #12477d;
  --blue-600: #1a56a0;
  --blue-500: #2467b8;
  --gold: #c9a227;
  --ink: #1f2733;
  --ink-soft: #4a5568;
  --line: #e3e9f2;
  --bg: #f6f8fb;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(18, 71, 125, 0.08);
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); text-decoration: underline; }

img { max-width: 100%; display: block; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 47, 92, 0.97);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; color: #fff; }
.brand .logo-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(135deg, var(--gold), #e3c65a);
  color: var(--blue-900); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.5px;
}
.brand .logo-img {
  width: 40px; height: 40px; border-radius: 9px; object-fit: contain;
  background: #f5f7fa; flex: none;
}
.footer-logo {
  height: 46px; width: auto; border-radius: 8px; margin-bottom: 10px;
  background: #f5f7fa; display: block;
}
.brand .brand-text { line-height: 1.2; }
.brand .brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.3px; }
.brand .brand-sub { font-size: 11.5px; opacity: 0.75; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: rgba(255, 255, 255, 0.85); font-size: 15px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: background 0.15s;
}
.main-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; text-decoration: none; }
.main-nav a.active { background: rgba(255, 255, 255, 0.16); color: #fff; }
.lang-switch {
  margin-left: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  color: var(--blue-900) !important; background: #fff; border-radius: 20px;
}
.lang-switch:hover { background: var(--gold); color: var(--blue-900) !important; }

.nav-toggle {
  display: none; background: none; border: 0; color: #fff;
  font-size: 22px; cursor: pointer; padding: 6px 10px;
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(120deg, rgba(13, 47, 92, 0.88) 0%, rgba(18, 71, 125, 0.78) 55%, rgba(26, 86, 160, 0.66) 100%),
    url("../img/campus-hero.jpg?v=20261120") center / cover no-repeat;
  background-color: var(--blue-900);
  color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.22), transparent 70%);
}
.hero .motto {
  display: inline-block; font-size: 14px; letter-spacing: 4px;
  color: var(--gold); border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 20px; padding: 4px 16px; margin-bottom: 18px;
}
.hero h1 { font-size: 34px; line-height: 1.35; font-weight: 800; margin-bottom: 8px; }
.hero .hero-en { font-size: 19px; opacity: 0.9; font-weight: 500; margin-bottom: 18px; }
.hero p.lead { max-width: 760px; font-size: 16.5px; opacity: 0.92; }
.hero .hero-actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 11px 26px; border-radius: 8px;
  font-size: 15px; font-weight: 600; transition: transform 0.12s, box-shadow 0.12s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--blue-900) !important; }
.btn-gold:hover { background: #d9b53e; }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, 0.65); color: #fff !important; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--blue-900), var(--blue-700));
  color: #fff; padding: 44px 0 40px;
}
.page-hero h1 { font-size: 28px; font-weight: 800; }
.page-hero .crumb { font-size: 13.5px; opacity: 0.7; margin-bottom: 6px; }

/* ---------- Sections ---------- */
section.block { padding: 56px 0; }
section.block + section.block { border-top: 1px solid var(--line); }
.section-title { font-size: 24px; font-weight: 800; color: var(--blue-900); margin-bottom: 6px; }
.section-title .en { font-size: 15px; font-weight: 500; color: var(--ink-soft); margin-left: 10px; }
.section-sub { color: var(--ink-soft); margin-bottom: 26px; font-size: 15px; }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 8px;
}
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; box-shadow: var(--shadow);
}
.stat .num { font-size: 30px; font-weight: 800; color: var(--blue-600); line-height: 1.2; }
.stat .num small { font-size: 15px; font-weight: 600; }
.stat .label { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- Intro & research cards ---------- */
.intro-lead {
  font-size: 15.5px; color: var(--ink); line-height: 1.95;
  margin-bottom: 28px; text-align: justify;
}
.research-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.research-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 16px 18px; text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.research-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(18, 71, 125, 0.14); }
.research-card svg { width: 56px; height: 56px; margin: 0 auto 12px; display: block; }
.research-card h3 { font-size: 15.5px; color: var(--blue-900); margin-bottom: 6px; }
.research-card p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.65; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { font-size: 17px; color: var(--blue-900); margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--ink-soft); }
.card .icon { font-size: 26px; margin-bottom: 10px; }
.card .card-photo {
  width: 100%; height: 150px; object-fit: cover;
  border-radius: 8px; margin-bottom: 14px; background: var(--bg);
}

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.member {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.member:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(18, 71, 125, 0.14); }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.member.director .avatar { background: linear-gradient(135deg, var(--blue-900), var(--gold)); }
.member .name { font-size: 17px; font-weight: 700; color: var(--blue-900); }
.member .title { font-size: 13px; color: var(--gold); font-weight: 600; margin: 2px 0 8px; min-height: 18px; }
.member .field { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.member .email { display: inline-block; margin-top: 10px; font-size: 12.5px; word-break: break-all; }
.member .bio { font-size: 13px; color: var(--ink-soft); text-align: left; margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; line-height: 1.7; }
.member img.avatar-img, .director-photo {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 12px; display: block; border: 3px solid #eaf1fa;
}
.director-photo { width: 110px; height: 110px; }
.member .homepage { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 600; }

/* ---------- Lists ---------- */
.feat-list { list-style: none; }
.feat-list li { padding: 9px 0 9px 30px; position: relative; color: var(--ink); font-size: 15px; }
.feat-list li::before {
  content: "✓"; position: absolute; left: 0; top: 9px;
  color: var(--gold); font-weight: 800;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  background: #eaf1fa; color: var(--blue-700); border-radius: 20px;
  padding: 6px 16px; font-size: 14px; font-weight: 500;
}

/* ---------- Partners ---------- */
.partner-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.partner-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 12px 12px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
}
.partner-item img { height: 44px; width: 100%; object-fit: contain; }
.partner-item span { font-size: 12.5px; color: var(--ink-soft); text-align: center; line-height: 1.45; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(120deg, var(--blue-700), var(--blue-600));
  color: #fff; border-radius: var(--radius); padding: 40px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta h2 { font-size: 24px; margin-bottom: 8px; }
.cta p { opacity: 0.9; font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: rgba(255, 255, 255, 0.8); padding: 36px 0; margin-top: 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.footer-inner a { color: rgba(255, 255, 255, 0.85); }
.footer-inner .motto { color: var(--gold); letter-spacing: 2px; margin-top: 6px; font-size: 13px; }
.busuanzi-wrap {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12.5px; color: rgba(255, 255, 255, 0.6);
}
.busuanzi-wrap span span { color: rgba(255, 255, 255, 0.85); font-weight: 600; }
.photo-credit { margin-top: 10px; font-size: 12px; color: rgba(255, 255, 255, 0.45); }
.photo-credit a { color: rgba(255, 255, 255, 0.6); }
.photo-credit a:hover { color: rgba(255, 255, 255, 0.85); }

/* ---------- Publications ---------- */
.pub-group { margin: 30px 0 12px; font-size: 18px; font-weight: 700; color: var(--blue-900); }
.pub-group:first-of-type { margin-top: 0; }
.pub-group span { font-size: 13.5px; font-weight: 500; color: var(--ink-soft); margin-left: 8px; }
.year-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.year-nav a {
  background: #eaf1fa; color: var(--blue-700); border-radius: 16px;
  padding: 4px 13px; font-size: 13px; font-weight: 600;
}
.year-nav a:hover { background: var(--gold); color: var(--blue-900); text-decoration: none; }
.pub-year {
  font-size: 22px; font-weight: 800; color: var(--blue-900);
  margin: 36px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--gold);
}
.pub-cat { font-size: 15px; font-weight: 700; color: var(--blue-700); margin: 16px 0 8px; }
.pub-cat span { color: var(--ink-soft); font-weight: 500; font-size: 13px; }
.pub-card { padding: 6px 22px; }
.pub-item .venue-line { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.tier {
  display: inline-block; background: #fdf3d7; color: #8a6d1a; border-radius: 5px;
  padding: 1px 8px; font-size: 12px; font-weight: 600; margin-left: 6px;
}
.pub-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.pub-item:last-child { border-bottom: 0; }
.pub-item .venue {
  display: inline-block; background: #eaf1fa; color: var(--blue-700);
  border-radius: 6px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; margin-right: 8px;
}
.pub-item .title { font-weight: 600; }
.pub-item .title a { color: inherit; }
.pub-item .title a:hover { color: var(--blue-600); text-decoration: underline; }
.pub-item .authors { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .research-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-grid { grid-template-columns: repeat(3, 1fr); }
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--blue-900); flex-direction: column; align-items: stretch;
    padding: 10px 16px 16px; gap: 2px;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 27px; }
  .hero {
    background-image:
      linear-gradient(120deg, rgba(13, 47, 92, 0.88) 0%, rgba(18, 71, 125, 0.78) 55%, rgba(26, 86, 160, 0.66) 100%),
      url("../img/campus-hero-sm.jpg?v=20261120");
  }
}
@media (max-width: 560px) {
  .card-grid, .team-grid, .stats { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 52px 0 44px; }
}
