/* =========================================================
   刘鹏程 · 个人网站
   风格：清爽活力（亮色 / 圆角卡片 / 轻动效）
   ========================================================= */

:root {
  --bg: #F7F9F5;
  --bg-tint: #F0F6EF;
  --surface: #FFFFFF;
  --ink: #0E1F18;
  --ink-2: #2B3D34;
  --muted: #5C6D64;
  --line: #E4EBE3;
  --line-strong: #D3E0D4;

  --brand: #16A34A;
  --brand-deep: #0B7A3B;
  --brand-ink: #065F3B;
  --brand-soft: #E7F6EC;
  --lime: #B8F26B;
  --gold: #F5B740;

  --radius-sm: 12px;
  --radius: 22px;
  --radius-lg: 30px;

  --shadow-sm: 0 1px 2px rgba(15, 40, 26, .05), 0 6px 18px -8px rgba(15, 40, 26, .12);
  --shadow: 0 2px 6px rgba(15, 40, 26, .05), 0 22px 48px -24px rgba(15, 40, 26, .22);
  --shadow-lg: 0 8px 20px -6px rgba(15, 40, 26, .10), 0 40px 80px -40px rgba(15, 40, 26, .30);

  --font-sans: "HarmonyOS Sans SC", "PingFang SC", "MiSans", "Hiragino Sans GB",
               "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

  --wrap: 1160px;
  --ease: cubic-bezier(.22, .72, .18, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }

::selection { background: var(--lime); color: #0E2A17; }

:focus-visible {
  outline: 3px solid rgba(22, 163, 74, .45);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- 无障碍跳转 ---------- */
.skip {
  position: fixed;
  left: 16px;
  top: -70px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  transition: top .22s var(--ease);
}
.skip:focus { top: 14px; }

/* ---------- 顶部滚动进度 ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 90;
  background: transparent;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--lime));
  border-radius: 0 99px 99px 0;
  transition: width .1s linear;
}

/* ---------- 导航 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(247, 249, 245, .78);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: rgba(228, 235, 227, .9);
  box-shadow: 0 10px 30px -24px rgba(10, 40, 24, .5);
}

.header-inner {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #1CB35A, #0B7A3B);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .02em;
  box-shadow: 0 6px 14px -6px rgba(11, 122, 59, .8), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
@keyframes brand-spin {
  0% { transform: rotate(0deg) scale(1); }
  55% { transform: rotate(200deg) scale(1.18); }
  100% { transform: rotate(360deg) scale(1); }
}
.brand-mark.is-spinning { animation: brand-spin .85s var(--ease); }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .01em;
}
.brand-text em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 15.5px;
  color: var(--ink-2);
  transition: color .25s, background .25s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--brand-ink); }
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--brand-ink); font-weight: 600; }
.nav a.nav-cta {
  margin-left: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  transition: background .25s, transform .25s;
}
.nav a.nav-cta::after { display: none; }
.nav a.nav-cta:hover { background: var(--brand-deep); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 通用文字组件 ---------- */
.eyebrow, .kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .14);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(22, 163, 74, .14); }
  50% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); }
}

.kicker span {
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 2px 7px;
  letter-spacing: .04em;
}

.section { padding: 112px 0; position: relative; }
.section > .wrap { position: relative; z-index: 1; }

