:root {
    --bg: #faf8f3;
    --text-main: #1a1a1a;
    --accent: #6366f1;
    --text-muted: #888;
    --sidebar-width: 28%;
}

* { box-sizing: border-box; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    margin: 0; 
    background-color: var(--bg); 
    color: var(--text-main);
    line-height: 1.6;
}

/* 布局容器 */
.layout {
    display: flex;
    min-height: 100vh;
}

/* 左侧固定栏 */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 5% 10% 10% 80px;
    border-right: 1px solid #e5e5e5;
}

.sidebar-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.logo {
    width: 100%;
    max-width: 200px;
    height: auto;
    object-fit: contain;
    margin-bottom: 28px;
    display: block;
}

/* Logo link for returning to home page */
.logo-link {
    display: block;
    cursor: pointer;
    text-decoration: none;
    transition: transform 180ms ease-out, opacity 180ms ease-out;
    /* 确保不影响 logo 的 margin-bottom */
    margin: 0;
    padding: 0;
    line-height: 0;
    transform: scale(1);
    opacity: 1;
}

.logo-link:hover {
    transform: scale(1.03);
    opacity: 0.8;
}

/* 右侧滚动内容区 */
.main-content {
    margin-left: 32%;
    width: calc(100% - 32%);
    padding: 4.5% 15% 80px 5%;
    position: relative;
    min-height: 100vh;
}

/* 横向 Section 导航 */
.section-nav {
    display: flex;
    gap: 48px;
    margin-bottom: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
}

.nav-item {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--accent);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

/* Apple-style Hover Preview Block - Vertical List */
.nav-preview {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 210px;
    background-color: #f3ede3;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 6px;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 1000;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    pointer-events: none;
    margin-top: -4px;
}

.nav-preview.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 8px 0;
    transition: opacity 0.15s ease;
    opacity: 1;
}

.preview-list-item {
    padding: 0 20px;
    padding-left: 20px;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 4px;
    position: relative;
    text-decoration: none;
    display: block;
    color: inherit;
}

.preview-list-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 52%;
    transform: translate3d(0, -50%, 0) scaleY(0.3);
    height: calc(0.8em + 4px);
    width: 0;
    border-left: 3px solid var(--accent);
    opacity: 0;
    transform-origin: center;
    transition: opacity 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.preview-list-item:hover {
    background-color: transparent;
}

.preview-list-item:hover::before {
    opacity: 1;
    transform: translate3d(0, -50%, 0) scaleY(1);
}

.preview-item-text {
    font-size: 15px;
    font-weight: 400;
    color: #4a4a4a;
    text-transform: capitalize;
    letter-spacing: 0.01em;
    line-height: 1.8;
}

/* 子页面内容区域 */
#content {
    margin-top: 40px;
}

/* 子页面占位内容 */
.page-placeholder {
    padding: 60px 0;
    text-align: center;
}

.page-placeholder h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-main);
    margin-bottom: 20px;
}

.page-placeholder p {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* 继承你之前的 CALA 样式 */
.location {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.7;
    margin-bottom: 40px;
    white-space: nowrap;
}

.manifesto {
    margin-top: -20px;
}

.manifesto .item {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.1;
}

.initial {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.full-text {
    font-size: 1rem;
    font-weight: 200;
    color: var(--text-muted);
    margin-left: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

/* Hover效果：显示解释词并高亮字母 */
.manifesto .item:hover .initial {
    color: var(--accent);
}

.manifesto .item:hover .full-text {
    opacity: 1;
    transform: translateX(0);
}

/* 内容板块样式 */
section { margin-bottom: 80px; opacity: 0.9; }
h2 { font-size: 1.5rem; margin-bottom: 20px; color: var(--accent); }
.bio { font-size: 1.1rem; font-weight: 300; }
.experience-item { margin-bottom: 30px; }
.tag { 
    display: inline-block; 
    padding: 4px 12px; 
    background: #eef2ff; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    color: var(--accent);
    margin-right: 10px;
}

/* 页面底部 Footer */
.site-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 0;
    text-align: center;
    border-top: 1px solid #e5e5e5;
    margin-top: 40px;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* 响应式：手机端变回竖排 */
@media (max-width: 768px) {
    .layout { flex-direction: column; }
    .sidebar { 
        position: relative; 
        width: 100%; 
        height: auto; 
        border-right: none; 
        padding: 40px 20px; 
        justify-content: flex-start;
        align-items: center;
    }
    .logo {
        max-width: 150px;
        margin-bottom: 24px;
    }
    .location {
        margin-bottom: 32px;
    }
    .manifesto {
        margin-top: 0;
    }
    .main-content { 
        margin-left: 0; 
        width: 100%; 
        padding: 40px 20px; 
        padding-bottom: 80px; 
    }
    .site-footer {
        position: relative;
        margin-top: 40px;
    }
    .section-nav {
        flex-wrap: wrap;
        gap: 20px;
        margin-bottom: 40px;
    }
    .nav-item {
        font-size: 0.85rem;
    }
    .nav-preview {
        width: 200px;
        left: 0 !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    }
    .site-footer {
        padding: 12px 20px;
        position: relative;
    }
}
