/* ── Project Detail — case study layout ───────────────────── */
.pd-page {
  --pd-accent: #667eea;
  --pd-accent-2: #764ba2;
  --pd-surface: rgba(255, 255, 255, 0.97);
  --pd-border: rgba(102, 126, 234, 0.1);
  --pd-text: #475569;
  --pd-heading: #0f172a;
  --pd-radius: 20px;
  --pd-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 48px rgba(15, 23, 42, 0.07);
}

.pd-page {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--pd-heading);
  -webkit-font-smoothing: antialiased;
}

/* ── Hero ─────────────────────────────────────────────────── */
.pd-hero {
  position: relative;
  min-height: clamp(320px, 42vh, 480px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  padding: 5.5rem 1.5rem 4.5rem;
}

.pd-hero-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: 2;
}

.pd-hero-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.pd-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: pdOrbFloat 12s ease-in-out infinite;
}

.pd-orb-1 {
  width: 520px;
  height: 520px;
  background: rgba(255, 255, 255, 0.45);
  top: -200px;
  left: -100px;
}

.pd-orb-2 {
  width: 340px;
  height: 340px;
  background: rgba(0, 0, 0, 0.15);
  bottom: -80px;
  right: 5%;
  animation-delay: 4s;
}

.pd-orb-3 {
  width: 280px;
  height: 280px;
  background: rgba(255, 255, 255, 0.25);
  top: 20%;
  right: 30%;
  animation-delay: 8s;
}

@keyframes pdOrbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, -16px) scale(1.05);
  }
}

.pd-hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(0deg, #f8fafc 0%, transparent 100%);
  z-index: 4;
  pointer-events: none;
}

body.dark-mode .pd-hero::after {
  background: linear-gradient(0deg, #0a0f1e 0%, transparent 100%);
}

/* Loading & error */
.pd-loading,
.pd-error {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  color: white;
  min-height: 200px;
}

.pd-spinner {
  position: relative;
  width: 64px;
  height: 64px;
}

.pd-spinner-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: pdSpin 0.85s linear infinite;
}

.pd-spinner i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
}

@keyframes pdSpin {
  to {
    transform: rotate(360deg);
  }
}

.pd-error-box {
  text-align: center;
  color: white;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  border-radius: var(--pd-radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 400px;
}

.pd-error-box i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.9;
}

.pd-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  background: white;
  color: var(--pd-accent);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.pd-btn-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

/* Hero content */
.pd-hero-text {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.1rem;
  max-width: 900px;
  width: 100%;
  z-index: 5;
  position: relative;
  animation: pdFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pdFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pd-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.2s;
}

.pd-breadcrumb a:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.pd-breadcrumb .sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
}

.pd-breadcrumb .current {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-hero-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.85rem, 4.5vw, 3.25rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-shadow: 0 2px 32px rgba(0, 0, 0, 0.2);
}

.pd-hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 680px;
  line-height: 1.7;
  font-weight: 400;
}

.pd-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.pd-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.pd-hero-pill i {
  font-size: 0.72rem;
  opacity: 0.9;
}

.pd-hero-pill--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pdPulse 1.8s ease-in-out infinite;
}

@keyframes pdPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ── Layout ───────────────────────────────────────────────── */
.pd-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.pd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
  padding: 0 0 2rem;
  margin-top: -2.5rem;
  position: relative;
  z-index: 6;
}

.pd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--pd-surface);
  border: 1px solid var(--pd-border);
  border-radius: 10px;
  color: var(--pd-accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  transition: all 0.22s ease;
}

.pd-back:hover {
  border-color: rgba(102, 126, 234, 0.35);
  transform: translateX(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.12);
}

.pd-share-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Gallery / carousel ─────────────────────────────────── */
.pd-gallery {
  margin-bottom: 1.75rem;
}

.pd-carousel {
  position: relative;
  border-radius: var(--pd-radius);
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--pd-shadow), 0 0 0 1px var(--pd-border);
  aspect-ratio: 16 / 9;
  cursor: zoom-in;
}

.pd-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease, transform 0.5s ease;
}

.pd-carousel:hover img {
  transform: scale(1.02);
}

.pd-carousel-counter {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: white;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-variant-numeric: tabular-nums;
}

.pd-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.2s ease, background 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.pd-carousel:hover .pd-carousel-btn,
.pd-carousel:focus-within .pd-carousel-btn {
  opacity: 1;
}

.pd-carousel-btn.left {
  left: 1rem;
}

