/* Hide preview titles and software labels container in gallery grid */
.preview-info {
    display: none !important;
}

body {
    background-image: url('BG.svg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

main {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Fix for center element to prevent horizontal overflow */
center {
    max-width: 100%;
    overflow-x: hidden;
}

@keyframes move {
    100% {
        transform: translate3d(0, 0, 1px) rotate(360deg);
    }

}

.resumeButton {
    background-color: #2B3E70;
    margin-top: 1.5vh;
    text-decoration: none;
    color: #fff;
    border-radius: 30px;
    font-weight: 800;
    cursor: pointer;
    padding: 2vh 2vw;
    width: fit-content;
}

.resumeButton:hover {
    text-decoration: none;
    background-color: #FFB703;
    color: #2B3E70;
}

.contactMe {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 2px;
    text-align: right;
    color: #2B3E70;
}

.knowMore a {
    text-decoration: none;
}

.sectionOne {
    display: flex;
    flex-direction: row;
    place-items: center;
    justify-content: center;
    font-family: Montserrat;
    font-weight: 800;
}

.about {
    font-size: medium;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    grid-auto-rows: 12.5rem;
    grid-auto-flow: dense;
    gap: 1.5rem;
}

div.proficiencyCard {
    background-color: #fff;
    border-radius: 3vw;
    width: calc(25% - 20px);
    margin: 8px;
    height: 180px;
}

.matteGlass {
    /* 1. Semi-transparent background (RGBA is key for transparency) */
    background: rgba(255, 221, 221, 0.13);

    /* 2. The frosted blur effect on the background behind the element */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* For Safari support */

    /* 3. Optional: Add depth and definition */
    border-radius: 10px;
    border: 1px solid rgba(255, 221, 221, 0.123);
    /* Subtle light border */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    /* Subtle shadow for "float" */

    /* Fallback for browsers that don't support backdrop-filter */
    background-color: rgba(25, 33, 36, 0.8);
}

/* Enhanced glassmorphism for better visibility */
.enhanced-glass {
    background: rgba(255, 221, 221, 0.13);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 221, 221, 0.11);
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 0 0 rgba(255, 221, 221, 0.116);
    border-radius: 20px;
    position: relative;

    /* Fallback */
    background-color: rgba(25, 33, 36, 0.308);
}

/* Add subtle glow effect */
.enhanced-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
    z-index: -1;
}

.h1 {
    text-align: center;
    color: #F1FAEE;
}

.floating-image {
    /* Ensure the element can be relatively positioned for transform to work correctly in some contexts */
    position: relative;
    /* Apply the animation */
    animation: float 5s ease-in-out infinite;
}

.floating-image-two {
    /* Ensure the element can be relatively positioned for transform to work correctly in some contexts */
    position: relative;
    /* Apply the animation */
    animation: float 4s ease-in-out infinite;
}

/* Define the keyframes for the floating animation */
@keyframes float {
    0% {
        transform: translateY(0px);
        /* Start at the original vertical position */
    }

    50% {
        transform: translateY(-5px);
        /* Move up by 10 pixels at the midpoint */
    }

    100% {
        transform: translateY(0px);
        /* Return to the original position */
    }
}

.lips {
    width: 300px;
    height: 400px;
    object-fit: cover;
}

.ball {
    position: absolute;
    width: 35vmin;
    height: 35vmin;
    border-radius: 50%;
    backface-visibility: hidden;
    animation: move linear infinite;
}

.ball:nth-child(odd) {
    color: #4d3e18;
}

.ball:nth-child(even) {
    color: #303a55;
}

/* Using a custom attribute for variability */
.ball:nth-child(1) {
    top: 77%;
    left: 88%;
    animation-duration: 40s;
    animation-delay: -3s;
    transform-origin: 16vw -2vh;
    box-shadow: 40vmin 0 5.703076368487546vmin currentColor;
}

.ball:nth-child(2) {
    top: 42%;
    left: 2%;
    animation-duration: 53s;
    animation-delay: -29s;
    transform-origin: -19vw 21vh;
    box-shadow: -40vmin 0 5.17594621519026vmin currentColor;
}

.ball:nth-child(3) {
    top: 28%;
    left: 18%;
    animation-duration: 49s;
    animation-delay: -8s;
    transform-origin: -22vw 3vh;
    box-shadow: 40vmin 0 5.248179047256236vmin currentColor;
}

.ball:nth-child(4) {
    top: 50%;
    left: 79%;
    animation-duration: 26s;
    animation-delay: -21s;
    transform-origin: -17vw -6vh;
    box-shadow: 40vmin 0 5.279749632220298vmin currentColor;
}

.ball:nth-child(5) {
    top: 46%;
    left: 15%;
    animation-duration: 36s;
    animation-delay: -40s;
    transform-origin: 4vw 0vh;
    box-shadow: -40vmin 0 5.964309466052033vmin currentColor;
}

.ball:nth-child(6) {
    top: 77%;
    left: 16%;
    animation-duration: 31s;
    animation-delay: -10s;
    transform-origin: 18vw 4vh;
    box-shadow: 40vmin 0 5.178483653434181vmin currentColor;
}

.ball:nth-child(7) {
    top: 22%;
    left: 17%;
    animation-duration: 55s;
    animation-delay: -6s;
    transform-origin: 1vw -23vh;
    box-shadow: -40vmin 0 5.703026794398318vmin currentColor;
}

.ball:nth-child(8) {
    top: 41%;
    left: 47%;
    animation-duration: 43s;
    animation-delay: -28s;
    transform-origin: 25vw -3vh;
    box-shadow: 40vmin 0 5.196265905749415vmin currentColor;
}

#myImg {
    cursor: pointer;
    transition: 0.3s;
}

#prevDesc {
    color: black;
}

.introPhoto {
    /* border-radius:100%; */
    border-style: solid;
    border-radius: 100%;
    border-width: 8px;
    border-color: #fff;
    height: 350px;
    width: 350px;
    margin: 10px;
    max-width: 90vw;
    max-height: 90vw;
    object-fit: cover;
}

.gridContent {
    margin: 1vw;
    margin-top: 1vh;
    display: grid;
    grid-template-columns: auto auto auto auto;
    gap: 20px;
    justify-items: center;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.introLine {
    margin: 30px 30px 30px 0px;
    height: 4vh;
    border-radius: 100px;
    border-width: 2px;
    border-color: #fff;

}

.gameLink {
    background-color: white;
    border-radius: 100px;
    border: none;
    color: #2B3E70;
    width: fit-content;
    padding: 0.8rem 1.5rem;
    font-weight: bold;
    font-size: 0.8rem;
    margin: 1px 12px;
    cursor: pointer;
    margin-bottom: 2vh;
    transition-duration: 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8vw;
    letter-spacing: 0.1vh;
}

.gameLink img {
    width: auto;
    height: 1.2em;
    object-fit: contain;
    display: block;
    max-width: 20px;
}

.gameLink p {
    margin: 0;
    white-space: nowrap;
    color: #2B3E70;
    font-family: Montserrat;
    font-size: small;
}

/* Hover state: styles when the mouse is over the button */
.gameLink:hover {
    background-color: #FFB703;
    color: #2B3E70;
}

.game-buttons-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: flex-start;
    margin-left: 2vh;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .game-buttons-container {
        justify-content: center;
        margin-left: 0;
    }

    .gameLink {
        padding: 0.5rem 0.6rem;
        margin: 0 6px 16px 6px;
        gap: 4px;
    }

    .gameLink p {
        font-size: 0.6rem;
    }

    .gameLink img {
        max-width: 14px;
    }
}

.flexColumns {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    /* Grow, shrink, start from 0 */
    width: 100%;
    align-items: center;
    gap: 20px;
    /* Add gap between items in column */
    min-width: 250px;
    /* Prevent being too small */
}

.flexRow {
    display: flex;
    flex-direction: row;
    align-content: center;
    width: 100%;
    /* Fit container */
    height: auto;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    gap: 20px;
    /* Gap between columns */
    justify-content: center;
    box-sizing: border-box;
}

.galleryDirectoryContent {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
    /* Add some padding */
}

