@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;1,100&family=Comfortaa:wght@400;500&family=Fira+Sans:wght@900&family=IBM+Plex+Serif&family=Mulish:wght@200;700&family=Open+Sans:ital,wght@0,400;0,700;1,300;1,400&family=Russo+One&display=swap');
@import "reset.css";

:root{
    --bgOsnov: #261D13;
    --colKnop: #FF8A00;
    --colText: #fff;
    --colRamka: #6b5c45;
    --dgOs: #32271B;

    --page-bg: var(--colText);
    --text-color: var(--bgOsnov);
    --box-shadow: 0px 5px 35px rgba(0, 0, 0, 0.25);
}

.dark{
    --page-bg: var(--dgOs);
    --text-color: var(--colText);
    --box-shadow: 0px 5px 35px rgba(118, 98, 76, 0.3);
}

* {
    box-sizing: border-box;
}

html, body{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Open Sans', sans-serif;
    letter-spacing: -0.5px;
    background-color: var(--page-bg);
    color: var(--text-color);
}

body{
    margin: 0;
}

a{
    color: inherit;
    text-decoration: none;
}

img{
    display: block;
    max-width: 100%;
    height: auto;
}

.container{
    margin: 0 auto;
    padding: 0 15px;
    max-width: 1200px;
}

.section{
    padding: 70px 0;
    background-color: var(--page-bg);
    color: var(--text-color);
}

.nav{
    padding: 30px 0;
    border-bottom: 1px solid var(--colRamka);
    background-color: var(--bgOsnov);
    color: #fff;
    letter-spacing: normal;
}

.nav-row{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    column-gap: 40px;
    row-gap: 20px;
    flex-wrap: wrap;
}

.logo{
    margin-right: auto;
    display: inline-flex;
}

.nav-list{
    display: flex;
    flex-wrap: wrap;
    row-gap: 10px;
    align-items: center;
    column-gap: 30px;
    font-size: 18px;
    font-weight: 500;
}

.nav-list__link{
    color: var(--colText);
    transition: opacity 0.2s ease-in;
}

.nav-list__link:hover{
    opacity: 0.8;
}

.nav-list__link {
    color: var(--colText);
    transition: opacity 0.2s ease-in;
    position: relative; /* Обязательно, чтобы полоска привязалась к ссылке */
    display: inline-block;
}

.nav-list__link--active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 100%; 
    display: block;
    width: 100%;
    height: 2px; 
    background-color: var(--colKnop);
}

.dark-mode-btn{
    order: 9;
    position: relative;
    display: flex;
    justify-content: space-between;
    width: 70px;
    height: 40px;
    padding: 5px;
    border-radius: 50px;
    background-color: var(--colRamka);
}

.dark-mode-btn::before{
    content: "";
    position: absolute;
    top: 7px;
    left: 7px;
    display: block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: var(--colText);
    transition: left 0.3s ease-in;
}

.dark-mode-btn__icon{
    position: relative;
    z-index: 2;
}

.dark-mode-btn--active::before{
    left: 37.8px;
}

.header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-image: url(images/5.png);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-color: var(--bgOsnov);
    color: var(--colText);
    text-align: center;
    animation: headerDown 12s linear infinite;
}

@keyframes headerDown {
    0% {
        background-position: center top;
    }
    100% {
        background-position: center bottom;
    }
}


.header .container {
    position: relative;
    z-index: 2;
}

.header__wrapper {
    max-width: 660px;
    margin: 0 auto;
    padding: 0 15px;
}


.header__title{
    font-family: 'IBM Plex Serif', serif;
    font-size: 40px;
    line-height: 1.4;
    margin-bottom: 20px;
}

.header__title strong{
    font-size: 50px;
    font-weight: 700;
}

.header__title em{
    font-style: normal;
    color: var(--colKnop);
}

.header__text{
    font-size: 16px;
    margin-bottom: 40px;
}

.header__decor{
    position: absolute;
    right: 20px;
    top: 50%;
    width: 320px;
    height: auto;
    transform: translateY(-50%);
    animation: decorFloat 5s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

@keyframes decorFloat{
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(-18px); }
}

.btn{
    display: inline-block;
    border-radius: 5px;
    background-color: var(--colKnop);
    color: var(--bgOsnov);
    padding: 12px 30px;
    font-size: 18px;
    font-weight: 500;
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

.btn:hover{
    opacity: 0.75;
}

.btn:active{
    transform: translateY(1px);
}

.titel-1{
    margin-bottom: 60px;
    font-size: 43px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--colKnop);
    text-align: center;
}

.pojects{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    margin-bottom: 50px;
    list-style: none;
    padding: 0;
}

