/* === Базовые стили === */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #0b1120;
    color: #f0f4ff;
    line-height: 1.6;
    overflow-x: hidden;
}


/* Контейнер */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}


/* === Хедер === */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: rgba(10, 16, 30, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
    font-size: 1.6rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 1px;
}

.nav a {
    margin-left: 25px;
    padding: 8px 12px;
    color: #f0f4ff;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    border-radius: 8px;
}

.nav a:hover,
.nav a:focus {
    background-color: #1b2a4e;
    color: #5ac8fa;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}


/* === Hero === */


/* В секцию hero — выравнивание текста и аватара */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 60px 0;
}


/* Блок с аватаркой */


/* в style.css */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 60px 0;
}

.hero-avatar {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 250px;
}

.hero-avatar img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 4px solid #5ac8fa;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-avatar {
        margin-top: 30px;
    }
}


/* Адаптив для мобильных устройств */

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-avatar {
        margin-top: 30px;
    }
}


/* === Обо мне === */

.about-me {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 80px 0;
    gap: 40px;
}

.about-photo {
    flex: 1;
    text-align: center;
}

.about-photo img {
    width: 85%;
    max-width: 380px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.about-text {
    flex: 1;
    max-width: 550px;
}

.about-text h2 {
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 15px;
}

.about-text p {
    font-size: 1.1rem;
    color: #bfc8e5;
}


/* === Навыки === */

.skills-section {
    padding: 80px 0;
    background: var(--skills-bg);
    border-radius: 30px;
    margin: 60px 0;
    color: var(--text-color);
    transition: background-color 0.5s ease, color 0.5s ease;
}

.skills-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: var(--text-color);
}

.skills-container {
    max-width: 800px;
    margin: 0 auto;
}

.skill {
    margin-bottom: 25px;
}

.skill-label {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.skill-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #5ac8fa, #72e1ff);
    width: var(--skill-percent, 0);
    border-radius: 10px;
    transition: width 2s ease-in-out;
}


/* === Проекты === */

.projects-section {
    padding: 80px 0;
}

.projects-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: #111b33;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 20px 20px 10px;
    color: #fff;
    font-size: 1.3rem;
}

.project-card p {
    padding: 0 20px 20px;
    color: #bfc8e5;
    font-size: 1rem;
}


/* === Контакты === */

.contacts-section {
    padding: 80px 20px;
    text-align: center;
    background: #0d1730;
    border-radius: 30px;
}

.contacts-section h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.contacts-info p {
    font-size: 1.1rem;
    color: #bfc8e5;
}

.contacts-info a {
    color: #5ac8fa;
    text-decoration: none;
}

.socials a {
    margin: 0 10px;
    font-size: 1.8rem;
    color: #5ac8fa;
    transition: color 0.3s;
}

.socials a:hover {
    color: #72e1ff;
}


/* === Форма === */

.contact-form {
    max-width: 600px;
    margin: 40px auto 0;
    text-align: left;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid #5ac8fa;
}


/* === Футер === */

.footer {
    text-align: center;
    padding: 25px;
    font-size: 0.95rem;
    color: #bfc8e5;
    background: #0b1120;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


/* === Адаптивность === */

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .about-me {
        flex-direction: column-reverse;
        text-align: center;
    }
    .nav {
        display: none;
        flex-direction: column;
        background: #0d1730;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
    }
    .nav.show {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
}


/* стиль для кнопки "Ввести имя" */

.btn-secondary {
    background: linear-gradient(135deg, #5ac8fa, #72e1ff);
    color: #0b1120;
    padding: 14px 28px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(90, 200, 250, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    pointer-events: none;
}

.btn-secondary:hover::before {
    top: -20%;
    left: -20%;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(90, 200, 250, 0.6);
}


/* === Переключатель темы === */

body.light {
    background-color: #f4f6ff;
    color: #1a1a1a;
}

body.light .header {
    background: rgba(240, 240, 255, 0.95);
    color: #000;
}

body.light .project-card {
    background: #ffffff;
    color: #222;
}

body.light a {
    color: #0077cc;
}

body {
    transition: background-color 0.5s, color 0.5s;
}


/* === Гамбургер === */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}


/* крестик при открытом меню */

.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}


/* Адаптив — на мобиле показываем гамбургер */

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0d1730;
        padding: 20px 0;
    }
    .nav.open {
        display: flex;
    }
}

html {
    scroll-behavior: smooth;
}


/* === Кнопка "Наверх" === */

.scroll-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5ac8fa, #72e1ff);
    color: #0b1120;
    font-size: 1.5rem;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 8px 20px rgba(90, 200, 250, 0.4);
    z-index: 1000;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(90, 200, 250, 0.6);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}