/* ===========================================
== 自定义字体
=========================================== */
@font-face {
  font-family: 'NotoSansSC'; 
  src: url('/fonts/subset-NotoSansSC-ExtraBold.woff2') format('woff2'),
       url('/fonts/subset-NotoSansSC-ExtraBold.woff') format('woff');
  font-weight: bold; 
  font-style: normal; 
}
/* ===========================================
== 设定风格颜色
=========================================== */
:root {
  /* --primary-color:#3effb8; */
  --primary-color:#7bd3e9;
  --background-dark: #000;
  --text-light: #b7ab98;
  --text-red: #EB5939;
  --sidebar-group:#898B8E;
  --sidebar-menu:#cfd4d5;
  --dialog-background:#2a2a2e;
  --dialog-border:#3a3a3e;
  /* ... */
}
/* ===========================================
== body
=========================================== */
body{
    overflow-x: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-light);
    /* background: var(--background-dark) url(/images/bj.png) center center no-repeat fixed; */
    background-color: var(--background-dark);
    background-size: cover;
}
/* ===========================================
== 外层 Grid：定义左右两栏的宏观结构
=========================================== */
.page-container {
  display: grid;
  /* 15rem 给侧边栏，1fr 给主内容区 */
  grid-template-columns: 15rem 1fr;
}
/* ===========================================
== 侧边栏
=========================================== */
.sidebar {
    display: flex;
    flex-direction: column; /* 设置主轴为垂直方向 */
    align-items: flex-start; /* 交叉轴（水平）从左侧开始对齐 */
    /* 启用粘性定位 */
    position: sticky;
    /* 规定它“粘住”的位置,当滚动到距离视口顶部0时，它就开始固定 */
    top: 0;
    /* 视口高度的100%,确保侧边栏的高度能覆盖内容区（如果内容区很长） */ 
    height: 100vh;
    background-color: #080808;
    border-right:1px solid #333333;
}
.sidebar .logo{
    margin:2rem 0 0.8rem 2rem;
    width:3.5rem;
    height:3.5rem;
    border-radius: 50%; 
    background: url("/images/logo.png") no-repeat;
    background-color: var(--primary-color);
    background-size:3.5rem 3.5rem;
    /* cursor: pointer;  */
	transition: all 0.3s ease-in-out;
}
.sidebar .logo:hover{
    filter: brightness(1.1);
	transition: all 0.3s ease-in-out;
	margin-left:2.3rem;
}
.sidebar span{
    /* 禁用所有主流浏览器中的文本选中功能 */
    user-select: none;
    margin-top:0.8rem;
    font-size:0.7rem;
    color:var(--text-light);
    padding:0.25rem 0 0.25rem 0;
    padding-left: 2rem;
}
.sidebar .nav-link{
    /* 1. 开启 Flex 布局，让子元素（SVG和文本）排在同一行 */
    display: flex;    
    /* 2. 垂直居中对齐所有子元素 */
    align-items: center;     
    /* 3. （重要）防止元素在宽度不足时换行 */
    flex-wrap: nowrap;
    /* 禁用所有主流浏览器中的文本选中功能 */
    user-select: none;

    width: 13rem;
    padding:0.3rem 0;
    padding-left: 1.8rem;
    font-size: 1rem;
    font-weight:700;
    color:var(--text-light);
    cursor: pointer;
    border-radius:0 2rem 2rem 0; 
	transition: all 0.3s ease-in-out;
}
.sidebar .nav-link:hover{
    color: #fff;
    transition: all 0.1s ease-in-out;
}
.sidebar .nav-link:active{
    color: #fff;
}
/* 点击后（活跃）的样式 */
.sidebar .nav-link.active {
    color: #fff;
    background:rgba(255,255,255,.2);
    transition: all 0.3s ease-in-out;
}
/* 侧边栏底部链接 (精准定位) 简历*/
.sidebar .footer-link {
    position: absolute; 
    bottom: 0;
    /* 保持左右定位，与父容器的 padding/margin 对齐 */
    /* left: 0;
    right: 0; */
    
    margin: 0 2rem 3rem;
    padding:0.5rem 0;
    width: 11rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight:700;
    color:var(--text-light);
    cursor: pointer;
    border-radius:0.5rem; 
    border: 1px solid rgba(255, 255, 255, .15);
    background-color: rgba(255, 255, 255, .05);
	transition: all 0.3s ease-in-out;
	
}
/* 导航菜单 - 统一图标的尺寸和显示方式 */
.menu-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
}

