/* Section Headings */
#projects-heading {
    text-align: center;
    font-size: 1.406rem; /* Reduced by 25% from 1.875rem */
    color: var(--secondary-color);
    margin: 0.938rem 0; /* Reduced by 25% from 1.25rem */
}

/* Container Styles */
.projects-container {
    display: flex;
    padding: 0.938rem; /* Reduced by 25% from 1.25rem */
    gap: 0.938rem; /* Reduced by 25% from 1.25rem */
    flex-direction: column;
}

/* Project List Container */
#project-list-container {
    flex-grow: 1;
    transition: margin-left 0.3s ease;
}

/* Grid Layout for Project Cards */
#project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14.063rem, 1fr)); /* Reduced by 25% from 18.75rem */
    gap: 0.938rem; /* Reduced by 25% from 1.25rem */
    padding: 0.938rem; /* Reduced by 25% from 1.25rem */
}

/* Project Card Styling */
.project-card {
    background-color: var(--navbar-bg-color);
    border-radius: 0.469rem; /* Reduced by 25% from 0.625rem */
    padding: 0.938rem; /* Reduced by 25% from 1.25rem */
    box-shadow: 0 0.188rem 0.375rem rgba(0, 0, 0, 0.2); /* Adjusted shadow from 0.25rem 0.5rem */
    position: relative;
    overflow: hidden;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 28rem; /* Reduced by 25% from 32.5rem */
    opacity: 0;
    transform: translateY(-9.375rem); /* Reduced by 25% from -12.5rem */
    transition: opacity 0.5s ease, transform 1.0s ease;
    
}

/* When in view */
.project-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.project-card .date {
    font-size: 0.675rem; /* Reduced by 25% from 0.675rem */
    font-weight: bold;
    background-color: var(--list-color);
    color: var(--secondary-color);
    padding: 0.234rem 0.563rem; /* Reduced by 25% from 0.3125rem 0.75rem */
    border-radius: 0.375rem; /* Reduced by 25% from 0.5rem */
    display: inline-block;
    margin: 0.469rem; /* Reduced by 25% from 0.625rem */
    box-shadow: 0 0.094rem 0.188rem rgba(0, 0, 0, 0.1); /* Adjusted shadow from 0.125rem 0.25rem */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project-card p.desc {
    flex-grow: 1;
    font-size: 0.8rem;
}

.project-card .tag-list {
    margin-top: auto;
    font-size: 0.7rem;

}

/* Hover Effects for Project Card */
.project-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0.281rem 0.563rem rgba(0, 0, 0, 0.3); /* Adjusted shadow from 0.375rem 0.75rem */
}

.project-card img {
    width: 100%;
    height: 9.375rem; /* Reduced by 25% from 12.5rem */
    object-fit: cover;
    border-radius: 0.234rem; /* Reduced by 25% from 0.3125rem */
    margin-bottom: 0.703rem; /* Reduced by 25% from 0.9375rem */
}

/* Project Title */
.project-card h2 {
    font-size: 0.9rem; /* Reduced by 25% from 1.125rem */
    margin: 0 0 0.469rem 0; /* Reduced by 25% from 0.625rem */
    color: var(--text-color);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-size: 1.2rem;
}

