/* ============================================
   PROJECTS — accordion page styles
   Used by: projects.html
   ============================================ */

.panel-right {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(100deg,
    #12112a 0%, #0c0b1e 10%, #080714 50%, #03020a 75%, #000 100%);
  padding: 60px 56px;
}

.panel-right::-webkit-scrollbar { width: 4px; }
.panel-right::-webkit-scrollbar-track { background: transparent; }
.panel-right::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.category-block { margin-bottom: 12px; }

.category-header {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; padding: 18px 0;
  border-bottom: 1.5px solid rgba(255,255,255,0.12);
  user-select: none;
}

.category-header:hover .category-name { opacity: 0.7; }

.category-name {
  font-size: 36px; font-weight: 900;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-shadow: 0 0 2px rgba(255,255,255,0.4);
  transition: opacity 0.15s;
}

.category-arrow {
  font-size: 20px; color: rgba(255,255,255,0.4);
  transition: transform 0.25s ease;
}

.category-block.open .category-arrow { transform: rotate(180deg); }

.category-body { overflow: hidden; max-height: 0; transition: max-height 0.35s ease; }
.category-block.open .category-body { max-height: 9999px; }

.subcat-header {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; padding: 14px 0 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  user-select: none;
}

.subcat-header:hover .subcat-name { opacity: 0.6; }

.subcat-name {
  font-size: 18px; font-weight: 600; color: #aaa;
  letter-spacing: 0.06em; text-transform: lowercase;
  transition: opacity 0.15s;
}

.subcat-count { font-size: 11px; color: #444; margin-left: 10px; }

.subcat-arrow {
  font-size: 14px; color: rgba(255,255,255,0.25);
  transition: transform 0.2s ease;
}

.subcat-block.open .subcat-arrow { transform: rotate(180deg); }

.subcat-body { overflow: hidden; max-height: 0; transition: max-height 0.3s ease; }
.subcat-block.open .subcat-body { max-height: 9999px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));  /* ← was 220px */
  gap: 20px;        /* ← slightly more breathing room */
  padding: 20px 0 20px 16px;
}


.project-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; overflow: hidden;
  cursor: pointer; transition: transform 0.18s ease, border-color 0.18s ease;
  text-decoration: none; color: inherit; display: block;
}

.project-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.2); }

.project-thumb {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; background: #0d0c20; display: block;
}

.thumb-placeholder {
  width: 100%; aspect-ratio: 16/9; background: #0d0c20;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #2a2a40;
}

.project-info { padding: 12px 14px 14px; }

.project-title {
  font-size: 13px; font-weight: 700; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.project-meta { font-size: 11px; color: #555; }

.project-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

.tag {
  background: rgba(255,255,255,0.05); border-radius: 3px;
  padding: 2px 7px; font-size: 10px; color: #666;
}

.empty-subcat { padding: 20px 0 20px 16px; font-size: 12px; color: #333; }

.project-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 10px;
}

.project-thumb-wrap .project-thumb,
.project-thumb-wrap .thumb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  aspect-ratio: unset;
  transition: transform 0.3s ease;
}

.project-card:hover .project-thumb,
.project-card:hover .thumb-placeholder {
  transform: scale(1.04);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.overlay-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}

.overlay-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
}

.overlay-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* remove old below-thumb info block if still present */
.project-info { display: none; }

.overlay-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



#loading { padding: 60px; color: #333; font-size: 14px; }

@media (max-width: 768px) {
  .panel-right { height: auto; overflow: visible; padding: 32px 20px; }
  .category-name { font-size: 26px; }
}
