/* ============================================================
   陈文杰 · 个人博客 — Midnight Terminal
   基于 design-system/DESIGN.md（dope.security 风格参考）
   字体替代：Whyte Inktrap → Inter · Whyte Inktrap Mono → JetBrains Mono
            GrandSlang → Lora Italic
   ============================================================ */

:root {
  /* Colors */
  --color-near-black: #090909;
  --color-almost-white: #f7f9fa;
  --color-soft-white: #f0f0f0;
  --color-steel: #828384;
  --color-graphite: #474747;
  --color-iron: #423738;
  --color-ash: #6b6b6b;
  --color-signal-violet: #af50ff;
  --color-lavender-mist: #e1bdff;

  /* Fonts (substitutes per DESIGN.md) */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: 'Lora', 'Songti SC', 'STSong', Georgia, serif;

  /* Layout */
  --page-max-width: 1200px;
  --section-gap: 120px;
  --card-padding: 40px;

  /* Radius */
  --radius-cards: 19.2px;
  --radius-pills: 1584px;
  --radius-buttons: 8px;
  --radius-smallcontrols: 6px;

  /* Hairline */
  --hairline: rgba(247, 249, 250, 0.15);
  --hairline-strong: rgba(247, 249, 250, 0.2);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--color-near-black);
  color: var(--color-almost-white);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--color-signal-violet); color: var(--color-near-black); }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Frosted Nav Bar ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(51, 50, 72, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-ash);
  box-shadow: rgba(16, 24, 40, 0.05) 0px 1px 2px 0px;
}

.nav-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-brand .dot { color: var(--color-lavender-mist); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-steel);
  padding: 10.4px 0;
}
.nav-links a:hover { color: var(--color-almost-white); text-decoration: underline; text-underline-offset: 4px; }

.btn-filled {
  display: inline-block;
  background: var(--color-near-black);
  border: 1px solid var(--color-almost-white);
  border-radius: var(--radius-buttons);
  padding: 12px 16px;
  color: var(--color-almost-white);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-filled:hover { background: rgba(247, 249, 250, 0.08); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* 暮色天空：以渐变代替摄影图，紫罗兰只作为地平线辉光 */
  background:
    radial-gradient(ellipse 120% 55% at 50% 108%, rgba(175, 80, 255, 0.28) 0%, rgba(175, 80, 255, 0.1) 38%, transparent 68%),
    radial-gradient(ellipse 60% 30% at 78% 96%, rgba(225, 189, 255, 0.12) 0%, transparent 60%),
    linear-gradient(180deg, #090909 0%, #0b0a10 55%, #120a1c 100%);
}

/* 一道划过天际的机灯 */
.hero::after {
  content: '';
  position: absolute;
  top: 22%;
  left: -10%;
  width: 46%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247, 249, 250, 0.5), transparent);
  transform: rotate(-4deg);
}

.hero-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 160px 32px 120px;
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}

.hero-kicker {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-almost-white);
}

.hero-name {
  font-weight: 400;
  font-size: clamp(56px, 9vw, 112px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 8px 0;
}

.hero-role {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 50px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-lavender-mist);
  text-wrap: balance;
}

.hero-sub {
  margin-top: 32px;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--color-steel);
  max-width: 520px;
}

/* ---------- Boarding Pass Card ---------- */
.pass-card {
  border-radius: var(--radius-cards);
  background: rgba(237, 195, 196, 0.05);
  border: 1px solid var(--hairline-strong);
  padding: var(--card-padding);
  display: flex;
  gap: 32px;
}

.pass-main { flex: 1; min-width: 0; }

.pass-label {
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-steel);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pass-route {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--color-almost-white);
  display: flex;
  align-items: center;
  gap: 12px;
}
.pass-route .arrow { color: var(--color-lavender-mist); }
.pass-route small {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--color-ash);
  margin-bottom: 4px;
}

.pass-heading {
  margin-top: 24px;
  font-size: 28px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.pass-meta {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--color-steel);
}

.pass-actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(237, 195, 196, 0.05);
  border: none;
  border-radius: var(--radius-pills);
  padding: 16px 32px;
  color: var(--color-almost-white);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-pill:hover { background: rgba(237, 195, 196, 0.12); }
