/* ============================================================
   JINER Blog — Homepage
   玻璃拟态 Hero · 终端 · 统计条 · 最近文章
   ============================================================ */

/* ---------- Hero 容器 ---------- */
.glass-bg {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(-45deg, #6366f1, #8b5cf6, #7c3aed, #4f46e5);
  background-size: 400% 400%;
  animation: gradient-flow 15s ease infinite;
}
@keyframes gradient-flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 模糊光球（原站已降到 blur 40px 以省 GPU） */
.glass-bg::before,
.glass-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.3;
  pointer-events: none;
}
.glass-bg::before {
  width: 320px; height: 320px;
  background: rgba(255,255,255,0.25);
  top: -80px; right: -80px;
  animation: orb-float 8s ease-in-out infinite;
}
.glass-bg::after {
  width: 280px; height: 280px;
  background: rgba(255,255,255,0.15);
  bottom: -60px; left: -60px;
  animation: orb-float 10s ease-in-out infinite reverse;
}
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -30px) scale(1.1); }
  66%      { transform: translate(-20px, 20px) scale(0.9); }
}

/* ---------- 桌面：介绍卡（左）+ 终端（右） ---------- */
@media (min-width: 900px) {
  section.glass-bg {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
  }
  .glass-bg .glass-card {
    flex: 0 1 460px;
    width: 100%;
    max-width: 460px;
    margin: 0;
  }
  .glass-bg .hero-terminal {
    display: flex;
    flex: 0 1 460px;
    width: 100%;
    max-width: 460px;
    margin: 0;
  }
}
@media (max-width: 899px) {
  section.glass-bg { flex-direction: column; }
}

/* ---------- 背景装饰字符与几何圆环 ---------- */
.glass-art-char {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  font-weight: 900;
  opacity: 0.04;
  color: #fff;
  animation: art-drift 20s ease-in-out infinite;
}
.glass-art-char.c1 { font-size: 18rem; top: 5%; left: 5%; animation-delay: 0s; }
.glass-art-char.c2 { font-size: 14rem; bottom: 8%; right: 8%; animation-delay: -7s; opacity: 0.03; }
.glass-art-char.c3 { font-size: 10rem; top: 40%; right: 15%; animation-delay: -14s; opacity: 0.025; }
@keyframes art-drift {
  0%, 100% { transform: translate(0, 0) rotate(-2deg); }
  25%      { transform: translate(15px, -10px) rotate(0deg); }
  50%      { transform: translate(-10px, 8px) rotate(2deg); }
  75%      { transform: translate(5px, 12px) rotate(-1deg); }
}

.glass-geo {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  animation: geo-pulse 12s ease-in-out infinite;
}
.glass-geo.g1 { width: 400px; height: 400px; top: 15%; left: -150px; animation-delay: 0s; }
.glass-geo.g2 { width: 250px; height: 250px; bottom: 10%; right: -80px; animation-delay: -6s; border-width: 2px; }
.glass-geo.g3 { width: 150px; height: 150px; top: 30%; right: 30%; animation-delay: -3s; }
@keyframes geo-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.06; }
  50%      { transform: scale(1.1) rotate(15deg); opacity: 0.12; }
}

