/* ========================================
   huzen.me 动态主题 - by OpenClaw
   ======================================== */

/* === 粒子画布 === */
#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* === Hero 区域 === */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #0f172a 100%) !important;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(59,130,246,0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139,92,246,0.12) 0%, transparent 50%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 30s linear infinite;
    pointer-events: none;
}
@keyframes gridMove {
    0%   { transform: translate(0,0); }
    100% { transform: translate(60px,60px); }
}

/* === 标题打字机 === */
.hero-title {
    display: inline-block;
    border-right: 3px solid #60a5fa;
    overflow: hidden;
    white-space: nowrap;
    animation: blink-caret 0.8s step-end infinite;
    max-width: 100%;
    width: 0;
}
.hero-title.typed {
    width: auto;
    border-right-color: transparent;
    animation: none;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite, blink-caret 0.8s step-end infinite;
}
@keyframes blink-caret {
    0%, 100% { border-right-color: #60a5fa; }
    50%      { border-right-color: transparent; }
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* === 副标题 === */
.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.8s ease;
}
.hero-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}
.hero-subtitle strong {
    color: #60a5fa;
}

/* === 简介卡片 === */
.hero-intro {
    background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(139,92,246,0.08) 100%);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-intro.visible {
    opacity: 1;
    transform: translateY(0);
}
.hero-intro blockquote {
    background: rgba(59,130,246,0.08);
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
    border-radius: 0 12px 12px 0;
    color: #94a3b8;
    font-style: italic;
}
.hero-intro blockquote strong {
    color: #60a5fa;
}

/* === 信息网格 === */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}
.info-grid > div {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(59,130,246,0.08);
    transition: all 0.3s ease;
}
.info-grid > div:hover {
    background: rgba(59,130,246,0.08);
    border-color: rgba(59,130,246,0.2);
    transform: translateY(-2px);
}

/* === 数字统计 === */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(139,92,246,0.05));
    border: 1px solid rgba(59,130,246,0.1);
}
.stat-item {
    text-align: center;
    min-width: 120px;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.3rem;
}

/* === 技术栈卡片 === */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.tech-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(59,130,246,0.1);
    border-radius: 14px;
    padding: 1.3rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}
.tech-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.tech-card:hover {
    border-color: rgba(59,130,246,0.3);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(59,130,246,0.12);
}
.tech-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}
.tech-card h3 {
    color: #e2e8f0 !important;
    font-size: 1rem !important;
    margin: 0 0 0.3rem 0 !important;
    font-weight: 600 !important;
}
.tech-card p {
    color: #64748b !important;
    font-size: 0.85rem !important;
    margin: 0 0 0.8rem 0 !important;
    line-height: 1.5 !important;
}
.tech-bar {
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
}
.tech-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === 项目经历 === */
.project-block {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 4px solid #3b82f6;
}
.project-block.visible {
    opacity: 1;
    transform: translateX(0);
}
.project-block:hover {
    background: rgba(59,130,246,0.05);
    border-left-color: #60a5fa;
}
.project-block:nth-child(2) { border-left-color: #8b5cf6; }
.project-block:nth-child(2):hover { border-left-color: #a78bfa; }
.project-block:nth-child(3) { border-left-color: #22c55e; }
.project-block:nth-child(3):hover { border-left-color: #4ade80; }
.project-block:nth-child(4) { border-left-color: #f59e0b; }
.project-block:nth-child(4):hover { border-left-color: #fbbf24; }

.project-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.6rem;
}
.project-highlights {
    margin: 0.6rem 0;
    padding-left: 1rem;
    border-left: 2px solid rgba(59,130,246,0.15);
}
.project-highlights li {
    color: #94a3b8 !important;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}
.project-highlights li:hover {
    color: #e2e8f0 !important;
}
.project-highlights strong {
    color: #60a5fa !important;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}
.project-tags code {
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    border-radius: 99px;
    background: rgba(59,130,246,0.1);
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,0.15);
    transition: all 0.2s ease;
}
.project-tags code:hover {
    background: rgba(59,130,246,0.2);
    transform: translateY(-1px);
}

/* === 联系方式 === */
.contact-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border-radius: 99px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(59,130,246,0.12);
    color: #e2e8f0 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.contact-item:hover {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59,130,246,0.15);
}
.contact-icon {
    font-size: 1.3rem;
}

/* === 页面级淡入 === */
main > .container > div > div {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
main > .container > div > div.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === 滚动条 === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,0.5); }

/* === 回到顶部 === */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}
#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59,130,246,0.4);
}

/* === 响应式 === */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem !important; }
    .hero-subtitle { font-size: 1rem !important; }
    .tech-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .stats-row { gap: 1rem; }
    .stat-number { font-size: 2rem; }
}