/* ============================================================
   GoodTime 个人主页 —— UI 重构版
   身份定位：全栈开发者 × AI 科普创作者
   风格：克制、专业、有呼吸感的"创作者工作室"气质
   ============================================================ */

:root {
  /* ── 配色系统：以"墨绿+暖米"为基调，琥珀做点缀 ── */
  --bg-page:    #FAF9F6;
  --bg-soft:    #F4F3EF;
  --bg-card:    #FFFFFF;

  --green:      #1B5E3B;   /* 主色：深墨绿，比原 #0A643B 更沉稳 */
  --green-soft: #E8F0EB;   /* 浅绿底，用于徽章/标签 */
  --green-glow: rgba(27, 94, 59, 0.08);

  --ink:        #1A1D1A;   /* 正文近黑，带一丝绿调 */
  --ink-2:      #4A5648;   /* 次要文字 */
  --muted:      #7A8578;   /* 弱提示文字 */

  --line:       #E4E6E0;   /* 分隔线 */
  --line-soft:  #EDEFE8;   /* 更弱的分隔 */

  --accent:     #B45309;   /* 琥珀橙：用于强调、quote、hover 焦点 */
  --accent-soft:#FDF3E7;   /* 琥珀浅底 */

  /* ── 字体 ── */
  /* 拉丁字形由 assets/fonts/ 自托管（Inter / JetBrains Mono，无跨境请求）；
     中文全部交给系统字体，这是中文网页的通行做法 —— 中文 webfont 动辄数 MB，不值当。 */
  --f-sans:    "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --f-inter:   "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --f-serif:   "Georgia", "Times New Roman", "SimSun", serif;  /* 用于 quote，增加人文感 */
  --f-mono:    "JetBrains Mono", "SF Mono", "Cascadia Mono", Consolas, monospace;

  /* ── 阴影 ── */
  --shadow-sm:  0 1px 3px rgba(26, 29, 26, 0.04);
  --shadow-md:  0 4px 14px rgba(26, 29, 26, 0.06);
  --shadow-lg:  0 12px 32px rgba(26, 29, 26, 0.08);
  --shadow-glow: 0 8px 24px -6px rgba(27, 94, 59, 0.25);

  /* ── 圆角 ── */
  --radius:     14px;
  --radius-lg:  20px;

  /* 防护：禁止选中文本 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ── 基础 ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-page);
  font-family: var(--f-sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; }
a { text-decoration: none; color: inherit; }

/* 焦点态：键盘可访问性 */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   全局背景装饰 —— 更细腻的网格 + 柔和光斑
   ============================================================ */
.bg-decor {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
.bg-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(27, 94, 59, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 45%, rgba(0,0,0,.5) 80%, rgba(0,0,0,.15) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 45%, rgba(0,0,0,.5) 80%, rgba(0,0,0,.15) 100%);
}
.bg-glow {
  position: absolute; border-radius: 9999px;
  filter: blur(64px);
  animation: glow-float 30s ease-in-out infinite alternate;
}
.bg-glow--1 { width: 560px; height: 560px; left: -180px; top: 100px;  background: rgba(27, 94, 59, 0.07); }
.bg-glow--2 { width: 480px; height: 480px; right: -160px; top: 860px; background: rgba(180, 83, 9, 0.05); animation-delay: -10s; }
.bg-glow--3 { width: 600px; height: 600px; left: 30%; top: 3100px; background: rgba(27, 94, 59, 0.06); animation-delay: -20s; }
@keyframes glow-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(50px, -70px, 0) scale(1.15); }
}

/* ============================================================
   通用容器
   ============================================================ */
.page { width: 100%; max-width: 1280px; margin: 0 auto; }
.section { margin-top: 140px; }
.section--narrow { max-width: 880px; margin-left: auto; margin-right: auto; }
.section--wide  { max-width: 1060px; margin-left: auto; margin-right: auto; }

