@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;
    position: relative; 
    display: inline-block;
}

.nav-list__link:hover{
    opacity: 0.8;
}

.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: 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: 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; }
}

.email-link {
    color: var(--colKnop);
}

.title-2 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    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;
    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;
}

.dark .content-list__item {
    background-color: #32271B;
    color: #fff;
}

.dark .title-2, .dark .skills-list li {
    color: #fff;
}

.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;
}

.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;
}

/* --- МОДАЛЬНОЕ ОКНО --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--page-bg);
    color: var(--text-color);
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--colRamka);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-color);
}

.modal-title {
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
    color: var(--colKnop);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-container input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--colKnop);
}

.checkbox-text a {
    color: var(--colKnop);
    text-decoration: underline;
}

.legal-doc {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--colRamka);
    border-radius: 10px;
    font-size: 13px;
    max-height: 200px;
    overflow-y: auto;
}

.dark .legal-doc {
    background-color: rgba(255, 255, 255, 0.05);
}

.legal-doc h3 {
    font-size: 15px;
    margin-bottom: 10px;
    color: var(--colKnop);
}

.modal-footer {
    margin-top: 30px;
    text-align: center;
}

.btn-send-email {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--colKnop);
    color: var(--bgOsnov);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: 0.3s;
}

.btn-send-email[disabled] {
    background-color: #ccc;
    color: #888;
    pointer-events: none;
    cursor: not-allowed;
}

.btn-send-email:not([disabled]):hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Стили формы обратной связи */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--colRamka);
    background-color: var(--page-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group textarea {
    height: 100px;
    resize: none;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--colKnop);
    box-shadow: 0 0 5px rgba(255, 138, 0, 0.3);
}

.btn-send-email {
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 12px 30px;
    background-color: var(--colKnop);
    color: var(--bgOsnov);
    border-radius: 8px;
    font-weight: 700;
    transition: 0.3s;
}

.btn-send-email[disabled] {
    background-color: #ccc !important;
    color: #888 !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* Добавьте этот блок ниже */
.btn-outline:hover img {
    filter: brightness(0) invert(1);
    transition: 0.3s; /* чтобы цвет менялся плавно */
}