.btn-pill .glyph { color: var(--color-lavender-mist); font-family: var(--font-mono); }

/* CSS 条形码 */
.pass-barcode {
  width: 44px;
  flex: none;
  border-radius: 4px;
  background: repeating-linear-gradient(
    180deg,
    var(--color-almost-white) 0px, var(--color-almost-white) 2px,
    transparent 2px, transparent 5px,
    var(--color-almost-white) 5px, var(--color-almost-white) 6px,
    transparent 6px, transparent 11px
  );
  opacity: 0.65;
}

/* ---------- Sections ---------- */
.section { padding-top: var(--section-gap); }
.section:last-of-type { padding-bottom: var(--section-gap); }

.stamp {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(28px, 6vw, 74px);
  line-height: 0.9;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-soft-white);
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 16px;
}

.stamp-caption {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-steel);
  margin-bottom: 64px;
}

.nowrap { white-space: nowrap; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 64px;
}

.about-lede {
  font-size: 24px;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.about-lede em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-lavender-mist);
}

.about-body { margin-top: 24px; font-size: 16px; color: var(--color-steel); line-height: 1.7; }

/* 头像锚点 — 几何字符头像，可整体换成真实照片 */
.profile-chip {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.avatar {
  width: 72px; height: 72px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 30px;
  color: var(--color-almost-white);
  background: radial-gradient(circle at 30% 25%, rgba(247, 249, 250, 0.09), transparent 60%);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.profile-meta .name { font-size: 16px; font-weight: 400; }
.profile-meta .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-steel);
  margin-top: 4px;
}

.about-facts { border-top: 1px solid var(--hairline); }
.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}
.fact dt { color: var(--color-ash); text-transform: uppercase; letter-spacing: 0.07em; font-size: 12px; }
.fact dd { font-family: var(--font-mono); text-align: right; }

/* ---------- Skills — Feature Rows ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 32px 0;
  border-top: 1px solid var(--hairline);
}
.feature-row:last-child { border-bottom: 1px solid var(--hairline); }

.feature-key {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-soft-white);
}
.feature-key .num { color: var(--color-graphite); display: block; margin-bottom: 8px; }

.feature-desc { font-size: 18px; font-weight: 300; line-height: 1.6; color: var(--color-steel); }
.feature-desc strong { color: var(--color-almost-white); font-weight: 400; }

/* ---------- Experience — 纵向航线时间线 ---------- */
.xp { border-top: 1px solid var(--hairline); position: relative; }
.xp::before {
  content: '';
  position: absolute;
  left: 3px; top: 0; bottom: 0;
  width: 1px;
  background: var(--hairline);
}
.xp-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 40px 0 40px 40px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
/* 航线节点 */
.xp-row::before {
  content: '';
  position: absolute;
  left: 0; top: 46px;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--color-steel);
  background: var(--color-near-black);
}
.xp-row.current::before {
  background: var(--color-lavender-mist);
  border-color: var(--color-lavender-mist);
}
.xp-date {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--color-steel);
}
.xp-title { font-size: 24px; font-weight: 400; letter-spacing: -0.01em; }
.xp-org { font-size: 14px; color: var(--color-steel); margin-top: 4px; }
.xp-desc { margin-top: 16px; font-size: 16px; font-weight: 300; color: var(--color-steel); line-height: 1.7; max-width: 720px; }

/* ---------- Archive — 行式项目档案（与作品集卡片区分形态） ---------- */
.feature-desc .row-links {
  margin-top: 14px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.row-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--color-soft-white);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pills);
  padding: 3px 12px;
}

/* ---------- Awards strip ---------- */
.awards {
  margin-top: 96px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 64px;
  border-top: 1px solid var(--hairline);
}
.award {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
  font-weight: 300;
}
.award span { color: var(--color-steel); }
.award b { font-family: var(--font-mono); font-weight: 400; font-size: 12px; letter-spacing: 0.1em; color: var(--color-soft-white); white-space: nowrap; }

/* ---------- Blog list ---------- */
.post-list { border-top: 1px solid var(--hairline); }

.post-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 40px;
  align-items: baseline;
  padding: 36px 0;
  border-bottom: 1px solid var(--hairline);
  transition: padding-left 0.25s ease;
}
.post-row:hover { padding-left: 12px; }

