:root {
    --light-blue: #0b479d;
    --dark-blue: #0a2769;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

/* body, html {
    height: 100%;
    overflow: hidden;
} */

body, html {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto; /* Allow scrolling when content exceeds viewport */
    overflow-x:hidden; /* Prevent horizontal overflow */
}

.background-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.2); 
    backdrop-filter: blur(4px);            
    z-index: -1;                        
    pointer-events: none; 
    overflow: hidden;   /* Add this to prevent any potential overflow */
    width: 100vw;       /* Ensure it matches the viewport width exactly */
    max-width: 100%;                
}

.background-grid {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;          
    background: #fff;        
    z-index: -1;
    width: 100vw;       /* Ensure it matches the viewport width exactly */
    max-width: 100%;    /* Prevent any potential stretching */
    overflow: hidden; 
}

.bg-corner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
  

/* NAVBAR SHELL (transparent; no blur) */
.site-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    z-index: 10;

    border: none;
    display: flex;                  /* make the navbar itself a flex container */
    align-items: center;            /* vertically center everything in it */
}

.site-navbar .container-fluid {
    flex: 1;                        /* ensure container fills full width/height */
    display: flex;
    align-items: center;            /* vertically center row inside navbar */
}

.site-navbar .row {
    flex: 1;
    display: flex;
    align-items: center;            /* vertically center columns inside the row */
    width: 100%;
}

.site-navbar .col {
    display: flex;
    align-items: center;            /* center contents vertically */
}

/* Left / Center / Right alignment per column */
.nav-left   { justify-content: flex-start; }
.nav-center { justify-content: center; }
.nav-right  { justify-content: flex-end; gap: 12px; }

/* Buttons look identical to before */
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 .85rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--light-blue);
    background: var(--light-blue);
    color: #fff;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.nav-btn:hover {
    background: transparent;
    color: var(--dark-blue);
    border-color: var(--dark-blue);
}
/* 
.page-content {
    position: relative;
    height: calc(100vh - 64px);
    margin-top: 64px;      
    overflow: auto;         
    -webkit-overflow-scrolling: touch;
} */
 
.page-content {
    width: 100%;
    flex: 1 0 auto;
    position: relative;
    margin-top: 64px;
}

/* Portfolio Styles */
  /* --- GRID WRAPPER --- */
  .portfolio-grid {
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
  }

  /* --- CARD LINK (image-only) --- */
  .portfolio-card {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    outline: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  }

  /* Maintain consistent crop, fill naturally */
  .portfolio-card .media {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;           /* consistent card heights */
    object-fit: cover;              /* crop to fill */
    transform: scale(1);            /* for a tiny hover zoom */
    transition: transform .35s ease;
  }

  /* Darken & CTA overlay */
  .portfolio-card .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);     /* idle = transparent */
    display: grid;
    place-items: center;
    transition: background .25s ease;
    pointer-events: none;          /* allow link to receive events */
  }

  /* Reuse your arrow-in-circle look from the search button (same size & arrow) */
  .portfolio-card .cta {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #d3d3d3;           /* matches search-submit bg */
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease, background .25s ease;
  }
  .portfolio-card .cta::after {
    content: "→";                  /* same arrow as search-submit */
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    position: relative;
    top: -3px;                     /* matches your search arrow tweak */
  }

  /* Hover/focus effects */
  .portfolio-card:hover .media,
  .portfolio-card:focus-visible .media {
    transform: scale(1.02);
  }
  .portfolio-card:hover .overlay,
  .portfolio-card:focus-visible .overlay {
    background: rgba(0,0,0,0.35);  /* darken on hover */
  }
  .portfolio-card:hover .cta,
  .portfolio-card:focus-visible .cta {
    opacity: 1;
    transform: translateY(0);
  }

  /* Optional: reduce motion for users who prefer it */
  @media (prefers-reduced-motion: reduce) {
    .portfolio-card .media,
    .portfolio-card .overlay,
    .portfolio-card .cta {
      transition: none;
    }
  }

  /* Footer Styles */
          footer {
            flex-shrink: 0;
            position: relative;
            z-index: 2; /* Ensure footer is above background */
        }

.footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 .85rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--dark-blue);
    background: transparent;
    color: var(--dark-blue);
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.footer-btn:hover {
    background: var(--dark-blue);
    color: #fff;
    border-color: var(--dark-blue);
}