/* ========== Google Fonts ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

/* ========== Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: #eef2ff;
    --primary-bg-dark: #312e81;
    --secondary: #ec4899;
    --secondary-light: #f472b6;
    --accent: #f59e0b;
    --success: #10b981;
    --bg: #f1f5f9;
    --bg-dark: #0f172a;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.15);
    --shadow-xl: 0 35px 60px -15px rgba(0,0,0,0.2);
    --radius: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-full: 9999px;
}
body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: all 0.25s; }
a:hover { color: var(--primary-dark); }

/* ========== Header ========== */
header {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.site-logo-wrap {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 50%, var(--secondary) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.site-logo-wrap::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
    transition: all 0.5s;
}
.site-brand:hover .site-logo-wrap { transform: translateY(-3px) rotate(3deg); box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5); }
.site-brand:hover .site-logo-wrap::before { left: 100%; }
.site-title-group { display: flex; flex-direction: column; }
.site-title-lg { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; line-height: 1.2; }
.site-tagline { font-size: 12px; color: var(--text-muted); letter-spacing: 0.5px; margin-top: 2px; }
nav { display: flex; gap: 8px; align-items: center; }
nav a {
    padding: 12px 22px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
nav a:not(.active):hover { color: var(--primary); background: var(--primary-bg); }
nav a.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
nav a.active:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5); }

/* ========== Container ========== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ========== Hero Section ========== */
.hero-section {
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px;
    height: 500px;
    background: radial-gradient(ellipse at center top, rgba(99,102,241,0.12) 0%, rgba(139,92,246,0.08) 40%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fafafa 100%);
    border: 1px solid rgba(99,102,241,0.2);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}
.hero-badge::before {
    content: '✨';
}
.hero-title {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    letter-spacing: -2px;
    line-height: 1.1;
}
.hero-title span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}
.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 48px;
}
.hero-stat { text-align: center; }
.hero-stat-num {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.hero-stat-label { font-size: 14px; color: var(--text-muted); margin-top: 8px; }

/* ========== Featured Section ========== */
.featured-section { margin-bottom: 80px; }
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}
.section-label::before {
    content: '';
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}
.section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}
.featured-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4c1d95 70%, #7c3aed 100%);
    border-radius: 32px;
    padding: 64px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 56px;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.featured-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236,72,153,0.4) 0%, transparent 70%);
    pointer-events: none;
}
.featured-card::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, transparent 70%);
    pointer-events: none;
}
.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
    width: fit-content;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.2);
}
.featured-content { position: relative; z-index: 1; }
.featured-card h3 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.25;
    color: white;
    letter-spacing: -0.5px;
}
.featured-card h3 a { color: white; }
.featured-card h3 a:hover { text-decoration: underline; }
.featured-excerpt {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    line-height: 1.9;
    margin-bottom: 28px;
}
.featured-meta {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}
.featured-meta span { display: flex; align-items: center; gap: 6px; }
.featured-visual {
    position: relative;
    z-index: 1;
}
.featured-img {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
}

/* ========== Post Grid ========== */
.posts-section { padding-bottom: 100px; }
.posts-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
}
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 32px;
}
.post-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}
.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(99,102,241,0.03) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.post-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.post-card:hover::before { opacity: 1; }
.post-card-thumb {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fafafa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
}
.post-card-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--card-bg));
}
.post-card-body { padding: 28px 28px 24px; flex: 1; display: flex; flex-direction: column; }
.post-tags { display: flex; gap: 8px; margin-bottom: 16px; }
.tag {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.tag-tech { background: var(--primary-bg); color: var(--primary); }
.tag-life { background: #fdf2f8; color: var(--secondary); }
.post-card h4 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}
.post-card h4 a { color: var(--text); }
.post-card h4 a:hover { color: var(--primary); }
.post-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.post-meta span { display: flex; align-items: center; gap: 5px; }
.post-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.post-card-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbfc;
}
.read-more {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.read-more-arrow { transition: transform 0.2s; }
.post-card:hover .read-more-arrow { transform: translateX(4px); }
.read-count { font-size: 12px; color: var(--text-muted); }

/* ========== Article Page ========== */
.article-wrap { padding: 56px 0 100px; }
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 40px;
    padding: 12px 22px;
    border-radius: var(--radius-full);
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}
.back-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-bg); transform: translateX(-4px); }
.article-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.article-header {
    padding: 60px 64px 48px;
    border-bottom: 1px solid var(--border);
    position: relative;
    background: linear-gradient(180deg, #fafbff 0%, white 100%);
}
.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--secondary));
}
.article-tags { margin-bottom: 20px; }
.article-header h1 {
    font-size: 44px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.article-meta-row {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    color: var(--text-muted);
}
.article-meta-item { display: flex; align-items: center; gap: 8px; }
.article-body { padding: 56px 64px; font-size: 17px; line-height: 2; color: #374151; }
.article-body h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin: 60px 0 24px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    letter-spacing: -0.3px;
}
.article-body h2:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.article-body h3 { font-size: 22px; font-weight: 700; margin: 40px 0 18px; color: var(--text); }
.article-body p { margin-bottom: 24px; }
.article-body ul, .article-body ol { margin: 24px 0; padding-left: 28px; }
.article-body li { margin-bottom: 12px; }
.article-body strong { font-weight: 700; color: var(--text); }
.article-body code {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 4px 12px;
    border-radius: 8px;
    font-family: 'SF Mono', Consolas, 'Fira Code', monospace;
    font-size: 14px;
    color: var(--primary-dark);
    border: 1px solid var(--border);
}
.article-body pre {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    padding: 32px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 36px 0;
    font-size: 14px;
    line-height: 1.9;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.05);
}
.article-body pre code { background: none; padding: 0; color: inherit; font-size: 14px; }
.article-body blockquote {
    border-left: 5px solid var(--primary);
    padding: 24px 32px;
    margin: 36px 0;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fafafa 100%);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 17px;
    box-shadow: var(--shadow-sm);
}
.article-footer {
    padding: 28px 64px;
    border-top: 1px solid var(--border);
    background: #fafbfc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========== About Page ========== */
.about-section { padding: 80px 0 100px; }
.about-grid { display: grid; grid-template-columns: 1fr 380px; gap: 56px; }
.about-main {}
.about-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 40px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}
.about-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.about-card h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.about-card h3 .icon { font-size: 28px; }
.about-card p { color: var(--text-secondary); margin-bottom: 16px; font-size: 15px; line-height: 1.9; }
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 20px; }
.skill-item {
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #f8fafc 100%);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    transition: all 0.25s;
    font-weight: 500;
}
.skill-item:hover { border-color: var(--primary); transform: translateX(6px); background: linear-gradient(135deg, var(--primary-bg) 0%, var(--primary-bg) 100%); }
.skill-item::before { content: '✓'; color: var(--primary); font-weight: 800; font-size: 12px; flex-shrink: 0; }
.about-sidebar { position: sticky; top: 104px; }
.profile-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4c1d95 70%, #7c3aed 100%);
    border-radius: var(--radius-md);
    padding: 48px 40px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}
