/* =========================================================
   郭一略 · 简历站 · 深色科技风
   ========================================================= */
:root {
  --bg: #05080f;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-solid: #0b1220;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8eefc;
  --text-2: #9fb0cd;
  --text-3: #6b7d9c;
  --cyan: #4fd1ff;
  --violet: #7c6cff;
  --mint: #5ce1b0;
  --amber: #ffc46b;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景网格 + 光晕 */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.bg-glow.a {
  width: 520px; height: 520px;
  top: -180px; left: -120px;
  background: radial-gradient(circle, rgba(79, 209, 255, 0.35), transparent 65%);
}
.bg-glow.b {
  width: 560px; height: 560px;
  top: 80px; right: -180px;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.32), transparent 65%);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}
.roles {
  display: flex;
  gap: 4px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  overflow-x: auto;
  scrollbar-width: none;
}
.roles::-webkit-scrollbar { display: none; }
.role-btn {
  padding: 7px 18px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-2);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s var(--ease);
}
.role-btn:hover { color: var(--text); }
.role-btn.active {
  color: #04121c;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 6px 20px rgba(79, 209, 255, 0.3);
}
.print-btn {
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.print-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- 布局 ---------- */
main {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---------- 首屏 ---------- */
.hero {
  display: flex;
  gap: 34px;
  align-items: center;
  padding: 64px 0 44px;
}
.hero-photo {
  position: relative;
  flex: none;
  width: 132px;
  height: 132px;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(79, 209, 255, 0.5);
  box-shadow: 0 0 0 6px rgba(79, 209, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.5);
}
.photo-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed rgba(124, 108, 255, 0.45);
  animation: spin 22s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-main { min-width: 0; }
.eyebrow {
  margin: 0 0 10px;
  font-size: 11.5px;
  letter-spacing: 4px;
  color: var(--cyan);
  font-weight: 600;
}
h1 {
  margin: 0 0 10px;
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: 2px;
  background: linear-gradient(100deg, #ffffff 10%, #9fd8ff 55%, #b3a7ff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.headline {
  margin: 0 0 16px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: #cfe0ff;
  line-height: 1.5;
  font-weight: 500;
}
.metas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.metas li {
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.positioning {
  margin: 0;
  max-width: 620px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-2);
}

/* ---------- 数据条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 46px;
}
.stat {
  position: relative;
  padding: 20px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0.7;
}
.stat:hover { transform: translateY(-3px); border-color: rgba(79, 209, 255, 0.35); }
.stat b {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ---------- 区块 ---------- */
.block { margin-bottom: 52px; }
.block-head { margin-bottom: 20px; }
.block-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: 1px;
}
.block-head h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
}
.block-sub { margin: 0; font-size: 13px; color: var(--text-3); line-height: 1.7; }

/* ---------- 能力卡 ---------- */
.ability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.ability {
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.ability:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 209, 255, 0.3);
  background: rgba(79, 209, 255, 0.045);
}
.ability h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #dcebff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ability h3 i {
  font-style: normal;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(79, 209, 255, 0.12);
  border: 1px solid rgba(79, 209, 255, 0.25);
}
.ability p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--text-2); }

