:root{
  --bodyfont:"Roboto Mono", monospace;
  --bodytext-color:#7b7b7b;
  --importanttext-color:#242424;
  --hover-color:#b766d7;
  --hover-a-color:rgba(183, 102, 215, 0.4);
  --font-size-body: clamp(14px, 1.6vw, 18px);
  --font-size-small:clamp(12px,1.4vw,14px);
}

#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;   
}
/* hide sidebar */


@media (max-width: 768px) {
  :root { font-size: 14px; } /* Tablet 缩小 */
}

@media (max-width: 480px) {
  :root { font-size: 12px; } /* 手机适配 */
}

/* 隐藏 checkbox */
#menu-toggle {
  display: none;
}
/* open sidebar */
#menu-btn span {
  display: block;  /* show sidebar */
  height: 3px;
  width: 100%;               
  background: var(--importanttext-color); 
  border-radius: 2px;
  transition: all 0.2s ease-in-out;
  transform-origin: right center;
}

/* logo animation */
#menu-btn .line1 { transform: scaleX(1); }
#menu-btn .line2 { transform: scaleX(0.8); }
#menu-btn .line3 { transform: scaleX(0.6); }

#menu-btn:hover .line1 {
  transform: scaleX(0.4);
  background: #b766d7;
  transition-delay: 0s;
}
#menu-btn:hover .line2 {
  transform: scaleX(1);
  background: #b766d7;
  transition-delay: 0.05s;
}
#menu-btn:hover .line3 {
  transform: scaleX(0.7);
  background: #b766d7;
  transition-delay: 0.1s;
}

#menu-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1001;
}
/* sidebar */
@media (max-width: 480px) {
  #menu-btn {
    width: 2.5rem;
    height: 1.625rem;
    right: 1rem;
    top: 0.75rem;
  }
  #menu-btn span {
    height: 0.25rem;
  }
}

#sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 250px;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  box-shadow: -2px 0 4px rgba(0,0,0,0.2);
  transform: translateX(100%);      
  transition: transform 0.3s ease-in-out; 
  z-index: 1000;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

#sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#sidebar li {
  margin: 16px 0;
  padding: 0px;
}
#sidebar a {
  display: block;
  color: var(--importanttext-color);
  text-decoration: none;
  font-family: "Roboto Mono", monospace;
}
#sidebar .menu a {
  font-size: var(--font-size-body);
}
#sidebar .contact {
  margin-top: auto; 
  padding-bottom: 220px;
}
#sidebar .contact a {
  font-size: var(--font-size-body);
  color: var(--importanttext-color);
}


.clickline {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  color: var(--importanttext-color);
  text-decoration: none;
  position: relative;

}
.clickline.active {
  color: #000; 
  cursor: default; 
  pointer-events: none; 
}

.clickline.active::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 39%;
  height: 2px;
  background-color: #000000; 
  border-radius: 2px;
}
.nav-link {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  color: var(--importanttext-color);
  text-decoration: none;
  position: relative;

}
.nav-link.active {
  color: #000; 
  cursor: default; 
  pointer-events: none; 
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 42%;
  height: 2px;
  background-color: #000000; 
  border-radius: 2px;
}

#menu-btn:hover ~ #sidebar,
#sidebar:hover {
  transform: translateX(0);
}
#menu-toggle:checked ~ #sidebar {
  transform: translateX(100%);
}