/* Ensure images and videos are responsive */
gallery-preview,
video-gallery-preview,
.gallery-preview,
.video-gallery-preview {
    width: 100%;
    display: block;
    /* GPU acceleration for gallery items */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.preview-image,
.preview-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 8px;
    /* Optional: smooth corners */
}

/* Dynamic Sizing classes - keeping these but ensuring they don't break flow */
/* We can let them be width 100% and just handle aspect ratio internally via height if needed, 
   but simplistic width: 100% is usually best for columns */
/* Just ensure they don't force fixed widths */
.dynamic-sizing {
    max-width: 100%;
}



.idoContainer {
    display: flex;
    flex-direction: row;
    margin-top: 2vh;
    align-items: center;

    place-items: center;
    justify-content: center;
    font-family: Montserrat;
    font-weight: 800;
}

.hoverButton {
    background-color: #2B3E70;
    border-radius: 100px;
    border: none;
    color: white;
    /* White text */
    width: fit-content;
    padding: 0.1vh 4vh;
    text-align: center;
    display: inline-block;
    font-size: 16px;
    margin: 1px 12px;
    cursor: pointer;
    /* Changes cursor to a hand icon */
    /* Add a smooth transition effect */
    transition-duration: 0.4s;

}

.roller {
    height: 4.125rem;
    line-height: 4rem;
    position: relative;
    overflow: hidden;
    width: min(350px, 90%);
    display: flex;
    justify-content: center;
    align-items: center;

    max-width: 30%;
    /* Never exceed 350px or 100% of parent */

    color: #fff;
}



.roller #rolltext {
    position: absolute;
    top: 0;
    animation: slide 8s infinite;
    white-space: nowrap;
    overflow: visible;
    width: 100%;
}

@keyframes slide {
    0% {
        top: 0;
    }

    7.69% {
        top: -2rem;
    }

    15.38% {
        top: -4rem;
    }

    23.07% {
        top: -6rem;
    }

    30.77% {
        top: -8rem;
    }

    38.46% {
        top: -10rem;
    }

    48.15% {
        top: -12rem;
    }

    53.85% {
        top: -14rem;
    }

    61.54% {
        top: -16rem;
    }

    69.23% {
        top: -18rem;
    }

    76.92% {
        top: -20rem;
    }

    84.62% {
        top: -22rem;
    }

    92.31% {
        top: -24rem;
    }

    99.99% {
        top: -26rem;
    }

}


/* Hover state: styles when the mouse is over the button */
.hoverButton:hover {
    background-color: #FFB703;
    /* Blue background on hover */
    color: #2B3E70;
}

.introContainer {
    z-index: 1;
    width: fit-content;
    max-width: 100%;
    padding: 2vh;
    margin: 2vw;
    font-weight: 800;
    box-sizing: border-box;
    overflow: hidden;
}

.blob-one {
    background-color: #2B3E70;
    position: relative;
    border-radius: 62% 38% 59% 41% / 78% 69% 31% 22%;
    isolation: isolate;
    z-index: -1;
    background-image: linear-gradient(-45deg, #3023AE 0%, #f09 100%);

}

.modalContainer {
    background-color: #fff;
    border-radius: 1vw;
    padding: 20px;
    margin: 20px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    width: 90vw;
    height: 90vh;
}

.VideeoModalContainer {
    background-color: #fff;
    border-radius: 2vw;
    padding: 20px;
    margin: 20px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    position: relative;
}

/* The Modal (background) */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: hidden;
    /* Prevent body scroll */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
    justify-content: center;
    /* Horizontally centers the modal */
    align-items: center;
    /* Vertically centers the modal */
    padding: 20px;
    box-sizing: border-box;
    /* Hardware acceleration for modal */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.VideoModal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: hidden;
    /* Prevent body scroll */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
    justify-content: center;
    /* Horizontally centers the modal */
    align-items: center;
    /* Vertically centers the modal */
    padding: 20px;
    box-sizing: border-box;
}

/* Modal Content (Image) */
.modal-content img {
    margin: 0 auto;
    display: block;
    max-width: calc(100vw - 100px);
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 2vw;
}

/* Modal Content (Video) */
.video-modal-content video {
    margin: 0 auto;
    display: block;
    max-width: calc(100vw - 100px);
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 2vw;
}

/* Enhanced video modal styling for portrait videos */
#myVideo {
    margin: 0 auto;
    display: block;
    max-width: calc(100vw - 100px);
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
}

/* Portrait video specific styling */
#myVideo.portrait-video {
    max-width: calc(100vw - 100px);
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Tall portrait video specific styling */
#myVideo.tall-portrait-video {
    max-width: calc(100vw - 100px);
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Caption of Modal Image (Image Text) - Same Width as the Image */
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: auto;
    min-height: 60px;
}

/* Modal description styling */
#prevDesc {
    color: #333;
    text-align: center;
    padding: 15px;
    margin-top: 10px;
    background-color: #fff;
    border-radius: 10px;
    max-width: 100%;
    /* overflow-y: auto; removed */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto;
    /* Prevent shrinking */
}

#prevDesc h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: #2B3E70;
    word-wrap: break-word;
    display: block !important;
    visibility: visible !important;
}

#prevDesc p {
    margin: 0;
    font-size: 1rem;
    color: #666;
    word-wrap: break-word;
    display: block !important;
    visibility: visible !important;
}

/* Ensure modal content container displays properly */
.modal-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
}

.modal-media {
    flex: 1 1 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
}

.modal-info {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    overflow: hidden;
    /* Changed from overflow-y: auto to prevent whole column scrolling */
    border-left: 1px solid #eee;
}

.modal-content img,
.modal-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* Ensure modal description is always visible */
.modal-content #prevDesc {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    text-align: left;
}

.modal-content #modalTitle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #2B3E70 !important;
    font-size: 1.5rem !important;
    margin: 0 0 4px 0 !important;
}

.modal-content #modalSoftware {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #666 !important;
    font-style: italic !important;
    margin: 0 !important;
}

/* Add Animation - Zoom in the Modal */
.modal-content,
#caption,
#prevDesc {
    animation-name: zoom;
    animation-duration: 0.6s;
}

/* Add Animation - Zoom in the Modal */
.video-modal-content,
#caption,
#prevDesc {
    animation-name: zoom;
    animation-duration: 0.6s;
}


@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    text-decoration: none;
    cursor: pointer;
    outline: none;
}

@media only screen and (min-width: 300px) and (max-width:700px) {

    .lips {
        width: 200px;
        height: 300px;
        object-fit: cover;
    }

    .aboutmeContainer {
        margin: 1vw;
        /* margin-top: 1vh; */
        display: flex;
        flex-direction: column;
        text-align: center;

        place-items: center;
        justify-content: center;
        /* grid-template-columns: auto auto auto; */
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .roller {
        height: 2.15rem;
        line-height: 2rem;
        width: 90vw;
        max-width: 100%;
    }


    .roller #rolltext {
        animation: slide-mob 8s infinite;
        width: 100%;
    }

    @keyframes slide-mob {
        0% {
            top: 0;
        }

        7.69% {
            top: -2rem;
        }

        15.38% {
            top: -4rem;
        }

        23.07% {
            top: -6rem;
        }

        30.77% {
            top: -8rem;
        }

        38.46% {
            top: -10rem;
        }

        48.15% {
            top: -12rem;
        }

        53.85% {
            top: -14rem;
        }

        61.54% {
            top: -16rem;
        }

        69.23% {
            top: -18rem;
        }

        76.92% {
            top: -20rem;
        }

        84.62% {
            top: -22rem;
        }

        92.31% {
            top: -24rem;
        }

        99.99% {
            top: -26rem;
        }
    }

    .flippable-card-container {
        width: 150px;
        height: 150px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .card-software-name {
        font-size: 13px;
    }

    .card-years {
        font-size: 16px;
        margin-bottom: 18px;
    }

    .proficiency-dot {
        width: 16px;
        height: 16px;
    }

    .cards-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
        max-width: 1400px;
        margin: 0 auto;
        padding: 25px;
    }


}

