:root {
    --text-color: #000;
    --goldenrod: rgb(36, 105, 36);
    --green: rgb(245, 204, 101);
    --project-item: #dedddd;
    --controller: rgb(155, 149, 149);
    --body-bg-color: #fff;
    --header-footer: #dedddd;
    --font-family: "Inter", "Arial", sans-serif;
}

.dark-mode {
    --text-color: #fff;
    --goldenrod: rgb(245, 204, 101);
    --green: rgb(36, 105, 36);
    --project-item: rgb(29, 60, 64);
    --controller: #fff;
    --body-bg-color: #222;
    --header-footer: #000;
    --font-family: "Inter", "Arial", sans-serif;
}

/* FONTS */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    src: local(""),
         url("../fonts/inter-v11-latin-regular.woff2") format("woff2"), 
         url("../fonts/inter-v11-latin-regular.woff") format("woff");
    font-display: swap; 
}

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

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

html {
    height: 100%;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

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

*:focus {
    outline: 3px dashed var(--text-color);
    outline-offset: 3px;
}

body {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--body-bg-color);
    font-family: var(--font-family);
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 26px;
    color: var(--text-color);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    display: inline-block;
    text-decoration: none;
}

.btn {
    background-color: transparent;
    padding: 0;
    margin: 0;
    border: 0;
    cursor: pointer;
}

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

.main-content {
    flex-grow: 1;
}   

/* Header */
.header {
    padding-top: 30px;
    padding-bottom: 30px;
    background-color: var(--header-footer);
}

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

.profile__wrapper {
    display: flex;
    align-items: center;
}

.profile__img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    margin-right: 30px;
}

.profile__heading {
    font-weight: 700;
    margin: 0;
    margin-bottom: 10px;
    font-size: 26px;
}

.profile__prof {
    font-size: 18px;
    color: var(--goldenrod);
    margin: 0;
}

.contact__list {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.contact__item:not(:last-child) {
    margin-right: 15px;
}

.contact__link {
    display: flex;
    align-items: center;
    color: var(--text-color);
    background-color: transparent;
    padding: 5px 15px;
    font-weight: 500;
    border: 3px solid var(--goldenrod);
    border-radius: 8px;
    transition: color 0.4s ease,
    border 0.4s ease;
}

.contact__icon {
    width: 26px;
    height: 26px;
    color: #fff;
    margin-right: 10px;
    transition: color 0.4s ease;
}

.contact__icon:active {
    opacity: 0.6;
}

.mode-btn-wrapper {
    display: flex;
    align-items: center;
}

/* FORM */
.form {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.controll {
    position: relative;
    width: 48px;
    height: 24px;
    background-color: var(--body-bg-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    margin-right: 16px;
    margin-left: 16px;
}

.controller {
    z-index: 555;
    margin-left: 23px;
    width: 25px;
    height: 24px;
    background-color: rgb(3, 3, 95);
    border-radius: 50%;
    transition: transform 0.4s ease;
}

.control-day,
.control-night {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background-color: var(--controller);
    border-radius: 12px;
}

.input-day:checked ~ .controll .control-night,
.input-night:checked ~ .controll .control-day {
    z-index: 5;
}


.input-day:checked ~ .controll .controller {
    transform: translateX(-100%);
}

.control-day:checked .controller {
    transform: translateX(-100%);
}

.label {
    display: flex;
    background-color: transparent;
    cursor: pointer;
    transition: color 0.4s ease;
}


/* Projects */
.projects {
    padding-top: 50px;
    padding-bottom: 50px;
}

.projects__heading {
    text-align: center;
    margin-top: 0;
    margin-bottom: 80px;
    font-size: 36px;
    font-weight: 700;
    color: var(--goldenrod);
}

/* Projects__list */
.projects__list {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    margin-left: -30px;
    margin-bottom: -30px;
}

.project__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 350px;
    padding: 30px;
    background-color: var(--project-item);
    border-radius: 10px;
    margin-left: 30px;
    margin-bottom: 30px;
}

.project__img {
    width: 100%;
    height: 200px;
    margin-bottom: 25px;
    object-fit: cover;
    object-position: center top;
}

.project__img--color {
    object-fit: unset;
}

.project__heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--goldenrod);
    margin-top: 0;
    margin-bottom: 20px;
}

.project__about {
    flex-grow: 1;
    margin-top: 0;
    margin-bottom: 35px;
}

.project__about-link {
    color: rgb(88, 88, 236);
    font-weight: 700;
    text-decoration: underline;
}

