* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", sans-serif;
}
body {
  min-height: 100vh;
  background: #050518;
  color: #e6edff;
  overflow-x: hidden;
  position: relative;
}
/* 闪烁星空背景 */
/* 纯CSS随机像素星空背景 */
/* 高密度纯CSS像素星空 */
.star-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-color: #040416;
  /* 一共30个径向渐变=30颗星星，复制增加、删除减少 */
  background-image:
    radial-gradient(1px 1px at 10% 15%, #ffffff, transparent),
    radial-gradient(1px 1px at 22% 43%, #cce0ff, transparent),
    radial-gradient(2px 2px at 35% 78%, #e6f0ff, transparent),
    radial-gradient(1px 1px at 44% 21%, #ffffff, transparent),
    radial-gradient(1px 1px at 58% 66%, #b8d4ff, transparent),
    radial-gradient(2px 2px at 67% 12%, #d0e6ff, transparent),
    radial-gradient(1px 1px at 76% 50%, #ffffff, transparent),
    radial-gradient(1px 1px at 88% 33%, #a6ccff, transparent),
    radial-gradient(2px 2px at 92% 82%, #e6f0ff, transparent),
    radial-gradient(1px 1px at 8% 90%, #cce0ff, transparent),
    radial-gradient(1px 1px at 15% 60%, #fff, transparent),
    radial-gradient(2px 2px at 30% 10%, #d0e6ff, transparent),
    radial-gradient(1px 1px at 50% 35%, #cce0ff, transparent),
    radial-gradient(1px 1px at 62% 88%, #fff, transparent),
    radial-gradient(2px 2px at 78% 20%, #b8d4ff, transparent),
    radial-gradient(1px 1px at 95% 45%, #e6f0ff, transparent),
    radial-gradient(1px 1px at 5% 30%, #fff, transparent),
    radial-gradient(2px 2px at 28% 92%, #a6ccff, transparent),
    radial-gradient(1px 1px at 42% 5%, #cce0ff, transparent),
    radial-gradient(1px 1px at 66% 40%, #fff, transparent),
    radial-gradient(2px 2px at 82% 70%, #d0e6ff, transparent),
    radial-gradient(1px 1px at 12% 75%, #b8d4ff, transparent),
    radial-gradient(1px 1px at 38% 28%, #e6f0ff, transparent),
    radial-gradient(2px 2px at 55% 55%, #fff, transparent),
    radial-gradient(1px 1px at 70% 95%, #cce0ff, transparent),
    radial-gradient(1px 1px at 85% 10%, #a6ccff, transparent),
    radial-gradient(2px 2px at 20% 50%, #d0e6ff, transparent),
    radial-gradient(1px 1px at 48% 78%, #b8d4ff, transparent),
    radial-gradient(1px 1px at 69% 18%, #e6f0ff, transparent),
    radial-gradient(2px 2px at 90% 60%, #ffffff, transparent);
  /* 缩小平铺尺寸，让星星重复铺满屏幕，密度翻倍 */
  background-size: 700px 700px;
  animation: starTwinkle 7s ease-in-out infinite alternate;
}

/* 星星闪烁动画 */
@keyframes starTwinkle {
  0% {
    opacity: 0.6;
    background-size: 650px 650px;
  }
  100% {
    opacity: 1;
    background-size: 750px 750px;
  }
}

/* 顶部导航栏 */
header.nav-bar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(8, 10, 35, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #2c3b70;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-box img {
  height: 42px;
  width: auto;
  opacity: 0.8;
}
.logo-text {
  font-size: 18px;
  color: #c3e0ff;
  letter-spacing: 2px;
}
.logo-motto {
  font-size: 10px;
  color: #88a8d8;
  letter-spacing: 1px;
}
/* 导航菜单 */
.nav-menu {
  display: flex;
  gap: 8px;
}
.nav-menu a {
  color: #b0c8f0;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.3s;
  font-size: 15px;
}
.nav-en {
  margin-right: 6px;
}
.nav-zh {
  font-weight: 500;
}
.nav-menu a:hover {
  background: rgba(90, 150, 255, 0.15);
  color: #74aaff;
}
.nav-menu a.active {
  background: #20346b;
  color: #a6ccff;
}

/* 页面容器通用 */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}
.page-title {
  font-size: 32px;
  margin-bottom: 40px;
  color: #d0e6ff;
  border-left: 4px solid #74aaff;
  padding-left: 16px;
}
/* 文章卡片 - 手风琴效果 */
.blog-card {
  background: rgba(20, 25, 60, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid #2c3b70;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.blog-card:hover {
  border-color: #74aaff;
  box-shadow: 0 8px 30px rgba(90, 150, 255, 0.15);
}
.blog-card.expanded {
  transform: translateY(-4px);
  border-color: #74aaff;
}
.card-title {
  font-size: 22px;
  color: #d0e6ff;
  margin-bottom: 10px;
}
.card-date {
  color: #798cb8;
  font-size: 14px;
  margin-bottom: 16px;
}
.card-summary {
  font-size: 15px;
  color: #88a8d8;
  line-height: 1.6;
  transition: opacity 0.3s, max-height 0.3s;
}
.card-summary.hidden {
  display: none;
}
.card-full-content {
  line-height: 1.8;
  color: #c5d6f5;
  font-size: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #2c3b70;
  display: none;
}
.card-full-content.show {
  display: block;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.card-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: #74aaff;
  font-size: 14px;
  transition: all 0.3s;
}
.card-expand-btn:hover {
  color: #99c2ff;
}
.card-expand-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}
.blog-card.expanded .card-expand-btn svg {
  transform: rotate(180deg);
}
.logo-text-container {
  display: flex;
  flex-direction: column;
}
.card-category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(90, 150, 255, 0.15);
  border-radius: 20px;
  font-size: 13px;
  color: #74aaff;
  margin-top: 12px;
}

/* 个人简介样式 */
.profile-section {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 20px;
}
.profile-avatar {
  margin-bottom: 24px;
}
.avatar-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(90, 150, 255, 0.2), rgba(138, 180, 248, 0.1));
  border: 2px solid rgba(90, 150, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.avatar-icon {
  font-size: 48px;
}
.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.profile-name {
  font-size: 32px;
  color: #c3e0ff;
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.profile-title {
  font-size: 16px;
  color: #88a8d8;
  margin-bottom: 20px;
}
.profile-intro {
  font-size: 15px;
  color: #99b3e0;
  line-height: 1.8;
  margin-bottom: 30px;
}

.translation-text {
  font-family: "SimSun", "Songti SC", serif;
  font-size: 12px;
  color: #545353;
  line-height: 1.6;
  margin-top: 10px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
}
.stat-item {
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 28px;
  font-weight: bold;
  color: #74aaff;
}
.stat-label {
  font-size: 13px;
  color: #6074a3;
  margin-top: 4px;
}
.profile-bio {
  text-align: left;
  background: rgba(90, 150, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 30px;
}
.profile-bio h3 {
  font-size: 16px;
  color: #a6ccff;
  margin-bottom: 12px;
}
.profile-bio .translation-text {
  font-family: "SimSun", "Songti SC", serif;
  font-size: 12px;
  color: #838daa;
  line-height: 1.6;
  margin-top: 10px;
}
.profile-bio p {
  font-size: 14px;
  color: #99b3e0;
  line-height: 1.8;
  margin-bottom: 10px;
}
.profile-bio p:last-child {
  margin-bottom: 0;
}
.profile-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.social-link {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(90, 150, 255, 0.15);
  border-radius: 20px;
  color: #74aaff;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
}
.social-link:hover {
  background: rgba(90, 150, 255, 0.3);
  color: #99c2ff;
}
footer {
  text-align: center;
  margin-top: 80px;
  padding-top: 30px;
  border-top: 1px solid #334170;
  color: #6074a3;
  font-size: 14px;
}

/* 移动端响应式设计 */
/* 汉堡菜单按钮 */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}
.mobile-menu-btn span {
  width: 26px;
  height: 2px;
  background: #b0c8f0;
  border-radius: 2px;
  transition: all 0.3s;
}
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}

/* 移动端导航菜单 */
.mobile-nav-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(8, 10, 35, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #2c3b70;
  padding: 20px;
  flex-direction: column;
  gap: 8px;
  animation: slideDown 0.3s ease;
}
.mobile-nav-menu a {
  color: #b0c8f0;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 8px;
  transition: all 0.3s;
  font-size: 16px;
}
.mobile-nav-menu a:hover {
  background: rgba(90, 150, 255, 0.15);
  color: #74aaff;
}
.mobile-nav-menu a.active {
  background: #20346b;
  color: #a6ccff;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 媒体查询 - 手机端适配 */
/* 中等屏幕：隐藏英文，只显示中文 */
@media screen and (max-width: 1200px) {
  .nav-en {
    display: none;
  }
  .nav-menu a {
    padding: 10px 12px;
    font-size: 14px;
  }
}

@media screen and (max-width: 768px) {
  /* 隐藏桌面端导航 */
  .nav-menu {
    display: none;
  }
  /* 显示汉堡按钮 */
  .mobile-menu-btn {
    display: flex;
  }
  /* 显示移动端菜单（点击后） */
  .mobile-nav-menu.show {
    display: flex;
  }
  /* 调整导航栏内边距 */
  header.nav-bar {
    padding: 0 20px;
  }
  /* 调整页面标题大小 */
  .page-title {
    font-size: 26px;
    margin-bottom: 30px;
  }
  /* 调整文章卡片内边距 */
  .blog-card {
    padding: 20px;
  }
  /* 调整卡片标题大小 */
  .card-title {
    font-size: 20px;
  }
  /* 调整容器内边距 */
  .container {
    padding: 30px 15px;
  }
  /* 调整logo文字大小 */
  .logo-text {
    font-size: 18px;
  }
}

/* 博客详情模态框 */
.blog-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.blog-modal.show {
  display: flex;
}
.modal-content {
  background: rgba(15, 20, 50, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid #2c3b70;
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.modal-header {
  padding: 24px;
  border-bottom: 1px solid #2c3b70;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-title {
  font-size: 24px;
  color: #d0e6ff;
}
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(90, 150, 255, 0.15);
  color: #b0c8f0;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
}
.modal-close:hover {
  background: rgba(90, 150, 255, 0.3);
  color: #fff;
}
.modal-body {
  padding: 24px;
}
.modal-date {
  color: #798cb8;
  font-size: 14px;
  margin-bottom: 20px;
}
.modal-text {
  line-height: 1.8;
  color: #c5d6f5;
  font-size: 16px;
}
.modal-category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(90, 150, 255, 0.15);
  border-radius: 20px;
  font-size: 13px;
  color: #74aaff;
  margin-top: 20px;
}