@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700|Raleway:500,700");

/* === БАЗОВЫЕ СТИЛИ САЙТА (исходные) === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f0f7f4;
    color: #1e3b3a;
    font-family: "Source Sans Pro", Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
}

#wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Заголовки */
h1, h2, h3, h4 {
    color: #1e3b3a;
    font-family: "Raleway", Helvetica, sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #2c7a6e, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.8rem;
    border-left: 5px solid #4ecdc4;
    padding-left: 1.2rem;
}

h3 {
    font-size: 1.2rem;
    color: #2c7a6e;
}

a {
    color: #2c7a6e;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #b8e0da;
}

a:hover {
    color: #4ecdc4;
    border-bottom-color: #4ecdc4;
}

/* Приветственный блок */
#intro {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2rem auto;
}

#intro header.centered {
    text-align: center;
}

#intro p {
    max-width: 900px;
    margin: 0 auto;
}

/* Секции с ограниченной шириной */
#menu-section,
#contacts {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2rem auto;
}

/* Контакты */
#contacts .content {
    background: white;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(44, 122, 110, 0.1);
    width: 100%;
}

/* Вертикальное меню */
.vertical-menu {
    list-style: none;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(44, 122, 110, 0.1);
    overflow: hidden;
}

.menu-item {
    border-bottom: 1px solid #e0f0ec;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    cursor: pointer;
    font-weight: 600;
    color: #1e3b3a;
    background: white;
    transition: background 0.3s;
}

.menu-header:hover {
    background: #f5fcf9;
}

.menu-header .arrow {
    transition: transform 0.3s;
    color: #4ecdc4;
    font-size: 1.1rem;
}

.menu-item.open .arrow {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    background: #fafdfc;
}

.menu-item.open .submenu {
    max-height: 500px;
    transition: max-height 0.7s ease-in;
}

.submenu li {
    border-top: 1px solid #e0f0ec;
}

.submenu li a {
    display: block;
    padding: 1rem 2rem 1rem 3rem;
    color: #30635a;
    font-size: 1rem;
    border-bottom: none;
    background: #fafdfc;
}

.submenu li a:hover {
    background: #e6f5f0;
    color: #1e3b3a;
    padding-left: 3.5rem;
}

/* Кнопки */
.button {
    display: inline-block;
    background: white;
    border: 2px solid #4ecdc4;
    color: #2c7a6e !important;
    padding: 0.8rem 2rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 50px;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.2);
}

.button:hover {
    background: #4ecdc4;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(78, 205, 196, 0.3);
}

.button.primary {
    background: #4ecdc4;
    color: white !important;
}

.button.primary:hover {
    background: #2c7a6e;
    border-color: #2c7a6e;
}

.button.small {
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
}

.back-nav {
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Контакты и формы */
.items {
    list-style: none;
    margin-top: 2rem;
}

.items li {
    margin-bottom: 1rem;
}

/* Иконки социальных сетей */
.icons {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding-left: 0;
    margin-top: 0.5rem;
}

.icons li {
    display: inline-block;
}

.icons li a {
    border-bottom: none;
    font-size: 1.8rem;
    color: #2c7a6e;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.icons li a:hover {
    color: #4ecdc4;
    transform: translateY(-3px);
}

/* Font Awesome иконки */
.icon {
    text-decoration: none;
    border-bottom: none;
    position: relative;
}

.icon:before {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    text-transform: none !important;
    font-family: 'Font Awesome 6 Brands';
    font-weight: 400;
}

.icon > .label {
    display: none;
}

/* Конкретные иконки */
.icon.brands.fa-github:before {
    content: "\f09b";
}

.icon.brands.fa-linkedin-in:before {
    content: "\f0e1";
}

.icon.brands.fa-telegram:before {
    content: "\f2c6";
}

/* Формы */
input, textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    border: 2px solid #d0e8e2;
    color: #1e3b3a;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

/* Галерея */
.gallery-section {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(44, 122, 110, 0.1);
    margin: 2rem auto;
    max-width: 900px;
    width: 100%;
}

.gallery-section header.centered {
    text-align: center;
    margin-bottom: 2.5rem;
}

.gallery-section header.centered h2 {
    border-left: none;
    border-bottom: 3px solid #4ecdc4;
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.course-name {
    font-size: 1.3rem;
    color: #2c7a6e;
    font-weight: 600;
    margin-top: 0.5rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
    margin: 2rem 0;
}

.gallery-item {
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: #f5fcf9;
    border: 1px solid #e0f0ec;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    min-height: 250px;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(44, 122, 110, 0.15);
    border-color: #4ecdc4;
}

.gallery-item img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 300px;
    display: block;
    transition: transform 0.5s;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 59, 58, 0.95);
    overflow: auto;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    border: 4px solid #4ecdc4;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #4ecdc4;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.close:hover {
    color: white;
}


/* === НОВЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ РЕЗЮМЕ === */

/* Контейнер резюме */
.resume {
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px -8px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    padding: 35px 40px;
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    color: #1e293b;
}

/* Шапка резюме */
.resume .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9edf4;
    padding-bottom: 25px;
}

