.thumbnail-box {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #000;
  cursor: pointer;
}

.thumbnail-box video,
.thumbnail-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
  opacity: 0.8;
}

.thumbnail-box:hover video,
.thumbnail-box:hover img {
  opacity: 1;
}

.caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  padding: 20px;
  color: #fff;
  z-index: 2;
  pointer-events: none;
  font-family: "Inconsolata", monospace;
  transition: opacity 0.4s ease;
  opacity: 0.9;
}

.caption-overlay h5 {
  margin: 0;
  font-family: "Alegreya Sans SC", sans-serif; /* Add this line */
  font-weight: 300;
  font-size: 1rem;
  text-transform: lowercase;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.thumbnail-box:hover .caption-overlay {
  opacity: 0;
}

/* Cinematic Modal Setup */
#videoModal .modal-content {
  background-color: transparent !important;
}

.btn-close-cinematic {
  filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.9));
  z-index: 1060;
  opacity: 0.8;
}

.btn-close-cinematic:hover {
  opacity: 1;
}

.alegreya-sans-sc-light {
  font-family: "Alegreya Sans SC", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.alegreya-sans-sc-regular {
  font-family: "Alegreya Sans SC", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.alegreya-sans-light {
  font-family: "Alegreya Sans", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.alegreya-sans-regular {
  font-family: "Alegreya Sans", sans-serif;
  font-weight: 400;
  font-style: normal;
}

body {
  background-color: #212529;
  font-family: "Alegreya Sans SC", sans-serif;
  font-weight: 400;
}

/* This targets the entire carousel area */
#myCarousel {
  background-color: #3d3d3d;
}

/* This ensures individual slides inherit that color */
.carousel-item {
  background-color: #3d3d3d;
}

/* 1. Make the clickable area narrower */
.carousel-control-prev,
.carousel-control-next {
    width: 8%; 
}

/* 2. Push the left arrow icon to the absolute left edge */
.carousel-control-prev {
    left: 0;
    justify-content: flex-start; /* Stops it from centering */
    padding-left: 2%; /* Gives it just a tiny bit of breathing room */
}

/* 3. Push the right arrow icon to the absolute right edge */
.carousel-control-next {
    right: 0; 
    justify-content: flex-end; /* Stops it from centering */
    padding-right: 2%; /* Gives it just a tiny bit of breathing room */
}

.brand-title {
    /* This says: Minimum 1.3rem, Preferred 4vw, Maximum 1.75rem (fs-3 size) */
    font-size: clamp(1.3rem, 4vw, 1.75rem);
}

/* This targets the Name, Email, and Message boxes */
.form-control {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 400;
}

/* --- THE INVISIBLE CONTAINER & COLOR VARIABLE --- */
.project-caption {
    /* THE MAGIC VARIABLE: Change this hex code to change the color of all text and buttons */
    --caption-color: #ffffff; 
    
    background-color: transparent !important; 
    width: 90%;          
    max-width: 650px;    
    margin: 0 auto;      
    bottom: 8%;          
    left: 0 !important;
    right: 0 !important;
    padding: 0 !important; 
}

/* --- THE TEXT & SHADOWS --- */
.project-caption h1,
.project-caption h3 {
    color: var(--caption-color) !important; /* Hooks into the variable */
    text-shadow: 1px 2px 6px rgba(0, 0, 0, 1.5); /* Keeps the soft, cinematic shadow */
}

/* --- THE BUTTON & SHADOW --- */
.project-caption .carousel-btn {
    color: var(--caption-color) !important; /* Hooks into the variable */
    border-color: var(--caption-color) !important; /* Matches the border to the text */
    
    filter: drop-shadow(1px 2px 4px rgba(0, 0, 0, 0.8)); /* Traces the button outline */
    
    font-size: clamp(0.85rem, 1.5vw, 1.1rem) !important;
    letter-spacing: 1px; 
    border-width: 1.5px; 
    transition: all 0.3s ease;
}

/* Button Hover State */
.project-caption .carousel-btn:hover {
    background-color: var(--caption-color) !important;
    color: #000 !important; /* Always switches to black text on hover for contrast */
    transform: scale(1.05);
    filter: drop-shadow(0px 0px 8px rgba(255, 255, 255, 0.5)); 
}

/* --- MOBILE TEXT REFINEMENTS --- */
@media (max-width: 576px) {
    .project-caption h1 {
        font-size: 1rem !important; 
        margin-bottom: 0.1rem !important;
    }

    .project-caption h3 {
        font-size: 0.75rem !important; 
        margin-top: 0 !important;
    }

    .project-caption .carousel-btn {
        font-size: 0.65rem !important; 
        padding: 0.25rem 0.6rem !important; 
        margin-top: 0.4rem !important; 
        border-width: 1px !important;
    }
}