.project{
    flex: 1 1 280px;
    max-width: 370px;
    display: flex;
}
.pojects { /* Твоё название */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
    list-style: none;
    padding: 0;
}

.project {
    display: flex;
    max-width: 370px;
    width: 100%;
    margin: 0 auto;
}

.project a {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--colText);
    box-shadow: var(--box-shadow);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

.projact__img { /* Твоё название */
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.project__titel {
    margin: 0;
    margin-top: auto; 
    padding: 15px 20px 25px;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
    color: var(--bgOsnov);
}

.footer {
    padding: 160px 0 150px;
    background-color: var(--bgOsnov);
    color: var(--colKnop);
}

.footer__wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 27px;
}

.social {
    display: flex;
    justify-content: center;
    column-gap: 30px;
    padding: 0;
    margin: 0;
}

.email {
    font-size: 16px;
    margin-top: 10px;
    text-align: center;
    line-height: 1.4;
}



@media (max-width: 750px){
    .nav-row{
        justify-content: space-between;
    }

    .dark-mode-btn{
        order: 0;
    }
}

@media (max-width: 650px){
    .header{
        min-height: unset;
        padding: 40px 0;
    }

    .header__title{
        font-size: 25px;
    }

    .header__title strong{
        font-size: 35px;
    }

    .header__decor{
        width: 180px;
        right: 0;
        opacity: 0.35;
    }

    .section{
        padding: 40px 0;
    }

    .titel-1{
        margin-bottom: 30px;
        font-size: 28px;
    }

   .pojects {
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    .project {
        max-width: 100%;
    }

    .projact__img{
        height: 220px;
    }

    .project__titel{
        font-size: 16px;
    }

    .footer{
        padding: 40px 0 30px;
    }

    .footer__wrapper{
        row-gap: 20px;
    }

    .social{
        column-gap: 20px;
    }

    .email{
        font-size: 12px;
        margin-top: 5px;
    }
}

@media (max-width: 650px) {
    .footer {
        padding: 40px 0 30px;
    }

    .footer__wrapper {
        row-gap: 16px;
    }

    .social {
        column-gap: 20px;
    }

    .social__item img {
        width: 20px;
        height: auto;
    }

    .email {
        display: block;
        font-size: 12px;
        margin-top: 0;
        text-align: center;
        word-break: break-word;
        max-width: 100%;
    }
}

@media (max-width: 400px){
    .header__title{
        font-size: 20px;
    }

    .header__title strong{
        font-size: 25px;
    }

    .titel-1{
        margin-bottom: 25px;
        font-size: 20px;
    }

    .pojects{
        gap: 16px;
    }

    .project{
        max-width: 340px;
    }

    .projact__img{
        height: 200px;
    }

    .project__titel{
        font-size: 14px;
    }

     .footer {
        padding: 40px 0 30px;
    }

    .footer__wrapper {
        row-gap: 16px;
    }

    .social {
        column-gap: 20px;
    }

    .social__item img {
        width: 20px;
        height: auto;
    }

    .email {
        display: block;
        font-size: 12px;
        margin-top: 0;
        text-align: center;
        word-break: break-word;
        max-width: 100%;
    }

    .email p {
    margin: 0;
}
}

.email-link {
    color: var(--colKnop);
}

/* Заголовок внутри карточки */
.title-2 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase; /* Делает буквы заглавными как на фото 4 */
    margin-bottom: 20px;
    text-align: left; /* Выравнивание по левому краю */
    color: var(--bgOsnov);
}
/* Сетка карточек */
.content-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Автоматические колонки */
    gap: 30px;
    justify-content: center;
    align-items: stretch;
}

.skills-list li {
    list-style: disc;
}

.project-details {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.project-details__cover {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 30px;
    border-radius: 12px;
}

.project-details__desc {
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border: 1px solid var(--colKnop);
    border-radius: 8px;
    text-decoration: none;
    color: var(--colKnop);
    font-weight: 500;
    transition: 0.2s ease;
}


.btn-outline:hover {
    background-color: var(--colKnop);
    color: #fff
}

.btn-outline:hover img {
    filter: brightness(0) invert(1);
}
/* Сетка для навыков */
.content-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
}

/* Стили самой карточки */
.content-list__item {
    background-color: #ffffff; /* Принудительно белый цвет */
    color: #1a1a1a;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* Заголовок внутри карточки */
.title-2 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #261D13;
}

/* Список навыков */
.skills-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.skills-list li {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #444;
}

/* Чтобы в темной теме карточки тоже были видны (опционально) */
.dark .content-list__item {
    background-color: #32271B;
    color: #fff;
}
.dark .title-2, .dark .skills-list li {
    color: #fff;
}
