/* 全栈开发工程师个人展示页面样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #667eea;
}

/* 主要内容区域 */
main {
    margin-top: 80px;
    padding: 2rem 0;
}

/* 英雄区域 */
.hero {
    text-align: center;
    padding: 4rem 0;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 英雄区域统计信息 */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-content img {
    transition: transform 0.3s ease;
}

.hero-content img:hover {
    transform: scale(1.05);
}

/* 技能区域 */
.skills-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skill-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.skill-level {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

/* 技能进度条 */
.skill-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #f0f0f0);
    border-radius: 3px;
    transition: width 1s ease-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 项目区域 */
.projects-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

/* 项目卡片头部 */
.project-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.project-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 30px;
    text-align: center;
}

.project-title {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: bold;
    margin: 0;
}

.project-description {
    color: #666;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.tech-tag:hover {
    transform: translateY(-1px);
}

/* 联系区域 */
.contact-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #667eea;
    font-weight: 500;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.contact-label {
    font-size: 0.8rem;
    opacity: 0.7;
}

.contact-value {
    font-size: 1rem;
    font-weight: 600;
}

/* 社交链接 */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.social-link span:first-child {
    font-size: 1.2rem;
}

/* 页脚 */
footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.beian-info {
    font-size: 0.9rem;
    opacity: 0.8;
}

.beian-link {
    color: #667eea;
    text-decoration: none;
}

.beian-link:hover {
.beian-link:hover {
    text-decoration: underline;
}

/* 新增样式 - 项目卡片头部 */
.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-stats {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-stats .stat {
    font-size: 0.8rem;
    color: #666;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
}

/* 联系内容区域 */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #667eea;
    font-weight: 500;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.contact-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.contact-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0.3rem;
}

.contact-value {
    font-size: 1.1rem;
    font-weight: 600;
}

/* 社交链接 */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.social-link span:first-child {
    font-size: 1.2rem;
}

/* 页脚信息 */
.footer-info {
    margin-bottom: 1rem;
}

.footer-info p {
    margin: 0.5rem 0;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #667eea;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .skill-card,
    .project-card,
    .scroll-to-top,
    .contact-item,
    .social-link {
        transition: none;
    }
}
    text-decoration: underline;
}

/* 返回顶部按钮 */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #667eea;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
}

.scroll-to-top:hover {
    background: #764ba2;
}

/* H5移动端优化 */
@media screen and (max-width: 768px) {
    /* 英雄区域移动端适配 */
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* 导航菜单移动端优化 */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 10px 10px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 0.5rem 0;
    }
    
    .nav-links a {
        display: block;
        padding: 0.8rem 1rem;
        border-radius: 8px;
        transition: background 0.3s ease;
    }
    
    .nav-links a:hover {
        background: rgba(102, 126, 234, 0.1);
    }
    
    /* 移动端菜单按钮 */
    .mobile-menu-btn {
        display: block !important;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }
    
    /* 技能网格移动端单列 */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-card {
        padding: 1.5rem;
    }
    
    .skill-progress {
        height: 4px;
    }
    
    /* 项目网格移动端优化 */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    .project-header {
        margin-bottom: 1rem;
    }
    
    .project-icon {
        font-size: 1.5rem;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .project-stats {
        margin-top: 1rem;
        font-size: 0.8rem;
    }
    
    /* 联系信息移动端优化 */
    .contact-info {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .contact-item {
        flex-direction: row;
        text-align: left;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .social-link {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    /* 标题字号移动端调整 */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    /* 返回顶部按钮移动端优化 */
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* 超小屏幕优化 */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo img {
        width: 25px;
        height: 25px;
    }
    
    .skills-section,
    .projects-section,
    .contact-section {
        padding: 1.5rem;
        margin: 1rem 0;
        border-radius: 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .skill-card,
    .project-card {
        padding: 1rem;
    }
    
    .skill-icon {
        font-size: 2rem;
    }
    
    .skill-title {
        font-size: 1.1rem;
    }
    
    .skill-level {
        font-size: 0.8rem;
    }
    
    .tech-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .contact-item {
        padding: 0.8rem;
    }
    
    .contact-icon {
        font-size: 1.2rem;
    }
    
    .social-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .beian-info {
        font-size: 0.8rem;
    }
    
    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* 平板设备优化 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .skill-card:hover,
    .project-card:hover {
        transform: none;
    }
    
    .skill-card:active,
    .project-card:active {
        transform: scale(0.98);
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .skills-section,
    .projects-section,
    .contact-section {
        background: rgba(44, 62, 80, 0.95);
        color: #ecf0f1;
    }
    
    .section-title {
        color: #ecf0f1;
    }
    
    .project-card {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .project-title {
        color: #3498db;
    }
    
    .project-description {
        color: #bdc3c7;
    }
}

/* 打印样式优化 */
@media print {
    body {
        background: white;
        color: black;
    }
    
    header,
    .scroll-to-top,
    footer {
        display: none;
    }
    
    main {
        margin-top: 0;
    }
    
    .skills-section,
    .projects-section,
    .contact-section {
        background: white;
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .skill-card,
    .project-card,
    .tech-tag {
        border: 2px solid currentColor;
    }
    
    .nav-links a {
        text-decoration: underline;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .skill-card,
    .project-card,
    .scroll-to-top {
        transition: none;
    }
}