/* ===== Variables ===== */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: rgba(22, 27, 34, 0.95);
    --text-primary: #e6edf3;
    --text-secondary: #c9d1d9;
    --text-muted: #7d8590;
    --accent: #58a6ff;
    --accent-secondary: #a371f7;
    --accent-green: #3fb950;
    --accent-gradient: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
    --border: rgba(48, 54, 61, 0.8);
    --border-accent: rgba(88, 166, 255, 0.25);
    --glow: rgba(88, 166, 255, 0.12);
    --radius: 8px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
}

/* ===== Particles ===== */
#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ===== Glow Orbs ===== */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    z-index: 0;
    animation: float 25s ease-in-out infinite;
    pointer-events: none;
}
.orb-1 { width: 500px; height: 500px; background: rgba(88, 166, 255, 0.15); top: -150px; right: -150px; }
.orb-2 { width: 400px; height: 400px; background: rgba(163, 113, 247, 0.12); bottom: 10%; left: -100px; animation-delay: -10s; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== App ===== */
#app { position: relative; z-index: 1; }

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2.5rem;
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}
.nav-brand { font-weight: 600; font-size: 1rem; color: var(--accent); font-family: 'SF Mono', monospace; }
.nav-links { display: flex; gap: 1.8rem; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 5rem 1.5rem 2rem;
}
.hero-content { animation: fadeUp 0.8s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }

.avatar-container { position: relative; width: 110px; height: 110px; margin: 0 auto 1.5rem; }
.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--accent-gradient);
    animation: spin 12s linear infinite;
    opacity: 0.5;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-ring::before { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: var(--bg-primary); }
.avatar { position: relative; width: 102px; height: 102px; border-radius: 50%; object-fit: cover; z-index: 1; }

.title { font-size: 2rem; font-weight: 600; margin-bottom: 0.5rem; min-height: 2.5rem; }
.title-text { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cursor { -webkit-text-fill-color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.subtitle { color: var(--text-secondary); font-size: 1rem; margin-bottom: 0.6rem; letter-spacing: 0.5px; }
.bio { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; max-width: 480px; line-height: 1.7; }

/* ===== Social Links 居中 ===== */
.social-links { display: flex; justify-content: center; gap: 0.85rem; }
.social-link {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.25s;
}
.social-link:hover { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); transform: translateY(-2px); }

/* ===== Main ===== */
.main-content { max-width: 960px; margin: 0 auto; padding: 1.5rem; }

/* ===== Section ===== */
.section { margin-bottom: 3rem; opacity: 0; transform: translateY(20px); transition: all 0.6s ease-out; }
.section.visible { opacity: 1; transform: translateY(0); }
.section-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.25rem; }
.section-header i { color: var(--accent); font-size: 1.2rem; }
.section-header h2 { font-size: 1.15rem; font-weight: 600; color: var(--text-primary); }
.section-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-accent), transparent); }

/* ===== About ===== */
.about-intro { margin-bottom: 1.25rem; }
.about-intro p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin-bottom: 1.25rem; }
.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: all 0.25s;
}
.about-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.about-icon { color: var(--accent); font-size: 1.35rem; margin-bottom: 0.5rem; }
.about-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.35rem; }
.about-card p { color: var(--text-muted); font-size: 0.82rem; line-height: 1.6; }

.quote-box {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.06), rgba(163, 113, 247, 0.04));
    border-left: 3px solid var(--accent);
    padding: 0.85rem 1.1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}
.quote-box i { color: var(--accent); opacity: 0.4; font-size: 1.1rem; flex-shrink: 0; }