.post-date { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; color: var(--color-steel); }
.post-title { font-size: 26px; font-weight: 300; letter-spacing: -0.01em; }
.post-row:hover .post-title { color: var(--color-lavender-mist); }
.post-excerpt { font-size: 14px; color: var(--color-steel); margin-top: 8px; max-width: 640px; font-weight: 300; }
.post-arrow { font-family: var(--font-mono); color: var(--color-steel); font-size: 18px; }

/* ---------- Contact band ---------- */
.contact-band {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--hairline);
  padding: 96px 0;
  text-align: left;
}
.contact-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(32px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-wrap: balance;
}
/* 邮箱独立成行，等宽字体 —— 数字邮箱不硬塞进意式衬线里 */
.contact-email {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.6vw, 30px);
  letter-spacing: 0.04em;
  color: var(--color-lavender-mist);
  border-bottom: 1px solid var(--color-signal-violet); /* 全页唯一的紫色描边 */
  padding-bottom: 8px;
  transition: color 0.25s ease;
}
.contact-email:hover { color: var(--color-almost-white); }

/* ---------- Coordinate Footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 24px 0;
}
.footer-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 300;
  color: var(--color-steel);
}
.footer-left { display: flex; align-items: center; gap: 16px; }
.footer-left .plus { color: var(--color-almost-white); }
.footer-coord { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; display: flex; align-items: center; gap: 10px; }
.footer-coord .heart { color: var(--color-almost-white); }

/* ---------- Article page ---------- */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 200px 32px 120px;
}
.article-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-ash);
  margin-bottom: 24px;
}
.article h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.article-meta { margin-top: 24px; font-family: var(--font-mono); font-size: 13px; color: var(--color-ash); letter-spacing: 0.08em; }
.article-body { margin-top: 64px; border-top: 1px solid var(--hairline); padding-top: 48px; }
.article-body p { margin-bottom: 24px; font-size: 17px; line-height: 1.8; color: #c9cbcd; font-weight: 300; }
.article-body h2 {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-soft-white);
  margin: 48px 0 20px;
}
.article-body code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: rgba(247, 249, 250, 0.08);
  border-radius: 6px;
  padding: 2px 6px;
}
.article-body pre {
  background: rgba(247, 249, 250, 0.04);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-cards);
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 24px;
}
.article-body pre code { background: none; padding: 0; font-size: 13px; line-height: 1.7; color: var(--color-soft-white); }
.article-body blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  color: var(--color-lavender-mist);
  border-left: 1px solid var(--color-signal-violet);
  padding-left: 24px;
  margin: 40px 0;
}
.back-link { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; color: var(--color-steel); }
.back-link:hover { color: var(--color-almost-white); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 140px; }
  .about-grid { grid-template-columns: 1fr; }
  .awards { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .feature-row, .xp-row { grid-template-columns: 1fr; gap: 12px; }
  .xp-row { padding-left: 28px; }
  .post-row { grid-template-columns: 1fr; gap: 8px; }
  .post-arrow { display: none; }
  .pass-card { flex-direction: column; }
  .pass-barcode { width: 100%; height: 44px; background: repeating-linear-gradient(90deg, var(--color-almost-white) 0 2px, transparent 2px 5px, var(--color-almost-white) 5px 6px, transparent 6px 11px); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   V2 — 动态层 · 音乐播放器 · 作品集
   ============================================================ */

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* 盖章标题：显现时字距收拢，像盖印落下 */
.stamp.reveal { letter-spacing: 0.45em; transition: opacity 1.1s ease, transform 1.1s ease, letter-spacing 1.1s cubic-bezier(0.2, 0.6, 0.2, 1); }
.stamp.reveal.in { letter-spacing: 0.2em; }

/* ---------- Hero 入场 ---------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: none; }
}
.hero-kicker, .hero-name, .hero-role, .hero-sub, .pass-card {
  opacity: 0;
  animation: rise-in 1s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}
.hero-name { animation-delay: 0.15s; }
.hero-role { animation-delay: 0.3s; }
.hero-sub  { animation-delay: 0.45s; }
.pass-card { animation-delay: 0.55s; animation-duration: 1.15s; transition: transform 0.35s ease; will-change: transform; }

/* 机灯划过天际（循环飞行） */
@keyframes fly-by {
  0%   { transform: translateX(-40%) rotate(-4deg); opacity: 0; }
  12%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translateX(260%) rotate(-4deg); opacity: 0; }
}
.hero::after { animation: fly-by 14s linear infinite; }

/* 星空（JS 注入） */
.hero .star {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--color-almost-white);
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.7; }
}

