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

:root {
  --primary: #1a3a6e;
  --primary-light: #2d5fa0;
  --accent: #c0392b;
  --bg: #f0f2f5;
  --surface: #ffffff;
  --text: #212121;
  --text-sec: #666;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.15);
}

html { scroll-behavior: smooth; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

/* ===== Top Navigation ===== */
.top-nav {
  background: var(--primary);
  color: #fff;
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.top-nav .logos { display: flex; align-items: center; gap: 12px; }
.top-nav .logos img { height: 36px; width: auto; max-width: 160px; object-fit: contain; }
.top-nav .nav-title { font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.top-nav .nav-links { margin-left: auto; display: flex; gap: 20px; }
.top-nav .nav-links a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.top-nav .nav-links a:hover { color: #fff; }

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, #1a3a6e 0%, #2d5fa0 60%, #3a7bd5 100%);
  color: #fff;
  text-align: center;
  padding: 60px 20px 50px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 8px; position: relative; }
.hero .subtitle { font-size: 18px; opacity: 0.9; margin-bottom: 6px; position: relative; }
.hero .school-info { font-size: 14px; opacity: 0.7; position: relative; }
.hero .logos-hero { display: flex; justify-content: center; gap: 20px; margin-bottom: 24px; position: relative; }
.hero .logos-hero img { height: 60px; width: auto; max-width: 280px; object-fit: contain; }

/* ===== Experiment Cards ===== */
.section-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin: 48px 0 8px;
}
.section-desc {
  text-align: center;
  color: var(--text-sec);
  font-size: 14px;
  margin-bottom: 32px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
}
.card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-banner {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}
.card-banner .banner-icon { position: relative; z-index: 1; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
.card-banner .banner-icon svg { width: 80px; height: 80px; }
.card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.05));
}
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; color: var(--primary); }
.card-body p { font-size: 13px; color: var(--text-sec); flex: 1; line-height: 1.7; }
.card-tag {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  align-self: flex-start;
}
.tag-ready { background: #e8f5e9; color: #2e7d32; }
.tag-coming { background: #fff3e0; color: #e65100; }

/* Card banner colors — 每个模块一个独立色 */
.banner-blue { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }
.banner-green { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }
.banner-orange { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }
.banner-purple { background: linear-gradient(135deg, #f3e5f5, #e1bee7); }
.banner-red { background: linear-gradient(135deg, #fce4ec, #f8bbd0); }
.banner-teal { background: linear-gradient(135deg, #e0f2f1, #b2dfdb); }
.banner-indigo { background: linear-gradient(135deg, #e8eaf6, #c5cae9); }
.banner-cyan { background: linear-gradient(135deg, #e0f7fa, #b2ebf2); }
.banner-amber { background: linear-gradient(135deg, #fff8e1, #ffecb3); }

/* ===== Footer ===== */
.footer {
  background: #1a2332;
  color: rgba(255,255,255,0.7);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  line-height: 2;
}
.footer a { color: #64b5f6; text-decoration: none; }
.footer .footer-line { margin-bottom: 4px; }

/* ===== Responsive — Tablet ===== */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 16px 32px; }
  .hero { padding: 40px 16px 36px; }
  .hero h1 { font-size: 28px; }
  .section-title { font-size: 22px; margin-top: 32px; }
}

/* ===== Responsive — Mobile ===== */
@media (max-width: 600px) {
  /* Nav: stack vertically */
  .top-nav {
    padding: 8px 12px;
    height: auto;
    flex-wrap: wrap;
    gap: 6px;
  }
  .top-nav .logos img { height: 28px; width: auto; max-width: 120px; }
  .top-nav .nav-title { font-size: 13px; flex-basis: 100%; order: 2; letter-spacing: 0; }
  .top-nav .nav-links { order: 3; gap: 12px; margin-left: 0; }
  .top-nav .nav-links a { font-size: 12px; }

  /* Hero: compact */
  .hero { padding: 28px 16px 24px; }
  .hero h1 { font-size: 20px; margin-bottom: 4px; }
  .hero .subtitle { font-size: 13px; }
  .hero .school-info { font-size: 12px; }
  .hero .logos-hero { gap: 12px; margin-bottom: 16px; }
  .hero .logos-hero img { height: 40px; width: auto; max-width: 180px; }

  /* Section */
  .section-title { font-size: 19px; margin: 24px 0 4px; }
  .section-desc { font-size: 12px; margin-bottom: 16px; }

  /* Cards: single column, compact */
  .card-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 12px 24px; }
  .card-banner { height: 90px; }
  .card-banner .banner-icon { width: 50px; height: 50px; }
  .card-banner .banner-icon svg { width: 50px; height: 50px; }
  .card-body { padding: 14px; }
  .card-body h3 { font-size: 15px; margin-bottom: 4px; }
  .card-body p { font-size: 12px; line-height: 1.6; }
  .card-tag { font-size: 10px; margin-top: 8px; }

  /* Footer */
  .footer { padding: 20px 12px; font-size: 12px; }
}
