body {
    margin: 0;
    font-family: "Overlock", sans-serif;
}

h1, h2, h3, h4 {
    text-align: center;
    font-family: "Merienda", sans-serif;
    margin: 0;
}

h1 {
    font-size: 3.1rem;
}

h2 {
    font-size: 2.5rem;
}

h4 {
    font-size: 1.3rem;
}

p {
    font-size: 1.2rem;
    color: rgba(0, 0, 0, 0.65);
}

a {
    text-decoration: none;
    height: 1.5rem;
    width: 1.5rem;

    img {
        height: 1.5rem;
        width: 1.5rem;
    }
}

svg {
    height: 1.5rem;
    width: 1.5rem;
}

body > header {
    padding: 1rem;
}

body > header, main {
    margin: auto;
    max-width: 1440px;
}

.name-container {
    position: relative;
    margin: 0 1rem;
    margin-bottom: 2rem;

    img {
        max-width: 480px;
        width: 100%;
        object-fit: cover;

        border-radius: 4px;

        box-shadow: 0px 4px 10px -4px rgba(0,0,0,0.7);
    }

    h1 {
        color: white;
        margin: 0.5rem 0.5rem;
        position: absolute;
        bottom: 0;
        left: 0;

        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }
}

.about-me {
    h2 {
        margin: 0.5rem;
        text-align: center;
    }

    p {
        line-height: 1.3;
    }
}

.social-links {
    width: 100%;

    .links-container {
        display: flex;
        gap: 1rem;
        justify-content: center;

        a {
            text-decoration: none;
            flex: 1;
            max-width: 2rem;
            height: 2rem;

            img {
                height: 2rem;
                width: 2rem;
            }
        }
    }

    h3 {
        position: absolute;
        left: -10000px;
    }
}

main {
    margin-top: 5rem;
    margin-bottom: 5rem;

    h2 {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        margin: 0.5rem 0;
    }
}

.my-projects {
    padding: 1rem;
    display: grid;
    gap: 4rem;

    .project-container {
        box-shadow: 0px 4px 10px -4px rgba(0,0,0,0.7);

        .screenshot {
            font-family: "Merienda", sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;

            padding: 1rem;

            font-size: 3rem;
            color: white;
            text-align: center;
            max-width: 100%;
            aspect-ratio: 1 / 0.8;
            background-color: purple;
        }

        .details {
            padding: 1rem;
            padding-bottom: 2rem;

            header {
                display: flex;
                gap: 1rem;
                justify-content: space-between;
                align-items: center;
                margin: 0;
                margin-bottom: 0.5rem;

                .project-links {
                    display: flex;
                    gap: 0.5rem;

                    img, svg {
                        height: 1.3rem;
                        aspect-ratio: 1 / 1;
                    }
                }
            }

            p {
                margin: 0;
            }
        }
    }
}

footer {
    padding-top: 1.5rem;

    background-color: cornflowerblue;

    p {
        font-size: 1.1rem;
        color: #fff;
    }

    picture {
        img {
            vertical-align: bottom;
            width: 100%;
            object-fit: cover;
        }
    }
}

.contact-details {
    padding: 2rem;
    color: #fff;

    .details-line {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .social-links {
        margin: 2rem 0;
        display: flex;
        justify-content: center;
        gap: 2rem;

        a {
            --icon-size: 2.5rem;
            flex: 1;
            max-width: var(--icon-size);

            img {
                width: var(--icon-size);
                height: var(--icon-size);
            }
        }
    }
}

@media (width >= 600px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    p {
        font-size: 1.1rem;
    }

    body > header {
        padding: 2rem;

        &::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 0;
            background-color: teal;

            clip-path: polygon(0 0, 100% 0%, 100% 25%, 0 65%);

            max-height: 800px;
        }

        .container {
            z-index: 2;
            background-color: white;
            padding: 1.5rem;
            position: relative;

            box-shadow: 0px 4px 10px -4px rgba(0,0,0,0.7);
            .name-container {
                float: left;
                margin: 1rem;
                margin-bottom: -8px;

                img {
                    max-width: 300px;
                }

                h1 {
                    position: absolute;
                    bottom: 0;
                    right: 0;
                }
            }

            .about-me {
                .wrapper {
                    margin: 3rem 1.5rem;
                    margin-bottom: 0;

                    h2 {
                        white-space: nowrap;
                    }

                    .social-links {
                        .links-container {
                            justify-content: flex-end;
                        }
                    }
                }
            }
        }
    }

    main {
        padding: 0 3rem;

        h2 {
            margin: 0.5rem 0;
            text-align: left;
        }

        .my-projects {
            padding: 0;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;

            & > .project-container {
                margin-bottom: 0;

                .screenshot {
                    font-size: 2rem;
                }

                .details {
                    .project-links {
                        img, svg {
                            height: 1.1rem;
                            width: 1.1rem;
                        }
                    }

                    p {
                        font-size: 0.9rem;
                    }
                }
            }
        }
    }

    footer {
        padding: 1.5rem;

        display: flex;
        gap: 2rem;
        align-items: center;

        h2 {
            font-size: 2rem;
            text-align: left;
        }

        .contact-details {
            flex: 1;
            margin: 2rem 0;

            .social-links {
                margin: 1.5rem 0;
                justify-content: flex-start;
                gap: 1rem;

                a {
                    --icon-size: 2rem;
                }
            }
        }

        img {
            max-width: 300px;
        }
    }
}

@media (width >= 1000px) {
    h1 {
        font-size: 4rem;
    }

    h2 {
        margin: 1rem 0;
        font-size: 2.5rem;
    }

    p {
        font-size: 1.2rem;
    }

    body > header {
        .container {
            display: flex;
            gap: 2rem;
            background: none;
            box-shadow: none;

            .name-container {
                margin: 0;
                position: relative;
                float: none;
                flex: 1;
                max-height: min-content;
                max-width: 600px;

                img {
                    border-radius: 0;
                    max-width: none;
                }
            }

            .about-me {
                flex: 1 1;

                .wrapper {
                    h2 {
                        font-size: 2rem;
                    }

                    margin: 0;
                    padding: 2rem;
                    background-color: #fff;
                    box-shadow: 0px 4px 10px -4px rgba(0,0,0,0.7);
                }
            }
        }
    }

    main {
        margin-top: 8rem;
        margin-bottom: 8rem;

        .my-projects {
            grid-template-columns: 1fr 1fr 1fr;
            gap: 3rem;

            .project-container {
                .screenshot {
                    aspect-ratio: 1 / 0.6;
                }
            }
        }
    }

    footer {
        padding: 1rem 3rem;

        picture {
            img {
                max-width: 600px;
            }
        }

        .contact-details {
            margin: 0;
        }
    }
}