/* 每个板块背后的大号描边数字（艺术字装饰，随板块顺序自动编号） */
body { counter-reset: sec; }
.section { counter-increment: sec; }
.section-head { position: relative; }
.section-head::after {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  left: calc(100% + 48px);
  top: -.42em;
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: clamp(6rem, 9.5vw, 10.5rem);
  font-weight: 700;
  line-height: .85;
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(14, 31, 24, .13);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
@media (max-width: 1240px) {
  .section-head::after { display: none; }
}
.section-tint {
  background:
    radial-gradient(900px 420px at 88% 0%, rgba(184, 242, 107, .16), transparent 65%),
    var(--bg-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-title {
  margin-top: 18px;
  font-size: clamp(2.05rem, 3.9vw, 3.05rem);
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--ink);
}
.section-lede {
  margin-top: 18px;
  color: var(--muted);
  font-size: 17.5px;
  max-width: 620px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1;
  transition: transform .3s var(--ease), box-shadow .3s, background .3s, color .3s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s var(--ease);
}
.btn-primary {
  background: linear-gradient(145deg, #1CB35A, #0B7A3B);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(11, 122, 59, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(11, 122, 59, .85); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost {
  background: rgba(255, 255, 255, .7);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-lg { padding: 17px 30px; font-size: 16.5px; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 150px 0 0;
  overflow: hidden;
  background:
    radial-gradient(760px 460px at 78% 14%, rgba(184, 242, 107, .30), transparent 62%),
    radial-gradient(820px 520px at 8% -6%, rgba(22, 163, 74, .12), transparent 60%),
    linear-gradient(180deg, #FAFCF8 0%, var(--bg) 70%);
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(14, 31, 24, .16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(680px 420px at 72% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(680px 420px at 72% 30%, #000 0%, transparent 78%);
  opacity: .55;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: 56px;
  align-items: center;
  padding-bottom: 84px;
}

.hero h1 {
  margin: 26px 0 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
}
.hero h1 .mark {
  position: relative;
  display: inline-block;
  color: var(--brand-ink);
  background: linear-gradient(180deg, transparent 64%, rgba(184, 242, 107, .78) 64%, rgba(184, 242, 107, .78) 92%, transparent 92%);
  padding: 0 .1em;
}
.hero-lede {
  margin-top: 26px;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 46px;
  padding-top: 28px;
  border-top: 1px dashed var(--line-strong);
  max-width: 540px;
}
.hero-stats > div { padding-right: 30px; margin-right: 30px; border-right: 1px solid var(--line); }
.hero-stats > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero-stats dt {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1.3;
}
.hero-stats dd { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* 头像卡片 */
.hero-visual { position: relative; display: grid; place-items: center; }

.portrait-card {
  position: relative;
  width: min(100%, 430px);
  padding: 14px 14px 0;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 36px;
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transform: rotate(-1.2deg);
  transition: transform .6s var(--ease);
}
.portrait-card:hover { transform: rotate(0deg) translateY(-4px); }

.portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 26px;
  position: relative;
  z-index: 1;
}

.portrait-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 12px -14px 0;
  padding: 16px 26px 20px;
  background: #fff;
  border-top: 1px solid rgba(228, 235, 227, .85);
  border-radius: 0 0 34px 34px;
}
.portrait-meta strong { font-size: 17px; letter-spacing: .04em; }
.portrait-meta span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }

/* 头像旁的标签：可点击，弹出说明 */
.tag-cloud {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.float-tag {
  position: absolute;
  pointer-events: auto;
  z-index: 3;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(228, 235, 227, .9);
  box-shadow: 0 10px 26px -14px rgba(10, 40, 24, .55);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .02em;
  cursor: pointer;
  animation: floaty 6s ease-in-out infinite;
  transition: background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.float-tag:hover {
  background: #fff;
  color: var(--brand-ink);
  border-color: #BFE7CB;
  box-shadow: 0 14px 30px -14px rgba(11, 122, 59, .55);
}
.float-tag:focus-visible { outline-offset: 4px; }
.tag-a { top: 8%; left: -6%; animation-delay: -.4s; }
.tag-b { top: 26%; right: -8%; animation-delay: -1.8s; }
.tag-c { bottom: 24%; left: -10%; animation-delay: -3.1s; }
.tag-d { bottom: 8%; right: 2%; animation-delay: -2.2s; font-family: var(--font-mono); letter-spacing: .12em; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* 关键词跑马灯 */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .6);
  overflow: hidden;
  padding: 15px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: scroll-x 34s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-track span:nth-child(even) { color: var(--brand); opacity: .6; }
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
  gap: 64px;
  align-items: start;
}
.about-copy p {
  color: #3A4B42;
  font-size: 17.5px;
  line-height: 1.95;
  margin-bottom: 22px;
}
.about-copy strong { color: var(--ink); font-weight: 700; }

.quote {
  margin: 34px 0 0;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(231, 246, 236, .9), rgba(255, 255, 255, .9));
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  position: relative;
  overflow: hidden;
}
.quote::after {
  content: "”";
  position: absolute;
  right: 18px; top: -18px;
  font-size: 110px;
  line-height: 1;
  color: rgba(22, 163, 74, .10);
  font-family: Georgia, serif;
}
.quote p {
  margin: 0;
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: clamp(1.25rem, 1.9vw, 1.6rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .02em;
  line-height: 1.75;
}
.quote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}

.info-card {
  position: sticky;
  top: 104px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.info-card h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  letter-spacing: .02em;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.info-card h3 span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--muted);
  font-weight: 500;
}
.info-list { margin-top: 6px; }
.info-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { font-size: 13.5px; color: var(--muted); flex: none; }
.info-list dd { font-size: 15.5px; font-weight: 600; color: var(--ink); text-align: right; }
.info-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 13.5px;
  line-height: 1.75;
}

/* ---------- 校园角色 ---------- */
.roles {
  margin-top: 54px;
  padding-top: 34px;
  border-top: 1px dashed var(--line-strong);
}
.roles-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.roles-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.roles-head p { font-size: 14.5px; color: var(--muted); }
.roles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.role {
  padding: 20px 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.role:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.role-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--brand-ink);
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 12px;
}
.role h3 { font-size: 16.5px; line-height: 1.5; letter-spacing: 0; }
.role p { margin-top: 8px; font-size: 13.5px; line-height: 1.75; color: var(--muted); }

/* ---------- SKILLS ---------- */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.skill-card {
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.skill-icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  margin-bottom: 20px;
}
.skill-icon svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skill-card h3 { font-size: 20.5px; letter-spacing: -.01em; }
.skill-desc { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

.bars { margin-top: 22px; display: grid; gap: 16px; }
.bars li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 10px;
  align-items: center;
}
.bars li span { font-size: 14px; color: var(--ink-2); }
.bars li em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--brand-deep); font-weight: 600; }
.bars li b {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 99px;
  background: #EDF2ED;
  overflow: hidden;
}
.bars li b i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand) 60%, #86D96A);
  transition: width 1.1s var(--ease) .15s;
}
.reveal.in .bars li b i { width: var(--w); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips li {
  font-size: 13px;
  color: #3C4F45;
  background: #F3F7F2;
  border: 1px solid #E6EEE5;
  border-radius: 999px;
  padding: 6px 13px;
  line-height: 1.4;
  transition: background .25s, color .25s, border-color .25s;
}
.chips li:hover { background: var(--brand-soft); border-color: #CBEBD5; color: var(--brand-ink); }
.chips-lg li { font-size: 13.5px; padding: 9px 17px; background: #fff; }

.soft-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 38px;
  padding-top: 30px;
  border-top: 1px dashed var(--line-strong);
}
.soft-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
  flex: none;
}
.soft-row .chips { margin-top: 0; }

/* ---------- PROJECTS ---------- */
.project {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.project.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .55fr);
  margin-bottom: 22px;
}
.project-main { padding: 40px 44px 38px; }
.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.tag-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-ink);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 5px 12px;
}
.tag-live i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 2s infinite;
}
.project-year {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--muted);
}
.project-main h3 {
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  letter-spacing: -.02em;
  line-height: 1.35;
}
.project-main > p {
  margin-top: 16px;
  color: #3A4B42;
  font-size: 16.5px;
  line-height: 1.9;
  max-width: 640px;
}
.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}
.specs > div {
  flex: 1 1 110px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #F6F9F5;
  border: 1px solid var(--line);
}
.specs dt { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.specs dd { font-size: 16px; font-weight: 700; color: var(--brand-ink); margin-top: 3px; letter-spacing: -.01em; }

.project-side {
  position: relative;
  display: grid;
  place-items: center;
  padding: 26px;
  background:
    linear-gradient(160deg, rgba(231, 246, 236, .9), rgba(255, 255, 255, .5)),
    #F4F9F3;
  border-left: 1px solid var(--line);
  color: #15803D;
}
.blueprint { width: 100%; height: auto; max-width: 320px; opacity: .95; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.project-card {
  display: flex;
  flex-direction: column;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.project-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: #F2F7F1;
  color: var(--brand-deep);
}
.project-icon svg {
  width: 21px; height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.project-card h3 { font-size: 20px; margin-top: 4px; letter-spacing: -.01em; }
.project-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.85;
}
.project-card .chips { margin-top: auto; padding-top: 22px; }

/* ---------- 生活照 ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.shot:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.shot img { width: 100%; height: auto; display: block; background: #EDF2EC; }
.shot figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
}
.shot figcaption span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--brand);
}

/* ---------- EXPERIENCE ---------- */
.timeline { position: relative; padding-left: 0; }
.timeline::before {
  content: "";
  position: absolute;
  left: 147px;
  top: 12px;
  bottom: 22px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--line-strong), var(--line-strong) 82%, transparent);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  column-gap: 56px;
  padding-bottom: 30px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 141px;
  top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px var(--bg-tint);
  z-index: 1;
}
.timeline li.is-next::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--bg-tint), 0 0 0 9px rgba(22, 163, 74, .14);
}
.timeline time {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--brand-ink);
  text-align: right;
  padding-top: 6px;
  font-variant-numeric: tabular-nums;
}
.tl-body { padding: 0 0 2px; max-width: 720px; }
.tl-body h3 { font-size: 19px; letter-spacing: -.01em; }
.tl-body p { margin-top: 6px; color: var(--muted); font-size: 15.5px; line-height: 1.8; }

