/* ═══════════════════════════════════════════════════════
   个人主页 · 建筑工程从业者
   低饱和「图纸感」视觉：米白 / 墨色 / 砖红点缀
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #F6F3ED;          /* 米白底 */
  --bg-soft: #EFEAE0;     /* 深一度的米色 */
  --ink: #2C2823;         /* 墨色主文字 */
  --ink-soft: #6C655A;    /* 次级文字 */
  --ink-faint: #8A8272;   /* 弱化装饰文字（仅用于大号/装饰） */
  --line: #DDD5C6;        /* 分隔线 */
  --accent: #A4522E;      /* 砖红 · 赭石 */
  --accent-soft: rgba(164, 82, 46, 0.45);

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, ui-monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── 基础 ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

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

::selection { background: rgba(164, 82, 46, 0.88); color: #FFF6EE; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 14px;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ── 顶部导航 ─────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 48px);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(246, 243, 237, 0.88);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
  box-shadow: 0 1px 0 var(--line);
  padding-block: 13px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.28em;
}
.brand-mark { width: 19px; height: 19px; color: var(--ink); flex: none; }

.site-nav { display: flex; gap: clamp(18px, 3vw, 32px); }
.site-nav a {
  position: relative;
  font-size: 13.5px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  padding: 4px 1px;
  transition: color 0.3s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active { color: var(--accent); }
.site-nav a.is-active::after,
.site-nav a:hover::after { transform: scaleX(1); }

/* ── 首屏 Hero ────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 96px 20px 120px;
  overflow: hidden;
}

/* 图纸网格背景 */
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(44, 40, 35, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 40, 35, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(44, 40, 35, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 40, 35, 0.07) 1px, transparent 1px);
  background-size: 36px 36px, 36px 36px, 180px 180px, 180px 180px;
  -webkit-mask-image: radial-gradient(ellipse 95% 85% at 50% 10%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 95% 85% at 50% 10%, #000 25%, transparent 78%);
}
.hero-ridge {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: clamp(110px, 18vw, 200px);
}

/* 图框四角 */
.hero-frame {
  position: absolute;
  inset: clamp(16px, 3vw, 36px);
  pointer-events: none;
}
.hero-frame .c {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 0 solid rgba(44, 40, 35, 0.30);
}
.c-tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.c-tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.c-bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.c-br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.hero-frame-label {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-family: var(--mono), var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  opacity: 0.75;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--mono), var(--sans);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
}

.hero h1 {
  margin-top: 22px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.5rem, 7.5vw, 4.4rem);
  letter-spacing: 0.06em;
  line-height: 1.25;
}

.hero-rule {
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin: 30px auto 26px;
}

.hero-lede {
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  line-height: 2.1;
  color: var(--ink-soft);
}

.hero-chips {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* 通用标签样式 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}
.chip-sm { padding: 4px 13px; font-size: 12.5px; color: var(--ink-soft); }

.chip-meta .chip-label {
  font-family: var(--mono), var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}
.chip-meta .chip-value { font-weight: 500; letter-spacing: 0.04em; }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(164, 82, 46, 0.45); }
  70%  { box-shadow: 0 0 0 9px rgba(164, 82, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(164, 82, 46, 0); }
}

/* 向下滚动提示 */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 1;
}
.scroll-cue-text {
  font-family: var(--mono), var(--sans);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-indent: 0.4em; /* 平衡字距造成的偏移 */
  color: var(--ink-soft);
  transition: color 0.3s var(--ease);
}
.scroll-cue:hover .scroll-cue-text { color: var(--accent); }
.scroll-line {
  position: relative;
  width: 1px;
  height: 44px;
  background: var(--line);
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 1px;
  height: 40%;
  background: var(--accent);
  animation: scroll-dash 2.2s var(--ease) infinite;
}
@keyframes scroll-dash {
  0%   { top: -40%; }
  70%  { top: 105%; }
  100% { top: 105%; }
}

