/* ============================================================
   小崔老师 · 个人主页
   设计方向：现代简约 / 作品集感 / 蓝色理性科技风
   视觉系统：浅蓝页面底 + 深蓝导航/强调色 + 统一线性 SVG 图标
   ============================================================ */

:root {
  /* —— 深蓝 / 科技蓝强调色 —— */
  --accent:      #2563eb;   /* 主按钮、图标、进度条 */
  --accent-ink:  #1e3a8a;   /* 深蓝：导航栏背景、标题强调 */
  --accent-soft: #3b82f6;   /* 中蓝：hover、次级强调 */
  --accent-weak: rgba(37, 99, 235, 0.08);
  --accent-line: rgba(37, 99, 235, 0.22);

  /* —— 中性文字色（带一点 slate 倾向，适配蓝底） —— */
  --ink:    #0f172a;   /* 标题 */
  --text:   #334155;   /* 正文 */
  --muted:  #64748b;   /* 次级说明 */
  --faint:  #94a3b8;   /* 极弱提示 */

  /* —— 浅蓝页面底与卡片 —— */
  --bg:        #f0f7ff;   /* 浅蓝页面背景 */
  --surface:   #ffffff;   /* 卡片 */
  --surface-2: #e8f3ff;   /* 浅蓝填充块 */
  --line:      #dbeafe;
  --line-strong: #bfdbfe;

  /* —— 圆角 / 阴影 —— */
  --radius-sm: 12px;
  --radius:    18px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .05);
  --shadow:    0 2px 6px rgba(15, 23, 42, .05), 0 12px 30px rgba(15, 23, 42, .07);

  --maxw: 1100px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Source Han Sans SC", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-ink); }

/* ---------- 滚动进度条 ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--accent); z-index: 300; transition: width .12s ease-out;
}

/* ---------- 顶部导航：深蓝背景 ---------- */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--accent-ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.nav-brand span { color: rgba(255, 255, 255, 0.70); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  position: relative; display: block; padding: 8px 14px;
  border-radius: 999px; font-size: 14px; color: rgba(255, 255, 255, 0.85); transition: all .2s;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.10); }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 5px;
  height: 2px; background: #fff; border-radius: 2px;
}

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9px; padding: 6px 11px; font-size: 16px; color: #fff; cursor: pointer;
}

/* ---------- 编辑式小标题 eyebrow + 板块标题 ---------- */
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .2em;
  color: var(--accent); margin-bottom: 14px;
}
.sec-head { text-align: center; max-width: 660px; margin: 0 auto 8px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.sec-head p { margin-top: 12px; font-size: 15px; color: var(--muted); }

/* ---------- Hero 区 ---------- */
.hero { position: relative; padding: 116px 0 92px; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 52% at 50% 0%, var(--accent-weak), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1.4px);
  background-size: 24px 24px; opacity: .45;
  -webkit-mask-image: radial-gradient(68% 60% at 50% 28%, #000 0%, transparent 76%);
          mask-image: radial-gradient(68% 60% at 50% 28%, #000 0%, transparent 76%);
}
.hero .container { position: relative; z-index: 1; }

.avatar {
  width: 104px; height: 104px; margin: 0 auto 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 6px var(--accent-weak), var(--shadow-sm);
  color: var(--accent); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.hero h1 { font-size: clamp(40px, 6vw, 60px); font-weight: 700; letter-spacing: -.02em; color: var(--ink); line-height: 1.1; }
.hero .tagline { margin-top: 14px; font-size: clamp(16px, 2vw, 19px); color: var(--text); font-weight: 500; }
.hero .intro { max-width: 640px; margin: 26px auto 0; font-size: 16px; color: var(--muted); text-align: left; }

.badges { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; color: var(--text); box-shadow: var(--shadow-sm);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero-cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 26px;
  border-radius: 999px; font-size: 14px; font-weight: 500; border: none; cursor: pointer; transition: all .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .28); }
.btn-primary:hover { background: var(--accent-ink); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent-line); }
.btn-ghost:hover { background: var(--accent-weak); color: var(--accent-ink); }

/* ---------- 主推项目面板 ---------- */
.panel {
  margin-top: 44px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(28px, 4vw, 48px);
}
.panel-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.panel-icon {
  flex: none; width: 64px; height: 64px; border-radius: 18px;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .30);
}
.panel-icon svg { width: 32px; height: 32px; }
.panel-title { flex: 1; }
.panel-title h3 { font-size: 24px; font-weight: 700; color: var(--ink); display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.panel-title .en { font-size: 13px; color: var(--muted); margin-top: 4px; }

.status-tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 500; vertical-align: 2px; border: 1px solid transparent;
}
.status-online { background: var(--accent); color: #fff; }
.status-beta   { background: var(--accent-weak); color: var(--accent-ink); border-color: var(--accent-line); }
.status-dev    { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.status-plan   { background: var(--surface-2); color: var(--text); border-color: var(--line); }

.panel-desc { font-size: 16px; color: var(--text); margin-bottom: 8px; }

/* 能力网格 */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 26px; }
.cap {
  display: flex; gap: 14px; padding: 18px; border-radius: var(--radius);
  border: 1px solid transparent; background: var(--surface-2); transition: all .25s;
}
.cap:hover { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.cap .ic {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent-weak); color: var(--accent); display: grid; place-items: center;
}
.cap .ic svg { width: 22px; height: 22px; }
.cap h4 { font-size: 15px; font-weight: 600; color: var(--ink); }
.cap p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.6; }