/* ---------- CONTACT ---------- */
.contact-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 48px;
  align-items: center;
  padding: 56px;
  border-radius: 36px;
  background:
    radial-gradient(700px 380px at 92% -10%, rgba(184, 242, 107, .30), transparent 60%),
    radial-gradient(520px 320px at 0% 110%, rgba(22, 163, 74, .40), transparent 60%),
    linear-gradient(140deg, #0A3524, #0E4E32 55%, #0B3E28);
  color: #EAF6EC;
  box-shadow: 0 40px 90px -50px rgba(6, 50, 30, .9);
}
.contact-card::after {
  content: "";
  position: absolute;
  right: -120px; top: -140px;
  width: 420px; height: 420px;
  border-radius: 50%;
  border: 1px dashed rgba(184, 242, 107, .28);
  pointer-events: none;
}
.contact-card .kicker { color: var(--lime); }
.contact-card .kicker span { color: #0A3524; background: var(--lime); }
.contact-copy h2 {
  margin-top: 16px;
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
}
.contact-copy > p:last-child {
  margin-top: 16px;
  max-width: 460px;
  color: rgba(234, 246, 236, .72);
  font-size: 16px;
  line-height: 1.85;
}
.contact-actions { position: relative; z-index: 1; display: grid; gap: 18px; }
.contact-actions .btn-primary {
  justify-content: center;
  background: var(--lime);
  color: #0A3524;
  box-shadow: 0 16px 34px -18px rgba(184, 242, 107, .9);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: -.01em;
}
.contact-actions .btn-primary:hover { background: #CBF894; transform: translateY(-2px); }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.contact-links li { flex: 1 1 auto; }
.contact-links a,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(234, 246, 236, .22);
  background: rgba(255, 255, 255, .06);
  font-size: 14px;
  color: #EAF6EC;
  font-family: inherit;
  cursor: pointer;
  transition: background .25s, border-color .25s, transform .25s;
}
.contact-links a:hover,
.link-btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(234, 246, 236, .5); transform: translateY(-2px); }
.contact-links a span,
.link-btn span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; color: rgba(234, 246, 236, .55); }
.link-btn svg {
  width: 13px; height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .6;
}

