:root {
	--primary-color: #5e72e4;
	--radius: 12px;
	--shadow: 0 8px 26px rgba(0, 0, 0, .08);
	--transition: .3s ease;
}

body {
	background-color: #f9fafb;
}

/* Hero */
.hero-section {
	padding: 100px 0 60px;
	background: linear-gradient(135deg, #8bc6ec 0%, #9599e2 100%);
	color: #fff;
}
.hero-section {
    background: transparent !important;
    padding: 100px 0 60px;
    color: #2d3748;          /* 深色文字，适配浅色背景 */
}
.hero-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 48px;
}
.hero-text {
	flex: 1 1 400px;
}
.hero-text h1 {
	font-size: 2.8rem;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 16px;
}
.highlight {
	color: #ffecd2;
}
.hero-text p {
	font-size: 1.2rem;
	opacity: .9;
	margin-bottom: 28px;
}
.btn-hero {
	display: inline-block;
	background: #fff;
	color: var(--primary-color);
	padding: 12px 32px;
	border-radius: 50px;
	font-weight: 600;
	transition: var(--transition);
}
.btn-hero:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
}
.hero-img {
	flex: 1 1 360px;
}
.hero-img img {
	width: 100%;
	max-width: 420px;
	height: auto;
}
/* 圆形白框 Hero 图 */
.hero-img {
    flex: 1 1 360px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-img img {
    width: 100%;
    max-width: 220px;   /* 根据实际再调 */
    height: auto;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    /* 单独放大 1.5 倍 */
    transform: scale(1.1) translateX(50px); /* 右移 100px */
  
    /* 新增：旋转动画 */
    transition: transform .4s ease;
}
.hero-img:hover img {
    transform: scale(1.1) translateX(50px) rotate(15deg);
}

/* 最新文章 */
.posts-section {
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    width: 100vw;
    margin-left: calc(50% - 50vw);   /* 抵消父级可能出现的居中限制 */
    margin-right: calc(50% - 50vw);
    background: rgba(255, 255, 255, 0.60);
    padding: 60px 20px;              /* 上下内边距可保留，左右 20px 防贴边 */
    box-sizing: border-box;  
}
.section-title {
	text-align: center;
	font-size: 2rem;
	margin-bottom: 48px;
	color: #2d3748;
}
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 32px;
}
.post-card {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: var(--transition);
}
.post-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 36px rgba(0, 0, 0, .12);
}
.card-link {
	text-decoration: none;
	color: inherit;
}
.card-img {
	height: 180px;
	overflow: hidden;
}
.card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: var(--transition);
}
.post-card:hover .card-img img {
	transform: scale(1.05);
}
.card-body {
	padding: 20px 24px 24px;
}
.card-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 8px;
	line-height: 1.4;
	color: #2d3748;
}
.card-excerpt {
	font-size: .9rem;
	color: #718096;
	line-height: 1.5;
	margin-bottom: 12px;
}
.card-meta {
	display: flex;
	justify-content: space-between;
	font-size: .8rem;
	color: #a0aec0;
}

/* 适配 Argon 自带暗黑模式 */
body.darkmode .hero-section {
	background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}
body.darkmode .post-card {
	background: #2d3748;
}
body.darkmode .section-title,
body.darkmode .card-title {
	color: #e2e8f0;
}
body.darkmode .posts-section {
    background: rgba(255, 255, 255, 0.12);
}
/* 1. 让导航栏本身不占下方空隙 */
.site-header,
.banner,
.navbar {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 2. 把 hero 区域直接拉到导航栏下沿（如果仍想留一点空隙，把 0 改成 10px） */
.hero-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;      /* 保险：确保层级 */
    top: 0;
}

/* 彻底去掉 banner 下方留白 */
#banner.section-shaped .shape-primary,
#banner.section-shaped::before {
    display: none !important;
}
#banner_container {
    display: none !important;
}
/* 屏幕宽度 ≤ 768 px 时隐藏圆形图片 */
@media (max-width: 768px) {
    .hero-img {
        display: none !important;
    }
}
/* 让“最新文章”与 hero-inner 之间再空出 200px */
#latest-posts.posts-section {
    margin-top: 250px !important;
}
/* 隐藏开始阅读按钮，并收紧上一段落的间距 */
.hero-section .btn-hero { 
  display: none !important; 
}
.hero-text p { 
  margin-bottom: 16px; 
}
.scroll-down:focus {
  outline: none;
}
/* 仅让圆形背景透明 */
.scroll-down {
  background: transparent !important;
  box-shadow: none !important;
}
/* 强制恢复滚轮 */
:root,
html, body {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    position: static !important;
    height: auto !important;
}




