/* ================================================
   由园个人主页 - 深蓝学术风
   ================================================ */
:root {
  --navy-900: #0b1f3a;
  --navy-800: #10294a;
  --navy-700: #14315e;
  --navy-600: #1c4178;
  --blue-500: #2b5ea7;
  --gold: #c9a24b;
  --gold-light: #e3c78a;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e9f0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(11, 31, 58, 0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
}
a { color: var(--blue-500); text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 31, 58, 0.96);
  backdrop-filter: blur(8px);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.site-header .inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.brand { display: flex; align-items: baseline; gap: 10px; color: #fff; }
.brand .name { font-size: 1.35rem; font-weight: 700; letter-spacing: 2px; }
.brand .sub { font-size: .78rem; color: var(--gold-light); letter-spacing: 1px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: rgba(255,255,255,.82); padding: 8px 14px; border-radius: 8px;
  font-size: .95rem; transition: all .2s;
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.main-nav a.active { color: var(--gold-light); background: rgba(201,162,75,.15); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
#authArea { display: flex; align-items: center; gap: 10px; margin-left: 10px; }
#authArea a, #authArea button {
  color: #fff; font-size: .9rem; background: var(--gold); border: none;
  padding: 7px 16px; border-radius: 20px; cursor: pointer; transition: all .2s;
}
#authArea a:hover, #authArea button:hover { background: var(--gold-light); color: var(--navy-900); }
#authArea .ghost { background: transparent; border: 1px solid rgba(255,255,255,.4); }
#authArea .ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(11,31,58,.94) 0%, rgba(20,49,94,.92) 55%, rgba(28,65,120,.9) 100%),
    radial-gradient(circle at 80% 20%, rgba(201,162,75,.25), transparent 45%);
  color: #fff; padding: 90px 0 80px;
}
.hero .inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 50px; flex-wrap: wrap;
}
.hero .avatar {
  width: 210px; height: 210px; border-radius: 50%;
  border: 5px solid var(--gold); box-shadow: 0 12px 40px rgba(0,0,0,.4);
  object-fit: cover; flex-shrink: 0;
}
.hero h1 { font-size: 2.6rem; letter-spacing: 4px; margin-bottom: 6px; }
.hero .titles { font-size: 1.15rem; color: var(--gold-light); margin-bottom: 14px; }
.hero .org { color: rgba(255,255,255,.85); margin-bottom: 24px; }
.hero .tags { display: flex; flex-wrap: wrap; gap: 10px; }
.hero .tags span {
  border: 1px solid rgba(201,162,75,.6); color: var(--gold-light);
  padding: 5px 14px; border-radius: 20px; font-size: .85rem;
}
.hero .cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 30px; border-radius: 30px;
  font-size: 1rem; cursor: pointer; border: none; transition: all .2s;
}
.btn-gold { background: var(--gold); color: var(--navy-900); font-weight: 600; }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.12); }

/* ---------- 数据统计 ---------- */
.stats {
  background: var(--navy-800);
  padding: 34px 0;
}
.stats .grid {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center;
}
.stats .num { font-size: 2.3rem; font-weight: 700; color: var(--gold-light); }
.stats .label { color: rgba(255,255,255,.75); font-size: .95rem; }

/* ---------- 通用区块 ---------- */
section.block { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 1.9rem; color: var(--navy-800); letter-spacing: 2px; }
.section-title .bar {
  width: 64px; height: 4px; background: var(--gold); border-radius: 2px; margin: 12px auto 0;
}
.section-title p.sub { color: var(--muted); margin-top: 10px; font-size: .95rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); border-top: 3px solid transparent;
  transition: all .25s;
}
.card:hover { transform: translateY(-5px); border-top-color: var(--gold); }
.card .icon { font-size: 1.9rem; margin-bottom: 12px; }
.card h3 { color: var(--navy-700); margin-bottom: 8px; font-size: 1.1rem; }
.card p { color: var(--muted); font-size: .93rem; }

