/* ========== 晓凡 Ivan | 个人网站 ========== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #f4f4f8;
    --bg-card: rgba(255,255,255,0.85);
    --text: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --accent: #6b7280;
    --border: rgba(0,0,0,0.08);
    --max-width: 920px;
}

body {
    font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== 科技背景 ========== */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse 600px 400px at 20% 30%, rgba(41, 98, 255, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 70%, rgba(185, 77, 255, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 300px 300px at 50% 50%, rgba(0, 229, 255, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* 网格装饰 */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* ========== 导航栏 ========== */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 56px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    transition: all 0.3s;
}
.nav-links a:hover { color: var(--text); background: rgba(0,0,0,0.05); }
.nav-links a.active { color: var(--text); background: rgba(0,0,0,0.06); }

/* ========== 英雄区域 ========== */
.hero {
    padding-top: 80px;
    padding-bottom: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.hero-name {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
}

.hero-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
}

/* 终端装饰线 */
.hero::after {
    content: '>_ based in singapore · building ideas · automating tasks';
    display: block;
    font-family: 'SF Mono', 'Courier New', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-top: 1.2rem;
    opacity: 0.6;
}

/* ========== 社交媒体 ========== */
.social-section {
    padding: 0 0 2.5rem;
    position: relative;
    z-index: 1;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.social-grid {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.social-btn {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    cursor: pointer;
}

.social-btn svg { width: 22px; height: 22px; }
.social-btn img { border-radius: 4px; }

.social-btn:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.12);
}

/* ========== 分区标题 ========== */
.section-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ========== 视频区域 ========== */
.videos-section {
    padding: 2rem 0 3rem;
    position: relative;
    z-index: 1;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.video-card {
    background: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.1);
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    background: #eee;
}

.video-thumbnail iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.video-info { padding: 1rem 1.25rem; }

.video-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.video-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 订阅按钮 */
.subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.55rem 1.4rem;
    background: #FF0000;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255,0,0,0.15);
}
.subscribe-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,0,0,0.25);
}
.subscribe-btn svg {
    width: 18px; height: 18px;
}

/* ========== 鼠标光晕 ========== */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.06), rgba(41, 98, 255, 0.04), rgba(185, 77, 255, 0.02), transparent 70%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s;
}


/* ========== 翻页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin-top: 2.5rem;
}

.page-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled):not(.active) {
    border-color: rgba(0,0,0,0.15);
    color: var(--text);
}

.page-btn.active {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: white;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ========== 页脚 ========== */

.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
}
.footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========== 博客页 ========== */
.page-header {
    padding: 5rem 0 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}
.page-header h1 {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}
.page-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}
.page-header p { color: var(--text-secondary); }

.blog-section {
    padding: 0 0 3rem;
    position: relative;
    z-index: 1;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.blog-card {
    background: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.06);
}

.blog-image {
    height: 160px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}
.placeholder-img { font-size: 3rem; opacity: 0.3; }

.blog-content { padding: 1.25rem; }

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}
.blog-date { color: var(--text-muted); }
.blog-category {
    background: var(--border);
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.68rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.blog-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.read-more {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.83rem;
    opacity: 0.5;
    transition: all 0.3s;
}
.read-more:hover { opacity: 1; }


/* ========== 关于页 ========== */
.about-section {
    padding: 0 0 3rem;
    position: relative;
    z-index: 1;
}
.about-card {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    padding: 2rem;
}
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
}
.about-text h2 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}
.about-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.about-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.about-email {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
}
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.stat-item {
    background: var(--bg);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}
.stat-num {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 摄影页 ========== */
.gallery-section {
    padding: 0 0 3rem;
    position: relative;
    z-index: 1;
}

.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(8px);
}
.filter-btn:hover { border-color: rgba(0,0,0,0.15); color: var(--text); }
.filter-btn.active { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.15); color: var(--text); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.06);
}

.gallery-image {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
}
.placeholder-photo { font-size: 3.5rem; opacity: 0.2; }

.gallery-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.35s ease;
}
.gallery-item:hover .gallery-overlay { transform: translateY(0); }
.gallery-overlay h3 { font-size: 1rem; color: white; font-weight: 500; margin-bottom: 0.1rem; }
.gallery-overlay p { font-size: 0.78rem; color: rgba(255,255,255,0.6); }
.gallery-item.hidden { display: none; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero::after { font-size: 0.6rem; }
    .video-grid, .blog-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}
