@import "./reset.css";
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Poppins:wght@400;500;700&display=swap');

/*
  font-family: "Poppins", sans-serif;
  font-family: "DM Sans", sans-serif;
 */

:root {
    --black: #171718;
    --black-border: #26292D;
    --white: #fff;
    --purple: #5C62EC;


    --dark-bg: var(--black);
    --dark-border: var(--black-border);
    --header-text: var(--white);
    --accent-color: var(--purple);


    /* Light mode*/

    --page-bg: var(--white);
    --text-color: var(--black);
    --title-1: var(--accent-color);
    --project-card-bg: var(--white);
    --project-card-text: var(--black);
    --box-shadow: 0 5px 35px rgba(0, 0, 0, 0.25);
}

.dark {
    /* Dark mode */
    --page-bg: #252526;
    --text-color: var(--white);
    --title-1: var(--white);
    --project-car-bg: var(--black);
    --project-card-text: var(--white);
    --box-shadow: 0 5px 35px rgba(0, 0, 0, 0.8);
}

html, body {
    /* Light mode */
    background-color: var(--page-bg);
    color: var(--text-color);

    font-family: "DM Sans", sans-serif;
    letter-spacing: -0.5px;
    min-height: 100%;
}


.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Nav */

.nav {
    padding: 20px 0;
    border-bottom: 1px solid var(--dark-border);
    background-color: var(--dark-bg);
    color: var(--header-text);
    letter-spacing: normal;
}

.nav-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    column-gap: 30px;
    row-gap: 20px;
    flex-wrap: wrap;
}

.logo {
    color: var(--header-text);
    font-size: 24px;
    font-family: "Poppins", sans-serif;
    margin-right: auto;
}

.logo strong {
    font-weight: 700;
}

.nav-list {
    display: flex;
    align-items: center;
    column-gap: 40px;
    flex-wrap: wrap;
    row-gap: 10px;
}

.nav-list__link {
    color: var(--header-text);
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.2s ease-in;
}

.nav-list__link:hover {
    opacity: 0.8;
}

.nav-list__link--active {
    position: relative;
}

.nav-list__link--active::before {
    content: "";
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--accent-color);
    position: absolute;
    top: 100%;
    left: 0;
}

/* Dark mode btn */

.dark-mode-btn {
    order: 1;
    background-color: #272727;
    width: 51px;
    height: 26px;
    display: flex;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    align-items: center;
    padding: 5px;
    justify-content: space-between;

}

.dark-mode-btn::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: var(--white);
    border-radius: 50%;
    left: 1px;
    top: 1px;
    display: block;
    transition: transform 0.3s;
}

.dark-mode-btn--active::before {
    transform: translateX(26px);
}

.dark-mode-btn__icon {
    position: relative;
    z-index: 1;
}

.dark-mode-btn__icon {
    position: relative;
    z-index: 1;
}


/* Header */

.header {
    background-color: var(--dark-bg);
    background-image: url("../image/header-bg.png");
    background-repeat: no-repeat;
    background-size: auto;
    background-position: center;
    color: var(--header-text);
    min-height: 696px;
    padding: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: none;
}

.header__wrapper {
    max-width: 720px;
    padding: 0 15px;

}

.header__title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
}

.header__title strong {
    font-size: 60px;
}

.header__title strong em {
    color: var(--accent-color);
    font-style: normal;
}

.header__text {
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    margin-bottom: 40px;
}

.header__text p + p {
    margin-top: 0.5em;
}

/* Btn */

.btn {
    background-color: var(--accent-color);
    display: inline-block;
    height: 48px;
    padding: 12px 28px;
    border-radius: 5px;
    color: var(--white);
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.01em;
    font-weight: 500;
    transition: 0.2s ease transform;
}

.btn:hover {
    transform: scale(1.1);
}

.btn:active {
    position: relative;
    top: 1px;
}

/* Btn-outline */

.btn-outline {
    color: var(--black);
    background-color: var(--white);
    padding: 12px 20px;
    max-width: 615px;
    border: 1px solid var(--text-color);
    display: flex;
    height: 48px;
    border-radius: 5px;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.01em;
    font-weight: 500;
    transition: 0.2s ease transform;
    column-gap: 10px;
    align-items: center;
    justify-content: center;
}

.btn-outline:hover {
    transform: scale(1.1);
}

.btn-outline:active {
    position: relative;
    top: 1px;
}

/* General */

.section {
    padding: 70px 0;
    background-color: var(--page-bg);
    flex-grow: 1;
}

.title-1 {
    color: var(--title-1);
    font-weight: 700;
    font-size: 60px;
    line-height: 1.3;
    text-align: center;
    margin-bottom: 60px;
    flex: 1 1 auto;
}

/* Projects */

.projects {
    display: flex;
    row-gap: 30px;
    column-gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}


.project {
    max-width: 370px;
    background-color: var(--project-car-bg);
    box-shadow: var(--box-shadow);
    border-radius: 10px;
    transition: 0.2s ease transform;
}

.project:hover {
    transform: scale(1.1);
}

.project:active {
    position: relative;
    top: 1px;
}

.project__image {
    border-radius: 10px;
    max-width: 100%;
}

.project__title {
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    padding: 15px 20px 25px;
    color: var(--text-color);
}

/* Project Page */

.project__wrapper {
    max-width: 866px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}


.project__img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    transition: 0.2s ease transform;
}

.project__img:hover {
    transform: scale(1.1);
}

.project__description {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--project-card-text);
    margin-bottom: 30px;
}

/* Pages -  skills/contacts */

.content__wrapper {
    background-color: var(--page-bg);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 571px;

}

.content__title {
    margin-bottom: 40px;
}

.content-list {
    display: flex;
    flex-direction: column;
    row-gap: 40px;
}

.content-list a {
    color: var(--accent-color);
}

.title-2 {
    color: var(--text-color);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.3;
    margin-bottom: 20px;
}

.content-list__item p + p {
    margin-top: 0.5em;
}

.content__description {
    color: var(--text-color);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
}

/* Footer */

.footer {
    background-color: var(--dark-bg);
    padding: 60px 0 50px 0;
    color: var(--white);
}

.footer__wrapper {
    max-width: 340px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    row-gap: 27px;
    align-items: center;
}

.social__list {
    column-gap: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 20px;
}

.social__item:hover {
    opacity: 0.8;
}

.copyright {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 620px) {
    .header {
        min-height: unset;
    }

    .header__title {
        font-size: 30px;
    }

    .header__title strong {
        font-size: 40px;
    }

    .section {
        padding: 40px 0;
    }

    .title-1 {
        font-size: 40px;
        margin-bottom: 30px;
    }

    .nav-row {
        justify-content: space-between;
    }

    .dark-mode-btn {
        order: 0;
    }

    .content__title {
        margin-bottom: 25px;
    }

    .project__title {
        font-size: 22px;
    }

    .project__description {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .footer {
        padding: 40px 0 30px 0;
    }

    .social__item {
        width: 28px;
    }

    .social__list {
        column-gap: 20px;
    }

    .footer__wrapper {
        row-gap: 20px;
    }

    .title-2 {
        font-size: 30px;
        margin-bottom: 10px;
    }

    .content-list {
        row-gap: 20px;
    }

    .content__description {
        font-size: 16px;
    }

}

