/* universal/pseudo-class styling */
* {
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #7584ad;
    --secondary-color: #314570;
    --tertiary-color: #aed1d6;
    --quaternary-color: #a37f6f;
    --font-primary: Georgia, 'Times New Roman', Times, serif;
    --font-secondary: Verdana, Geneva, Tahoma, sans-serif;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
}

/* header styling */
header {
    padding: 20px 0;
    background: var(--tertiary-color);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    border-bottom: 4px solid var(--quaternary-color);
    z-index: 999;
}

header h1 {
    background: var(--primary-color);
    font-size: 40px;
    padding: 5px 50px;
    font-family: var(--font-primary);
    border-radius: 0 25px 25px 0;
}

header h1 a {
    padding: 0 15px;
}

header h1 a:hover {
    border-bottom: 2px solid var(--secondary-color);
    border-radius: 15px;
}

header nav {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

header nav a {
    font-size: 20px;
    padding: 5px 15px;
    font-family: var(--font-secondary);
    border-bottom: 2px solid var(--primary-color);
    border-radius: 15px;
    margin-right: 5px;
}

header nav a:hover {
    background: var(--primary-color);
    border-radius: 15px;
    transition: 1s;
}

/* hero/jumbotron styling */
.hero {
    background-image: url(../images/background.png);
    height: 250px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    border-bottom: 4px solid var(--quaternary-color);
}

.hero h2 {
    font-family: var(--font-primary);
    background: var(--primary-color);
    color: var(--secondary-color);
    font-size: 30px;
    padding: 5px 50px;
    margin-bottom: 20px;
    border-radius: 20px 0 0 20px;
    width: 75%;
}

/* main section styling */
main {
    width: 100%;
    background-image: url(../images/background2.png);
}

.container {
    width: 95%;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
}

.container-title {
    width: 250px;
    font-size: 48px;
    font-weight: bold;
    font-family: var(--font-primary);
    border-right: solid black 4px;
    border-radius: 15px;
    text-align: right;
    padding-right: 20px;
}

.container-content p {
    padding: 20px 10px;
    font-size: 18px;
    line-height: 1.5;
    font-family: var(--font-secondary);
}

/* about me styling */
.about-picture {
    background-image: url(../images/self-picture.jpg);
    background-size: cover;
    height: 300px;
    width: 230px;
    border-radius: 5px;
    float: left;
    margin: 20px 10px 0 10px;
}

.about-picture:hover {
    margin: 30px 0;
    background-image: url(../images/SirUbuImage.png) ;
    background-size: cover;
    height: 230px;
    border-radius: 5px;
    margin: 20px 10px 70px 10px;
    transition: ease-out 1s;
}

/* projects styling*/
.grid-container {
    display: flex;
    justify-content: center;
    padding: 20px 10px;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(3, auto);
    grid-template-rows: repeat(9, 180px);
    grid-gap: 10px;
}

.project-24 {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
}

.project-23 {
    grid-column: 3;
    grid-row: 1;
}

.project-22 {
    grid-column: 3;
    grid-row: 2;
}

.project-image {
    border: 4px solid var(--primary-color);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: var(--tertiary-color);
}

.snapshot {
    height: 100%;
    width: 100%;
    opacity: 0.4;
    transition: 1s;
}

.snapshot:hover {
    opacity: 1;
}

.description {
    position: absolute;
    width: fit-content;
    padding: 10px 15px;
    margin-bottom: 20px;
    background: var(--primary-color);
    border-radius: 0 15px 15px 0;
    text-align: left;
    color: var(--secondary-color);
}

.description h4 {
    font-size: 14px;
    font-family: var(--font-primary);
}

.description p {
    font-size: 10px;
    font-family: var(--font-secondary);
}

/* contact me styling */
.contact {
    width: 80%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-family: var(--font-secondary);
    font-weight: 18px;
}

.contact a {
    padding: 10px;
    border-left: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
    border-radius: 15px;
}

.contact a:hover {
    background: var(--primary-color);
    transition: 1s;
}


/* footer styling */
footer {
    height: 60px;
    border-top: 4px solid var(--quaternary-color);
    background: var(--tertiary-color);
    text-align: center;
}

footer div {
    color: var(--secondary-color);
    font-family: var(--font-secondary);
    font-size: 16px;
    padding-top: 30px;
}

/* media queries */
@media screen and (max-width: 1200px) {
    header a {
        background-color: var(--primary-color);
    }

    .container {
        flex-wrap: wrap;
    }
    
    .container-title {
        display: flex;
        flex: 1;
        border-right: none;
        border-bottom: solid black 4px;
        border-radius: 15px;
        justify-content: center;
    }

    .contact {
        width: 100%;
        padding-top: 20px;
    }

    .contact a {
        background-color: var(--primary-color);
    }

    .snapshot {
        opacity: 1;
    }
}

@media screen and (max-width: 1024px) {
    header  {
        position: relative;
        justify-content: center;
    }
    
    header h1 {
        width: 100%;
        text-align: center;
    }

    header nav {
        padding-top: 20px;
    }
    
    .grid-layout {
        grid-template-columns: repeat(2, auto);
        grid-template-rows: repeat(14, 170px);
    }
    
    .project-23 {
        grid-column: 1;
        grid-row: 3;
    }
    
    .project-22 {
        grid-column: 2;
        grid-row: 3;
    }

    .contact {
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 575px) {
    header nav {
        flex-wrap: wrap;
    }

    .grid-layout {
        grid-template-columns: repeat(1, auto);
        grid-template-rows: repeat(25, 170px);
    }
    
    .project-24 {
        grid-column: 1 / span 1;
        grid-row: 1 / span 2;
    }
    .project-23 {
        grid-column: 1;
        grid-row: 3;
    }
    
    .project-22 {
        grid-column: 1;
        grid-row: 4;
    }
}