[data-theme="dark"] .glass-art-char { color: #a78bfa; }
[data-theme="dark"] .glass-geo { border-color: rgba(167,139,250,0.08); }

/* ---------- 玻璃卡 ---------- */
.glass-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 60px 20px;
  padding: 48px 40px 40px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-align: center;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes card-enter {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 头像 */
.glass-avatar {
  width: 104px; height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.1),
    0 0 30px rgba(255, 255, 255, 0.25);
  margin-bottom: 20px;
}

/* 标题 */
.glass-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.glass-name-sep { font-weight: 300; }
.glass-name-sub {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

/* 分隔线 */
.glass-divider {
  display: block;
  width: 60px; height: 3px;
  margin: 0 auto 20px;
  border-radius: 2px;
  background: linear-gradient(90deg, #a78bfa, #67e8f9, #a78bfa);
  background-size: 200% 100%;
  animation: divider-shift 3s ease infinite;
}
@keyframes divider-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* 简介 */
.glass-bio {
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 24px;
  max-width: 420px;
  margin-left: auto; margin-right: auto;
}

/* 按钮行 */
.glass-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.glass-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.92);
  color: #5b21b6;
  border: 1px solid rgba(255,255,255,0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.glass-btn-primary {
  background: #fff;
  color: #5b21b6;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.glass-btn-primary:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* 电话：手机显示链接，桌面显示纯文本 */
.glass-btn-phone { display: none; }
.glass-btn-phone-text { cursor: default; }
@media (max-width: 767px) {
  .glass-btn-phone { display: inline-flex; }
  .glass-btn-phone-text { display: none; }
}

/* 技能标签 */
.glass-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.glass-tag {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s ease;
  cursor: default;
}
.glass-tag:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-1px);
}

/* 滚动提示 */
.glass-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.6);
  animation: scroll-hint 2s ease-in-out infinite;
}
@keyframes scroll-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50%      { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* 暗色基础调整 */
[data-theme="dark"] .glass-bg {
  background: linear-gradient(-45deg, #1a1040, #0f0a2e, #1a1145, #0d0830);
  background-size: 400% 400%;
}
[data-theme="dark"] .glass-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .glass-name { color: #e2e8f0; }
[data-theme="dark"] .glass-name-sub { color: rgba(255,255,255,0.55); }
[data-theme="dark"] .glass-bio { color: rgba(255,255,255,0.7); }
[data-theme="dark"] .glass-btn {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.12);
}
[data-theme="dark"] .glass-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
[data-theme="dark"] .glass-btn-primary {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
[data-theme="dark"] .glass-btn-primary:hover {
  background: rgba(255,255,255,0.25);
}

/* ---------- Hero 粒子（静态，见 site-fix.css） ---------- */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  display: none;
}
@media (min-width: 768px) { .hero-particles { display: block; } }
.hero-particle {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  opacity: 0;
  animation-name: particle-rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes particle-rise {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-110vh); opacity: 0; }
}

/* ---------- 终端卡片（桌面） ---------- */
.hero-terminal {
  position: relative;
  z-index: 1;
  display: none;
  flex-direction: column;
  width: min(520px, 90vw);
  margin: 40px auto 0;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(30, 23, 60, 0.82), rgba(15, 11, 32, 0.92));
  border: 1px solid rgba(167, 139, 250, 0.28);
  box-shadow:
    0 24px 64px rgba(16, 10, 44, 0.5),
    0 0 0 1px rgba(167, 139, 250, 0.06),
    0 0 32px rgba(124, 58, 237, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  overflow: hidden;
  text-align: left;
  animation: terminal-enter .8s cubic-bezier(.16,1,.3,1) .2s both;
}
.hero-terminal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.6), rgba(103, 232, 249, 0.5), transparent);
  opacity: 0.8;
}
.hero-terminal::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 50% 0%, rgba(167, 139, 250, 0.08), transparent 60%);
  pointer-events: none;
}
@keyframes terminal-enter {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-terminal-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(167, 139, 250, 0.14);
}
.hero-terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  transition: transform .2s ease;
}
.hero-terminal-bar:hover .hero-terminal-dot { transform: scale(1.12); }
.hero-terminal-dot.r { background: radial-gradient(circle at 30% 30%, #ff7b72, #ff5f57 70%); box-shadow: 0 0 6px rgba(255, 95, 87, 0.5); }
.hero-terminal-dot.y { background: radial-gradient(circle at 30% 30%, #ffd766, #febc2e 70%); box-shadow: 0 0 6px rgba(254, 188, 46, 0.5); }
.hero-terminal-dot.g { background: radial-gradient(circle at 30% 30%, #56d364, #28c840 70%); box-shadow: 0 0 6px rgba(40, 200, 64, 0.5); }
.hero-terminal-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  white-space: nowrap;
}
.hero-terminal-body {
  position: relative;
  z-index: 1;
  padding: 20px 22px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.88);
}
.hero-terminal-body .prompt {
  color: #a78bfa;
  font-weight: 500;
}
.hero-terminal-body .prompt + .cmd { margin-left: 6px; }
.hero-terminal-body .cmd { color: #67e8f9; }
.hero-terminal-body .val { color: #e2e8f0; }
.hero-terminal-body .comment { color: rgba(255, 255, 255, 0.38); }
.hero-terminal-body .key {
  display: inline-block;
  margin: 3px 5px 3px 0;
  padding: 3px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  color: #c4b5fd;
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.16), rgba(103, 232, 249, 0.09));
  border: 1px solid rgba(167, 139, 250, 0.3);
  box-shadow: 0 2px 8px rgba(167, 139, 250, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}
.hero-terminal-body .key:hover {
  transform: translateY(-1px);
  color: #ede9fe;
  border-color: rgba(167, 139, 250, 0.5);
}
.hero-terminal-body .cursor {
  display: inline-block;
  width: 9px;
  height: 15px;
  margin-left: 3px;
  vertical-align: -2px;
  border-radius: 1px;
  background: #67e8f9;
  box-shadow: 0 0 10px rgba(103, 232, 249, 0.7);
  animation: cursor-blink 1.1s steps(1) infinite;
}
@keyframes cursor-blink { 50% { opacity: 0; } }

/* ---------- 统计条 ---------- */
.section-bridge {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-soft), transparent);
  max-width: 720px;
  margin: 0 auto;
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 32px auto 0;
  padding: 0 20px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color .3s ease;
}
.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  color: var(--color-accent);
  background: var(--color-accent-soft);
}
.stat-num {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-mono);
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* ---------- 首页"最近文章"区 ---------- */
#writing { border-top: 1px solid var(--color-border-light); }
#writing h2 { color: var(--color-primary); }

/* 空态文字链接 */
.empty-writing a { text-decoration: none; }
.empty-writing a:hover { text-decoration: underline; }

/* ---------- 移动端 ---------- */
@media (max-width: 899px) {
  .glass-scroll { display: none; }
}

@media (max-width: 640px) {
  .glass-card { padding: 32px 24px 28px; margin: 40px 16px; }
  .glass-name { font-size: 1.5rem; }
  .hero-terminal { margin-top: 24px; }
  .hero-terminal-body { font-size: var(--text-xs); padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .glass-bg,
  .glass-bg::before,
  .glass-bg::after,
  .glass-divider,
  .glass-card,
  .hero-terminal { animation: none; }
}