/* 光标辉光 — 紫罗兰以 5% 透明度伴随光标 */
#cursor-glow {
  position: fixed;
  left: -600px; top: -600px;
  width: 460px; height: 460px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(175, 80, 255, 0.06) 0%, transparent 65%);
}

/* ---------- 技术栈跑马灯 ---------- */
.ticker {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  padding: 18px 0;
}
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--color-ash);
  animation: marquee 36s linear infinite;
}
.ticker-track span { padding-right: 48px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 音乐播放器：黑胶唱片机（导航栏内） ---------- */
.music-dock {
  position: relative;
  display: flex;
  align-items: center;
}
.music-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  user-select: none;
}
.music-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.music-eq i {
  width: 2px; height: 100%;
  background: var(--color-lavender-mist);
  transform: scaleY(0.2);
  transform-origin: bottom;
}
.music-box.playing .music-eq { opacity: 0.9; }
.music-box.playing .music-eq i { animation: eq-bounce 0.9s ease-in-out infinite alternate; }
.music-eq i:nth-child(2) { animation-delay: 0.18s; }
.music-eq i:nth-child(3) { animation-delay: 0.36s; }
.music-eq i:nth-child(4) { animation-delay: 0.54s; }
@keyframes eq-bounce {
  from { transform: scaleY(0.15); }
  to   { transform: scaleY(1); }
}
/* 唱机底座（导航尺寸） */
.turntable {
  position: relative;
  display: block;
  width: 42px; height: 42px;
  border: 1px solid var(--hairline-strong);
  border-radius: 9px;
  background: rgba(9, 9, 9, 0.5);
  transition: border-color 0.4s ease;
}
.music-box:hover .turntable,
.music-dock.open .turntable { border-color: rgba(225, 189, 255, 0.5); }
.music-box.playing .turntable { border-color: rgba(225, 189, 255, 0.6); }
/* 黑胶盘：沟槽纹理 + 高光 */
.vinyl {
  position: absolute;
  left: 4px; top: 5.5px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background:
    radial-gradient(circle at 32% 28%, rgba(247, 249, 250, 0.16), transparent 44%),
    repeating-radial-gradient(circle at 50%, #14141a 0 1.2px, #0a0a0c 1.2px 2.8px);
}
.music-box.playing .vinyl { animation: disc-spin 3.6s linear infinite; }
/* 中心标贴 + 主轴孔 */
.vinyl-label {
  position: absolute;
  left: 50%; top: 50%;
  width: 11px; height: 11px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #090909 0 16%, var(--color-lavender-mist) 17% 100%);
  opacity: 0.85;
}
/* 唱臂：轴座 + 臂杆，播放时摆入盘面 */
.tonearm {
  position: absolute;
  top: 4px; right: 4.5px;
  width: 7px; height: 28px;
  transform-origin: 3.5px 3.5px;
  transform: rotate(-26deg);
  transition: transform 0.9s cubic-bezier(0.3, 1.2, 0.3, 1);
}
.music-box.playing .tonearm { transform: rotate(10deg); }
.tonearm::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: #101014;
  box-sizing: border-box;
}
.tonearm::after {
  content: '';
  position: absolute;
  top: 6px; left: 3px;
  width: 1px; height: 16px;
  background: rgba(247, 249, 250, 0.55);
}
.tonearm-head {
  position: absolute;
  bottom: 2px; left: 1.5px;
  width: 4px; height: 6px;
  border-radius: 1.5px;
  background: var(--color-lavender-mist);
  opacity: 0.85;
}
@keyframes disc-spin { to { transform: rotate(360deg); } }
/* 曲目列表下拉面板 */
.music-panel {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  width: 248px;
  padding: 8px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: rgba(9, 9, 9, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.music-dock.open .music-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.music-panel-head {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--color-ash);
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 6px;
}
.music-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--color-almost-white);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}
.music-track:hover { background: rgba(247, 249, 250, 0.06); }
.mt-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-ash);
}
.mt-name {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  font-weight: 300;
}
.mt-name small {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--color-ash);
}
/* 行内状态点：当前曲目常亮，播放中呼吸 */
.mt-state {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.3s ease;
}
.music-track.active .mt-state { background: var(--color-lavender-mist); }
.music-track.active.playing .mt-state { animation: cover-pulse 1.6s ease-in-out infinite; }
.music-track.active .mt-name { font-weight: 400; }

