:root {
    --primary: #39FF14; /* Betera's vibrant green */
    --dark: #0A0A0A;
    --light: #EAEAEA;
    --gray: #1A1A1A;
    --border: #333;
    --betera-accent-dark: #1F1F1F; /* A slightly lighter dark for subtle contrasts */
    --card-bg: rgba(16, 16, 16, 0.9); /* Slightly lighter dark for card backgrounds */
    --text-highlight: #39FF14; /* For highlighting bold text */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    /* Smooth scrolling for the entire page */
    scroll-behavior: smooth;
}

.container {
    width: 96%;
    max-width: 1200px; /* Increased max-width for more content space */
    margin: 0 auto;
    padding: 0 40px; /* Increased padding on left and right */
}


/* Header */
.header {
    position: fixed;
    width: 100%;
    background: rgba(10, 10, 10, 0.95); /* Slightly less transparent */
    backdrop-filter: blur(15px); /* Increased blur */
    padding: 20px 0; /* Slightly more padding */
    z-index: 100;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Subtle shadow for depth */
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px; /* Slightly larger logo */
    font-weight: 700;
    text-decoration: none;
    color: var(--light); /* Set a default color */
}

/* Remove hover and active effects specifically for the logo */
.main-nav .logo:hover,
.main-nav .logo.active {
    color: var(--light);
    transform: none;
}

.main-nav .logo:hover::after,
.main-nav .logo.active::after {
    width: 0;
}


.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px; /* Increased gap between nav items */
}

.main-nav a {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    left: 0;
    bottom: -8px;
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.hero-text-content {
    text-align: center;
    max-width: 600px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
}
#changing-roles {
    color: var(--primary);
    display: inline-block;
    min-width: 200px; /* Adjusted min-width */
    text-align: left;
    font-weight: 700;
    transition: all 0.3s ease;
}
.hero-video-wrapper {
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.hero-video-wrapper video {
    width: 100%;
    display: block;
}

.unmute-btn {
    position: absolute;
    bottom: 25px; /* Adjusted position */
    right: 25px; /* Adjusted position */
    background: rgba(0,0,0,0.6); /* Slightly darker background */
    border: none;
    width: 45px; /* Larger button */
    height: 45px; /* Larger button */
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem; /* Larger icon */
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.unmute-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: scale(1.1);
}

/* Button */
.btn {
    display: inline-block;
    padding: 12px 48px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--primary);
    color: black;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.6);
}

/* Sections */
section {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

section:first-of-type {
    border-top: none;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background-color: var(--primary);
    position: absolute;
    bottom: 10px;
    right: -20px;
    border-radius: 50%;
}

.about h2::after,
.portfolio h2::after {
    right: auto;
    left: -20px;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-item:hover img {
    opacity: 0.2;
    transform: scale(1.05);
}

.portfolio-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
    width: 90%;
}

.portfolio-item:hover .portfolio-info {
    opacity: 1;
}

.portfolio-info h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* NEW 'ABOUT ME' SECTION STYLES */
.about-section-new {
    padding: 0;
    background-color:#47f429; /* Neon green background */
    color: #0A0A0A; /* Dark text */
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid var(--border);
}

.about-me-content {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px;
}

.about-me-title {
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 800;
    color: #0A0A0A;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    line-height: 1;
    margin: 0;
}

.about-me-title::after {
    display: none; /* remove dot from h2 */
}

.about-me-description {
    max-width: 700px;
    padding-top: 2rem;
}

.about-me-description .pre-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.about-me-description p {
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 600;
    color: #0A0A0A;
    margin-bottom: 1rem;
}
/* About */
.about-container {
    display: flex;
    flex-direction: column;
    gap: 50px;
    align-items: center;
}

.about-text {
    max-width: 880px; /* Увеличена максимальная ширина для карточки */
    width: 100%;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 20px;
}

/* Base styles for About blocks */
.about-section-block {
    margin-bottom: 40px;
}

/* Card Design for About blocks */
.about-section-block.card-design {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border: 1px solid var(--betera-accent-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.about-section-block.card-design:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6), 0 0 15px rgba(57, 255, 20, 0.3);
}

.about-section-block:last-of-type {
    margin-bottom: 0;
}

.about-section-block h3 {
    font-size: 1.6rem; /* Уменьшен шрифт заголовка */
    color: var(--light); /* Цвет текста "Опыт" сделан белым */
    font-weight: 800; /* Жирность текста "Опыт" как у "Ключевых Достижений" */
    text-transform: none; /* Убрано преобразование в заглавные буквы */
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-heading {
    font-size: 2rem;
    color: var(--primary); /* Иконка в заголовке остается зеленой */
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
}

.about-section-block h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--light);
}

.about-text strong {
    color: var(--primary);
    font-weight: 600;
}

.about-text .location-date {
    font-size: 0.9rem;
    color: #aaa;
    font-weight: normal;
}

