html {
    box-sizing: border-box;
}

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

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

:root {
    --white-color: #fff;
    --white-hh-color: #fefefe;
    --background-color: #f3f9ff;
    --light-blue-color: #b3ddea;
    --blue-color: rgba(33, 36, 61, 0.6);
    --dark-color: #21243d;
    --red-color: #d6001c;
    --platinum-color: #e0e0e0;
}

@font-face {
    font-family: 'Inter';
    src: local('Inter-Regular'),
        url("../fonts/Inter-Regular.woff2") format("woff2"),
        url("../fonts/Inter-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: local('Inter-Medium'),
        url("../fonts/Inter-Medium.woff2") format("woff2"),
        url("../fonts/Inter-Medium.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: local('Inter-Bold'),
        url("../fonts/Inter-Bold.woff2") format("woff2"),
        url("../fonts/Inter-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.page {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

/* glob */
.visually-hidden {
    position: absolute !important;
    clip: rect(1px 1px 1px 1px);
    /* IE6, IE7 */
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden;
}

.container {
    margin: 0 auto;
    padding: 0 30px;
    max-width: 1170px;
}

.list-reset {
    margin: 0;
    padding: 0;
    list-style: none;
}

.btn {
    display: block;
    padding: 11px 30px;
    max-width: -webkit-max-content;
    max-width: -moz-max-content;
    max-width: max-content;
    border: 2px solid var(--dark-color);
    border-radius: 4px;
    font-weight: 500;
    font-size: 18px;
    line-height: normal;
    color: var(--white-color);
    background-color: var(--dark-color);
    -webkit-transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out, outline 0.3s ease-in-out;
    -o-transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out, outline 0.3s ease-in-out;
    transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out, outline 0.3s ease-in-out;
}

.btn:focus-visible {
    outline: none;
    color: var(--dark-color);
    background-color: var(--white-color);
}

.btn:hover,
.btn:active {
    color: var(--dark-color);
    background-color: var(--white-color);
}

.section-title {
    margin: 0;
    margin-bottom: 22px;
    font-weight: 500;
    font-size: 32px;
    line-height: 150%;
    color: var(--dark-color);
}

.section-offset {
    padding: 50px 0;
}

.flex {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

/* header */
.header {
    padding: 25px 0;
}

.header__container {
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
}

.nav__list {
    gap: 40px;
}

.nav__link {
    position: relative;
    font-weight: 500;
    font-size: 20px;
    line-height: normal;
    color: var(--dark-color);
}

.nav__link::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--light-blue-color);
    -webkit-transition: left 0.3s ease-in-out, width 0.3s ease-in-out;
    -o-transition: left 0.3s ease-in-out, width 0.3s ease-in-out;
    transition: left 0.3s ease-in-out, width 0.3s ease-in-out;
}

.nav__link:focus-visible {
    outline-offset: 3px;
    outline: 2px solid var(--blue-color);
}

.nav__link:hover:not(:focus-visible)::after {
    left: 0;
    width: 100%;
}

/* hero */
.hero__container {
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.hero__title {
    margin: 0;
    margin-bottom: 60px;
    font-weight: 700;
    font-size: 44px;
    line-height: 130%;
    color: var(--dark-color);
}

.hero__descr {
    margin: 0;
}

.hero__resume {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    border: 2px solid var(--red-color);
    background-color: var(--red-color);
}

.resume__icon {
    margin-right: 10px;
    width: 24px;
    height: 24px;
}

.resume__icon--name {
    fill: var(--white-hh-color);
    -webkit-transition: fill 0.3s ease-in-out;
    -o-transition: fill 0.3s ease-in-out;
    transition: fill 0.3s ease-in-out;
}

.resume__icon--background {
    fill: var(--red-color);
    -webkit-transition: fill 0.3s ease-in-out;
    -o-transition: fill 0.3s ease-in-out;
    transition: fill 0.3s ease-in-out;
}

.hero__resume:focus-visible {
    outline: none;
    color: var(--red-color);
    background-color: var(--white-color);
}

.hero__resume:hover,
.hero__resume:active {
    color: var(--red-color);
    background-color: var(--white-color);
}

.hero__resume:focus-visible .resume__icon--name {
    fill: var(--red-color);
}

.hero__resume:focus-visible .resume__icon--background {
    fill: var(--white-hh-color);
}

.hero__resume:hover .resume__icon--name,
.hero__resume:active .resume__icon--name {
    fill: var(--red-color);
}

.hero__resume:hover .resume__icon--background,
.hero__resume:active .resume__icon--background {
    fill: var(--white-hh-color);
}

.hero__img {
    width: 350px;
    border-radius: 50%;
}

/* portfolio */
.portfolio {
    background-color: var(--background-color);
}

.portfolio__list {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 30px;
}

.portfolio__item {
    border-radius: 4px;
    -webkit-box-shadow: 30px 20px 40px #e4edf5;
    box-shadow: 30px 20px 40px #e4edf5;
    background-color: var(--white-color);
}

.portfolio__site {
    display: block;
    font-size: 0;
    overflow: hidden;
}

.portfolio__img {
    width: 351px;
    border-right: 1px solid var(--platinum-color);
    border-radius: 4px 0 0 4px;
    -webkit-transition: -webkit-transform 0.3s ease-in-out;
    transition: -webkit-transform 0.3s ease-in-out;
    -o-transition: transform 0.3s ease-in-out;
    transition: transform 0.3s ease-in-out;
    transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
}

.portfolio__site:focus-visible {
    outline: none;
}

.portfolio__site:focus-visible .portfolio__img,
.portfolio__site:hover .portfolio__img {
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
}

.portfolio__site:active .portfolio__img {
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
}

.portfolio__content {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 30px;
    width: calc(100% - 351px);
}

.portfolio__name {
    margin: 0;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 24px;
    line-height: normal;
    color: var(--dark-color)
}

.portfolio__descr {
    margin: 0;
    margin-bottom: 20px;
    font-size: 20px;
    line-height: normal;
    color: var(--blue-color);
}

.portfolio__links {
    gap: 20px;
}

.portfolio__github {
    color: var(--dark-color);
    background-color: var(--white-color);
}

.portfolio__github:focus-visible {
    outline: none;
    color: var(--white-color);
    background-color: var(--dark-color);
}

.portfolio__github:hover,
.portfolio__github:active {
    color: var(--white-color);
    background-color: var(--dark-color);
}

/* certificates */
.certificates__list {
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 30px;
    --offset: 2;
}

.certificates__item {
    width: calc((100% - var(--offset) * 30px) / (var(--offset) + 1));
    font-size: 0;
}

.certificates__img {
    display: block;
}

/* footer */
.footer {
    padding: 50px 0;
    background-color: var(--dark-color);
}

.footer__list {
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 30px;
}

.footer__link {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.footer__icon {
    margin-right: 5px;
    width: 24px;
    height: 24px;
}

.footer__icon path {
    fill: var(--white-color);
    -webkit-transition: fill 0.3s ease-in-out;
    -o-transition: fill 0.3s ease-in-out;
    transition: fill 0.3s ease-in-out;
}

.footer__text {
    font-size: 16px;
    line-height: normal;
    color: var(--white-color);
    -webkit-transition: color 0.3s ease-in-out;
    -o-transition: color 0.3s ease-in-out;
    transition: color 0.3s ease-in-out;
}

.footer__link:focus-visible {
    outline-offset: 3px;
    outline: 2px solid var(--light-blue-color);
}

.footer__link:hover:not(:focus-visible) .footer__icon path,
.footer__link:active:not(:focus-visible) .footer__icon path {
    fill: var(--light-blue-color);
}

.footer__link:hover:not(:focus-visible) .footer__text,
.footer__link:active:not(:focus-visible) .footer__text {
    color: var(--light-blue-color);
}