#student-projects {
    padding: 2em 1em;
    background-color: rgba(17, 17, 17, 0.8); 
    color: white;
    text-align: center;
}

#student-projects h2 {
    font-size: 2.5em;
    margin-bottom: 1em;
    color: #e63946;
}

.layout-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5em;
}

.toggle-btn {
    background-color: #e63946;
    color: white;
    padding: 0.5em 1.2em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 0.5em;
    transition: background-color 0.3s ease;
    font-size: 1em;
}

.toggle-btn:hover {
    background-color: #d62828;
}

#projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 1em;
}

.project-content {
    display: flex;
    align-items: stretch;
    align-items: center;
    margin-bottom: 1em;
}

#projects-container.list-view {
    flex-direction: column;
    
    align-items: center;
}

#projects-container.list-view .project {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100px;
    flex-grow: 1;
    width: 100%;
    max-width: 800px;
    margin: 1em 0;
    padding: 1em;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

#projects-container.list-view .project:hover {
    transform: scale(1.03);
}

#projects-container.list-view .project-image {
    max-width: 250px;
    max-height: fit-content;
    border-radius: 5px;
    margin: 1.5em;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}


#projects-container.grid-view {
    gap: 3em;
}

#projects-container.grid-view .project-image {
    display: block;
    margin: 0 auto;
    max-height: 200px;
    max-width: 200px;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
}

.project {
    flex: 1 1 300px;
    max-width: 400px;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 15px;
    padding: 1em;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    -ms-border-radius: 15px;
    -o-border-radius: 15px;
}

.project h3 {
    color: #e63946;
    font-size: 1.5em;
    margin: 0 0 0.5em;
}

.project:hover {
    transform: scale(1.03);
}

.project-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: left;
    padding: 1em;
    gap: 20px;
}

.project-header h3 {
    margin: 0;
}

.project-header .title {
    font-size: 1.35em;
}

.project-header .author {
    font-weight: normal;
    font-size: 1.15em;
}


.project-description {
    flex: 1;
    font-size: 1em;
    line-height: 1.6;
    color: #ccc;
    padding-left: 10px;
}

.project-links {
    display: flex;
    gap: 1em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.btn {
    color: #ffffff;
    background-color: #e63946;
    padding: 0.5em 1em;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.demo-btn {
    background-color: #4caf50;
}

.btn:hover {
    background-color: #d62828;
    transform: translateY(-2px);
}

.demo-btn:hover {
    background-color: #388e3c;
}




@media (max-width: 768px) {
    main {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 50vh;
        text-align: center;
        padding: 1em;
        background-color: rgba(17, 17, 17, 0.8);
        color: white;
    }

    main::before {
        content: "This page is not currently supported on mobile devices.";
        font-size: 1.5em;
    }

    #student-projects,
    .layout-toggle,
    #projects-container {
        display: none;
    }
}