/* ---------- 复制提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 300;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(14, 31, 24, .94);
  color: #EAF6EC;
  font-size: 13.5px;
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, .7);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .25s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #fff; transform: translateY(-2px); }
.to-top svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 标签说明弹窗 ---------- */
.dialog {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 24px;
}
.dialog[hidden] { display: none; }
.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 16, .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.dialog.is-open .dialog-backdrop { opacity: 1; }
.dialog-card {
  position: relative;
  width: min(100%, 540px);
  max-height: min(82vh, 660px);
  overflow: auto;
  padding: 34px 34px 30px;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 40px 90px -40px rgba(6, 40, 24, .65);
  opacity: 0;
  transform: translateY(18px) scale(.98);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.dialog.is-open .dialog-card { opacity: 1; transform: none; }
.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.dialog-close:hover { background: var(--brand-soft); color: var(--brand-ink); }
.dialog-content .dialog-kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand);
}
.dialog-content h3 {
  margin-top: 10px;
  padding-right: 34px;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  line-height: 1.4;
  letter-spacing: -.01em;
}
.dialog-content p {
  margin-top: 14px;
  color: #3A4B42;
  font-size: 16px;
  line-height: 1.9;
}
.dialog-content p strong { color: var(--ink); }
.dialog-content p.dialog-note {
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 14.5px;
  line-height: 1.85;
}
.dialog-link {
  display: inline-flex;
  margin-top: 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-deep);
  border-bottom: 1px solid rgba(11, 122, 59, .35);
  padding-bottom: 3px;
  transition: border-color .2s, color .2s;
}
.dialog-link:hover { color: var(--brand); border-bottom-color: var(--brand); }
body.dialog-open { overflow: hidden; }

