/* ============================================
   个人网站 - 前端美化自定义样式
   蓝粉白简洁风格
   ============================================ */

/* === 全局基础 === */

/* 选中文字颜色 */
::selection {
  background-color: rgba(236, 72, 153, 0.2); /* pink-500 低透明度 */
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9; /* slate-100 */
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #93c5fd, #f9a8d4); /* blue-300 → pink-300 */
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #60a5fa, #f472b6); /* blue-400 → pink-400 */
}

/* === 链接 === */
.md-typeset a {
  transition: color 0.2s ease;
}
.md-typeset a:hover {
  color: #ec4899 !important; /* pink-500 */
}

/* === 首页入口卡片（非 Hero 样式） === */
.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  max-width: 600px;
  margin: 1rem 0 2rem;
}
.home-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.2rem 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fef6f8;
  text-decoration: none !important;
  transition: all 0.25s ease;
}
.home-card:hover {
  box-shadow: 0 4px 20px rgba(79, 172, 254, 0.10), 0 2px 6px rgba(240, 147, 251, 0.06);
  transform: translateY(-4px);
}
.home-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--md-typeset-color);
}
.home-card-desc {
  font-size: 0.85rem;
  color: var(--md-typeset-color);
  opacity: 0.65;
}
[data-md-color-scheme="slate"] .home-card {
  background: #263445;
  border-color: #334155;
}

/* === 分类页卡片 === */
.category-card {
  display: block;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fef6f8; /* 极淡粉色 */
  transition: all 0.3s ease;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.12), 0 2px 8px rgba(240, 147, 251, 0.08);
  border-color: transparent;
}
.category-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.3rem;
}
.category-card:hover .card-title {
  color: #3b82f6; /* blue-500 */
}
.category-card .card-excerpt {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
}
.category-card .card-meta {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}
[data-md-color-scheme="slate"] .category-card {
  background: #263445;
  border-color: #334155;
}
[data-md-color-scheme="slate"] .category-card .card-title {
  color: #f1f5f9;
}
[data-md-color-scheme="slate"] .category-card:hover .card-title {
  color: #93c5fd;
}
[data-md-color-scheme="slate"] .category-card .card-excerpt {
  color: #94a3b8;
}

