/* work.css — Our Work page */

/* ─── Navbar ─────────────────────────────────────── */
#work-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(29,53,87,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.3s, box-shadow 0.3s;
}

#work-nav.nav--scrolled {
  background: rgba(29,53,87,0.97);
  box-shadow: 0 1px 0 rgba(69,123,157,0.2);
}

.work-nav-logo img {
  height: 80px;
  width: auto;
  object-fit: contain;
  display: block;
}

.work-nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.work-nav-links a {
  color: rgba(241,250,238,0.75);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  transition: color 0.2s;
}

.work-nav-links a:hover { color: var(--light-blue); }

.work-nav-links a.is-active {
  color: var(--honeydew);
  font-weight: 700;
}

/* ─── Hero ───────────────────────────────────────── */
#work-hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 4.5rem;
  background: url('assets/images/finImag.png') center / cover no-repeat;
  overflow: hidden;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,  rgba(29,53,87,0.98) 0%, rgba(29,53,87,0.6) 38%, rgba(29,53,87,0.2) 68%, transparent 88%),
    linear-gradient(to right, rgba(29,53,87,0.65) 0%, transparent 62%);
}

.hero-body {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding-top: 11rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(241,250,238,0.58);
  line-height: 1.75;
  margin-top: 1.5rem;
  font-weight: 400;
}

/* Stats row */
.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 3.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(168,218,220,0.18);
}

.hstat { display: flex; flex-direction: column; gap: 0.2rem; }

.hstat-n {
  font-size: 2rem;
  font-weight: 800;
  color: var(--honeydew);
  letter-spacing: -0.04em;
  line-height: 1;
}

.hstat-l {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--light-blue);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ─── Projects section ───────────────────────────── */
#projects {
  background: var(--navy);
  padding: 5rem 0 8rem;
}

.projects-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.filter-pills {
  display: flex;
  gap: 0.4rem;
  padding: 0.3rem;
  background: rgba(69,123,157,0.1);
  border: 1px solid rgba(69,123,157,0.22);
  border-radius: 8px;
}

.fpill {
  background: none;
  border: none;
  color: rgba(241,250,238,0.5);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.fpill:hover { color: var(--honeydew); }

.fpill.active {
  background: var(--red);
  color: var(--honeydew);
}

.proj-count {
  font-size: 0.82rem;
  color: var(--cerulean);
  font-weight: 500;
}

.proj-count span {
  color: var(--honeydew);
  font-weight: 800;
}

/* ─── Bento grid ─────────────────────────────────── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Layout:
   [featured:2col] [1col]
   [1col] [1col] [1col]
   [1col] [featured:2col]
   Last featured gets pushed: row 3 card 7 spans 2, card 8 fills 1 */
.pcard.featured { grid-column: span 2; }

/* Hidden state for filtered cards */
.pcard--hidden { display: none; }

/* ─── Project card ───────────────────────────────── */
.pcard {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--navy);
  display: flex;
  flex-direction: column;
}

/* Image wrapper */
.pcard-img {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  aspect-ratio: 4 / 3;
}

.pcard.featured .pcard-img { aspect-ratio: 16 / 9; }

.pcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Hover overlay: description + CTA slides up */
.pcard-hover {
  position: absolute;
  inset: 0;
  bottom: auto;
  top: 0;
  height: calc(100% - 100px); /* covers image only, not footer bar */
  background: rgba(29,53,87,0.93);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 2rem 1.5rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.32s cubic-bezier(0.16,1,0.3,1), transform 0.32s cubic-bezier(0.16,1,0.3,1);
  z-index: 4;
}

.pcard:hover .pcard-hover {
  opacity: 1;
  transform: translateY(0);
}

.pcard-hover p {
  font-size: 0.86rem;
  color: rgba(241,250,238,0.82);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.pcard-hover .btn-primary {
  align-self: flex-start;
  padding: 0.65rem 1.5rem;
  font-size: 0.85rem;
}

/* Footer bar — always visible */
.pcard-foot {
  padding: 1.1rem 1.5rem 1.25rem;
  background: rgba(20,42,69,0.97);
  border-top: 1px solid rgba(69,123,157,0.2);
  flex-shrink: 0;
}

.pcard-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.pcat {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.pyear {
  font-size: 0.72rem;
  color: var(--cerulean);
  font-weight: 500;
}

.pcard h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--honeydew);
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.ploc {
  font-size: 0.75rem;
  color: var(--cerulean);
}

/* ─── Work CTA ───────────────────────────────────── */
#work-cta {
  background: var(--red);
  padding: 7rem 3rem;
  text-align: left;
}

.work-cta-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
}

#work-cta h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--honeydew);
  margin: 0.75rem 0 0;
  grid-column: 1;
}

#work-cta .cta-sub { grid-column: 1; }

.work-cta-btn {
  display: inline-block;
  background: var(--navy);
  color: var(--honeydew);
  padding: 1rem 2.5rem;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: opacity 0.2s;
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
}

.work-cta-btn:hover  { opacity: 0.86; }
.work-cta-btn:active { transform: scale(0.98); }

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .pcard.featured { grid-column: span 2; }
}

@media (max-width: 768px) {
  #work-nav { padding: 1rem 1.25rem; }
  .work-nav-logo img { height: 56px; }
  .work-nav-links { gap: 1.25rem; }
  .work-nav-links a:not(.is-active):not(.nav-cta) { display: none; }

  #work-hero { padding: 0 1.25rem 3rem; min-height: 100dvh; }
  .hero-body { padding-top: 9rem; }
  .hero-stats { gap: 2rem; flex-wrap: wrap; }

  .projects-wrap { padding: 0 1.25rem; }
  .filter-bar { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .filter-pills { flex-wrap: wrap; }

  .proj-grid { grid-template-columns: 1fr; }
  .pcard.featured { grid-column: span 1; }
  .pcard.featured .pcard-img { aspect-ratio: 4 / 3; }

  /* On touch devices, always show the overlay */
  .pcard-hover {
    position: static;
    height: auto;
    opacity: 1;
    transform: none;
    background: rgba(20,42,69,0.95);
    backdrop-filter: none;
    padding: 1.25rem 1.5rem;
  }

  #work-cta { padding: 4rem 1.25rem; }
  .work-cta-inner { grid-template-columns: 1fr; }
  .work-cta-btn { grid-column: 1; grid-row: auto; align-self: flex-start; }
}

@media (max-width: 480px) {
  .hstat-n { font-size: 1.5rem; }
  #projects { padding: 4rem 0 6rem; }
}