@media only screen and (min-width: 601px) and (max-width: 955px) {

    .contactMe {
        font-size: 20px;
        letter-spacing: 2px;
        text-align: center;
        color: #2B3E70;
    }

    .flexContainer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .knowMore .flexContainer {
        flex-direction: row;
    }

    .navbar {
        width: 95%;
        padding: 5px 5px;
        margin: 0 auto 2vh auto;
    }

    .navbar a {
        font-size: 13px;
        padding: 8px 5px;
        margin: 2px;
        letter-spacing: 1px;
    }

    .line {
        width: 2px;
        margin: 5px 2px;
    }

    .introPhoto {
        height: 200px;
        width: 200px;
        border-radius: 100%;
        border-width: 5px;
    }

    .introContainer {
        padding: 3vh;
        margin: 2vw;
    }

    .gridContent {
        grid-template-columns: auto;
        text-align: center;
        justify-content: center;
        align-items: center;
    }

    .knowMore {
        padding: 15px;
        width: 100%;
        height: auto;
        margin: 0;
        border-radius: 0px;
        max-width: none;
    }

    .knowMore hr {
        margin-left: auto;
        margin-right: auto;
    }

    .knowMore .flexContainer {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .knowMore .flexContainer>div {
        flex: none;
        width: 100%;
        padding: 0 !important;
        align-items: center;
        text-align: center;
    }

    .knowMore .resumeButton {
        margin: 10px auto;
        text-align: center;
    }

    .knowMore .resumeButton img {
        max-width: fit-content;
        height: auto;
    }

    .knowMore div[style*="letter-spacing: 2px"] {
        text-align: center;
        margin: 0 0 15px 0;
    }

    .knowMore div[style*="font-size:20px"] {
        text-align: center;
        margin: 10px 0;
    }

    .knowMore div[style*="display:flex"] {
        justify-content: center;
        margin-bottom: 8px;
    }

    .knowMore div[style*="display:flex"] img {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }

    .knowMore div[style*="color:#2B3E70"] {
        font-size: 14px;
    }

    .portfolioTitle {
        font-size: 16px;
        text-align: left;
    }

    .hoverButton {
        width: 25vh;
        font-size: 14px;
        padding: 0.4vh 1.5vh;
        margin-bottom: 1vh;
    }

    /* Fix for the "You can find me here too" section */
    .introContainer div[style*="color:#FFB703"] {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1vh;
    }

    .categoryDesc {
        font-size: xx-small;
        padding: 0px 10px 0px 0px;
        line-height: 1.3;
        text-align: center;
        font-family: 'Montserrat';
    }

    .categoryHeader {
        font-family: Montserrat;
        font-weight: bold;
        font-size: large;
        text-align: center;
        margin-bottom: 2vh;
    }

    /* Center gallery container content */
    .galleryContainer {
        text-align: center;
    }

    .galleryDirectoryContent {
        text-align: center;
    }

    .galleryContainer {
        width: max-content;
        height: 1100px;
        padding: 20px;
        background-color: #fff;
        box-sizing: border-box;
    }

    div.galleryDirectory {
        width: calc(100% - 40px);
        height: auto;
        padding: 15px;
        border-radius: 20px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin: 0 20px 20px 20px;
    }

    .galleryDirectory button {
        border-radius: 8px;
        font-family: Montserrat;
        font-size: 11px;
        font-weight: 600;
        display: block;
        background-color: #FFB703;
        color: white;
        margin: 0;
        padding: 10px 6px;
        width: 100%;
        border: none;
        text-align: center;
        cursor: pointer;
        transition: 0.3s;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-color: white;
    }

    .galleryDirectory button:hover {
        background-color: #FFB703;
        color: #2B3E70;
    }

    .galleryDirectory button.active {
        border-radius: 8px;
        transition: 0.3s;
        background-color: #2B3E70;
        font-weight: bold;
        color: #fff;
    }

    .galleryDirectoryContent {
        overflow-x: auto;
        float: left;
        padding: 5px;
        margin: 5px;
        border-radius: 15px;
        width: 100%;
        border: none;
        height: 900px;
    }

    .galleryItems {
        justify-content: center;
        align-items: center;
        justify-items: center;
        place-content: center;
        place-items: center;
        text-align: center;
        align-self: center;
    }

    div.gallery-preview,
    div.video-gallery-preview {
        font-size: 16px;
        /* Fixed font size instead of vw to prevent excessive growth */
        margin: 5px 3px;
        border: 1px solid #ccc;
        border-radius: 1vw;
        float: left;
        width: fit-content;
        height: fit-content;
        background-color: #fff;
        overflow: hidden;
        max-width: calc(50vw - 10px);
        /* Limit max width on small screens */
        /* Remove max-height to allow portrait content to display properly */
        display: flex;
        flex-direction: column;
        /* Ensure proper aspect ratio handling */
        aspect-ratio: var(--preview-aspect-ratio, auto);
    }

    div.gallery-preview img,
    div.video-gallery-preview video {
        border-radius: 1vw 1vw 0vw 0vw;
        margin-bottom: 4px;
        object-fit: contain;
        /* Changed from cover to contain to prevent clipping/cropping */
        width: 100%;
        height: auto;
        /* Changed to auto to maintain aspect ratio */
        /* Remove max-height to allow portrait content to display properly */
        float: left;
        /* Ensure proper aspect ratio maintenance */
        display: block;
        /* Use CSS aspect-ratio property for better aspect ratio handling */
        aspect-ratio: var(--preview-aspect-ratio, auto);
        flex-shrink: 0;
    }

    /* Keep preview content visible at all screen sizes */
    div.gallery-preview .preview-software,
    div.gallery-preview .preview-description,
    div.video-gallery-preview .vid-prev-software,
    div.video-gallery-preview .vid-prev-description {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Show preview titles with appropriate size */
    div.gallery-preview .preview-title,
    div.video-gallery-preview .vid-prev-title {
        font-size: 12px;
        display: block;
        text-align: center;
        margin: 4px 0;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
        color: #333;
        font-weight: 600;
    }

    /* Show preview software names with appropriate size */
    div.gallery-preview .preview-software,
    div.video-gallery-preview .vid-prev-software {
        font-size: 10px;
        display: block;
        text-align: center;
        margin: 2px 0;
        line-height: 1.2;
        color: #666;
        font-style: italic;
    }

    /* Adjust padding div to show title and software properly */
    div.gallery-preview div[style*="padding:10px"],
    div.video-gallery-preview div[style*="padding:10px"] {
        padding: 8px !important;
        text-align: center;
        min-height: 60px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Ensure title elements are visible */
    div.gallery-preview .preview-title,
    div.video-gallery-preview .vid-prev-title {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #333 !important;
    }

    /* Ensure software elements are visible */
    div.gallery-preview .preview-software,
    div.video-gallery-preview .vid-prev-software {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #666 !important;
        font-style: italic !important;
    }

    div.gallery-preview:hover,
    div.video-gallery-preview:hover {
        border: 1px solid #ccc;
        cursor: pointer;
        margin-top: 20px;
        transition: 0.3s;
    }

    /* Make intro line horizontal on mobile */
    .introLine {
        width: 80% !important;
        height: 2px !important;
        border: none !important;
        background-color: #fff !important;
        margin: 30px auto 20px auto !important;
        display: block !important;
    }
}

@media only screen and (max-width: 700px) {
    .modalContainer {
        flex-direction: column;
        width: 90vw;
        height: 90vh;
        max-height: 90vh;
        margin: 5vh auto;
        padding: 0;
        overflow: hidden;
        /* Hide overflow of container, content scrolls inside */
        border-radius: 2vw;
        background-color: #fff;
        display: flex;
    }

    /* THE SCROLLABLE WRAPPER */
    .modal-content {
        flex-direction: column;
        width: 100%;
        height: 100%;
        overflow-y: auto;
        /* Enable vertical scrolling for the whole content */
        overflow-x: hidden;
        display: block;
        /* Stack elements vertically */
        box-sizing: border-box;
    }

    /* Main Image/Video Container - Full width, auto height */
    .modal-media {
        width: 100%;
        height: auto;
        /* Let content dictate height */
        max-height: none;
        /* Remove cap */
        padding: 0;
        /* Remove padding for full-bleed look if desired, or keep small padding */
        background-color: #fff;
        display: block;
        /* Align as block */
        margin-bottom: 10px;
    }

    .modal-info {
        width: 100%;
        padding: 20px;
        border: none;
        overflow: visible;
        text-align: left;
        box-sizing: border-box;
        /* Fix: Include padding in width calculation */
    }

    /* Fix Main Image and Video Sizing: Full Width, Auto Height */
    .modal-content img,
    .modal-content video,
    #myVideo,
    #myImg {
        max-width: 100%;
        max-height: none;
        /* Unlock height */
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        border-radius: 20px 20px 0 0;
        /* Rounded top corners matching container if full bleed */
    }

    /* Ensure video overrides specific aspect ratio classes on mobile if they interfere */
    #myVideo.portrait-video,
    #myVideo.tall-portrait-video,
    #myVideo.landscape-video,
    #myVideo.square-video {
        max-width: 100%;
        max-height: none;
        width: 100%;
        height: auto;
    }

    .close {
        top: 15px;
        right: 15px;
        font-size: 24px;
        width: 36px;
        height: 36px;
        background: rgba(0, 0, 0, 0.5);
        /* Semi-transparent background */
        color: white;
        border-radius: 50%;
        z-index: 1005;
        /* Ensure above everything */
    }

    /* ALIGNMENT FIXES */
    #prevDesc {
        padding: 0;
        font-size: 0.95rem;
        /* Slightly larger readability */
        text-align: left !important;
        display: block !important;
        line-height: 1.6;
    }

    #prevDesc h2 {
        font-size: 1.5rem;
        /* Larger title */
        font-weight: 800;
        text-align: left !important;
        margin-top: 5px;
        margin-bottom: 15px;
        color: #2B3E70;
    }

    #prevDesc p {
        font-size: 0.9rem;
        text-align: left !important;
        color: #555;
    }

    .software-container {
        text-align: left !important;
        margin-bottom: 20px;
    }

    .software-tags {
        justify-content: flex-start !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .software-tag {
        background-color: #eee;
        padding: 4px 12px;
        border-radius: 100px;
        font-size: 0.8rem;
        color: #555;
    }

    /* Extra Images Gallery Styling for Mobile - 2 Column Grid */
    #modalGallery {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* Explicit 2 columns */
        gap: 15px;
        /* Larger gap */
        margin-top: 30px;
        width: 100%;
        padding-bottom: 20px;
    }

    .modal-gallery-thumb {
        width: 100%;
        height: 150px;
        /* Large square-ish thumbs */
        object-fit: cover;
        /* Cover usually looks better for grid thumbs, but used contain if cropping strictly forbidden. User said 'slightly bigger', 'fit the modal'. Reference shows squares. Let's start with contain/cover. If user wants NO cropping, contain. But cover fills grid better. I will use contain as per previous instruction 'no cropping', but background color fill. */
        object-fit: contain;
        background-color: #f0f0f0;
        border: 1px solid #eee;
        border-radius: 12px;
        cursor: pointer;
    }

    .modal-gallery-thumb.active {
        border-color: #2B3E70;
        border-width: 3px;
    }
}


