/* ========== Reset & Base ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: #1a1a2e;
    background: #f8f9fc;
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #4f46e5;
    letter-spacing: -0.5px;
}

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

.nav-links a {
    font-size: 0.9rem;
    color: #555;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #4f46e5;
}

/* ========== Hero ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 100px 24px 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
}

.hero-greeting {
    font-size: 1.05rem;
    color: #4f46e5;
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.15rem;
    color: #444;
    margin-bottom: 10px;
}

.hero-desc {
    font-size: 0.95rem;
    color: #777;
    max-width: 420px;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 14px;
}

.btn {
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.25s;
    display: inline-block;
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-outline {
    border: 2px solid #4f46e5;
    color: #4f46e5;
}

.btn-outline:hover {
    background: #4f46e5;
    color: #fff;
    transform: translateY(-1px);
}

/* Avatar */
.hero-avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-size: 2.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.25);
}

/* ========== Section ========== */
.section {
    padding: 80px 24px;
}

.section-alt {
    background: #fff;
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    background: #4f46e5;
    border-radius: 2px;
    margin: 12px auto 0;
}

/* ========== About ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text p {
    color: #555;
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.about-stats {
    display: flex;
    gap: 24px;
    margin-top: 28px;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #4f46e5;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
}

/* Timeline */
.about-timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid #e0e0e0;
}

.timeline-item {
    margin-bottom: 24px;
    position: relative;
    padding-left: 20px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4f46e5;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #4f46e5;
}

.tl-year {
    display: block;
    font-size: 0.8rem;
    color: #4f46e5;
    font-weight: 600;
    margin-bottom: 2px;
}

.tl-role {
    font-size: 0.95rem;
    color: #444;
}

/* ========== Skills ========== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.skill-card {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.skill-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.skill-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.skill-card p {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.6;
}

/* ========== Projects ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #eee;
    transition: transform 0.25s, box-shadow 0.25s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

.project-icon {
    font-size: 1.6rem;
}

.project-links a {
    font-size: 0.8rem;
    margin-left: 10px;
    color: #888;
    font-weight: 600;
    transition: color 0.2s;
}

.project-links a:hover {
    color: #4f46e5;
}

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

.project-card p {
    font-size: 0.88rem;
    color: #666;
    margin-bottom: 14px;
    line-height: 1.6;
}

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

.project-tags span {
    font-size: 0.75rem;
    background: #f0f0ff;
    color: #4f46e5;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* ========== Contact ========== */
.contact-content {
    text-align: center;
}

.contact-content p {
    color: #666;
    margin-bottom: 24px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.contact-item {
    font-size: 0.95rem;
    color: #4f46e5;
    font-weight: 500;
    transition: opacity 0.2s;
}

.contact-item:hover {
    opacity: 0.7;
}

/* ========== Footer ========== */
.footer {
    text-align: center;
    padding: 28px 24px;
    font-size: 0.85rem;
    color: #aaa;
    border-top: 1px solid #eee;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        gap: 32px;
        text-align: center;
        padding-top: 80px;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .avatar-placeholder {
        width: 130px;
        height: 130px;
        font-size: 2rem;
    }

    .about-grid,
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}
