/* 孟菲斯风格个人作品集 - 充满童趣与艺术感 */

@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    /* 孟菲斯核心色板 */
    --purple: #8B5CF6;
    --purple-dark: #7C3AED;
    --purple-light: #A78BFA;
    --orange: #F97316;
    --orange-light: #FB923C;
    --yellow: #FDE047;
    --yellow-dark: #FACC15;
    --black: #1a1a2e;
    --white: #FFFFFF;
    --cream: #FEF9E7;
    --pink: #F472B6;
    --cyan: #22D3EE;
    --lime: #A3E635;
    
    /* 功能色 */
    --bg-primary: var(--cream);
    --text-primary: var(--black);
    --text-secondary: #4a4a6a;
    --accent: var(--purple);
    
    /* 字体 */
    --font-hand: 'Indie Flower', cursive;
    --font-body: 'Nunito', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== 孟菲斯装饰元素 ===== */
.memphis-dot {
    position: absolute;
    border-radius: 50%;
    background: var(--purple);
}

.memphis-line {
    position: absolute;
    height: 4px;
    background: var(--black);
    transform: rotate(-15deg);
}

.memphis-zigzag {
    position: absolute;
    width: 60px;
    height: 20px;
    background: linear-gradient(135deg, var(--orange) 25%, transparent 25%) -10px 0,
                linear-gradient(225deg, var(--orange) 25%, transparent 25%) -10px 0;
    background-size: 20px 20px;
}

.memphis-circle {
    position: absolute;
    border: 4px solid var(--black);
    border-radius: 50%;
}

.memphis-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.wiggle {
    animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.bounce-gentle {
    animation: bounceGentle 2s ease-in-out infinite;
}

@keyframes bounceGentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(2deg); }
    66% { transform: translate(-5px, 5px) rotate(-1deg); }
}

/* ===== 几何角色样式 ===== */
.character {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.character:hover {
    transform: scale(1.1) rotate(-5deg);
}

/* 紫色高个 - Tall Purple */
.character-purple {
    width: 60px;
    height: 100px;
}

.character-purple .body {
    width: 100%;
    height: 100%;
    background: var(--purple);
    border: 3px solid var(--black);
    border-radius: 30px;
    position: relative;
    transition: all 0.3s ease;
}

.character-purple .face {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 30px;
}

.character-purple .eye {
    position: absolute;
    width: 10px;
    height: 14px;
    background: var(--black);
    border-radius: 50%;
    top: 0;
    transition: all 0.3s ease;
}

.character-purple .eye.left { left: 5px; }
.character-purple .eye.right { right: 5px; }

.character-purple .mouth {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    border: 3px solid var(--black);
    border-top: none;
    border-radius: 0 0 20px 20px;
    transition: all 0.3s ease;
}

.character-purple:hover .eye {
    height: 4px;
    border-radius: 2px;
    top: 5px;
}

.character-purple:hover .mouth {
    height: 15px;
    width: 25px;
    background: var(--black);
}

/* 橙色圆滚滚 - Chubby Orange */
.character-orange {
    width: 90px;
    height: 80px;
}

.character-orange .body {
    width: 100%;
    height: 100%;
    background: var(--orange);
    border: 3px solid var(--black);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.character-orange .face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 40px;
}

.character-orange .eye {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--black);
    border-radius: 50%;
    top: 5px;
    transition: all 0.3s ease;
}

.character-orange .eye.left { left: 10px; }
.character-orange .eye.right { right: 10px; }

.character-orange .blush {
    position: absolute;
    width: 15px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    top: 20px;
}

.character-orange .blush.left { left: 5px; }
.character-orange .blush.right { right: 5px; }

.character-orange .mouth {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background: var(--black);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.character-orange:hover .body {
    transform: scale(1.05, 0.95);
}

.character-orange:hover .mouth {
    width: 25px;
    height: 12px;
    border-radius: 0 0 15px 15px;
    background: transparent;
    border: 3px solid var(--black);
    border-top: none;
}

/* 黑色小酷哥 - Cool Black */
.character-black {
    width: 70px;
    height: 70px;
}

.character-black .body {
    width: 100%;
    height: 100%;
    background: var(--black);
    border: 3px solid var(--black);
    border-radius: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.character-black .face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 35px;
}

.character-black .eye {
    position: absolute;
    width: 14px;
    height: 6px;
    background: var(--white);
    border-radius: 2px;
    top: 10px;
    transition: all 0.3s ease;
}

.character-black .eye.left { left: 5px; }
.character-black .eye.right { right: 5px; }

.character-black .mouth {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--white);
    transition: all 0.3s ease;
}

.character-black .sunglasses {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.character-black .sunglasses::before,
.character-black .sunglasses::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 15px;
    background: var(--purple);
    border: 2px solid var(--white);
    border-radius: 5px;
}

