:root {
    --primary: #1a1a1a;
    --secondary: #f5f5f5;
    --accent: #5e81f4;
    --light-gray: #e0e0e0;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --notice-color: #76ff7a; /* 公告栏薄荷绿主色 */
    --link-color: #2d7ff9;   /* 联系方式超链接专属色 */
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', sans-serif;
    color: var(--primary);
    background-color: white;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-top: 40px !important;
}
h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    line-height: 1.2;
}
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}
section {
    padding: 120px 0;
}
/* 顶部公告栏核心样式 */
.top-notice-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 9999;
    font-size: 14px;
    box-sizing: border-box;
}
/* 查看详情按钮样式 */
.notice-detail-btn {
    background-color: var(--notice-color);
    color: var(--primary);
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.notice-detail-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}
/* 公告详情弹窗样式 - 核心修改：X固定/标题改色/内容单独滚动 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 50px 30px 30px; /* 顶部留空间给X/标题 */
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    position: relative;
    display: flex;
    flex-direction: column; /* 实现标题固定、内容滚动 */
}
/* 公告标题：单独配色（强调蓝），固定顶部 */
.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    color: var(--accent);
    line-height: 1.2;
    width: 100%;
}
/* 公告内容滚动容器：仅此处滚动，不影响X/标题 */
.notice-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px; /* 给滚动条留空间 */
}
/* 公告无序列表样式 */
.notice-ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}
.notice-ul li {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 12px;
    text-indent: 0;
}
/* 重中之重：薄荷绿背景标注 */
.important {
    background-color: var(--notice-color);
    color: #000;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}
/* 联系方式超链接：差异化样式，点状下划线 */
.contact-link {
    color: var(--link-color);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dotted var(--link-color);
    padding: 0 2px;
    transition: all 0.3s ease;
}
.contact-link:hover {
    color: #fff;
    background-color: var(--link-color);
    border-bottom: 1px solid var(--link-color);
    border-radius: 2px;
}
/* 关闭X：固定右上角，最上层，永不滚动 */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10; /* 确保X在最上层 */
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close-btn:hover {
    color: var(--notice-color);
}
/* 美化滚动条 */
.notice-scroll::-webkit-scrollbar {
    width: 6px;
}
.notice-scroll::-webkit-scrollbar-thumb {
    background-color: #e0e0e0;
    border-radius: 3px;
}
.notice-scroll::-webkit-scrollbar-thumb:hover {
    background-color: var(--notice-color);
}
/* Header */
header {
    position: fixed;
    width: 100%;
    z-index: 100;
    padding: 30px 0;
    transition: var(--transition);
    background: transparent;
    top: 40px !important;
}
header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    padding: 15px 0;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -1px;
    text-decoration: none;
    color: var(--primary);
    display: flex;
    align-items: center;
}
.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    margin-left: 4px;
    margin-top: 4px;
    transition: var(--transition);
}
nav ul {
    display: flex;
    list-style: none;
}
nav li {
    margin-left: 40px;
}
nav a {
    text-decoration: none;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 400;
    position: relative;
    padding: 5px 0;
}
nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: var(--transition);
}
nav a:hover:after {
    width: 100%;
}
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}
/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 0 !important;
}
.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}
.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 20px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.3s;
}
.hero h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 400;
    color: #666;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}
.hero-buttons {
    display: flex;
    gap: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.7s;
}
.btn {
    display: inline-block;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 2px;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid var(--primary);
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.btn-secondary {
    background: transparent;
    color: var(--primary);
}
.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.hero-decoration {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    max-width: 400px;
    height: 70vh;
    background: var(--secondary);
    z-index: 1;
    opacity: 0;
    animation: fadeIn 1s forwards 0.8s;
}
/* About Section */
.about-content {
    display: flex;
    gap: 80px;
    align-items: center;
}
.about-text {
    flex: 1.5;
}
.about-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(20px);
}
.about-image {
    flex: 1;
    height: 500px;
    background: var(--secondary);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}
.about-image:before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 1px solid var(--primary);
    z-index: -1;
    transition: var(--transition);
}
.about-image:hover:before {
    top: 20px;
    left: 20px;
}
.section-title {
    position: relative;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 2.5rem;
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}
.section-title:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    opacity: 0;
    transform: scaleX(0);
}
/* Skills Section */
.skills {
    background: var(--secondary);
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}
.skill-card {
    padding: 40px 30px;
    background: white;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}
.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}
.skill-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 25px;
    transition: var(--transition);
}
.skill-card:hover .skill-icon {
    transform: scale(1.1);
}
.skill-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}
/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.project-card {
    position: relative;
    height: 350px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}
.project-image {
    width: 100%;
    height: 100%;
    background: var(--light-gray);
    transition: var(--transition);
}
.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(100px);
    transition: var(--transition);
}
.project-card:hover .project-overlay {
    transform: translateY(0);
}
.project-card:hover .project-image {
    transform: scale(1.05);
}
.project-overlay h3 {
    margin-bottom: 10px;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}
.project-tag {
    background: var(--secondary);
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 2px;
}
/* Contact Section */
.contact {
    background: var(--secondary);
}
.contact-content {
    display: flex;
    gap: 80px;
}
.contact-info {
    flex: 1;
}
.contact-form {
    flex: 1.5;
}
.contact-item {
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(20px);
}
.contact-icon {
    font-size: 1.4rem;
    color: var(--accent);
    margin-right: 20px;
    min-width: 30px;
}
.contact-text h3 {
    margin-bottom: 5px;
}
.form-group {
    margin-bottom: 25px;
    opacity: 0;
    transform: translateY(20px);
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--light-gray);
    background: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(94, 129, 244, 0.1);
}
textarea.form-control {
    min-height: 150px;
    resize: vertical;
}
/* Footer */
footer {
    padding: 60px 0 40px;
    background: var(--primary);
    color: rgba(255, 255, 255, 0.7);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
}
.footer-logo {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 20px;
    display: inline-block;
}
.social-links {
    display: flex;
    gap: 20px;
}
.social-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.4rem;
    transition: var(--transition);
}
.social-links a:hover {
    color: white;
    transform: translateY(-5px);
}
.footer-links {
    display: flex;
    gap: 40px;
}
.footer-links h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.footer-links ul {
    list-style: none;
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a:hover {
    color: white;
}
.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}
/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}
.floating {
    animation: float 6s ease-in-out infinite;
}
/* Responsive */
@media (max-width: 992px) {
    .about-content,
    .contact-content {
        flex-direction: column;
        gap: 50px;
    }
    .about-image {
        height: 400px;
    }
    .hero-decoration {
        display: none;
    }
}
@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    nav li {
        margin: 15px 40px;
    }
    .mobile-toggle {
        display: block;
    }
    .hero {
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    .footer-links {
        flex-wrap: wrap;
    }
    /* 移动端公告栏适配 */
    .top-notice-bar {
        font-size: 12px;
        padding: 0 10px;
    }
    .notice-detail-btn {
        padding: 3px 8px;
        font-size: 11px;
    }
    /* 移动端公告弹窗适配 */
    .modal-title {
        font-size: 20px;
    }
    .notice-ul li {
        font-size: 15px;
    }
    .modal-content {
        padding: 45px 20px 20px;
    }
}
@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
}