* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background-color: #f1f5f8;
}
header {
    width: auto;
    height: 300px;
    background-color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}
header h1 {
    color: #f0db51;
    font-size: 64px;
    line-height: 64px;
    letter-spacing: 0.1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.container {
    width: 1300px;
    margin: 0 auto;
    padding-bottom: 100px;
}
.portfolio {
    color: #222;
    background: #f0db51;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.1rem;
    cursor: pointer;
    margin: 80px auto 0 auto;
    padding: 8px 16px;
    border-radius: 5px;
    border: none;
    transition: all 0.3s linear;
    animation: bounce 2s infinite;
    display: grid;
}
.portfolio:hover {
    background: #222;
    color: #f0db51;
}
.portfolio:focus {
    outline: none;
}
@keyframes bounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}
.container h2:first-of-type {
    margin: 80px;
}
.container h2 {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 40px;
    letter-spacing: 0.1rem;
    color: #102a42;
    position: relative;
    margin: 180px;
    margin-bottom: 80px;
}
.container h2::after {
    content: '';
    position: absolute;
    background: #f0db51;
    width: 100px;
    height: 4px;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;
    transform: translateY(10px);
}

.projects {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    row-gap: 50px;
}
.item {
    cursor: pointer;
    width: 370px;
    height: 300px;
    position: relative;
    box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.1);
    transition: transform 500ms ease, box-shadow 500ms;
    overflow: hidden;
}
.item:hover {
    transform: scale(1.025);
    box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.25);
}
.item img {
    position: absolute;
    width: 100%;
    height: 81%;
    object-fit: cover;
}
.item footer {
    padding: 1.25rem 1.5rem;
    text-align: center;
    background: #f8e881;
    color: #6b5d00;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    line-height: 18px;
    font-weight: 700;
    letter-spacing: 0.1rem;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

footer {
    height: 80px;
    background-color: #222;
    color: #f0db51;
    font-size: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}
footer a {
    color: #fff;
    text-decoration: none;
}
footer a:hover {
    color: #f0db51;
}

@media screen and (max-width: 800px) {
    header {
        width: auto;
    }
    header h1 {
        text-align: center;
        font-size: 48px;
        line-height: 60px;
    }
    .container {
        width: auto;
        padding: 0 20px;
        padding-bottom: 100px;
    }
    .container h2 {
        font-size: 32px;
        line-height: 40px;
        text-align: center;
        margin: 180px auto;
        margin-bottom: 80px;
    }
    .item {
        height: 250px;
    }
    footer {
        height: 60px;
        font-size: 13px;
    }
}

@media only screen and (min-device-width : 800px) and (max-device-width : 1024px) {
    .container {
        width: auto;
    }
}