/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', Roboto, 'Helvetica Neue', sans-serif;
    background-color: #fafafa;
    color: #1e1e1e;
    scroll-behavior: smooth;
    padding-top: 60px;
}

/* ===== 顶栏 ===== */
#topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.navbar {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 汉堡按钮 */
.menu-toggle {
    width: 28px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1300;
    position: relative;
    transition: all 0.3s ease;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #1e1e1e;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 汉堡切换叉号 */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 350;
    letter-spacing: 4px;
    color: #1e1e1e;
}
.brand-name a {
    color: inherit;
    text-decoration: none;
}
.brand-name a:hover {
    opacity: 0.6;
}

/* ===== 侧边栏 ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06);
    z-index: 1200;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    border-right: 1px solid #f2f2f2;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}
.sidebar-brand {
    font-size: 1.4rem;
    font-weight: 350;
    letter-spacing: 3px;
    color: #1e1e1e;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.sidebar-nav a {
    color: #2c2c2c;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 400;
    padding: 10px 14px;
    border-radius: 12px;
    transition: background 0.2s ease;
    letter-spacing: 0.5px;
}
.sidebar-nav a:hover {
    background: #f5f5f5;
}
.sidebar-nav a:active {
    background: #e8e8e8;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

/* 遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== 首屏全屏区域 ===== */
.hero {
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url("photo/002.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #ffffff;
    text-align: center;
    padding: 24px;
    position: relative;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: #1e1e1e;
    min-height: 1.4em;
}

/* 打字光标 */
.typewriter {
    display: inline;
    border-right: 3px solid #1e1e1e;
    padding-right: 4px;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    0%, 100% { border-color: #1e1e1e; }
    50% { border-color: transparent; }
}

.hero .subtitle {
    font-size: 1.2rem;
    color: #ffffff;
    letter-spacing: 6px;
    opacity: 0;
    margin-top: 24px;
    transition: opacity 1.6s ease;
    text-shadow: 1px 1px 6px #000, -1px -1px 6px #000;
}
.hero .subtitle.show {
    opacity: 1;
}

/* 滚动向下箭头 */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    color: #9aa0a6;
    font-size: 1.6rem;
    opacity: 0;
    transition: opacity 1s ease;
    cursor: pointer;
    animation: bounce 2s infinite;
}
.scroll-indicator.show {
    opacity: 0.7;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== 通用内容板块 ===== */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px 100px;
    border-bottom: 1px solid #f0f0f0;
}
.section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 350;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: #1e1e1e;
}
.section-sub {
    font-size: 1rem;
    color: #5f6368;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}
.card-item {
    background: #ffffff;
    padding: 28px 20px;
    border-radius: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f2f2f2;
}
.card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}
.card-item i {
    font-size: 2rem;
    color: #1e1e1e;
    margin-bottom: 12px;
    opacity: 0.7;
}
.card-item h3 {
    font-weight: 500;
    font-size: 1.2rem;
    margin-bottom: 6px;
}
.card-item p {
    color: #5f6368;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 社交链接 */
.social-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.social-links a {
    color: #1e1e1e;
    font-size: 1.8rem;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}
.social-links a:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* 页脚 */
.footer-note {
    text-align: center;
    color: #9aa0a6;
    font-size: 0.8rem;
    padding: 40px 24px 32px;
    letter-spacing: 1px;
}

/* 响应式适配 */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.4rem;
        letter-spacing: 2px;
    }
    .hero .subtitle {
        font-size: 1rem;
        letter-spacing: 3px;
    }
    .section {
        padding: 50px 16px 60px;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .section {
        padding: 40px 16px 50px;
    }
}
