/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

h2 {
    color: #2c3e50;
    text-align: center;
    margin: 2rem 0;
    font-size: 2em;
}

/* Banner样式 */
.banner {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-size: 2.5em;
    text-align: center;
}

/* 导航栏样式 */
nav {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1rem 0;
    position: absolute;
    bottom: 0;
    width: 100%;
    transition: transform 0.3s ease;
}

nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

nav ul li {
    margin: 0.5rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1em;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: block;
}

nav ul li a:hover {
    color: #00a8ff;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 快速导航区样式 */
.quick-nav {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.nav-item {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.nav-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.nav-item i {
    font-size: 2em;
    margin-bottom: 1rem;
    display: block;
    color: #00a8ff;
}

.nav-item span {
    font-size: 1.1em;
    font-weight: bold;
}

/* 最新动态样式 */
.updates {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.update-item {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.update-item:hover {
    transform: translateY(-5px);
}

.update-date {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 0.5rem;
}

.update-content h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.update-content p {
    color: #666;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-nav h3,
.footer-contact h3,
.footer-social h3 {
    margin-bottom: 1rem;
    font-size: 1.2em;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav ul li {
    margin-bottom: 0.5rem;
}

.footer-nav ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav ul li a:hover {
    color: #00a8ff;
}

.footer-contact p,
.footer-social p {
    margin-bottom: 0.5rem;
    color: #ccc;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
    .profile {
        flex-direction: column;
        padding: 1rem;
    }

    .avatar {
        flex: 0 0 auto;
        margin-right: 0;
        margin-bottom: 2rem;
        max-width: 250px;
        margin: 0 auto 2rem;
    }

    .banner h1 {
        font-size: 1.8em;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .nav-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile, .nav-item, .update-item, .contact {
    animation: fadeIn 1s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 图标字体 */
@font-face {
    font-family: 'iconfont';
    src: url('../fonts/iconfont.woff2') format('woff2'),
         url('../fonts/iconfont.woff') format('woff');
}

.icon-profile:before,
.icon-education:before,
.icon-projects:before,
.icon-skills:before,
.icon-awards:before,
.icon-life:before,
.icon-hobbies:before,
.icon-gallery:before,
.icon-guestbook:before {
    font-family: 'iconfont';
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
} 