@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Poppins:wght@400;500;700&display=swap");
@import "./reset.css";
@import "./project-page.css";

/* 
font-family: 'DM Sans', sans-serif; 
font-family: 'Poppins', sans-serif; 
 */
/* *{
    border: 1px solid red;
} */

:root {
    --blackpure: #000;
    --black: #171718;
    --black-border: #26292d;
    --white: #fff;
    --purple: #5c62ec;

    --text-color: var(--black);
    --dark-bg: var(--black);
    --dark-border: var(--black-border);
    --header-text: var(--white);
    --accent: var(--purple);
    
    /* Light mode */
    --page-bg: var(--white);
    --text-color: var(--black);
    --project-card-bg: var(--white);
    --project-card-text: var(--black);
    --box-shadow: 0px 5px 35px rgba(0, 0, 0, 0.25)

}

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

html,
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "DM Sans", sans-serif;
    letter-spacing: -0.5px;
    /* light mode */
    background-color: var(--page-bg);
    color: var(--text-color);
}
/* img {
    width: 100%;
    max-width: 100%;
} */
.container {
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 70px 0;
}

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

.title-2 {
    font-size: 40px;
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 700;
}
/*-------- 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 {
    margin-right: auto;
    color: var(--header-text);
    font-size: 24px;
    font-family: "Poppins", sans-serif;
}
.logo strong {
    font-weight: 700;
}
.nav-list {
    display: flex;
    flex-wrap: wrap;
    row-gap: 10px;
    align-items: center;
    column-gap: 40px;
    font-size: 16px;
    font-weight: 500;
    font-family: "Poppins", sans-serif;
}

.nav-list__link {
    color: var(--header-text);
    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: "";
    position: absolute;
    top: 100%;
    left: 0;
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--accent);
}
/*---- Dark mode btn -----*/
.dark-mode-btn {
    order: 1;
    position: relative;
    display: flex;
    justify-content: space-between;
    width: 51px;
    height: 26px;
    background-color: #272727;
    border-radius: 50px;
    padding: 5px;
}
.dark-mode-btn::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--white);
    transition: left 0.2s ease-in;
}
.dark-mode-btn--active::before {
    left: 26px;
}
.dark-mode-btn__icon {
    position: relative;
    z-index: 9;
}

/*---- HEADER -----*/
.header {
    padding: 40px 0;
    min-height: 695px;
    background-color: var(--dark-bg);
    background-image: url("../img/header_bg.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: auto;
    color: var(--header-text);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.header__wrapper {
    max-width: 660px;
    padding: 0 15px;
}
.header__title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
}
.header__title strong {
    font-size: 60px;
    font-weight: 700;
}
.header__title em {
    font-style: normal;
    color: var(--accent);
}
.header__text {
    font-size: 18px;
    line-height: 24px;
    margin-bottom: 40px;
}

/* 
все последующие Р кроме первой, если будут, получать отступ,
чтобы ничего не склеелось и не сломалось
 */
.header__text p + p {
    margin-top: 0.5em;
}
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    background-color: var(--accent);
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.15px;
    transition: opacity 0.2s ease-in;
}
.btn:hover {
    opacity: 0.8;
}
.btn:active {
    position: relative;
    top: 1px;
}

/* projects */
.projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    column-gap: 30px;
    row-gap: 30px;
    
}
.project {
    max-width: 370px;
    background-color: var(--project-card-bg);
    box-shadow: var(--box-shadow);
    border-radius: 10px;
    cursor: pointer;
}
.project__img {
    border-radius: 10px;
    border: 1px solid var(--black);
}
.project__title {
    padding: 15px 20px 25px;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    color: var(--project-card-text);
}
/* Кнопки для переключения списка проэктов */
.projects__filter{
    display: flex;
    column-gap: 40px;
    row-gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.projects__filter--item {
    cursor: pointer;
    padding: 10px 20px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    font-weight: 700;
    background-color: var(--accent);
    color: var(--white);
    box-shadow: var(--box-shadow);
    transition: opacity 0.2s ease-in;
}
.projects__filter--item:hover {
    opacity: 0.8;
}
.projects__filter--item:active {
    position: relative;
    top: 1px;
}
.projects__filter--item--active{
    background-color: #2e34f3;
}
/* модальное окно карточек */
.project__modal{
    position: fixed;
    display: none;
    flex-direction: column;
    row-gap: 30px;
    justify-content: center;
    align-items: center;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: var(--project-card-bg);
    z-index: 9;
}
.project__modal--open{
    display: flex;
    padding: 0 15px;
    font-size: 24px;
    font-weight: 500;
}
.project__modal--img{
    /* max-width: 700px; */
    box-shadow: var(--box-shadow);
    border-radius: 5px;
    /* padding: 0 15px; */
}
.project__modal--close{
    position: absolute;
    top: 5vh;
    right: 10%;
    width: 50px;
    height: 50px;
    /* background-color: #fff; */
    cursor: pointer;
   
}
.project__modal--close:hover::before{
    transform: rotate(60deg);
    background-color: red;
    
}
.project__modal--close:hover::after{
    transform: rotate(-60deg);
    background-color: red;
}
.project__modal--close::before{
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 50%;
    width: 2px;
    background-color: var(--text-color);
    transform: rotate(50deg);
    transition: transform .3s;
}
.project__modal--close::after{
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--text-color);
    transform: rotate(-50deg);
    transition: transform .3s;
}
.project__modal--btn {
    display: flex;
    column-gap: 30px;
}
/* Content list */
.content-list {
    max-width: 570px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    row-gap: 40px;
}
.content-list a {
    color: var(--accent);
}
.content-list__item {
    font-size: 18px;
    line-height: 1.5;
}
.content-list__item p + p {
    margin-top: 0.5em;
}

/* certificates__list */
.certificates__list{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 25px;
    row-gap: 25px;
}
.certificates__list img{
    max-width: 400px;
    width: 100%;
}
/* footer */
.footer {
    background-color: var(--dark-bg);
    padding: 60px 0 50px;
    color: var(--header-text);
    margin-top: auto;
}
.footer__wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 27px;
}
.social {
    display: flex;
    column-gap: 30px;
    align-items: center;
}
.copyright {
    font-size: 16px;
}
@media (max-width: 1199px) {
    .projects{
        justify-content: center;
    }
}
@media (max-width: 620px) {
    /* header */
    .header {
        min-height: unset;
    }
    .header__title {
        font-size: 30px;
    }
    .header__title strong {
        font-size: 40px;
    }
    /* nav */
    .nav-row {
        justify-content: space-between;
    }
    .dark-mode-btn {
        order: 0;
    }
    /* general */
    .section {
        padding:  40px 0;
    }
    .title-1 {
        margin-bottom: 30px;
        font-size: 40px;
    }
    .title-2 {
        margin-bottom: 10px;
        font-size: 30px;
    }
    /* project */
    .project__modal--open{
        font-size: 18px;
        font-weight: 500;
    }
    .project__title {
        font-size: 22px;
    }
    .project-details_desc {
        margin-bottom: 20px;
        font-size: 22px;
    }
    /* footer */
    .footer {
        padding: 40px 0 30px;
    }
    .social__item {
        width: 20px;
    }
    /* content */
    .content-list {
        row-gap: 20px;
    }
    .content-list__item {
        font-size: 16px;
    }
/* filter btn */
    .projects__filter{
        flex-direction: column;
    }
}