/* ============================================================
   王强个人站 · 全部样式
   改配色 → 只改「变量」这一段，全站跟着变
   改字号/间距 → 找到对应区块的小节
   不要在这里写内容文案，文案一律在 index.html 里
   ============================================================ */

/* ===== 变量：全站唯一的配色与圆角来源 ===== */
:root{
  --bg:#f8f7f3;          /* 纸白底 */
  --fg:#17160f;          /* 墨黑正文 */
  --muted:#6f6e63;       /* 次要文字 */
  --line:#e3e1d6;        /* 分隔线 */
  --card:#fffef9;        /* 卡片底 */
  --accent:#2f6b53;      /* 主题绿 */
  --accent-soft:#e9f0eb; /* 主题绿淡底 */
  --radius:14px;
  /* 首屏压字用的纸色蒙版，四档透明度 */
  --w1:rgba(248,247,243,1);
  --w2:rgba(248,247,243,.88);
  --w3:rgba(248,247,243,.38);
  --w4:rgba(248,247,243,.34);
}
html[data-theme="dark"]{
  --bg:#121311;
  --fg:#e9e7de;
  --muted:#9a998f;
  --line:#2b2c28;
  --card:#191a17;
  --accent:#6fbf9a;
  --accent-soft:#1d2a24;
  --w1:rgba(18,19,17,1);
  --w2:rgba(18,19,17,.92);
  --w3:rgba(18,19,17,.76);
  --w4:rgba(18,19,17,.52);
}

/* ===== 基础 ===== */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0; background:var(--bg); color:var(--fg);
  font-family:"PingFang SC","HarmonyOS Sans SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  font-size:16px; line-height:1.75; letter-spacing:.01em;
  -webkit-font-smoothing:antialiased;
  transition:background-color .25s ease,color .25s ease;
}
a{ color:var(--accent); text-decoration:none; border-bottom:1px solid transparent; transition:border-color .2s,opacity .2s; }
a:hover{ border-bottom-color:currentColor; }
::selection{ background:var(--accent-soft); color:var(--fg); }

/* ===== 布局：全站只有一列，宽度 720 ===== */
.wrap{ max-width:720px; margin:0 auto; padding:0 24px; }

/* ===== 顶栏 ===== */
.top{ border-bottom:1px solid var(--line); }
.top-in{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; height:64px;
}
.brand{ font-weight:600; font-size:15px; letter-spacing:.02em; }
.top-nav{ display:flex; align-items:center; gap:18px; }
.top-nav a{ font-size:14px; color:var(--muted); border:0; }
.top-nav a:hover{ color:var(--fg); }
.theme-btn{
  width:34px; height:34px; border-radius:50%; border:1px solid var(--line);
  background:transparent; color:var(--muted); cursor:pointer;
  display:grid; place-items:center; font-size:15px; line-height:1;
  transition:border-color .2s,color .2s,transform .2s;
}
.theme-btn:hover{ color:var(--fg); border-color:var(--muted); transform:rotate(-12deg); }

/* ===== 首屏背景图 + 蒙版 =====
   图片吃掉整个首屏宽度，蒙版从上到下由淡转实，保证左侧文字可读 */
.hero-cover{ position:relative; overflow:hidden; isolation:isolate; }
.hero-cover .bg{
  position:absolute; inset:0; z-index:0; width:100%; height:100%;
  object-fit:cover; object-position:76% 52%; display:block;
  filter:grayscale(.35) brightness(.96) contrast(1.04);
}
.hero-cover .wash{
  position:absolute; inset:0; z-index:1; pointer-events:none;
  background:linear-gradient(180deg, var(--w3) 0%, var(--w3) 55%, var(--w2) 82%, var(--w1) 100%);
}
.hero-cover .wrap{ position:relative; z-index:2; }
/* 深色模式下不显示照片，只留纯色底 */
html[data-theme="dark"] .hero-cover .bg{ display:none; }

