/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    /*-webkit-text-size-adjust: 100%;*/
    /*-ms-text-size-adjust: 100%;*/
}
*::-webkit-scrollbar {
  width: 0;  /* 垂直滚动条宽度设为0 */
  height: 0; /* 水平滚动条高度设为0 */
  display: none;
}

body {
    font-family: 'Inter', 'Noto Serif SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== 全局图片优化 ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ===== 美化滚动条 ===== */
/*::-webkit-scrollbar {*/
/*    width: 10px;*/
/*}*/

/*::-webkit-scrollbar-track {*/
/*    background: var(--bg-secondary);*/
/*}*/

/*::-webkit-scrollbar-thumb {*/
/*    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));*/
/*    border-radius: 10px;*/
/*    transition: var(--transition);*/
/*}*/

/*::-webkit-scrollbar-thumb:hover {*/
/*    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));*/
/*}*/

/* Firefox */
/** {*/
/*    -webkit-scrollbar:hidden;*/
/*    scrollbar-width: thin;*/
/*    scrollbar-color: var(--primary-color) var(--bg-secondary);*/
/*}*/

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-radius: 0 0 24px 24px;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 24px 24px;
}

.nav-logo {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 12px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.08);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 60%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

/* ===== 英雄区 ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    background-image: url('image/IMG_7838.JPG');
    background-size: cover;
    background-position: 70%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.5;
    filter: blur(0.8px);
    z-index: 0;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.65) 0%, rgba(118, 75, 162, 0.65) 100%);
    z-index: 1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #fa709a, #fee140);
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-family: 'Noto Serif SC', serif;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out forwards;
}

.title-line:nth-child(2) {
    animation-delay: 0.3s;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.6s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 0.9;
    }
}

.hero-arrow {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    animation: fadeIn 1s ease-out 1s forwards;
}

.hero-arrow:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%) translateY(5px);
}

.hero-arrow svg {
    animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

/* ===== 通用区块样式 ===== */
section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

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

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Noto Serif SC', serif;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 4px;
    position: relative;
}

.title-underline::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--secondary-color);
    border-radius: 50%;
}

/* ===== 关于我 ===== */
.about {
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('image/224c426c9805661c8bd7fc5cf1340423.JPG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.08;
    filter: blur(2px);
    z-index: 0;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

.about .container {
    position: relative;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
    line-height: 1.9;
}

.about-intro {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 500;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-wrapper {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(20px);
    animation: pulse-glow 3s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.5;
    }
}

.avatar-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 1;
    animation: float-avatar 6s ease-in-out infinite;
    max-width: 100%;
    max-height: 100%;
}

@keyframes float-avatar {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        scale: .8;
    }

    25% {
        transform: translateY(-10px) rotate(2deg);
        scale: .8;
    }

    75% {
        transform: translateY(10px) rotate(-2deg);
        scale: .8;
    }
}

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

.avatar-wrapper:hover .avatar-glow {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.2);
}

/* ===== 作品集 ===== */
.works {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('image/2535c7e387ec531acb64ab699c27a6a0.JPG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.06;
    filter: blur(3px);
    z-index: 0;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

.works .container {
    position: relative;
    z-index: 1;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.work-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.work-visual {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
    border-radius: 16px 16px 0 0;
    max-width: 100%;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-filter: 10px;
}
.work-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(290deg, rgb(234 102 102 / 0%) 0%, rgb(162 75 75 / 60%) 100%);
    z-index: 1;
}
.work-visual1{
     background: url('./image/IMG_1246.JPG') 50% 70% no-repeat;
    background-size: 100% auto;
}
.work-visual2{
     background: url('./image/IMG_1219.JPG') center no-repeat;
    background-size: cover;
}
.work-visual3{
     background: url('./image/IMG_0995.JPG') center no-repeat;
    background-size: 100% auto;
}

.work-icon {
    width: 80px;
    height: 80px;
    z-index: 2;
    position: relative;
    transition: var(--transition);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* React图标 - 原子结构 */
.work-icon-react {
    position: relative;
}

.work-icon-react::before,
.work-icon-react::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.work-icon-react::before {
    width: 60px;
    height: 60px;
}

.work-icon-react::after {
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%) rotate(60deg);
}

.work-icon-react {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95) 3px, transparent 3px),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.95) 3px, transparent 3px),
        radial-gradient(circle at 50% 70%, rgba(255, 255, 255, 0.95) 3px, transparent 3px);
    background-size: 100% 100%;
}

