:root {
      --bg-dark-slate: #0b0d14;
      --accent-orange: #ff4d00;
      --text-white: #ffffff;
      --text-muted: #a1a5b7;
      --glass-bg: rgba(18, 20, 29, 0.65);
      --glass-border: rgba(255, 255, 255, 0.12);
      --font-main: 'Plus Jakarta Sans', 'Inter', sans-serif;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html, body {
      width: 100%;
      background-color: var(--bg-dark-slate);
      background-image: radial-gradient(circle at 50% -10%, rgba(255, 77, 0, 0.15) 0%, rgba(22, 28, 45, 0.5) 45%, rgba(11, 13, 20, 1) 90%);
      background-attachment: fixed;
      color: var(--text-white);
      font-family: var(--font-main);
      overflow-x: hidden;
      scroll-behavior: smooth;
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
    }

    /* Subtle Low Opacity Orange-Red Ambient Glows */
    .glow-orange-red {
      position: absolute;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(255, 77, 0, 0.16) 0%, rgba(255, 30, 0, 0.06) 50%, transparent 70%);
      filter: blur(95px);
      pointer-events: none;
      z-index: 0;
    }

    .glow-proj-hero { top: 5%; right: 10%; width: 550px; height: 550px; }
    .glow-proj-grid { top: 32%; left: -10%; width: 650px; height: 650px; }
    .glow-proj-metrics { top: 60%; right: -8%; width: 580px; height: 580px; }
    .glow-proj-process { top: 82%; left: -5%; width: 520px; height: 520px; }

    /* Content Wrapper */
    .content-wrapper {
      position: relative;
      z-index: 2;
      width: 100%;
      max-width: 1680px;
      margin: 0 auto;
      padding: 0 24px;
    }

    /* Scroll Margin Offset for Fixed Navbar Clearance */
    section, [id] {
      scroll-margin-top: 110px;
    }

    /* Top Navigation Bar / Minimal Back Control */
    .top-nav-bar {
      max-width: 1080px;
      width: 100%;
      margin: 0 auto;
      padding: 40px 24px 10px 24px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      position: relative;
      z-index: 10;
    }

    .back-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: rgba(255, 255, 255, 0.7);
      text-decoration: none;
      font-size: 14px;
      font-weight: 600;
      position: relative;
      padding: 6px 0;
      transition: color 0.25s ease, filter 0.25s ease;
    }

    .back-arrow {
      display: inline-block;
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
      font-size: 15px;
    }

    /* Animated underline on Back Link */
    .back-link::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--accent-orange), #ff8040);
      box-shadow: 0 0 10px rgba(255, 77, 0, 0.8);
      transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      border-radius: 2px;
    }

    .back-link:hover, .back-link:focus-visible {
      color: #ffffff;
      filter: brightness(1.2);
    }

    .back-link:hover::after, .back-link:focus-visible::after {
      width: 100%;
    }

    .back-link:hover .back-arrow, .back-link:focus-visible .back-arrow {
      transform: translateX(-4px);
      color: var(--accent-orange);
    }

    .back-link:active {
      transform: scale(0.97);
    }

    /* Section Tag Badge */
    .section-tag {
      font-size: 13px;
      font-weight: 700;
      color: var(--accent-orange);
      margin-bottom: 14px;
      display: inline-block;
      letter-spacing: 1px;
      text-transform: uppercase;
    }

    /* SECTION 1: Projects Hero Header */
    .projects-hero {
      padding-top: 30px;
      padding-bottom: 45px;
      text-align: center;
      max-width: 800px;
      margin: 0 auto;
    }

    .projects-hero-title {
      font-size: clamp(2.6rem, 5vw, 4.2rem);
      font-weight: 800;
      letter-spacing: -1.5px;
      line-height: 1.05;
      color: var(--text-white);
      margin-bottom: 18px;
    }

    .projects-hero-desc {
      font-size: 16px;
      line-height: 1.6;
      color: rgba(255, 255, 255, 0.7);
      margin-bottom: 36px;
    }

    /* Filter Pills Bar */
    .filter-bar {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .filter-btn {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: rgba(255, 255, 255, 0.8);
      padding: 8px 20px;
      border-radius: 100px;
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .filter-btn:hover, .filter-btn.active {
      background: #ffffff;
      color: #000000;
      border-color: #ffffff;
      box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
    }

    /* SECTION 2: Projects Showcase Gallery Grid */
    .section-projects-grid {
      padding: 20px 0 90px 0;
      position: relative;
      width: 100%;
    }

    /* Ambient background gradient connecting the rows */
    .section-projects-grid::before {
      content: '';
      position: absolute;
      top: 20%;
      left: 15%;
      width: 70%;
      height: 60%;
      background: radial-gradient(circle, rgba(255, 77, 0, 0.05) 0%, rgba(255, 110, 0, 0.02) 50%, transparent 80%);
      filter: blur(80px);
      pointer-events: none;
      z-index: 0;
    }

    .projects-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 20px;
      max-width: 1020px;
      width: 100%;
      margin: 0 auto;
      padding: 0 20px;
      position: relative;
      z-index: 1;
      perspective: 1200px;
    }

    .project-card {
      position: relative;
      border-radius: 16px;
      overflow: hidden;
      background: rgba(18, 20, 29, 0.72);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.09);
      display: flex;
      flex-direction: column;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
      contain: layout style;
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
      transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                  border-color 0.35s ease, 
                  box-shadow 0.35s ease,
                  opacity 0.4s ease;
      will-change: transform, box-shadow;
      transform-style: preserve-3d;
      opacity: 0;
      transform: translateY(24px);
    }

    /* Card entrance visibility */
    .project-card.in-view {
      opacity: 1;
      transform: translateY(0);
    }

    .project-card:hover {
      border-color: rgba(255, 77, 0, 0.42);
      box-shadow: 0 20px 44px rgba(0, 0, 0, 0.65), 0 0 30px rgba(255, 77, 0, 0.16);
    }

    .project-card-img-box {
      width: 100%;
      aspect-ratio: 16 / 8;
      height: auto;
      overflow: hidden;
      position: relative;
      background: #0d0f18;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* Ambient light sweep on image hover */
    .project-card-img-box::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(120deg, transparent 30%, rgba(255, 77, 0, 0.12) 50%, transparent 70%);
      opacity: 0;
      transform: translateX(-100%);
      transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
      pointer-events: none;
    }

    .project-card:hover .project-card-img-box::after {
      opacity: 1;
      transform: translateX(100%);
    }

    .project-card-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
      will-change: transform;
    }

    .project-card:hover .project-card-img {
      transform: scale(1.035);
      filter: brightness(1.06);
    }

    .project-card-body {
      padding: 15px 17px 13px 17px;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      justify-content: space-between;
      position: relative;
      z-index: 2;
    }

    .project-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 4px;
    }

    .project-category {
      font-size: 10.5px;
      font-weight: 700;
      color: var(--accent-orange);
      text-transform: uppercase;
      letter-spacing: 0.8px;
    }

    .project-year {
      font-size: 10.5px;
      color: rgba(255, 255, 255, 0.45);
    }

    .project-title {
      font-size: 18.5px;
      font-weight: 800;
      color: #ffffff;
      margin-bottom: 5px;
      letter-spacing: -0.4px;
      line-height: 1.2;
      transition: color 0.3s ease, text-shadow 0.3s ease;
    }

    .project-card:hover .project-title {
      color: #ffffff;
      text-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
    }

    .project-desc {
      font-size: 13px;
      line-height: 1.5;
      color: rgba(255, 255, 255, 0.68);
      margin-bottom: 10px;
    }

    .project-tags {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
      margin-bottom: 11px;
    }

    .tag-badge {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      padding: 2.5px 8px;
      border-radius: 100px;
      font-size: 10.5px;
      color: rgba(255, 255, 255, 0.82);
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Tag progressive subtle illumination on card hover */
    .project-card:hover .tag-badge {
      background: rgba(255, 77, 0, 0.08);
      border-color: rgba(255, 77, 0, 0.25);
      color: #ffffff;
    }

    .project-card:hover .tag-badge:nth-child(1) { transition-delay: 0.02s; }
    .project-card:hover .tag-badge:nth-child(2) { transition-delay: 0.05s; }
    .project-card:hover .tag-badge:nth-child(3) { transition-delay: 0.08s; }
    .project-card:hover .tag-badge:nth-child(4) { transition-delay: 0.11s; }
    .project-card:hover .tag-badge:nth-child(5) { transition-delay: 0.14s; }
    .project-card:hover .tag-badge:nth-child(6) { transition-delay: 0.17s; }
    .project-card:hover .tag-badge:nth-child(7) { transition-delay: 0.20s; }
    .project-card:hover .tag-badge:nth-child(8) { transition-delay: 0.23s; }
    .project-card:hover .tag-badge:nth-child(9) { transition-delay: 0.26s; }
    .project-card:hover .tag-badge:nth-child(10) { transition-delay: 0.29s; }
    .project-card:hover .tag-badge:nth-child(11) { transition-delay: 0.32s; }
    .project-card:hover .tag-badge:nth-child(12) { transition-delay: 0.35s; }

    .tag-badge:hover {
      background: rgba(255, 77, 0, 0.18) !important;
      border-color: var(--accent-orange) !important;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(255, 77, 0, 0.25);
    }

    .project-btn-row {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      padding-top: 10px;
    }

    .btn-project-link {
      position: relative;
      color: #ffffff;
      text-decoration: none;
      font-size: 13px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 3px 0;
      transition: color 0.25s ease, text-shadow 0.25s ease, filter 0.25s ease, transform 0.25s ease;
    }

    /* Left-to-right animated underline & glow */
    .btn-project-link::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--accent-orange), #ff8040);
      box-shadow: 0 0 10px rgba(255, 77, 0, 0.8);
      transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      border-radius: 2px;
    }

    .btn-link-arrow {
      display: inline-block;
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
      font-size: 14px;
    }

    .btn-project-link:hover, .btn-project-link:focus-visible {
      color: #ffffff;
      filter: brightness(1.15);
      text-shadow: 0 0 14px rgba(255, 77, 0, 0.6);
      transform: translateY(-2px);
    }

    .btn-project-link:hover::after, .btn-project-link:focus-visible::after {
      width: 100%;
    }

    .btn-project-link:hover .btn-link-arrow, .btn-project-link:focus-visible .btn-link-arrow {
      transform: translateX(7px);
      color: var(--accent-orange);
    }

    .btn-project-link:active {
      transform: scale(0.96);
    }

    /* Filter smooth transitions */
    .project-card.filter-hide {
      opacity: 0;
      transform: scale(0.94);
      pointer-events: none;
      position: absolute;
      visibility: hidden;
      transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    }

    .project-card.filter-show {
      opacity: 1;
      transform: scale(1);
      position: relative;
      visibility: visible;
      transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Footer */
    footer.site-footer {
      padding: 40px 0 40px 0;
      text-align: center;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      margin-top: 20px;
    }

    .footer-text {
      font-size: 14px;
      color: rgba(255, 255, 255, 0.4);
    }

    /* Responsive Adjustments */
    @media (max-width: 992px) {
      .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding: 0 16px;
      }
      .project-card-img-box {
        aspect-ratio: 16 / 8;
        height: auto;
      }
    }

    @media (max-width: 767px) {
      .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
      }
      .projects-hero-title {
        font-size: 2.2rem;
      }
      .projects-hero-desc {
        font-size: 14.5px;
      }
      .project-card-body {
        padding: 14px 15px 12px 15px;
      }
      .project-title {
        font-size: 17.5px;
      }
      .project-card-img-box {
        aspect-ratio: 16 / 8;
        height: auto;
      }
    }

    /* Respect reduced motion */
    @media (prefers-reduced-motion: reduce) {
      *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
      .project-card {
        opacity: 1 !important;
        transform: none !important;
      }
    }