/* 新版标题导航样式 */
.section-header {
    margin-bottom: 48px;
    text-align: center;
}

.section-nav {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.nav-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 46px;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    color: var(--primary-color);
}

.nav-tab.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(94, 114, 228, 0.3);
}

/* 内容面板 */
.posts-content {
    position: relative;
}

.posts-panel {
    display: none;
}

.posts-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* 分类卡片样式 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.category-link {
    display: block;
    padding: 32px 24px;
    text-decoration: none;
    color: inherit;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #9f7aea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.category-count {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.category-description {
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.5;
}

/* 暗色模式适配 */
body.darkmode .section-nav {
    background: rgba(45, 55, 72, 0.8);
}

body.darkmode .nav-tab {
    color: #a0aec0;
}

body.darkmode .nav-tab:hover {
    color: #fff;
}

body.darkmode .category-card {
    background: #2d3748;
}

body.darkmode .category-name {
    color: #e2e8f0;
}





/* 文章卡片上滑动画 */
.post-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.post-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* 为不同卡片添加延迟动画效果 */
.posts-grid .post-card:nth-child(1) { transition-delay: 0.1s; }
.posts-grid .post-card:nth-child(2) { transition-delay: 0.2s; }
.posts-grid .post-card:nth-child(3) { transition-delay: 0.3s; }
.posts-grid .post-card:nth-child(4) { transition-delay: 0.4s; }
.posts-grid .post-card:nth-child(5) { transition-delay: 0.5s; }
.posts-grid .post-card:nth-child(6) { transition-delay: 0.6s; }
.posts-grid .post-card:nth-child(7) { transition-delay: 0.7s; }
.posts-grid .post-card:nth-child(8) { transition-delay: 0.8s; }
.posts-grid .post-card:nth-child(9) { transition-delay: 0.9s; }
.posts-grid .post-card:nth-child(10) { transition-delay: 1.0s; }
.posts-grid .post-card:nth-child(11) { transition-delay: 1.1s; }
.posts-grid .post-card:nth-child(12) { transition-delay: 1.2s; }

/* 移动端适配 */
@media (max-width: 768px) {
    .post-card {
        transition-delay: 0.1s !important;
    }
}

/* 增强版的缓动效果 */
.post-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 添加微妙的缩放效果 */
.post-card.animate-in:hover {
    transform: translateY(0) scale(1.02);
}

/* 分类卡片也添加上滑动画 */
.category-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.categories-grid .category-card:nth-child(1) { transition-delay: 0.1s; }
.categories-grid .category-card:nth-child(2) { transition-delay: 0.2s; }
.categories-grid .category-card:nth-child(3) { transition-delay: 0.3s; }
.categories-grid .category-card:nth-child(4) { transition-delay: 0.4s; }

.category-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* 滚动指示器优化 */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(102, 126, 234, 0.8);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.1s ease-out;
}






/* 3D翻转效果 */
.post-card {
    perspective: 1000px;
}

.post-card .card-link {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.post-card.animate-in .card-link {
    animation: cardFlipIn 0.8s ease-out forwards;
}

@keyframes cardFlipIn {
    0% {
        opacity: 0;
        transform: translateY(50px) rotateX(-15deg) rotateY(5deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0) rotateY(0);
    }
}

/* 波浪式动画 */
.posts-grid.wave-animation .post-card {
    animation: waveIn 0.6s ease-out forwards;
}

@keyframes waveIn {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 弹性效果 */
.post-card.elastic-in {
    animation: elasticIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes elasticIn {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.3);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}




/* Hero 按钮样式 */
.hero-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

.btn-primary-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary-hero:hover::before {
    left: 100%;
}

.btn-primary-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-primary-hero:hover .btn-arrow {
    transform: translateX(3px);
}

.btn-secondary-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #667eea;
    padding: 14px 28px;
    border: 2px solid #667eea;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-secondary-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #667eea;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-secondary-hero:hover::before {
    left: 0;
}

.btn-secondary-hero:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .btn-primary-hero,
    .btn-secondary-hero {
        justify-content: center;
        padding: 16px 32px;
    }
}

/* 暗色模式适配 */
body.darkmode .btn-secondary-hero {
    color: #a78bfa;
    border-color: #a78bfa;
}