/* ===========================================
== 右侧主内容区 - 自我介绍
=========================================== */
.about-container{
    /* height: 100vh; */
    display: flex;
    flex-direction: column; /* 设置主轴为垂直方向 */
    align-items: center;
    background: url(/images/bg-stars.jpg) center center no-repeat fixed;
}
/* 头部文字+按钮 */
.about-container .header-content{
    z-index: 100;
    font-weight: 700;
    margin: 6% 20% 2%;
    text-align: center;
}
/* 副标题英文 */
.about-container .subtitle{
    font-family: 'NotoSansSC', "Arial Black", sans-serif;
    font-size: 2rem;
}
/* 大标题 */
.about-container .main-title{
    font-family: 'NotoSansSC', "Arial Black", sans-serif;
    margin-top: 1rem;
    font-size: 6rem;
    line-height: 110%;
}
.about-container .main-title .color-orange{
    color: var(--text-red);
}
/* 头部按钮 */
.about-container button{
    margin-top: 4%;
    font-size: 1.2rem;
    font-weight: 700;
    color: #000;
    padding: 0.6rem 2.2rem;
    border: 0.1rem solid var(--text-light);
    background: var(--text-light);
    border-radius:5rem;
    box-shadow: 0 1rem 6rem rgba(254, 160, 45, .3);
    transition: all 0.3s ease-in-out;
}
.about-container button:hover{
    color: #B7AB98;
    background: transparent;
    box-shadow: 0 1rem 6rem rgba(254, 160, 45, .6);
    transition: all 0.3s ease-in-out;
}
.about-container button:active{
    box-shadow: 0 1rem 6rem rgba(254, 160, 45, .9);
}
/* 篝火视频 */
.campfire-area {
    width: 38rem;
    height: auto;
    object-fit: cover;
    pointer-events: none; /* 禁用视频所有鼠标和触摸事件 */
}

/* ===========================================
== 右侧主内容区 - 内容图片列表
=========================================== */
.content-grid {
    display: grid;
    /*
    * 核心代码:
    * auto-fit: 自动填充，尽可能多地在一行内容纳列。
    * minmax(30rem, 1fr): 每个卡片的最小宽度是30rem，最大宽度是1份（平分剩余空间）。
    * 当屏幕宽度无法容纳两个30rem的卡片时，它会自动变成单列。
    */
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    /* 卡片之间的间距 */
    gap: 2rem;
    /* 左右两侧的内边距 */
    padding: 0 4%;

}
main h2{
    font-family: 'NotoSansSC', "Arial Black", sans-serif;
    font-size:2rem;
    /* line-height: 2.7rem; */
    color:var(--text-light);
    padding:7rem 0 4rem 0;
    font-weight: 700;
    padding-left: 4%;
}
main h2 span{
    color: var(--text-red);
}
/* h2图标 */
main .h2-icon {
    width: 4rem;
    height: 4rem;
    margin-right: 0.5rem;
    border-radius: 10rem;
    border: 0.15rem solid var(--text-light);
    padding: 0.5rem;
    margin-bottom: 2rem;
}
main li{
    margin-bottom: 4rem;
}
main li a{
    display:block;
    width:100%;
    /* height:100%; */
    /*设置宽高比为 4 宽 / 3 高 */
    aspect-ratio: 4 / 3;
    border-radius: 1.2rem;
	transition: all 0.3s ease-in-out;
	box-shadow: 0 1.25rem 1.25rem rgba(0, 0, 0, 0.1);
	margin-top: 0.4rem;
	}
main li a:hover{
    transition: all 0.3s ease-in-out;
    box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.4);
    /* width: 32rem; */
	margin-top: 0;
    filter: brightness(0.7);
    }
main li img{
    width: 100%;
    height: 100%;
    /* background-color: #c0c0c0; */
    object-fit: cover;
    border-radius:1.2rem;
}

