/*
Theme Name: DeskLife Pro
Template: graceful
Author: Kimi Claw
Version: 1.1 - Bento + Parallax Edition
*/

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap");

/* ===== 全局 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: #333;
    background: #fafafa;
    overflow-x: hidden;
}

/* ===== 导航栏 - 毛玻璃 ===== */
.site-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header:hover {
    background: rgba(255, 255, 255, 0.95) !important;
}

.site-title {
    font-family: "Playfair Display", Georgia, serif !important;
    font-weight: 600 !important;
    letter-spacing: -0.5px;
}

/* ===== HERO - 视差 + 粒子背景 ===== */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    perspective: 1px;
}

/* 粒子动画背景 */
.hero-section::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(245,166,35,0.15) 0%, transparent 40%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(2deg); }
    66% { transform: translate(-20px, 20px) rotate(-2deg); }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 0 20px;
    transform-style: preserve-3d;
}

.hero-title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.1;
    opacity: 0;
    animation: slideUp 1s ease forwards;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    opacity: 0;
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 400;
    animation: slideUp 1s ease 0.3s forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* 呼吸动画按钮 */
.hero-cta {
    display: inline-block;
    background: linear-gradient(135deg, #f5a623 0%, #e09420 100%);
    color: #fff;
    padding: 18px 50px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(245, 166, 35, 0.4);
    border: none;
    cursor: pointer;
    animation: breathe 2s ease-in-out infinite, slideUp 1s ease 0.6s forwards;
    opacity: 0;
    position: relative;
    overflow: hidden;
}

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

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

@keyframes breathe {
    0%, 100% { box-shadow: 0 10px 30px rgba(245, 166, 35, 0.4); }
    50% { box-shadow: 0 15px 40px rgba(245, 166, 35, 0.6); }
}

.hero-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 50px rgba(245, 166, 35, 0.5);
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator::after {
    content: "↓";
    font-size: 2rem;
    color: rgba(255,255,255,0.7);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== BENTO 布局 ===== */
.bento-section {
    padding: 80px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: "Playfair Display", serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 20px auto 0;
    border-radius: 2px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
}

.bento-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.bento-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(102,126,234,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.bento-item:hover::before {
    opacity: 1;
}

.bento-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.bento-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item.wide {
    grid-column: span 2;
}

.bento-item.tall {
    grid-row: span 2;
}

.bento-content {
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    color: white;
}

.bento-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.bento-title {
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.bento-desc {
    font-size: 0.95rem;
    opacity: 0.9;
}

.bento-item.large .bento-title {
    font-size: 2rem;
}

/* Bento 悬停特效 */
.bento-item .hover-reveal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(255,255,255,0.95);
    color: #333;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.bento-item:hover .hover-reveal {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* ===== 文章卡片微交互 ===== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.post-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    pointer-events: none;
}

.post-card:hover::after {
    border-color: #667eea;
}

.post-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.post-image-wrapper {
    overflow: hidden;
    position: relative;
}

.post-image-wrapper::before {
    content: "阅读更多 →";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255,255,255,0.95);
    color: #667eea;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.4s;
    z-index: 10;
}

.post-card:hover .post-image-wrapper::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s, filter 0.3s;
}

.post-card:hover img {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.post-content {
    padding: 30px;
}

.post-title {
    font-family: "Playfair Display", serif;
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-title a {
    color: #2c3e50;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-size: 0% 2px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: background-size 0.4s;
}

.post-title a:hover {
    background-size: 100% 2px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #888;
    font-size: 0.9rem;
    margin-top: 20px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.post-card:hover .post-meta span {
    color: #667eea;
}

/* ===== 按钮微交互 ===== */
.btn-primary, .button, input[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 14px 32px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102,126,234,0.4);
}

/* ===== 加载动画 ===== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ===== 视差滚动辅助 ===== */
.parallax-layer {
    will-change: transform;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    .bento-item.large,
    .bento-item.wide,
    .bento-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    .post-grid {
        grid-template-columns: 1fr;
    }
    .hero-section {
        min-height: 80vh;
    }
}