/* ── 通用区块 ─────────────────────────── */
.section {
  max-width: 920px;
  margin-inline: auto;
  padding: clamp(88px, 13vw, 150px) clamp(22px, 6vw, 48px);
}

.section-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono), var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}
.fig {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--accent-soft);
  border-radius: 3px;
  color: var(--accent);
  letter-spacing: 0.14em;
}

.section-head h2 {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  letter-spacing: 0.05em;
  line-height: 1.35;
}
.section-head { margin-bottom: clamp(48px, 8vw, 76px); }

.section-note {
  margin-top: 14px;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ── 个人概览 ─────────────────────────── */
.overview-grid {
  display: grid;
  gap: 44px;
}
.line-card { border-top: 1px solid var(--line); padding-top: 26px; }
.line-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.3rem);
  letter-spacing: 0.03em;
}
.line-card p {
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 2.05;
  color: var(--ink-soft);
  max-width: 42em;
}

.line-tag {
  flex: none;
  font-family: var(--mono), var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  padding: 3px 11px;
  transform: translateY(-1px);
}
.line-tag-alt { color: var(--ink-soft); border-color: rgba(44, 40, 35, 0.28); }

.weave {
  margin-top: clamp(44px, 7vw, 64px);
  padding-left: clamp(20px, 4vw, 30px);
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 2.1;
  letter-spacing: 0.02em;
  max-width: 40em;
}

.tags-area {
  margin-top: clamp(44px, 7vw, 60px);
  display: grid;
  gap: 32px;
}
.tag-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono), var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.dot-accent { background: var(--accent); }
.dot-ink { background: var(--ink); opacity: 0.55; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── 经历时间线 ───────────────────────── */
.timeline {
  --rail-x: 8px; /* 移动端：轨道贴近左缘 */
  position: relative;
  margin-top: 8px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--rail-x) - 1px);
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
}
.tl-progress {
  position: absolute;
  left: calc(var(--rail-x) - 1px);
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, rgba(164, 82, 46, 0.12), var(--accent));
  border-radius: 2px;
}

.tl-item {
  position: relative;
  padding: 0 0 62px 40px;
}
.tl-item:last-child { padding-bottom: 6px; }

.tl-node {
  position: absolute;
  left: calc(var(--rail-x) - 6px);
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid #C6BCAA;
  transition: border-color 0.45s var(--ease), background-color 0.45s var(--ease);
}
.tl-node.is-passed {
  border-color: var(--accent);
  background: var(--accent);
}
.tl-node.is-now {
  border-color: var(--accent);
  background: var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}

.tl-year {
  font-family: var(--mono), var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  margin-bottom: 10px;
}

.tl-role {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  letter-spacing: 0.03em;
}
.tl-desc {
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 2.05;
  color: var(--ink-soft);
  max-width: 36em;
}
.tl-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 760px) {
  .timeline { --rail-x: 202px; }
  .tl-item {
    display: grid;
    grid-template-columns: 170px 1fr;
    column-gap: 64px;
    padding-left: 0;
    padding-bottom: 76px;
  }
  .tl-node { top: 6px; }
  .tl-year {
    justify-self: end;
    text-align: right;
    font-size: 1.25rem;
    margin-bottom: 0;
    padding-top: 1px;
  }
}

/* ── 收尾 · 状态与联系 ────────────────── */
.section-end { text-align: center; padding-bottom: clamp(72px, 10vw, 120px); }
.section-end .section-meta { justify-content: center; }
.section-end .section-head { margin-bottom: clamp(36px, 6vw, 56px); }