/* Body */
body {
  margin: 0;
  padding: 40px 0 0 0;
  font-family: "Roboto Mono", monospace;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
/* content in passport */
.passport {
  position: relative;
  width: 625.5px;
  height: 920.95px;
  background: url("bg.png") no-repeat center/contain;
  border-radius: 40px;
  /* box-shadow: 0 8px 20px rgba(0,0,0,0.25); */
}

.label {
  color:var(--bodytext-color);
  font-size:  var(--font-size-small);
  /* letter-spacing: 1px; */
}
/* basic info */
.info {
  position: absolute;
  top: 150px;   /* 往下放 */
  left: 340px;
  font-size: var(--font-size-small);
  line-height: 1.4;
  color: var(--bodytext-color);
  width: 260px; /* 保证和右侧插画区隔开 */
}

.info p {
  margin: 8px 0;        
}
.info p.group {
  margin: 10px 0 4px; /* 上大 下小 → 形成视觉块 */
}
.info strong {
  font-weight: 400;
}
.group p {
  margin-bottom: 0;
}
.group ul {
  margin-top: 4px; 
  padding: 0;
  top:0;
  list-style: none;
  color:var(--importanttext-color);
}
.info li {
  margin: 4px 0;
}
.value {
  color:var(--importanttext-color);
}

.dropdown {
  font-family: "Roboto Mono", monospace;
  color: var(--importanttext-color);
  background: transparent;   
  border: none; 
  /* border-bottom: 1px solid #aaa; 下划线风格 */
  padding: 2px 4px;
  outline: none;
  cursor: pointer;
}

.dropdown option {
  background: #fff;             /* 下拉展开时的背景 */
  color: #000;
}
.dropdown option:hover {
  background: var(--hover-a-color);
}


.hover {
  position: relative;
  display: inline-block;
  color: var(--importanttext-color);
  text-decoration: none;
}
.hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;         
  width: 0;
  background-color: rgba(183, 102, 215, 0.4);
  transition: width 0.3s ease;
  z-index: 0;         
}
.hover:hover::after {
  width: 100%;
}


/* "**" */
.symbols {
  position: absolute;
  top: 400px;  
  left: 25px; 
  font-size: var(--font-size-small);
  font-weight: 600;
  color: var(--bodytext-color);
  letter-spacing: 2px;
}
.visual-id {
  position: absolute;
  top: 420px;     
  left: 25px;
  font-size: var(--font-size-small);
  color: var(--bodytext-color);
  letter-spacing: 2px;
}
.profile-pic {
  position: absolute;
  top: 180px;
  left: 60px;
  height: 200px;
  width: auto;
  z-index: 5; /* 添加图层控制 */
}
/* secondpage */
.secondpage {
  position: relative;
  font-size: var(--font-size-small);
  color: var(--bodytext-color);
  text-transform: uppercase;
  margin: 520px 25px 25px; /* 上下留空 */
  letter-spacing: 2px;
}

.newprojects-list {
  display: flex;
  flex-direction: column;
  gap: 20px; /* 行距 */
  margin-bottom: 80px;
  font-family: "Roboto Mono", monospace;
}

.newproject {
  display: grid;
  grid-template-columns: 150px 100px 1fr 60px; 
  align-items: center;     
  gap: 10px;
  margin-left: 25px;
  font-size: var(--font-size-small);
  color:var(--bodytext-color);
  position: relative;     
  cursor: pointer;       
  overflow: hidden;
}
.newproject .name{
  color: var(--importanttext-color);
  text-transform: uppercase;
}

.newproject::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;         
  width: 0;
  background-color: rgba(183, 102, 215, 0.4);
  transition: width 0.3s ease;
  z-index: 0;         
}
.newproject:hover::after {
  width: 95%;
}
.newproject * {
  position: relative;
  z-index: 1;
}
.newproject:hover {
  color: var(--importanttext-color);
  text-decoration: none;
}

/* 
.custom-message {
  font-family: "Roboto Mono", monospace;
  font-size: var(--font-size-small);
  margin-left: 25px;
  color: var(--importanttext-color);
  text-transform: uppercase;
}

.custom-message form {
  position:relative;
  margin-top: 20px;
}
.input-wrap {
  position:relative;
}

.custom-message input {  
  width: 95%;
  border: none;
  border-bottom: 1px solid #5f5f5f; 
  margin-top: 20px;
  background: transparent;
  color: var(--importanttext-color);
  font-style: italic;
  font-family: "Roboto Mono", monospace;
  font-size: var(--font-size-small);
  outline: none;  
  padding: 5px 0; 
  margin-right:20px;

}

.custom-message input::placeholder {
  color: var(--bodytext-color);
  font-style: italic; 
}
.send-btn {
  position: absolute;
  right: 20px;                
  bottom: 10px; 
  border: none;
  background: transparent;
  color: var(--hover-color);      
  font-size: var(--font-size-small);
  opacity: 0;
  transform: translateY(2px); 
  transition: 
    opacity 0.4s ease,
    transform 0.4s ease,
    color 0.3s ease;
}


.custom-message input:valid + .send-btn {
  opacity: 1; 
  transform: translateY(0); 
  color: var(--hover-color);
  cursor: pointer;
}


.custom-message input:valid + .send-btn:hover {
  color:var(--importanttext-color);    
  transform: translateX(3px); 
} 
*/


