/* Project pages: closing navigation + visible keyboard focus */
:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid #1a1a1a;
  outline-offset: 3px;
}
body.dark-mode :where(a, button, summary, [tabindex]):focus-visible {
  outline-color: #ffed00;
}

.project-nav {
  max-width: 1000px;
  margin: 72px auto 40px;
  padding: 0 20px;
  font-family: "Montserrat", Arial, sans-serif;
}
.project-nav .pn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid rgba(128, 128, 128, 0.35);
}
.project-nav a {
  text-decoration: none;
  color: inherit;
}
.project-nav .pn-back {
  align-self: center;
  font-weight: 700;
  padding: 10px 4px;
  border-bottom: 3px solid #ffed00;
}
.project-nav .pn-next {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 320px;
  max-width: 520px;
  margin-left: auto;
  padding: 10px 16px 10px 10px;
  border: 1px solid rgba(128, 128, 128, 0.45);
  border-radius: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.project-nav .pn-next img {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
}
.project-nav .pn-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.project-nav .pn-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}
.project-nav .pn-title {
  font-weight: 800;
  line-height: 1.25;
}
.project-nav .pn-arrow {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}
.project-nav .pn-next:hover,
.project-nav .pn-next:focus-visible {
  transform: translateY(-2px);
  border-color: #ffed00;
  box-shadow: 0 0 22px 2px rgba(255, 237, 0, 0.45);
}
.project-nav .pn-next:hover .pn-arrow {
  transform: translateX(4px);
}
.project-nav .pn-cta {
  margin-top: 36px;
  text-align: center;
}
.project-nav .pn-cta p {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 700;
}
/* Same "light switches on" idea as the CV buttons; the border keeps the shape visible on white */
.project-nav .pn-btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: #fff7b8;
  color: #3a3500;
  border: 2px solid #8a7d00;
  font-weight: 800;
  transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}
.project-nav .pn-btn:hover,
.project-nav .pn-btn:focus-visible {
  background: #ffed00;
  color: #000;
  box-shadow: 0 0 22px 4px rgba(255, 237, 0, 0.6);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
  .project-nav .pn-next,
  .project-nav .pn-btn,
  .project-nav .pn-arrow { transition: none; }
  .project-nav .pn-next:hover,
  .project-nav .pn-btn:hover { transform: none; }
}
@media (max-width: 600px) {
  .project-nav { margin-top: 48px; }
  .project-nav .pn-next { max-width: none; flex-basis: 100%; }
}
