.dm-serif-text-regular {
  font-family: "DM Serif Text", serif;
  font-weight: 400;
  font-style: normal;
}

.dm-serif-text-regular-italic {
  font-family: "DM Serif Text", serif;
  font-weight: 400;
  font-style: italic;
}
html, body {
  height: 100%;
  margin: 0;
}

body{
    display: flex;
    flex-direction: column;
    font-family: 'DM Serif Text';
    font-size: 18px;
}
#hero{
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}
#hero-bg{
    position: absolute;
    inset: 0;         
    width: 100%;
    height: 100%;
    z-index: -1;
}
#hero-content{
    display: flex;
    flex-direction: column;
    flex: 1;
}
main {  
  flex: 1;
}
#header-settings img{
    width: 24px;
    height: 24px;
}
hr{
    margin: 0;
    border-bottom: 0.1em solid #868c91; width: 100%;
}

/* General Styles */
.inactive-link{
    text-decoration: none;
    color: hsla(210, 12%, 29%, 75%);
}
.inactive-link:hover{
    color: hsla(210, 12%, 29%, 100%);
}
#active-link{
    text-decoration: underline;
}
.light-text{
    color: #f3f3f3;
}
.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Header Styles */
header{
    margin: 2em 1em 0 1em;
    display: grid;
    grid-template-columns: 0.1fr 1fr 0.1fr;
    align-items: center;
    font-size: 1rem;
}
#header-title{
    display: flex;
    flex-direction: column;
    text-align: center;
}
#header-links{
    display: flex;
    justify-content: space-evenly;
    text-align: center;
}
#header-settings{
    display: flex;
    justify-content: center;

}
#header-settings button{
    text-align: left;
    text-decoration: none;
    border: none;
    background-color: transparent;
    font-family: 'DM Serif Text';
}
#settings-menu{
    position: absolute;
    padding: 5px;
    flex-direction: column;
    top: 8%;
    right: 1em;
    background-color: #ffffff;
    border: 1px solid #868c91;
    border-radius: 1em;

    opacity: 0;
    transform: translateY(-5px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease;
}
#settings-menu hr{
    margin: 0.5em 0 0.5em 0;
}
#settings-menu.show{
  opacity: 1;
  transform: translateY(0);
  max-height: 20em;
}
.settings-submenu{
    display: grid;
    grid-template-columns: 1fr;
}
.settings-submenu div{
    display: flex;
}
.settings-submenu h4{
    margin: 0;
    padding-left: 0.5em;
    font-weight: 500;
}
#settings-menu .settings-submenu:nth-child(1){
    margin-bottom: 1em;
}
.languageImg{
    width: 20px;
    height: 20px;
    padding-right: 5px;
}
.settings-submenu button{
    display: flex;
}

/* Main Styles */
#main-title{
    text-align: center;
    margin: 0;
    font-size: 2rem;
}
#main-title p{
    margin: 0;
}
#projects-grid{
    margin: 1em 2em;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}
