:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --ink: #1f2a44;
  --ink-soft: #55617c;
  --ink-faint: #8b96ad;
  --brand: #1d4ed8;
  --brand-dark: #16337e;
  --brand-soft: #e8efff;
  --accent: #0ea5a4;
  --line: #e6e9f2;
  --shadow: 0 10px 30px rgba(20, 40, 90, .08);
  --shadow-sm: 0 4px 14px rgba(20, 40, 90, .06);
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; border: 0; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dark); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 18px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 18px; letter-spacing: .3px; }
.brand .logo-badge {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-faint); }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; color: var(--ink-soft);
  font-weight: 600; font-size: 14px;
}
.nav-links a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav-links a.active { background: var(--brand); color: #fff; }
.nav-legacy {
  margin-left: 10px; font-size: 12.5px; color: var(--ink-faint);
  border: 1px dashed var(--line); padding: 6px 12px; border-radius: 999px;
}
.nav-legacy:hover { color: var(--brand); border-color: var(--brand); background: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 500px at 15% -10%, #2b57d6 0%, transparent 60%),
              radial-gradient(1000px 500px at 100% 0%, #0ea5a4 0%, transparent 55%),
              linear-gradient(135deg, #16337e, #1d4ed8);
}
.hero-inner { padding: 74px 0 84px; max-width: 760px; }
.hero .eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 1px;
  background: rgba(255, 255, 255, .16); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: 40px; line-height: 1.2; font-weight: 800; margin-bottom: 16px; }
.hero p { font-size: 17px; color: rgba(255, 255, 255, .9); max-width: 620px; }
.hero-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #fff; color: var(--brand-dark); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .2); }

/* ---------------- Sections ---------------- */
.section { padding: 56px 0; }
.section.alt { background: linear-gradient(180deg, #fff, var(--bg)); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head h2 { font-size: 28px; font-weight: 800; letter-spacing: .3px; }
.section-head .sub { color: var(--ink-soft); margin-top: 8px; }
.section-head .kicker { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.head-row { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.head-row h2 { font-size: 26px; font-weight: 800; }
.head-row .more { font-weight: 700; font-size: 14px; white-space: nowrap; }

/* ---------------- Cards / Grid ---------------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden; transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.feature { padding: 26px; }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: 14px; }

/* ---------------- News ---------------- */
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-card a.thumb { display: block; aspect-ratio: 16 / 9; background: var(--brand-soft); overflow: hidden; }
.news-card a.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover a.thumb img { transform: scale(1.05); }
.news-card .thumb.no-img { display: grid; place-items: center; color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), #f2fbfa); }
.news-card .thumb.no-img span { font-size: 30px; opacity: .6; }
.news-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; letter-spacing: .5px; }
.news-card h3 { font-size: 16.5px; margin: 8px 0 10px; line-height: 1.45; }
.news-card h3 a { color: var(--ink); }
.news-card h3 a:hover { color: var(--brand); }
.news-card .excerpt { color: var(--ink-soft); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.news-card .read { margin-top: 14px; font-weight: 700; font-size: 13.5px; }

/* list view (news.html) */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-row { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: stretch; }
.news-row .thumb { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden; background: var(--brand-soft); }
.news-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-row .thumb.no-img { display: grid; place-items: center; color: var(--brand); font-size: 26px; }
.news-row .rbody { padding: 6px 4px; display: flex; flex-direction: column; }
.news-row h3 { font-size: 19px; margin: 6px 0 10px; }
.news-row h3 a { color: var(--ink); }
.news-row h3 a:hover { color: var(--brand); }
.news-row .excerpt { color: var(--ink-soft); font-size: 14px; }

/* ---------------- Members ---------------- */
.member-group { margin-bottom: 40px; }
.member-group h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; display: flex; align-items: center; gap: 12px; }
.member-group h2::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: linear-gradient(var(--brand), var(--accent)); }
.member-group .gsub { color: var(--ink-faint); font-size: 13px; margin: 0 0 20px 18px; }

.member-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 18px; }
.member-card .avatar { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); border: 4px solid #fff; box-shadow: 0 6px 18px rgba(20, 40, 90, .12); }
.member-card h3 { margin-top: 14px; font-size: 17px; }
.member-card .lines { margin-top: 8px; font-size: 12.8px; color: var(--ink-soft); line-height: 1.7; }
.member-card .lines span { display: block; }

/* leader spotlight */
.leader-card { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; padding: 28px; }
.leader-card .avatar { width: 180px; height: 220px; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow); }
.leader-card h3 { font-size: 24px; }
.leader-card .lines { margin-top: 12px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.9; }
.leader-card .lines span { display: block; }

/* ---------------- Detail (news) ---------------- */
.article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 40px; max-width: 860px; margin: 0 auto; }
.article .crumb { font-size: 13px; color: var(--ink-faint); margin-bottom: 18px; }
.article h1 { font-size: 28px; line-height: 1.35; margin-bottom: 12px; }
.article .meta { color: var(--ink-faint); font-size: 13.5px; font-weight: 600; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.article p { font-size: 16px; color: #35405e; margin-bottom: 18px; text-align: justify; }
.article figure { margin: 22px 0; }
.article figure img { width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.article .back { margin-top: 30px; }

/* ---------------- Static content (achievement / team) ---------------- */
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 34px 38px; }
.prose h2 { font-size: 22px; margin: 28px 0 12px; color: var(--brand-dark); display: flex; align-items: center; gap: 10px; }
.prose h2::before { content: ""; width: 6px; height: 20px; border-radius: 3px; background: linear-gradient(var(--brand), var(--accent)); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 16.5px; margin: 20px 0 8px; color: var(--ink); }
.prose p { color: #35405e; font-size: 14.5px; margin-bottom: 12px; text-align: justify; }
.prose .ref { padding-left: 26px; text-indent: -26px; }
.prose b { color: var(--ink); }
.prose hr { border: 0; border-top: 1px dashed var(--line); margin: 22px 0; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 8px; }
.info-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.info-tile .ico { font-size: 24px; margin-bottom: 10px; }
.info-tile h3 { font-size: 15px; margin-bottom: 6px; }
.info-tile p { color: var(--ink-soft); font-size: 13.5px; }

/* ---------------- Footer ---------------- */
.site-footer { background: #0f1b3d; color: #c6cfe6; margin-top: 60px; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer p, .site-footer a { color: #aab6d6; font-size: 13.5px; line-height: 1.9; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 26px; padding-top: 18px; text-align: center; font-size: 12.5px; color: #8291b8; }

/* ---------------- Lazy image fade ---------------- */
img.lazy { opacity: 0; transition: opacity .5s ease; background: var(--brand-soft); }
img.lazy.loaded { opacity: 1; }
.img-skeleton { position: relative; background: linear-gradient(100deg, #eef2fb 30%, #e2e8f6 50%, #eef2fb 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------------- States ---------------- */
.empty { text-align: center; color: var(--ink-faint); padding: 50px 0; }
.loading { text-align: center; color: var(--ink-faint); padding: 40px 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 10px 16px 18px; gap: 6px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-legacy { margin: 6px 0 0; text-align: center; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 30px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; }
  .news-row { grid-template-columns: 1fr; }
  .news-row .thumb { aspect-ratio: 16 / 9; }
  .leader-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .article { padding: 24px 18px; }
  .prose { padding: 22px 18px; }
}
@media (max-width: 480px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .hero-inner { padding: 54px 0 60px; }
  .hero h1 { font-size: 26px; }
}

/* ---------------- Admin ---------------- */
.admin-bar { background: var(--brand-dark); color: #fff; }
.admin-bar .wrap { display: flex; align-items: center; gap: 14px; height: 58px; }
.admin-bar .title { font-weight: 800; font-size: 16px; }
.admin-bar .spacer { flex: 1; }
.admin-tabs { display: flex; gap: 8px; margin: 24px 0; }
.admin-tabs button { padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; color: var(--ink-soft); }
.admin-tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.panel { display: none; }
.panel.active { display: block; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.hint { background: #fff7e6; border: 1px solid #ffe0a3; color: #8a5a00; padding: 14px 18px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 20px; line-height: 1.8; }
.hint code { background: #fff0cc; padding: 1px 6px; border-radius: 4px; }

.item-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 14px; }
.item-row .ir-thumb { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--brand-soft); flex: 0 0 auto; }
.item-row .ir-main { flex: 1; min-width: 0; }
.item-row .ir-main strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row .ir-main small { color: var(--ink-faint); }
.item-row .ir-actions { display: flex; gap: 8px; }

.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-solid { background: var(--brand); color: #fff; border: 1px solid var(--brand); cursor: pointer; }
.btn-solid:hover { background: var(--brand-dark); }
.btn-line { background: #fff; color: var(--ink-soft); border: 1px solid var(--line); cursor: pointer; }
.btn-line:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: #fff; color: #d13b3b; border: 1px solid #f3c2c2; cursor: pointer; }
.btn-danger:hover { background: #fdeaea; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.field .tip { font-size: 12px; color: var(--ink-faint); margin-top: 5px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.modal-mask { position: fixed; inset: 0; background: rgba(15, 27, 61, .5); display: none; z-index: 100; padding: 24px; overflow: auto; }
.modal-mask.open { display: block; }
.modal { background: #fff; max-width: 720px; margin: 30px auto; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.modal-head { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { font-size: 18px; }
.modal-head .x { margin-left: auto; cursor: pointer; font-size: 22px; color: var(--ink-faint); background: none; border: 0; }
.modal-body { padding: 24px; max-height: 66vh; overflow: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.preview-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.preview-imgs img { width: 84px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