/* Vue图标 - V字形状 */
.work-icon-vue {
    position: relative;
}

.work-icon-vue::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 28px solid transparent;
    border-right: 28px solid transparent;
    border-bottom: 45px solid rgba(255, 255, 255, 0.95);
    transform: translateX(-50%);
}

.work-icon-vue::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-bottom: 38px solid rgba(255, 255, 255, 0.75);
    transform: translateX(-50%);
}

/* 博客图标 - 文档形状 */
.work-icon-blog {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    width: 60px;
    height: 75px;
}

.work-icon-blog::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 12px;
    right: 12px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.work-icon-blog::after {
    content: '';
    position: absolute;
    top: 30px;
    left: 12px;
    right: 20px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    opacity: 0.6;
}

.work-card:hover .work-icon {
    transform: scale(1.15) rotate(5deg);
}

.work-card:hover .work-icon-react::before,
.work-card:hover .work-icon-react::after {
    animation: rotateRing 3s linear infinite;
}

@keyframes rotateRing {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}


.work-card:hover .work-overlay {
    opacity: 1;
}

.work-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
}

.work-info {
    padding: 2rem;
    border-radius: 0 0 16px 16px;
}

.work-desc {
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

.work-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.work-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.work-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
}

.work-link:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.work-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.feature-item {
    padding: 0.4rem 1rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.work-card:hover .feature-item {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
}

/* ===== 项目亮点 ===== */
.highlights-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.highlights-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    position: relative;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 0;
}

.highlight-item {
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.highlight-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: var(--transition);
}

.highlight-item:hover::before {
    transform: scaleY(1);
}

.highlight-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.highlight-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1;
}

.highlight-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.highlight-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}