/* ===== Tech Stack ===== */
.tech-categories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.tech-category h3 { font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
.tech-category h3 i { color: var(--accent-secondary); font-size: 1rem; }
.tech-items { display: flex; flex-direction: column; gap: 0.6rem; }
.tech-item { display: grid; grid-template-columns: 130px 1fr 45px; align-items: center; gap: 0.8rem; }
.tech-name { font-size: 0.88rem; color: var(--text-primary); }
.tech-bar { height: 5px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.tech-progress { height: 100%; width: 0; background: var(--accent-gradient); border-radius: 3px; transition: width 0.8s ease-out; }
.tech-level { font-size: 0.75rem; color: var(--accent-green); text-align: right; font-weight: 500; }

/* ===== Projects ===== */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem;
    transition: all 0.25s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.project-header { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.55rem; }
.project-header i { color: var(--accent-secondary); font-size: 1.1rem; }
.project-header h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.project-desc { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 0.7rem; line-height: 1.65; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.7rem; }
.project-tags span {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    background: rgba(88, 166, 255, 0.12);
    border: 1px solid var(--border-accent);
    border-radius: 4px;
    color: var(--text-secondary);
}
.project-metrics { display: flex; gap: 1rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.metric { display: flex; flex-direction: column; }
.metric-value { font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.metric-label { font-size: 0.68rem; color: var(--text-muted); }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}
.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    transition: all 0.25s;
}
.timeline-content:hover { border-color: var(--border-accent); }
.timeline-date { font-size: 0.78rem; color: var(--accent); margin-bottom: 0.25rem; font-weight: 500; }
.timeline-content h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.2rem; }
.timeline-company { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.timeline-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* ===== Stats ===== */
.section-stats { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; text-align: center; }
.stat-item { padding: 0.6rem; }
.stat-number { font-size: 1.6rem; font-weight: 600; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ===== Poetry ===== */
.section-poetry { text-align: center; }
.poetry-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.poetry-box i { color: var(--accent-secondary); font-size: 1.1rem; opacity: 0.5; flex-shrink: 0; }
.poetry-box p { font-size: 0.92rem; color: var(--text-secondary); font-style: italic; }

/* ===== Links ===== */
.links-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.25s;
    text-align: center;
}
.link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.link-card i { color: var(--accent); font-size: 1.2rem; margin-bottom: 0.35rem; }
.link-card span { font-size: 0.88rem; color: var(--text-primary); font-weight: 500; }
.link-card p { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); margin-top: 2.5rem; padding: 2rem 1.5rem 1.5rem; }
.footer-content { display: flex; justify-content: space-between; max-width: 960px; margin: 0 auto 1.5rem; }
.footer-info h3 { font-size: 1rem; color: var(--accent); margin-bottom: 0.3rem; }
.footer-info p { font-size: 0.82rem; color: var(--text-muted); }
.footer-contact h4 { font-size: 0.88rem; margin-bottom: 0.5rem; color: var(--text-secondary); }
.contact-items { display: flex; gap: 1.2rem; }
.contact-items a { color: var(--text-muted); text-decoration: none; font-size: 0.82rem; display: flex; align-items: center; gap: 0.35rem; transition: color 0.2s; }
.contact-items a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 1rem; border-top: 1px solid var(--border); }
.copyright-main { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.copyright-sub { font-size: 0.72rem; color: var(--text-muted); display: flex; justify-content: center; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.copyright-sub .divider { opacity: 0.3; }
.copyright-sub a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.copyright-sub a:hover { color: var(--accent); }
.copyright-sub i { color: #f85149; font-size: 0.7rem; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .about-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-categories { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    html { font-size: 14px; }
    .navbar { padding: 0.7rem 1.2rem; }
    .nav-links { display: none; }
    .hero { padding-top: 4rem; }
    .title { font-size: 1.6rem; }
    .main-content { padding: 1.2rem; }
    .about-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .links-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
    .contact-items { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 480px) {
    html { font-size: 13px; }
    .avatar-container { width: 90px; height: 90px; }
    .avatar { width: 82px; height: 82px; }
    .links-grid { grid-template-columns: 1fr; }
    .tech-item { grid-template-columns: 110px 1fr 40px; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { display: none; }
html { scrollbar-width: none; -ms-overflow-style: none; }

/* ===== Selection ===== */
::selection { background: var(--accent); color: var(--bg-primary); }

/* ===== Focus ===== */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