.resume .name-title h1 {
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #0b1e33;
    line-height: 1.2;
    margin-bottom: 5px;
    background: none;
    -webkit-text-fill-color: #0b1e33;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.resume .badge {
    background: #1e4a7a;
    color: white;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.9rem;
    display: inline-block;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.resume .contacts {
    text-align: right;
    background: #f8fafc;
    padding: 12px 20px;
    border-radius: 16px;
}

.resume .contact-item {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 6px;
}

.resume .contact-item:last-child {
    margin-bottom: 0;
}

.resume .contact-icon {
    background: #d4e1f5;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #1e4a7a;
}

.resume .contact-text {
    font-size: 1rem;
    font-weight: 500;
}

/* Секции внутри резюме */
.resume .section {
    margin-bottom: 35px;
}

.resume .section-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #0b1e33;
    border-left: 6px solid #2b6eb3;
    padding-left: 20px;
    margin-bottom: 20px;
    font-family: 'Segoe UI', Roboto, sans-serif;
    letter-spacing: normal;
    background: none;
    -webkit-text-fill-color: #0b1e33;
}

/* Карточка опыта работы */
.resume .experience-card {
    margin-bottom: 30px;
}

.resume .company-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.resume .company-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0b1e33;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.resume .company-duration {
    background: #eef2f6;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
}

.resume .job-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #2b6eb3;
    margin-bottom: 12px;
}

.resume .job-period {
    font-size: 0.95rem;
    color: #5e7180;
    margin-bottom: 18px;
    font-style: italic;
}

/* Блоки достижений */
.resume .achievement-block {
    margin-bottom: 20px;
}

.resume .block-subtitle {
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: #1e3a5f;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.resume .achievement-list {
    list-style: none;
    padding-left: 6px;
}

.resume .achievement-list li {
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
}

.resume .bullet {
    color: #2b6eb3;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.resume .list-content {
    flex: 1;
}

/* Простой список */
.resume .simple-list {
    padding-left: 25px;
    margin-top: 8px;
}

.resume .simple-list li {
    margin-bottom: 8px;
}

/* Облако навыков */
.resume .skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 5px;
}

.resume .skill-tag {
    background: #e9f0fa;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #103450;
    border: 1px solid #cdddec;
}

/* Блок сертификатов */
.resume .certificates-block {
    background: #f9fbfd;
    border-radius: 18px;
    padding: 18px 25px;
    margin-top: 25px;
}

.resume .cert-title {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: #1e3a5f;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.resume .cert-category {
    margin-bottom: 14px;
}

.resume .cert-cat-name {
    font-weight: 600;
    margin-bottom: 6px;
    color: #2b6eb3;
}

.resume .cert-item {
    display: inline-block;
    background: white;
    padding: 4px 14px;
    border-radius: 30px;
    margin: 0 8px 8px 0;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid #d7e2ed;
}

.resume .footer-note {
    margin-top: 25px;
    text-align: right;
    color: #5e7180;
    border-top: 1px dashed #cbd6e4;
    padding-top: 20px;
}


/* === АДАПТИВНОСТЬ (объединённая) === */

@media screen and (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 1.5rem; }
    .menu-header { padding: 1rem 1.5rem; }
    
    .gallery-item img {
        max-height: 280px;
    }
    
    #intro,
    #menu-section,
    #contacts,
    .gallery-section,
    .back-nav {
        max-width: 800px;
    }

    /* Резюме */
    .resume .name-title h1 {
        font-size: 2.4rem;
    }
}

@media screen and (max-width: 768px) {
    #wrapper { padding: 1rem; }
    
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.3rem; }
    
    .menu-header {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .submenu li a {
        padding: 0.8rem 1.2rem 0.8rem 2rem;
        font-size: 0.9rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-section { padding: 1.5rem; }
    .close { font-size: 40px; top: 15px; right: 20px; }
    
    .gallery-item {
        min-height: 220px;
    }
    
    .gallery-item img {
        max-height: 250px;
    }
    
    .icons {
        gap: 1rem;
    }
    
    .icons li a {
        font-size: 1.5rem;
    }
    
    #intro,
    #menu-section,
    #contacts,
    .gallery-section,
    .back-nav {
        max-width: 100%;
    }

    /* Резюме адаптив */
    .resume {
        padding: 20px 18px;
    }
    
    .resume .header {
        flex-direction: column;
        gap: 18px;
    }
    
    .resume .contacts {
        text-align: left;
        width: 100%;
    }
    
    .resume .contact-item {
        justify-content: flex-start;
    }
    
    .resume .company-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .resume .section-title {
        font-size: 1.4rem;
    }
    
    .resume .name-title h1 {
        font-size: 2rem;
    }
}

@media screen and (max-width: 650px) {
    .resume {
        padding: 20px 18px;
    }
    
    .resume .header {
        flex-direction: column;
        gap: 18px;
    }
    
    .resume .contacts {
        text-align: left;
        width: 100%;
    }
    
    .resume .contact-item {
        justify-content: flex-start;
    }
    
    .resume .company-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .resume .section-title {
        font-size: 1.4rem;
    }
}

@media screen and (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    
    .menu-header {
        flex-wrap: wrap;
        padding: 0.8rem 1rem;
    }
    
    .submenu li a {
        padding-left: 1.2rem;
        white-space: normal;
        word-break: break-word;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .close { font-size: 30px; }
    
    .button { width: 100%; text-align: center; }
    
    .gallery-item {
        min-height: 180px;
        padding: 8px;
    }
    
    .gallery-item img {
        max-height: 200px;
    }
    
    .icons {
        gap: 0.8rem;
    }
    
    .icons li a {
        font-size: 1.3rem;
    }
    
    #contacts .content {
        padding: 1.5rem;
    }

    /* Резюме */
    .resume .name-title h1 {
        font-size: 1.7rem;
    }
    
    .resume .company-name {
        font-size: 1.3rem;
    }
    
    .resume .skills-grid {
        gap: 8px 10px;
    }
    
    .resume .skill-tag {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
    
    .resume .certificates-block {
        padding: 15px 15px;
    }
}