.character-black .sunglasses::before { left: 0; }
.character-black .sunglasses::after { right: 0; }

.character-black:hover .sunglasses {
    opacity: 1;
}

.character-black:hover .mouth {
    width: 15px;
    height: 15px;
    background: transparent;
    border: 3px solid var(--white);
    border-radius: 50%;
}

/* 黄色呆脸 - Silly Yellow */
.character-yellow {
    width: 80px;
    height: 75px;
}

.character-yellow .body {
    width: 100%;
    height: 100%;
    background: var(--yellow);
    border: 3px solid var(--black);
    border-radius: 40% 60% 50% 50%;
    position: relative;
    transition: all 0.3s ease;
}

.character-yellow .face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 40px;
}

.character-yellow .eye {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--black);
    border-radius: 50%;
    top: 8px;
    transition: all 0.3s ease;
}

.character-yellow .eye.left { 
    left: 10px;
    transform: translateY(-3px);
}

.character-yellow .eye.right { 
    right: 10px;
    transform: translateY(3px);
}

.character-yellow .mouth {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 15px;
    border: 3px solid var(--black);
    border-top: none;
    border-radius: 0 0 30px 30px;
    transition: all 0.3s ease;
}

.character-yellow:hover .body {
    border-radius: 60% 40% 60% 40%;
}

.character-yellow:hover .eye.left {
    transform: translateY(3px);
}

.character-yellow:hover .eye.right {
    transform: translateY(-3px);
}

.character-yellow:hover .mouth {
    border-radius: 30px 30px 0 0;
    border-top: 3px solid var(--black);
    border-bottom: none;
    height: 12px;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(254, 249, 231, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--black);
}

.navbar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-characters {
    display: flex;
    align-items: flex-end;
    gap: -5px;
}

.logo-characters .character {
    transform: scale(0.6);
    margin-right: -20px;
}

.logo-characters .character:hover {
    transform: scale(0.7) rotate(-5deg);
    z-index: 10;
}

.logo-text {
    font-family: var(--font-hand);
    font-size: 2rem;
    color: var(--black);
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--orange);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--purple);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ===== 主内容区 ===== */
main {
    padding-top: 90px;
}

/* ===== Hero区 ===== */
.hero {
    min-height: calc(100vh - 90px);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--bg-primary);
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-shape {
    position: absolute;
    transition: transform 0.5s ease-out;
}

.shape-purple-tall {
    width: 80px;
    height: 200px;
    background: var(--purple);
    border: 4px solid var(--black);
    border-radius: 40px;
    left: 5%;
    top: 20%;
    animation: float 4s ease-in-out infinite;
}

.shape-orange-round {
    width: 150px;
    height: 130px;
    background: var(--orange);
    border: 4px solid var(--black);
    border-radius: 50%;
    right: 10%;
    top: 15%;
    animation: float 5s ease-in-out infinite 0.5s;
}

.shape-black-square {
    width: 100px;
    height: 100px;
    background: var(--black);
    border-radius: 20px;
    left: 15%;
    bottom: 20%;
    animation: float 3.5s ease-in-out infinite 1s;
}

.shape-yellow-blob {
    width: 120px;
    height: 100px;
    background: var(--yellow);
    border: 4px solid var(--black);
    border-radius: 40% 60% 50% 50%;
    right: 5%;
    bottom: 15%;
    animation: float 4.5s ease-in-out infinite 1.5s;
}

.shape-pink-triangle {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid var(--pink);
    left: 25%;
    top: 10%;
    animation: wiggle 3s ease-in-out infinite;
}

.shape-cyan-circle {
    width: 80px;
    height: 80px;
    background: var(--cyan);
    border: 4px solid var(--black);
    border-radius: 50%;
    right: 25%;
    bottom: 25%;
    animation: bounce-gentle 2s ease-in-out infinite;
}

.shape-lime-zigzag {
    width: 100px;
    height: 40px;
    background: repeating-linear-gradient(
        45deg,
        var(--lime),
        var(--lime) 10px,
        transparent 10px,
        transparent 20px
    );
    border: 4px solid var(--black);
    left: 8%;
    top: 60%;
    transform: rotate(-15deg);
}

.hero .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-left {
    position: relative;
}

.hero-greeting {
    font-family: var(--font-hand);
    font-size: 2rem;
    color: var(--orange);
    margin-bottom: 1rem;
    transform: rotate(-5deg);
    display: inline-block;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--black);
}

.hero-title span {
    display: block;
}

.hero-title .highlight {
    color: var(--purple);
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: -5px;
    right: -5px;
    height: 20px;
    background: var(--yellow);
    z-index: -1;
    transform: rotate(-2deg);
}

.hero-right {
    position: relative;
}

