@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400;500;600;700&display=swap');

:root {
    --primary-color: #8EC837;
    --darker-primary-color: #548707;
    --secondary-color: #333;
    --white-color: white;
}

html {
    overflow-y: scroll;
    overflow-x: hidden;
}

html,
body {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-family: 'Oswald', sans-serif;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

p {
    font-size: 1rem;
}

body {
    background-color: var(--secondary-color);

}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.navbar {
    position: sticky;
    top: 0;
    height: 4em;
    background-color: var(--primary-color);
    color: var(--white-color);
    z-index: 1;
}

.logo span {
    color: var(--darker-primary-color);
}

.menu {
    list-style: none;
    display: none;

}

.menu li {
    width: 5em;
    text-align: center;
}

.menu li a {
    text-decoration: none;
    color: var(--white-color);
}

.menu li a:hover {
    color: var(--darker-primary-color);
}
.menu.responsive-menu {
    display: block;
    position: absolute;
    top: 2.5em;
    left: 0;
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    z-index: 1;
    transition: all 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
 }

 .menu.responsive-menu li {
    display: block;
    margin-bottom: 10px;
    text-align: center;
 }

 .menu-toggle {
    display: inline-block;
    cursor: pointer;
    font-size: 2rem;
 }

 .close {
    display: none;
  }

.menu.responsive-menu .close {
    display: inline-block;
}
.image-box {
    width: 80vw;
    margin: 2em auto;
    border: 5px solid var(--primary-color);
    padding: 5px;
}

.main-image {
    width: 100%;
    height: 100%;
}

.introduction {
    margin-bottom: 2em;
}

.header-content {
    margin-top: 20px;
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    max-width: 550px;
}

.header-title {
    font-size: 2.4rem;
    font-weight: bold;
    opacity: .8;
    color: var(--white-color);
    margin-bottom: 0.5em;
    line-height: 1em;
}

.up {
    font-size: 2rem;
    font-weight: 500;
    color: #c5c5c5;
    margin-bottom: 5px;
    position: relative;
    display: block;
}

.down {
    font-size: 2.5rem;
    margin-bottom: 0;
    position: relative;
    display: block;
}

.header-subtitle {
    font-size: 0.8rem;
    letter-spacing: 1rem;
    color: var(--primary-color);
    opacity: .8;
    margin-bottom: 3em;
}

#about-me .card {
    --bg: #a8a8a8;
    --hover-bg: var(--primary-color);
    --hover-text: var(--darker-primary-color);
    max-width: 85vw;
    min-height: 45vh;
    text-align: center;
    background: var(--bg);
    padding: 1.5em;
    padding-block: 1.8em;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    transition: .3s cubic-bezier(.6, .4, 0, 1), transform .15s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1em;
}
#about-me .card .icon{
    font-size: 3rem;
}

#about-me .card__body {
    color: #464853;
    line-height: 1.5em;
    font-size: 1em;
}

#about-me .card> :not(span) {
    transition: .3s cubic-bezier(.6, .4, 0, 1);
}

#about-me .card>strong {
    display: block;
    font-size: 1.4rem;
    letter-spacing: -.035em;
}

#about-me .card span {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--hover-text);
    border-radius: 5px;
    font-weight: bold;
    top: 100%;
    transition: all .3s cubic-bezier(.6, .4, 0, 1);
}

#about-me .card:hover span {
    top: 0;
    font-size: 1.2em;
}

#about-me .card:hover {
    background: var(--hover-bg);
}

#about-me .card:hover>div,
.card:hover>strong {
    opacity: 0;
}

.view-work-button {
    border-radius: 2.5em;
    padding: 1.5em;
    border: none;
    background: var(--darker-primary-color);
    color: var(--white-color);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.5s;
}

.view-work-button:hover {
    background: var(--primary-color);
    transition: 0.5s;
}

.white-bg {
    background-color: rgb(255, 255, 255);
    padding: 3em;
}

.section-subtitle {
    margin-bottom: 6px;
    font-weight: 400;
    opacity: .6;
}

.section-title {
    font-size: 1.5rem;
    color: var(--darker-primary-color);
}

.card {
    position: relative;
    width: 80vw;
    height: 200px;
    background-color: #f2f2f2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1000px;
    box-shadow: 0 0 0 5px #ffffff80;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 2em auto;
}

.card .card-image {
    width: 100%;
}

.card svg {
    width: 48px;
    fill: var(--secondary-color);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2);
}

.card__content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    background-color: #f2f2f2;
    transform: rotateX(-90deg);
    transform-origin: bottom;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover .card__content {
    transform: rotateX(0deg);
}

.card__title {
    margin: 0;
    font-size: 24px;
    color: var(--secondary-color);
    font-weight: 700;
}

.card:hover svg {
    scale: 0;
}

.card__description {
    margin: 10px 0 0;
    font-size: 14px;
    color: #777;
    line-height: 1.4;
}

.portfolio .section-subtitle {
    color: var(--white-color);
}

.card .button {
    border-radius: 0.5em;
    padding: 0.5em;
    border: none;
    background: var(--darker-primary-color);
    color: var(--white-color);
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    cursor: pointer;
    display: inline-block;
    margin: 1em 0;
    text-decoration: none;
}

#contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 10px;
}

label {
    color: var(--white-color);
    margin-bottom: 10px;
    font-weight: bold;
    text-align: left;
    width: 100%;
}

input[type="email"],
textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: none;
    margin-bottom: 20px;
}

input[type="submit"] {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

input[type="submit"]:hover {
    background-color: var(--darker-primary-color);
}

footer {
    color: var(--white-color);
    text-align: center;
}

@media(min-width: 768px) {
    :root {
        font-size: 20px;
    }

    nav {
        font-size: 1rem;
        justify-content: space-around !important;
    }
    .menu{
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
   .menu-toggle {
        display: none !important;
    }
    #intro {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-subtitle {
        margin-bottom: 2em;
    }

    .image-box {
        width: 20vw;
    }

    .view-work-button {
        border-radius: 0.5em;
        padding: 0.5em;
        font-weight: 300;
    }

    .cards-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .card {
        width: 25vw;
        height: 50vh;
    }
}