.section-title {
  font-size: 22px; font-weight: 600; color: var(--ink);
  line-height: 30px; margin-bottom: 36px;
  position: relative; padding-left: 14px;
}
.section-title::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 4px; height: 16px; border-radius: 2px;
  background: var(--accent);
}
.section-title--center { text-align: center; padding-left: 0; }
.section-title--center::before { display: none; }

/* 卡片基础：更实的玻璃感（修复原 bg-white/10 太透的问题） */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line);
}

.glass {
  background: rgba(255, 255, 255, 0.72);   /* 比原 0.10 实得多，可读性大幅提升 */
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
}

/* ============================================================
   Hero —— 更克制、有层次感
   ============================================================ */
.hero { padding: 72px 24px 88px; }
.hero-inner {
  width: 720px; max-width: 100%; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}

/* 顶部胶囊徽章 */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 18px;
  background: var(--green-soft);
  border: 1px solid rgba(27, 94, 59, 0.15);
  border-radius: 9999px;
  font-family: var(--f-mono); font-size: 13px; color: var(--green);
  white-space: nowrap;
  animation: fade-in-down .6s ease both;
}
.badge-icon { width: 14px; height: 14px; }

/* 徽章可点击时（链到活动板块）给出悬浮反馈 */
a.hero-badge { cursor: pointer; transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
a.hero-badge:hover {
  background: rgba(27, 94, 59, 0.14);
  border-color: rgba(27, 94, 59, 0.3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
a.hero-badge .badge-icon { transition: transform .25s ease; }
a.hero-badge:hover .badge-icon { transform: scale(1.15); }

/* 头像：加呼吸光圈 */
.hero-avatar {
  margin-top: 52px; width: 148px; height: 148px;
  border-radius: 9999px; position: relative;
  animation: fade-in-up .7s ease .1s both;
}
.hero-avatar::before {
  content: ''; position: absolute; inset: -6px;
  border-radius: 9999px;
  border: 2px solid rgba(27, 94, 59, 0.25);
  animation: avatar-ring 3s ease-in-out infinite;
}
@keyframes avatar-ring {
  0%, 100% { transform: scale(1); opacity: .6; }
  50%       { transform: scale(1.04); opacity: 1; }
}
.hero-avatar img {
  width: 100%; height: 100%; border-radius: 9999px;
  object-fit: cover; object-position: center 18%;
  border: 3px solid var(--bg-card);
  box-shadow: var(--shadow-md);
}

/* 名称 / 角色 / 座右铭 */
.hero-id { margin-top: 36px; animation: fade-in-up .7s ease .2s both; }
.hero-id h1 {
  font-size: 44px; font-weight: 700; line-height: 52px;
  color: var(--ink); letter-spacing: 0.5px;
}
.hero-role {
  margin-top: 10px;
  font-family: var(--f-mono); font-size: 16px;
  letter-spacing: 2px; color: var(--green);
}
.hero-quote {
  margin-top: 14px;
  font-family: var(--f-serif); font-size: 18px; font-style: italic;
  color: var(--accent); line-height: 30px;
}

/* 简介 */
.hero-intro {
  margin-top: 32px; max-width: 640px;
  font-size: 16px; line-height: 28px; color: var(--ink-2);
  animation: fade-in-up .7s ease .3s both;
}

/* 主按钮 */
.hero-btn {
  margin-top: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 30px;
  background: var(--green); border-radius: 9999px;
  color: #fff; font-size: 15px; font-weight: 500;
  box-shadow: var(--shadow-glow);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  animation: fade-in-up .7s ease .4s both;
}
.hero-btn:hover {
  transform: translateY(-2px);
  background: #14512f;
  box-shadow: 0 12px 28px -6px rgba(27, 94, 59, 0.35);
}
.btn-arrow { width: 15px; height: 15px; transition: transform .25s ease; }
.hero-btn:hover .btn-arrow { transform: translateX(3px); }

/* 数据统计：四宫格，更紧凑 */
.hero-stats {
  margin-top: 48px; display: flex; gap: 16px;
  animation: fade-in-up .7s ease .5s both;
}
.stat-card {
  width: 148px; padding: 20px 0;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-num {
  font-family: var(--f-mono); font-size: 32px; font-weight: 700;
  line-height: 38px; color: var(--green);
}
.stat-label { margin-top: 6px; font-size: 13px; color: var(--ink-2); }

/* 入场动画 */
@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   关于我
   ============================================================ */
.about-section { margin-top: 80px; }
.about-card { padding: 32px 28px; }
.about-title {
  font-family: var(--f-inter); font-size: 22px; font-weight: 600;
  line-height: 30px; color: var(--ink);
}
.about-sub {
  margin-top: 14px;
  font-size: 16px; font-weight: 500; line-height: 28px; color: var(--ink-2);
}
.about-quote {
  margin-top: 22px; padding: 14px 18px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--f-serif); font-size: 16px; font-style: italic;
  line-height: 26px; color: var(--ink);
}

.about-tags { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 9999px;
  font-family: var(--f-mono); font-size: 13px; color: var(--ink-2);
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.tag:hover { background: var(--green-soft); border-color: rgba(27,94,59,.25); color: var(--green); }

/* 时间线 */
.timeline {
  margin: 28px 0 0 10px; padding-left: 24px;
  border-left: 2px solid var(--line);
}
.tl-item { position: relative; }
.tl-item + .tl-item { margin-top: 28px; }
.tl-dot {
  position: absolute; left: -31px; top: 8px;
  width: 10px; height: 10px;
}
.tl-year {
  font-family: var(--f-mono); font-size: 16px; line-height: 26px;
  color: var(--ink); font-weight: 600;
}
.tl-desc { font-size: 15px; line-height: 24px; color: var(--ink-2); }

/* ============================================================
   社区身份
   ============================================================ */
.community-lecture {
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.lecture-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  color: var(--green);
}
.community-lecture p {
  font-family: var(--f-inter); font-size: 26px; font-weight: 700;
  line-height: 34px; color: var(--green);
}

.community-roles {
  margin-top: 44px; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: nowrap;
  max-width: 100%;
}
.role-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 54px; padding: 0 18px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-family: var(--f-mono); font-size: 15px; color: var(--ink);
  white-space: nowrap;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.role-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(27, 94, 59, 0.3);
  box-shadow: var(--shadow-md);
}
.role-chip-logo { height: 28px; width: auto; max-width: 160px; display: block; flex-shrink: 0; object-fit: contain; object-position: left center; }
.role-chip-logo--techflows { height: 24px; max-height: 24px; max-width: 110px; object-fit: contain; object-position: left center; }
.role-chip-logo--volcengine { height: 40px; width: auto; max-height: 40px; max-width: 200px; object-fit: contain; object-position: left center; background: transparent; }

/* 品牌跑马灯 */
.marquee {
  margin-top: 44px; position: relative; height: 56px;
  overflow: hidden; display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%);
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee-scroll 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: 72px; padding-right: 72px; }

.brand-item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-logo {
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .25s ease;
}
.brand-logo img { display: block; object-fit: contain; object-position: center; }
.brand-logo--with-bg {
  padding: 4px 8px;
  border-radius: 6px;
}
.brand-logo--with-bg img { display: block; }
.brand-name {
  font-size: 18px; font-weight: 700; color: var(--muted);
  transition: color .25s ease;
}
.brand-item:hover .brand-logo { transform: scale(1.1); }
.brand-item:hover .brand-name { color: var(--ink); }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   活动 —— 已举办 / 筹备中
   ============================================================ */

/* 统计条：数值由 activities.json 自动计算，无需手填 */
.events-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 26px;
}
.event-stat {
  padding: 18px 20px; text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.event-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.event-stat-num {
  font-family: var(--f-mono); font-size: 28px; font-weight: 700;
  line-height: 34px; color: var(--green);
}
.event-stat-label { margin-top: 4px; font-size: 13px; color: var(--ink-2); }

/* 分类切换（WAI-ARIA tablist） */
.events-tabs {
  display: inline-flex; gap: 6px; margin-bottom: 24px;
  padding: 5px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 9999px;
}
.events-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px;         /* 44px 触控目标 */
  background: transparent; border: 1px solid transparent; border-radius: 9999px;
  font-family: var(--f-sans); font-size: 15px; font-weight: 500;
  color: var(--ink-2); cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.events-tab:hover { color: var(--green); background: rgba(255, 255, 255, .7); }
.events-tab[aria-selected="true"] {
  background: var(--bg-card); color: var(--green);
  border-color: var(--line-soft); box-shadow: var(--shadow-sm);
}
.events-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--green-soft); border-radius: 9999px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 700; color: var(--green);
}
.events-tab[aria-selected="true"] .events-tab-count { background: var(--green); color: #fff; }

/* 面板 */
.events-panel[hidden] { display: none; }
.events-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius); }