.responsive {
    width: 100%;
    height: auto;
    z-index: 1;
}

.aboutme {
    width: 100%;
    height: auto;
    z-index: 2;
}

.resumeButton {
    margin: 20px 30px 20px 0px;
    transition: margin 0.2s ease-in-out;
}

.knowMore {
    margin: 0;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 0px;
    width: 100%;
    height: auto;
    background-color: #fff;
    max-width: none;
    box-sizing: border-box;
    overflow-x: hidden;
}

.flexContainer {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

/* Default horizontal layout for larger screens (min-width: 956px) */
@media only screen and (min-width: 955px) {
    .knowMore .flexContainer>div {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .knowMore .flexContainer>div:first-child {
        align-items: flex-start;
        padding-right: 20px;
    }

    .knowMore .flexContainer>div:last-child {
        align-items: flex-start;
        padding-left: 20px;
    }

    .knowMore hr {
        margin-left: 0;
        margin-right: auto;
    }

    .galleryDirectory button {
        border: 1px solid white;
    }
}

.hLine {
    border: 2px #ccc;
    height: 100px;
}

@media only screen and (min-width:750px) {
    .aboutmeContainer {
        margin: 1vw;
        margin-top: 1vh;
        display: flex;
        flex-direction: row;
        text-align: left;

        place-items: center;
        justify-content: center;
        /* grid-template-columns: auto auto auto; */
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 600px) {


    .IDO {
        color: #FFB703;
        margin-left: 3vh;
    }

    .roller {
        height: 2.15rem;
        line-height: 2rem;
        width: min(300px, 90%);
    }


    .roller #rolltext {
        animation: slide-mob 8s infinite;
        width: max-content;
    }

    @keyframes slide-mob {
        0% {
            top: 0;
        }

        7.69% {
            top: -2rem;
        }

        15.38% {
            top: -4rem;
        }

        23.07% {
            top: -6rem;
        }

        30.77% {
            top: -8rem;
        }

        38.46% {
            top: -10rem;
        }

        48.15% {
            top: -12rem;
        }

        53.85% {
            top: -14rem;
        }

        61.54% {
            top: -16rem;
        }

        69.23% {
            top: -18rem;
        }

        76.92% {
            top: -20rem;
        }

        84.62% {
            top: -22rem;
        }

        92.31% {
            top: -24rem;
        }

        99.99% {
            top: -26rem;
        }
    }

    .portfolioTitle {
        font-size: 30px;
        letter-spacing: 2px;
        margin: 15px;
        color: #2B3E70
    }

    .galleryContainer {
        width: calc(100% - 80px);
        height: auto;
        min-height: 1100px;
        padding: 40px;
        border-radius: 10px;
        position: relative;
        z-index: 1;
        margin: 0 auto;
        box-sizing: border-box;

        /* Enhanced glassmorphism effect */
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        /* border: 1px solid rgba(255, 255, 255, 0.25); */
        box-shadow:
            0 8px 32px 0 rgba(31, 38, 135, 0.37),
            inset 0 1px 0 0 rgba(255, 255, 255, 0.2);

        /* Fallback for older browsers */
        background-color: rgba(25, 33, 36, 0.7);
    }

    /* Add subtle glow effect to gallery container */
    .galleryContainer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 10px;
        background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.1) 0%,
                rgba(255, 255, 255, 0.05) 50%,
                rgba(255, 255, 255, 0.02) 100%);
        pointer-events: none;
        z-index: -1;
    }

    div.galleryDirectory {
        width: fit-content;
        height: auto;
        padding: 0px 0px 0px 10px;
        text-align: center;
        /* background-color: #fff; */
        /* border: 1px solid #ccc; */
        border-radius: 10px;
    }

    .galleryDirectory button {
        border-radius: 30px;
        font-family: Montserrat;
        font-weight: 600;
        display: block;
        background-color: inherit;
        padding: 20px;
        width: max-content;
        margin: 1vh;
        margin-right: 2vw;
        border-width: 1px;
        text-align: left;
        cursor: pointer;
        transition: 0.3s;
        color: white;
        border: none;
    }

    .galleryDirectory button:hover {
        background-color: #FFB703;
        color: #2B3E70;
    }

    .galleryDirectory button.active {
        transition: 0.3s;
        background-color: #2B3E70;
        padding: 20px;
        font-weight: bold;
        color: #fff;
        border-color: none;
    }

    .galleryItems {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        grid-auto-rows: 200px;
        gap: 12px;
        justify-content: center;
        align-items: start;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* Masonry-style layout for dynamic gallery items */
    .galleryItems .gallery-preview.dynamic-sizing {
        margin-bottom: 0;
        align-self: start;
    }

    /* Base styles for dynamic gallery items */
    .gallery-preview.dynamic-sizing {
        width: 100%;
        height: 100%;
        grid-row: span 1;
        flex-shrink: 0;
        break-inside: avoid;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .gallery-preview.dynamic-sizing .preview-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .gallery-preview.dynamic-sizing div[style*="padding:20px"] {
        padding: 10px;
        text-align: center;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
    }

    /* Portrait orientation */

    /* Portrait orientation - span more rows */
    .gallery-preview.dynamic-sizing.portrait {
        grid-column: span 1;
        grid-row: span 2;
    }

    .gallery-preview.dynamic-sizing.tall-portrait {
        grid-column: span 1;
        grid-row: span 3;
    }

    /* Landscape orientation - span more columns */

    /* Landscape orientation */
    .gallery-preview.dynamic-sizing.landscape {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gallery-preview.dynamic-sizing.wide-landscape {
        grid-column: span 3;
        grid-row: span 1;
    }

    /* Square orientation */
    .gallery-preview.dynamic-sizing.square {
        grid-column: span 1;
        grid-row: span 1;
    }

    .galleryDirectoryContent {
        overflow-x: auto;
        float: left;
        padding: 15px;
        margin: 20px;
        border: 1px solid #ccc;
        border-radius: 20px;
        width: 100%;
        border: none;
        height: 800px;
    }

    div.gallery-preview,
    div.video-gallery-preview {
        font-size: 16px;
        /* Fixed font size instead of vw to prevent excessive growth */
        margin: 10px;
        border: 1px solid #ccc;
        border-radius: 1vw;
        float: left;
        /* Keep float if necessary for other logic but flex is better */
        width: 100%;
        /* Changed from fit-content to 100% */
        height: auto;
        /* Changed from fit-content to auto */
        background-color: #fff;
        -ms-text-size-adjust: auto;
        /* max-width: calc(50vw - 20px); */
        /* Limit max width on medium screens */
        /* Remove max-height to allow portrait content to display properly */
        display: flex;
        flex-direction: column;
        /* Ensure proper aspect ratio handling */
        aspect-ratio: var(--preview-aspect-ratio, auto);
    }

    /* Dynamic sizing classes for photography gallery */
    /* Dynamic sizing classes for photography gallery */
    div.gallery-preview.dynamic-sizing {
        width: 100%;
        height: auto;
        /* min-width: 200px; */
        /* max-width: 300px; */
    }

    div.gallery-preview.dynamic-sizing.portrait {
        width: 100%;
        height: auto;
    }

    div.gallery-preview.dynamic-sizing.landscape {
        width: 100%;
        height: auto;
    }

    div.gallery-preview.dynamic-sizing.square {
        width: 100%;
        height: auto;
    }

    div.gallery-preview.dynamic-sizing img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    div.gallery-preview.dynamic-sizing video,
    div.video-gallery-preview.dynamic-sizing video {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* Dynamic sizing for video gallery previews */
    div.video-gallery-preview.dynamic-sizing {
        margin-bottom: 0;
        align-self: flex-start;
        /* Allow sizing based on aspect ratio while maintaining flex position */
        /* width: calc(var(--aspect-ratio, 1) * 200px); */
        /* height: 200px; */
        width: 100%;
        height: auto;
        margin: 10px;
        flex-shrink: 0;
        break-inside: avoid;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Portrait orientation - span more rows */
    div.video-gallery-preview.dynamic-sizing.portrait {
        grid-column: span 1;
        grid-row: span 2;
    }

    div.video-gallery-preview.dynamic-sizing.tall-portrait {
        grid-column: span 1;
        grid-row: span 3;
    }

    /* Landscape orientation */
    div.video-gallery-preview.dynamic-sizing.landscape {
        grid-column: span 2;
        grid-row: span 1;
    }

    div.video-gallery-preview.dynamic-sizing.wide-landscape {
        grid-column: span 3;
        grid-row: span 1;
    }

    /* Square orientation */
    div.video-gallery-preview.dynamic-sizing.square {
        grid-column: span 1;
        grid-row: span 1;
    }

    div.gallery-preview img,
    div.video-gallery-preview video {
        border-radius: 8px 8px 0 0;
        margin: 0;
        object-fit: contain;
        /* Changed from cover to contain to prevent clipping/cropping */
        width: 100%;
        height: auto;
        /* Changed to auto to maintain aspect ratio */
        float: none;
        flex-shrink: 0;
        /* Use CSS aspect-ratio property for better aspect ratio handling */
        aspect-ratio: var(--preview-aspect-ratio, auto);
    }

    div.gallery-preview:hover {
        border: 1px solid #ccc;
        cursor: pointer;
        transform: translateY(-10px);
        /* Moves the image up without affecting the layout */
        opacity: 60%;
        transition: 0.3s ease;
    }

    div.video-gallery-preview:hover {
        border: 1px solid #ccc;
        cursor: pointer;
        transform: translateY(-10px);
        /* Moves the image up without affecting the layout */
        opacity: 60%;
        transition: 0.3s ease;
    }
}

/* Extra small devices (phones, 709px and down) */
@media only screen and (max-width: 709px) {

    .flexColumns {
        display: flex;
        flex-direction: column;
        width: 48%;
        /* Changed from 100% to 48% to create 2 columns */
        align-items: center;
        gap: 10px;
    }

    .flexRow {
        display: flex;
        flex-direction: row;
        align-content: center;
        width: 100%;
        height: auto;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .about {
        font-size: small;
    }


    .navbar {
        width: 95%;
        padding: 5px 2px;
        margin: 0 auto 2vh auto;
    }

    .navbar a {
        font-size: 12px;
        padding: 5px 2px;
        margin: 1px;
        letter-spacing: 1px;
    }

    .line {
        width: 2px;
        margin: 5px 2px;
    }

    .introPhoto {
        height: 200px;
        width: 200px;
        border-radius: 100%;
        border-width: 5px;
    }

    .introContainer {
        padding: 3vh;
        margin: 2vw;
    }

    .gridContent {
        grid-template-columns: auto;
        text-align: center;
        justify-content: center;
        align-items: center;
    }

    .knowMore {
        padding: 15px;
        width: 100%;
        height: auto;
        max-width: none;
        margin: 0;
        border-radius: 0px;
    }

    .knowMore .flexContainer {
        flex-direction: column;
        gap: 20px;
    }

    .knowMore .flexContainer>div {
        flex: none;
        width: 100%;
        padding: 0 !important;
        align-items: center;
        text-align: center;
    }

    .knowMore .resumeButton {
        margin: 10px auto;
        text-align: center;
    }

    .knowMore .resumeButton img {
        max-width: 120px;
        height: auto;
    }

    .knowMore div[style*="letter-spacing: 2px"] {
        text-align: center;
        margin: 0 0 15px 0;
        font-size: 14px;
    }

    .knowMore div[style*="font-size:20px"] {
        text-align: center;
        margin: 10px 0;
        font-size: 16px;
    }

    .knowMore hr {
        margin: 0 auto;
        width: 40% !important;
    }

    .knowMore div[style*="display:flex"] {
        justify-content: center;
        margin-bottom: 8px;
    }

    .knowMore div[style*="display:flex"] img {
        width: 18px;
        height: 18px;
        margin-right: 8px;
    }

    .knowMore div[style*="color:#2B3E70"] {
        font-size: 12px;
    }

    .flexContainer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .portfolioTitle {
        font-size: 16px;
        text-align: left;
    }

    .hoverButton {
        width: 25vh;
        font-size: 14px;
        padding: 0.4vh 1.5vh;
        margin-bottom: 1vh;
    }

    /* Fix for the "You can find me here too" section */
    .introContainer div[style*="color:#FFB703"] {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1vh;
    }

    .categoryDesc {
        font-size: xx-small;
        line-height: 1.3;
        text-align: center;
        justify-content: center;
    }

    .categoryHeader {
        font-family: Montserrat;
        font-weight: bold;
        font-size: large;
        text-align: center;
        margin-bottom: 12px;
    }

    .galleryContainer {
        /* width: calc(100% - 80px); */
        width: 100%;
        height: auto;
        min-height: 1100px;
        padding: 40px;
        border-radius: 10px;
        position: relative;
        z-index: 1;
        margin: 0 auto;
        box-sizing: border-box;

        /* Enhanced glassmorphism effect */
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        /* border: 1px solid rgba(255, 255, 255, 0.25); */
        box-shadow:
            0 8px 32px 0 rgba(31, 38, 135, 0.37),
            inset 0 1px 0 0 rgba(255, 255, 255, 0.2);

        /* Fallback for older browsers */
        background-color: rgba(25, 33, 36, 0.7);
    }

    /* Add subtle glow effect to gallery container */
    .galleryContainer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 10px;
        background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.1) 0%,
                rgba(255, 255, 255, 0.05) 50%,
                rgba(255, 255, 255, 0.02) 100%);
        pointer-events: none;
        z-index: -1;
    }

    /* Center gallery container content */
    .galleryContainer {
        text-align: center;
    }

    .galleryDirectoryContent {
        text-align: center;
    }

    .galleryContainer {
        /* width: calc(100% - 40px); */
        width: 100%;
        height: auto;
        min-height: auto;
        /* Changed from fixed 1100px to auto for mobile */
        padding: 20px;
        border-radius: 10px;
        position: relative;
        z-index: 1;
        margin: 0 auto;
        box-sizing: border-box;
        max-width: 100vw;
        /* Ensure it doesn't exceed viewport width */
        overflow: hidden;
        /* Prevent content overflow */

        /* Glassmorphism effect for mobile */
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(15px) saturate(150%);
        -webkit-backdrop-filter: blur(15px) saturate(150%);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow:
            0 4px 20px 0 rgba(31, 38, 135, 0.3),
            inset 0 1px 0 0 rgba(255, 255, 255, 0.15);

        /* Fallback for older browsers */
        background-color: rgba(25, 33, 36, 0.75);
    }

    /* Add subtle glow effect to gallery container on mobile */
    .galleryContainer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: inherit;
        background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.08) 0%,
                rgba(255, 255, 255, 0.04) 50%,
                rgba(255, 255, 255, 0.01) 100%);
        pointer-events: none;
        z-index: -1;
    }

    div.galleryDirectory {
        width: calc(100% - 40px);
        height: auto;
        padding: 15px;
        border-radius: 20px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin: 0 20px 20px 20px;
    }

    .galleryDirectory button {
        border-radius: 8px;
        font-family: Montserrat;
        font-size: 11px;
        font-weight: 600;
        display: block;
        background-color: inherit;
        color: white;
        margin: 0;
        padding: 10px 6px;
        width: 100%;
        border: none;
        text-align: center;
        cursor: pointer;
        transition: 0.3s;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .galleryDirectory button:hover {
        background-color: #FFB703;
        color: #2B3E70;
    }

    .galleryDirectory button.active {
        border-radius: 8px;
        transition: 0.3s;
        background-color: #2B3E70;
        font-weight: bold;
        color: #fff;
    }

    .galleryDirectoryContent {
        overflow-x: hidden;
        /* Changed from auto to hidden to prevent horizontal scroll */
        float: left;
        padding: 5px;
        margin: 5px;
        border-radius: 15px;
        width: 100%;
        border: none;
        height: auto;
        /* Changed from fixed 900px to auto */
        max-height: 80vh;
        /* Limit height to 80% of viewport on mobile */
        overflow-y: auto;
        /* Allow vertical scrolling if needed */
    }

    .galleryItems {
        justify-content: center;
        align-items: center;
        justify-items: center;
        place-content: center;
        place-items: center;
        text-align: center;
        align-self: center;
    }

    .galleryItems {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
        justify-items: center;
        /* Center items in grid */
    }

    .galleryContainer {
        padding: 10px;
    }

    .galleryDirectory {
        gap: 1vw;
    }

    div.gallery-preview,
    div.video-gallery-preview {
        font-size: 14px;
        /* Smaller fixed font size for mobile */
        margin: 0;
        border: 1px solid #ccc;
        border-radius: 6px;
        float: none;
        width: 100%;
        height: auto;
        background-color: #fff;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        max-width: 100%;
        /* Ensure it doesn't exceed container */
        /* Remove max-height to allow portrait content to display properly */
        /* Ensure proper aspect ratio handling */
        position: relative;
        aspect-ratio: var(--preview-aspect-ratio, auto);
        padding: 3px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    /* Dynamic sizing for mobile photography gallery */
    div.gallery-preview.dynamic-sizing {
        width: 100%;
        height: auto;
        grid-row: span 1;
        grid-column: span 1;
        max-width: 100%;
        /* Ensure it doesn't exceed grid cell */
        box-sizing: border-box;
        /* Include padding in width calculation */
        overflow: hidden;
        /* Prevent content overflow */
        /* Ensure proper aspect ratio handling */
        position: relative;
    }

    div.gallery-preview.dynamic-sizing.portrait {
        grid-row: span 2;
    }

    div.gallery-preview.dynamic-sizing.tall-portrait {
        grid-row: span 3;
    }

    div.gallery-preview.dynamic-sizing.landscape {
        grid-column: span 2;
    }

    div.gallery-preview.dynamic-sizing.wide-landscape {
        grid-column: span 2;
    }

    div.gallery-preview.dynamic-sizing img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }



    div.gallery-preview img,
    div.video-gallery-preview video {
        border-radius: 1vw 1vw 0vw 0vw;
        margin-bottom: 6px;
        object-fit: contain;
        /* Changed from cover to contain to prevent clipping/cropping */
        width: 100%;
        height: auto;
        /* Changed to auto to maintain aspect ratio */
        /* Remove max-height to allow portrait content to display properly */
        float: left;
        /* Ensure proper aspect ratio maintenance */
        display: block;
        /* Use CSS aspect-ratio property for better aspect ratio handling */
        aspect-ratio: var(--preview-aspect-ratio, auto);
        flex-shrink: 0;
    }

    /* Hide preview content on mobile to match desktop/video previews */
    .preview-info {
        display: none !important;
    }

    /* Adjust padding div to show title and software */
    /* Removed obsolete padding adjustments for hidden content */

    div.gallery-preview:hover,
    div.video-gallery-preview:hover {
        border: 1px solid #ccc;
        cursor: pointer;
        transform: translateY(-5px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    /* Make intro line horizontal on mobile */
    .introLine {
        width: 80% !important;
        height: 2px !important;
        border: none !important;
        background-color: #fff !important;
        margin: 30px auto 20px auto !important;
        display: block !important;
    }
}

div.desc {
    padding: 15px 15px 35px 15px;
    text-align: center;
}

/* Fix for gallery preview text visibility issue - ensure text remains visible on all screen sizes */
.gallery-preview .preview-title,
.gallery-preview .preview-software,
.video-gallery-preview .vid-prev-title,
.video-gallery-preview .vid-prev-software {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: normal;
    /* Allow text to wrap */
    overflow: visible;
    /* Prevent text from being hidden */
    text-align: center;
}

/* Ensure text containers have proper minimum height */
.gallery-preview div[style*="padding:20px"],
.video-gallery-preview div[style*="padding:20px"] {
    min-height: 60px;
    /* Ensure enough space for text */
    padding: 10px !important;
    /* Ensure proper padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.categoryDesc {
    font-family: 'Montserrat';
    color: #ffffffa9;
    font-weight: 400;
    font-size: medium;
    margin: 2vh;
}

.categoryHeader {
    color: white;
    font-family: Montserrat;
    font-weight: bold;
    font-size: xx-large;
    margin-left: 2vh;
    margin-bottom: 2vh;
}

/* Fix for larger screens (710px and up) */
@media only screen and (min-width: 710px) {

    .gallery-preview,
    .video-gallery-preview {
        overflow: visible;
        /* Prevent content from being hidden */
    }

    .gallery-preview .preview-title,
    .video-gallery-preview .vid-prev-title {
        font-size: 14px;
        /* Consistent font size */
        line-height: 1.4;
        /* Better text readability */
        margin: 4px 0;
    }

    .gallery-preview .preview-software,
    .video-gallery-preview .vid-prev-software {
        font-size: 12px;
        /* Consistent font size */
        line-height: 1.4;
        /* Better text readability */
        margin: 2px 0;
        font-style: italic;
    }
}

.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 900;
    font-style: bold;
    display: flex;
    text-align: center;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 8vh;
    padding: 1vh;
    padding-right: 2vh;
    padding-left: 2vh;
    background-color: #192136;
    box-sizing: border-box;
    height: auto;
    box-shadow: 0px 3px 5px 1px rgba(0, 0, 0, 0.1);
    justify-content: center;
}

.navbar a {
    position: relative;
    color: #fff;
    text-align: center;
    padding: 15px 10px;
    margin: 5px;
    font-family: Montserrat;
    font-weight: bold;
    font-size: 17px;
    letter-spacing: 2px;
    font-variant: small-caps;
    text-decoration: none;
    flex: 1;
}

.navbar nav {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.line {
    margin-top: 10px;
    margin-left: 5px;
    margin-right: 5px;
    width: 4px;
    align-self: center;
}

.textHover {
    color: #fff;
}

.textHover:hover {
    color: #FFB703;
}

/* Flippable Card Styles */
.flippable-card-container {
    perspective: 1000px;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.flippable-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.flippable-card.flipped {
    transform: rotateY(180deg);
}

/* Add hover flip functionality */
.flippable-card-container:hover .flippable-card {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.flippable-card-container:hover .card-front,
.flippable-card-container:hover .card-back {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-front {
    background-color: #192136;
    color: white;
}

.card-back {
    background-color: #FFB703;
    color: #2B3E70;
    transform: rotateY(180deg);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.software-icon {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    fill: #fff;
    padding: 10px;
    box-sizing: border-box;
}

.software-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.software-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.card-software-name {
    font-family: Montserrat;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    line-height: 1.1;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 90%;
}

.card-years {
    font-family: Montserrat;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.card-proficiency {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.proficiency-dots {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.proficiency-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(43, 62, 112, 0.3);
    border: 2px solid #2B3E70;
    transition: all 0.3s ease;
}

.proficiency-dot.filled {
    background-color: #2B3E70;
    transform: scale(1.1);
}

.proficiency-label {
    font-family: Montserrat;
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Base styles for cards container */
.cards-container {
    display: grid;
    justify-content: center;
    align-items: center;
}

/* Additional responsive styles for knowMore section on very small devices */
@media only screen and (max-width: 400px) {


    .roller {
        height: 2.15rem;
        line-height: 2rem;
        width: 90vw;
        max-width: 100%;
    }


    .roller #rolltext {
        animation: slide-mob 8s infinite;
    }

    @keyframes slide-mob {
        0% {
            top: 0;
        }

        7.69% {
            top: -2rem;
        }

        15.38% {
            top: -4rem;
        }

        23.07% {
            top: -6rem;
        }

        30.77% {
            top: -8rem;
        }

        38.46% {
            top: -10rem;
        }

        48.15% {
            top: -12rem;
        }

        53.85% {
            top: -14rem;
        }

        61.54% {
            top: -16rem;
        }

        69.23% {
            top: -18rem;
        }

        76.92% {
            top: -20rem;
        }

        84.62% {
            top: -22rem;
        }

        92.31% {
            top: -24rem;
        }

        99.99% {
            top: -26rem;
        }
    }

    .knowMore {
        padding: 10px;
        width: 100%;
        border-radius: 0px;
        max-width: none;
    }

    .knowMore .resumeButton img {
        max-width: 100px;
        height: auto;
    }

    .knowMore div[style*="letter-spacing: 2px"] {
        font-size: 12px;
        letter-spacing: 1px !important;
    }

    .knowMore div[style*="font-size:20px"] {
        font-size: 14px;
    }

    .knowMore div[style*="display:flex"] img {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }

    .knowMore div[style*="color:#2B3E70"] {
        font-size: 11px;
    }
}

/* Responsive design for flippable cards */
@media only screen and (min-width: 300px) and (max-width: 740px) {
    .contactMe {
        font-size: 20px;
        letter-spacing: 2px;
        text-align: center;
        color: #2B3E70;
    }

    .idoContainer {
        margin: auto;
        display: flex;
        flex-direction: column;
        row-gap: 2px;
        margin-top: 2vh;
        align-items: center;
    }

    .flippable-card-container {
        width: 100px;
        height: 100px;
    }

    .card-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 8px;
    }

    .card-software-name {
        font-size: 10px;
        line-height: 1.0;
    }

    .card-years {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .proficiency-dot {
        width: 10px;
        height: 10px;
    }

    .proficiency-dots {
        gap: 4px;
        margin-top: 5px;
    }

    .proficiency-label {
        font-size: 9px;
        margin-bottom: 3px;
    }

    .cards-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 24px !important;
        max-width: 350px;
        margin: 0 auto;
        padding: 10px;
    }
}

@media only screen and (min-width: 511px) and (max-width: 600px) {
    .flippable-card-container {
        width: 100px;
        height: 100px;
    }

    .card-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 8px;
    }

    .card-software-name {
        font-size: 10px;
        line-height: 1.0;
    }

    .card-years {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .proficiency-dot {
        width: 10px;
        height: 10px;
    }

    .proficiency-dots {
        gap: 4px;
        margin-top: 5px;
    }

    .proficiency-label {
        font-size: 9px;
        margin-bottom: 3px;
    }

    .cards-container {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 24px !important;
        max-width: 450px;
        margin: 0 auto;
        padding: 10px;
    }
}

@media only screen and (min-width: 710px) and (max-width: 1039px) {
    .flippable-card-container {
        width: 130px;
        height: 130px;
    }

    .flexColumns {
        width: 48%;
        /* Force 2 columns for tablet range 710px-1039px */
    }

    .card-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 10px;
    }

    .card-software-name {
        font-size: 11px;
        line-height: 1.0;
        max-width: 16ch;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .card-years {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .proficiency-dot {
        width: 12px;
        height: 12px;
    }

    .proficiency-dots {
        gap: 5px;
        margin-top: 6px;
    }

    .proficiency-label {
        font-size: 10px;
        margin-bottom: 4px;
    }

    /* Responsive styles for dynamic gallery items */
    /* 
    @media only screen and (max-width: 600px) { ... } 
    Removed fixed sizing to allow flexbox fluid layout
    */

    @media only screen and (min-width: 710px) and (max-width: 1039px) {
        .galleryItems {
            gap: 12px;
        }

        /* 
        Removed fixed sizing logic to allow flexbox fluid layout.
        The container .flexColumns now handles the width.
        */
    }

    @media only screen and (min-width: 1040px) {

        .roller {
            height: 2.15rem;
            line-height: 2rem;
        }


        .roller #rolltext {
            animation: slide-mob 8s infinite;
        }

        @keyframes slide-mob {
            0% {
                top: 0;
            }

            7.69% {
                top: -2rem;
            }

            15.38% {
                top: -4rem;
            }

            23.07% {
                top: -6rem;
            }

            30.77% {
                top: -8rem;
            }

            38.46% {
                top: -10rem;
            }

            48.15% {
                top: -12rem;
            }

            53.85% {
                top: -14rem;
            }

            61.54% {
                top: -16rem;
            }

            69.23% {
                top: -18rem;
            }

            76.92% {
                top: -20rem;
            }

            84.62% {
                top: -22rem;
            }

            92.31% {
                top: -24rem;
            }

            99.99% {
                top: -26rem;
            }
        }

        .galleryItems {
            gap: 12px;
        }

        /* 
        Removed fixed sizing logic to allow flexbox fluid layout.
        The container .flexColumns now handles the width.
        */

    }

    .cards-container {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 16px !important;
        max-width: 700px;
        margin: 0 auto;
        padding: 15px;
    }

    /* Hover effects for gallery previews */
    .gallery-preview:hover,
    .video-gallery-preview:hover {
        border: 1px solid #ccc;
        cursor: pointer;
        transform: translateY(-10px) scale(1.02);
        /* Moves the preview up and slightly enlarges it without affecting the layout */
        opacity: 60%;
        transition: 0.3s ease;
        z-index: 10;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        position: relative;
    }
}

@media only screen and (min-width: 956px) and (max-width: 1200px) {

    .roller {
        height: 2.15rem;
        line-height: 2rem;
    }


    .roller #rolltext {
        animation: slide-mob 8s infinite;
    }

    @keyframes slide-mob {
        0% {
            top: 0;
        }

        8.33% {
            top: -2rem;
        }

        16.66% {
            top: -4rem;
        }

        24.99% {
            top: -6rem;
        }

        33.33% {
            top: -8rem;
        }

        41.66% {
            top: -10rem;
        }

        49.99% {
            top: -12rem;
        }

        58.33% {
            top: -14rem;
        }

        66.66% {
            top: -16rem;
        }

        74.99% {
            top: -18rem;
        }

        83.33% {
            top: -20rem;
        }

        91.66% {
            top: -22rem;
        }
    }

    .flippable-card-container {
        width: 160px;
        height: 160px;
    }

    .card-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 12px;
    }

    .card-software-name {
        font-size: 12px;
    }

    .card-years {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .proficiency-dot {
        width: 14px;
        height: 14px;
    }

    .cards-container {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 15px !important;
        max-width: 1050px;
        margin: 0 auto;
        padding: 20px;
    }
}

@media only screen and (min-width: 1201px) {
    .flippable-card-container {
        width: 180px;
        height: 180px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .card-software-name {
        font-size: 13px;
    }

    .card-years {
        font-size: 16px;
        margin-bottom: 18px;
    }

    .proficiency-dot {
        width: 16px;
        height: 16px;
    }

    .cards-container {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 20px !important;
        max-width: 1400px;
        margin: 0 auto;
        padding: 25px;
    }
}

@media only screen and (min-width: 956px) and (max-width: 1100px) {
    .idoContainer {
        display: flex;
        flex-direction: row;
        margin-top: 2vh;
        align-items: center;

        place-items: center;
        justify-content: center;
        font-family: Montserrat;
        font-weight: 800;
    }

    .roller {
        height: 2.15rem;
        line-height: 2rem;
        width: min(250px, 90%);
        /* Restrict width to prevent unwanted wrapping */
        overflow: hidden;
    }

    .roller #rolltext {
        white-space: nowrap;
        /* Prevent text wrapping */
        font-size: 2.5vh;
        /* Adjust font size for this range */
    }

    /* Adjust the I DO text size to match */
    .idoContainer div[style*="font-size:3vh"] {
        font-size: 2.5vh;
    }
}

/* Testimonials Carousel Styles */
.testimonialsContainer {
    padding: 60px 20px;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 40px auto;
    max-width: 90%;
}

.testimonialsTitle {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    font-size: 1rem;
}

.testimonials-carousel {
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 30px 0;
    position: relative;
    place-content: center;
    align-content: center;
    place-items: center;
}

.carousel-track {
    display: flex;
    gap: 30px;
    padding: 0 20px;
    transition: transform 0.5s ease;
}

.testimonial-card {
    flex: 0 0 320px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);

    justify-content: center;
    justify-self: center;
    justify-items: center;

    place-items: center;
    place-content: center;

    align-items: center;
    align-content: center;

}

.testimonial-photo {
    padding: 20px 20px 10px 20px;
    text-align: center;
}

.testimonial-photo img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    /* border: 4px solid #FFB703; */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.testimonial-content {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}


.testimonial-info {
    text-align: center;
    margin-bottom: 15px;
}

.testimonial-name {
    color: white;
    font-size: 1rem;
    margin: 0 0 5px 0;
}

.testimonial-title {
    color: #FFB703;
    font-size: 0.9rem;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.testimonial-company {
    color: #e0e0e0;
    font-size: 0.7rem;
    margin: 0;
    font-style: italic;
}

.testimonial-testimony {
    color: #e0e0e0;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
    font-style: italic;
    position: relative;
    padding-left: 20px;
}

.testimonial-testimony::before {
    content: '"';
    position: absolute;
    left: 0;
    top: 0;
    color: rgba(255, 183, 3, 0.3);
    font-size: 0.8rem;
    line-height: 1;
}

/* Center card styling */
.testimonial-card:nth-child(2) {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Navigation arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 183, 3, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    color: #2B3E70;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.carousel-nav:hover {
    background: rgba(255, 183, 3, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .testimonial-card {
        flex: 0 0 280px;
    }

    .testimonial-card:nth-child(2) {
        transform: scale(1.05);
    }

    .testimonial-photo img {
        width: 80px;
        height: 80px;
    }

    .testimonialsContainer {
        padding: 40px 15px;
        margin: 20px auto;
    }

    .testimonialsTitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        flex: 0 0 250px;
    }

    .testimonial-photo img {
        width: 70px;
        height: 70px;
    }

    .testimonial-name {
        font-size: 1rem;
    }

    .testimonial-title {
        font-size: 0.9rem;
    }

    .testimonial-company {
        font-size: 0.7rem;
    }

    .testimonial-testimony {
        font-size: 0.8rem;
    }

    .testimonialsContainer {
        padding: 30px 10px;
    }

    .testimonialsTitle {
        font-size: 1rem;
    }

    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Modal Gallery Styles */
.modal-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

.modal-gallery-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
    opacity: 0.6;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.modal-gallery-thumb:hover,
.modal-gallery-thumb.active {
    opacity: 1;
    border-color: #2B3E70;
    transform: scale(1.05);
}


/* Updated Modal Layout Styles */
.software-tag {
    background-color: #eee;
    color: #333;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    display: inline-block;
}

.modal-gallery {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 15px !important;
    margin-top: 20px;
    width: 100%;
    flex: 1 1 auto;
    /* Grow to fill space */
    overflow-y: auto;
    /* Scroll internally if needed */
    min-height: 0;
    /* Necessary for flex item scrolling */
}

.modal-gallery-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
    background-color: #ddd;
    opacity: 1;
    transition: transform 0.2s ease;
}

.modal-gallery-thumb:hover {
    transform: scale(1.02);
}

.modal-gallery-thumb.active {
    border: 3px solid #FFB703;
}

@media only screen and (max-width: 538px) {
    .flexColumns {
        min-width: 40% !important;
        flex-basis: 40% !important;
    }
}

@media only screen and (min-width: 955px) and (max-width: 1040px) {
    .flexColumns {
        min-width: 40% !important;
        flex-basis: 40% !important;
    }
}

/* Loading Skeleton */
.loading-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Use a darker base gray for better visibility against white containers */
    background-color: #d1d5db;
    background-image: linear-gradient(90deg,
            #d1d5db 0px,
            #f3f4f6 50%,
            #d1d5db 100%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    animation: skeleton-loading 1.5s infinite linear;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.loading-skeleton.hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Ensure gallery preview containers handle absolute positioning of spinner */
.gallery-preview,
.video-gallery-preview {
    position: relative;
    min-height: 200px;
    /* Minimum height to ensure space for spinner */
    background-color: #2a2a2a;
    /* Dark background placeholder */
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    width: 100vw;
    /* Attempt full viewport width */
    height: 60vh;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 4vh;
    margin-bottom: 4vh;
    overflow: hidden;
    /* Ensure no scrollbars */
}

.hero-slider-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-slider {
    display: flex;
    height: 100%;
    transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    /* Important for zoom effect */
    cursor: pointer;
    /* Clickable */
}

.hero-slide-bg {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    /* Removed background-image logic */
    transition: transform 6s ease-out;
    /* Smooth zoom */
    transform-origin: center;
}

.hero-strip-item {
    height: 100%;
    width: auto;
    object-fit: cover;
    flex-shrink: 0;
    /* Optional: Add a gap between images if requested. 
       The user's layout implies distinct boxes. 
       For now, we keep them touching or add a small margin if needed. 
       We will assume touching is fine as per previous "tiling" behavior, 
       but if distinct is key, we can add gap in .hero-slide-bg later. */
}

.hero-slide.active .hero-slide-bg {
    transform: scale(1.1);
}

/* Gradient Overlays */
.hero-overlay-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 15%;
    height: 100%;
    background: linear-gradient(to right, #191a24 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.hero-overlay-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 15%;
    height: 100%;
    background: linear-gradient(to left, #191a24 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.hero-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, #191a24 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* Slide Caption */
.hero-slide-caption {
    position: absolute;
    bottom: 5vh;
    left: 5vw;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 3vh;
    /* Reduced size as requested */
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
    z-index: 3;
    max-width: 80%;
}

.hero-slide.active .hero-slide-caption {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .hero-section {
        height: 50vh;
    }

    .hero-slide-caption {
        font-size: 2vh;
        /* Decreased from 3vh */
        bottom: 4vh;
        left: 4vw;
        text-align: left;
        max-width: 70%;
        /* Prevent it from being too wide and overlapping right side too much */
    }
}

/* Fix for roller overlap/cutoff on larger screens */
@media (min-width: 600px) {
    .roller {
        max-width: 100% !important;
        width: min(350px, 90%) !important;
    }
}