/* ---------- 经历时间线 ---------- */
.timeline { display: grid; gap: 16px; }
.exp {
  position: relative;
  padding: 22px 24px 22px 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.exp::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  opacity: 0.75;
}
.exp:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.exp-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.exp-title { font-size: 16.5px; font-weight: 700; color: #fff; }
.exp-org { font-size: 13px; color: var(--cyan); }
.exp-date { margin-left: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.exp-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 12px; }
.tag {
  padding: 3px 10px;
  font-size: 11.5px;
  color: #bcd4f5;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.exp ul { margin: 0; padding-left: 18px; }
.exp li {
  margin-bottom: 7px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-2);
}
.exp li strong { color: #fff; font-weight: 600; }
.exp li:last-child { margin-bottom: 0; }

/* ---------- 项目 ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.project {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.project:hover { transform: translateY(-3px); border-color: rgba(124, 108, 255, 0.35); }
.project h3 { margin: 0 0 8px; font-size: 15.5px; color: #e6e9ff; }
.project p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--text-2); }

/* ---------- 技能 ---------- */
.skill-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skill {
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.skill h3 { margin: 0 0 10px; font-size: 13px; color: var(--text-3); letter-spacing: 1px; }
.skill .tags { display: flex; flex-wrap: wrap; gap: 7px; }
.skill .tags span {
  padding: 5px 11px;
  font-size: 12.5px;
  color: #d6e4fb;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: all 0.2s;
}
.skill .tags span:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- 求职意向 ---------- */
.intention {
  padding: 28px;
  background: linear-gradient(140deg, rgba(79, 209, 255, 0.07), rgba(124, 108, 255, 0.07));
  border: 1px solid rgba(79, 209, 255, 0.18);
  border-radius: 22px;
}
.intention .block-head h2 { margin-bottom: 14px; }
.intention-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.intention-item b { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; font-weight: 500; }
.intention-item span { font-size: 14px; color: #e9f2ff; line-height: 1.6; }
.contact-note { margin: 20px 0 0; font-size: 12.5px; color: var(--text-3); }

.foot {
  position: relative;
  z-index: 1;
  padding: 0 24px 48px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 进入动画 ---------- */
.reveal { animation: rise 0.6s var(--ease) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .ability-grid, .projects { grid-template-columns: 1fr; }
  .skill-groups { grid-template-columns: 1fr; }
  .intention-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .roles { order: 3; width: 100%; margin-left: 0; }
  .print-btn { margin-left: auto; }
  main { padding: 0 16px 60px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 22px; padding: 40px 0 32px; }
  .hero-photo { width: 104px; height: 104px; }
  .exp-date { margin-left: 0; width: 100%; }
  .intention-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   打印 / 导出 PDF
   ========================================================= */
@media print {
  @page { margin: 14mm 12mm; }
  html, body {
    background: #fff !important;
    color: #111 !important;
  }
  .bg-grid, .bg-glow, .topbar, .foot, .print-btn, .roles, .photo-ring { display: none !important; }
  main { max-width: none; padding: 0; }
  .hero { padding: 0 0 16px; gap: 20px; }
  .hero-photo { width: 88px; height: 88px; }
  .hero-photo img { border: 1px solid #ccc; box-shadow: none; }
  h1 {
    -webkit-text-fill-color: #111;
    color: #111;
    font-size: 30px;
    background: none;
  }
  .eyebrow, .exp-org { color: #0b6ea8 !important; }
  .headline { color: #222 !important; font-size: 15px; }
  .metas li, .stat, .ability, .exp, .project, .skill, .intention {
    background: #fff !important;
    border-color: #d8d8d8 !important;
    box-shadow: none !important;
  }
  .intention { background: #f7f9fc !important; }
  .stat b { color: #111 !important; }
  .stat span, .block-sub, .ability p, .exp li, .project p, .metas li,
  .positioning, .skill h3, .intention-item b, .contact-note, .exp-date, .tag {
    color: #333 !important;
  }
  .ability h3, .exp-title, .project h3, .intention-item span { color: #111 !important; }
  .tag, .skill .tags span { border-color: #ddd !important; background: #f5f5f5 !important; color: #333 !important; }
  .exp::before { display: none; }
  .block { margin-bottom: 20px; break-inside: avoid; }
  .stats { gap: 8px; margin-bottom: 18px; }
  .stat { padding: 10px 12px; }
  .stat b { font-size: 18px; }
  .timeline, .projects, .ability-grid, .skill-groups { gap: 10px; }
  .exp, .project, .ability, .skill { padding: 12px 14px; break-inside: avoid; }
  .exp li { font-size: 11.5px; line-height: 1.6; }
  .reveal { animation: none !important; }
}

/* ---------- 意向标签（首屏） ---------- */
.intent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.intent-chips span {
  padding: 5px 13px;
  font-size: 12.5px;
  color: #cfe6ff;
  background: rgba(79, 209, 255, 0.08);
  border: 1px solid rgba(79, 209, 255, 0.26);
  border-radius: 999px;
  transition: all 0.22s var(--ease);
}
.intent-chips span:hover {
  color: #04121c;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border-color: transparent;
}

@media print {
  .intent-chips span {
    color: #0b6ea8 !important;
    background: #f2f7fc !important;
    border-color: #cfe2f2 !important;
  }
}
