@charset "utf-8";

@font-face {
    font-family: "Cygre";
    src: local("Cygre Regular"),
         local("Cygre-500"),
         url("font/Cygre-Regular.woff2") format("woff2"),
         url("font/Cygre-Regular.woff") format("woff"),
         url("font/Cygre-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 500;
}

@font-face {
    font-family: "Cygre";
    src: local("Cygre Light"),
         local("Cygre-400"),
         url("font/Cygre-Light.woff2") format("woff2"),
         url("font/Cygre-Light.woff") format("woff"),
         url("font/Cygre-Light.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cygre', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    background: #F1F3EE;
    color: #0E1822;
    line-height: 1.5;
}

/* ============================================
   ТИПОГРАФИКА - ОСНОВНЫЕ СТИЛИ ТЕКСТА
   ============================================ */

.logo-link {
    text-decoration: none;
}

.logo {
    font-size: 32px;
    color: #F50004;
}

.nav-link {
    font-size: 32px;
    color: #F50004;
    font-family: inherit;
}

.caption-container {
    font-size: 32px;
    color: #F50004;
}

.caption-left,
.caption-right {
    text-transform: lowercase;
}

.section-title {
    font-size: 64px;
    color: #F50004;
    font-family: 'Cygre';
    font-weight: 500;
}

.info-title {
    font-size: 32px;
    color: #F50004;
    font-weight: 500;
}

.skills-list {
    list-style: none;
}

.edu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-red-text {
    font-size: 32px;
    color: #F50004;
    display: inline-block;
    white-space: nowrap;
    transition: text-decoration 0.2s ease;
}

.contact-small-text {
    font-size: 20px;
}

.contact-text {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.contact-text:hover {
    opacity: 0.7;
}

.contact-text:hover .contact-red-text {
    text-decoration: underline;
}

.contact-text:hover .contact-icon {
    transform: scale(1.1);
}

.clickable-contact {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.clickable-contact:hover {
    opacity: 0.7;
}

.clickable-contact:hover .contact-red-text {
    text-decoration: underline;
}

.clickable-contact:hover .contact-icon {
    transform: scale(1.1);
}

.contact-icon {
    width: 32px;
    height: 32px;
    display: inline-block;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* ============================================
   ХЕДЕР
   ============================================ */

.burger,
.overlay {
    display: none;
}

.header {
    max-width: 1720px;
    padding-left: 60px;
    padding-right: 60px;
    margin: 0 auto;
    padding-top: 48px;
    padding-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav {
    display: flex;
    gap: 64px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    display: inline-block;
}

.nav-link:hover {
    text-decoration: underline;
    opacity: 0.7;
}

.container {
    max-width: 1720px;
    padding-left: 60px;
    padding-right: 60px;
    margin: 0 auto;
}

/* ============================================
   КНОПКА "НАВЕРХ"
   ============================================ */

.scroll-to-top-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 80px;
    margin-bottom: 80px;
}

.scroll-to-top {
    font-size: 24px;
    color: #F50004;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Cygre', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: opacity 0.2s ease;
    padding: 0;
    font-weight: 400;
}

.scroll-to-top:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* ============================================
   ГЛАВНАЯ СТРАНИЦА - HERO
   ============================================ */

.hero {
    margin-top: 60px;
    margin-bottom: 120px;
    display: flex;
    justify-content: center;
}

.hero-flex {
    display: flex;
    justify-content: center;
    width: 100%;
}

.hero-center {
    text-align: center;
}

.name-image {
    width: 100%;
    max-width: 800px;
    max-height: 104px;
    height: auto;
    display: block;
    margin: 0 auto 16px auto;
}

.hero-image-container {
    width: 100%;
}

.hero-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.caption-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* ============================================
   ГЛАВНАЯ СТРАНИЦА - ОБО МНЕ
   ============================================ */

.about-section {
    margin-top: 120px;
    margin-bottom: 120px;
}

.about-container {
    max-width: 1600px;
    margin: 0 auto;
}

.about-flex {
    display: flex;
    gap: 40px;
    justify-content: space-between;
    align-items: flex-start;
}

.about-description {
    flex: 1;
    max-width: 520px;
}

.about-title {
    font-size: 32px;
    color: #F50004;
    margin-bottom: 24px;
    font-weight: 500;
}

.about-text {
    font-size: 20px;
    line-height: 1.5;
}

.about-hard {
    flex: 1;
    max-width: 235px;
}

.about-soft {
    flex: 1;
    max-width: 235px;
}

.about-edu {
    flex: 1;
    max-width: 235px;
}

.about-hard .info-title,
.about-soft .info-title,
.about-edu .info-title {
    font-size: 32px;
    color: #F50004;
    margin-bottom: 16px;
}

.about-hard .skills-list li,
.about-soft .skills-list li {
    font-size: 20px;
    margin-bottom: 8px;
}

.edu-list li {
    font-size: 20px;
    margin-bottom: 8px;
}

/* ============================================
   ГЛАВНАЯ СТРАНИЦА - НАПРАВЛЕНИЯ
   ============================================ */

.projects-section {
    margin-top: 120px;
    margin-bottom: 120px;
}

.section-title {
    margin-bottom: 64px;
}

.projects-container {
    max-width: 1600px;
    margin: 0 auto;
}

.directions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.direction-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.direction-card:hover {
    transform: scale(1.02);
}

.direction-image-wrapper {
    overflow: hidden;
    margin-bottom: 16px;
}

.direction-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.direction-card:hover .direction-image {
    transform: scale(1.03);
}

.direction-title {
    font-size: 32px;
    color: #F50004;
    font-weight: 500;
    margin-bottom: 4px;
}

.direction-description {
    font-size: 20px;
    color: #0E1822;
}

/* ============================================
   ЧЕТВЕРТЫЙ БЛОК - КОНТАКТЫ
   ============================================ */

.contacts-section {
    margin-top: 160px;
    margin-bottom: 120px;
}

.contacts-container {
    max-width: 1600px;
    margin: 0 auto;
}

.contacts-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.contacts-copyright {
    font-size: 20px;
}

.contacts-right {
    flex: 1;
    max-width: 792px;
}

.contact-block {
    margin-bottom: 32px;
    text-align: left;
}

.contact-links {
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 388px;
}

.contact-small-text {
    font-size: 20px;
    margin-bottom: 8px;
}

.clickable-contact {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.clickable-contact:hover {
    opacity: 0.7;
}

.clickable-contact:hover .contact-red-text {
    text-decoration: underline;
}

.contact-icon {
    width: 32px;
    height: 32px;
    display: inline-block;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.clickable-contact:hover .contact-icon {
    transform: scale(1.1);
}

.contact-red-text {
    display: inline-block;
    white-space: nowrap;
    transition: text-decoration 0.2s ease;
}

.contact-text {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.contact-text:hover {
    opacity: 0.7;
}

.contact-text:hover .contact-red-text {
    text-decoration: underline;
}

.contact-text:hover .contact-icon {
    transform: scale(1.1);
}

.info-title {
    margin-bottom: 24px;
}

/* ============================================
   АДАПТИВ ПОД ПЛАНШЕТ (768px - 1024px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding-left: 32px;
        padding-right: 32px;
    }

    .header {
        padding-left: 32px;
        padding-right: 32px;
        padding-top: 32px;
        padding-bottom: 24px;
    }

    .logo {
        font-size: 28px;
    }

    .nav {
        gap: 40px;
    }

    .nav-link {
        font-size: 28px;
    }

    .hero {
        margin-top: 40px;
        margin-bottom: 80px;
    }

    .name-image {
        max-width: 600px;
    }

    .hero-image {
        max-width: 600px;
    }

    .caption-container {
        max-width: 600px;
        font-size: 24px;
    }

    .about-section {
        margin-top: 80px;
        margin-bottom: 80px;
    }

    .section-title {
        font-size: 52px;
        margin-bottom: 48px;
    }

    .about-flex {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .about-description {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        max-width: 100%;
    }

    .about-edu {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        max-width: 100%;
    }

    .about-hard {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        max-width: 100%;
    }

    .about-soft {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        max-width: 100%;
    }

    .about-title {
        font-size: 28px;
    }

    .about-text {
        font-size: 18px;
    }

    .about-hard .info-title,
    .about-soft .info-title,
    .about-edu .info-title {
        font-size: 26px;
    }

    .about-hard .skills-list li,
    .about-soft .skills-list li,
    .edu-list li {
        font-size: 18px;
    }

    .projects-section {
        margin-top: 80px;
        margin-bottom: 80px;
    }

    .directions-grid {
        gap: 32px;
    }

    .direction-title {
        font-size: 28px;
    }

    .direction-description {
        font-size: 18px;
    }

    /* АДАПТИВ КОНТАКТОВ ДЛЯ ПЛАНШЕТА */
.contacts-section {
    margin-top: 100px;
    margin-bottom: 80px;
}

.contacts-flex {
    justify-content: space-between;
    gap: 16px;
}

.contacts-copyright {
    font-size: 18px;
}

.contacts-right {
    max-width: 480px;
    flex: 1;
}

.contact-block {
    margin-bottom: 24px;
}

.contact-red-text {
    font-size: 26px;
    white-space: normal;
    word-break: break-word;
}

.contact-links {
    gap: 12px;
}

.contact-small-text {
    font-size: 16px;
}

.clickable-contact,
.contact-text {
    gap: 8px;
    white-space: normal;
    word-break: break-all;
}

.contact-icon {
    width: 24px;
    height: 24px;
}
}

/* ============================================
   АДАПТИВ ПОД СМАРТФОН (до 767px)
   ============================================ */

@media (max-width: 767px) {
    .burger {
        display: block;
    }
    
    .overlay {
        display: block;
    }
    
    .header {
        padding-left: 24px;
        padding-right: 24px;
        padding-top: 20px;
        padding-bottom: 16px;
    }
    
    .logo {
        font-size: 28px;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #F1F3EE;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 28px;
    }
    
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s ease;
        z-index: 999;
    }
    
    .overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .burger {
        width: 30px;
        height: 20px;
        position: relative;
        cursor: pointer;
        z-index: 1001;
    }
    
    .burger span {
        display: block;
        position: absolute;
        height: 2px;
        width: 100%;
        background: #F50004;
        border-radius: 2px;
        opacity: 1;
        left: 0;
        transition: 0.25s ease-in-out;
    }
    
    .burger span:nth-child(1) { top: 0px; }
    .burger span:nth-child(2) { top: 9px; }
    .burger span:nth-child(3) { top: 18px; }
    
    .burger.active span:nth-child(1) {
        top: 9px;
        transform: rotate(135deg);
    }
    
    .burger.active span:nth-child(2) {
        opacity: 0;
        left: -20px;
    }
    
    .burger.active span:nth-child(3) {
        top: 9px;
        transform: rotate(-135deg);
    }
    
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    /* ====== ЗАГОЛОВКИ ====== */
    .section-title {
        font-size: 40px;
        margin-bottom: 32px;
    }
    
    /* ====== КНОПКА "НАВЕРХ" ====== */
    .scroll-to-top-wrapper {
        margin-top: 40px;
        margin-bottom: 40px;
    }
    
    .scroll-to-top {
        font-size: 20px;
    }
    
    /* ====== ГЛАВНАЯ - HERO ====== */
    .hero {
        margin-top: 30px;
        margin-bottom: 60px;
    }
    
    .name-image {
        max-width: 100%;
    }
    
    .hero-image {
        max-width: 100%;
    }
    
    .caption-container {
        max-width: 100%;
        font-size: 24px;
    }
    
    .caption-left,
    .caption-right {
        font-size: 24px;
    }
    
    /* ====== ГЛАВНАЯ - ОБО МНЕ ====== */
    .about-section {
        margin-top: 60px;
        margin-bottom: 40px;
    }
    
    .about-flex {
        flex-direction: column;
        gap: 0;
    }
    
    .about-description,
    .about-hard,
    .about-soft,
    .about-edu {
        max-width: 100%;
        width: 100%;
    }
    
    .about-title {
        font-size: 26px;
        margin-bottom: 0;
    }
    
    .about-text {
        font-size: 18px;
        line-height: 1.6;
    }
    
    .about-hard .info-title,
    .about-soft .info-title,
    .about-edu .info-title {
        font-size: 24px;
        margin-bottom: 0;
    }
    
    .about-hard .skills-list li,
    .about-soft .skills-list li,
    .edu-list li {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    /* ====== АККОРДЕОН ====== */
    .about-description,
    .about-hard,
    .about-soft,
    .about-edu {
        padding-bottom: 12px;
    }
    
    .about-title,
    .about-hard .info-title,
    .about-soft .info-title,
    .about-edu .info-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        margin-bottom: 0;
        position: relative;
    }
    
    .about-title::after,
    .about-hard .info-title::after,
    .about-soft .info-title::after,
    .about-edu .info-title::after {
        content: '';
        width: 12px;
        height: 12px;
        border-right: 2px solid #F50004;
        border-bottom: 2px solid #F50004;
        transform: rotate(45deg);
        transition: transform 0.3s ease;
        display: inline-block;
        margin-bottom: 4px;
    }
    
    .about-title.active::after,
    .about-hard .info-title.active::after,
    .about-soft .info-title.active::after,
    .about-edu .info-title.active::after {
        transform: rotate(225deg);
    }
    
    .about-text,
    .about-hard .skills-list,
    .about-soft .skills-list,
    .edu-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        margin: 0;
        padding: 0;
    }
    
    .about-text.active,
    .about-hard .skills-list.active,
    .about-soft .skills-list.active,
    .edu-list.active {
        max-height: 500px;
        margin-top: 16px;
    }
    
    /* ====== ГЛАВНАЯ - НАПРАВЛЕНИЯ ====== */
    .projects-section {
        margin-top: 60px;
        margin-bottom: 60px;
    }
    
    .directions-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .direction-title {
        font-size: 26px;
    }
    
    .direction-description {
        font-size: 18px;
    }

    /* АДАПТИВ КОНТАКТОВ ДЛЯ СМАРТФОНА */
.contacts-section {
    margin-top: 60px;
    margin-bottom: 60px;
}

.contacts-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.contacts-copyright {
    font-size: 16px;
    order: 2;
}

.contacts-right {
    max-width: 100%;
    width: 100%;
}

.contact-block {
    margin-bottom: 24px;
    text-align: left;
}

.contact-red-text {
    font-size: 26px;
    white-space: normal;
    word-break: break-word;
    text-align: left;
    margin-bottom: 16px;
}

.contact-links {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.contact-item {
    align-items: flex-start;
    max-width: 100%;
}

.contact-small-text {
    font-size: 18px;
    text-align: left;
    margin-bottom: 8px;
}

.clickable-contact,
.contact-text {
    white-space: normal;
    word-break: break-all;
    justify-content: flex-start;
}

.contact-icon {
    width: 32px;
    height: 32px;
}
}

/* ============================================
   АДАПТИВ ПОД МАЛЕНЬКИЙ СМАРТФОН (до 390px)
   ============================================ */

@media (max-width: 390px) {
    .burger {
        display: block;
    }
    
    .overlay {
        display: block;
    }
    
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .header {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 16px;
        padding-bottom: 16px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .burger {
        width: 28px;
        height: 18px;
    }
    
    .burger span:nth-child(1) { top: 0px; }
    .burger span:nth-child(2) { top: 8px; }
    .burger span:nth-child(3) { top: 16px; }
    
    .burger.active span:nth-child(1) {
        top: 8px;
        transform: rotate(135deg);
    }
    
    .burger.active span:nth-child(2) {
        opacity: 0;
        left: -20px;
    }
    
    .burger.active span:nth-child(3) {
        top: 8px;
        transform: rotate(-135deg);
    }
    
    .nav-link {
        font-size: 24px;
    }
    
    /* ====== ЗАГОЛОВКИ ====== */
    .section-title {
        font-size: 32px;
        margin-bottom: 24px;
    }
    
    /* ====== КНОПКА "НАВЕРХ" ====== */
    .scroll-to-top-wrapper {
        margin-top: 30px;
        margin-bottom: 30px;
    }
    
    .scroll-to-top {
        font-size: 18px;
    }
    
    /* ====== ГЛАВНАЯ - HERO ====== */
    .hero {
        margin-top: 24px;
        margin-bottom: 48px;
    }
    
    .caption-container {
        font-size: 24px;
    }
    
    .caption-left,
    .caption-right {
        font-size: 24px;
    }
    
    /* ====== ГЛАВНАЯ - ОБО МНЕ ====== */
    .about-section {
        margin-top: 48px;
        margin-bottom: 32px;
    }
    
    .about-title {
        font-size: 22px;
    }
    
    .about-text {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .about-hard .info-title,
    .about-soft .info-title,
    .about-edu .info-title {
        font-size: 22px;
    }
    
    .about-hard .skills-list li,
    .about-soft .skills-list li,
    .edu-list li {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    /* ====== ГЛАВНАЯ - НАПРАВЛЕНИЯ ====== */
    .projects-section {
        margin-top: 48px;
        margin-bottom: 48px;
    }
    
    .directions-grid {
        gap: 28px;
    }
    
    .direction-title {
        font-size: 22px;
    }
    
    .direction-description {
        font-size: 16px;
    }

    /* АДАПТИВ КОНТАКТОВ ДЛЯ МАЛЕНЬКОГО СМАРТФОНА */
.contacts-section {
    margin-top: 60px;
    margin-bottom: 60px;
}

.contacts-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.contacts-copyright {
    font-size: 16px;
    order: 2;
}

.contacts-right {
    max-width: 100%;
    width: 100%;
}

.contact-block {
    margin-bottom: 24px;
    text-align: left;
}

.contact-red-text {
    font-size: 22px;
    white-space: normal;
    word-break: break-word;
    text-align: left;
    margin-bottom: 16px;
}

.contact-links {
    flex-direction: column;
    gap: 22px;
    align-items: flex-start;
}

.contact-item {
    align-items: flex-start;
    max-width: 100%;
}

.contact-small-text {
    font-size: 16px;
    text-align: left;
    margin-bottom: 8px;
}

.clickable-contact,
.contact-text {
    white-space: normal;
    word-break: break-all;
    justify-content: flex-start;
}

.contact-icon {
    width: 32px;
    height: 32px;
}
}