@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

:root {
    --primary-color: #1c9aec;
    --background-color: #eee;
    --black-light: #1a1a1a;
    --font-size: 16px;
    --font-family: "Figtree", "Verdana", "Roboto", sans-serif;
    --border-radius: 4px;
    --white: #FFFFFF;
    --black: #000000;
}

html {
    font-size: var(--font-size);
    font-family: var(--font-family), sans-serif;
    text-align: center;
    color: var(--black);
    background-color: var(--background-color);
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

main {
    position: relative;
    margin: 40px auto 0 auto;
}

section, .home {
    scroll-margin-top: 40px;
}

section {
    position: relative;
    z-index: 1;
    background-color: var(--background-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 1rem 0;
}

h3 {
    font-size: 1.75rem;
    font-weight: 500;
    margin: 1rem 0;
}

p {
    font-size: 1rem;
    line-height: 1.5;
}

a {
    color: var(--white);
    text-decoration: none;
    transition: color 200ms, decoration 200ms;
}

a:hover, a:focus {
    color: var(--primary-color);
}

.skills {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-direction: column;
}

.skill ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.skill li {
    margin: 0 0.5rem 1rem 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 1.15rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 200ms ease-in-out;
}

.skill li:hover, .skill li:focus {
    transform: translateY(-0.5rem);
    cursor: default;
}

.projects {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}

.project {
    margin: 1rem 2rem;
    position: relative;
    width: 300px;
    height: 350px;
    overflow: hidden;
    border: 1px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--white);
    border-radius: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    transition: transform 200ms ease-in-out;
}

.project:hover, .project:focus {
    transform: scale(1.05);
}

.project img {
    width: calc(100% - 2rem);
    height: calc(100% - 2rem - 50px);
    object-fit: cover;
    position: absolute;
    top: calc(1rem + 50px);
    left: 1rem;
    z-index: 1;
    transition: opacity 200ms ease-in-out;
}

.project h3 {
    position: relative;
    z-index: 2;
    margin-top: 0.75rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.project .overlay-content {
    position: absolute;
    top: 50px;
    left: 0;
    width: calc(100% - 2rem);
    height: 300px;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 1rem;
    align-items: center;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    transition: opacity 200ms ease-in-out;
}

.project:hover .overlay-content,
.project:focus .overlay-content {
    opacity: 1;
    pointer-events: auto;
}

.project ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.project li {
    margin: 0 0.5rem 0.5rem 0;
    padding: 0.1rem 0.4rem;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.875rem;
    border-radius: 0.5rem;
}

nav {
    position: fixed;
    top: 0;
    height: 40px;
    background-color: var(--black-light);
    width: 100%;
    z-index: 10;
}

nav ul {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul li a {
    font-size: 1.25rem;
    padding: 0.75rem 0.25rem;
}

.homepage {
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--black-light);
    color: var(--white);

    h2 {
        margin-top: 0;
    }
}

.button {
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    border: 0.25rem solid white;
    font-size: 1rem;
    transition: background-color 200ms, color 200ms;
    font-weight: 600;
}

.button:hover, .button:focus {
    background-color: white;
    color: black;
    cursor: pointer;
}

.portfolio-description {
    img {
        max-width: 24rem;
        width: 80%;
        border-radius: 50%;
        margin-bottom: 1rem;
        box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    }

    p {
        max-width: 36rem;
        margin: 0 auto;
    }
}

footer {
    position: relative;
    background-color: var(--black-light);
    color: white;
    bottom: 0;
    padding: 2rem 0 3rem 0;

    h2 {
        margin-top: 0;
    }

    a {
        color: var(--primary-color);
    }

    a:hover, a:focus {
        text-decoration: underline;
    }
}
