/* ========================================
   PROJECTS PAGE - Bryl Lim / Brittany Chiang Inspired
   Numbered editorial project list with clean hover effects
   ======================================== */

/* ========================================
   TWO-COLUMN LAYOUT
   ======================================== */

.proj-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-top: 32px;
  align-items: start;
  height: calc(100vh - 180px);
}

/* ========================================
   PROJECT LIST - Fixed left, scrollable
   ======================================== */

.proj-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  max-height: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--card-border) transparent;
  padding-right: 4px;
}

.proj-list__header {
  display: none;
}

.proj-detail__header {
  display: none;
}

@media (max-width: 768px) {
  .proj-hero-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.proj-list::-webkit-scrollbar {
  width: 4px;
}

.proj-list::-webkit-scrollbar-track {
  background: transparent;
}

.proj-list::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 4px;
}

.proj-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 28px 20px;
  border-bottom: 1px solid var(--card-border);
  cursor: pointer;
  transition: background 0.25s ease, padding-left 0.25s ease, opacity 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.proj-item[style*="display: none"] {
  opacity: 0;
  pointer-events: none;
}

.proj-item:first-child {
  border-top: 1px solid var(--card-border);
}

.proj-item:hover {
  background: var(--hover-bg);
  padding-left: 28px;
}

.proj-item.active {
  background: var(--hover-bg);
}

/* Number index */
.proj-item__num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.4;
  font-family: 'Inter', monospace;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.proj-item:hover .proj-item__num,
.proj-item.active .proj-item__num {
  opacity: 1;
  color: var(--text-main);
}

/* Content area */
.proj-item__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proj-item__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.proj-item__sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* Arrow indicator */
.proj-item__arrow {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.proj-item:hover .proj-item__arrow,
.proj-item.active .proj-item__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================
   DETAIL SECTION - Expanded project info
   ======================================== */

.proj-detail {
  margin-top: 0;
  padding: 0;
  overflow-y: auto;
  max-height: 100%;
  scrollbar-width: none;
}

.proj-detail::-webkit-scrollbar {
  display: none;
}

.proj-detail__inner {
  padding: 36px 32px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--card-bg);
  position: relative;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Subtle accent line at the top */
.proj-detail__inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--text-main) 0%, transparent 100%);
  opacity: 0.15;
}

.proj-detail__inner.switching {
  opacity: 0;
  transform: translateY(12px);
}

.proj-detail__num {
  font-size: 4rem;
  font-weight: 800;
  color: var(--text-muted);
  opacity: 0.08;
  position: absolute;
  top: 12px;
  right: 28px;
  line-height: 1;
  font-family: 'Inter', sans-serif;
  pointer-events: none;
}

.proj-detail__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 20px;
  line-height: 1.3;
}

/* Meta info row */
.proj-detail__meta {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
}

.proj-detail__meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proj-detail__meta-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.proj-detail__meta-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.proj-detail__desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 24px;
}

/* Features section */
.proj-detail__features {
  margin-bottom: 24px;
}

.proj-detail__section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin: 0 0 12px;
}

.proj-detail__feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proj-detail__feature-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}

.proj-detail__feature-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--text-main);
  opacity: 0.5;
}

.proj-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.proj-detail__tags span {
  background: var(--hover-bg);
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.proj-detail__tags span:hover {
  border-color: var(--text-muted);
}

.proj-detail__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.proj-detail__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  border: 1px solid var(--card-border);
  padding: 10px 20px;
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.proj-detail__link:hover {
  background: var(--hover-bg);
  border-color: var(--text-main);
  transform: translateX(4px);
}

.proj-detail__link--secondary {
  color: var(--text-muted);
  border-color: var(--card-border);
}

.proj-detail__link--secondary:hover {
  color: var(--text-main);
}

.proj-detail__link[style*="display: none"] {
  display: none;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .proj-layout {
    grid-template-columns: 1fr;
    gap: 0;
    height: auto;
  }

  .proj-list {
    max-height: none;
    overflow-y: visible;
  }

  /* Detail becomes a modal on mobile */
  .proj-detail {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    max-height: none;
    overflow-y: visible;
  }

  .proj-detail.mobile-open {
    display: flex;
  }

  .proj-detail__inner {
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    border: none;
    padding: 28px 20px 40px;
    animation: slideUp 0.3s ease;
  }

  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

@media (max-width: 600px) {
  .proj-item {
    grid-template-columns: 40px 1fr auto;
    gap: 14px;
    padding: 20px 12px;
  }

  .proj-item__num {
    font-size: 1.2rem;
  }

  .proj-item__title {
    font-size: 0.88rem;
  }

  .proj-item__sub {
    font-size: 0.68rem;
  }

  .proj-detail__inner {
    padding: 22px 16px;
  }

  .proj-detail__title {
    font-size: 1.1rem;
  }

  .proj-detail__desc {
    font-size: 0.82rem;
    line-height: 1.7;
  }

  .proj-detail__num {
    font-size: 2.5rem;
    top: 8px;
    right: 14px;
  }

  .proj-detail__meta {
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    margin-bottom: 18px;
  }

  .proj-detail__meta-label {
    font-size: 0.62rem;
  }

  .proj-detail__meta-value {
    font-size: 0.8rem;
  }

  .proj-detail__features {
    margin-bottom: 18px;
  }

  .proj-detail__section-title {
    font-size: 0.72rem;
  }

  .proj-detail__feature-list li {
    font-size: 0.78rem;
  }

  .proj-detail__tags {
    gap: 6px;
    margin-bottom: 20px;
  }

  .proj-detail__tags span {
    font-size: 0.66rem;
    padding: 4px 10px;
  }

  .proj-detail__actions {
    gap: 8px;
  }

  .proj-detail__link {
    font-size: 0.78rem;
    padding: 8px 14px;
  }
}

@media (max-width: 480px) {
  .proj-item {
    grid-template-columns: 32px 1fr auto;
    gap: 10px;
    padding: 16px 10px;
  }

  .proj-item__num {
    font-size: 1rem;
  }

  .proj-item__title {
    font-size: 0.82rem;
  }

  .proj-item__sub {
    font-size: 0.64rem;
  }

  .proj-item__arrow {
    width: 16px;
    height: 16px;
  }

  .proj-detail__inner {
    padding: 18px 14px;
    border-radius: 12px;
  }

  .proj-detail__title {
    font-size: 1rem;
  }

  .proj-detail__meta {
    gap: 12px;
  }
}
