/* ==============================
   581毕业四十周年纪念册知识库 样式
   参照: 巴菲特致股东信知识库风格
   ============================== */

:root {
  --primary: #1a3a5c;
  --secondary: #2d6a9f;
  --accent: #c8a45e;
  --bg: #f5f3ee;
  --card-bg: #ffffff;
  --text: #2c2c2c;
  --text-light: #666;
  --border: #ddd5c8;
  --shadow: rgba(26, 58, 92, 0.08);
  --radius: 8px;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

/* === Header === */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, #0f2847 100%);
  color: #fff;
  padding: 40px 20px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.header-inner { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; }

.header-subtitle {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 500;
}

.header-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.header-desc {
  font-size: 15px;
  opacity: 0.85;
  max-width: 640px;
  margin: 0 auto 24px;
  line-height: 1.8;
}

.header-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.stat-item {
  text-align: center;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 12px 24px;
  min-width: 100px;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 12px;
  opacity: 0.8;
  letter-spacing: 1px;
}

/* Nav pills */
.header-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-pill {
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 7px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.15);
}

.nav-pill:hover, .nav-pill.active {
  background: rgba(255,255,255,0.2);
  border-color: var(--accent);
  color: var(--accent);
}

/* === Main Container === */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* === Section Title === */
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .icon {
  font-size: 20px;
}

/* === Card Grid === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: block;
  box-shadow: 0 2px 8px var(--shadow);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
  border-color: var(--secondary);
}

.card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.card-meta {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
}

.card-tag {
  display: inline-block;
  background: rgba(45,106,159,0.1);
  color: var(--secondary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 6px;
}

/* === Table === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 32px;
  font-size: 14px;
}

.data-table th {
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 13px;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: rgba(45,106,159,0.04); }

.data-table a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
}

.data-table a:hover { text-decoration: underline; }

.data-table .tel {
  font-family: monospace;
  font-size: 13px;
  color: var(--text);
}

/* === Timeline === */
.timeline {
  position: relative;
  padding-left: 32px;
  margin-bottom: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--secondary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--secondary);
}

.timeline-year {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.timeline-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
}

/* === Person Detail Page === */
.person-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0f2847 100%);
  color: #fff;
  padding: 32px 24px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  text-align: center;
}

.person-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(200,164,94,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
  border: 3px solid var(--accent);
}

.person-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.person-unit {
  font-size: 14px;
  opacity: 0.8;
}

.info-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 24px;
}

.info-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.info-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 14px;
}

.info-label {
  font-weight: 600;
  color: var(--text-light);
  min-width: 80px;
  flex-shrink: 0;
}

.info-value { color: var(--text); }

.info-value a { color: var(--secondary); text-decoration: none; }

.info-value a:hover { text-decoration: underline; }

/* === Article List === */
.article-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.2s;
}

.article-item:hover {
  border-color: var(--secondary);
  transform: translateX(4px);
}

.article-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
  text-decoration: none;
}

.article-title a { color: inherit; text-decoration: none; }

.article-title a:hover { color: var(--secondary); }

.article-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.article-excerpt {
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
}

/* === Article Detail === */
.article-body {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px 48px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow);
  max-width: 780px;
  margin: 0 auto 32px;
  line-height: 2;
  font-size: 15px;
  white-space: pre-wrap;
}

.article-body h1 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 8px;
  text-align: center;
}

.article-body .author {
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* === Graph placeholder === */
.graph-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px;
  text-align: center;
  box-shadow: 0 2px 8px var(--shadow);
}

.graph-placeholder {
  background: linear-gradient(135deg, var(--primary) 0%, #0f2847 100%);
  border-radius: var(--radius);
  padding: 80px 40px;
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.graph-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='4' fill='rgba(200,164,94,0.4)'/%3E%3Ccircle cx='50' cy='35' r='6' fill='rgba(200,164,94,0.6)'/%3E%3Ccircle cx='75' cy='20' r='3' fill='rgba(200,164,94,0.3)'/%3E%3Ccircle cx='30' cy='65' r='5' fill='rgba(200,164,94,0.5)'/%3E%3Ccircle cx='70' cy='70' r='4' fill='rgba(200,164,94,0.4)'/%3E%3Cline x1='20' y1='20' x2='50' y2='35' stroke='rgba(255,255,255,0.2)' stroke-width='1'/%3E%3Cline x1='50' y1='35' x2='75' y2='20' stroke='rgba(255,255,255,0.2)' stroke-width='1'/%3E%3Cline x1='30' y1='65' x2='50' y2='35' stroke='rgba(255,255,255,0.2)' stroke-width='1'/%3E%3Cline x1='70' y1='70' x2='50' y2='35' stroke='rgba(255,255,255,0.2)' stroke-width='1'/%3E%3C/svg%3E");
}

.graph-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.graph-sub {
  font-size: 14px;
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

.graph-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  text-align: left;
}

.graph-link-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  transition: all 0.2s;
}

.graph-link-card:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.graph-link-card .gl-name { font-weight: 600; margin-bottom: 2px; }

.graph-link-card .gl-desc { font-size: 11px; opacity: 0.7; }

/* === Footer === */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 24px 20px;
  font-size: 13px;
}

.site-footer a { color: var(--accent); text-decoration: none; }

/* === Back button === */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--secondary);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 24px;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.back-btn:hover {
  background: rgba(45,106,159,0.08);
  color: var(--primary);
}

/* === Highlight tags === */
.highlight-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 600;
}

/* === Section links === */
.section-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.section-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  box-shadow: 0 2px 8px var(--shadow);
}

.section-link:hover {
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}

.section-link .sl-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.section-link .sl-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--primary);
}

.section-link .sl-count {
  font-size: 12px;
  color: var(--text-light);
}

/* === Responsive === */
@media (max-width: 640px) {
  .header-title { font-size: 22px; }
  .header-stats { gap: 16px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .article-body { padding: 24px 20px; }
  .container { padding: 20px 12px 40px; }
}
