/* =========================
   Reset & Base
========================= */

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0e0e11;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    touch-action: pan-y;
}

/* =========================
   App Layout
========================= */

.app {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.app-content {
    flex: 1;
    display: flex;
}

/* =========================
   Left / Right
========================= */

.left {
    width: 45%;
    padding: 72px 64px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    justify-content: center;
    will-change: transform, opacity;
}

.left>* {
    opacity: 0;
    transform: translateY(8px);
}

.left.spread {
    justify-content: space-between;
}

.right {
    width: 55dvw;
    position: relative;
    overflow: hidden;
    background: #0b0c10;
}

/* =========================
   Status
========================= */

.status {
    position: fixed;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    font-size: 13px;
    letter-spacing: 0.14em;
    opacity: 0.45;
    pointer-events: none;
    z-index: 10;
}

/* =========================
   Typography
========================= */

.hero-title h1 {
    font-size: 40px;
    font-weight: 600;
}

.hero-desc {
    font-size: 18px;
    line-height: 1.7;
    opacity: 0.85;
}

.section h2 {
    font-size: 28px;
    font-weight: 600;
}

.section p {
    font-size: 16px;
    line-height: 1.7;
    opacity: 0.85;
}

/* =========================
   Avatar
========================= */

.avatar-section {
    display: flex;
    align-items: center;
    gap: 24px;
}

.avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.12);
}

/* =========================
   Project List
========================= */

.projects li {
    list-style: none;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 16px;
    opacity: 0.75;
    transition: opacity 0.25s ease;
}

.projects li:hover {
    opacity: 1;
}

/* =========================
   Contact
========================= */

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    cursor: pointer;
    transition: background 0.25s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.contact-item p {
    font-size: 14px;
    opacity: 0.8;
}

/* =========================
   Visual / Canvas
========================= */

.visual {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

#heroCanvas {
    transition: opacity 0.6s ease;
}

.project-image {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.project-image.active {
    opacity: 1;
}

/* =========================
   Footer & Hint
========================= */

footer {
    margin-top: auto;
    font-size: 13px;
    opacity: 0.4;
}

.hint {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    opacity: 0.4;
}

/* =========================
   Back Hint
========================= */

.back-hint {
    margin-top: 32px;
    font-size: 13px;
    opacity: 0.45;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.back-hint:hover {
    opacity: 0.75;
}

/* =========================
   📱 移动端 / 小屏适配
========================= */

/* ≤ 1024px（小笔记本 / iPad 横屏） */
@media (max-width: 1024px) {
    .left {
        padding: 56px 48px;
        gap: 28px;
    }

    .hero-title h1 {
        font-size: 32px;
        /* 缩小一点 */
    }

    .hero-desc {
        font-size: 15px;
    }

    .section h2 {
        font-size: 22px;
    }
}

/* ≤ 768px（平板 / 手机横屏） */
@media (max-width: 768px) {
    .left {
        padding: 40px 32px;
        gap: 24px;
    }

    .hero-title h1 {
        font-size: 26px;
        /* 更小 */
    }

    .hero-desc {
        font-size: 14px;
    }

    .section h2 {
        font-size: 20px;
    }

    .projects li {
        font-size: 13px;
    }

    .contact-item p {
        font-size: 12px;
    }

    .hint {
        font-size: 11px;
    }
}

/* ≤ 480px（极小屏 / 窄横屏） */
@media (max-width: 480px) {
    .left {
        padding: 28px 20px;
    }

    .hero-title h1 {
        font-size: 20px;
        /* 最小 */
    }

    .hero-desc {
        font-size: 13px;
    }

    .section h2 {
        font-size: 18px;
    }

    footer {
        font-size: 11px;
    }
}