/* ============ 求职作品集网站 · 样式 ============ */

:root {
  /* 深色模式基调：葱油绿 #373834 + 海天蓝 #C6E6E8 */
  --bg: #2b2d29;               /* 页面底 · 葱油绿再深一档 */
  --bg-soft: #272925;
  --card: #373834;             /* 葱油绿 · 卡片 */
  --card-hover: #41423b;
  --border: #47493f;
  --text: #e8f0f1;             /* 近白 · 略染海天蓝 */
  --text-dim: #a6adae;
  --accent: #C6E6E8;           /* 海天蓝 · 主强调 */
  --accent2: #94b7ba;          /* 配葱油绿的柔青蓝 */
  --grad: linear-gradient(135deg, #C6E6E8, #9ec7ca);
  --radius: 16px;
  --maxw: 1120px;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  font-size: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 10px;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; font-size: .95rem; transition: .25s; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--grad); color: #373834; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(198,230,232,.35); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ---------- 主题切换（预置深浅，默认深） ---------- */
body.light {
  /* 浅色模式基调：宣纸白 #F9F2E0 + 鸢尾蓝 #1660AB */
  --bg: #F9F2E0;             /* 宣纸白 · 页面底 */
  --bg-soft: #f3ead7;        /* 略深一档的宣纸 · 区块底 */
  --card: #fdf9ef;           /* 近白暖卡 */
  --card-hover: #f2ead7;
  --border: #eadfc8;
  --text: #3a352c;           /* 暖墨色 */
  --text-dim: #87795d;
  --accent: #1660AB;         /* 鸢尾蓝 · 主强调 */
  --accent2: #2e82c6;
  --grad: linear-gradient(135deg, #1660AB, #2e82c6);
  --shadow: 0 18px 40px rgba(22,96,171,.12);
}
body.light .code-window { box-shadow: var(--shadow); }
body.light .nav { background: rgba(249,242,224,.9); }
body.light .btn-primary { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
/* 主题开关 —— 月亮 ☾ 深色 / 太阳 ☀ 浅色（取材 galaxy 组件库 Praashoo7_cuddly-bat） */
.theme-switch {
  position: relative; display: flex; align-items: center; cursor: pointer; flex: none;
  width: 8.8em; height: 2.4em; font-size: 12px; font-weight: 600;
  background: var(--card); color: var(--text); padding: 0 .5em;
  border: 1px solid var(--border); box-shadow: 3px 3px 0 var(--border);
  border-radius: 999px; transition: .35s;
}
.theme-switch:hover { box-shadow: none; transform: translate(3px, 3px); border-color: var(--accent); }
.theme-switch input { position: absolute; opacity: 0; visibility: hidden; }
.theme-switch .name::before,
.theme-switch .name::after { font-size: 1em; color: var(--text-dim); letter-spacing: .02em; }
.theme-switch .name::before { content: "☾ 深色"; margin-right: 3.6em; }
.theme-switch .name::after { content: "☀ 浅色"; margin-right: 3.2em; display: none; }
/* 月 / 日 圆球 */
.theme-switch .slider {
  position: absolute; right: .8em; width: 1.5em; height: 1.5em; border-radius: 50%;
  background: #222; border: .18em solid #222; transform: rotate(-120deg);
  box-shadow: inset 0 .3em #999; transition: 300ms ease;
}
.theme-switch input:checked + .slider {
  transform: rotate(360deg); box-shadow: none; border-color: #F28C38; background: #F28C38;
}
.theme-switch input:checked ~ .name::before { display: none; }
.theme-switch input:checked ~ .name::after { display: block; }

/* ============ 导航 ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(43,45,41,.92); border-bottom: 1px solid transparent; transition: .3s;
}
.nav.scrolled { border-color: var(--border); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: .02em; }
.brand-dot { color: var(--accent); }
.nav-links { display: flex; gap: 26px; align-items: center; font-size: .95rem; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; width: 34px; height: 34px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  min-height: 100vh; display: flex; align-items: center; position: relative;
  padding: 120px 0 80px;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(148,183,186,.16), transparent 60%),
    radial-gradient(800px 500px at 95% 20%, rgba(198,230,232,.14), transparent 60%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-title { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.18; margin: 6px 0 18px; font-weight: 800; }
.hero-sub { color: var(--text-dim); max-width: 520px; margin-bottom: 24px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.tag {
  font-size: .8rem; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text); background: var(--card);
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* 代码窗 */
.code-window {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: #272925; box-shadow: var(--shadow);
}
.code-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #373834; border-bottom: 1px solid var(--border); }
.code-bar span { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.code-bar span:nth-child(1){ background:#ff5f57;} .code-bar span:nth-child(2){ background:#febc2e;} .code-bar span:nth-child(3){ background:#28c840;}
.code-bar em { margin-left: auto; font-size: .75rem; color: #6b7683; font-style: normal; }
.code-body { padding: 20px; font-size: .86rem; line-height: 1.75; overflow-x: auto; }
.code-body code { font-family: "JetBrains Mono", "Fira Code", Consolas, monospace; }
.code-body .cm { color: #7d8b99; } /* 注释 */
.code-body .k { color: #79c0ff; }  /* 关键字 */
.code-body .s { color: #a5d6a7; }  /* 字符串 */
.code-body .v { color: #79c0ff; }  /* 变量 */
.code-body .n { color: #f0883e; }  /* 数字 */
.code-body .p { color: #e6edf3; }  /* 标点 */

.scroll-hint { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: var(--text-dim); font-size: 1.4rem; animation: bob 2s infinite; }
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* ============ 区块通用 ============ */
.section { padding: 90px 0; }
.section-title { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 800; margin-bottom: 40px; }
.about { background: var(--bg-soft); }

/* ---------- 关于 ---------- */
.about-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.about-text p { margin-bottom: 16px; color: var(--text-dim); max-width: 640px; }
.about-text b { color: var(--text); }
.about-stats { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about-stats li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; }
.about-stats b { display: block; font-size: 1.8rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-stats span { color: var(--text-dim); font-size: .82rem; }

/* ---------- 技能 ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.skill-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: .25s; }
.skill-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.skill-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.skill-card ul { list-style: none; }
.skill-card li { padding: 5px 0 5px 18px; position: relative; color: var(--text-dim); font-size: .9rem; }
.skill-card li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 7px; height: 7px; border-radius: 2px; background: var(--grad); }

/* ---------- 代表作 ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.work-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: .28s; position: relative;
}
.work-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.work-thumb { height: 168px; display: flex; align-items: center; justify-content: center; font-size: 3.4rem; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #40413a, #2b2d29); }
.work-card:nth-child(2) .work-thumb { background: linear-gradient(135deg, #41423c, #2c2d29); }
.work-card:nth-child(3) .work-thumb { background: linear-gradient(135deg, #45443a, #2f2e29); }
.work-card:nth-child(4) .work-thumb { background: linear-gradient(135deg, #3f453f, #29332c); }
.work-card:nth-child(5) .work-thumb { background: linear-gradient(135deg, #40413a, #2e2b2b); }
.work-card:nth-child(6) .work-thumb { background: linear-gradient(135deg, #41453e, #2a2b2c); }
.work-info { padding: 18px 20px 20px; }
.work-info h3 { font-size: 1.12rem; margin-bottom: 6px; }
.work-info p { color: var(--text-dim); font-size: .86rem; margin-bottom: 12px; }
.work-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.work-meta span { font-size: .72rem; background: var(--bg-soft); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; color: var(--text-dim); }

/* ---------- 项目全集 ---------- */
.projects { background: var(--bg-soft); }
.project-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 18px; display: flex; align-items: center; gap: 10px; min-width: 200px;
  transition: .22s; cursor: default;
}
.chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.chip .chip-icon { font-size: 1.2rem; }
.chip .chip-name { font-weight: 700; font-size: .92rem; }
.chip .chip-desc { display: block; color: var(--text-dim); font-size: .78rem; }

/* ---------- 联系 ---------- */
.contact-lead { color: var(--text-dim); margin-bottom: 30px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.contact-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 6px; transition: .25s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.cc-icon { font-size: 1.5rem; }
.cc-label { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }
.cc-value { font-weight: 600; }
.contact-note { margin-top: 18px; color: var(--text-dim); font-size: .8rem; }

/* 联系板块 · 问卷按钮（放在联系卡片下方） */
.contact-cta { margin-top: 26px; text-align: center; }
.contact-open-btn { padding: 13px 26px; font-size: 1rem; }

/* ---------- 联系问卷弹层 ---------- */
.contact-modal .modal-body { max-height: 92vh; }
.contact-modal h3 { margin-bottom: 6px; }
#contactForm { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--text); }
.cf-field b { color: #fb7185; }
.cf-field input,
.cf-field select,
.cf-field textarea {
  font: inherit; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; outline: none;
  transition: border-color .15s;
}
.cf-field input:focus, .cf-field select:focus, .cf-field textarea:focus { border-color: var(--accent); }
.cf-field textarea { resize: vertical; min-height: 70px; line-height: 1.6; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cf-status { min-height: 20px; font-size: .84rem; color: var(--text-dim); }
.cf-status.ok { color: #34d399; }
.cf-status.err { color: #fb7185; }
.cf-submit { width: 100%; padding: 12px; font-size: 1rem; }
/* 提交 loading：心情跳动漫笔 loader */
.cf-loading { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; color: var(--text-dim); font-size: .85rem; }
.cf-loading[hidden] { display: none; }
.cf-loading .heart-loader { height: 34px; width: 124px; }
.heart-loader .hl-line {
  fill: none; stroke: #e00000; stroke-width: 1.5;
  stroke-linecap: butt; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: heart-dash 3s linear infinite;
}
.heart-loader .hl-point {
  fill: none; stroke: #f00000; stroke-width: 5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 0.0001, 0.9999; stroke-dashoffset: 1;
  animation: heart-dash 3s linear infinite;
}
@keyframes heart-dash {
  0% { stroke-dashoffset: 1; }
  80% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
/* 问卷图片上传 */
.cf-picker {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  border: 1px dashed var(--border); border-radius: 10px; padding: 9px 14px;
  color: var(--text-dim); font-size: .85rem; cursor: pointer; user-select: none;
  transition: border-color .15s, color .15s;
}
.cf-picker:hover { border-color: var(--accent); color: var(--accent); }
.cf-hint { color: var(--text-dim); font-size: .78rem; line-height: 1.6; }
/* 弹窗顶部的贴截图引导：比普通提示略醒目 */
.lead-hint { color: var(--accent); font-size: .84rem; margin: -2px 0 6px; }
.cf-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.cf-thumb { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.cf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-thumb-del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 1;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: .9rem; cursor: pointer;
}
.cf-thumb-del:hover { background: #fb7185; }
@media (max-width: 520px) { .cf-row { grid-template-columns: 1fr; } }

/* ---------- 弹层 ---------- */
.project-modal {
  border: 0; border-radius: var(--radius); background: var(--card);
  color: var(--text); max-width: 640px; width: min(92vw, 640px); padding: 0; overflow: hidden;
  box-shadow: var(--shadow);
  margin: auto;   /* 覆盖全局 reset 的 margin:0，配合 showModal() 的 inset:0 让弹窗垂直水平居中 */
  max-height: 92vh;   /* 弹窗不超高视口，长内容交给 modal-body 内部滚动 */
}
.modal-body { padding: 30px; max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.project-modal::backdrop { background: rgba(0,0,0,.68); }
.modal-close { position: absolute; top: 14px; right: 16px; z-index: 2; background: rgba(0,0,0,.4); color: #fff; border: 0; width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.modal-emoj { font-size: 3rem; margin-bottom: 10px; }
.modal-body h3 { font-size: 1.5rem; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.modal-tag { font-size: .72rem; color: var(--accent); border: 1px solid var(--accent); padding: 2px 9px; border-radius: 999px; }
.modal-body .lead { color: var(--text-dim); margin-bottom: 16px; }
.modal-body .tech { margin: 14px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.modal-body .tech span { font-size: .75rem; background: var(--bg-soft); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; }
.modal-body .what { list-style: none; margin-top: 6px; }
.modal-body .what li { padding-left: 26px; position: relative; margin-bottom: 8px; color: var(--text-dim); font-size: .92rem; }
.modal-body .what li::before { content: '✓'; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.modal-placeholder {
  border: 1px dashed var(--border); border-radius: 12px; padding: 26px; text-align: center;
  color: var(--text-dim); font-size: .85rem; margin-bottom: 16px;
}

/* ---------- 项目详情弹窗 · 增强区块 ---------- */
.status-badge { font-size: .72rem; padding: 2px 10px; border-radius: 999px; font-weight: 600; margin-left: auto; white-space: nowrap; }
.status-badge.done    { color: #34d399; border: 1px solid #34d399; background: rgba(52,211,153,.1); }
.status-badge.wip     { color: #fbbf24; border: 1px solid #fbbf24; background: rgba(251,191,36,.1); }
.status-badge.live    { color: #38bdf8; border: 1px solid #38bdf8; background: rgba(56,189,248,.1); }
.status-badge.shelved { color: #9ca3af; border: 1px solid #9ca3af; background: rgba(156,163,175,.12); }

/* 问号「?」hover 说明 tooltip（用于搁置原因等） */
.tip { position: relative; display: inline-flex; align-items: center; margin-left: 8px; cursor: help; vertical-align: middle; }
.tip-q {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--text-dim); color: var(--text-dim);
  font-size: .68rem; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.tip-text {
  /* 右对齐、向左生长：状态徽章被推到右缘，居中会向右溢出被 modal 裁剪 */
  position: absolute; left: auto; right: 0; top: calc(100% + 9px);
  width: 260px; max-width: 78vw; padding: 9px 11px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  box-shadow: var(--shadow); font-size: .75rem; line-height: 1.6; font-weight: 400; white-space: normal;
  opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility .15s ease;
  z-index: 40; text-align: left;
}
.tip-text::before {
  content: ""; position: absolute; left: auto; right: 16px; bottom: 100%;
  border: 6px solid transparent; border-bottom-color: var(--border);
}
.tip:hover .tip-text, .tip:focus-visible .tip-text { opacity: 1; visibility: visible; }
.modal-source {
  font-size: .8rem; color: var(--text-dim); background: var(--bg-soft);
  border-left: 3px solid var(--accent); padding: 11px 14px; border-radius: 6px; margin: 12px 0;
  line-height: 1.65;
}
.modal-source b { color: var(--text); }
.feature-block h4 { margin: 18px 0 10px; }
.feat-hint { font-size: .72rem; color: var(--text-dim); font-weight: 400; margin-left: 4px; }
.feats { display: flex; flex-wrap: wrap; gap: 8px; }
.feats .feat-chip {
  font: inherit; font-size: .8rem; background: var(--bg-soft); border: 1px solid var(--border);
  padding: 4px 11px; border-radius: 8px; color: var(--text); line-height: 1.5;
}
.feats .feat-chip.has-shots {
  cursor: pointer; border-color: var(--accent); color: var(--accent); background: rgba(198,230,232,.08);
  transition: background .15s, transform .05s;
}
.feats .feat-chip.has-shots:hover { background: rgba(198,230,232,.18); }
.feats .feat-chip.has-shots:active { transform: scale(.97); }
.feats .feat-chip.has-shots em { font-style: normal; font-size: .66rem; opacity: .85; margin-left: 5px; }

/* 「打开在线演示」用蓝色，与「看截图」绿色区分，一眼可辨可点击 */
.feats .feat-chip.has-url {
  cursor: pointer; border-color: var(--info, #38bdf8); color: var(--info, #38bdf8); background: rgba(56,189,248,.08);
  transition: background .15s, transform .05s;
}
.feats .feat-chip.has-url:hover { background: rgba(56,189,248,.16); }
.feats .feat-chip.has-url:active { transform: scale(.97); }
.feats .feat-chip.has-url em { font-style: normal; font-size: .66rem; opacity: .85; margin-left: 5px; }
.feats span.feat-chip { cursor: default; }

/* 功能截图 · 画廊 */
.gallery-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gallery-head h4 { margin: 0; font-size: 1.1rem; }
/* 返回按钮挪到右侧，和右上角叉号（截图画廊里 = 先返回一级）顺位在一侧 */
.gallery-head .gallery-back { margin-left: auto; }
.gallery-back {
  font: inherit; font-size: .8rem; cursor: pointer; white-space: nowrap;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  padding: 5px 12px; border-radius: 8px; transition: border-color .15s, color .15s;
}
.gallery-back:hover { border-color: var(--accent); color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 4px; }
.gallery-item { margin: 0; cursor: zoom-in; }
.gallery-item img {
  width: 100%; height: auto; display: block; border: 1px solid var(--border);
  border-radius: 10px; transition: border-color .15s, opacity .15s;
}
.gallery-item:hover img { border-color: var(--accent); opacity: .92; }
.gallery-item figcaption { margin-top: 6px; font-size: .72rem; color: var(--text-dim); text-align: center; }

/* ---------- 图片灯箱（项目弹窗内的全屏固定盖层） ----------
   不再是原生 <dialog>，改为 .project-modal 内部一块 position:fixed 盖层：
   全程只有项目弹窗一个原生 dialog，杜绝「叠两个 dialog、关上面带掉下面」的怪行为。
   默认 display:none，加 .open 才显示（避免关闭后仍常显）。 */
.img-dialog { display: none; }
.img-dialog.open {
  position: fixed; inset: 0; z-index: 60; /* 盖过弹窗其它内容（modal-close z2 / tip z40） */
  width: 100vw; height: 100vh;
  margin: 0; padding: 24px; overflow: hidden;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
}
.img-dialog .lb-img {
  max-width: min(92vw, 900px); max-height: 86vh; object-fit: contain;
  border-radius: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute; z-index: 2; background: rgba(255,255,255,.12); color: #fff;
  border: 0; cursor: pointer; line-height: 1;
}
.lb-close { top: 16px; right: 18px; width: 40px; height: 40px; border-radius: 50%; font-size: 1.5rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 46px; height: 60px; border-radius: 8px; font-size: 2rem; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.28); }
.lb-count {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: #dbe1e8; font-size: .85rem; background: rgba(0,0,0,.5); padding: 4px 12px; border-radius: 999px;
}
@media (max-width: 620px) {
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 26px 0; text-align: center; color: var(--text-dim); font-size: .85rem; background: var(--bg); }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .about-cols { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav-links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 4px;
    background: var(--bg); padding: 20px; border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: .3s; opacity: 0; pointer-events: none;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px; width: 100%; text-align: center; }
  .nav-toggle { display: flex; }
  .skill-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { padding-top: 100px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }