    /* Reset */
    *, *::before, *::after {
        margin: 0; padding: 0; box-sizing: border-box;
      }
      html, body {
        height: 100%;
        font-family: Arial, sans-serif;
        background: #fff;
        overflow-x: hidden;
        color: #222;
        line-height: 1.6;
      }
  
      .footer {
        text-align: center;
        padding: 2rem;
        background: #fafafa;
        font-size: 0.9rem;
        color: #666;
        width: 100%;
        margin-top: 2rem;
      }
      

      /* Navbar */
      .navbar {
        position: fixed;
        top: 0; left: 0; right: 0;
        background: white;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 1000;
        font-weight: 600;
        font-size: 0.9rem;
      }
      .navbar .logo {
        font-weight: 600;
        font-size: 1.5rem;
        white-space: nowrap;
        color: #111;
        text-decoration: none;
      }
      .navbar ul {
        list-style: none;
        display: flex;
        gap: 1.2rem;
        flex-wrap: nowrap;
      }
      .navbar ul li a {
        text-decoration: none;
        color: #222;
        white-space: nowrap;
      }
      .navbar ul li a:hover {
        color: #666;
      }
  
      /* Hero Image */
      .hero-image {
        height: 50vh;
        margin-top: 50px; /* navbar height */
        background: url('background.jpg') center center / cover no-repeat fixed;
        position: relative;
        z-index: 0;
      }

     /* Hero Image - About */
    .hero-image-about {
        height: 33vh;
        margin-top: 50px; /* navbar height */
        background: url('background_about.jpg') center center / cover no-repeat fixed;
        position: relative;
        z-index: 0;
    }
     
    /* Hero Image - Resources */
    .hero-image-resources {
    height: 33vh;
    margin-top: 50px; /* navbar height */
    background: url('background.jpg') center center / cover no-repeat fixed;
    position: relative;
    z-index: 0;
    }
    

      /* Main Content Wrapper */
      main.content {
        position: relative;
        background: transparent;
        width: 100%;
        padding: 3rem 10vw 6rem;
        box-sizing: border-box;
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem;
      }
  
      /* Scroll panel */
      .scroll-panel {
        z-index: 1;
        max-width: 900px;
        width: 100%;
        background: rgba(255 255 255 / 0.95);
        backdrop-filter: blur(6px);
        padding: 2rem 2.5rem;
        border-radius: 10px;
        box-shadow: 0 0 15px rgb(0 0 0 / 0.07);
        margin: 0 auto;
        box-sizing: border-box;
      }
  
      .scroll-panel h1 {
        margin-bottom: 1rem;
        font-weight: 600;
        font-size: 2rem;
        color: #111;
      }
      .scroll-panel p {
        margin-bottom: 1.25rem;
        color: #333;
        line-height: 1.5;
        font-size: 1.05rem;
      }
  
      th, td {
        padding: 15px; /* Adds 15px padding inside each cell */
      }
      .project-preview {
       margin-top: 20px;
        width: 100%;
        background: rgba(255 255 255 / 0.95);
        backdrop-filter: blur(6px);
        padding: 2rem 2.5rem;
        border-radius: 10px;
      }
      .project-preview-item {
        position: relative;
        border-radius: 8px;
        height: 180px;
        width: 180px;
        cursor: pointer;
        overflow: hidden;
        user-select: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 1.1rem;
        color: white;
        background: #000; /* fallback */
        flex: 1 1 30%;
        min-width: 150px;
        box-shadow: 0 0 15px rgb(0 0 0 / 0.6);
      }

      .project-preview-item img.project-preview-img {
        position: absolute;
        top: 0; left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        overflow-clip-margin: unset;
        border-radius: 8px;
        z-index: 0;
        user-select: none;
        pointer-events: none;
      }


      /* Gallery preview */
      .highlight {
        margin-top: 3rem;
        text-align: center;
      }
      .highlight h2 {
        font-weight: 600;
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        color: #111;
      }
      .gallery-preview {
        display: flex;
        gap: 1rem;
        justify-content: space-between;
        flex-wrap: wrap;
      }
      .preview-item {
        position: relative;
        border-radius: 8px;
        height: 250px;
        cursor: pointer;
        overflow: hidden;
        user-select: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 1.1rem;
        color: white;
        background: #000; /* fallback */
        flex: 1 1 30%;
        min-width: 140px;
        max-width: 250px;
      }
      .preview-item img.preview-img {
        position: absolute;
        top: 0; left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        overflow-clip-margin: unset;
        border-radius: 8px;
        z-index: 0;
        user-select: none;
        pointer-events: none;
      }
  
      /* Popup overlay */
      #popupOverlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.85);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 1rem 3rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 2000;
        overflow-y: auto;
      }
      #popupOverlay.show {
        opacity: 1;
        visibility: visible;
      }
  
      #popupOverlay .popup-content {
        max-width: 900px;
        width: 100%;
        text-align: center;
        color: white;
        position: relative;
      }
      #popupOverlay .popup-content h2 {
        font-family: Arial, sans-serif;
        font-weight: 700;
        margin-bottom: 0.5rem;
        font-size: 2rem;
      }
      #popupOverlay .popup-content p {
        font-size: 1.1rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
      }
      #popupOverlay .popup-content img {
        max-width: 100%;
        max-height: 70vh;
        border-radius: 10px;
        object-fit: contain;
        overflow-clip-margin: unset;
        box-shadow: 0 0 20px rgba(0,0,0,0.7);
        user-select: none;
      }
  
      /* Close button */
      #popupOverlay .close-btn {
        position: fixed;
        top: 20px;
        right: 30px;
        font-size: 2.5rem;
        color: white;
        cursor: pointer;
        user-select: none;
        font-weight: 700;
        background: transparent;
        border: none;
        z-index: 2100;
        transition: color 0.3s ease;
      }
      #popupOverlay .close-btn:hover {
        color: #ddd;
      }  

      h1 {
        font-size: 2rem;
        margin-bottom: 2rem;
        text-align: center;
      }
  
      .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.5rem;
      }
  
      .portfolio-item {
    position: relative;
    border-radius: 8px;
    width: 100%;
    aspect-ratio: 1 / 1; /* Square shape */
    overflow: hidden;
    cursor: pointer;
    background-color: #eee;
  }
  
  .portfolio-item img.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop to fill square */
    overflow-clip-margin: unset;
    object-position: center; /* Center the crop */
    display: block;
  }
  
  .portfolio-item .overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px;
    box-sizing: border-box;
    transition: opacity 0.3s;
    overflow: hidden;
  }
  
  .portfolio-item:hover .overlay {
    opacity: 1;
  }
  
  .portfolio-item .overlay h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    flex-shrink: 0;
    text-align: center;
  }
  
  .portfolio-item .overlay p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.3;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5;  /* Adjust for max visible lines */
    -webkit-box-orient: vertical;
  }
  
  /* Gradient Fade Overlay at Bottom */
  .portfolio-item .overlay::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
  }
      /* Popup overlay */
      #popupOverlay {
        position: fixed;
        top: 0; left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.85);
        display: none;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        z-index: 2000;
        padding: 2rem;
        overflow: auto;
      }
  
      #popupOverlay.show {
        display: flex;
      }
  
      .popup-content {
        max-width: 90%;
        max-height: 90%;
        text-align: center;
        color: white;
      }
  
      .popup-content img {
        max-width: 100%;
        max-height: 70vh;
        border-radius: 8px;
        margin-top: 1rem;
      }
  
      .close-btn {
        position: absolute;
        top: 20px;
        right: 30px;
        font-size: 2rem;
        color: white;
        background: none;
        border: none;
        cursor: pointer;
      }
  
      .close-btn:hover {
        color: #ccc;
      }
  
      /* unvisited link */
a:link {
    color: #6f67e0;
  }
  
  /* visited link */
  a:visited {
    color: #706bb3;
 }
  
  /* mouse over link */
  a:hover {
    color: #666666;
  }
  
  /* selected link */
  a:active {
    color: #666666;
  }

  #keywordFilter button {
    background-color: #eee;
    border: none;
    padding: 8px 12px;
    margin: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
  }
  
  #keywordFilter button:hover {
    background-color: #ddd;
  }
  
  #keywordFilter button.active-filter {
    background-color: #444;
    color: white;
  }