/* === 标签 === */
.tag {
  display: inline-block;
  padding: 0.15em 0.6em;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe, #fce7f3); /* blue-100 → pink-100 */
  color: #7c3aed !important;
  margin-right: 0.3rem;
  transition: all 0.2s ease;
}
.tag:hover {
  background: linear-gradient(135deg, #93c5fd, #f9a8d4);
  color: #fff !important;
}
[data-md-color-scheme="slate"] .tag {
  background: linear-gradient(135deg, #1e3a5f, #3b1f4e) !important;
  color: #c4b5fd !important;
}
[data-md-color-scheme="slate"] .tag:hover {
  background: linear-gradient(135deg, #3b82f6, #ec4899) !important;
  color: #fff !important;
}

/* === 文章页 === */
/* 标题底部蓝粉装饰线 */
.md-typeset h1 {
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, #4facfe, #f093fb) 1;
  padding-bottom: 0.3rem;
}

/* 文章正文行距 */
.md-typeset {
  line-height: 1.8;
}

/* === 卡片悬浮效果（通用） === */
.md-typeset .grid.cards > ol > li,
.md-typeset .grid.cards > ul > li,
.md-typeset .grid.cards > li {
  transition: all 0.3s ease;
  border-color: #e2e8f0;
  background: #fef6f8;
}
.md-typeset .grid.cards > ol > li:hover,
.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid.cards > li:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.12), 0 2px 8px rgba(240, 147, 251, 0.08);
}
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ol > li,
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li,
[data-md-color-scheme="slate"] .md-typeset .grid.cards > li {
  background: #263445;
  border-color: #334155;
}

/* === 顶部导航栏 === */
/* 导航栏背景渐变 */
.md-header {
  box-shadow: none !important;
  background: linear-gradient(135deg, #3b82f6 0%, #ec4899 100%) !important;
}

/* 导航栏标题白色 */
.md-header__title,
.md-header__topic {
  color: #fff !important;
}

/* 导航栏图标白色 */
.md-header__button.md-icon {
  color: #fff !important;
}

/* 导航栏来源按钮白色 */
.md-source {
  color: rgba(255, 255, 255, 0.9) !important;
}
.md-source__repository {
  color: #fff !important;
}
.md-source__icon {
  color: #fff !important;
}

/* 标签导航区背景 */
.md-tabs {
  background: linear-gradient(135deg, #3b82f6 0%, #ec4899 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* 导航标签 */
.md-tabs__link {
  color: rgba(255, 255, 255, 0.85) !important;
  transition: all 0.25s ease !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem !important;
  border-radius: 16px;
  margin: 0.3rem 0.15rem;
}

.md-tabs__link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* 导航标签激活 */
.md-tabs__item--active .md-tabs__link,
.md-tabs__link--active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.25) !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 暗色模式适配 */
[data-md-color-scheme="slate"] .md-header {
  background: linear-gradient(135deg, #1d4ed8 0%, #be185d 100%) !important;
}
[data-md-color-scheme="slate"] .md-tabs {
  background: linear-gradient(135deg, #1d4ed8 0%, #be185d 100%) !important;
}

/* === 目录侧边栏 (TOC) === */
/* TOC 链接悬停 */
.md-nav--secondary .md-nav__link:hover {
  color: #ec4899; /* pink-500 */
}

/* TOC 当前激活项 */
.md-nav--secondary .md-nav__link--active {
  color: #3b82f6; /* blue-500 */
  font-weight: 600;
  border-left: 3px solid;
  border-image: linear-gradient(180deg, #4facfe, #f093fb) 1;
  padding-left: 0.6rem;
}

/* TOC 链接过渡 */
.md-nav--secondary .md-nav__link {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  padding-left: 0.6rem;
}

/* === 页脚 === */
/* 页脚上部分隔线渐变 */
.md-footer-meta {
  background: linear-gradient(135deg, #4facfe 0%, #f093fb 100%) !important;
}

/* 页脚版权区 */
.md-footer-copyright {
  color: rgba(255, 255, 255, 0.9);
}
.md-footer-copyright a {
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* === 社交页卡片 === */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fef6f8;
  transition: all 0.3s ease;
  text-decoration: none !important;
  color: inherit !important;
}
a.social-card {
  cursor: pointer;
}
.social-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.12), 0 2px 8px rgba(240, 147, 251, 0.08);
  border-color: transparent;
}
.social-card .social-icon {
  color: #64748b;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}
.social-card:hover .social-icon {
  color: #3b82f6;
}
.social-card .social-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.3rem;
}
.social-card:hover .social-name {
  color: #3b82f6;
}
.social-card .social-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
}
[data-md-color-scheme="slate"] .social-card {
  background: #263445;
  border-color: #334155;
}
[data-md-color-scheme="slate"] .social-card .social-name {
  color: #f1f5f9;
}
[data-md-color-scheme="slate"] .social-card .social-desc {
  color: #94a3b8;
}
[data-md-color-scheme="slate"] .social-card:hover .social-name,
[data-md-color-scheme="slate"] .social-card:hover .social-icon {
  color: #93c5fd;
}

/* 页脚社交链接 */
.md-footer-social {
  color: rgba(255, 255, 255, 0.9);
}
.md-footer-social a {
  color: #fff !important;
  transition: transform 0.2s ease;
}
.md-footer-social a:hover {
  transform: scale(1.15);
  color: #ffd700 !important; /* 金色悬浮高亮 */
}

/* 页脚主体区域微调 */
.md-footer-nav {
  background-color: #1e293b; /* slate-800 */
}

/* 页脚导航链接 */
.md-footer-nav__link {
  transition: color 0.2s ease;
}
.md-footer-nav__link:hover {
  color: #93c5fd; /* blue-300 */
}

/* === Clear fixed header on content pages === */
.md-sidebar ~ .md-content {
  padding-top: 2rem;
}

/* === 标签页 (tags.md) === */
/* 标签页中的标签徽章 */
.md-tag {
  background: linear-gradient(135deg, #dbeafe, #fce7f3) !important;
  color: #7c3aed !important;
  font-size: 0.7rem !important;
  border-radius: 999px !important;
  padding: 0.15em 0.8em !important;
  transition: all 0.2s ease;
}
.md-tag:hover {
  background: linear-gradient(135deg, #93c5fd, #f9a8d4) !important;
  color: #fff !important;
}

/* 标签页面文章列表 */
.md-typeset .md-tags + ul {
  margin-top: 0.5rem;
}
.md-typeset .md-tags + ul li {
  margin-bottom: 0.3rem;
}
.md-typeset .md-tags + ul li a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
}
.md-typeset .md-tags + ul li a:hover {
  color: #ec4899;
}

/* === 友链页面 === */
.friend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.friend-card {
  padding: 1.2rem 1.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fef6f8;
  text-align: center;
  transition: all 0.3s ease;
}
.friend-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.12), 0 2px 8px rgba(240, 147, 251, 0.08);
  border-color: transparent;
}
.friend-card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  border-bottom: none !important;
  margin-bottom: 0.3rem;
}
.friend-card p {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0.2rem 0 0.5rem;
}
.friend-card a {
  color: #3b82f6 !important;
  font-size: 0.8rem;
  margin: 0 0.25rem;
}
.friend-card a:hover {
  color: #ec4899 !important;
}

.friend-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.6rem;
  border: 2px solid rgba(236, 72, 153, 0.2);
  transition: border-color 0.3s ease;
}
.friend-card:hover .friend-avatar {
  border-color: rgba(236, 72, 153, 0.5);
}

.friend-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 0.6rem;
  background: linear-gradient(135deg, rgba(124,161,255,0.15), rgba(179,136,255,0.15));
  font-size: 1.5rem;
  border: 2px dashed rgba(124,161,255,0.3);
}

