/* ============================================
   PROJECTS PAGE — additional styles
   Inherits from ../css/style.css
   ============================================ */

/* ----- PAGE HEADER ----- */
.page-header {
  padding: 140px 0 40px;
  position: relative; z-index: 1;
}
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--text-dim);
  margin-bottom: 28px; transition: color 0.3s;
}
.back-link:hover { color: var(--accent); }
.page-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700; line-height: 1.1;
  margin-bottom: 12px;
}
.page-sub {
  font-size: 1rem; color: var(--text-muted);
  max-width: 500px;
}

/* ----- LAYOUT ----- */
.projects-page { padding: 20px 0 80px; position: relative; z-index: 1; }
.projects-layout { display: flex; gap: 40px; align-items: flex-start; }

/* ----- SIDEBAR ----- */
.projects-sidebar {
  flex-shrink: 0;
  width: 200px;
  position: sticky; top: 100px;
}
.sidebar-title {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin-bottom: 16px;
}
.filter-list { list-style: none; }
.filter-list li { margin-bottom: 4px; }
.filter-btn {
  width: 100%; text-align: left;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s;
  font-family: var(--font-body);
}
.filter-btn:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.filter-btn.active {
  color: var(--accent);
  background: var(--accent-bg);
  border-color: rgba(201,169,92,0.2);
}

/* ----- GRID ----- */
.projects-grid-all {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Project card in all-projects view — override some main.css styles */
.projects-grid-all .project-card {
  cursor: pointer;
  transition: all 0.35s ease;
}
.projects-grid-all .project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(201,169,92,0.08) inset;
}

/* ----- MODAL ----- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  padding: 20px;
}
.modal-overlay.open {
  opacity: 1; pointer-events: auto;
}
.modal {
  background: #111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 600px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim); cursor: pointer;
  transition: all 0.3s; z-index: 1;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-body { padding: 40px 32px 32px; }

.modal-body .modal-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-bg);
  border-radius: 4px;
  font-size: 0.72rem; font-weight: 500;
  color: var(--accent); margin-bottom: 16px;
}
.modal-body h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem; font-weight: 700;
  margin-bottom: 16px;
}
.modal-body .modal-desc {
  font-size: 0.95rem; color: var(--text-muted);
  line-height: 1.7; margin-bottom: 24px;
}
.modal-body .modal-tech {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.modal-body .modal-tech span {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem; color: var(--text-dim);
  font-family: var(--font-mono);
  background: var(--bg-card);
}
.modal-body .modal-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px;
  background: var(--accent); color: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600;
  transition: all 0.3s;
}
.modal-body .modal-link:hover {
  background: #d4b96e;
  box-shadow: 0 6px 24px var(--accent-glow);
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px;
}
.empty-state p {
  font-size: 1rem; color: var(--text-dim);
}

/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
  .projects-layout { flex-direction: column; }
  .projects-sidebar {
    width: 100%; position: static;
    margin-bottom: 24px;
  }
  .filter-list {
    display: flex; flex-wrap: wrap; gap: 6px;
  }
  .filter-list li { margin-bottom: 0; }
  .filter-btn { width: auto; }
  .projects-grid-all { grid-template-columns: 1fr; }
  .modal { max-width: 95vw; }
  .modal-body { padding: 28px 20px 24px; }
}

@media (max-width: 480px) {
  .page-header { padding: 120px 0 30px; }
  .modal-body h2 { font-size: 1.4rem; }
}