/* ---------- 作品集 Portfolio ---------- */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pf-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-cards);
  overflow: hidden;
  background: rgba(247, 249, 250, 0.02);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.pf-card:hover {
  transform: translateY(-6px);
  border-color: rgba(225, 189, 255, 0.35);
  background: rgba(247, 249, 250, 0.045);
}
.pf-card.featured { grid-column: span 2; }
.pf-cover {
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--hairline);
  background: radial-gradient(ellipse 100% 80% at 50% 0%, rgba(247, 249, 250, 0.03), transparent 70%);
}
.pf-card.featured .pf-cover { aspect-ratio: 800 / 340; }
.pf-cover svg { width: 100%; height: 100%; display: block; }
.pf-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.pf-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-steel);
}
.pf-title { font-size: 20px; font-weight: 400; letter-spacing: -0.01em; }
.pf-desc { font-size: 14px; font-weight: 300; color: var(--color-steel); line-height: 1.65; }
.pf-cred {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-ash);
  letter-spacing: 0.05em;
}
.pf-links {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.pf-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-soft-white);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 3px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.pf-links a:hover { color: var(--color-lavender-mist); border-color: var(--color-lavender-mist); }
.pf-star {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--color-soft-white);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pills);
  padding: 4px 12px;
  align-self: flex-start;
}

/* ---------- 个人生活 Life：横向胶片带 + 拍立得 ---------- */
.life-strip-wrap {
  /* 破格全宽：胶片带贯穿整个视口 */
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.life-strip {
  display: flex;
  align-items: center;
  gap: 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 36px max(32px, calc((100vw - var(--page-max-width)) / 2 + 32px)) 30px;
  scrollbar-width: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3.5%, #000 96.5%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 3.5%, #000 96.5%, transparent);
}
.life-strip::-webkit-scrollbar { display: none; }
.life-strip.dragging { cursor: grabbing; scroll-snap-type: none; }
/* 拍立得相框：暖白底 + 加厚下边，随机微倾斜，悬停摆正抬起 */
.life-shot {
  flex: 0 0 auto;
  margin: 0;
  scroll-snap-align: center;
  background: #f4f1ea;
  border-radius: 3px;
  padding: 12px 12px 14px;
  transform: rotate(var(--tilt, -1.6deg));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.life-shot:nth-child(2n)  { --tilt: 1.8deg; }
.life-shot:nth-child(3n)  { --tilt: -2.4deg; }
.life-shot:nth-child(4n)  { --tilt: 1.2deg; }
.life-shot:nth-child(5n)  { --tilt: 2.6deg; }
.life-shot:hover { transform: rotate(0deg) translateY(-12px); }
.life-photo {
  width: 336px; height: 248px;
  overflow: hidden;
  background: #0e0e10;
}
.life-shot.portrait .life-photo { width: 236px; height: 312px; }
.life-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.3) contrast(1.02);
  transition: filter 0.5s ease, transform 0.6s ease;
}
.life-shot:hover .life-photo img { filter: grayscale(0); transform: scale(1.05); }
.life-shot figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 4px 2px;
}
.life-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: #8a8578;
}
.life-title {
  font-size: 15px;
  font-weight: 400;
  color: #211f1a;
}
.life-desc {
  font-size: 12px;
  font-weight: 300;
  color: #6e6a5e;
  line-height: 1.5;
}
/* 导航：mono 计数 + 发丝线圆形箭头 */
.life-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 8px;
  padding: 0 max(32px, calc((100vw - var(--page-max-width)) / 2 + 32px));
}
.life-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--color-ash);
  margin-right: 8px;
}
.life-count #lifeIndex { color: var(--color-almost-white); }
.life-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--color-almost-white);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.life-arrow:hover {
  background: var(--color-almost-white);
  color: var(--color-near-black);
  border-color: var(--color-almost-white);
}

