:root {
    --bg: #fff8ef;
    --panel: #fffdf7;
    --text: #2b2a35;
    --muted: #6a667a;
    --peach: #ffb88c;
    --mint: #8fd3b0;
    --coral: #ff7b78;
    --line: #f1d9c9;
    --shadow: 0 16px 36px rgba(59, 42, 31, 0.12);
}

* {
    box-sizing: border-box;
}

body#mainPage {
    margin: 0;
    color: var(--text);
    font-family: "M PLUS Rounded 1c", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 14% 10%, rgba(255, 184, 140, 0.38) 0, rgba(255, 184, 140, 0) 42%),
        radial-gradient(circle at 92% 24%, rgba(143, 211, 176, 0.35) 0, rgba(143, 211, 176, 0) 40%),
        linear-gradient(180deg, #fffaf2 0%, #fff7ee 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.container {
    width: min(960px, calc(100% - 2rem));
    margin: 0 auto;
}

.bg-shape {
    position: fixed;
    border-radius: 999px;
    filter: blur(2px);
    z-index: -1;
    pointer-events: none;
}

.shape-a {
    width: 280px;
    height: 280px;
    left: -90px;
    top: 60px;
    background: rgba(255, 123, 120, 0.2);
}

.shape-b {
    width: 220px;
    height: 220px;
    right: -80px;
    top: 380px;
    background: rgba(143, 211, 176, 0.25);
}

.hero {
    padding: 3rem 0 1rem;
    animation: fade-up 0.7s ease-out both;
}

.tag {
    margin: 0;
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 184, 140, 0.32);
    color: #9b3f2f;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#PageTitle {
    margin: 0.8rem 0 0.6rem;
    font-family: "ZCOOL XiaoWei", serif;
    font-size: clamp(2rem, 5.2vw, 3rem);
    line-height: 1.15;
}

.subtitle {
    margin: 0;
    max-width: 680px;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.8;
}

.card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 248, 240, 0.98));
    box-shadow: var(--shadow);
    margin: 1.2rem 0;
    padding: 1.4rem;
    animation: fade-up 0.7s ease-out both;
}

.about-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.4rem;
    align-items: center;
}

#Avatar {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 22px;
    border: 4px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 18px rgba(78, 57, 44, 0.2);
}

h2 {
    margin: 0 0 0.55rem;
    font-size: 1.35rem;
}

p {
    line-height: 1.85;
}

.link-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}

#GithubLink,
#GiteeLink {
    text-decoration: none;
    color: #183442;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(24, 52, 66, 0.18);
    background: rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#GithubLink:hover,
#GiteeLink:hover {
    transform: translateY(-2px);
    background: #ffffff;
}

.timeline ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.maker-card > p {
    margin: 0.2rem 0 0;
    color: #534b5f;
}

.maker-subtitle {
    margin: 1.1rem 0 0.55rem;
    font-size: 1.06rem;
    color: #743544;
}

.maker-list {
    margin: 0;
    padding-left: 1.1rem;
    color: #544e63;
}

.maker-list li {
    margin: 0.35rem 0;
    line-height: 1.75;
}

.maker-note {
    margin: 0.85rem 0 0;
    padding: 0.7rem 0.85rem;
    border-left: 3px solid rgba(122, 48, 65, 0.45);
    background: rgba(255, 255, 255, 0.58);
    border-radius: 10px;
}

.maker-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.maker-grid article {
    padding: 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(122, 48, 65, 0.18);
    background: rgba(255, 255, 255, 0.7);
}

.maker-grid h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: #7a3041;
}

.maker-grid p {
    margin: 0;
    color: #544e63;
    line-height: 1.75;
}

.timeline li {
    position: relative;
    padding: 0.2rem 0 0.8rem 1.1rem;
    border-left: 2px dashed #f2ba9e;
}

.timeline li:last-child {
    padding-bottom: 0;
}

