/* --- works.css --- Works 页面专用布局 --- */
.works-content-wrapper {
position: fixed;
top: 50%;
left: 52%;
transform: translate(-45%, -50%);
width: 85vw;
height: 75vh;
display: flex;
z-index: 100;
}

.works-sidebar {
width: 220px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
padding-bottom: 8vh;
gap: 80px;
}

.nav-group {
display: flex;
flex-direction: column;
gap: 12px;
}

#timeNav,
#catNav {
display: flex;
flex-direction: column;
gap: 20px;
}

.nav-label {
font-size: 9px;
letter-spacing: 4px;
text-transform: uppercase;
color: rgba(255,255,255,0.3);
font-weight: 300;
}

.nav-link {
color: white;
text-decoration: none;
font-size: 11px;
letter-spacing: 2px;
opacity: 0.5;
transition: all 0.4s;
width: fit-content;
position: relative;
cursor: pointer;
text-transform: uppercase;
}

.nav-link::after {
content: '';
position: absolute;
bottom: -4px;
left: 0;
width: 0;
height: 1px;
background: white;
transition: width 0.3s;
}

.nav-link:hover {
opacity: 1;
}

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

.works-slider {
flex: 1;
display: flex;
overflow-x: auto;
overflow-y: hidden;
scroll-behavior: smooth;
gap: 8vw;
padding: 0 15vw 0 2vw;
align-items: center;
cursor: grab;
user-select: none;
}

.works-slider:active {
cursor: grabbing;
}

.works-slider::-webkit-scrollbar {
display: none;
}

.work-card {
flex: 0 0 auto;
width: 32vw;
height: 50vh;
display: flex;
flex-direction: column;
justify-content: center;
position: relative;
}

.work-img-box {
width: 100%;
height: 85%;
overflow: hidden;
position: relative;
background: rgba(255, 255, 255, 0.03);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
transition: background 0.5s ease;
}

.light-mode .work-img-box {
background: rgba(0, 0, 0, 0.03);
}

.work-img-box img {
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0;
transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
transform 1s cubic-bezier(0.19, 1, 0.22, 1),
box-shadow 0.5s ease;
pointer-events: none;
}

.work-img-box img.loaded {
opacity: 1;
}

.work-img-box.is-loaded {
background: transparent;
backdrop-filter: none;
-webkit-backdrop-filter: none;
}

.work-img-box {
transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1),
box-shadow 0.5s ease;
}

.work-card:hover .work-img-box {
transform: scale(1.05);
box-shadow: 0 24px 45px rgba(0, 0, 0, 0.3);
}

.work-meta {
margin-top: 20px;
pointer-events: none;
}

.work-type {
font-size: 9px;
letter-spacing: 3px;
color: rgba(255,255,255,0.4);
text-transform: uppercase;
}

.work-name {
font-size: clamp(14px, 1.6vw, 18px);
letter-spacing: 6px;
color: white;
font-weight: 100;
margin: 8px 0;
text-transform: uppercase;
}

.progress-bar-container {
position: absolute;
bottom: 5vh;
left: 220px;
width: calc(100% - 320px);
height: 1px;
background: rgba(255,255,255,0.1);
}

.progress-fill {
width: 0%;
height: 100%;
background: white;
transition: width 0.1s linear;
}

.lightbox {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.95);
z-index: 1000;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
visibility: hidden;
transition: all 0.5s ease;
backdrop-filter: blur(15px);
cursor: zoom-out;
}

.lightbox.active {
opacity: 1;
visibility: visible;
}

.lightbox-content {
position: relative;
width: 85vw;
height: 48vw;
max-height: 80vh;
display: flex;
justify-content: center;
cursor: default;
}

.lightbox-media {
width: 100%;
height: 100%;
border: none;
}

.lightbox-close {
position: absolute;
top: -40px;
right: 0;
color: white;
font-size: 11px;
cursor: pointer;
letter-spacing: 6px;
font-weight: 200;
transition: opacity 0.3s;
}

.lightbox-close:hover {
opacity: 0.5;
}

/* 亮色适配局部 */
.light-mode .nav-link,
.light-mode .work-name,
.light-mode .lightbox-close {
color: black;
}

.light-mode .nav-label,
.light-mode .work-type {
color: rgba(0,0,0,0.4);
}

.light-mode .nav-link::after,
.light-mode .progress-fill {
background: black;
}

.light-mode .progress-bar-container {
background: rgba(0,0,0,0.1);
}

/* 当前页高亮 */
.menu-link.current-page {
opacity: 0.4 !important;
pointer-events: none;
transform: translateX(0) !important;
}

/* ---------------- MOBILE ---------------- */
@media (max-width: 768px) {

.top-right-util {
  top: 22px;
  right: 26px;
}

.works-content-wrapper {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: 100%;
  height: 100vh;
  display: block;
  padding: 88px 14px 18px;
  box-sizing: border-box;
  overflow: hidden;
}

.works-sidebar {
  width: 100%;
  height: auto;
  padding-bottom: 0;
  gap: 14px;
  justify-content: flex-start;
  margin-bottom: 18px;
  position: sticky;
  top: 0;
  z-index: 120;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding-top: 8px;
  padding-bottom: 6px;
}

.light-mode .works-sidebar {
  background: transparent;
}

.nav-group {
    gap: 8px;
}

.nav-label {
    font-size: 8px;
    letter-spacing: 3px;
}

#timeNav,
#catNav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#timeNav::-webkit-scrollbar,
#catNav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    flex: 0 0 auto;
    font-size: 10px;
    letter-spacing: 1.5px;
    white-space: nowrap;
    padding: 2px 0;
}

.works-slider {
    width: 100%;
    height: calc(100vh - 210px);
    display: flex;
    flex-direction: column;
    gap: 22px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0 60px 0;
    align-items: stretch;
    cursor: auto;
    -webkit-overflow-scrolling: touch;
}

.work-card {
  width: 100%;
  height: auto;
  padding-bottom: 10px;
}

.work-img-box {
  width: 100%;
  height: 26vh;
}

.work-card:hover .work-img-box {
    transform: none;
    box-shadow: none;
}

.work-meta {
    margin-top: 12px;
}

.work-type {
    font-size: 8px;
    letter-spacing: 2px;
}

.work-name {
  font-size: 13px;
  letter-spacing: 2px;
  line-height: 1.45;
  margin: 6px 0 0 0;
}

.progress-bar-container {
    display: none;
}

.lightbox-content {
    width: 92vw;
    height: 70vh;
    max-height: none;
}

.lightbox-close {
    top: -28px;
    font-size: 10px;
    letter-spacing: 4px;
}

}
