/* 
 * 主样式文件
 * 参考网站: https://huohuo90.com/home
 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #333;
    --secondary-color: #666;
    --accent-color: #fe5722;
    --background-color: #f8f8f8;
    --text-color: #333;
    --border-color: #e0e0e0;
    --transition-speed: 0.3s;
    --padding-section: 100px;
    --font-family: 'Noto Sans SC', sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 自定义光标 */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-color);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
    mix-blend-mode: difference;
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-inner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* 导航栏 */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    transition: all 0.3s ease;
    background-color: transparent;
}

.main-nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.main-nav.scrolled .logo a,
.main-nav.scrolled .nav-link {
    color: var(--primary-color);
    text-shadow: none;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.section.active#home .logo a {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.section.active#home .nav-link {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-speed) ease;
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.hamburger {
    width: 30px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: 99;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    text-align: center;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu-link {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color var(--transition-speed) ease;
}

.mobile-menu-link:hover {
    color: var(--accent-color);
}

/* 主内容区域 */
.main-content {
    min-height: 100vh;
}

.section {
    position: absolute;
    width: 100%;
    min-height: 100vh;
    padding: var(--padding-section) 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1;
}

.section.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

/* 首页部分 */
.home-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 30px;
    background-image: url('../assets/images/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.home-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.home-content {
    position: relative;
    z-index: 2;
}

.home-content {
    max-width: 800px;
}

.home-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.home-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.home-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

.primary-btn {
    background-color: var(--accent-color);
    color: white;
}

.primary-btn:hover {
    background-color: #d64d1f;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(254, 87, 34, 0.2);
}

.secondary-btn {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.section.active#home .secondary-btn {
    border: 2px solid white;
    color: white;
}

.secondary-btn:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(254, 87, 34, 0.2);
}

.section.active#home .secondary-btn:hover {
    background-color: white;
    color: var(--accent-color);
    border-color: white;
}

/* 关于我部分 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.image-wrapper {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about-text p {
    margin-bottom: 20px;
}

.about-skills {
    margin-top: 30px;
}

.skill {
    margin-bottom: 15px;
}

.skill-name {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.skill-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 4px;
}

/* 摄影作品部分 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: transform var(--transition-speed) ease;
}

.gallery-image img {
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    color: white;
    text-align: center;
    padding: 20px;
}

.gallery-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.gallery-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 文章部分 */
.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.article-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.article-excerpt {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.article-link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-color);
    position: relative;
}

.article-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width var(--transition-speed) ease;
}

.article-link:hover::after {
    width: 100%;
}

/* 简历部分 */
.resume-container {
    background-color: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.resume-section {
    margin-bottom: 40px;
}

.resume-section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    padding-left: 20px;
}

.resume-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-color);
}

.resume-item {
    margin-bottom: 30px;
    position: relative;
    padding-left: 30px;
}

.resume-item::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    width: 1px;
    height: calc(100% + 20px);
    background-color: var(--border-color);
}

.resume-item:last-child::before {
    display: none;
}

.resume-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    background-color: white;
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.resume-item-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

.resume-date {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.resume-item-description {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.resume-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.resume-skill {
    background-color: #f0f0f0;
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
}

.resume-skill:hover {
    background-color: var(--accent-color);
    color: white;
}

.resume-download {
    text-align: center;
    margin-top: 40px;
}

/* 小红书部分 */
.xiaohongshu-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

.xiaohongshu-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.xiaohongshu-svg {
    width: 100%;
    height: 100%;
    color: #fe2c55;
}

.xiaohongshu-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.xiaohongshu-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.xiaohongshu-post {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed) ease;
}

.xiaohongshu-post:hover {
    transform: translateY(-10px);
}

.post-image {
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.xiaohongshu-post:hover .post-image img {
    transform: scale(1.05);
}

.post-info {
    padding: 20px;
}

.post-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.post-link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-color);
}

/* 页脚 */
.footer {
    background-color: #1a1a1a;
    color: white;
    padding: 60px 0 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-email {
    font-size: 0.9rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all var(--transition-speed) ease;
}

.social-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.social-icon {
    width: 18px;
    height: 18px;
    color: white;
}

.copyright {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 5px 15px rgba(254, 87, 34, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    :root {
        --padding-section: 80px;
    }
    
    .home-title {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .xiaohongshu-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    :root {
        --padding-section: 60px;
    }
    
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .home-title {
        font-size: 2rem;
    }
    
    .home-description {
        font-size: 1rem;
    }
    
    .home-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .articles-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    :root {
        --padding-section: 40px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .resume-container {
        padding: 20px;
    }
    
    .resume-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
} 