/* ---------- 封面 SVG 动效 ---------- */
@keyframes dash-flow { to { stroke-dashoffset: -120; } }
.cover-flow { stroke-dasharray: 6 6; animation: dash-flow 3.2s linear infinite; }
@keyframes cover-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
.cover-pulse { animation: cover-pulse 2.6s ease-in-out infinite; }
.cover-pulse.d1 { animation-delay: 0.6s; }
.cover-pulse.d2 { animation-delay: 1.2s; }
@keyframes cover-sweep { to { transform: rotate(360deg); } }
.cover-sweep {
  transform-box: fill-box;
  transform-origin: 0% 50%;
  animation: cover-sweep 6s linear infinite;
}
@keyframes cover-wave {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}
.cover-bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: cover-wave 1.6s ease-in-out infinite;
}
@keyframes cover-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.cover-blink { animation: cover-blink 1.1s step-end infinite; }

/* ---------- 动效响应式与降级 ---------- */
@media (max-width: 960px) {
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-card.featured { grid-column: span 1; }
  .pf-card.featured .pf-cover { aspect-ratio: 16 / 9; }
  .life-strip { gap: 24px; padding-top: 24px; }
  .life-photo { width: 264px; height: 196px; }
  .life-shot.portrait .life-photo { width: 196px; height: 258px; }
  .life-nav { justify-content: center; }
  .music-panel { right: -64px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-kicker, .hero-name, .hero-role, .hero-sub, .pass-card { animation: none; opacity: 1; }
  .hero::after, .hero .star, .ticker-track,
  .cover-flow, .cover-pulse, .cover-sweep, .cover-bar, .cover-blink,
  .music-box.playing .vinyl, .music-box.playing .music-eq i { animation: none; }
  .tonearm, .life-shot, .life-photo img { transition: none; }
  .life-strip { scroll-behavior: auto; }
}

/* ---------- 技术栈总览讲解 ---------- */
.skills-intro {
  max-width: 760px;
  margin: 6px 0 42px;
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-steel);
}
.skills-intro strong { color: var(--color-almost-white); font-weight: 400; }

/* ---------- 联系区：简历下载 ---------- */
.contact-resume {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.contact-resume a {
  color: var(--color-steel);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 4px;
  transition: color 0.25s ease;
}
.contact-resume a:hover { color: var(--color-almost-white); }

/* ---------- 文章：图形化流水线 ---------- */
.flow { margin: 30px 0 26px; }
.flow-track { display: flex; align-items: stretch; }
.flow-node {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-cards);
  background: rgba(247, 249, 250, 0.03);
}
.flow-idx { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--color-ash); }
.flow-name { font-size: 15px; color: var(--color-soft-white); }
.flow-out {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #97979f;
}
.flow-link {
  flex: 0 0 26px;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ash);
  font-family: var(--font-mono);
  font-size: 16px;
}
.flow-link::before { content: '\2192'; } /* → */
.flow-node.is-final { border-color: rgba(175, 80, 255, 0.38); background: rgba(175, 80, 255, 0.05); }
.flow-node.is-final .flow-out { color: var(--color-lavender-mist); border-top-color: rgba(175, 80, 255, 0.28); }
.flow figcaption {
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--color-ash);
}
@media (max-width: 620px) {
  .flow-track { flex-direction: column; }
  .flow-link { flex-basis: 22px; }
  .flow-link::before { content: '\2193'; } /* ↓ */
}

/* ---------- 文章：阅读进度条 ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; }
.read-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--color-signal-violet);
  box-shadow: 0 0 8px rgba(175, 80, 255, 0.6);
  transition: width 0.1s linear;
}

/* ---------- 文章：文末作者卡片 ---------- */
.article-author {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--hairline);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.aa-avatar {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  color: var(--color-soft-white);
  font-size: 22px;
}
.aa-name { font-size: 17px; color: var(--color-soft-white); margin-bottom: 8px; }
.aa-desc { font-size: 14px; line-height: 1.7; color: var(--color-ash); font-weight: 300; margin-bottom: 16px; }
.aa-links { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 13px; }
.aa-links a {
  color: #9a9aa5;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 3px;
  transition: color 0.25s ease;
}
.aa-links a:hover { color: var(--color-almost-white); }
