:root {
  /* THEME CONTROL CENTER */
  --my-theme-color: #618ed2; 
  
  /* RGB values for transparency (like the portfolio hover) */
  --my-theme-color-rgb: 97, 142, 210; 
}


html {
  height: 100%;
  scroll-padding-top: calc(4.5rem - 1px);
}

body {
  width: 100%;
  height: 100%;
}

.page-section {
  padding: 8rem 0;
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.75) !important;
}

.btn-xl {
  padding: 1.25rem 2.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  border: none;
  border-radius: 10rem;
}

hr.divider {
  height: 0.2rem;
  max-width: 3.25rem;
  margin: 1.5rem auto;
  background-color: --my-theme-color;
  opacity: 1;
}

hr.divider-light {
  background-color: #fff;
}

#mainNav {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  background-color: #fff;
  transition: background-color 0.2s ease;
}
#mainNav .navbar-brand {
  font-family: "Merriweather Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-weight: 700;
  color: #212529;
}
#mainNav .navbar-nav .nav-item .nav-link {
  color: #6c757d;
  font-family: "Merriweather Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 0;
}
#mainNav .navbar-nav .nav-item .nav-link:hover, #mainNav .navbar-nav .nav-item .nav-link:active {
  color:  --my-theme-color;
}
#mainNav .navbar-nav .nav-item .nav-link.active {
  color:  --my-theme-color !important;
}
@media (min-width: 992px) {
  #mainNav {
    box-shadow: none;
    background-color: transparent;
  }
  #mainNav .navbar-brand {
    color: rgba(255, 255, 255, 0.7);
  }
  #mainNav .navbar-brand:hover {
    color: #fff;
  }
  #mainNav .navbar-nav .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0 1rem;
  }
  #mainNav .navbar-nav .nav-item .nav-link:hover {
    color: #fff;
  }
  #mainNav .navbar-nav .nav-item:last-child .nav-link {
    padding-right: 0;
  }
  #mainNav.navbar-shrink {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    background-color: #fff;
  }
  #mainNav.navbar-shrink .navbar-brand {
    color: #212529;
  }
  #mainNav.navbar-shrink .navbar-brand:hover {
    color:  --my-theme-color;
  }
  #mainNav.navbar-shrink .navbar-nav .nav-item .nav-link {
    color: #212529;
  }
  #mainNav.navbar-shrink .navbar-nav .nav-item .nav-link:hover {
    color:  --my-theme-color;
  }
}

header.masthead {
  padding-top: 10rem;
  padding-bottom: calc(10rem - 4.5rem);
  background: linear-gradient(to bottom, rgba(92, 77, 66, 0.8) 0%, rgba(92, 77, 66, 0.8) 100%), url("../assets/img/bg-masthead.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: cover;
}
header.masthead h1, header.masthead .h1 {
  font-size: 2.25rem;
}
@media (min-width: 992px) {
  header.masthead {
    height: 100vh;
    min-height: 40rem;
    padding-top: 4.5rem;
    padding-bottom: 0;
  }
  header.masthead p {
    font-size: 1.15rem;
  }
  header.masthead h1, header.masthead .h1 {
    font-size: 3rem;
  }
}
@media (min-width: 1200px) {
  header.masthead h1, header.masthead .h1 {
    font-size: 3.5rem;
  }
}

#portfolio .container-fluid, #portfolio .container-sm, #portfolio .container-md, #portfolio .container-lg, #portfolio .container-xl, #portfolio .container-xxl {
  max-width: 1920px;
}
#portfolio .container-fluid .portfolio-box, #portfolio .container-sm .portfolio-box, #portfolio .container-md .portfolio-box, #portfolio .container-lg .portfolio-box, #portfolio .container-xl .portfolio-box, #portfolio .container-xxl .portfolio-box {
  position: relative;
  display: block;
}
#portfolio .container-fluid .portfolio-box .portfolio-box-caption, #portfolio .container-sm .portfolio-box .portfolio-box-caption, #portfolio .container-md .portfolio-box .portfolio-box-caption, #portfolio .container-lg .portfolio-box .portfolio-box-caption, #portfolio .container-xl .portfolio-box .portfolio-box-caption, #portfolio .container-xxl .portfolio-box .portfolio-box-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: absolute;
  bottom: 0;
  text-align: center;
  opacity: 0;
  color: #fff;
  background: --my-theme-color-rgb;
  transition: opacity 0.25s ease;
  text-align: center;
}
#portfolio .container-fluid .portfolio-box .portfolio-box-caption .project-category, #portfolio .container-sm .portfolio-box .portfolio-box-caption .project-category, #portfolio .container-md .portfolio-box .portfolio-box-caption .project-category, #portfolio .container-lg .portfolio-box .portfolio-box-caption .project-category, #portfolio .container-xl .portfolio-box .portfolio-box-caption .project-category, #portfolio .container-xxl .portfolio-box .portfolio-box-caption .project-category {
  font-family: "Merriweather Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}
#portfolio .container-fluid .portfolio-box .portfolio-box-caption .project-name, #portfolio .container-sm .portfolio-box .portfolio-box-caption .project-name, #portfolio .container-md .portfolio-box .portfolio-box-caption .project-name, #portfolio .container-lg .portfolio-box .portfolio-box-caption .project-name, #portfolio .container-xl .portfolio-box .portfolio-box-caption .project-name, #portfolio .container-xxl .portfolio-box .portfolio-box-caption .project-name {
  font-size: 1.2rem;
}
#portfolio .container-fluid .portfolio-box:hover .portfolio-box-caption, #portfolio .container-sm .portfolio-box:hover .portfolio-box-caption, #portfolio .container-md .portfolio-box:hover .portfolio-box-caption, #portfolio .container-lg .portfolio-box:hover .portfolio-box-caption, #portfolio .container-xl .portfolio-box:hover .portfolio-box-caption, #portfolio .container-xxl .portfolio-box:hover .portfolio-box-caption {
  opacity: 1;
}


/* logo */
.nav-logo {
  max-height: 72px; /* Adjust this number until it looks right */
  width: auto;
  margin-right: 8px; /* Space between logo and "My Showcase" */
  vertical-align: middle;
}

/* Skill Badges */
.skill-badge {
  display: inline-block;
  padding: 10px 20px;
  margin: 5px;
  background: #f8f9fa;
  border-radius: 50px;
  border: 1px solid #dee2e6;
  transition: 0.3s;
}
.skill-badge:hover {
  background:  --my-theme-color; /* my primary color */
  color: white;
  transform: translateY(-3px);
}

/* Apply the variable to Bootstrap's core */
:root {
  --bs-primary: var(--my-theme-color) !important;
}

.text-primary {
  color: var(--my-theme-color) !important;
}

.bg-primary {
  background-color: var(--my-theme-color) !important;
}

/* Buttons */
.btn-primary {
  background-color: var(--my-theme-color) !important;
  border-color: var(--my-theme-color) !important;
}

/* Horizontal Dividers */
hr.divider {
  border-color: var(--my-theme-color) !important;
  background-color: var(--my-theme-color) !important;
  opacity: 1;
}

/* Portfolio Hover Overlay using the RGB variable for transparency */
.portfolio-box .portfolio-box-caption {
  background: rgba(var(--my-theme-color-rgb), 0.9) !important;
}

/* Responsive Setting */
@media (max-width: 991.98px) {
  .modal-body .overflow-auto {
      max-height: 50vh !important; /* Shorter scroll area for images on mobile */
  }
}

#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--my-theme-color);
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (min-width: 992px) {
    .border-end-lg {
        border-right: 1px solid #dee2e6 !important;
    }
}

#experience h5 {
    letter-spacing: 0.5px;
}

#experience .badge {
    font-size: 0.75rem;
    padding: 0.5em 0.8em;
}

#skills a {
    transition: opacity 0.2s ease-in-out, transform 0.2s ease;
    display: inline-block;
}

#skills a:hover {
    opacity: 0.7;
    transform: scale(1.05);
}

.bi-patch-check-fill {
    font-size: 0.6rem;
    vertical-align: middle;
}



/* Dark Portfolio Section */

/* Portfolio Section Background */
#portfolio.bg-dark {
    background-color: #303030 !important;
}

/* Aspect Ratio for 232x400 Images */
.portfolio-ratio {
    --bs-aspect-ratio: 172.4%; 
}

/* Card Styling & Mobile Responsiveness */
.portfolio-card {
    position: relative;
    max-width: 280px; /* Prevents portrait cards from becoming too wide on mobile */
    transition: transform 0.3s ease-in-out, border-color 0.3s ease-in-out;
    border-radius: 1rem;
    cursor: pointer;
    z-index: 1;
}

/* Reset max-width for tablet and desktop grids */
@media (min-width: 768px) {
    .portfolio-card {
        max-width: 100%;
    }
}

/* Image & Overlay Layering */
.portfolio-img {
    transition: all 0.5s ease;
    z-index: 0;
}

.portfolio-overlay {
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(115, 115, 115, 0.168) 30%, transparent 100%);
    z-index: 2;
    pointer-events: none; /* Allows click to pass through to the link */
}

/* Interaction Logic */
.portfolio-card:hover {
    transform: translateY(-8px);
    border-color: #f4623a !important; /* Your primary orange color */
}

.portfolio-card:hover .portfolio-img {
    opacity: 1 !important;
    transform: scale(1.05);
}

/* Ensure the Stretched Link is the Top Layer */
.portfolio-card .stretched-link {
    z-index: 5;
    pointer-events: auto;
}

/* Clean up text on small cards */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* Offset for fixed navbar */
section.page-section {
    scroll-margin-top: 6rem; /* Adjust this value (e.g., 4rem, 5rem, 72px) to match your nav height */
}

/* If your About section or Portfolio section needs a specific adjustment */
#about, #skills, #experience, #portfolio, #contact {
    scroll-margin-top: 0rem;
}




/* Lock the carousel to a percentage of the screen height */
.portfolio-carousel-height {
    height: 90vh; /* Takes up 70% of the screen height */
    background-color: #000;
}

/* Ensure the image container and the image itself match that height */
.carousel-item,
.portfolio-img-fit {
    height: 100%;
    width: 100%;
    object-fit: contain; /* Prevents stretching while filling the height */
    background-color: #000;
}

/* On mobile, we might want it slightly shorter to leave room for text below */
@media (max-width: 991px) {
    .portfolio-carousel-height,
    .carousel-item,
    .portfolio-img-fit {
        height: 90vh;
    }
}
/* Optional: Make the carousel transition smoother */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}


/* portrait */
.portrait-container{
  position: relative;
  display: inline-block;
}
.portrait-container:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 0 5px 5px rgb(108, 117, 125) inset;
}