/* ===========================================
== 弹出式窗口 - 显示html
=========================================== */
/* 关键：强制隐藏后面主页面滚动条，并防止内容移动 */
.modal-active {
    overflow: hidden !important;
    padding-right: 15px; /* 补偿滚动条消失时页面内容的微小移动 (可选) */
}
/* 1. 定制全屏遮罩 (Backdrop) */
dialog::backdrop {
    background-color: rgba(29, 29, 31, .8);
    backdrop-filter: saturate(180%) blur(20px);
}
/* 2. 可选：iFrame 和 Dialog 的尺寸与样式 */
#contentDialog {
    position: fixed;
    /* bottom: 0;
    top: auto; */
    border: none;
    padding: 0;
    margin: auto;
    /* 设置最大宽度 */
    max-width: 100vw; 
    /* 设置最大高度 */
    min-height: 10rem;
    /* max-height: 100vh;  */
    background: transparent; /* 确保 dialog 本身没有白色背景 */
    border-radius:1.5rem;
    border:0.1rem solid var(--dialog-border);
    /* box-shadow: 0 -2rem 2rem rgba(255, 255, 255, 0.1); */
    /* 保证弹窗没有滚动条，要有滚动条在iframe里，要不然小尺寸分辨率会有两个滚动条 */
    overflow: hidden;
}
#contentDialog #externalFrame {
    /* 与上面黑色标题栏高度一致，避免内容重叠 */
    margin-top: 4rem;
    /* padding-left: 0.75rem; */
    padding: 0 0.3% 1.6% 1.6%;
    /* 您想要的 iFrame 宽度 */
    /* width: 50vw; */
    width: 75rem;
    /* 您想要的 iFrame 高度 */
    height: 75vh;
    /* 给 iFrame 内容一个背景 */
    /* background-color: rgb(46, 46, 48); */
    background-color: var(--dialog-background);
    /* border-bottom-left-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem; */
}

/* ===========================================
== 弹出式窗口 - 固定头部样式
=========================================== */
/*背景*/
#contentDialog .fixed-header {
    position: absolute;
    top: 0;
    width: 100%;
    height: 4rem;     
    /* border-bottom:1px solid rgba(255, 255, 255, .1); */
    z-index: 100;
    background-color: var(--dialog-background);
    /* background-color: rgba(29, 29, 31, .7);
    backdrop-filter: saturate(180%) blur(20px); */
}
/*头像、标题、关闭按钮的排列*/
#contentDialog .header-content {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem 0 1.5rem;
}
/*头像*/
#contentDialog .avatar{
    /* margin:2rem 0 0.8rem 2.5rem; */
    width:1.8rem;
    height:1.8rem;
    border-radius: 50%; 
    background: url("/images/logo.png") no-repeat;
    background-color: #7bd3e9;
    background-size:1.8rem 1.8rem;
    /*不显示点击小手*/
    cursor: default;
    /*确保图标不被挤压*/
    flex-shrink: 0;
}
/* 标题 */
#contentDialog .title_display{
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
    white-space: nowrap; /* 强制文本不换行 */
    overflow: hidden;    /* 隐藏溢出部分 */
    text-overflow: ellipsis; /* 将溢出部分显示为省略号 (...) */
}
/* 关闭按钮 */
#contentDialog #closeBtn { 
    display: flex; 
    align-items: center; 
    color: rgba(255, 255, 255, .8);
    font-size: 1rem; 
    padding: 0.4rem;
    border-radius: 50%;
    /* border:0.1rem solid rgba(255, 255, 255, .8); */
    /*确保图标不被挤压*/
    flex-shrink: 0;
	/* transition: all 0.3s ease-in-out; */
}
#contentDialog #closeBtn:hover{
    background-color: rgba(255, 255, 255, .1);
	/* transition: all 0.3s ease-in-out; */
}
#contentDialog #closeBtn svg { 
    width: 1.2rem; 
    height: 1.2rem; 
    /* margin-right: 0.2rem;  */
    /* 核心微调：将 SVG 垂直下移一点，与文字视觉中心对齐 */
    /* 使用 relative 定位或 transform 微调，这里用 transform 更简洁 */
    /* transform: translateY(1px); */
}


/* ===========================================
== 媒体查询：适用于 平板 和 手机 (小于 768px)
=========================================== */
@media (max-width: 768px) {     
    /* 1. 外层 Grid：改为单列堆叠 */
    .page-container {
        grid-template-columns: 1fr; 
    }    
    /* 2. 侧边栏 FIX：移除固定定位，使其正常堆叠 */
    .sidebar {
        position: static; 
        height: auto; 
        /* 手机上可以考虑将导航项居中 */
        align-items: center; 
        /* padding-left: 0; */
    }
    .sidebar a{
        text-align: center;
    }
    /* 4. 内容区 Grid FIX：确保在小屏幕上，卡片即使只剩一列，也完全填满左右空间 */
    .content-grid {
        /* KEY FIX: 
           当宽度很小时，将 minmax 的最小值设为 0（或 100px），
           让 1fr 完全占据所有可用宽度，消除空白。 */
        grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); 
        gap: 1rem; /* 卡片之间的间距 */
        padding: 0 6%;
    }
}