@import url('https://fonts.googleapis.com/css2?family=Science+Gothic:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Science+Gothic:wght@100..900&family=Space+Grotesk:wght@300..700&display=swap');

:root {
    --base-color: rgb(72, 221, 218);
    --text-color: rgb(182, 182, 223);
    --primary-color: #64a7b8;
    --secondary-color: rgb(142, 92, 186);
    --color-1: rgb(83, 41, 91);
    --color-2: rgb(30, 24, 46);
    --color-3: rgb(23, 11, 68);
}

* {
    margin: 0;
    padding: 0; 
    box-sizing: border-box;
}

html {
    font-family: Science Gothic, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif ;
    color: var(--text-color);
}

body {
    padding: 2em;
    background-image: url('images/spacebackground.jpg');
    background-repeat: repeat;
    background-size: 75%;
}

h1, h2, h3 {
    font-family: Georgia, 'Times New Roman', Times, serif;
}

nav {
    margin: 1em auto 3em auto;
    width: min(1000px, 100%);
}

nav ul {
    display: flex;
    align-items: center;
    list-style-type: none;
    gap: 2em;
}

nav li:first-child {
    margin-right: auto;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-weight: bold;
}

nav a {
    text-decoration: none;
    color: var(--text-color)
}

nav a:hover {
    text-decoration: underline;
}

header, section {
    margin: 2em auto;
    width: min(75em, 100%);
    background-color: var(--color-1);
    padding: min(2em, 15%);
    border-radius: 1em;
}

.flex-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3em;
}

header img {
    max-width: 100%;
    border-radius: 1em;
    object-fit: cover;
    object-position: top;
}

.text-container {
    flex: 0 1 34em;
}

h1 {
    font-size: 2.5rem;
}

.text-container p {
    margin: .75em 0 1em 0;
    font-size: 1.25rem;
}

.cta-button {
    display: inline-block;
    text-decoration: none;
    color: white;
    background-color: var(--primary-color);
    padding: .75em 1.25em;
    border-radius: .5em;
    font-weight: 600;
}

.secondary {
    background-color: var(--secondary-color);
}

section {
    padding: 3em min(2em, 15%);
    background-color: var(--color-2);
    text-align: center;
}

h2 {
    font-size: 2rem;
}

section p {
    margin-top: 1rem;
    font-size: 1.25rem;
}

section#hes-really-cool {
    background-color: var(--color-3);
}

.grid-container {
    margin-top: 3em;
    margin-bottom: 3em;
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr 1fr;
    grid-template-areas: 
    "img-1 img-1 img-2 img-3"
    "img-1 img-1 img-4 img-5";
    gap: 1em;
}

.grid-container img {
    height: 100%;
    width: 100%;
    border-radius: .5em;
    transition: 100ms ease;
}

.grid-container img:hover {
    scale: 1.05;
}

details {
    margin-top: 1em;
    background-color: var(--base-color);
    border-radius: 1em;
}

details summary {
    padding: 1em;
    font-size: 1.7rem;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    color: black;
}

details p {
    padding: 0 2em 2em 2em;
    color: black;
}

footer {
    padding-bottom: 0 4em;
    text-align: center;
}

footer a {
    margin 0 1em;
    text-decoration: none;
    color: var(--text-color);
    margin-right: 1rem;
    margin-left: 1rem;
}

footer a:hover {
    text-decoration: underline;
}

@media(max-width: 988px) {
    header {
        text-align: center;
    }

    header .text-container {
        padding-top: 0;
    }
}

@media(max-width: 640px) {
    nav li {
        display: none;
    }

    nav li:first-child,
    nav li:last-child {
        display: block;
    }

    header {
        margin-top: 0;
    }

    .cta-button {
        margin-top: .5em;
        width: 100%;
    }

    .grid-container {
        display: flex;
        flex-direction: column;
    }

    .text-container {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}