/* ===== 首屏文字 ===== */
.hero{ padding:96px 0 84px; min-height:400px; display:flex; flex-direction:column; justify-content:center; }
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:13px; color:var(--muted); letter-spacing:.06em;
}
.dot{ width:6px; height:6px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.hero h1{
  margin:22px 0 0; font-size:clamp(32px,6vw,46px); line-height:1.2;
  font-weight:700; letter-spacing:-.02em;
}
.hero .lead{ margin:18px 0 0; font-size:17px; color:var(--muted); max-width:34em; }
.hero .lead strong{ color:var(--fg); font-weight:600; }
.hero-note{
  display:inline-flex; align-items:baseline; gap:10px;
  margin:16px 0 0; font-size:14px; color:var(--muted);
}
.hero-note .k{ font-size:11px; letter-spacing:.16em; color:var(--muted); }

/* ===== 区块通用 ===== */
section{ padding:48px 0; border-top:1px solid var(--line); }
.sec-head{ display:flex; align-items:baseline; gap:12px; margin-bottom:26px; }
.sec-num{ font-size:12px; color:var(--muted); letter-spacing:.08em; font-variant-numeric:tabular-nums; }
.sec-head h2{ margin:0; font-size:19px; font-weight:600; letter-spacing:.01em; }
.sec-lead{ margin:-10px 0 24px; font-size:14px; line-height:1.7; color:var(--muted); max-width:36em; }

/* ===== 关于 ===== */
.about p{ margin:0 0 14px; color:var(--fg); }
.about p:last-child{ margin-bottom:0; }
.about p .muted{ color:var(--muted); }
.about-info{ display:flex; align-items:baseline; gap:10px; margin:16px 0 0; font-size:14px; color:var(--fg); }
.about-info .k{ flex:none; font-size:11px; letter-spacing:.16em; color:var(--muted); }

/* ===== 三条职责（卡片） ===== */
.pillars{ list-style:none; margin:22px 0 0; padding:0; display:grid; gap:12px; }
.pillars li{ padding:16px 18px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); }
.pillars h3{ margin:0; font-size:15px; font-weight:600; display:flex; align-items:center; gap:10px; letter-spacing:.01em; }
.pillars h3::before{ content:""; width:4px; height:15px; border-radius:2px; background:var(--accent); flex:none; }
.pillars p{ margin:7px 0 0; font-size:14px; color:var(--muted); line-height:1.72; }

/* ===== 卡片列表（业余区） ===== */
.cards{ display:grid; gap:14px; }
.card{
  display:block; padding:20px 22px; background:var(--card);
  border:1px solid var(--line); border-radius:var(--radius); color:var(--fg);
  transition:border-color .2s,transform .2s,box-shadow .2s;
}
.card:hover{
  border-color:var(--accent); transform:translateY(-2px);
  box-shadow:0 6px 22px -14px rgb(0 0 0 / .45);
}
.card h3{ margin:0; font-size:16px; font-weight:600; }
.card p{ margin:8px 0 0; font-size:14px; color:var(--muted); line-height:1.7; }
.card .meta{ margin-top:12px; font-size:12px; color:var(--accent); letter-spacing:.03em; }

/* ===== 标准与法规（日期 + 标题的行列表） ===== */
.notes{ list-style:none; margin:0; padding:0; }
.notes li a{
  display:flex; align-items:baseline; gap:16px;
  padding:13px 2px; border-bottom:1px solid var(--line); color:var(--fg);
}
.notes li a:hover{ color:var(--accent); }
.notes time{ flex:none; font-size:13px; color:var(--muted); font-variant-numeric:tabular-nums; }
.notes span{ font-size:15px; }
.notes li:last-child a{ border-bottom:0; }

/* ===== 联系 ===== */
.contact p{ margin:0 0 20px; color:var(--muted); font-size:15px; }
.links{ display:flex; flex-wrap:wrap; gap:10px; }
.links a{
  padding:9px 16px; border:1px solid var(--line); border-radius:999px;
  font-size:14px; color:var(--fg); background:var(--card);
  transition:border-color .2s,color .2s,background-color .2s;
}
.links a:hover{ border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }

/* ===== 页脚 ===== */
footer{
  border-top:1px solid var(--line); padding:28px 0 44px;
  font-size:13px; color:var(--muted);
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
}

/* ===== 滚动入场动画 ===== */
.reveal{ opacity:0; transform:translateY(14px); transition:opacity .6s ease,transform .6s ease; }
.reveal.in{ opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
  *{ animation:none !important; }
}

/* ===== 窄屏（手机） ===== */
@media (max-width:640px){
  .wrap{ padding:0 18px; }
  .hero{ padding:56px 0 44px; }
  .top-nav{ gap:14px; }
  .top-nav a[data-desktop]{ display:none; }
  section{ padding:38px 0; }
  .notes li a{ flex-direction:column; gap:2px; }
  /* 窄屏图片压到文字底下，蒙版加重保证可读 */
  html:not([data-theme="dark"]) .hero-cover .wash{
    background:linear-gradient(180deg, rgba(248,247,243,.80) 0%, rgba(248,247,243,.80) 55%, var(--w2) 82%, var(--w1) 100%);
  }
}
