/* =========================================================================
   Astra 3D Studio — 全局作品集侧边栏导航组件 (Global Portfolio Drawer)
   ========================================================================= */

:root {
  --pf-bg: rgba(9, 13, 24, 0.94);
  --pf-border: rgba(255, 255, 255, 0.12);
  --pf-primary: #38bdf8;
  --pf-glow: rgba(56, 189, 248, 0.25);
  --pf-text: #f8fafc;
  --pf-text-muted: #94a3b8;
  --pf-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --pf-mono: 'JetBrains Mono', monospace;
}

/* 顶部左上角作品集快速触发器胶囊 (Trigger Capsule) */
.btn-portfolio-menu {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 9999px;
  padding: 6px 14px 6px 11px;
  font-family: var(--pf-font);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
  z-index: 999;
}
.btn-portfolio-menu:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--pf-primary);
  box-shadow: 0 0 20px var(--pf-glow), 0 8px 24px rgba(0, 0, 0, 0.7);
  transform: translateY(-1px);
}
.btn-portfolio-menu svg {
  stroke: var(--pf-primary);
  transition: transform 0.2s ease;
}
.btn-portfolio-menu:hover svg {
  transform: scale(1.1);
}

/* 侧边栏暗色高斯模糊遮罩层 (Backdrop Overlay) */
.portfolio-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 18, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* 侧边栏滑出抽屉主体 (Slide-Out Off-Canvas Drawer) */
aside.portfolio-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 330px;
  max-width: 86vw;
  height: 100vh;
  height: 100dvh;
  background: var(--pf-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-right: 1px solid var(--pf-border);
  box-shadow: 16px 0 50px rgba(0, 0, 0, 0.85);
  z-index: 9999;
  transform: translateX(-105%);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  font-family: var(--pf-font);
  color: var(--pf-text);
  overflow-y: auto;
  scrollbar-width: none;
}
aside.portfolio-drawer::-webkit-scrollbar {
  display: none;
}
aside.portfolio-drawer.open {
  transform: translateX(0);
}

/* 侧边栏顶部品牌与关闭键 */
.pf-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pf-border);
  margin-bottom: 16px;
}
.pf-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pf-brand-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pf-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pf-primary);
  box-shadow: 0 0 10px var(--pf-primary);
}
.pf-brand-sub {
  font-size: 0.68rem;
  font-family: var(--pf-mono);
  color: var(--pf-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pf-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--pf-border);
  color: var(--pf-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.pf-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* 侧边栏作品列表区 */
.pf-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.pf-section-title {
  font-size: 0.65rem;
  font-family: var(--pf-mono);
  color: var(--pf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 6px;
  margin-top: 4px;
}

.pf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--pf-text);
  text-decoration: none;
  transition: all 0.22s ease;
  position: relative;
}
.pf-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(3px);
}
.pf-item.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: inset 0 0 16px rgba(56, 189, 248, 0.1);
}
.pf-icon {
  font-size: 1.25rem;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pf-item.active .pf-icon {
  background: rgba(56, 189, 248, 0.22);
}
.pf-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.pf-title {
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-desc {
  font-size: 0.68rem;
  font-family: var(--pf-mono);
  color: var(--pf-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-item.active .pf-desc {
  color: var(--pf-primary);
}
.pf-badge-curr {
  font-family: var(--pf-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--pf-primary);
  background: rgba(56, 189, 248, 0.18);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* 下一个大工程占位卡 (Major Project Placeholder) */
.pf-item.upcoming {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(244, 63, 94, 0.12));
  border: 1px dashed rgba(139, 92, 246, 0.4);
  cursor: default;
}
.pf-item.upcoming:hover {
  transform: none;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(244, 63, 94, 0.18));
}
.pf-badge-upcoming {
  font-family: var(--pf-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: #c084fc;
  background: rgba(192, 132, 252, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(192, 132, 252, 0.4);
}

/* 侧边栏底部状态栏 */
.pf-foot {
  padding-top: 14px;
  border-top: 1px solid var(--pf-border);
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--pf-text-muted);
  font-family: var(--pf-mono);
}
.pf-foot-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
}
.pf-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