[data-md-color-scheme="slate"] .friend-card {
  background: #263445;
  border-color: #334155;
}
[data-md-color-scheme="slate"] .friend-card h2 {
  color: #f1f5f9;
}
[data-md-color-scheme="slate"] .friend-card p {
  color: #94a3b8;
}
[data-md-color-scheme="slate"] .friend-card a {
  color: #93c5fd !important;
}
[data-md-color-scheme="slate"] .friend-card a:hover {
  color: #f9a8d4 !important;
}

/* === 碎碎念页面 === */
.thoughts-header {
  text-align: center;
  margin-bottom: 2rem;
}
.thoughts-header h1 {
  border-bottom: none !important;
}

/* === Day Counters (thoughts page) === */
.day-counters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem 1.5rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(124, 161, 255, 0.2);
  border-radius: 12px;
  background: rgba(124, 161, 255, 0.05);
}
[data-md-color-scheme="default"] .day-counters {
  border-color: rgba(236, 72, 153, 0.2);
  background: rgba(236, 72, 153, 0.04);
}
.counter-item {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}
.counter-item strong {
  font-size: 1.2rem;
  color: #7CA1FF;
  margin-left: 0.3rem;
}
[data-md-color-scheme="default"] .counter-item {
  color: rgba(0, 0, 0, 0.6);
}
[data-md-color-scheme="default"] .counter-item strong {
  color: #ec4899;
}

.thought-card {
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fef6f8;
  transition: all 0.3s ease;
}
.thought-card:hover {
  box-shadow: 0 4px 20px rgba(79, 172, 254, 0.10), 0 2px 6px rgba(240, 147, 251, 0.06);
}
.thought-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
}
.thought-images {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}
.thought-images img {
  max-height: 200px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.thought-link {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.thought-link a {
  color: #3b82f6;
  text-decoration: none;
}
.thought-link a:hover {
  color: #ec4899;
}
.thoughts-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #64748b;
}

/* 暗色模式适配 */
[data-md-color-scheme="slate"] .thought-card {
  background: #263445;
  border-color: #334155;
}
[data-md-color-scheme="slate"] .thought-text {
  color: #f1f5f9;
}

/* ============================================
   首页重设计 — 暗色太空主题
   ============================================ */

/* === CSS Variables === */
:root {
  --home-bg-dark: #0a0a1a;
  --home-bg-mid: #16213e;
  --home-blue: #7CA1FF;
  --home-purple: #b388ff;
  --home-cyan: #00e5ff;
  --home-text: #e0e0e0;
  --home-card-bg: rgba(255,255,255,0.05);
  --home-card-border: rgba(124,161,255,0.2);
}

/* === Homepage Header / Nav === */
.homepage-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.homepage-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7CA1FF, #b388ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none !important;
}

