/* ==========================================================================
   Projects page
   Implements the "projects" design handoff: hero with jump chips and three
   category lists. The project rows themselves reuse the homepage row
   component (.hp-row and friends), so both pages stay in sync; this file only
   adds the hero, the category headers and the placeholder row treatments.
   Prefixed `pj-`.
   ========================================================================== */

.pj-hero,
.pj-cat {
  --pj-pad-x: clamp(24px, 5vw, 80px);
  --pj-max: 1280px;
}

.pj-hero *,
.pj-cat * {
  box-sizing: border-box;
}

.pj-inner {
  max-width: var(--pj-max);
  margin: 0 auto;
}

/* ---- hero ---------------------------------------------------------------- */

.pj-hero {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: center;
  padding: 66px var(--pj-pad-x) clamp(50px, 6vw, 80px);
  background: #ffffff;
  background-image: linear-gradient(rgba(39, 44, 205, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 44, 205, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
}

.pj-hero .pj-inner {
  position: relative;
  width: 100%;
}

.pj-eyebrow {
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: #272ccd;
  margin-bottom: 34px;
}

.pj-h1 {
  font-family: "Roboto Mono", monospace;
  font-weight: 700;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -2px;
  text-transform: uppercase;
  color: #333333;
  margin: 0;
}

.pj-caret {
  color: #ff6237;
  animation: pj-caret 1.1s step-end infinite;
}

@keyframes pj-caret {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.pj-lead {
  font-family: "Ubuntu", Helvetica, sans-serif;
  font-weight: 300;
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.35;
  max-width: 760px;
  color: #333333;
  margin: 18px 0 0;
  text-wrap: pretty;
}

.pj-lead span {
  color: #272ccd;
}

.pj-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.pj-chip {
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  color: #333333;
  border: 1px solid rgba(39, 44, 205, 0.3);
  border-radius: 4px;
  padding: 8px 14px;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.pj-chip:hover,
.pj-chip:focus-visible {
  border-color: #ff6237;
  color: #ff6237;
}

.pj-scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #272ccd;
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.pj-arrow {
  font-size: 14px;
  animation: pj-bob 1.6s ease-in-out infinite;
}

@keyframes pj-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* ---- category sections --------------------------------------------------- */

.pj-cat {
  background: #ffffff;
  padding: clamp(30px, 4vw, 48px) var(--pj-pad-x) clamp(50px, 6vw, 80px);
}

/* the first list sits right under the hero and gets a little more air */
.pj-cat-first {
  padding-top: clamp(40px, 5vw, 64px);
}

/* the last list is followed by the contact block, so it closes the page */
.pj-cat-last {
  padding-bottom: clamp(70px, 9vw, 120px);
}

/* A category kept in the page but not shown, with its hero chip. Remove the
   two classes in projects.html to bring the category back. */
.pj-cat-hidden,
.pj-chip-hidden {
  display: none;
}

/* whichever list ends up last gets the deeper closing padding */
.pj-cat:has(+ .pj-cat-hidden) {
  padding-bottom: clamp(70px, 9vw, 120px);
}

.pj-cat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 40px;
}

.pj-label {
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  letter-spacing: 2px;
  color: #ff6237;
  margin-bottom: 12px;
}

.pj-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.pj-h2 {
  font-family: "Roboto Mono", monospace;
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: #333333;
  margin: 0;
}

.pj-count {
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  letter-spacing: 1px;
  color: #272ccd;
}

/* orange "coming_soon" pill, next to a section title */
.pj-soon {
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #ffffff;
  background: #ff6237;
  border-radius: 4px;
  padding: 6px 12px;
}

/* closes a list, mirroring the border-top each row carries */
.pj-row-end {
  border-top: 1px solid #b4b4be;
}

/* ---- placeholder rows ---------------------------------------------------- */

/* A row that is not a link yet: greyed numeral, desaturated thumbnail under a
   [ wip ] label, grey title and tags. Built on .hp-row so the four columns
   line up with the live rows above it. */
.pj-wip {
  background: #fbfbfc;
}

.pj-wip .hp-num {
  color: #b4b4be;
}

.pj-wip .hp-thumb {
  position: relative;
}

.pj-wip .hp-thumb img {
  filter: grayscale(1);
  opacity: 0.4;
}

.pj-wip-flag {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.35);
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #272ccd;
}

.pj-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pj-meta-row .hp-client {
  margin-bottom: 0;
}

.pj-pill {
  font-family: "Roboto Mono", monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: #ffffff;
  background: #ff6237;
  border-radius: 4px;
  padding: 4px 8px;
}

.pj-wip .hp-row-text h3,
.pj-muted-title {
  color: #8f8f9c;
}

.pj-tag-muted {
  color: #b4b4be;
  border-color: #b4b4be;
}

/* the "next up" row has no artwork at all — an empty dashed frame instead */
.pj-nda {
  border-bottom: 1px solid #b4b4be;
}

.pj-nda-thumb {
  flex: 1 1 200px;
  min-width: 165px;
  max-width: 260px;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  border: 1px dashed #b4b4be;
  background: #eeeef1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #b4b4be;
}

/* ---- responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .pj-nda-thumb {
    flex: 0 0 100%;
    max-width: none;
  }

  /* the chips wrap on a narrow screen — keep them clear of the scroll cue */
  .pj-hero {
    padding-bottom: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pj-caret,
  .pj-arrow {
    animation: none;
  }

  .pj-chip {
    transition: none;
  }
}
