:root {
    --dark-blue: #03045E;
    --dark-blue-1: #0077B6;
    --blue: #00B4D8;
    --light-blue-1: #90E0EF;
    --light-blue: #CAF0F8;
    --text-background-color: #90E0EF;
    --text-color: #03045e;
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-blue);
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

p {
    line-height: 1.6;
    font-size: 20px;
}

.description {
    color: white;
}

/* Header */

header {
    background-color: var(--dark-blue);
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1{
    background-color: var(--text-background-color);
    color: var(--text-color);
    padding: 5px 5px 5px 40px;
}

header nav {
    margin-right: 30px;
    display: flex;
}

header nav a{
    color: var(--light-blue-1);
    border-bottom: 3px solid var(--light-blue-1);
    margin: 0 15px;
    text-decoration: none;
    font-size: 1.2em;
}

/* Hero */

.hero {
    height: 300px;
    width: 100%;
    margin-bottom: 25px;
    background-color: var(--dark-blue-1);
    background-image: linear-gradient(136deg, var(--dark-blue-1), var(--blue));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.hero img {
    margin-left: 50px;
    align-self: center;
}

.hero .subtitle {
    padding: 10px;
    margin: 0 50px 20px 0;
    font-size: 30px;
    background-color: var(--text-background-color);
    color: var(--text-color);
}

/* Main container */

main {
    max-width: 85%;
    margin: auto;
}

/* Overall styling for each section */

section {
    margin-bottom: 30px;
    display: flex;
}

.title {
    flex: 1;
    color: var(--dark-blue);
    text-align: right;
    font-size: 50px;
    font-weight: 500;
    padding-right: 10px;
    border-right: 5px solid var(--dark-blue);
}

.content {
    flex: 4;
    margin-left: 20px;
}

/* Projects */
/* Overall styles */

.work img {
    opacity: .7;
    transition: opacity .5s;
}

.work img:hover {
    opacity: 1;
}

.work .content {
    display: grid;
    grid-template-columns: 50% 50%;
    justify-content: center;
    gap: 10px;
}

.work a {
    display: flex;
    position: relative;
}

.title-container {
    position: absolute;
    bottom: 0;
    margin-bottom: 25px;
    padding: 10px;
    font-size: 20px;
    background-color: var(--text-background-color);
    color: var(--text-color);
}

.github-container-main {
    padding: 10px;
    font-size: 18px;
    background-color: var(--text-background-color);
    color: var(--text-color);
}

.github-container-main a {
    display: inline;
    color: var(--text-color)
}

.github-container-small {
    background-color: var(--text-background-color);
    font-size: 13px;
}

.title-container .sub {
    font-size: 12px;
}

/* Top project card */

.main-project {
    grid-column: 1 / 3;
    border: 3px solid var(--dark-blue-1);
    background-color: var(--dark-blue-1);
}

.main-project img{
    /* width: clamp(200px, 100%, 600px); */
    width: 100%;
    aspect-ratio: 5/3;
    object-fit: cover;
    object-position: 0% 0%;
}

/* Smaller project cards */

.project {
    border: 3px solid var(--dark-blue-1);
    background-color: var(--dark-blue-1);
}

.project img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
}

.project .title-container {
    font-size: clamp(.5rem, -0.8750rem + 8.3333vw, 1rem);
    margin-bottom: 15px;
}

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

/* Contact me */

.contact-me {
    justify-content: space-between;
}

.contact-me nav{
    display: flex;
    align-items: center;
    justify-content: space-around;
    font-size: 20px;
}

.contact-me nav a {
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 3px solid var(--dark-blue);
}

/* Responsive Design */
/* Tablet */

@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
    }
    header h1 {
        padding: 5px;
        margin-bottom: 10px;
    }

    header nav {
        margin: 0;
    }

    section {
        flex-direction: column;
    }

    .title {
        text-align: center;
        border-right: 0;
        border-bottom: 5px solid #03045e;
        margin: 0;
        padding: 0;
        margin-bottom: 10px;
    }

    .contact-me nav {
        justify-content: space-between;
    }
}

/* Mobile */

@media screen and (max-width: 425px) {

    p {
        text-align: center;
    }

    header nav {
        flex-direction: column;
        align-items: center;
    }

    .contact-me nav {
        flex-direction: column;
    }

    .contact-me nav div {
        margin-bottom: 5px;
    }

    .hero {
        flex-direction: column;
        align-items: center;
    }

    .hero img {
        margin: 0;
        padding: 0;
    }

    .hero .subtitle {
        margin: 0;
        padding: 5px 5px 0 5px;
    }

    .title-container {
        padding: 0;
    }
}