/*in css kun je je website toepassen, dus alle code die er staat is voor het uiterlijk van de website*/

html{
    /* zorgt voor vloeiend scrollen */
    scroll-behavior: smooth;
}
.navbar{
    /*'stick' de positie van een element in een specifieke plek*/
    position: sticky;
    /*maakt een element flexibel tot toepassingen*/
    display: flex;
    /*zet de positie van een element op 0 van bovenkant*/
    top: 0%;
    /*zet de breedte van een element*/
    width: 100%;
    /*zet de achtergrondkleur*/
    background-color: #301130;
    /*centreert alle elementen van navbar*/
    justify-content: center;
    align-items: center;
    /*zet de textkleur*/
    color: #f2bc94;
    /* verwijdert standaard margin*/
    margin: 0%;
}
ul{
    width: 100%;
    display: flex;
    /* verwijdert opsommingstekens van een lijst */
    list-style: none;
    justify-content: space-around;
}
body{
    display: flex;
    flex-direction: column;
    margin: 0;
    background-color: #f7ede2;
    /* ensure page covers full viewport so footer can be pinned to bottom */
    min-height: 100vh;
}
.tiles{
    display: flex;
    /* maakt het element vier keer zo snel kleiner dan de andere flex-items als de container kleiner wordt */
    flex-shrink: 4;
    flex-direction: column;
    /* centreert de tekst */
    text-align: center;
    justify-content: flex-start;
    align-items: center;
    background-color: #ffb8b1;
    width: 100%;
    color: #301130;    
}
.tile{
    /* maakt div rond */
    border-radius: 7%;
    display: flex;
    flex-shrink: 1;
    flex-direction: column;
    margin: 12% 0 12% 0;
    background-color: #d38d86;
    width: 50%;
    align-items: center;
    padding: 10%;
}
.tile a{
    color: #301130;
}
.page{
    display: flex;
    flex-direction: column;
    flex-shrink:2;
    color: #301130;
}
h2, h1{
    /*zet het lettertype*/
    font-family: "Playfair Display SC", serif;
    font-weight: 900;
    font-style: italic;
}
a{
    color: #f2bc94;
    text-decoration: none;
    font-family: "Playfair Display SC", serif;
    font-weight: 400;
    font-style: italic;
}
.main{
    display: flex;
    flex-direction: row;
}
.content{
    display: flex;
    flex-direction: column;
    background-color: #f7ede2;
}
footer{
    color:#f2bc94;
    /*zet de positie van een element op 0 van onderkant*/
    bottom: 0px;
    /* push footer to page bottom when content is short */
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #301130;
    width: 100%;
}
header{
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0%;
    color: #f2bc94;
    width: 100%;
    background-color: #301130;
    margin: 0%;
}
#erf img{
    /* past de afbeelding in*/
    object-fit: contain;
    width: 50%;
}
#dip img{
    object-fit: contain;
    width: 40%;
}
#werk img{
    object-fit: contain;
    width: 70%;
}
.avatar img{
    width: 30%;
    object-fit: contain;
}
.avatar{
    display: flex;
    flex-direction: row;
    align-items: center;
}
.avatar h1{
    color: #301130;
    /*zet een bepaalde border*/
    border-style: none none none solid;
    padding-left: 1%;
    /*kantelt het element schuin*/
    transform:skew(-20deg)
}
.werken{
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: space-around;
    flex-shrink: 3;
    width: 100%;
}
#voor_werk{
    background-color: #f7ede2;
    flex-direction: row;
    /*zorgt dat elementen in container kunnen versprijden*/
    flex-wrap: wrap;
    align-items: flex-start;
}
#werk_deel{
    width: 20%;
    padding: 8%;
    margin: 5%;
}
.werken h1{
    color: #301130;
}
#contact h2{
    text-align: center;
    color: #301130;
}
.werken img{
    object-fit: contain;
    width: 70%;
}
p{
    font-family: "Montserrat", sans-serif;
}
span{
    color: #f2bc94;
    /*onderlijnt de text*/
    text-decoration: underline;
}
form{
    display: flex;
    flex-direction: column;
    width: 40%;
    align-items: flex-start;
    font-family: "Montserrat", sans-serif;
}
.formulier{
    color: #301130;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#exeption_footer{
    /* avoid absolute positioning; footer should participate in document flow */
    position: static;
}
.content{
    padding: 2%;
}
#over-mij{
    align-items: center;
    text-align: left;
    flex-wrap: wrap;
}
#over-mij p{
    padding: 25px;
    margin: 25px;
}
.recoil {
    display: flex;
    gap: 3%;
    align-items: flex-start;
    justify-content: center;
    padding: 4% 6%;
    flex-wrap: nowrap;
    /* allow recoil area to grow so footer is pushed down */
    flex: 1 0 auto;
}