.end-title {
  font-size: clamp(2rem, 5.5vw, 3rem) !important;
  font-weight: 900 !important;
}
.cursor {
  display: inline-block;
  margin-left: 8px;
  color: var(--accent);
  animation: blink 1.15s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.progress-wrap { max-width: 420px; margin-inline: auto; }
.progress-label {
  font-family: var(--mono), var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.progress-stripe {
  display: block;
  height: 100%;
  width: 42%;
  border-radius: inherit;
  background: repeating-linear-gradient(
    135deg,
    rgba(164, 82, 46, 0.55) 0 9px,
    rgba(164, 82, 46, 0.16) 9px 18px
  );
  animation: stripe-slide 3.4s linear infinite;
}
@keyframes stripe-slide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(265%); }
}

.closing {
  margin-top: clamp(40px, 6vw, 56px);
  font-size: 15.5px;
  line-height: 2.1;
  color: var(--ink-soft);
}

.contact { margin-top: clamp(48px, 7vw, 72px); }
.contact-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}
.contact-note {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.contact-links {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}
.contact-links:empty { display: none; }

/* 图标入口按钮（点击弹出查看/复制，页面不明文展示账号） */
.contact-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 96px;
  padding: 17px 20px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  font-family: var(--mono), var(--sans);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-indent: 0.24em; /* 平衡字距 */
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.contact-icon svg {
  width: 34px;
  height: 34px;
  transition: transform 0.3s var(--ease);
}
.contact-icon:hover,
.contact-icon[aria-expanded="true"] {
  border-color: var(--accent-soft);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(44, 40, 35, 0.09);
}
.contact-icon:hover svg { transform: scale(1.08); }

/* 联系方式弹层 */
.contact-pop {
  position: fixed;
  z-index: 60;
  width: min(320px, calc(100vw - 32px));
  padding: 18px 20px 16px;
  background: #FFFDF9;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(44, 40, 35, 0.16);
  text-align: left;
}
.contact-pop[hidden] { display: none; }

.pop-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono), var(--sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}
.pop-icon-slot { display: inline-flex; }
.pop-icon-slot svg { width: 25px; height: 25px; }

.pop-account {
  margin-top: 10px;
  font-family: var(--mono), var(--sans);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.pop-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.pop-copy {
  padding: 7px 24px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #FFF6EE;
  font-family: var(--sans);
  font-size: 13.5px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.2s var(--ease);
}
.pop-copy:hover { background: #8A4224; }
.pop-copy:active { transform: scale(0.96); }
.pop-copy.is-copied { background: #4A7A57; }
.pop-extra {
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 1px;
}
.pop-tip {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.pop-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-faint);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.3s var(--ease);
}
.pop-close:hover { color: var(--ink); }

/* ── 页脚 ─────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 920px;
  margin-inline: auto;
  padding: 26px clamp(22px, 6vw, 48px) 34px;
  font-family: var(--mono), var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.to-top { transition: color 0.3s var(--ease); }
.to-top:hover { color: var(--accent); }

/* ── 滚动进场动画 ─────────────────────── */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── 响应式 ───────────────────────────── */
@media (min-width: 640px) {
  .br-desktop { display: inline; }
}
@media (max-width: 639px) {
  .br-desktop { display: none; }
  .hero-frame-label { display: none; }
  .hero { padding-bottom: 140px; }
}
@media (max-width: 759px) {
  .overview-grid { gap: 36px; }
  .weave { margin-inline: 2px; }
}
@media (max-width: 520px) {
  .site-header { padding-inline: 18px; }
  .brand { letter-spacing: 0.18em; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 12.5px; letter-spacing: 0.12em; }
  .tl-item { padding-bottom: 52px; }
}

/* ── 降低动态效果（无障碍） ───────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .progress-stripe {
    width: 100%;
    animation: none;
    background: repeating-linear-gradient(
      135deg,
      rgba(164, 82, 46, 0.45) 0 9px,
      rgba(164, 82, 46, 0.14) 9px 18px
    );
  }
  .scroll-line::after { animation: none; top: 30%; }
}

/* ── 打印 ─────────────────────────────── */
@media print {
  .site-header, .scroll-cue, .hero-bg, .hero-frame, .tl-progress { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  body { background: #fff; }
}