.profile-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(236,72,153,0.3) 0%, transparent 70%);
}
.profile-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border-radius: 50%;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}
.profile-card h3 { font-size: 26px; font-weight: 800; margin-bottom: 8px; position: relative; z-index: 1; }
.profile-role { font-size: 14px; opacity: 0.85; margin-bottom: 32px; position: relative; z-index: 1; }
.profile-divider { width: 60px; height: 3px; background: linear-gradient(90deg, var(--primary), var(--secondary)); margin: 0 auto 28px; border-radius: 2px; }
.contact-list { text-align: left; position: relative; z-index: 1; }
.contact-item { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 14px; }
.contact-item:last-child { border-bottom: none; }
.contact-icon { font-size: 20px; width: 24px; text-align: center; }

/* ========== Footer ========== */
footer {
    background: var(--bg-dark);
    color: #94a3b8;
    padding: 80px 0 40px;
}
.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 64px;
}
.footer-brand h3 { color: white; font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.9; max-width: 320px; }
.footer-links h4 { color: white; font-size: 12px; font-weight: 700; margin-bottom: 24px; text-transform: uppercase; letter-spacing: 2px; }
.footer-links a { display: block; color: #94a3b8; font-size: 14px; padding: 10px 0; transition: all 0.2s; }
.footer-links a:hover { color: white; padding-left: 8px; }
.footer-bottom {
    max-width: 1280px;
    margin: 64px auto 0;
    padding: 32px 32px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: white; }

/* ========== Animations ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.featured-card { animation: fadeInUp 0.8s ease-out; }
.post-card:nth-child(1) { animation: fadeInUp 0.6s ease-out 0.1s both; }
.post-card:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.15s both; }
.post-card:nth-child(3) { animation: fadeInUp 0.6s ease-out 0.2s both; }
.post-card:nth-child(4) { animation: fadeInUp 0.6s ease-out 0.25s both; }
.post-card:nth-child(5) { animation: fadeInUp 0.6s ease-out 0.3s both; }
.post-card:nth-child(6) { animation: fadeInUp 0.6s ease-out 0.35s both; }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .featured-card { grid-template-columns: 1fr; padding: 48px; }
    .featured-visual { display: none; }
    .about-grid { grid-template-columns: 1fr; }
    .about-sidebar { position: static; }
}
@media (max-width: 768px) {
    .header-inner { height: auto; padding: 16px 20px; flex-direction: column; gap: 16px; }
    nav { flex-wrap: wrap; justify-content: center; gap: 6px; }
    .hero-title { font-size: 38px; letter-spacing: -1px; }
    .hero-desc { font-size: 16px; }
    .hero-stats { gap: 24px; flex-wrap: wrap; }
    .hero-stat-num { font-size: 32px; }
    .post-grid { grid-template-columns: 1fr; }
    .article-header, .article-body, .article-footer { padding: 28px 24px; }
    .article-header h1 { font-size: 28px; }
    .article-body { font-size: 16px; }
    .article-body pre { padding: 20px; font-size: 13px; }
    .featured-card { padding: 32px; }
    .featured-card h3 { font-size: 26px; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
    .skill-grid { grid-template-columns: 1fr; }
    .posts-header { flex-direction: column; align-items: flex-start; gap: 16px; }
}
