:root {
    --bg: #0f172a;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-border: rgba(255, 255, 255, 0.45);
    --text-main: #0f172a;
    --text-sub: #475569;
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
}

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

body {
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, #2563eb 0%, transparent 40%),
        radial-gradient(circle at bottom right, #9333ea 0%, transparent 45%),
        var(--bg);
    min-height: 100vh;
    line-height: 1.7;
    padding: 40px 20px;
}

.page-shell {
    max-width: 1080px;
    margin: 0 auto;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 28px;
    align-items: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.6) 0%, rgba(124, 58, 237, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    margin-bottom: 24px;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 22px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.hero-content h1 {
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.tagline {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 8px;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.hero-meta .sep {
    opacity: 0.4;
    font-size: 0.8rem;
}

.hero-meta a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
}

.hero-meta a:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.block + .block {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #e2e8f0;
}

h2 {
    font-size: 1.03rem;
    color: #1d4ed8;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

h2::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    flex-shrink: 0;
}

p {
    color: var(--text-sub);
}

/* Skills */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-item {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 0.82rem;
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: default;
}

.skill-item:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Contact */
.contact-list {
    list-style: none;
    display: grid;
    gap: 14px;
}

.contact-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s ease;
}

.contact-list li:hover {
    border-color: #bfdbfe;
}

.contact-list strong {
    font-size: 0.78rem;
    color: #64748b;
    letter-spacing: 0.03em;
}

.contact-list a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.92rem;
}

.contact-list a:hover {
    color: var(--primary);
}

/* Education */
.edu-item {
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.edu-header strong {
    color: #0f172a;
    font-size: 0.95rem;
}

.edu-time {
    font-size: 0.78rem;
    color: #94a3b8;
}

.edu-major {
    font-size: 0.88rem;
    color: #64748b;
}

/* Certificates */
.cert-list {
    list-style: none;
    display: grid;
    gap: 8px;
}

.cert-list li {
    padding: 8px 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.88rem;
    color: #334155;
}

/* Summary */
.summary {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #334155;
}

/* Right content */
.right-content {
    display: grid;
    gap: 24px;
}

/* Projects */
.right-content > .panel > h2 {
    margin-bottom: 16px;
}

.project {
    padding: 18px 20px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}

.project:last-child {
    margin-bottom: 0;
}

.project:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.project h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.project h3 a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.project h3 a:hover {
    color: var(--primary);
}

.tech-stack {
    display: inline-block;
    background: #eff6ff;
    color: #1e40af;
    border-radius: 8px;
    padding: 3px 9px;
    font-size: 0.75rem;
    margin-bottom: 7px;
}

/* Project head */
.project-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 12px;
}

.project-head h3 {
    margin-bottom: 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 24px 0 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        padding: 20px 14px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 22px;
    }

    .avatar {
        margin: 0 auto;
    }

    .hero-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
}