.panel-note {
  margin-top: 26px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 14px; color: var(--text); line-height: 1.7;
}
.panel-cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 项目卡片区（数据驱动） ---------- */
.work-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.work {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 26px; display: flex; flex-direction: column; transition: all .3s;
}
.work:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.work .cover {
  height: 124px; border-radius: var(--radius); background: var(--surface-2);
  display: grid; place-items: center; color: var(--accent); margin-bottom: 18px; overflow: hidden;
}
.work .cover svg { width: 40px; height: 40px; }
.work .cover img { width: 100%; height: 100%; object-fit: cover; }
.work h3 { font-size: 18px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.work .en { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.work p { font-size: 14px; color: var(--text); flex: 1; }
.work-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.work-tags span { padding: 3px 10px; border-radius: 999px; background: var(--accent-weak); color: var(--accent-ink); font-size: 12px; border: 1px solid var(--accent-line); }
.work-link {
  margin-top: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line); transition: all .2s;
}
.work-link svg { width: 15px; height: 15px; }
.work-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.work-link.disabled { opacity: .55; cursor: default; }
.work-link.disabled:hover { background: var(--surface-2); color: var(--text); border-color: var(--line); }

/* ---------- 关于我：手风琴式折叠（教学生涯 / 教学比赛 / 教育科研） ---------- */
.band { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fold-lead { font-size: 15px; color: var(--text); line-height: 1.8; margin-bottom: 28px; }

.accordion { display: flex; flex-direction: column; gap: 14px; }
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: none; border: none; padding: 20px 24px; cursor: pointer; transition: all .2s; text-align: left;
}
.acc-trigger:hover { background: var(--accent-weak); }
.acc-hint { font-size: 16px; font-weight: 600; color: var(--ink); }
.acc-arrow { font-size: 18px; color: var(--accent); transition: transform .3s; flex: none; }
.acc.open > .acc-trigger .acc-arrow { transform: rotate(180deg); }

.acc-body { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.acc.open .acc-body { max-height: 2600px; }
.acc-outer.open > .acc-body { max-height: 3600px; }
.acc-inner { padding: 4px 24px 24px; }
.achieve-list { list-style: none; counter-reset: ach; }
.achieve-list li {
  position: relative; padding: 11px 0 11px 34px; font-size: 15px; color: var(--text);
  border-bottom: 1px solid var(--line);
}
.achieve-list li:last-child { border-bottom: none; }
.achieve-list li::before {
  counter-increment: ach; content: counter(ach, decimal-leading-zero);
  position: absolute; left: 0; top: 11px; font-size: 12px; font-weight: 700;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.achieve-list strong { color: var(--ink); font-weight: 600; }

/* ---------- 通用占位卡片（轻松一刻 / 动态 / 资源 / 照片） ---------- */
.card {
  margin-top: 40px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 40px 36px; text-align: center;
}
.card .ic-lg {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px;
  background: var(--accent-weak); color: var(--accent); display: grid; place-items: center;
}
.card .ic-lg svg { width: 30px; height: 30px; }
.card h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); max-width: 480px; margin: 0 auto; }

.photo-wall { margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-wall .photo {
  aspect-ratio: 1; border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px dashed var(--line-strong); display: grid; place-items: center;
  font-size: 13px; color: var(--faint);
}

/* ---------- 站内搜索 ---------- */
.search-box { margin: 40px auto 0; max-width: 560px; }
.search-box input {
  width: 100%; padding: 15px 22px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 15px; color: var(--text); outline: none; transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-weak); }
.search-hint { text-align: center; font-size: 13px; color: var(--muted); margin-top: 12px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 36px; margin-top: 24px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; }
.footer-links a { font-size: 14px; color: var(--text); }
.footer-links a:hover { color: var(--accent-ink); }
.footer p { font-size: 13px; color: var(--faint); }
.footer-beian { margin-top: 10px; font-size: 12px; color: var(--faint); }
.footer-beian a { color: inherit; text-decoration: none; }
.footer-beian a:hover { color: var(--accent-ink); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-head { flex-direction: column; gap: 14px; }
}
@media (max-width: 560px) {
  section { padding: 64px 0; }
  .hero { padding: 84px 0 64px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--accent-ink); border-bottom: 1px solid rgba(255,255,255,.10); flex-direction: column;
    padding: 12px 24px 20px; gap: 4px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 11px 14px; border-radius: 10px; }
  .nav-links a.active::after { display: none; }
  .cap-grid { grid-template-columns: 1fr; }
  .panel { padding: 26px 22px; }
  .card { padding: 32px 24px; }
}
