.projects-page-main {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
}

/* per-project section */
.project-section {
  scroll-margin-top: 1.5rem;
  padding: 0;
  overflow: hidden;
}

.project-section.highlight {
  border-color: var(--line-soft);
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.35), var(--shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* two-column split */
.project-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

/* left: description */
.project-description {
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-right: 1px solid var(--line);
}

.project-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--line-soft);
}

.project-label-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.wip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  animation: wip-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes wip-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

.project-description h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--accent);
  line-height: 1.25;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}

.project-tech span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(55, 60, 66, 0.8);
  color: var(--line-soft);
}

.project-body {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.93rem;
  line-height: 1.65;
}

.project-highlights {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-soft);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.project-highlights li::marker {
  color: var(--line-soft);
}

.project-live-link {
  display: inline-block;
  margin-top: auto;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
  transition:
    border-color var(--anim-fast) ease,
    background-color var(--anim-fast) ease,
    transform var(--anim-fast) ease;
}

.project-live-link:hover,
.project-live-link:focus-visible {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

/* right: code / image panel */
.project-panel {
  display: flex;
  flex-direction: column;
  background: #181b1f;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #1e2126;
  flex-shrink: 0;
}

.panel-filename {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.38);
  font-family: "Courier New", Courier, monospace;
}

/* code block */
.code-block {
  margin: 0;
  padding: 1.1rem 1.2rem;
  overflow: auto;
  flex: 1;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  line-height: 1.65;
  color: #c9d1d9;
  white-space: pre;
  background: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.code-block code {
  display: block;
}

/* basic syntax tinting via color only  no JS needed */
.code-block {
  color: #c9d1d9;
}

/* image panel */
.project-panel--image {
  background: #1a1d21;
}

.image-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: rgba(255,255,255,0.25);
  text-align: center;
  padding: 2rem;
}

.image-placeholder svg {
  opacity: 0.3;
}

.image-placeholder p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.3) !important;
}

.image-placeholder code {
  font-size: 0.8rem;
  background: rgba(255,255,255,0.07);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: rgba(255,255,255,0.45);
}

/* responsive */
@media (max-width: 820px) {
  .project-layout {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .project-description {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .project-panel {
    min-height: 320px;
  }

  .code-block {
    font-size: 0.72rem;
  }
}

@media (max-width: 640px) {
  .project-description {
    padding: 1.4rem 1.2rem;
  }

  .project-panel {
    min-height: 260px;
  }
}