@font-face {
    font-family: 'BlackPineMincho';
    src: url('../fonts/BlackPineMincho.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
body {
  margin: 0;
  font-family: 'BlackPineMincho';
  background-color: whitesmoke;
  color: #000;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  left: 0;
  background-color: whitesmoke;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  
  
  display: flex; 
  align-items: center; 
  gap: 15px; /* 间隔 */
  

  transition: background-color 0.3s ease;
}


.nav-logo {
  color: darkgrey;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  padding: 5px 10px; /* 增加悬停触发区域 */
  font-family: 'BlackPineMincho', Arial, sans-serif;
  display: inline-block;
  
}



/* 2. 平行菜单容器：默认收缩隐藏 */
.horizontal-menu {
    /* 启用 Flexbox，让链接水平排列 */
    display: flex; 
    align-items: center; 
    
    /* 默认状态：收缩，不占据宽度 */
    width: 0;
    overflow: hidden; /* 隐藏溢出的链接 */
    opacity: 0;
    
    /* 添加过渡效果 */
    transition: width 0.4s ease-out, opacity 0.2s;
}
/* 🔴 关键新增 3：鼠标悬停在整个导航栏区域时，背景变为黑色 🔴 */
.navbar:hover {
    background-color: black;
}

/* logo不变 */
.nav-logo {
  color: darkgrey; 
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  padding: 5px 10px;
  font-family: 'BlackPineMincho', Arial, sans-serif;
  display: inline-block;
}


.horizontal-menu a {
    /* 默认颜色改为黑色 (在 whitesmoke 上) */
    color: #000; 
    transition: color 0.3s ease; /* 启用颜色过渡 */
    /* 保持原有样式... */
}

/* 悬停时菜单链接颜色变白 */
.navbar:hover .horizontal-menu a {
    color: white; 
}

/* 3. 菜单链接样式 (字号和颜色要求) */
.horizontal-menu a {
    /* 字号与 "header.intro p" (假设是 16px 或 18px) 相同 */
    font-size: 16px; 
    color: white; /* 颜色为白色 (这是默认颜色，悬停时会变) */
    text-decoration: none;
    
    /* 添加链接之间的间距 */
    padding: 0 15px; 
    white-space: nowrap; /* 防止链接文字换行 */
}

/* 4. JS 触发的扩展状态 (关键) */
.horizontal-menu.expanded {
    /* 扩展时：给一个足够容纳所有链接的固定宽度 */
    width: 300px; 
    opacity: 1;
}


header.intro, main.project-page {
  /* 文本块的最大宽度 */
  max-width: 600px; 
  /* 关键：设置左右外边距为 auto 来实现块级元素的水平居中 */
  margin-left: auto;
  margin-right: auto;
  
  padding-left: 10px;
  padding-right: 10px;
  
  text-align: left; 
  font-family: 'BlackPineMincho', Arial, sans-serif;
  
  padding-top: 80px; 
}


/* ------------------------------------- */
/* Story 画廊样式 (响应式 Grid 布局) */
/* ------------------------------------- */
.story-gallery {
  /* 居中整个画廊容器，并限制最大宽度 */
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 10px;
  
  display: grid;
  gap: 10px;
  
  /* 核心响应式代码：宽屏约 6 列，窄屏自动调整 */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* 每一个 Story 条目样式 (定义 9:16 比例) */
.story-item {
  display: block; 
  padding-top: 177.78%; /* 创建 9:16 比例的竖长方形 */
  position: relative; 
  overflow: hidden; 
  border-radius: 8px; 
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 内部图片/视频定位 */
.story-item img,
.story-item video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  object-fit: cover; 
  display: block;
  transition: transform 0.3s ease;
}

/* 鼠标悬停时的放大效果 */
.story-item:hover img,
.story-item:hover video {
  transform: scale(1.05);
}

.image-container {
  display: flex;
  flex-direction: column;
  align-items: center; 
  gap: 5px; 
  max-width: 400px; 
  margin: 0 auto 20px auto; 
  padding: 0 10px;
}


@media (min-width: 1000px) {
  .image-container {
    flex-direction: row; 
    max-width: 805px; 
    justify-content: center;
  }
}


.project-link img {
  width: 100%; 
  max-width: 400px; 
  border-radius: 5px;
  display: block;
  margin: 0;
}

.project-page img {
  width: 100%;        
  max-width: 600px; 
  display: block;
  margin: 0 auto;
  border-radius: 5px;
}


/* cv侧面抽屉 */
.cv-side-panel {
    width: 0; 
    position: fixed; 
    z-index: 1050; 
    
   
    top: 60px; /* 导航栏安全高度 */
    height: calc(100% - 60px); /* 总高度减去导航栏的高度 */
    
    left: 0;
    background-color: #f1f1f1; 
    overflow-y: auto; /* 允许内容垂直滚动 */
    overflow-x: hidden; 
    padding-top: 20px; 
    padding-left: 0; /* 默认隐藏时无内边距 */
    padding-right: 20px; /* 内部内容右侧留白 */
    
    /* 核心动画：默认隐藏在左侧屏幕外 */
    transition: 0.5s; 
    transform: translateX(-100%);
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
}

/* 面板打开状态 */
.cv-side-panel.open {
    width: 400px; /* 展开后的宽度 */
    transform: translateX(0); /* 滑入屏幕 */
    padding-left: 20px; /* 展开后显示内容内边距 */
}

/* ------------------------------------- */
/* 遮罩层样式 */
/* ------------------------------------- */
.overlay {
    position: fixed;
    /* 🔴 关键设置：从导航栏下方开始，不遮挡它 🔴 */
    top: 60px; 
    height: calc(100% - 60px); 
    
    width: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 1040; /* 必须低于抽屉面板 (1005) */
    display: none; /* 默认隐藏 */
}

.overlay.visible {
    display: block;
}

/* ------------------------------------- */
/* 抽屉内关闭按钮样式 */
/* ------------------------------------- */
.cv-side-panel .close-btn {
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 36px;
    border: none;
    background: none;
    cursor: pointer;
    color: #555;
    z-index: 1060; 
}

.lang-dropdown-container {
    position: relative;

    margin-left: auto;
    padding-right: 40px; /* 右侧留白 */
    z-index: 1002; /* 确保它高于主菜单 */
}

/* 触发按钮 "A/文" 样式 */
.lang-trigger {
    color: darkgrey; /* 默认烟灰色 */
    text-decoration: none;
    font-size: 12px; 
    padding: 5px 10px;
    display: block;
    cursor: pointer;
    /* 为悬停变色添加过渡 */
    transition: color 0.3s ease; 
    letter-spacing: -4px;

}

/* 菜单内容容器：默认隐藏 */
/* 菜单内容容器 */
.lang-dropdown-content {
    /* 默认隐藏，使用 opacity 和 visibility 实现平滑过渡 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    
    position: absolute;
    
    /* 🔴 关键修改 1：缩小宽度 🔴 */
    min-width: 80px; /* 从 150px 缩小到 100px 左右 */
    
    /* 🔴 关键修改 2：向下推一点，避开导航栏底部 🔴 */
    /* top: 120%; 会让它在导航栏下方显示一点空隙，防止遮挡感 */
    top: 120%; 
    right: 0; /* 靠右对齐 */
    
    /* 🔴 关键修改 3：黑色背景 🔴 */
    background-color: black; 
    box-shadow: 0 4px 8px rgba(255,255,255,0.2); /* 使用浅色阴影，在黑背景上更明显 */
    padding: 5px 0;
    z-index: 1003; 
}

/* 菜单打开状态 (JS 切换) */
.lang-dropdown-content.show-lang {
    opacity: 1;
    visibility: visible;
}

/* 菜单中的链接样式 */
.lang-dropdown-content a {
    color: white; 
    
    padding: 8px 12px; /* 调整内边距适应新宽度 */
    text-decoration: none;
    display: block;
    font-size: 12px;
}

.lang-dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* 🔴 核心：配合导航栏悬停变黑，文字颜色切换 🔴 */
.navbar:hover .lang-trigger {
    /* 保持 Logo 是 darkgrey，但触发按钮在悬停时可以变色 */
    color: white; 
}

.navbar:hover .lang-dropdown-content a {
    color: white; /* 菜单内容文字变白 */
}

/* 确保悬停在菜单项上时背景颜色能显示在黑色导航栏上 */
.navbar:hover .lang-dropdown-content a:hover {
    background-color: #333; 
    color: white; 
}