.card{
    border: 1px solid #868c91;
    border-radius: 0.7em;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover{
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.card img{
    padding: 1em;
    height: 4em;
    width: 4em;
}
.card-content p{
    margin: 0;
    text-align: center;
}
.card-image{
    display: flex;
    justify-content: center;
    width: 100%;
    border-bottom: 1px solid #868c91;
}
footer p{
    font-size: 0.8rem;
    text-align: center;
}

#modal{
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; 
    top: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.6);
    align-items: center;
    flex-flow: column;
}
#modal-title{
    margin: 0;
    padding: 1vh 1vw;
    border-bottom: 1px solid black;
}
#modal-carousel{
    position: relative;
    width: 100%;
    aspect-ratio: 9/10;
    max-height: 30em;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#modal-img{
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
#modal-prevButton, #modal-nextButton{
    position: absolute;
    top: 50%;
    font-size: 2rem;
    background: transparent;
    color: #868c91;
    padding: 12px 16px;
    cursor: pointer;
    border: none;
    z-index: 2;
}
#modal-prevButton{
    left: 10px;
}
#modal-nextButton{
    right: 10px;
}
#modal-content{
    background: #fff;
    /* padding: 20px; */
    width: 80%;
    margin-top: 2em;
    border-radius: 12px;
    max-height: 100vh;
    overflow-y: auto;
    text-align: center;
}
#modal-content h4{
    margin: 0;
    padding-top: 1vh;
}
#modal-img{
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
}
#modal-description-box{
    border-top: 1px solid black;
}
#modal-description-box p{
    margin: 0;
    padding: 1em;
}
#modal-features-box{
    border-top: 1px solid black;
}
#modal-features{
    margin: 0;
    padding: 1em 1em 1em 2em;
    text-align: left;
}
#modal-informationContainer{
    border-top: 1px solid black;
}
#modal-informationRows{
    display: grid;
    grid-template-columns: 1fr;
    padding: 1em 1em 0 1em;
}
#modal-links-box{
    padding: 1em 0;
    border-top: 1px solid black;
}
.modal-row{
    padding-bottom: 1em;
}
.modal-row p{
    margin: 0;
    padding-left: 1em;
}
.close-button{
    margin-top: 15px;
    padding: 8px 16px;
    background: none;
    color: #868c91;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
@media(max-width: 410px){
    .card-content p{
        font-size: 0.9rem;
    }
}
@media(max-width: 385px){
    #modal-content p, #modal-content li, #modal-content span{
        font-size: 0.9rem;
    }
}
@media(max-width: 350px) {
    header{
        font-size: 0.8rem;
    }
    #settings-button img{
        width: 20px;
        height: 20px;
    }
    .settings-submenu{
        font-size: 0.8rem;
    }
    .settings-submenu button{
        font-size: 0.6rem;
    }
    .settings-submenu img{
        height: 15px;
        width: 15px;
    }
    .card-content{
        font-size: 1rem;
    }
    .card-content p{
        font-size: 0.8rem;
    }
    #modal-content h4{
        font-size: 1rem;
    }
    #modal-content p, #modal-content li, #modal-content span{
        font-size: 0.8rem;
    }

    footer p{
        margin: 2vw 10vw;
        font-size: 0.6rem;
    }
}
@media(max-width: 375px){
    #header-links{
        font-size: 0.8rem;
    }
}
@media(max-width: 320px){
    #header-links{
        font-size: 0.7rem;
    }
    .card-content p{
        font-size: 0.7rem;
    }

}

@media(min-width: 500px){
    header{
        font-size: 1.3rem;
    }
    #settings-button img{
        width: 30px;
        height: 30px;
    }
    .card-content p{
        font-size: 1.4rem;
    }

    #modal-title{
        font-size: 2.5rem;
    }
    #modal-content h4{
        font-size: 2rem;
    }
    #modal-content p, #modal-content li, #modal-content span{
        font-size: 1.5rem;  
    }
    footer p{
        font-size: 1rem;
    }
    
}   
@media (min-width: 720px) {
    #projects-grid{
        grid-template-columns: 1fr 1fr 1fr;
    }
}
@media (min-width: 1000px) {
    #projects-grid{
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}
@media (min-height: 1000px) {
    header{
        font-size: 2rem;
    }
    #settings-button img{
        width: 40px;
        height: 40px;
    }
    #main-title{
        font-size: 3rem;
    }
    /* #projects-grid{
        grid-template-columns: 1fr 1fr;
    } */
    .card img{
        height: 8em;
        width: 8em;
    }
    .card-content p{
        font-size: 2rem;
    }
    footer p{
        font-size: 1.5rem;
    }
}
@media (min-width: 1024px){
    #header-title{
        flex-direction: row;
        gap: 0.5vw;
    }
}
@media (min-width: 1440px){
    header{
        grid-template-columns: 0.2fr 1fr 0.2fr;
    }
    #header-title{
        font-size: 1.6rem;
        justify-content: center;
    }
    #header-links{
        font-size: 1.5rem;
    }
    #main-title p{
        margin: 2vh 0;
        font-size: 2.5rem;
    }
    #projects-grid{
        gap: 2vw;
    }
    .card img{
        height: 15vh;
        width: 10vw;
    }
    footer p{
        font-size: 1.2rem;
    }
}
@media (min-width: 2560px){
    #header-title{
        font-size: 2.5rem;
    }
    #header-links{
        font-size: 2rem;
    }
    #main-title p{
        font-size: 3.5rem;
    }
    #modal-carousel{
        max-height: 70vh;
    }
    #modal-features{
        display: grid;
        justify-content: center;
    }
    #modal-informationRows{
        justify-content: center;
        grid-template-columns: none;
    }
    .card-content p{
        font-size: 2.5rem;
    }
    #modal-links-box{
        font-size: 2rem;
    }
    footer p{
        font-size: 1.7rem;
    }
}