/* 网格 */
.events-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* 活动卡片 */
.event-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.event-card:hover {
  transform: translateY(-3px);            /* transform 位移，不触发 layout shift */
  box-shadow: var(--shadow-md);
  border-color: var(--line);
}

/* 卡片头：日期 + 状态 */
.event-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.event-date {
  font-family: var(--f-mono); font-size: 13px; font-weight: 500;
  color: var(--green); letter-spacing: .2px;
}
.event-status {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 6px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; white-space: nowrap;
}
.event-status--done { background: var(--bg-soft); color: var(--ink-2); }
.event-status--soon { background: var(--accent-soft); color: var(--accent); }
.event-status--live { background: var(--green-soft); color: var(--green); }
.event-pulse {
  width: 6px; height: 6px; border-radius: 9999px;
  background: currentColor; flex-shrink: 0;
  animation: event-pulse 1.8s ease-in-out infinite;
}
@keyframes event-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .35; transform: scale(.8); }
}

/* 标题 / 摘要 */
.event-card h3 {
  font-size: 18px; font-weight: 600; line-height: 26px; color: var(--ink);
}
.event-sub { font-size: 14px; line-height: 22px; color: var(--green); }
.event-summary {
  flex: 1;
  font-size: 14px; line-height: 24px; color: var(--ink-2);
}
/* 有些活动没有合适的一句话简介，直接用「海报顶部信息块」图代替摘要 */ 
.event-media { flex: 1; margin-top: 14px; }
.event-media img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* 元信息：地点 / 人数 */
.event-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.event-meta-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-2);
}
.event-meta-item svg { width: 15px; height: 15px; color: var(--green); flex-shrink: 0; }

