/* Portfolio-specific enhancements */
  .portfolio-hero {
    background: #f5f3ee;
  }

  .portfolio-hero::before {
    background: url('../For%20Website/4.Projects%20%2B%20Photos/2.Amitofo%20Care%20Centre%20of%20Eswatini/2-Photos/care%20centre%201.webp') center/cover;
    opacity: 0.8;
    filter: blur(2px) saturate(0.8);
    animation: portfolioBackgroundBreathe 14s ease-in-out infinite;
  }

  .portfolio-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 16, 20, 0.32), rgba(12, 16, 20, 0.18));
    z-index: 1;
  }

  @keyframes portfolioBackgroundBreathe {
    0%, 100% { transform: scale(1.04) translate3d(-1.2%, 0, 0); }
    50% { transform: scale(1.08) translate3d(1.2%, 0, 0); }
  }

  .portfolio-stats-section {
    background: var(--navy);
    padding: 60px 0;
    position: relative;
    z-index: 2;
  }

  .portfolio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-top: 50px;
  }

  .stat-item {
    border-left: 3px solid var(--orange);
    padding-left: 20px;
  }

  .stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--orange);
    display: block;
  }

  .stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(245, 243, 238, 0.6);
    margin-top: 8px;
  }

  .portfolio-section {
    padding: 100px 0;
    background: var(--paper);
  }

  .portfolio-section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 30px;
  }

  .portfolio-section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--orange);
  }

  .portfolio-section-lede {
    max-width: 62ch;
    margin: -35px 0 44px;
    color: var(--ink-soft);
    line-height: 1.7;
  }

  .filters-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 60px;
  }

  .filter-btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 12px 24px;
    border: 1.5px solid var(--bronze);
    background: transparent;
    color: var(--bronze);
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.3s var(--ease);
    font-weight: 600;
  }

  .filter-btn:hover {
    background: rgba(176, 141, 87, 0.1);
    transform: translateY(-2px);
  }

  .filter-btn.is-active {
    background: var(--bronze);
    color: var(--paper);
    box-shadow: 0 8px 24px -8px rgba(176, 141, 87, 0.3);
  }

  .work-grid {
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .project-card {
    background: var(--navy);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(23, 26, 29, 0.08);
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
    display: flex;
    flex-direction: column;
  }

  .project-card:hover {
    background: var(--navy) !important;
    transform: none;
    box-shadow: none;
  }

  .project-card:hover .project-body {
    background: var(--paper) !important;
  }

  .project-visual {
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
    background: var(--graphite);
  }

  .project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
  }

  .project-card:hover .project-visual img {
    transform: none;
  }

  .project-body {
    padding: 28px 28px 32px;
    background: var(--paper);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }

  .project-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--orange);
    font-weight: 700;
  }

  .project-name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 14px;
    margin-bottom: 16px;
    line-height: 1.3;
  }

  .project-desc {
    font-size: 0.95rem;
    color: var(--concrete);
    margin-bottom: 16px;
    flex-grow: 1;
    line-height: 1.6;
  }

  .project-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--ink-soft);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  .cta-section {
    background: var(--navy);
    color: var(--paper);
    padding: 100px 0;
    text-align: center;
  }

  .cta-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 20px;
  }

  .cta-subtitle {
    font-size: 1.1rem;
    color: rgba(245, 243, 238, 0.8);
    max-width: 60ch;
    margin: 0 auto 40px;
  }

  .cta-button {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 14px 36px;
    background: var(--orange);
    color: var(--navy);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s var(--ease);
    display: inline-block;
  }

  .cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -8px rgba(176, 141, 87, 0.4);
  }

  .project-gallery { padding: 0 0 100px; background: var(--paper); }
  .project-gallery-head { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:32px; }
  .project-gallery-head h2 { font-family:var(--font-display); font-size:clamp(1.8rem, 4vw, 2.8rem); }
  .project-gallery-head p { color:var(--ink-soft); max-width:40ch; line-height:1.6; }
  .gallery-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:14px; }
  .gallery-item { position:relative; display:block; padding:0; overflow:hidden; aspect-ratio:1 / .8; border:0; background:var(--navy); cursor:zoom-in; }
  .gallery-item img { width:100%; height:100%; object-fit:cover; transition:transform .45s var(--ease), opacity .35s ease; }
  .gallery-item::after { content:attr(data-caption); position:absolute; inset:auto 10px 10px; padding:8px 9px; background:rgba(11,30,51,.86); color:var(--paper); font-family:var(--font-mono); font-size:.62rem; letter-spacing:.06em; line-height:1.35; opacity:1; transform:none; transition:background .25s ease, transform .25s ease; }
  .gallery-item:hover img, .gallery-item:focus-visible img { transform:scale(1.06); }
  .gallery-item:hover::after, .gallery-item:focus-visible::after { background:var(--brand-green-dark); transform:translateY(-2px); }
  .gallery-item:focus-visible { outline:3px solid var(--orange); outline-offset:3px; }
  .gallery-item { opacity:0; transform:translateY(24px) scale(.96); transition:opacity .55s var(--ease), transform .55s cubic-bezier(.22,1,.36,1), box-shadow .35s var(--ease); }
  .gallery-item.is-visible { opacity:1; transform:translateY(0) scale(1); animation:gallery-soft-float 5.6s cubic-bezier(.4,0,.2,1) infinite; animation-delay:var(--gallery-delay, 0ms); }
  .gallery-item.is-visible:hover, .gallery-item.is-visible:focus-visible { animation-play-state:paused; transform:translateY(-8px) scale(1.015); box-shadow:0 18px 30px rgba(11,30,51,.22); }
  @keyframes gallery-soft-float { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-7px) scale(1.01); } }
  .gallery-lightbox { position:fixed; z-index:30000; inset:0; display:grid; place-items:center; padding:32px 86px; background:rgba(5,10,16,.94); }
  .gallery-lightbox[hidden] { display:none; }
  .gallery-lightbox__figure { width:min(1100px, 100%); margin:0; display:grid; justify-items:center; gap:14px; }
  .gallery-lightbox__image { display:block; width:auto; max-width:100%; max-height:calc(100vh - 150px); object-fit:contain; box-shadow:0 24px 70px rgba(0,0,0,.45); }
  .gallery-lightbox__caption { color:var(--paper); font-size:.95rem; text-align:center; }
  .gallery-lightbox__count { color:rgba(245,243,238,.65); font-family:var(--font-mono); font-size:.75rem; letter-spacing:.08em; }
  .gallery-lightbox__control { position:absolute; display:grid; place-items:center; width:52px; height:52px; border:none; background:transparent; color:var(--paper); cursor:pointer; transition:color .2s ease, transform .2s ease; }
  .gallery-lightbox__control:hover, .gallery-lightbox__control:focus-visible { color:var(--orange); transform:scale(1.06); outline:none; }
  .gallery-lightbox__close { top:22px; right:24px; font-size:1.8rem; line-height:1; }
  .gallery-lightbox__previous { top:50%; left:22px; transform:translateY(-50%); font-size:2.2rem; }
  .gallery-lightbox__next { top:50%; right:22px; transform:translateY(-50%); font-size:2.2rem; }
  .gallery-lightbox__previous:hover, .gallery-lightbox__previous:focus-visible, .gallery-lightbox__next:hover, .gallery-lightbox__next:focus-visible { transform:translateY(-50%) scale(1.06); }
  body.gallery-open { overflow:hidden; }
  @media (prefers-reduced-motion: reduce) { .gallery-item { opacity:1; transform:none; transition:none; } .gallery-item.is-visible { animation:none; } }

  @media (max-width: 980px) {
    .work-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    .portfolio-stats {
      grid-template-columns: repeat(2, 1fr);
      gap: 30px;
    }
    .gallery-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); }
  }

  @media (max-width: 850px) {
    .portfolio-stats-section {
      padding: 50px 0;
    }
  }

  @media (max-width: 640px) {
    .portfolio-stats-section {
      padding: 40px 0;
    }

    .portfolio-section {
      padding: 64px 0;
    }

    .work-grid {
      grid-template-columns: 1fr;
      gap: 24px;
    }
    .portfolio-stats {
      grid-template-columns: 1fr;
    }
    .filters-wrapper {
      gap: 8px;
    }
    .filter-btn {
      padding: 10px 16px;
      font-size: 0.7rem;
    }
    .project-gallery-head { display:block; }
    .project-gallery-head p { margin-top:12px; }
    .gallery-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
    .gallery-lightbox { padding:24px 16px 76px; }
    .gallery-lightbox__image { max-height:calc(100vh - 170px); }
    .gallery-lightbox__control { width:44px; height:44px; }
    .gallery-lightbox__previous { left:10px; }
    .gallery-lightbox__next { right:10px; }
    .gallery-lightbox__close { top:12px; right:12px; }
  }