/* ---------- FOOTER ---------- */
.site-footer {
  padding: 40px 0 46px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13.5px;
}
.footer-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #92A398;
}

/* ---------- 滚动进场 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease) var(--d, 0s), transform .8s var(--ease) var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 52px; }
  .hero-copy { max-width: 720px; }
  .hero-visual { justify-items: center; }
  .portrait-card { width: min(100%, 360px); }
  .tag-a { left: 0; }
  .tag-b { right: 0; }
  .tag-c { left: 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .info-card { position: static; }
  .roles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-grid, .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 单栏之后标签不浮动了，改成照片下方的一行按钮 */
  .tag-cloud {
    position: static;
    inset: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    pointer-events: auto;
  }
  .float-tag {
    position: static;
    padding: 9px 16px;
    animation: none;
  }
  .project.featured { grid-template-columns: 1fr; }
  .project-side { display: none; }
  .contact-card { grid-template-columns: 1fr; gap: 32px; padding: 44px; }
  .timeline::before { left: 119px; }
  .timeline li::before { left: 113px; }
  .timeline li { grid-template-columns: 96px minmax(0, 1fr); column-gap: 44px; }
}

@media (max-width: 780px) {
  .wrap { padding: 0 20px; }
  .section { padding: 78px 0; }
  .section-head { margin-bottom: 36px; }
  .hero { padding-top: 118px; }
  .hero-inner { padding-bottom: 60px; }
  .hero-stats { gap: 0; }
  .hero-stats > div { padding-right: 20px; margin-right: 20px; }
  .hero-stats dt { font-size: 19px; }
  .skill-grid, .project-grid { grid-template-columns: 1fr; }
  .roles-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; gap: 16px; }

  /* 手机上标签没地方浮动了，改成照片下方的一行按钮 */
  .tag-cloud {
    position: static;
    inset: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    pointer-events: auto;
  }
  .float-tag {
    position: static;
    padding: 8px 14px;
    font-size: 13px;
    animation: none;
  }

  /* 弹窗在手机上做成底部抽屉 */
  .dialog { padding: 0; align-items: end; }
  .dialog-card {
    width: 100%;
    max-height: 86vh;
    padding: 30px 22px calc(26px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }
  .dialog-content p { font-size: 15.5px; }

  .site-footer { padding: 32px 0 36px; }

  .header-inner { height: 68px; }
  .nav {
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.99);
    transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  }
  .nav a { padding: 13px 16px; border-radius: 12px; font-size: 15px; }
  .nav a::after { display: none; }
  .nav a.is-active { background: var(--brand-soft); }
  .nav a.nav-cta { margin: 6px 0 0; text-align: center; padding: 14px; }
  .nav-toggle { display: inline-flex; }
  .site-header.nav-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .timeline::before { left: 9px; top: 14px; bottom: 14px; }
  .timeline li {
    grid-template-columns: 1fr;
    row-gap: 6px;
    padding: 0 0 28px 36px;
  }
  .timeline li::before { left: 2px; top: 7px; }
  .timeline time { text-align: left; padding-top: 0; }
  .tl-body h3 { font-size: 16.5px; }

  .project-main { padding: 30px 24px 28px; }
  .contact-card { padding: 32px 24px; border-radius: 28px; }
  .contact-links a,
  .link-btn { font-size: 12.5px; padding: 9px 13px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .reveal.in .bars li b i { width: var(--w); }
}