.feedback-btn {
  font-family: var(--bodyfont);
  font-size: var(--font-size-small);
  color: var(--importanttext-color);
  background: transparent;
  border: 1px solid var(--hover-color);
  padding: 8px 16px;
  cursor: pointer;
  transition: 0.3s;
  margin-left: 25px;
  margin-top: 40px;
}
.feedback-btn:hover {
  background: var(--hover-color);
  color: white;
}
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

/* ========== POPUP BOX ========== */
.popup-box {
  display: flex;
  flex-direction: column;
  align-items: center;      /* 水平居中 */
  justify-content: center;  /* 垂直居中（内容会自动往中间排） */

  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 30px;
  width: 330px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);

  font-family: var(--bodyfont);
  position: relative;
    animation: popupFadeScale 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes popupFadeScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 关闭动画 (反向 Apple style) */
@keyframes popupFadeScaleOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* 默认，没有动画 */
.popup-box {
  opacity: 0; 
  transform: scale(0.95);
}
.popup-inner {
  width: 100%;
  padding: 0 12px 20px;   
  box-sizing: border-box;
}

.popup-inner input,
.popup-inner textarea,
.popup-inner button {
  width: 100%;
  box-sizing: border-box;
}
.popup-title {
  margin-bottom: 10px;
  color: var(--importanttext-color);
  font-size: 18px;
}

/* Close button */
.popup-close {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 28px;
  color: var(--importanttext-color);
  cursor: pointer;
  transition: 0.2s;
}
.popup-close:hover {
  color: var(--hover-color);
}

/* Form fields */
#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--bodytext-color);
  background: transparent;
  font-family: var(--bodyfont);
  margin-top: 6px;
  margin-bottom: 10px;
}

.popup-submit {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  border: none;
  background: var(--hover-color);
  color: white;
  font-family: var(--bodyfont);
  font-size: var(--font-size-small);
  cursor: pointer;
  transition: 0.3s;
}
.popup-submit:hover {
  background: var(--importanttext-color);
}

.site-footer {
  text-align: center;        
  padding: 20px 0;           
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  width: 100%;
  margin-top: 20px; 
  margin-bottom:20px;
}
        
html[lang="zh-CN"] * {
  font-family: "Noto Sans Mono CJK", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace !important;
  letter-spacing: 0.5px;
  font-weight: 400;
}








/* Projectpage */
.category-header {
  position: fixed;       
  top: 20px;
  left: 0px;
  width: 100%;

  display: flex;
  justify-content: left;
  align-items: left;
  gap: 40px;
  padding-left: 30px;
  padding-right: 30px;
  max-width: 1600px;
  margin-left: auto; 
  margin-right: auto;
  z-index: 999;       
  box-sizing: border-box;                  
}

.tab {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(18px, 1.5vw, 22px);
  cursor: pointer;
  color: #000000;
  position: relative;
  transition: color 0.3s ease;
  text-align: right;
  
}

/* hover 效果 */
.tab:hover {
  color: var(--hover-color);
}


/* 激活状态：上方粉色条 */
.tab::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--hover-a-color);
  opacity: 0;              /* 初始透明 */
  transform: scale(0.95);  /* 稍微缩小一点，增加动画感 */
  transition: 
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* 平滑动画 */
   z-index: -1;
   
}
.tab.active::after {
  opacity: 1;        /* 淡入 */
  transform: scale(1); /* 轻微放大 */
}

.tab.active {
  color:var(--bodytext-color);
}




.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1.4fr);
  gap: 10px;
  row-gap: 50px;  /* 控制每一行之间的视频垂直距离 */
  column-gap: 40px;
  margin-top: 60px;
  margin-bottom: 80px;
  padding-left: 30px;
  padding-right: 30px;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
@media (max-width: 1024px) {

  .gallery {
    grid-template-columns: 1fr;
  }
}
.Project_cover {
  position: relative;
  width: 100%;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.Project_cover video {
  
  width: 100%; /* 完全填满列宽 */
  height: auto; /* 自动保持比例 */
  aspect-ratio: 16 / 9; /* 保持 16:9 比例 */
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  object-fit: cover; /* 保持视觉裁切一致 */
}
.Project_cover:hover video {
  transform: scale(1.05);
}

.Project_cover.hidden {
  display: none;
}