/* 标签 */
.event-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.event-tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 12px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 9999px;
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-2);
}

/* 线上 / 线下 / 活动类型：三种底色区分，便于一眼扫出活动形态 */
.event-tag--offline {
  background: var(--green-soft); color: var(--green);
  border-color: rgba(27, 94, 59, .2); font-weight: 600;
}
.event-tag--online {
  background: #DBEAFE; color: #1D4ED8;
  border-color: rgba(29, 78, 216, .2); font-weight: 600;
}
.event-tag--type {
  background: var(--accent-soft); color: var(--accent);
  border-color: rgba(180, 83, 9, .22); font-weight: 600;
}

/* 底部：角色 + 链接 */
.event-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 4px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.event-role { font-size: 13px; color: var(--ink-2); }
.event-role b { color: var(--ink); font-weight: 600; }
.event-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 4px;              /* 44px 触控目标 */
  font-size: 14px; color: var(--green);
  transition: gap .2s ease;
}
.event-link svg { width: 15px; height: 15px; }
.event-card:hover .event-link { gap: 10px; }
.event-link--muted { color: var(--ink-2); cursor: default; }

/* 空态 */
.events-empty {
  grid-column: 1 / -1;
  padding: 40px 24px; text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 14px; color: var(--ink-2);
}

/* 首页每栏只露 3 张卡，这条提示通向 activities.html 列表页 */
.events-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; margin-top: 20px;
  font-size: 14px; color: var(--green);
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  transition: gap .2s ease, border-color .2s ease;
}
.events-more svg { width: 15px; height: 15px; }
.events-more:hover { gap: 10px; border-color: var(--green); }

/* ============================================================
   社媒
   ============================================================ */