/* Specific styling for Experience Block with image */
.experience-item {
    display: flex;
    position: relative;
    min-height: 280px;
}

.experience-text {
    flex: 0 0 65%;
    z-index: 2;
    position: relative;
    margin-right: 30px;
}

.experience-text ul {
    list-style: none;
    padding-left: 0;
}

.experience-text ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.experience-text ul li::before {
    content: '•';
    color: var(--primary);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -4px;
}

.background-image-on-right {
    position: absolute;
    right: -200px;
    top: 50%;
    transform: translateY(-50%) translateX(0);
    width: 650px;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0 0 15px #39FF14);
    box-shadow: none;
}

/* Achievements Metrics Block */
.achievements-metrics-block {
    margin-top: 60px;
    margin-bottom: 40px;
    padding: 20px 0;
}

.achievements-metrics-block h3 {
    margin-bottom: 40px;
    font-size: 1.6rem;
    color: var(--light);
    font-weight: 800;
    text-transform: none;
    letter-spacing: 1px;
    text-align: left;
}

.metrics-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* Выравнивание содержимого по центру */
    flex: 1;
    min-width: 150px;
    max-width: 320px; /* Увеличена максимальная ширина */
    padding: 15px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--betera-accent-dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5), 0 0 10px rgba(57, 255, 20, 0.4);
}

.metric-value-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.metric-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}

.metric-image-inline { /* Стили для изображений-иконок в достижениях */
    width: 25px; /* Размер картинки */
    height: 25px;
    object-fit: contain; /* Чтобы картинка полностью помещалась */
    filter: none; /* Без свечения */
    vertical-align: middle; /* Выравнивание по центру с текстом */
}

.metric-description {
    font-size: 0.9rem;
    color: var(--light);
    line-height: 1.3;
    text-align: center; /* Описание теперь выровнено по центру */
}

/* Skills Section */
.skills-section {
    margin-top: 60px;
    margin-bottom: 40px;
}

.skills-section h3 {
    margin-bottom: 40px;
    font-size: 1.6rem;
    color: var(--light);
    font-weight: 800;
    text-transform: none;
    letter-spacing: 1px;
    text-align: left;
}

.skills-tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: flex-start; /* Выравнивание табов по левому краю */
}

.skill-tab {
    background: var(--gray);
    border: 1px solid var(--border);
    color: var(--light);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap; /* Предотвращает перенос текста в табах */
}

.skill-tab:hover {
    background: var(--betera-accent-dark);
    color: var(--primary);
}

.skill-tab.active {
    background: var(--primary);
    color: var(--dark);
    font-weight: 700;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.skills-content-wrapper {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    max-height: 240px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border: 1px solid var(--betera-accent-dark);
    position: relative; /* Чтобы skill-background-image позиционировалась относительно него */
    overflow: hidden; /* Обрезать картинку, если она выходит за границы */
}

.skill-content {
    display: none; /* Скрыть все по умолчанию */
    animation: fadeIn 0.5s ease-out; /* Анимация появления контента */
    min-height: 200px; /* Убедитесь, что блок достаточно большой для картинки */
    padding: 10px 240px 30px 30px; /* Увеличиваем правый отступ для текста, чтобы он не заходил на картинку */
}

.skill-content.active {
    display: block; /* Показать активный контент */
}

.skill-content h4 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative; /* Для Z-index */
    z-index: 2; /* Над фоновой картинкой */
}

.skill-content p {
    margin-bottom: 20px;
    color: var(--light);
    position: relative; /* Для Z-index */
    z-index: 2; /* Над фоновой картинкой */
}

.skill-content ul {
    list-style: none; /* Убрать стандартные маркеры */
    padding-left: 0;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    display: grid; /* Двухколоночный макет */
    grid-template-columns: repeat(2, 1fr); /* Две колонки, равная ширина */
    gap: 10px 5px; /* Уменьшен отступ между колонками до 5px */
}

.skill-content ul li {
    position: relative;
    padding-left: 20px; /* Отступ для кастомного маркера */
    margin-bottom: 0; /* Пространство между пунктами через gap */
    color: var(--light);
    font-size: 0.95rem;
}

.skill-content ul li::before {
    content: '•'; /* Кастомный маркер */
    color: var(--primary);
    font-size: 1.2rem; /* Уменьшен размер маркера */
    position: absolute;
    left: 0;
    top: -1px; /* Корректировка вертикального положения маркера */
}


.skill-background-image {
    position: absolute;
    right: -140px; /* Позиция картинки - не меняем */
    top: 50%;
    transform: translateY(-50%);
    width: 480px; /* Размер картинки - не меняем */
    height: auto;
    object-fit: contain; /* Чтобы картинка помещалась */
    opacity: 0.9; /* Полупрозрачность - не меняем, по запросу пользователя */
    z-index: 1;
    pointer-events: none;
    filter: none; /* Без свечения */
    box-shadow: none; /* Без теней */
}