/* ===== 技能 ===== */
.skills {
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('image/IMG_1008.JPG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.07;
    filter: blur(2.5px);
    z-index: 0;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

.skills .container {
    position: relative;
    z-index: 1;
}

.skills-visual {
    margin-bottom: 5rem;
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.skills-image-wrapper {
    position: relative;
    max-width: 700px;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    margin: 0 auto;
}

.skills-image-wrapper:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.skills-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
    filter: brightness(0.95) saturate(0.9);
    border-radius: 28px;
    max-width: 100%;
    display: block;
}

.skills-image-wrapper:hover .skills-image {
    transform: scale(1.08);
    filter: brightness(1) saturate(1.1);
}

.skills-content {
    display: grid;
    gap: 2.5rem;
    margin-top: 2rem;
}

.skill-category {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 24px;
    transition: var(--transition);
    overflow: hidden;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skill-items {
    display: grid;
    gap: 1.5rem;
}

.skill-item {
    display: grid;
    gap: 0.5rem;
}

.skill-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1rem;
}

.skill-bar {
    height: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    width: 0;
    transition: width 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ===== 联系 ===== */
.contact {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('image/3cdc63d6f16ae4cac6b7eab97d4c891e.JPG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.08;
    filter: blur(2px);
    z-index: 0;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

.contact .container {
    position: relative;
    z-index: 1;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0;
}

.contact-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 0;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.contact-stat-item {
    text-align: center;
    padding: 1rem;
    transition: var(--transition);
}

.contact-stat-item:hover {
    transform: translateY(-3px);
}

.contact-stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.contact-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-methods {
    display: grid;
    gap: 1.5rem;
    margin-top: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    flex-shrink: 0;
    transition: var(--transition);
    color: white;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    border-radius: 20px;
}

.contact-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.contact-value {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contact-form {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
    border-radius: 24px 24px 0 0;
}

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

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* ===== 响应式设计 ===== */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
        gap: 0;
        border-radius: 0 0 24px 24px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* 平板端基础优化 */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    /* 背景图平板端优化 */
    .hero-background {
        background-attachment: scroll;
    }

    .about::before,
    .works::before,
    .skills::before,
    .contact::before {
        background-attachment: scroll;
    }

    /* 图片优化 */
    img {
        max-width: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .about-stats {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .works-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .avatar-wrapper {
        width: 240px;
        height: 240px;
        max-width: calc(100% - 40px);
        max-height: calc(100% - 40px);
    }

    .avatar-image {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .work-visual {
        width: 100%;
        max-width: 100%;
    }

    .work-card {
        width: 100%;
        max-width: 100%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* 确保section不超出 */
    section {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
}

@media (max-width: 640px) {
    section {
        padding: 4rem 0;
    }

    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 1rem 15px;
    }

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

    .section-title {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

/* ===== 优雅的渐入动画（内容默认可见，动画仅作为增强） ===== */
/* 所有内容默认可见，不阻塞用户体验 */
.fade-in,
.slide-in-left,
.slide-in-right,
.scale-in,
.fade-only {
    opacity: 1;
    transform: none;
}

/* ===== 加载动画 ===== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s infinite;
}

/* ===== 页面加载完成状态 ===== */
body.loaded {
    opacity: 1;
}

body {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

/* ===== 选择文本样式 ===== */
::selection {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

::-moz-selection {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

/* ===== 焦点样式优化 ===== */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== 平滑过渡增强 ===== */
a,
button,
.work-card,
.stat-item,
.skill-category,
.contact-item {
    will-change: transform;
}

/* ===== 按钮悬停效果增强 ===== */
.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}


/* ===== 卡片圆角过渡优化 ===== */
.work-card,
.stat-item,
.skill-category,
.contact-item,
.contact-form {
    transition: var(--transition), border-radius 0.3s ease;
}

/* ===== 输入框聚焦圆角 ===== */
.form-group input:focus,
.form-group textarea:focus {
    border-radius: 18px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* ===== 移动端优化 ===== */
@media (max-width: 640px) {

    /* 移动端基础优化 */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }

    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    /* 背景图移动端优化 */
    .hero-background {
        background-attachment: scroll;
        background-size: cover;
        -webkit-background-size: cover;
    }

    .about::before,
    .works::before,
    .skills::before,
    .contact::before {
        background-attachment: scroll;
        background-size: cover;
        -webkit-background-size: cover;
    }

    /* 图片容器优化 */
    img {
        max-width: 100%;
        width: 100%;
        height: auto;
        object-fit: contain;
        object-position: center;
        display: block;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .work-card {
        margin-bottom: 1rem;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .work-visual {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 3/2;
        overflow: hidden;
    }

    .skill-category {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .contact-form {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
        bottom: 1rem;
    }

    .hero-arrow svg {
        width: 20px;
        height: 20px;
    }

    .avatar-wrapper {
        width: 200px;
        height: 200px;
        max-width: calc(100% - 40px);
        max-height: calc(100% - 40px);
    }

    .avatar-image {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .highlight-item {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .contact-stats {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .works-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
    }

    .about-content {
        gap: 3rem;
        width: 100%;
        max-width: 100%;
    }h

    .contact-content {
        gap: 3rem;
        width: 100%;
        max-width: 100%;
    }

    .contact-info,
    .contact-form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* 移动端禁用3D效果 */
    .work-card {
        transform: none !important;
    }

    /* 确保所有section不超出 */
    section {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
}

/* ===== 减少动画（尊重用户偏好） ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .scale-in,
    .fade-only {
        opacity: 1 !important;
        transform: none !important;
    }
}