/* ===== 东宝技术笔记 — Personal Blog Theme ===== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --accent: #8b5cf6;
    --text-dark: #1e293b;
    --text-mid: #334155;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background: var(--white);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== Navigation ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow); }

.nav-container {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--text-dark);
    font-weight: 600; font-size: 1.1rem;
}

.logo-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1rem;
}

.nav-links { display: flex; gap: 28px; }

.nav-links a {
    text-decoration: none; color: var(--text-light);
    font-size: 0.95rem; font-weight: 500;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--primary); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-dark); margin: 5px 0; border-radius: 2px; }

/* ===== Hero ===== */
.hero {
    min-height: 90vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    background: linear-gradient(160deg, #f5f3ff 0%, #eef2ff 40%, #f8fafc 100%);
    padding-top: 64px;
    position: relative; overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 40%, rgba(139,92,246,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content { max-width: 700px; position: relative; z-index: 1; }

.hero-avatar {
    font-size: 4rem; margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-size: 2.8rem; font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-dark) 30%, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem; color: var(--text-light);
    margin-bottom: 8px;
}

.hero-desc {
    font-size: 1rem; color: var(--text-light);
    line-height: 1.8;
}

/* ===== Sections ===== */
.section { padding: 90px 0; }

.section-header { text-align: center; margin-bottom: 56px; }

.section-tag {
    display: inline-block; padding: 5px 14px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 20px; font-size: 0.8rem;
    font-weight: 600; letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.section-title {
    font-size: 2.2rem; font-weight: 700;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-light); font-size: 1.05rem;
}

/* ===== About ===== */
.about { background: var(--white); }

.about-content { max-width: 650px; margin: 0 auto; text-align: center; }

.about-intro {
    font-size: 1.05rem; color: var(--text-mid);
    line-height: 1.9; margin-bottom: 28px;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.skill-tag {
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 20px; font-size: 0.85rem;
    font-weight: 500;
}

/* ===== Blog ===== */
.blog { background: var(--bg-light); }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.blog-card-date {
    font-size: 0.8rem; color: var(--primary);
    font-weight: 600; margin-bottom: 10px;
}

.blog-card h3 {
    font-size: 1.15rem; margin-bottom: 10px;
    color: var(--text-dark);
}

.blog-card p {
    color: var(--text-light); font-size: 0.9rem;
    line-height: 1.7; margin-bottom: 16px;
}

.blog-card-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.blog-card-tags span {
    padding: 3px 10px;
    background: var(--bg-light);
    color: var(--text-light);
    border-radius: 6px; font-size: 0.78rem;
    border: 1px solid var(--border);
}

/* ===== Projects ===== */
.projects { background: var(--white); }

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: all 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.project-icon {
    font-size: 2.5rem; margin-bottom: 16px;
}

.project-card h3 {
    font-size: 1.2rem; margin-bottom: 10px;
}

.project-card p {
    color: var(--text-light); font-size: 0.9rem;
    line-height: 1.7; margin-bottom: 14px;
}

.project-tech {
    font-size: 0.8rem; color: var(--primary);
    font-weight: 500;
}

/* ===== Contact ===== */
.contact { background: var(--bg-light); }

.contact-content { max-width: 500px; margin: 0 auto; }

.contact-info { display: flex; flex-direction: column; gap: 16px; }

.contact-item {
    display: flex; align-items: center; gap: 18px;
    padding: 22px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.contact-icon {
    width: 46px; height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; flex-shrink: 0;
}

.contact-icon svg { width: 22px; height: 22px; }

.contact-item h3 { font-size: 0.95rem; margin-bottom: 3px; }
.contact-item p { color: var(--text-light); font-size: 0.9rem; }

/* ===== Footer ===== */
.footer {
    background: var(--text-dark); color: white;
    padding: 50px 0 30px;
}

.footer-content { text-align: center; }

.footer-brand {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin-bottom: 16px; font-size: 1.05rem;
}

.footer-links { margin-bottom: 12px; }

.footer-links a {
    color: rgba(255,255,255,0.65); text-decoration: none;
    margin: 0 14px; transition: color 0.3s; font-size: 0.9rem;
}
.footer-links a:hover { color: #a5b4fc; }

.footer-copyright {
    color: rgba(255,255,255,0.4); font-size: 0.8rem;
}

.beian-row {
    margin-top: 6px;
    display: flex; align-items: center; justify-content: center;
    gap: 4px;
}
.beian-row a {
    color: rgba(255,255,255,0.45); text-decoration: none;
    font-size: 0.78rem;
    display: inline-flex; align-items: center; gap: 3px;
    transition: color 0.3s;
}
.beian-row a:hover { color: rgba(255,255,255,0.7); }

.beian-icon {
    width: 16px; height: 16px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ===== Privacy Page ===== */
.privacy-page { padding: 100px 0 60px; min-height: 100vh; }
.privacy-content { max-width: 760px; margin: 0 auto; }
.privacy-content h1 { font-size: 1.8rem; margin-bottom: 6px; }
.privacy-content .update-date { font-size: 0.85rem; color: var(--text-light); margin-bottom: 36px; }
.privacy-content h2 { font-size: 1.2rem; margin: 32px 0 10px; color: var(--primary-dark); font-weight: 600; }
.privacy-content h3 { font-size: 1.05rem; margin: 24px 0 8px; color: var(--text-mid); }
.privacy-content p, .privacy-content li { color: var(--text-mid); line-height: 1.85; font-size: 0.93rem; }
.privacy-content ul { padding-left: 22px; margin: 10px 0; }
.privacy-content li { margin-bottom: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 0.9rem; margin-bottom: 28px; text-decoration: none; }
.back-link:hover { color: var(--primary-dark); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 1.7rem; }

    .blog-grid, .project-grid {
        grid-template-columns: 1fr;
    }

    .nav-links { display: none; }
    .nav-toggle { display: block; }

    .hero { min-height: 80vh; }
    .section { padding: 60px 0; }
    .about-intro { text-align: left; }
}
