main {
	/*Add spacing from the top and allow flexible growth*/
  	margin-top: 4rem;
  	flex: 1;
}

h3 {
	/*Heading font and color*/
  	font-family: 'DM Serif Display', serif;
  	color: var(--deep-navy);
  	font-size: 30px;
  	font-weight: 600;
  	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
} 

.tools-section {
	/*Tools section container*/
  	text-align: center;
}

.tools-marquee {
	/*Scrolling container for tool icons*/
  	overflow: hidden;
  	white-space: nowrap;
  	width: 100%;
  	background-color: rgba(246, 212, 212, 0.2);
  	padding: 1em 0;
  	position: relative;
}

.tools-track {
	/*Track that scrolls horizontally*/
  	display: inline-block;
  	white-space: nowrap;
  	animation: scroll-tools 25s linear infinite;
  	color: var(--deep-navy);
}

.tools-track img {
	/*Tool icon styling*/
  	width: 50px;
  	height: 50px;
  	margin: 0 1.25em;
  	vertical-align: middle;
  	object-fit: contain;
}

@keyframes scroll-tools {
	/*Animate tools marquee from right to left*/
  	0% {
    	transform: translateX(0);
  	}
  	100% {
    	transform: translateX(-50%);
  	}
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    height: 475px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
	border: 2px solid var(--blush);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
	object-position: center;
    transition: transform 0.4s ease;
}

.card-overlay {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
    z-index: 10;
}

.card-overlay h3 {
	color: white;
}

.project-card:hover .card-overlay {
    opacity: 1; 
}

.project-card:hover .card-image {
    transform: scale(1.02);
}

/* --- MODAL BASE --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content.split-view {
    background: #fff;
    width: 90%;
    max-width: 1400px;
    height: 85vh;
    display: flex;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

/* --- LEFT SIDE: CAROUSEL --- */
.modal-left {
    flex: 0 0 50%;
    background: #f8f9fa;
    position: relative;
    border-right: 1px solid #eee;
	overflow: hidden;
	box-sizing: border-box;
}

.image-carousel {
    display: flex;
    overflow-x: auto;
    height: 100%;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}

.image-carousel::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.carousel-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.carousel-video {
    max-width: 90%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: block;
}

.carousel-item img {
    max-width: 100%;
    height: 375px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.carousel-item figcaption {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--deep-navy);
    font-style: italic;
}

/* Arrow Styling */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(246, 212, 212, 0.5);
    border: none;
    font-size: 24px;
    padding: 15px 10px;
    cursor: pointer;
    z-index: 110;
    border-radius: 0 5px 5px 0;
}

.left-arrow { left: 0; }
.right-arrow { right: 0; border-radius: 5px 0 0 5px; }

.nav-arrow:hover { background: rgba(246, 212, 212, 1); }

/* Progress Bar Styling */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #eee;
    z-index: 120;
}

.progress-bar {
    height: 100%;
    width: 25%; 
    background: var(--deep-navy);
    transition: width 0.4s ease;
}

/* --- RIGHT SIDE: CONTENT --- */
.modal-right {
    flex: 0 0 50%;
    padding: 50px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
	box-sizing: border-box;
	background-color: rgba(246, 212, 212, 0.5);
}

.header-intro {
    display: flex;
	flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.modal-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.modal-project-title {
    margin-top: 20px;
	font-size: 23px;
	line-height: 1;
}

.modal-section h3 {
    font-size: 19px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--deep-navy);
}

.modal-section p, .modal-section li {
    line-height: 1.5;
	font-size: 18px;
    color: var(--deep-navy);
}

/* --- CLOSE BUTTON --- */
.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    color: var(--deep-navy);
    transition: transform 0.2s;
}

.close-modal:hover { transform: scale(1.1); }

/* --- RESPONSIVENESS --- */
@media (max-width: 900px) {
	.project-card {
        width: 150px !important;  
		flex: 0 0 150px;
		margin: 0 !important;
        height: auto !important;
    }

    .project-card img {
        width: 100% !important;
        height: 250px !important;
        object-fit: cover !important;
		display: block;
    }

    .project-card h3, 
    .project-card .project-title {
        font-size: 0.75rem !important;
        margin: 0!important;
    }

    .project-card p, 
    .project-card {
        font-size: 0.65rem !important;
		text-align: center;
    }

    .projects-grid {
		display: flex;
		flex-wrap: wrap;
        justify-content: center;
		align-content: center;

		gap: 15px;
		width: 100%;
    }

    .modal-content.split-view {
        display: flex;
        flex-direction: column;
		justify-content: flex-start;

        height: auto; 
        overflow-y: auto;
		min-height: unset;
		max-height: 90vh;

		margin: auto;
		overflow-y: auto;
    }

    .modal-left {
        flex: 0 0 auto !important;
        min-height: 200px !important;
		height: auto !important;
        width: 100%;
        display: grid !important;
        place-items: center !important; 
        overflow: hidden;
        background: #fff;
    }

    .modal-left img {
        grid-area: 1 / 1; 
        width: auto;
        height: 180px;
        object-fit: contain;
        transition: opacity 0.3s ease-in-out;
    }

	.modal-left img[style*="opacity: 0"] {
        pointer-events: none;
    }

    .modal-right {
        flex: 0 0 auto;
        width: 100%;
		height: auto;
        padding: 12px 20px;
    }

    .modal-right h2 {
        font-size: 1rem !important;
    }

    .modal-right p, 
    .modal-right li {
        font-size: 0.8rem !important;
        line-height: 1.3;
    }
}