.pd-carousel-btn.right {
  right: 1rem;
}

.pd-carousel-btn:hover {
  background: var(--pd-accent);
  color: white;
  transform: translateY(-50%) scale(1.05);
}

.pd-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 3;
  padding: 0.35rem 0.6rem;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  border-radius: 999px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  width: 20px;
  border-radius: 4px;
  background: white;
}

.pd-carousel-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.pd-carousel-thumbs::-webkit-scrollbar {
  height: 4px;
}

.pd-carousel-thumbs::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 4px;
}

.pd-thumb {
  flex: 0 0 88px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
  padding: 0;
  background: #1e293b;
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-thumb:hover {
  opacity: 0.9;
}

.pd-thumb.active {
  opacity: 1;
  border-color: var(--pd-accent);
  transform: translateY(-2px);
}

/* Lightbox */
.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 12, 24, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.pd-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.pd-lightbox img {
  max-width: min(1200px, 95vw);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.pd-lightbox-close,
.pd-lightbox-nav {
  position: absolute;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.pd-lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.1rem;
}

.pd-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pd-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
}

.pd-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pd-lightbox-nav.prev {
  left: 1.25rem;
}

.pd-lightbox-nav.next {
  right: 1.25rem;
}

.pd-lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ── Content cards ────────────────────────────────────────── */
.pd-sections {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pd-card {
  background: var(--pd-surface);
  border-radius: var(--pd-radius);
  padding: 2rem 2.1rem;
  box-shadow: var(--pd-shadow);
  border: 1px solid var(--pd-border);
}

.pd-card .section-label {
  margin-bottom: 0.65rem;
}

.pd-card-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pd-heading);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.02em;
}

.pd-card-title i {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pd-accent), var(--pd-accent-2));
  color: white;
  border-radius: 10px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.pd-text {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--pd-text);
}

/* Features */
.pd-features {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.pd-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  background: linear-gradient(145deg, rgba(102, 126, 234, 0.04), rgba(118, 75, 162, 0.06));
  border: 1px solid var(--pd-border);
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
  line-height: 1.45;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.pd-features li:hover {
  border-color: rgba(102, 126, 234, 0.28);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.08);
  transform: translateY(-2px);
}

.pd-features li i {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pd-accent), var(--pd-accent-2));
  color: white;
  border-radius: 10px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Numbered bullets */
.pd-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  counter-reset: pd-bullet;
}

.pd-bullets li {
  counter-increment: pd-bullet;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(102, 126, 234, 0.03);
  border: 1px solid rgba(102, 126, 234, 0.08);
  font-size: 0.95rem;
  color: var(--pd-text);
  line-height: 1.65;
  transition: background 0.2s, border-color 0.2s;
}

.pd-bullets li::before {
  content: counter(pd-bullet, decimal-leading-zero);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--pd-accent);
  background: rgba(102, 126, 234, 0.1);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

.pd-bullets li:hover {
  background: rgba(102, 126, 234, 0.06);
  border-color: rgba(102, 126, 234, 0.15);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.pd-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pd-sidebar-card {
  background: var(--pd-surface);
  border-radius: var(--pd-radius);
  padding: 1.65rem;
  box-shadow: var(--pd-shadow);
  border: 1px solid var(--pd-border);
  overflow: hidden;
}

.pd-sidebar-card::before {
  content: "";
  display: block;
  height: 3px;
  margin: -1.65rem -1.65rem 1.25rem;
  background: linear-gradient(90deg, var(--pd-accent), var(--pd-accent-2), #a78bfa);
}

.pd-sidebar-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pd-heading);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pd-sidebar-heading i {
  color: var(--pd-accent);
}

.pd-sidebar-list {
  list-style: none;
  padding: 0;
}

.pd-sidebar-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.pd-sidebar-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pd-sidebar-list > li > i {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 126, 234, 0.08);
  color: var(--pd-accent);
  border-radius: 10px;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.pd-sidebar-list > li > span {
  display: block;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--pd-text);
  flex: 1;
  min-width: 0;
}

.pd-sidebar-list strong {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.3rem;
}

.tech-stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
  width: 100%;
}

.tech-stack-tags .tech-tag {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.28rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  background: rgba(102, 126, 234, 0.08);
  border: 1px solid rgba(102, 126, 234, 0.16);
  color: #4f46e5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #059669;
}

.pd-demo-link {
  color: #4338ca;
  font-weight: 600;
  font-size: 0.82rem;
  word-break: break-all;
  text-decoration: none;
}