.modal-content {
    background-color: var(--navbar-bg-color);
    padding: 0.938rem; /* Reduced by 25% from 1.25rem */
    border-radius: 0.469rem; /* Reduced by 25% from 0.625rem */
    width: 80%;
    max-width: 50rem; /* Reduced by 25% from 33.75rem */
    display: flex;
    flex-direction: column;
    color: var(--text-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.938rem; /* Reduced by 25% from 1.25rem */
    font-size: 1.0rem;
}

.modal-header h2 {
    color: var(--secondary-color);
    font-size: 1.0rem; /* Reduced by 25% from 1.125rem */
}

.modal-header .close {
    cursor: pointer;
    font-size: 0.844rem; /* Reduced by 25% from 1.125rem */
    color: var(--text-color);
}

/* Modal Body */
.modal-body {
    display: flex;
    gap: 0.938rem; /* Reduced by 25% from 1.25rem */
}

.left-column, .right-column {
    flex: 1;
    color: var(--muted-text-color);
}

/* Carousel Styling */
.carousel {
    position: relative;
    width: 100%;
    max-width: 45rem; /* Reduced by 25% from 31.25rem */
    margin: 0 auto;
    overflow: hidden;
}

.carousel-content {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Media items (images and videos) */
.carousel-item img,
.carousel-item video {
    width: 100%;
    height: 20rem; /* Reduced by 25% from 15rem */
    object-fit: cover;
    border-radius: 0.234rem; /* Reduced by 25% from 0.3125rem */
}

/* Article Links */
.carousel-item a {
    font-size: 0.563rem; /* Reduced by 25% from 0.75rem */
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: bold;
}

.carousel-item a:hover {
    text-decoration: underline;
}

/* Carousel Label */
.carousel-label {
    position: absolute;
    top: 0.469rem; /* Reduced by 25% from 0.625rem */
    left: 0.938rem; /* Reduced by 25% from 1.25rem */
    padding: 0.234rem 0.469rem; /* Reduced by 25% from 0.3125rem 0.625rem */
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 0.141rem; /* Reduced by 25% from 0.1875rem */
    font-size: 0.506rem; /* Reduced by 25% from 0.675rem */
}

/* Carousel Navigation Buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.375rem; /* Reduced by 25% from 0.5rem */
    color: #fff;
    font-size: 0.844rem; /* Reduced by 25% from 1.125rem */
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    border: none;
    user-select: none;
}

.prev {
    left: 0.469rem; /* Reduced by 25% from 0.625rem */
}

.next {
    right: 0.469rem; /* Reduced by 25% from 0.625rem */
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.7);
}


/* Modal Links */
.modal .links a {
    display: inline-block;
    background-color: var(--navbar-bg-color);
    color: var(--secondary-color);
    font-weight: bold;
    padding: 0.6em 0.938rem; /* Reduced from 0.625rem 1.25rem */
    margin: 0.6rem 0; /* Reduced from 0.625rem 0 */
    border-radius: 0.375rem; /* Reduced from 0.5rem */
    text-decoration: none;
    border: 0.094rem solid var(--secondary-color); /* Reduced from 0.125rem */
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem; /* Reduced from 0.5rem */
    font-size: 0.8rem;
}

/* Add a GitHub icon before the text */
.modal .links a i {
    font-size: 0.3rem; /* Reduced from 0.75rem */
    color: var(--secondary-color);
}

/* Hover Effects */
.modal .links a:hover {
    background-color: var(--secondary-color);
    color: var(--text-color);
    box-shadow: 0 0 0.469rem var(--secondary-color); /* Reduced from 0.625rem */
    cursor: pointer;
}

/* View Article Button */
.view-article-button {
    margin-top: 0.469rem; /* Reduced by 25% from 0.625rem */
    margin-bottom: 0.469rem; /* Reduced by 25% from 0.625rem */
    padding: 0.469rem 0.938rem; /* Reduced by 25% from 0.625rem 1.25rem */
    font-size: 0.563rem; /* Reduced by 25% from 0.75rem */
    border-radius: 0.375rem; /* Reduced by 25% from 0.5rem */
}

.view-article-button:hover {
    box-shadow: 0 0 0.469rem var(--secondary-color); /* Reduced by 25% from 0.625rem */
}



/* Tag List Styling */
.tag-list {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem; /* Reduced from 0.5rem */
    margin-top: auto;
}

.tag-list li {
    background-color: var(--list-color);
    color: var(--secondary-color);
    border-radius: 0.563rem; /* Reduced from 0.75rem */
    padding: 0.3rem 0.563rem; /* Reduced from 0.313rem 0.75rem */
    font-size: 0.7rem; /* Reduced from 0.875rem */
    font-weight: 500;
    border: 0.047rem solid var(--list-color-dark); /* Reduced from 0.063rem */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tag-list li:hover {
    background-color: var(--secondary-color);
    color: var(--text-color);
    cursor: pointer;
}
/* Responsive Design */
@media (max-width: 28.125rem) { /* Reduced by 25% from 37.5rem */
    .modal-content {
        width: 90%;
        max-width: none;
        padding: 0.703rem; /* Reduced by 25% from 0.9375rem */
    }

    .modal-body {
        flex-direction: column;
    }

    .carousel-item img, .carousel-item video {
        height: 9.375rem; /* Reduced by 25% from 12.5rem */
    }

    .project-card .date {
        font-size: 0.45rem; /* Reduced by 25% from 0.6rem */
        padding: 0.188rem 0.469rem; /* Reduced by 25% from 0.25rem 0.625rem */
    }

    .modal .links a {
        padding: 0.375rem 0.703rem; /* Reduced by 25% from 0.5rem 0.9375rem */
        font-size: 0.506rem; /* Reduced by 25% from 0.675rem */
    }
}