.contact__list--project {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.project__link {
    padding: 5px 30px;
    background-color: var(--green);
    color: var(--text-color);
    border-radius: 5px;
    border: 2px solid transparent;
    transition: border 0.4s ease;
}

.project__link:hover {
    border: 2px solid var(--goldenrod);
}

/* Footer */
.footer {
    padding-top: 30px;
    padding-bottom: 30px;
    background-color: var(--header-footer);
}

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

.footer__logo-link {
    display: flex;
    flex-shrink: 0;
    margin-right: 25px;
    font-size: 32px;
    font-weight: 700;
    color: var(--goldenrod);
}

.footer__logo-link:hover {
    opacity: 0.6;
}

.footer__logo {
    width: 139px;
    height: 20px;
    transition: 0.4s ease opacity;
}

.contact__item--footer:not(:last-child) {
    margin-right: 30px;
}

.contact__telegram-link {
    display: flex;
    align-items: center;
    color: var(--text-color);
    padding: 5px 15px;
    font-weight: 500;
    border: 3px solid var(--text-color);
    border-radius: 8px;
    transition: color 0.4s ease,
    border 0.4s ease;
}

.contact__telegram-link:hover {
    border: 3px solid var(--goldenrod);
    color: var(--goldenrod);
}

.telegram-name {
    margin-left: 10px;
}

/* Content */
.content {
    padding-top: 80px;
    padding-bottom: 120px;
}

.back-btn {
    display: inline-flex;
    padding: 5px 20px;
    align-items: center;
    background-color: var(--project-item);
    border: 1px solid var(--text-color);
}

.back-btn-icon {
    color: var(--text-color);
    margin-right: 10px;
}

.back-btn-text {
    color: var(--text-color);
}

.content__heading {
    text-align: center;
    margin-top: 0;
    margin-bottom: 80px;
    color: var(--goldenrod);
}

.content__wrapper {
    display: flex;
    flex-wrap: wrap;
}

.content__about {
    width: 400px;
    margin-right: 50px;
    padding-top: 40px;
}

.content__item-title {
    float: left;
    font-weight: 700;
    margin-right: 4px;
    padding: 4px 0;;
    font-size: 20px;
    color: var(--goldenrod);
}

dd {
    padding: 4px 0;
}

.content__item-list-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--goldenrod);
    margin-top: 0;
    margin-bottom: 10px;
}

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

.content__item-heading {
    font-weight: 500;
    font-size: 18px;
    color: var(--goldenrod);
    margin-right: 10px;
}

.content__img {
    width: 660px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

@media only screen and (max-width: 1150px) {
    .projects__list {
        justify-content: center;
    }

    /* Content */
    .content {
        padding-bottom: 80px;
    }

    .content__about {
        width: 100%;
        margin-bottom: 40px;
        margin-right: 0;
    }

    .content__heading {
        margin-bottom: 40px;
    }

    .content__about-wrapper {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .content__left {
        width: 300px;
        margin-right: 10px;
    }

    .content__img {
        width: 100%;
    }
}

@media only screen and (max-width: 900px) {
    .contact__link-icon {
        display: none;
    }

    .contact__telegram-link-icon {
        display: none;
    }

    .telegram-name {
        margin-left: 0;
    }
}

@media only screen and (max-width: 780px) {
    .profile__img {
        display: none;
    }

    .profile__prof {
        display: none;
    }

    .profile__heading {
        margin-bottom: 0;
    }

    .contact__item-email {
        display: none;
    }
}

@media only screen and (max-width: 656px) {
    .content {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .content__heading {
        margin-bottom: 0;
    }
}

@media only screen and (max-width: 600px) {
    .contact__profile {
        padding: 0;
        border: none;
    }

    .contact__telegram-link {
        padding: 0;
        border: none;
    }

    .telegram-name {
        display: none;
    }
    
    .contact__link-icon {
        display: block;
    }

    .contact__telegram-link-icon {
        display: block;
    }
}

@media only screen and (max-width: 500px) {
    *:focus {
        outline: none;
    }

    .profile__name {
        display: none;
    }

    .projects__heading {
        margin-bottom: 50px;
    }

    .project__item {
        padding: 20px;
    }
}

@media only screen and (max-width: 390px) {
    .header__contact-list {
        display: none;
    }

    .contact__item-tel {
        display: none;
    }

    .project__about {
        margin-bottom: 16px;
    }

    .contact__list--project {
        margin-bottom: 10px;
    }
}

@media only screen and (max-width: 340px) {
    .contact__icon {
        display: none;
    }
}

