/* ============================================
   李林韦 · 个人简历  |  浅色科技简约风
   ============================================ */

:root {
  --bg: #f7f8f6;
  --bg-soft: #ffffff;
  --ink: #16191d;
  --ink-2: #4b5560;
  --ink-3: #8a939e;
  --line: #e3e7e4;
  --accent: #0e9f6e;
  --accent-deep: #0b7d57;
  --accent-soft: #e3f5ee;
  --amber: #d97706;
  --radius: 14px;
  --mono: "JetBrains Mono", "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--sans);
  background-color: var(--bg);
  /* 细点阵背景，科技感 */
  background-image: radial-gradient(circle, #dfe4e0 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

.mono { font-family: var(--mono); letter-spacing: .02em; }
.accent { color: var(--accent); }
.accent-strong { color: var(--accent-deep); font-weight: 700; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- LAYOUT（简历 + 游戏左右并排） ---------- */
.layout {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px; align-items: start;
}
.game-col { position: sticky; top: 70px; height: calc(100vh - 70px); }
.game-wrap { position: relative; height: 100%; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(247, 248, 246, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--mono); font-weight: 800; font-size: 18px;
  color: var(--ink); text-decoration: none; letter-spacing: .05em;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: 13px; color: var(--ink-2); text-decoration: none;
  padding: 6px 12px; border-radius: 8px; transition: all .2s;
}
.nav-links a:hover { color: var(--accent-deep); background: var(--accent-soft); }
.nav-links .nav-game { color: var(--accent-deep); font-weight: 600; }

/* ---------- HERO ---------- */
.hero { padding: 156px 0 72px; }
.hero-eyebrow { color: var(--accent-deep); font-size: 13px; margin-bottom: 12px; }
.hero-name {
  font-size: clamp(40px, 7vw, 64px); font-weight: 800; line-height: 1.1;
  letter-spacing: .01em; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
}
.hero-name-en { font-size: clamp(14px, 2vw, 18px); font-weight: 500; color: var(--ink-3); letter-spacing: .18em; }
.hero-title { font-size: 19px; color: var(--ink-2); margin-top: 14px; font-weight: 500; }
.hero-goal {
  margin-top: 20px; font-size: 16px; font-weight: 600;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.goal-tag {
  font-size: 12px; font-weight: 700; color: #fff; background: var(--accent);
  padding: 3px 10px; border-radius: 6px; letter-spacing: .1em;
}
.hero-contacts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.contact-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-2); text-decoration: none;
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; transition: all .2s;
}
a.contact-chip:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-1px); }
.chip-icon { color: var(--accent); font-weight: 700; }

/* ---------- SECTIONS ---------- */
.section { padding: 22px 0; }
.section-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.section-index {
  font-size: 13px; font-weight: 700; color: var(--accent-deep);
  border: 1px solid var(--accent); border-radius: 8px;
  padding: 4px 9px; margin-top: 4px; background: var(--accent-soft);
}
.section-label { font-size: 12px; letter-spacing: .28em; color: var(--ink-3); }
.section-title { font-size: 27px; font-weight: 800; letter-spacing: .02em; }

/* ---------- CARD ---------- */
.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card:hover { border-color: #cfd6d1; box-shadow: 0 10px 30px rgba(22, 25, 29, .06); }

/* ---------- TIMELINE (Education) ---------- */
.timeline { display: flex; flex-direction: column; gap: 18px; }
.tl-item { display: grid; grid-template-columns: 168px 1fr; gap: 18px; align-items: start; }
.tl-time { font-size: 14.5px; font-weight: 600; color: var(--ink-2); padding-top: 30px; text-align: right; }
.tl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tl-row h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.tl-sub { font-size: 12px; color: var(--ink-3); }
.tl-major { font-weight: 600; color: var(--accent-deep); margin-top: 4px; }
.tl-desc { color: var(--ink-2); font-size: 14.5px; margin-top: 8px; }
.tag {
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 6px;
  background: #eef1ef; color: var(--ink-2); letter-spacing: .06em;
}
.tag-green { background: var(--accent-soft); color: var(--accent-deep); }

/* ---------- SKILLS ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-cat { font-size: 11px; letter-spacing: .24em; color: var(--accent-deep); margin-bottom: 6px; }
.skill-card h3 { font-size: 17px; margin-bottom: 14px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  font-size: 12.5px; padding: 4px 11px; border-radius: 7px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-deep); border: 1px solid #bfe8d9;
}

/* ---------- RESEARCH / PROJECTS ---------- */
.research-card, .project-card { margin-bottom: 18px; }
.card-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h3 { font-size: 19px; line-height: 1.4; }
.card-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.card-intro { color: var(--ink-2); font-size: 14.5px; margin-bottom: 14px; padding-left: 12px; border-left: 3px solid var(--accent-soft); }
.points { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.points li { position: relative; padding-left: 20px; font-size: 14.5px; color: var(--ink-2); }
.points li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 7px; height: 7px; background: var(--accent); border-radius: 2px;
}
.points strong { color: var(--ink); }
.hl { color: var(--accent-deep); background: var(--accent-soft); padding: 0 5px; border-radius: 4px; }

.metric-row { display: flex; gap: 22px; }
.metric { display: flex; flex-direction: column; align-items: flex-end; }
.metric-num { font-size: 22px; font-weight: 800; color: var(--accent-deep); line-height: 1.2; }
.metric-label { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

.tech-tags { display: flex; gap: 8px; flex-wrap: wrap; align-content: flex-start; }
.tech-tags span {
  font-size: 11.5px; padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--ink-2); background: #fafbfa;
}

/* ---------- AWARDS ---------- */
.award-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.award-card { text-align: left; }
.award-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-weight: 800; font-size: 15px; margin-bottom: 12px;
}
.award-card h3 { font-size: 15.5px; margin-bottom: 4px; }
.award-card p:last-child { font-size: 13px; color: var(--ink-3); }

/* ---------- GAME (Playground) ---------- */
.game-screen {
  position: relative; cursor: pointer; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
/* 画布按实际像素 1:1 显示，余量居中留白，保证网格整齐 */
.game-screen canvas { display: block; image-rendering: pixelated; }
.game-tips {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 7px 0; font-size: 11.5px; color: var(--ink-2);
  text-align: center; letter-spacing: .05em;
  background: rgba(247, 248, 246, .85); backdrop-filter: blur(3px);
}

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; background: var(--bg-soft); }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-top: 22px; padding-bottom: 22px; font-size: 12px; color: var(--ink-3); letter-spacing: .08em;
}
.footer-inner a { color: var(--accent-deep); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

/* ---------- REVEAL ANIMATION ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .game-col { position: static; width: 100%; max-width: 560px; margin: 0 auto; height: auto; }
  .game-col .game-screen { height: 62vh; }
}
@media (max-width: 720px) {
  .hero { padding: 128px 0 56px; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
  .tl-time { text-align: left; padding-top: 0; }
  .skill-grid, .award-grid { grid-template-columns: 1fr; }
  .metric-row { width: 100%; justify-content: flex-start; }
  .metric { align-items: flex-start; }
  .nav-links a:not(.nav-game) { display: none; }
  .card { padding: 20px; }
}
