* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    outline: 0;
}

html {
    scroll-behavior: smooth;
}

a {
    color: #2d2e32;
    text-decoration: none;
}

a:hover {
    color: #fec000;
}

img {
    width: 100%;
    max-width: max-content;
}

p {
    margin: 15px 0;
}

body {
    font-size: 16px;
    color: #2d2e32;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    line-height: 1.5;
    padding-top: 62px;
}

@media (min-width: 992px) {
    .body {
        padding-top: 70px;
    }
}

.pd--xl {
    padding: 100px 20px;
}

.pd--l {
    padding: 50px 20px;
}

@media (min-width: 992px) {
    .pd--l {
        padding: 70px 20px;
    }
}

.pd--m {
    padding: 50px 20px;
}

.pd--s {
    padding: 30px 20px;
}

.pd--xs {
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.container--m {
    max-width: 992px;
}

.container--xs {
    max-width: 600px;
}

.container--fullwidth {
    max-width: 100%;
}

.content {
    padding: 0 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 40px;
}

@media (min-width: 992px) {
    h1 {
        font-size: 50px;
    }
}

h2 {
    font-size: 30px;
}

@media (min-width: 992px) {
    h2 {
        font-size: 40px;
    }
}

h3 {
    font-size: 24px;
}

@media (min-width: 992px) {
    h3 {
        font-size: 30px;
    }
}

h4 {
    font-size: 22px;
}

@media (min-width: 992px) {
    h4 {
        font-size: 24px;
    }
}

h5 {
    font-size: 18px;
}

@media (min-width: 992px) {
    h5 {
        font-size: 20px;
    }
}

h6 {
    font-size: 16px;
}

@media (min-width: 992px) {
    h6 {
        font-size: 18px;
    }
}

.toggle-menu {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 2px 2px 2px 3px;
    border-radius: 5px;
    cursor: pointer;
}

@media (min-width: 992px) {
    .toggle-menu {
        display: none;
    }
}

.line {
    width: 100%;
    height: 3px;
    border-radius: 5px;
    background-color: #2d2e32;
    transition: transform 0.2s ease-out;
}

.toggle .line1 {
    background-color: #2d2e32;
    transform: scale(0.9) rotateZ(-45deg) translate(-6px, 4px);
}

.toggle .line2 {
    display: none;
}

.toggle .line3 {
    background-color: #2d2e32;
    transform: scale(0.9) rotateZ(45deg) translate(-6px, -4px);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    z-index: 9999;
    overflow: hidden;
    transition: all 0.5s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.09);
    max-height: 62px;
}

@media (min-width: 992px) {
    .header {
        max-height: 70px;
    }
}

.header.toggle {
    max-height: fit-content;
}

.header .container {
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
}

@media (min-width: 992px) {
    .header .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.header .header__logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
}

.header .header__logo-img {
    width: 170px;
}

@media (min-width: 992px) {
    .header .header__logo-img {
        width: 180px;
    }
}

.header .header-nav__list {
    list-style: none;
    display: flex;
    font-weight: 600;
    font-size: 16px;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

@media (min-width: 992px) {
    .header .header-nav__list {
        flex-direction: row;
        margin-top: 0;
    }
}

.header .header-nav__list-item {
    padding: 8px 10px;
}

.header .header-nav__list-item a {
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.5s;
    padding: 10px 0;
}

.header .header-nav__list-item:hover a {
    color: #fec000;
    background-color: rgba(255, 255, 255, 0.5);
}

.header .btn {
    margin-top: 30px;
}

@media (min-width: 992px) {
    .header .btn {
        margin-top: 0;
    }
}

.intro {
    background-color: #f9f9f9;
}

.intro .stack-list {
    margin: 20px 0;
}

.intro .waving-title {
    margin-top: 0;
    margin-bottom: 0;
}

.intro .hero-img {
    display: none;
}

@media (min-width: 1024px) {
    .intro .hero-img {
        display: block;
    }
}

.intro .waving-title {
    position: relative;
}

.intro .waving-title img {
    display: none;
}

@media (min-width: 992px) {
    .intro .waving-title img {
        position: absolute;
        left: 394px;
        bottom: 5px;
        max-width: 60px;
        display: inline;
    }
}

.intro .socials {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.about {
    text-align: center;
}

.portfolio {
    background-color: #f9f9f9;
}

.portfolio .preview {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 20px;
    margin: 40px 0;
}

.portfolio .preview__box {
    height: 200px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .portfolio .preview__box {
        height: 400px;
    }
}

@media (min-width: 1024px) {
    .portfolio .preview__box {
        margin-bottom: 0;
    }
}

.portfolio .preview__box img {
    transform: translateY(0);
    transition: 0.5s ease-out;
}

.portfolio .preview__box:not(.static):hover img {
    transform: translateY(calc(-100% + 400px));
    transition: 15s ease-out;
}

.portfolio .preview__box.static {
    display: flex;
}

.portfolio .preview__box.static img {
    object-fit: cover;
}

.portfolio .technologies {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.portfolio .technologies li {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: inline-block;
    font-size: 14px;
    padding: 5px 10px;
}

@media (min-width: 768) {
    .portfolio .technologies li {
        font-size: 20px;
        padding: 5px 10px;
    }
}

.portfolio .content {
    text-align: center;
    padding: 0 20px;
}

@media (min-width: 768) {
    .portfolio .content {
        padding: 0 50px;
    }
}

.portfolio .links {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portfolio .links a {
    font-weight: 600;
    font-size: 20px;
    margin: 0 10px;
    width: fit-content;
}

.footer {
    border-top: 1px solid #cccccc;
    max-width: 1400px;
    margin: 0 auto;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

@media (min-width: 992px) {
    .footer .container {
        flex-direction: row;
    }
}

.footer .widget {
    padding: 10px;
}

@media (min-width: 992px) {
    .footer .widget {
        padding: 10px;
        width: 25%;
        display: flex;
    }
}

.footer .widget .footer__nav {
    list-style: none;
}

.footer .widget .footer__nav a:hover {
    text-decoration: underline;
    color: #2d2e32;
}

.footer .widget .footer__logo img {
    max-width: 190px;
}

.stack-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 450px;
}

.stack-list__item {
    align-items: center;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.09);
    cursor: pointer;
    display: flex;
    height: 60px;
    justify-content: center;
    width: 60px;
}

.stack-list__item img {
    max-width: 30px;
}

.contacts {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contacts__box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contacts__box .icon {
    align-items: center;
    background-color: #fff;
    color: #fec000;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.09);
    cursor: pointer;
    display: flex;
    height: 60px;
    justify-content: center;
    width: 60px;
    font-size: 40px;
}

.contacts__box .text h5 {
    margin: 0;
}

.contacts__box .text p {
    margin: 0;
}

.hero-img {
    background-image: url("../images/me.jpg");
    width: 460px;
    height: 460px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border: 3px solid #2d2e32;
    animation: morph 8s ease-in-out infinite;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    position: relative;
    transition: all 1s ease-in-out;
}

@media (min-width: 1280px) {
    .hero-img {
        width: 560px;
        height: 560px;
    }
}

@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}
