/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #2563eb; --primary-dark: #1d4ed8; --secondary: #0f172a;
    --text: #334155; --text-light: #94a3b8; --bg: #ffffff; --bg-soft: #f8fafc;
    --border: #e2e8f0; --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
    --radius: 12px;
    --java: #ed8b00; --python: #3776ab; --go: #00add8; --vue: #42b883;
    --max-w: 1080px;
}
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif; color: var(--text); line-height: 1.7; background: var(--bg-soft); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== Header / Nav ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.2rem; font-weight: 700; color: var(--secondary); }
.main-nav ul { display: flex; gap: 8px; }
.main-nav a { padding: 8px 16px; border-radius: 8px; font-size: .9rem; font-weight: 500; color: var(--text); transition: background .2s, color .2s; }
.main-nav a:hover, .main-nav a.active { background: var(--primary); color: #fff; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--secondary); }
@media (max-width: 640px) {
    .menu-toggle { display: block; }
    .main-nav ul { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 12px; }
    .main-nav ul.open { display: flex; }
}

/* ===== Hero ===== */
.hero-section { background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); color: #fff; padding: 80px 0 60px; }
.profile-card { text-align: center; max-width: 640px; margin: 0 auto; }

.site-title { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.bio { font-size: 1.05rem; opacity: .9; line-height: 1.8; margin-bottom: 24px; }
.tech-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tag { background: rgba(255,255,255,.2); padding: 4px 14px; border-radius: 20px; font-size: .85rem; font-weight: 600; }

/* ===== Sections ===== */
.intro-section { padding: 60px 0 40px; text-align: center; }
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--secondary); margin-bottom: 12px; }
.section-desc { max-width: 720px; margin: 0 auto; color: var(--text-light); font-size: .95rem; }
.topics-section { padding: 20px 0 60px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.topic-card { background: #fff; border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.topic-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.card-icon { width: 48px; height: 48px; border-radius: 12px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; margin-bottom: 16px; }
.java-color  { background: var(--java); }
.python-color { background: var(--python); }
.go-color    { background: var(--go); }
.vue-color   { background: var(--vue); }
.topic-card h3 { font-size: 1.1rem; color: var(--secondary); margin-bottom: 8px; }
.topic-card p { font-size: .88rem; color: var(--text-light); }

/* ===== Content Pages ===== */
.page-hero { padding: 60px 0 40px; color: #fff; text-align: center; }
.lang-java   { background: linear-gradient(135deg, #ed8b00 0%, #c2410c 100%); }
.lang-python { background: linear-gradient(135deg, #3776ab 0%, #ffd43b 100%); }
.lang-go     { background: linear-gradient(135deg, #00add8 0%, #0ea5e9 100%); }
.lang-vue    { background: linear-gradient(135deg, #42b883 0%, #35495e 100%); }
.page-title { font-size: 2.2rem; font-weight: 800; }
.page-subtitle { font-size: 1rem; opacity: .9; margin-top: 8px; }
.content-body { background: #fff; max-width: 820px; margin: -40px auto 60px; border-radius: var(--radius); padding: 48px 40px; box-shadow: var(--shadow); position: relative; }
.content-body h2 { font-size: 1.3rem; color: var(--secondary); margin: 32px 0 12px; padding-left: 12px; border-left: 4px solid var(--primary); }
.content-body p { margin-bottom: 14px; font-size: .95rem; }
.content-body ul, .content-body ol { padding-left: 24px; margin-bottom: 14px; }
.content-body li { margin-bottom: 6px; font-size: .93rem; }
.content-body code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .88em; font-family: "Fira Code", Consolas, monospace; }
.code-block { background: var(--secondary); color: #e2e8f0; border-radius: 8px; padding: 20px 24px; overflow-x: auto; font-family: "Fira Code", Consolas, monospace; font-size: .85rem; line-height: 1.6; margin: 16px 0 20px; }
.highlight-table { width: 100%; border-collapse: collapse; margin: 16px 0 20px; font-size: .9rem; }
.highlight-table th, .highlight-table td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.highlight-table th { background: var(--bg-soft); font-weight: 600; color: var(--secondary); }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 20px; }
.feature-item { display: flex; align-items: start; gap: 10px; background: var(--bg-soft); border-radius: 8px; padding: 14px; font-size: .9rem; }
.feature-check { color: var(--vue); font-weight: 700; flex-shrink: 0; }
@media (max-width: 640px) {
    .feature-list { grid-template-columns: 1fr; }
    .content-body { padding: 28px 20px; margin: -20px 12px 40px; }
    .site-title { font-size: 1.5rem; }
}

/* ===== Footer ===== */
.site-footer { background: var(--secondary); color: #94a3b8; padding: 40px 0; text-align: center; font-size: .85rem; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.footer-links a { color: #cbd5e1; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-note { margin-top: 8px; }
.beian { margin-top: 8px; }
.beian a { color: #94a3b8; text-decoration: none; transition: color .2s; }
.beian a:hover { color: #cbd5e1; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 20px; color: var(--primary); font-size: .9rem; font-weight: 500; }
.back-link:hover { text-decoration: underline; }