.nav-center {
  display: flex;
  gap: 0.5rem;
}
.nav-center a {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none !important;
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s ease;
}
.nav-center a:hover {
  color: #fff !important;
  background: rgba(124, 161, 255, 0.15);
  text-shadow: 0 0 8px rgba(124, 161, 255, 0.5);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-github {
  font-size: 1.2rem;
  text-decoration: none !important;
  transition: transform 0.2s ease;
}
.nav-github:hover {
  transform: scale(1.2);
}
.nav-theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-theme-toggle:hover {
  background: rgba(124, 161, 255, 0.2);
  border-color: #7CA1FF;
}

/* === Hero Section === */
.homepage-hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0a1a 0%, #16213e 50%, #0f0f2e 100%);
  overflow: hidden;
  padding: 64px 1.5rem 60px;
}

#hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  max-width: 70rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 0 1 auto;
  min-width: 0;
}

.hero-greeting {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(124, 161, 255, 0.3);
}

.hero-name {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #7CA1FF, #b388ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.3rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.5rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.hero-tags span {
  display: inline-block;
  padding: 0.3em 1em;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(124, 161, 255, 0.4);
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}
.hero-tags span:hover {
  background: rgba(124, 161, 255, 0.2);
  border-color: #7CA1FF;
  box-shadow: 0 0 15px rgba(124, 161, 255, 0.3);
}

/* === Avatar Orbit === */
.hero-avatar {
  flex-shrink: 0;
}

.orbit {
  transform-origin: 100px 100px;
  animation: orbit-spin 12s linear infinite;
}
.orbit-2 {
  animation-duration: 18s;
  animation-direction: reverse;
}

.orbit-dot {
  animation: twinkle 2s ease-in-out infinite;
}
.orbit-dot:nth-child(5) { animation-delay: 0.5s; }
.orbit-dot:nth-child(6) { animation-delay: 1s; }
.orbit-dot:nth-child(7) { animation-delay: 1.5s; }

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

/* === Feature Card Carousel === */
.homepage-carousel {
  padding: 2.5rem 1.5rem;
  background: linear-gradient(180deg, #0f0f2e, #0a0a1a);
}

.carousel-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto;
  width: 100%;
}

.carousel-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex: 1;
}

.carousel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  flex: 1;
  max-width: 260px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(124, 161, 255, 0.2);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}
.carousel-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 161, 255, 0.5);
  box-shadow: 0 8px 30px rgba(124, 161, 255, 0.15);
}

.carousel-card.active {
  flex: 1.25;
  max-width: 325px;
  transform: scale(1.08);
  border-color: rgba(124, 161, 255, 0.5);
  box-shadow: 0 8px 32px rgba(124, 161, 255, 0.25);
  z-index: 1;
}
.carousel-card.active:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(124, 161, 255, 0.35);
  border-color: rgba(124, 161, 255, 0.7);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}
.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
}
.card-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.carousel-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(124, 161, 255, 0.4);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.carousel-arrow:hover {
  background: rgba(124, 161, 255, 0.2);
  border-color: #7CA1FF;
  color: #fff;
}

/* === Featured Projects === */
.homepage-projects {
  padding: 2rem 1.5rem;
  background: #0a0a1a;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #7CA1FF;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid;
  border-image: linear-gradient(180deg, #7CA1FF, #b388ff) 1;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 0 auto;
  width: 100%;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(124, 161, 255, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 161, 255, 0.5);
  box-shadow: 0 8px 30px rgba(124, 161, 255, 0.15);
}

.project-image {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(124, 161, 255, 0.2), rgba(179, 136, 255, 0.2));
  color: rgba(255, 255, 255, 0.6);
}

.project-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.3rem;
}