.timeline li::before {
    content: "";
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 50%;
    background: linear-gradient(120deg, var(--coral), var(--peach));
    position: absolute;
    left: -0.38rem;
    top: 0.35rem;
}

.timeline span {
    display: inline-block;
    font-weight: 800;
    font-size: 0.92rem;
    color: #83433e;
    margin-bottom: 0.25rem;
}

.timeline p {
    margin: 0;
    color: #544e63;
}

.note-link {
    display: inline-block;
    margin-top: 0.5rem;
    text-decoration: none;
    color: #7a3041;
    font-weight: 700;
    padding: 0.38rem 0.78rem;
    border-radius: 999px;
    background: rgba(255, 184, 140, 0.35);
    border: 1px solid rgba(122, 48, 65, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.note-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 184, 140, 0.55);
}

.lesson-page main {
    padding-bottom: 1.5rem;
}

.lesson-meta {
    margin: 0.8rem 0 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.lesson-content h3 {
    margin: 0 0 0.6rem;
    font-size: 1.12rem;
}

.lesson-content p {
    margin: 0;
}

.hackathon-timeline {
    display: grid;
    gap: 1rem;
}

.timeline-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding-top: 4.1rem;
}

.timeline-track::before {
    content: "";
    position: absolute;
    left: 7%;
    right: 7%;
    top: 2.25rem;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--coral), var(--peach), var(--mint));
}

.timeline-block {
    position: relative;
    min-height: 13rem;
    padding: 1.05rem;
    border: 1px solid rgba(122, 48, 65, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 8px 18px rgba(70, 47, 35, 0.08);
}

.timeline-block::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -1.85rem;
    width: 2px;
    height: 1.85rem;
    background: #f2ba9e;
    transform: translateX(-50%);
}

.timeline-block::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -2.25rem;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    background: linear-gradient(120deg, var(--coral), var(--peach));
    border: 4px solid #fffdf7;
    box-shadow: 0 0 0 1px rgba(122, 48, 65, 0.22);
    transform: translateX(-50%);
}

.time-label {
    position: absolute;
    left: 50%;
    top: -4.05rem;
    min-width: 5.8rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 184, 140, 0.42);
    color: #83433e;
    font-weight: 800;
    text-align: center;
    transform: translateX(-50%);
}

.timeline-block p + p {
    margin-top: 0.45rem;
}

.code-block {
    margin: 0.75rem 0 0;
    padding: 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(56, 54, 65, 0.18);
    background: #fffdf9;
    color: #2f2d39;
    overflow-x: auto;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.6;
}

.code-block code {
    white-space: pre;
}

.lesson-gallery {
    display: grid;
    gap: 1rem;
}

.lesson-gallery > div {
    margin: 0;
}

.lesson-photo {
    display: block;
    width: min(100%, 640px);
    max-height: 420px;
    margin: 0 auto;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(122, 48, 65, 0.18);
    box-shadow: 0 10px 22px rgba(70, 47, 35, 0.14);
    background: #fff;
    padding: 0.3rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.lesson-photo:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(70, 47, 35, 0.18);
}

.diagram-photo {
    object-fit: contain;
}

.footer {
    padding: 0.9rem 0 2.1rem;
    color: #6d6779;
    text-align: center;
    font-size: 0.95rem;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 780px) {
    .hero {
        padding-top: 2rem;
    }

    .about-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: left;
    }

    #Avatar {
        max-width: 170px;
    }

    .maker-grid {
        grid-template-columns: 1fr;
    }

    .lesson-photo {
        width: 100%;
        max-height: 300px;
    }

    .timeline-track {
        grid-template-columns: 1fr;
        gap: 3.8rem;
        padding-top: 4.1rem;
    }

    .timeline-track::before {
        left: 50%;
        right: auto;
        top: 1.9rem;
        bottom: 0;
        width: 4px;
        height: auto;
        transform: translateX(-50%);
        background: linear-gradient(180deg, var(--coral), var(--peach), var(--mint));
    }

    .timeline-block {
        min-height: auto;
    }
}