.social-layout { display: flex; justify-content: center; }
.qr-card {
  width: 240px; padding: 24px 24px 18px; text-align: center;
  cursor: zoom-in;
}
.qr-img {
  width: 180px; height: 180px; margin: 0 auto;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.qr-title {
  margin-top: 16px; font-family: var(--f-inter); font-size: 16px; font-weight: 700;
  color: var(--ink); white-space: nowrap;
}
.qr-badge {
  display: inline-block; margin-top: 4px; height: 26px; line-height: 26px; padding: 0 12px;
  background: var(--green-soft); border-radius: 9999px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 500; color: var(--green);
}
.qr-hint {
  margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 12px; color: var(--muted);
}
.qr-hint img { width: 12px; height: 12px; }

.social-links {
  margin-top: 36px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
}
.social-card {
  width: 92px; height: 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center;
}
.social-icon { height: 24px; width: auto; }
.social-icon--wechat-mp { height: 28px; }
.social-icon--xiaohongshu { height: 24px; width: auto; max-width: 54px; }
.social-label { font-size: 12px; color: var(--ink); line-height: 16px; }
.social-label--2line { line-height: 15px; }
.social-label--mono { font-family: var(--f-mono); }

/* ============================================================
   最新文章
   ============================================================ */
/* 区块标题行：标题 + 右侧「查看全部」入口 */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 28px;
}
.section-head .section-title { margin-bottom: 0; }

.section-more {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 4px;         /* 44px 触控目标 */
  font-size: 14px; color: var(--green);
  cursor: pointer;
  transition: gap .2s ease;
}
.section-more svg { width: 15px; height: 15px; }
.section-more:hover { gap: 10px; }
.section-more b { font-family: var(--f-mono); font-weight: 600; }

.article-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.article-card {
  padding: 24px;
  display: flex; flex-direction: column;
}
.article-card--with-cover {
  padding: 0;
  overflow: hidden;
}
.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-card, transparent);
}
.article-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.article-card--with-cover:hover .article-cover img { transform: scale(1.04); }
.article-card--with-cover h3,
.article-card--with-cover p,
.article-card--with-cover .article-meta {
  padding-left: 24px; padding-right: 24px;
}
.article-card--with-cover h3 { padding-top: 18px; }
.article-card--with-cover .article-meta { padding-bottom: 22px; }
.article-card h3 {
  font-size: 17px; font-weight: 600; line-height: 26px; color: var(--ink);
}
.article-card p {
  margin-top: 8px; font-size: 14px; line-height: 22px; color: var(--ink-2);
  min-height: 44px;
  /* 摘要长短不一 → 让段落吃掉剩余高度，使底部的 .article-meta 各行对齐贴底 */
  flex: 1;
}
.article-meta {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.article-views {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
}
.article-views img { width: 14px; height: 14px; }
.article-read {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--green);
}
.article-read img { width: 12px; height: 12px; transition: transform .25s ease; }
.article-card:hover .article-read img { transform: translateX(3px); }

/* ============================================================
   我自建的工具
   ============================================================ */