.project-card p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 0.8rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}
.project-tags span {
  display: inline-block;
  padding: 0.15em 0.6em;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 161, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

.project-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* === Latest Blog === */
.homepage-blog {
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, #0a0a1a, #0f0f2e);
}

.blog-table {
  margin: 0 auto;
  width: 100%;
}

.blog-row {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(124, 161, 255, 0.15);
  transition: all 0.3s ease;
  border-radius: 8px;
}
.blog-row:last-child {
  border-bottom: none;
}
.blog-row:hover {
  background: rgba(124, 161, 255, 0.08);
  transform: translateX(4px);
}
.blog-row:hover .blog-title {
  color: #7CA1FF;
}

.blog-date {
  flex-shrink: 0;
  width: 130px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.blog-title {
  flex: 1;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: color 0.3s ease;
}

.blog-tag {
  flex-shrink: 0;
  padding: 0.15em 0.8em;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(124, 161, 255, 0.3);
  color: #7CA1FF;
}

/* === Footer === */
.homepage-footer {
  background: #0a0a1a;
  border-top: 1px solid rgba(124, 161, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.footer-col h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #7CA1FF;
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin: 0;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 0.5rem;
}
.footer-col a {
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-col a:hover {
  color: #7CA1FF !important;
}

.footer-bar {
  text-align: center;
  padding: 1.2rem 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* === Particle twinkle === */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* === Fade-in-up animation === */
.homepage-carousel,
.project-card,
.blog-row {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.homepage-carousel.visible,
.project-card.visible,
.blog-row.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Light Mode Overrides — 浅粉 === */
[data-md-color-scheme="default"] .homepage-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
}
[data-md-color-scheme="default"] .nav-center a {
  color: rgba(0, 0, 0, 0.75) !important;
}
[data-md-color-scheme="default"] .nav-center a:hover {
  color: #000 !important;
  background: rgba(236, 72, 153, 0.08);
}
[data-md-color-scheme="default"] .homepage-hero {
  background: linear-gradient(135deg, #fef6f8 0%, #fdf2f8 50%, #fce7f3 100%);
}
[data-md-color-scheme="default"] .hero-greeting {
  color: rgba(0, 0, 0, 0.6);
}
[data-md-color-scheme="default"] .hero-name {
  background: linear-gradient(135deg, #ec4899, #d946ef);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-md-color-scheme="default"] .hero-subtitle {
  color: rgba(0, 0, 0, 0.4);
}
[data-md-color-scheme="default"] .hero-tags span {
  border-color: rgba(236, 72, 153, 0.3);
  color: rgba(0, 0, 0, 0.7);
}
[data-md-color-scheme="default"] .hero-tags span:hover {
  background: rgba(236, 72, 153, 0.1);
  border-color: #ec4899;
}
[data-md-color-scheme="default"] .homepage-carousel {
  background: linear-gradient(180deg, #fce7f3, #fef6f8);
}
[data-md-color-scheme="default"] .carousel-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(236, 72, 153, 0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
[data-md-color-scheme="default"] .carousel-card:hover {
  box-shadow: 0 8px 30px rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.35);
}
[data-md-color-scheme="default"] .carousel-card.active {
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.4);
}
[data-md-color-scheme="default"] .carousel-card.active:hover {
  box-shadow: 0 12px 40px rgba(236, 72, 153, 0.3);
  border-color: rgba(236, 72, 153, 0.6);
}
[data-md-color-scheme="default"] .card-title {
  color: #1e293b;
}
[data-md-color-scheme="default"] .card-desc {
  color: rgba(0, 0, 0, 0.5);
}
[data-md-color-scheme="default"] .carousel-arrow {
  border-color: rgba(236, 72, 153, 0.3);
  color: rgba(0, 0, 0, 0.5);
}
[data-md-color-scheme="default"] .carousel-arrow:hover {
  background: rgba(236, 72, 153, 0.1);
  border-color: #ec4899;
  color: #ec4899;
}
[data-md-color-scheme="default"] .homepage-projects {
  background: #fef6f8;
}
[data-md-color-scheme="default"] .project-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(236, 72, 153, 0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
[data-md-color-scheme="default"] .project-card:hover {
  box-shadow: 0 8px 30px rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.35);
}
[data-md-color-scheme="default"] .project-card h3 {
  color: #1e293b;
}
[data-md-color-scheme="default"] .project-card p {
  color: rgba(0, 0, 0, 0.5);
}
[data-md-color-scheme="default"] .project-tags span {
  border-color: rgba(236, 72, 153, 0.2);
  color: rgba(0, 0, 0, 0.55);
}
[data-md-color-scheme="default"] .project-stats {
  color: rgba(0, 0, 0, 0.45);
}
[data-md-color-scheme="default"] .homepage-blog {
  background: linear-gradient(180deg, #fef6f8, #fdf2f8);
}
[data-md-color-scheme="default"] .blog-date {
  color: rgba(0, 0, 0, 0.4);
}
[data-md-color-scheme="default"] .blog-title {
  color: rgba(0, 0, 0, 0.8);
}
[data-md-color-scheme="default"] .blog-tag {
  border-color: rgba(236, 72, 153, 0.3);
  color: #ec4899;
}
[data-md-color-scheme="default"] .blog-row:hover {
  background: rgba(236, 72, 153, 0.06);
}
[data-md-color-scheme="default"] .blog-row:hover .blog-title {
  color: #ec4899;
}
[data-md-color-scheme="default"] .homepage-footer {
  background: #fef6f8;
  border-top-color: rgba(0, 0, 0, 0.06);
}
[data-md-color-scheme="default"] .footer-col h3 {
  color: #ec4899;
}
[data-md-color-scheme="default"] .footer-col p {
  color: rgba(0, 0, 0, 0.6);
}
[data-md-color-scheme="default"] .footer-col a {
  color: rgba(0, 0, 0, 0.6) !important;
}
[data-md-color-scheme="default"] .footer-col a:hover {
  color: #ec4899 !important;
}
[data-md-color-scheme="default"] .footer-bar {
  color: rgba(0, 0, 0, 0.4);
  border-top-color: rgba(0, 0, 0, 0.06);
}
[data-md-color-scheme="default"] .section-title {
  color: #ec4899;
  border-image: linear-gradient(180deg, #ec4899, #d946ef) 1;
}

/* === Homepage Thoughts Section === */
.homepage-thoughts {
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, #0f0f2e, #0a0a1a);
}

.thoughts-preview {
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.thoughts-preview p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
}

.thoughts-link-btn {
  display: inline-block;
  padding: 0.6em 1.8em;
  border: 1px solid rgba(124, 161, 255, 0.4);
  border-radius: 999px;
  color: #7CA1FF;
  text-decoration: none !important;
  font-weight: 500;
  transition: all 0.3s ease;
}

.thoughts-link-btn:hover {
  background: rgba(124, 161, 255, 0.15);
  border-color: #7CA1FF;
  box-shadow: 0 0 15px rgba(124, 161, 255, 0.3);
}

[data-md-color-scheme="default"] .homepage-thoughts {
  background: linear-gradient(180deg, #fdf2f8, #fef6f8);
}

[data-md-color-scheme="default"] .thoughts-preview p {
  color: rgba(0, 0, 0, 0.5);
}

[data-md-color-scheme="default"] .thoughts-link-btn {
  border-color: rgba(236, 72, 153, 0.3);
  color: #ec4899;
}

[data-md-color-scheme="default"] .thoughts-link-btn:hover {
  background: rgba(236, 72, 153, 0.1);
  border-color: #ec4899;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.2);
}

/* === Responsive === */
@media (max-width: 1023px) {
  .hero-content {
    flex-direction: column-reverse;
    gap: 2rem;
    text-align: center;
  }
  .hero-tags {
    justify-content: center;
  }
  .hero-name {
    font-size: 3rem;
  }
}

@media (max-width: 767px) {
  .nav-center {
    display: none;
  }
  .hero-name {
    font-size: 2.2rem;
  }
  .hero-content {
    gap: 1.5rem;
  }
  .hero-avatar svg {
    width: 150px;
    height: 150px;
  }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .blog-row {
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .blog-date {
    width: auto;
  }
  .carousel-cards {
    gap: 0.5rem;
  }
  .carousel-card {
    padding: 1.2rem 0.5rem;
  }
  .carousel-card.active {
    flex: 1.25;
  }
}