body.darkmode .btn-secondary-hero::before {
    background: #a78bfa;
}

body.darkmode .btn-secondary-hero:hover {
    color: #1a1a1a;
}




/* 社交图标按钮组 */
.hero-social {
    display: flex;
    gap: 20px;
    margin-top: 32px;
}

.social-btn {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: #fff;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* 悬停效果 */
.social-btn:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 各平台品牌色 */
.social-btn.github:hover {
    background: #24292e;
    border-color: #24292e;
}
.social-btn.wechat:hover {
    background: #1aad19;
    border-color: #1aad19;
}
.social-btn.qq:hover {
    background: #12b7f5;
    border-color: #12b7f5;
}
.social-btn.bilibili:hover {
    background: #fb7299;
    border-color: #fb7299;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero-social {
        gap: 15px;
    }
    .social-btn {
        width: 48px;
        height: 48px;
    }
    .social-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* 暗色模式 */
body.darkmode .social-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}


/* Hero 文字悬停动画 */
.hero-text {
    transition: transform .35s ease;
}

.hero-text:hover {
    transform: translateY(-4px);
}

/* 标题逐字浮起 */
.hero-text h1 {
    display: inline-block;
    transition: transform .35s ease;
}
.hero-text:hover h1 {
    transform: translateY(-2px);
}

/* highlight 颜色闪耀 */
.highlight {
    display: inline-block;
    transition: all .4s ease;
}
.hero-text:hover .highlight {
    color: #f093fb;
    text-shadow: 0 0 8px rgba(240,147,251,.6);
}

/* 描述文字淡入放大 */
.hero-text p {
    transition: all .35s ease;
}
.hero-text:hover p {
    transform: scale(1.02);
    opacity: .95;
}

/* 按钮联动轻微上浮 */
.hero-buttons {
    transition: transform .35s ease;
}
.hero-text:hover + * .hero-buttons,
.hero-text:hover ~ * .hero-buttons {
    transform: translateY(-2px);
}


/* ===== 导航按钮交互动画 ===== */
.section-nav {
    /* 已为 inline-flex，不需要额外布局改动 */
}

.nav-tab {
    position: relative;
    overflow: hidden;
    transition: all .35s cubic-bezier(.25,1,.5,1);
}

/* 正常状态 */
.nav-tab {
    background: transparent;
    color: #718096;
}

/* 悬停：背景填充 + 文字上浮 */
.nav-tab:hover:not(.active) {
    transform: translateY(-2px);
    color: var(--primary-color);
}

/* 悬停：底部彩色指示条 */
.nav-tab::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width .35s ease;
}

.nav-tab:hover::after {
    width: 70%;
}

/* 激活态：放大 + 阴影 */
.nav-tab.active {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(94,114,228,.35);
}

/* 点击波纹效果（可选） */
.nav-tab:active {
    transform: scale(.97);
}

/* ===== 暗色模式 ===== */
body.darkmode .nav-tab:hover:not(.active) {
    color: #a78bfa;
}
body.darkmode .nav-tab::after {
    background: #a78bfa;
}








/* 容器 */
.nav-popup {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px) scale(.9);
    transition: all .35s cubic-bezier(.25,1,.5,1);
    pointer-events: none;
}

.nav-popup.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* 卡片本体 */
.pop-card {
    width: 110px;
    padding: 14px 10px;
    border-radius: 16px;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.2);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}

/* 渐变背景 */
.pop-card.wp {
    background: linear-gradient(135deg, rgba(0,124,186,.9), rgba(0,174,239,.9));
}
.pop-card.bt {
    background: linear-gradient(135deg, rgba(0,150,136,.9), rgba(0,191,165,.9));
}

/* 图标 */
.pop-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

/* 悬停发光 + 上浮 */
.pop-card:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* 暗色模式适配 */
body.darkmode .pop-card {
    border-color: rgba(255,255,255,.1);
}

/* 移动端隐藏 */
@media (max-width: 768px) {
    .nav-popup { display: none; }
}





.confetti {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  pointer-events: none;
  animation: confettiFly 0.9s ease-out forwards;
}

@keyframes confettiFly {
  from { transform: translate(0,0) scale(1); opacity: 1; }
  to   { transform: translate(var(--dx), var(--dy)) scale(0.3); opacity: 0; }
}







/* 隐藏顶部滚动进度条 */
.scroll-indicator {
    display: none !important;
}