.tool-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.tool-card { padding: 24px; }
.tool-head { display: flex; align-items: flex-start; justify-content: space-between; }
.tool-icon-box {
  width: 46px; height: 46px; border-radius: var(--radius);
  background: var(--bg-card);            /* 中性白底，不与品牌 logo 的颜色打架 */
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tool-card:hover .tool-icon-box {
  transform: scale(1.06);
  box-shadow: var(--shadow-sm);
}
.tool-icon-box img {
  width: 26px; height: 26px;
  object-fit: contain;                    /* 非方形 logo 按比例缩放 */
}

.tool-badge {
  height: 22px; line-height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
}
.tool-badge--green  { background: #DCFCE7; color: #166534; }
.tool-badge--blue   { background: #DBEAFE; color: #1E40AF; }
.tool-badge--purple { background: #F3E8FF; color: #6B21A8; }

.tool-card h3 {
  margin-top: 14px; font-size: 16px; font-weight: 700; line-height: 24px; color: var(--ink);
}
.tool-card p {
  margin-top: 6px; font-size: 13px; line-height: 20px; color: var(--ink-2);
}

/* ============================================================
   联系
   ============================================================ */
.contact-section { max-width: 760px; margin-left: auto; margin-right: auto; }
.contact-card {
  position: relative; overflow: hidden; min-height: 360px;
  display: flex; align-items: center; padding: 48px; gap: 32px;
}
.contact-glow {
  position: absolute; width: 280px; height: 280px; border-radius: 9999px;
  filter: blur(48px); pointer-events: none;
}
.contact-glow--tr { right: -90px; top: -90px; background: rgba(27, 94, 59, 0.09); animation: glow-pulse 9s ease-in-out infinite alternate; }
.contact-glow--bl { left: -90px; bottom: -90px; background: rgba(180, 83, 9, 0.07); animation: glow-pulse 9s ease-in-out infinite alternate-reverse; }
@keyframes glow-pulse {
  from { transform: scale(1); opacity: .8; }
  to   { transform: scale(1.3); opacity: 1; }
}

.contact-body { position: relative; flex: 1; max-width: 460px; }
.contact-body h2 {
  font-size: 28px; font-weight: 600; line-height: 36px; color: var(--ink);
}
.contact-desc { margin-top: 14px; font-size: 15px; line-height: 26px; color: var(--ink-2); }
.contact-lines { margin-top: 22px; }
.contact-line { display: flex; align-items: center; gap: 14px; min-height: 30px; }
.contact-line + .contact-line { margin-top: 10px; }
.contact-line img { width: 26px; height: 26px; }
.contact-line span { font-size: 14px; color: var(--ink); }
.contact-hint { font-size: 12px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; margin-left: 4px; }

.contact-btn {
  margin-top: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 26px;
  background: var(--green); border-radius: 9999px; color: #fff;
  font-size: 15px; font-weight: 500;
  box-shadow: var(--shadow-glow);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.contact-btn:hover {
  transform: translateY(-2px); background: #14512f;
  box-shadow: 0 12px 28px -6px rgba(27, 94, 59, 0.35);
}

/* 微信二维码小卡 */
.wechat-card {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 156px; padding: 16px; text-align: center; cursor: zoom-in;
  align-self: center;
}
.wechat-card { position: relative; z-index: 1; flex-shrink: 0; width: 240px; padding: 16px; text-align: center; cursor: zoom-in; align-self: center; }
.wechat-card img { display: block; width: 100%; height: auto; border-radius: var(--radius); margin: 0 auto; }
.wechat-card p { margin-top: 10px; font-size: 12px; color: var(--ink-2); }

/* ============================================================
   二维码放大灯箱
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center; padding: 32px;
  background: rgba(26, 29, 26, 0.7); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(460px, 90vw); width: auto; height: auto;
  border-radius: var(--radius-lg); background: #fff; padding: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
  transform: scale(.9); transition: transform .3s ease;
}
.lightbox.is-open img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 24px; right: 32px;
  width: 42px; height: 42px; border: none; border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 24px;
  cursor: pointer; transition: background .25s ease, transform .25s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); transform: rotate(90deg); }

/* ============================================================
   滚动进入动画
   ============================================================ */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track, .bg-glow, .contact-glow, .hero-avatar::before { animation: none; }
  .event-pulse { animation: none; }
  .event-card:hover, .event-stat:hover { transform: none; }
}

/* ============================================================
   底部 —— 访问统计 + 备案信息
   ============================================================ */
.site-footer {
  width: 100%; margin-top: 96px; padding: 28px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.site-footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-inter); font-size: 13px; color: var(--muted); line-height: 22px;
  text-align: center;
}
.site-footer .footer-copy { color: var(--muted); opacity: .9; letter-spacing: .2px; }
.site-footer .footer-stats { display: inline-flex; align-items: center; gap: 6px; }
.site-footer .footer-stats b { font-family: var(--f-mono); color: var(--green); font-weight: 700; }
.site-footer .footer-beian a { color: var(--muted); transition: color .2s ease; }
.site-footer .footer-beian a:hover { color: var(--green); }
.site-footer .footer-sep { opacity: .5; }

.subpage + .site-footer,
main.subpage ~ .site-footer { max-width: 880px; margin-left: auto; margin-right: auto; }

/* ============================================================
   响应式 —— 平板 (<=1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .section { margin-top: 110px; }
  .page { padding: 0 36px; }
  .hero { padding: 64px 0 80px; }
  .hero-stats { flex-wrap: wrap; justify-content: center; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-card { flex-direction: column; align-items: stretch; min-height: auto; text-align: left; }
  .contact-body { max-width: none; }
  .wechat-card { align-self: center; }
}

/* ============================================================
   响应式 —— 手机 (<=768px)
   ============================================================ */
@media (max-width: 768px) {
  .page { padding: 0 20px; }
  .section { margin-top: 80px; }
  .section-title { margin-bottom: 28px; }
  .hero { padding: 48px 0 56px; }

  .hero-id h1 { font-size: 34px; line-height: 42px; }
  .hero-role { font-size: 14px; letter-spacing: 1.5px; }
  .hero-quote { font-size: 16px; }
  .hero-intro { font-size: 15px; line-height: 26px; }

  .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { width: auto; }

  .about-card { padding: 24px 20px; }
  .about-sub { font-size: 15px; }
  .about-tags { gap: 10px; }

  .community-lecture p { font-size: 19px; line-height: 28px; }
  .lecture-icon { width: 26px; height: 26px; }
  .community-roles { gap: 10px; }
  .role-chip { font-size: 14px; height: 48px; padding: 0 16px; gap: 6px; }
  .role-chip-logo { height: 25px; max-width: 130px; }
  .role-chip-logo--techflows { height: 21px; max-width: 96px; }
  .role-chip-logo--volcengine { height: 34px; width: auto; max-width: 170px; }
  .community-roles { flex-wrap: wrap; gap: 10px; }

  .marquee-group { gap: 44px; padding-right: 44px; }
  .brand-item { gap: 6px; }

  .social-links { gap: 14px; }
  .article-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }

  .events-grid { grid-template-columns: 1fr; }
  .events-stats { gap: 10px; }
  .event-stat { padding: 14px 10px; }
  .event-stat-num { font-size: 22px; line-height: 28px; }
  .event-stat-label { font-size: 12px; }
  .events-tabs { display: flex; width: 100%; }
  .events-tab { flex: 1; padding: 0 12px; }
  .event-card { padding: 22px; }
  .event-foot { flex-direction: column; align-items: flex-start; gap: 4px; }

  .contact-card { padding: 32px 24px; }
  .contact-body h2 { font-size: 22px; }

  .site-footer { margin-top: 64px; padding: 22px 20px; }
  .site-footer-inner { flex-direction: column; align-items: center; gap: 8px; text-align: center; }
}

/* ============================================================
   文章列表页（articles.html）—— 全量文章 + 分页
   卡片直接复用首页的 .article-grid / .article-card，这里只补容器与分页控件
   ============================================================ */
.archive-count {
  font-family: var(--f-mono); font-size: 14px; color: var(--ink-2);
}

.archive-empty {
  grid-column: 1 / -1;
  padding: 40px 24px; text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 14px; color: var(--ink-2);
}

/* 文章列表网格：与首页同款三列，进入列表页时留出与 Hero 的间距 */
.article-grid + .pager { margin-top: 40px; }

/* 分页 */
.pager {
  margin-top: 40px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.pager-btn {
  min-width: 44px; height: 44px; padding: 0 14px;   /* 44px 触控目标 */
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--f-mono); font-size: 14px; color: var(--ink-2);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pager-btn:hover:not(:disabled) {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(27, 94, 59, .25);
}
.pager-btn[aria-current="page"] {
  background: var(--green); color: #fff; border-color: var(--green);
}
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-ellipsis {
  min-width: 32px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 14px; color: var(--ink-2);
}

@media (max-width: 768px) {
  .pager { gap: 6px; }
  .pager-btn { min-width: 40px; height: 40px; padding: 0 10px; }
}