/* Удаляем старые стили tool-icons-grid, так как мы используем фоновое изображение */
.tool-icons-grid {
    display: none;
}

.tool-icon-item {
    display: none; /* Также скрыть итемы */
}

.tool-icon-item i {
    display: none; /* Иконки FA также скрыты */
}


/* Footer */
.footer {
    background: var(--dark);
    text-align: center;
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.email-link {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--primary);
    margin: 20px 0;
    text-decoration: none;
    transition: text-shadow 0.3s;
}

.email-link:hover {
    text-shadow: 0 0 15px rgba(57, 255, 20, 0.8);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.social-icons a {
    color: var(--light);
    font-size: 1.5rem;
    transition: all 0.3s;
}

.social-icons a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    color: #666;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* Qualities Section */
.qualities-section {
    margin-top: 60px; /* Отступ сверху, как у других блоков */
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Убираем эффект наведения с основного контейнера блока качеств */
.about-section-block.qualities-section:hover {
    transform: none;
    box-shadow: none;
}

.qualities-section h3 {
    margin-bottom: 40px;
    font-size: 1.6rem;
    color: var(--light);
    font-weight: 800;
    text-transform: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.qualities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; /* Пространство между карточками */
}

.quality-item {
    background: var(--card-bg);
    border: 1px solid var(--betera-accent-dark);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Эффект наведения остается только у самих ячеек */
.quality-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5), 0 0 10px rgba(57, 255, 20, 0.4);
}

.quality-content {
    text-align: left;
}

.quality-title {
    font-size: 1.2rem;
    font-weight: 700;
    color:  #39FF14; /* Заголовки сделаны зелеными (цвет --primary) */
    margin-bottom: 10px;
}

.quality-description {
    font-size: 0.95rem;
    color: var(--light);
    line-height: 1.6;
}


/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav ul {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 15px;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s;
    }

    .main-nav ul.active {
        transform: translateY(0);
        opacity: 1;
    }

    .hero-content {
        padding-top: 40px;
    }

    .hero-description {
        white-space: normal;
        min-width: auto;
    }

    .about-container {
        text-align: center;
    }
    .about-section-block h4 {
        font-size: 1.2rem;
    }

    /* На мобильных картинка должна быть под текстом и занимать меньше места */
    .experience-item {
        flex-direction: column;
        align-items: center;
        min-height: unset;
    }

    .experience-text {
        flex: 0 0 auto;
        max-width: 100%;
        margin-right: 0;
    }

    .experience-text ul li {
        padding-left: 25px;
        font-size: 0.9rem;
    }

    .experience-text ul li::before {
        font-size: 1.2rem;
        top: -2px;
    }

    .background-image-on-right {
        position: relative;
        right: unset;
        top: unset;
        transform: unset;
        width: 90%;
        max-width: 300px;
        height: auto;
        margin-top: 20px;
        opacity: 0.9;
        filter: drop-shadow(0 0 10px #39FF14);
        box-shadow: none;
    }

    /* Achievements metrics on mobile */
    .achievements-metrics-block h3 {
        text-align: center; /* Заголовок на мобильных снова по центру */
    }

    .metrics-grid {
        gap: 20px;
    }

    .metric-item {
        min-width: 120px;
        max-width: 45%;
        padding: 10px;
    }

    .metric-value-wrapper {
        justify-content: center;
    }

    .metric-number {
        font-size: 1.6rem;
    }

    .metric-image-inline { /* Стили для изображений-иконок на мобильных */
        width: 20px;
        height: 20px;
    }

    .metric-description {
        font-size: 0.8rem;
    }

    /* Skills on mobile */
    .skills-tabs-container {
        flex-direction: column;
        align-items: center;
    }

    .skill-tab {
        width: 90%;
        text-align: center;
    }

    .skill-content h4 {
        font-size: 1.3rem;
    }
    .skill-content p {
        font-size: 0.9rem;
    }
    /* tool-icons-grid и tool-icon-item теперь скрыты */
    .tool-icons-grid {
        display: none;
    }
    .tool-icon-item {
        display: none;
    }
    .tool-icon-item i {
        display: none;
    }

    .skill-background-image { /* Мобильные стили для фоновой картинки */
        width: 150px;
        right: 10px;
        opacity: 0.9; /* Ещё меньше прозрачность на мобильных */
    }

    .skill-content ul {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
        gap: 8px; /* Отступы для одной колонки */
    }
    .skill-content ul li {
        padding-left: 20px;
        font-size: 0.9rem;
    }
    .skill-content ul li::before {
        font-size: 1.1rem;
        top: -1px;
    }
}

@media (min-width: 992px) {
    .hero-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .hero-text-content {
        text-align: left;
        align-items: flex-start;
    }

    .about-container {
        flex-direction: row;
        text-align: left;
    }
}