* {
    overflow-x: hidden;
    margin: 0;
}

body {
    background-color: rgb(250, 250, 250);
}

.title {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 7em;
}

.sub-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1em;
}

.sub-title p {
    padding-bottom: .5em;
    padding-top: 7em;
}

.title p,
.title h1,
.title a {
    font-size: 1em;
    color: black;
}

.box {
    background-color: white;
    border: solid;
    border-radius: 10px;
    border-color: white;
    padding: 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.box p {
    font-size: 1.25em;
}

.text{
    font-size: 75%;
    margin: auto;
    overflow-y: hidden;

}

.img-search {
    width: 275px;
    height: 275px;
}

.img1 {
    max-width: 100%;
    width: auto;
    height: auto;
}

#portrait {
    width: 400px;
    height: 275px;
    overflow-y: hidden;
}

#portrait.s1 {
    grid-area: s1;
}
#portrait.s2 {
    grid-area: s2;
}
#portrait.s3 {
    grid-area: s3;
}
#portrait.s4 {
    grid-area: s4;
}

#portrait.d1 {
    grid-area: d1;
}
#portrait.d2 {
    grid-area: d2;
}
#portrait.d3 {
    grid-area: d3;
}
#portrait.d4 {
    grid-area: d4;
}

.kdm6b-grid {  
    display: grid;
    padding: 2em;
    grid-gap: 1em;
    grid-template-areas: 
    's1 s2 s3 s4'
    'd1 d2 d3 d4';
    overflow-y: hidden;
    place-content: center;
}

@media screen and (max-width: 1375px){
    .img-search {
        width: 250px;
        height: 250px;
    }
    
    #portrait,
    #wrapper,
    .img2,
    .img1{
        width: 275px;
        height: 250px;
        overflow-y: hidden;
    }

}

@media screen and (max-width: 1300px){
    .kdm6b-grid {  
        display: grid;
        padding: 4em;
        grid-gap: 1em;
        grid-template-areas: 
        's1 s2'
        'd1 d2'
        's3 s4'
        'd3 d4';
    }

    .img-search {
        width: 275px;
        height: 275px;
    }
    
    #portrait,
    #wrapper,
    .img2,
    .img1{
        width: 300px;
        height: 275px;
        overflow-y: hidden;
    }
}

@media screen and (max-width: 825px){
    
    .img-search {
        width: 350px;
        height: 350px;
    }
    
    #portrait,
    #wrapper,
    .img2,
    .img1{
        width: 375px;
        height: 350px;
        overflow-y: hidden;
    }

    .kdm6b-grid {  
        display: grid;
        padding: 4em;
        grid-gap: 1em;
        grid-template-areas: 
        's1'
        'd1'
        's2'
        'd2'
        's3'
        'd3'
        's4'
        'd4';
    }
}

/* Large screen size bug patch */
@media screen and (min-width: 2560px){
    #portrait,
    #wrapper {
        width: 600px;
        height: 600px;
        overflow: hidden;
    }
    .img1,
    .img-search {
        width: 600px;
        height: 600px;
    }
}

@media screen and (min-width: 3840px){
    
    #portrait,
    #wrapper {
        width: 800px;
        height: 800px;
        overflow: hidden;
    }
    .img1,
    .img-search {
        height: 800px;
        width: 800px;
    }
}

@media screen and (min-width: 4480px){

    #portrait,
    #wrapper {
        width: 1200px;
        height: 1200px;
        overflow: hidden;
    }
    .img1,
    .img-search {
        height: 1200px;
        width: 1200px;
    }
}

@media screen and (min-width: 5120px){

    #portrait,
    #wrapper {
        width: 1800px;
        height: 1800px;
        overflow: hidden;
    }
    .img1,
    .img-search {
        height: 1800px;
        width: 1800px;
    }
}