.manifesto-card {
    background: var(--white);
    border: 4px solid var(--black);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    transform: rotate(3deg);
    box-shadow: 8px 8px 0 var(--black);
    transition: transform 0.3s ease;
}

.manifesto-card:hover {
    transform: rotate(0deg) translate(-5px, -5px);
    box-shadow: 12px 12px 0 var(--black);
}

.manifesto-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: var(--font-hand);
    font-size: 6rem;
    color: var(--yellow);
    line-height: 1;
}

.manifesto-text {
    font-family: var(--font-hand);
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.manifesto-signature {
    font-family: var(--font-hand);
    font-size: 1.3rem;
    color: var(--purple);
    text-align: right;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.btn-memphis {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    border: 4px solid var(--black);
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.btn-memphis-primary {
    background: var(--orange);
    color: var(--white);
    box-shadow: 4px 4px 0 var(--black);
}

.btn-memphis-primary:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 var(--black);
    background: var(--purple);
}

.btn-memphis-secondary {
    background: var(--white);
    color: var(--black);
    box-shadow: 4px 4px 0 var(--black);
}

.btn-memphis-secondary:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 var(--black);
    background: var(--yellow);
}

/* ===== 作品区 ===== */
.portfolio-section {
    padding: 8rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    font-family: var(--font-hand);
    font-size: 1.5rem;
    color: var(--orange);
    margin-bottom: 1rem;
    transform: rotate(-3deg);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--black);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: -10px;
    right: -10px;
    height: 15px;
    background: var(--cyan);
    z-index: -1;
    opacity: 0.5;
    transform: rotate(-1deg);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.work-card-memphis {
    background: var(--white);
    border: 4px solid var(--black);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.work-card-memphis:hover {
    transform: translateY(-10px) rotate(-2deg);
    box-shadow: 12px 12px 0 var(--black);
}

.work-card-memphis .card-decoration {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.work-card-memphis .deco-triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid var(--purple);
    top: -10px;
    right: 20px;
    transform: rotate(15deg);
}

.work-card-memphis .deco-circle {
    width: 40px;
    height: 40px;
    background: var(--yellow);
    border: 3px solid var(--black);
    border-radius: 50%;
    bottom: 20px;
    left: -15px;
}

.work-card-memphis .deco-zigzag {
    width: 60px;
    height: 20px;
    background: repeating-linear-gradient(
        45deg,
        var(--pink),
        var(--pink) 8px,
        transparent 8px,
        transparent 16px
    );
    top: 50%;
    right: -10px;
    transform: rotate(90deg);
}

.work-image-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-bottom: 4px solid var(--black);
}

.work-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card-memphis:hover .work-image {
    transform: scale(1.1);
}

.work-content {
    padding: 1.5rem;
    position: relative;
}

.work-category {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: var(--lime);
    border: 2px solid var(--black);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.work-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.work-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 角色探头动效 */
.work-card-memphis .character-peek {
    position: absolute;
    bottom: -60px;
    right: 20px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10;
}

.work-card-memphis:hover .character-peek {
    bottom: 20px;
}

.work-card-memphis .character-peek .character {
    transform: scale(0.8);
}

/* ===== Footer ===== */
footer {
    background: var(--black);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: repeating-linear-gradient(
        45deg,
        var(--purple),
        var(--purple) 20px,
        var(--orange) 20px,
        var(--orange) 40px,
        var(--yellow) 40px,
        var(--yellow) 60px
    );
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-characters {
    display: flex;
    align-items: flex-end;
    gap: -10px;
}

.footer-characters .character {
    transform: scale(0.5);
    margin-right: -30px;
}

.footer-text {
    font-family: var(--font-hand);
    font-size: 1.3rem;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--white);
    border: 4px solid var(--black);
    border-radius: 15px;
    font-weight: 700;
    z-index: 9999;
    transform: translateX(150%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 8px 8px 0 var(--black);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: var(--lime);
}

.toast.error {
    background: var(--pink);
    color: var(--white);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-greeting {
        transform: rotate(-3deg);
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .manifesto-card {
        transform: rotate(0deg);
        max-width: 500px;
        margin: 0 auto;
    }
    
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar .container {
        height: 80px;
        padding: 0 1rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .nav-links a {
        font-size: 1rem;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .hero-shape {
        transform: scale(0.6);
        opacity: 0.6;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}

/* ===== 不规则装饰线 ===== */
.squiggle {
    position: absolute;
    width: 100px;
    height: 20px;
    background: transparent;
}

.squiggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--orange);
    border-radius: 2px;
    transform: rotate(-5deg);
    box-shadow: 0 10px 0 var(--purple), 0 20px 0 var(--yellow);
}

/* 手绘风格边框 */
.hand-drawn-border {
    border: 3px solid var(--black);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}