.pd-demo-link:hover {
  text-decoration: underline;
}

.pd-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pd-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.22s ease;
  border: 1px solid transparent;
}

.pd-btn--primary {
  background: linear-gradient(135deg, var(--pd-accent), var(--pd-accent-2));
  color: white;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.pd-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(102, 126, 234, 0.45);
}

.pd-btn--ghost {
  background: transparent;
  border-color: var(--pd-border);
  color: var(--pd-accent);
}

.pd-btn--ghost:hover {
  background: rgba(102, 126, 234, 0.06);
  border-color: rgba(102, 126, 234, 0.25);
}

/* ── Prev / Next ──────────────────────────────────────────── */
.project-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.nav-project {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  background: var(--pd-surface);
  border: 1px solid var(--pd-border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--pd-heading);
  transition: all 0.22s ease;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  min-height: 72px;
}

.nav-project:only-child {
  grid-column: 1 / -1;
}

.nav-project:hover {
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 0 10px 32px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.nav-project.next {
  justify-content: space-between;
  text-align: right;
}

.nav-project.next div {
  flex: 1;
  text-align: right;
}

.nav-project i {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pd-accent), var(--pd-accent-2));
  color: white;
  border-radius: 10px;
  flex-shrink: 0;
  font-size: 0.78rem;
}

.nav-project div span {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}

.nav-project div strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

/* ── Related ──────────────────────────────────────────────── */
.related-projects {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--pd-border);
  margin-top: 1rem;
}

.related-projects .section-label {
  display: block;
  text-align: center;
  margin-bottom: 0.5rem;
}

.related-projects h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--pd-heading);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: -0.03em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.related-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--pd-border);
  text-decoration: none;
  background: var(--pd-surface);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(102, 126, 234, 0.14);
}

.related-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.related-card:hover img {
  transform: scale(1.06);
}

.related-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.55) 0%, transparent 55%);
  pointer-events: none;
}

.related-card-arrow {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: var(--pd-accent);
  border-radius: 8px;
  font-size: 0.75rem;
  z-index: 1;
  opacity: 0;
  transform: translate(4px, 4px);
  transition: opacity 0.25s, transform 0.25s;
}

.related-card:hover .related-card-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.related-card-info {
  padding: 1.15rem 1.25rem 1.25rem;
}

.related-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--pd-heading);
  line-height: 1.35;
}

.related-card p {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Dark mode ────────────────────────────────────────────── */
body.dark-mode.pd-page {
  --pd-surface: rgba(18, 24, 40, 0.97);
  --pd-border: rgba(102, 126, 234, 0.14);
  --pd-text: #94a3b8;
  --pd-heading: #e2e8f0;
}

body.dark-mode .pd-card,
body.dark-mode .pd-sidebar-card,
body.dark-mode .nav-project,
body.dark-mode .related-card,
body.dark-mode .pd-back {
  background: var(--pd-surface);
}

body.dark-mode .pd-features li {
  color: #cbd5e1;
  background: rgba(102, 126, 234, 0.08);
}

body.dark-mode .pd-bullets li {
  background: rgba(102, 126, 234, 0.06);
  border-color: rgba(102, 126, 234, 0.12);
}

body.dark-mode .tech-stack-tags .tech-tag {
  background: rgba(102, 126, 234, 0.14);
  border-color: rgba(102, 126, 234, 0.25);
  color: #a5b4fc;
}

body.dark-mode .pd-demo-link {
  color: #a5b4fc;
}

body.dark-mode .pd-sidebar-list li {
  border-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .pd-back {
  color: #a5b4fc;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .pd-grid {
    grid-template-columns: 1fr;
    margin-top: -1.5rem;
  }

  .pd-sidebar {
    position: static;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .project-navigation {
    grid-template-columns: 1fr;
  }

  .nav-project.next div {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .pd-hero {
    padding: 5rem 1rem 3.5rem;
    min-height: 280px;
  }

  .pd-card {
    padding: 1.5rem;
  }

  .pd-features {
    grid-template-columns: 1fr;
  }

  .pd-wrap {
    padding: 0 1rem;
  }

  .pd-carousel-btn {
    opacity: 1;
    width: 38px;
    height: 38px;
  }

  .pd-thumb {
    flex: 0 0 72px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-orb,
  .pd-hero-text,
  .pd-hero-pill--live::before {
    animation: none;
  }

  .pd-carousel img,
  .related-card img,
  .nav-project,
  .pd-features li {
    transition: none;
  }
}
