:root {
    --primary-color: #a67c52; /* 温暖的棕金调 */
    --text-color: #4a3e3e;    /* 深咖色文字 */
    --light-bg: #fdfaf2;      /* 乳白色背景 */
    --white: #ffffff;
    --gray: #8e7f7f;
    --shadow: 0 4px 20px rgba(166, 124, 82, 0.1);
    --transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
    color: var(--text-color);
    background: var(--light-bg);
    line-height: 1.6;
}

.container {
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.section {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.content {
    width: 100%;
    max-width: 500px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.section.active .content {
    opacity: 1;
    transform: translateY(0);
}

/* 标题样式 */
.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 首页板块 */
.section-hero {
    background: linear-gradient(135deg, #fdfaf2 0%, #f5ecd1 100%);
    color: var(--text-color);
    text-align: center;
}

.section-hero .name {
    color: var(--primary-color);
}

.section-hero .tagline {
    color: var(--gray);
}

.avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 5px;
    background: rgba(166, 124, 82, 0.15);
    animation: float 3s ease-in-out infinite;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
}

.name {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

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

.contact-item {
    background: var(--white);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(166, 124, 82, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-item:active {
    background: var(--light-bg);
    transform: scale(0.95);
}

.contact-item .icon {
    filter: sepia(0.5);
}

/* 滑动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0.8;
    animation: bounce 2s infinite;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 100;
    padding: 10px;
    transition: var(--transition);
}

.scroll-indicator:active {
    transform: translateX(-50%) scale(0.9);
    opacity: 1;
}

.scroll-indicator p {
    font-size: 0.8rem;
    margin-top: 5px;
}

/* 技能板块 */
.skill-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.skill-card {
    background: var(--white);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(166, 124, 82, 0.05);
    position: relative;
    overflow: hidden;
}

.skill-card:active {
    transform: scale(0.98);
    background: #fdfaf2;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: 0.5s;
}

.skill-card:active::after {
    left: 100%;
}

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

.skill-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

.level-badge {
    font-size: 0.75rem;
    background: rgba(166, 124, 82, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.skill-tags span {
    background: var(--light-bg);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--gray);
    border: 1px solid rgba(166, 124, 82, 0.1);
}

/* 进度条动画样式 */
.skill-progress-bar {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.skill-progress-bar .progress {
    height: 100%;
    width: 0; /* 初始宽度为0 */
    background: linear-gradient(90deg, var(--primary-color), #d4a373);
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.1, 0.42, 0.41, 1);
}

.section.active .skill-progress-bar .progress {
    width: var(--final-width); /* 这将由 JS 动态设置 */
}

/* 评价框动效 */
.evaluation-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b6542 100%);
    color: var(--white);
    padding: 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    box-shadow: 0 10px 20px rgba(166, 124, 82, 0.2);
    position: relative;
}

.evaluation-box::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 4rem;
    opacity: 0.2;
    font-family: serif;
}

.typewriter {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.8s ease 0.5s;
}

.section.active .typewriter {
    opacity: 1;
    transform: translateY(0);
}

/* 图集相关样式 */
.gallery-hint {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-top: 10px;
    font-style: italic;
    text-align: right;
}

.hidden-gallery {
    display: none;
}

.gallery-container {
    width: 100%;
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:active img {
    transform: scale(1.1);
}

/* 弹窗扩展支持图集 */
.modal-content.wide {
    max-width: 90%;
    width: 500px;
}

#modal-gallery {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.project-gallery-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: var(--light-bg);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.project-gallery-btn:active {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(0.95);
}

/* 教育板块 */
.edu-item {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

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

.school {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.date {
    font-size: 0.85rem;
    color: var(--gray);
}

.major {
    font-weight: bold;
    margin-bottom: 15px;
}

.edu-details p {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--gray);
}

/* 项目板块 */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-item {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.project-header {
    padding: 15px;
    background: #fdfaf2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid rgba(166, 124, 82, 0.1);
}

.project-header h3 {
    font-size: 1rem;
    color: var(--primary-color);
}

.role {
    font-size: 0.8rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 10px;
}

.project-body {
    padding: 0 15px;
    max-height: 0;
    transition: all 0.3s ease-out;
    opacity: 0;
}

.project-item.expanded .project-body {
    padding: 15px;
    max-height: 500px;
    opacity: 1;
}

.project-desc {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.project-body ul {
    list-style: none;
}

.project-body li {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 5px;
    position: relative;
    padding-left: 15px;
}

.project-body li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* 在校经历 */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.exp-item {
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
}

.exp-header {
    display: flex;
    justify-content: space-between;
}

.exp-date {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.exp-points {
    list-style: none;
}

.exp-points li {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.btn-copy-all {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(43, 116, 226, 0.3);
    cursor: pointer;
}

/* 弹窗与提示 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 15px;
    width: 85%;
    max-width: 400px;
    position: relative;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

.toast {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

/* 动画 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* 适配不同屏幕 */
@media screen and (max-height: 600px) {
    .name { font-size: 1.8rem; }
    .avatar-container { width: 100px; height: 100px; }
    .section-title { margin-bottom: 15px; }
}