/* left: trailer video inside recoil */
.recoil .project-trailer {
    width: 55%;
    text-align: left;
}
.recoil .project-trailer video {
    width: 90%;
    height: auto;
    max-width: 100%;
    /* ensure the video doesn't exceed the viewport height (fits in one screen) */
    max-height: 60vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    display: block;
}

/* right: short project description */
.recoil .project-info {
    margin-top: 12px;
    width: 40%;
    color: #301130;
    font-family: "Montserrat", sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}
.recoil .project-info h3 {
    font-family: "Playfair Display SC", serif;
    font-weight: 900;
    font-style: italic;
    color: #301130;
    margin: 0;
}
.recoil .project-info p {
    margin: 0;
    line-height: 1.5;
    color: #301130;
}

/* Project details below trailer and description */
.project-details{
    display: flex;
    gap: 4%;
    padding: 2% 6% 6% 6%;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap;
}
.project-details .details-left{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.mijn-bijdrage h3,
.screenshots h3,
.script-screenshots h3,
.gameplay h3{
    font-family: "Playfair Display SC", serif;
    font-weight: 900;
    font-style: italic;
    color: #301130;
    margin-bottom: 0.5rem;
}
.mijn-bijdrage p,
.gameplay p{
    font-family: "Montserrat", sans-serif;
    color: #301130;
}
.gameplay-player video{
    width: 100%;
    max-height: 50vh;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0,0,0,0.2);
}
.screenshot-grid{
    /* horizontal row that wraps when needed; centered for balanced layout */
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    justify-content: center;
}
.screenshot-grid img{
    /* responsive thumbnail sizing: readable on desktop, scales down on smaller viewports */
    width: clamp(220px, 28vw, 360px);
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    flex: 0 0 auto;
}

/* Script screenshots (separate section) */
.script-screenshot-grid{
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
    justify-content: center;
}
.script-screenshot-grid img{
    width: clamp(180px, 18vw, 300px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.12);
    flex: 0 0 auto;
}

/* Repository button style */
.repo-button{
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #301130;
    color: #f2bc94;
    border-radius: 6px;
    text-decoration: none;
    font-family: "Playfair Display SC", serif;
    font-style: italic;
    margin-top: 0.5rem;
}
.repo-button:hover{
    opacity: 0.9;
}

/* Lightbox styles */
.lightbox{
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    padding: 2rem;
}
.lightbox.open{
    display: flex;
}
.lightbox-img{
    max-width: 92vw;
    max-height: 84vh;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
    object-fit: contain;
}
.lightbox-caption{
    margin-top: 0.75rem;
    color: #f2bc94;
    font-family: "Montserrat", sans-serif;
    text-align: center;
}
.lightbox-close{
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: #f2bc94;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.lightbox-close:focus{
    outline: 2px solid #f2bc94;
}

@media (max-width: 900px){
    .project-details{
        flex-direction: column;
        padding: 3% 4% 6% 4%;
    }
    .project-details .details-left,
    .project-details .details-right{
        width: 100%;
    }
    .screenshot-grid img{
        width: 48%;
    }
    .script-screenshot-grid img{
        width: 46%;
    }
}

@media (max-width: 480px){
    .screenshot-grid img{
        width: 100%;
    }
    .script-screenshot-grid img{
        width: 100%;
    }
}

@media (max-width: 800px) {
    .recoil {
        flex-direction: column;
        padding: 3% 4%;
    }
    .recoil .project-trailer,
    .recoil .project-info {
        width: 100%;
    }
    .recoil .project-trailer {
        text-align: center;
    }
}