.text-block {
  background: var(--card); border-radius: var(--radius); padding: 36px;
  box-shadow: var(--shadow); color: var(--text);
}
.text-block p { margin-bottom: 14px; text-align: justify; }
.text-block p:last-child { margin-bottom: 0; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px;
  width: 3px; background: linear-gradient(180deg, var(--navy-600), var(--gold));
}
.tl-item { position: relative; background: var(--card); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.tl-item::before {
  content: ""; position: absolute; left: -28px; top: 26px; width: 13px; height: 13px;
  background: var(--gold); border: 3px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold);
}
.tl-item .date { color: var(--blue-500); font-weight: 600; font-size: .9rem; }
.tl-item h3 { font-size: 1.05rem; color: var(--navy-800); margin: 4px 0; }
.tl-item p { color: var(--muted); font-size: .92rem; }

/* ---------- 列表 ---------- */
.pub-list { list-style: none; }
.pub-list li {
  background: var(--card); border-radius: 12px; padding: 16px 20px;
  margin-bottom: 12px; box-shadow: var(--shadow); border-left: 4px solid var(--navy-600);
  font-size: .93rem; color: var(--text); transition: all .2s;
}
.pub-list li:hover { border-left-color: var(--gold); transform: translateX(4px); }
.pub-list li em { color: var(--muted); }
.badge {
  display: inline-block; background: var(--navy-700); color: var(--gold-light);
  font-size: .75rem; padding: 2px 10px; border-radius: 12px; margin-left: 6px;
}

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.contact-card {
  background: var(--card); border-radius: var(--radius); padding: 30px;
  text-align: center; box-shadow: var(--shadow);
}
.contact-card .icon {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 16px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: var(--gold-light); font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
}
.contact-card h3 { color: var(--navy-800); margin-bottom: 6px; }
.contact-card p { color: var(--muted); font-size: .95rem; }
.qr-img { width: 180px; border-radius: 10px; border: 3px solid var(--gold); margin: 0 auto 10px; display: block; }

/* ---------- 表单 ---------- */
.form-panel {
  background: var(--card); border-radius: var(--radius); padding: 34px;
  box-shadow: var(--shadow); max-width: 480px; margin: 0 auto;
}
.form-panel.wide { max-width: 640px; }
.form-panel h2 { color: var(--navy-800); margin-bottom: 22px; text-align: center; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .9rem; color: var(--navy-700); margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: .95rem; font-family: inherit; background: #fafbfc;
  transition: border .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue-500); background: #fff;
}
.form-msg { text-align: center; margin-top: 12px; font-size: .92rem; min-height: 1.4em; }
.form-msg.ok { color: #15803d; }
.form-msg.err { color: #dc2626; }
.form-foot { text-align: center; margin-top: 18px; font-size: .92rem; color: var(--muted); }

/* ---------- 表格（管理后台） ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.tbl th, table.tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.tbl th { background: var(--navy-800); color: #fff; white-space: nowrap; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl select, table.tbl button { font-size: .85rem; }
.mini-btn {
  background: var(--navy-600); color: #fff; border: none; padding: 6px 12px;
  border-radius: 8px; cursor: pointer; margin-right: 6px;
}
.mini-btn:hover { background: var(--blue-500); }
.mini-btn.warn { background: #b45309; }
.mini-btn.ghost { background: #e5e9f0; color: var(--navy-800); }

/* ---------- 应用中心 ---------- */
.app-card { position: relative; }
.app-card .open-hint { color: var(--blue-500); font-weight: 600; font-size: .9rem; }
.empty-tip {
  text-align: center; color: var(--muted); background: var(--card);
  padding: 60px 20px; border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--navy-900); color: rgba(255,255,255,.7);
  padding: 44px 0 26px; margin-top: 40px; font-size: .9rem;
}
.site-footer .inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.site-footer h4 { color: var(--gold-light); margin-bottom: 10px; font-size: 1rem; }
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: #fff; }
.copyright {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 18px;
  text-align: center; color: rgba(255,255,255,.45); font-size: .82rem;
}

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navy-900); flex-direction: column; padding: 12px 20px 20px;
    box-shadow: 0 12px 24px rgba(0,0,0,.3);
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; padding: 12px; }
  .hero { padding: 60px 0; }
  .hero .inner { flex-direction: column; text-align: center; gap: 28px; }
  .hero h1 { font-size: 2rem; }
  .hero .avatar { width: 160px; height: 160px; }
  .hero .tags, .hero .cta { justify-content: center; }
  .stats .grid { grid-template-columns: repeat(2, 1fr); }
  section.block { padding: 50px 0; }
  .section-title h2 { font-size: 1.5rem; }
  .site-footer .inner { flex-direction: column; }
}
