:root {
    --bg-color: #ffffff;
    --sidebar-bg-color: #ffffff;
    --text-color: #000000;
    --title-color: #000000;
    --border-color: #e5e5e5;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.4;
    font-size: 14px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.portfolio-wrapper { display: flex; }

.sidebar {
    width: 200px;
    height: 100vh;
    position: fixed; 
    top: 0;
    left: 0;
    background-color: var(--bg-color); 
    border-right: none; 
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.site-title {
    font-size: 1rem; 
    font-weight: 600;
    color: var(--title-color);
    text-decoration: none;
    margin-bottom: 50px;
    letter-spacing: 0.1em;
}

.nav-header {
    list-style-type: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: #000;
    margin-top: 25px;
    margin-bottom: 10px;
    padding: 4px 0;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.main-nav ul { list-style: none; padding: 0; margin: 0; }
.main-nav > li { list-style: none; }

.main-nav li a {
    display: block;
    padding: 2px 0; 
    text-decoration: none;
    color: #555;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.3;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.main-nav li a:hover, .main-nav li a.active {
    color: var(--title-color); 
    font-weight: 600;
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0 0 0 10px;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease-out;
}

.submenu li a {
    font-size: 0.85rem;
    padding: 3px 0;
    font-weight: 300;
}

.sidebar-footer {
    font-size: 0.75rem; 
    line-height: 1.4;
    color: #555;
}

/* --- Landing Page / Main Content --- */
#landing-view {
    position: relative; 
    width: 100%;
    height: 100%; 
    background-color: var(--bg-color); 
    padding: 0; 
    margin: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start; 
    align-items: center; 
    padding-left: 50px; 
}

.landing-image-display {
    max-width: 95%;
    max-height: 95%;
    width: auto;      
    height: auto;     
    object-fit: contain; 
    display: block;
}

.main-content {
    margin-left: 200px; 
    padding: 0; 
    width: calc(100% - 200px); 
    height: 100vh;
    overflow-y: auto; 
}

#portfolio-grid-view {
    padding: 50px 5vw; 
    min-height: 100vh;
}

/* ⬇️ 核心修改：项目网格布局 - 锁定三列 ⬇️ */
.project-grid {
    display: grid;
    /* 修正：将最小宽度增加到 350px，以确保只容纳 3 列 */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 30px; 
}

.project-item a {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.project-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-item a:hover img { transform: scale(1.05); }

.project-item .title-overlay {
    font-family: 'IBM Plex Mono', monospace;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px; 
    color: white;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent); 
    font-weight: 600;
    box-sizing: border-box;
    opacity: 0; 
    transition: opacity 0.3s ease;
    font-size: 1rem;
}

.project-item a:hover .title-overlay { opacity: 1; }

.project-detail h1 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    margin-top: 40px;
}

.project-detail h3 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--title-color);
    margin-top: 40px;
}

.project-detail p {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 800px;
}

.project-info-box strong { font-weight: 600; color: var(--title-color); }

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
