:root {

    --background-primary: #000000;
    --background-about-me: rgba(255, 255, 255, 0.1);
    --background-card: rgba(255, 255, 255, 0.1);
    --border-card: rgba(255, 255, 255, 0.3);

    --font-color-primary: #ffffff;
    --font-color-secondary: rgba(255, 255, 255, 0.75);

    --scroll: rgba(255, 255, 255, 0.25);
    --scroll-hover: rgba(255, 255, 255, 0.5);

    --nav-links: rgba(255, 255, 255, 0.25);
    --nav-links-hover: #fff;
    --menu-border-color: rgba(255, 255, 255, 0.1);

    --btn-bg: rgba(255, 255, 255, 0.05);
    --btn-border: rgba(255, 255, 255, 0.12);
    --glow-color: rgba(255, 255, 255, 0.3);

    /* Цвета для "Обо мне" по умолчанию */
    --bg-blob-1: #350920;
    --bg-blob-2: #1aff00;
    --bg-blob-3: #0a2341;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow: hidden;
}

body {
    font-family: "Google Sans Flex", sans-serif;
    color: var(--font-color-primary);
    background-color: var(--background-primary);
    line-height: 1.45;
    margin: 0;
    padding-top: 6rem;
    font-size: 10pt;
    height: 100dvh;
    overflow-x: hidden;
}

.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Должен быть самым нижним */
    overflow: hidden;
    pointer-events: none; /* Чтобы фон не перехватывал клики */
    filter: blur(160px);
    /* Форсируем использование видеокарты */
    transform: translateZ(0); 
}

.blob {
    position: absolute;
    width: 35vw;
    height: 35vw;
    border-radius: 50%;
    transition: background-color 2s ease;
    /* Главное для производительности: */
    will-change: transform; 
}

.blob-1 {
    top: -10%;
    left: -10%;
    background-color: var(--bg-blob-1);
    animation: move-1 7s infinite ease-in-out alternate;
}

.blob-2 {
    bottom: -5%;
    right: -5%;
    background-color: var(--bg-blob-2);
    animation: move-2 5s infinite ease-in-out alternate;
}

.blob-3 {
    top: 30%;
    left: 20%;
    width: 45vw;
    height: 45vw;
    background-color: var(--bg-blob-3);
    animation: move-3 3s infinite ease-in-out alternate;
}

/* Разные траектории для хаотичности */
@keyframes move-1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(90%, 165%) scale(1.7); }
}

@keyframes move-2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-75%, -100%) scale(1.4); }
}

@keyframes move-3 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-40%, 30%) scale(1.1); }
    100% { transform: translate(-60%, 70%) scale(0.8); }
}

.content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    transition: opacity 300ms ease-in-out;
    align-items: center;
}

.content-wrapper {
    transition: all 0.6s;
}

h1 {
    Width: 80;
    font-size: 8rem;
    font-weight: 1600;
    margin: 0;
    line-height: 90%;
}

h2 {
    Width: 80;
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
}

h3 {
    font-size: 2rem;
    font-weight: 500;
    margin: 0;
}

a {
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0;
    color: var(--font-color-secondary);
}

p {
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0;
    color: var(--font-color-secondary);
}

li {
    font-size: 1rem;
    font-weight: 400;
    color: var(--font-color-secondary);
}


/* ============================================
   Обо мне
============================================ */


.First-section {
    display:flex;
    flex-direction: row;
    gap: 3rem;
    padding: 0 1rem 0 1rem;
    margin-left: auto;
    margin-right: auto;
    height: 100%;
    max-width: 80rem;
}

.header {
    margin-top: auto;
    margin-bottom: auto;
    width: 66%;
    display:flex;
    flex-direction: column;
    gap: 1rem;
}

.logo-main {
    /* Геометрия */
    width: 33%;
    max-width: 24rem;
    height: auto;
    aspect-ratio: 1 / 1;
    
    /* Внутренние отступы */
    padding: 2rem;
    
    /* Поведение картинки внутри контейнера */
    object-fit: cover;
    
    /* Добавим щепотку стиля из макета */
    display: block; /* Убирает лишние зазоры снизу */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1)); /* Легкое свечение */
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Эффект при наведении, чтобы логотип "оживал" */
.logo-main:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
}

.about-me-wrapper {
    width: 100%;
    padding: 4rem 0 4rem 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.about-me-line {
    width: 120%;
    padding-bottom: 6rem;
    overflow:hidden;
    margin-left: -10rem;
    margin-right: -10rem;
    transform: rotate(5deg);
}

.about-me-line::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    
    /* Вот здесь создаем те самые 10rem вылета */
    left: -10rem;
    right: -10rem;
    
    /* Заливаем тем же цветом */
    background: var(--background-about-me);
    border: 1px solid rgba(255, 255, 255, 0.08);
    
    /* Кладём под контент самого блока */
    z-index: -1; 
}

.about-me {
    display:flex;
    flex-direction: row;
    padding: 0 1rem;
    margin-left: auto;
    margin-right: auto;
    height: 100%;
    max-width: 80rem;
    transform: rotate(-5deg);
    box-sizing: border-box;
}

.about-me-text {
    width: 50%;
    box-sizing: border-box;
}

.about-me-image img {
    height: 36rem; 
    aspect-ratio: 1 / 1; 
    object-fit: cover; 
    position: absolute;
}

.experience {
    display:flex;
    flex-direction: row;
    gap: 1.5rem;
    padding: 0 1rem 0 1rem;
    margin-left: auto;
    margin-right: auto;
    height: 100%;
    max-width: 80rem;
}

.experience-text {
    width: 50%;
}

.experience-title {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.experience-image {
    width: 50%;
}

.education-wrapper {
    position: relative; /* Создаем контекст для позиционирования */
    width: 100%;
    padding: 4rem 0 4rem 0;
    overflow: hidden;
    margin-bottom: -2rem;
}

.education-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    /* Переносим сюда настройки фона */
    background-image: url("images/dstu.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center bottom;
    
    /* Накладываем маску только на этот слой */
    mask-image: linear-gradient(to bottom, transparent, black 70%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 70%);
    
    z-index: -1; /* Уводим на задний план */
}

.education {
    display:flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem 0 1rem;
    margin-left: auto;
    margin-right: auto;
    height: 100%;
    max-width: 80rem;
    padding-bottom: 20rem;
}

.specialization span {
    color: #fff;
    font-weight: 500;
}

.edu-content .tag-group {
    margin-top: 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skills {
    display:flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem 0 1rem;
    margin-left: auto;
    margin-right: auto;
    height: 100%;
    max-width: 80rem;
}

.skills-dashboard {
    width: 100%;
    box-sizing: border-box;
}

.skills-container {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    padding: 0 1rem 0 1rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 80rem;
    box-sizing: border-box;
}

.skill-card {
    background: var(--background-card);
    border: 0.0625rem solid var(--border-card);
    border-radius: 1.75rem;
    padding: 1rem;
    backdrop-filter: blur(10px);
    width: 100%;
    display:flex;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
}

.card-label {
    font-family: monospace;
    font-size: 1rem;
    color: var(--font-color-secondary);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* ТЕГИ */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ПРОГРЕСС ЛИНИИ */
.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric-info {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    align-items: flex-end;
}

.progress-wrapper {
    width: 100%;
    height: 1rem; /* Очень тонкая, стильная линия */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: #fff;
    position: relative;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    transition: width 2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 99rem;
}

@media (max-width: 900px) {
    .skills-container { grid-template-columns: 1fr; }
}

.portfolio-preview {
    display:flex;
    flex-direction: column;
    gap: 1rem;
}

.portfolio-preview-header {
    display:flex;
    flex-direction: row;
    justify-content: space-between;
    max-width: 80rem;
    padding: 0 1rem 0 1rem;
}

/* ============================================
   Портфолио
============================================ */


/* Сетка для карточек на главной или в портфолио */
.projects-container {
    display: grid;
    /* Создаем 3 колонки равной ширины (1fr) */
    grid-template-columns: repeat(3, 1fr); 
    /* Высота строк подстраивается под самый высокий элемент в ряду */
    grid-auto-rows: auto; 
    /* Расстояние между карточками */
    gap: 1.5rem; 
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem 0 1rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 80rem;
    box-sizing: border-box;
}

.projects-container-preview {
    display: grid;
    /* Создаем 3 колонки равной ширины (1fr) */
    grid-template-columns: repeat(3, 1fr); 
    /* Высота строк подстраивается под самый высокий элемент в ряду */
    grid-auto-rows: auto; 
    /* Расстояние между карточками */
    gap: 1.5rem; 
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem 0 1rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 80rem;
}

/* Компонент карточки */
.project-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    background-color: var(--background-card);
    border: 0.0625rem solid var(--border-card);
    border-radius: 1.75rem;
    padding: 1rem;
    min-width: 20rem;
}

.project-card:hover {
    transform: translateY(-8px);
    border-radius: 1.5rem;
}

.project-card:hover .card-preview img {
    transform: scale(1.03);
}

.project-card:hover .card-preview {
    border-radius: 0.75rem;
}

/* Обёртка картинки с сохранением пропорций */
.card-preview {
    width: 100%;
    aspect-ratio: 1440 / 1024;
    overflow: hidden;
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

/* Инфо-блок карточки */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    line-height: 100%;
}

.card-excerpt {
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* =======================================================
   СТРАНИЦА ПРОЕКТА (КЕЙС)
========================================================= */

.project-page {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem 8rem 1rem;
    animation: fadeIn 0.5s ease-in-out;
}

/* Hero секция */
.project-hero {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.project-cover {
    width: 100%;
    aspect-ratio: 1440 / 1024;
    object-fit: cover;
    border-radius: 1.5rem;
}

.project-header-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-header-info h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
}

.project-subtitle {
    font-size: 1.5rem;
    color: var(--font-color-secondary);
    max-width: 800px;
    line-height: 1.4;
}

/* Контентная сетка проекта */
.project-grid-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Основной текст шире сайдбара с аккордеоном */
    gap: 4rem;
    align-items: start;
}

.project-section h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.project-section p {
    font-size: 1.2rem;
    color: var(--font-color-secondary);
    line-height: 1.6;
}

/* Стилизация аккордеона внутри проекта */
.project-details-accordion {
    position: sticky;
    top: 100px; /* Прилипает при скролле */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Твои существующие стили .accordion-item дополним спецификой для страниц */
.project-details-accordion .accordion-item {
    background: var(--background-about-me);
    border: 1px solid var(--menu-border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.project-details-accordion .accordion-title span {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--font-color-secondary);
    margin-bottom: 0.25rem;
}

.project-details-accordion .accordion-title small {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--font-color-primary);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ============================================
   Меню
============================================ */


/* Основная панель навигации */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--background-primary);
    transition: transform 0.3s ease-in-out;
    border-bottom: 1px solid var(--menu-border-color);
    box-sizing: border-box;
}

/* Класс для скрытия при скролле (через JS) */
.navbar--hidden {
    transform: translateY(-100%);
}

/* Ограничивающий контейнер внутри навигации */
.nav-container {
    max-width: 80rem;
    width: 100%; /* Чтобы контейнер занимал всю доступную ширину до 80rem */
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
    box-sizing: border-box; /* Чтобы padding не увеличивал ширину сверх 80rem */
    
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Распределяем: Лого слева, Линки в центре, Акшены справа */
    gap: 1rem;
}

/* Стилизация Логотипа */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0; /* Чтобы логотип не сжимался */
    
}

.logo-img {
    height: 2rem;
    width: auto;
    display: block;
    /* transition для плавного ховера */
    transition: opacity 0.3s ease;
}

/* Список ссылок (меню) */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem; /* Расстояние между пунктами меню */
    flex-grow: 1; /* Позволяет меню занимать свободное пространство */
    justify-content:left;
}

.nav-links a {
    text-decoration: none;
    color: var(--nav-links);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    white-space: nowrap; /* Чтобы пункты не переносились на новую строку */
}

.nav-links a:hover {
    color: var(--nav-links-hover);
}

.nav-links a.active {
    color: var(--nav-links-hover) !important; /* Или любой другой яркий цвет */
    font-weight: 600; /* Делаем чуть жирнее для акцента */
    transition: all 0.3s ease;
}

/* Правая часть: Иконки и Свитчер */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0; /* Чтобы блок не сжимался */
}

.nav-underline {
    position: absolute;
    bottom: 0.75rem; /* На сколько ниже текста будет линия */
    left: 0;
    height: 2px;
    background-color: var(--nav-links-hover); /* Цвет линии */
    transition: all 0.3s ease-in-out; /* Плавность перемещения */
    pointer-events: none; /* Чтобы линия не мешала кликать */
    width: 0; /* Изначально ширина 0 */
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-link img {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
    transition: opacity 0.3s;
    border-radius: 9rem;
}

.social-link {
    border-radius: 9rem;
    transition: all 0.3s ease-in-out;
}

.social-link:hover {
    outline: 0.1rem solid var(--font-color-secondary);
    /* Если нужно, чтобы рамка была чуть дальше от иконки */
    outline-offset: 0.1rem;
}

.nav-back {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--font-color-primary);
    font-weight: 700;
    letter-spacing: 0.1em;
    font-size: 0.9rem; /* Чтобы соответствовало твоему капсу */
}

.nav-back img {
    transition: transform 0.3s ease;
}

/* При наведении стрелка чуть "отпрыгивает" вверх/назад */
.nav-back:hover img {
    transform: rotate(90deg) translateY(3px) !important;
}

/* ============================================
   Стили для скроллбаров
============================================ */


::-webkit-scrollbar {
    width: 0.5rem; /* ширина вертикального скролла */
    height: 0.5rem; /* высота горизонтального скролла */
    transition: all 0.3s;
}

::-webkit-scrollbar-track {
    background: transparent; /* фон трека */
    border-radius: 2rem;
    margin: 1rem;
}

::-webkit-scrollbar-thumb {
    background: var(--scroll);
    border-radius: 2rem;
    border: 0.05rem solid transparent; 
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-hover);
}

::-webkit-scrollbar-thumb:active {
    border: 0 solid transparent;
}

::-webkit-scrollbar-button {
    display: none;
}


/* ============================================
   Аккордион
============================================ */


/* Контейнер айтема */
.accordion-item {
    border-bottom: 1px solid var(--menu-border-color);
    cursor: pointer; /* Делаем всю строку кликабельной */
}

/* Заголовок и стрелка */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
}

.accordion-title {
    display: flex;
    flex-direction: column;
}

.accordion-icon {
    width: 1.5rem;
    height: 1.5rem;
    transition: transform 0.3s ease;
}

/* Скрытый контент */
.accordion-content {
    display: grid;
    grid-template-rows: 0fr; /* Схлопнуто */
    transition: grid-template-rows 0.3s ease-out;
}

/* Внутренний контейнер (нужен для корректной анимации grid) */
.accordion-inner {
    overflow: hidden;
    min-height: 0;
}

.accordion-inner p {
    padding-bottom: 2rem;
    font-size: 1.25rem;
    color: var(--font-color-secondary);
    margin: 0;
}

/* Состояние при открытии */
.accordion-item.is-open .accordion-content {
    grid-template-rows: 1fr; /* Раскрыто */
}

.accordion-item.is-open .accordion-icon {
    transform: rotate(180deg);
}


/* ============================================
   Бегущая строка
============================================ */


.marquee-wrapper {
    transform: rotate(5deg);
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 4rem 0 0 0;
    margin-bottom: -6rem;
    /* Мягкое затухание по бокам */
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
    will-change: transform;
}

.marquee-list {
    display: flex;
    align-items: center;
    gap: 3rem; /* Расстояние между элементами */
    padding-right: 3rem; /* Должно совпадать с gap для бесшовности */
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    /* Сдвигаем на 1/3, так как у нас будет 3 набора (оригинал + 2 клона) */
    to { transform: translateX(-33.333%); }
}

.skill {
    text-transform: uppercase;
    font-size: 2rem;
    Width: 80;
    font-weight: 1000;
    margin: 0;
}


/* ============================================
   Футер
============================================ */


.footer {
    background-color: var(--background-primary);
    border-top: 1px solid var(--menu-border-color);
    padding: 4rem 1rem 2rem;
    margin-top: 2rem; /* Если контента мало, футер прижмется к низу */
}

.footer-container {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

/* Брендинг */
.footer-brand {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
}

.footer-logo {
    width: 40px;
    height: auto;
}

/* Списки ссылок */
.footer-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav a, .footer-contacts a {
    text-decoration: none;
    color: var(--font-color-secondary);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover, .footer-contacts a:hover {
    color: var(--font-color-primary);
}

/* Копирайт в самом низу */
.footer-bottom {
    max-width: 1200px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 12px; /* Расстояние между иконкой и текстом */
    text-decoration: none;
    color: var(--font-color-secondary);
    transition: color 0.3s ease;
}

.footer-contact-item img {
    width: 20px;  /* Размер иконок в футере чуть меньше, чем в шапке */
    height: 20px;
    opacity: 0.6; /* Делаем их чуть приглушенными */
    transition: opacity 0.3s ease;
}

.footer-contact-item:hover {
    color: var(--font-color-primary);
}

.footer-contact-item:hover img {
    opacity: 1; /* При наведении иконка становится яркой */
}

/* Если на мобилках футер центрируется, выравниваем элементы */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }
}


/* ============================================
   Кнопка
============================================ */


.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.2rem;
    width: fit-content;
    height: fit-content;
    
    /* Стекло и форма */
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 100px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    /* Текст и шрифт */
    color: var(--font-color-primary);
    text-decoration: none;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0.5px;
    
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    
    /* Плавность всех состояний */
    transition: 
        transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        color 0.4s ease;
}

/* 1. Эффект "Ртутной волны" (Заливка) */
.btn::before {
    content: '';
    position: absolute;
    top: 100%; /* Начинаем снизу */
    left: 50%;
    width: 150%;
    aspect-ratio: 1/1;
    background: #fff;
    border-radius: 42%; /* Округлая органика */
    transform: translate(-50%, 0%) scale(0);
    transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    mix-blend-mode: difference;
    z-index: 1;
}

/* 2. Световой блик (Shine) */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transform: skewX(-25deg);
    z-index: 2;
}

/* Состояния Hover */
.btn:hover {
    color: #000; /* Цвет текста станет черным из-за mix-blend или явно */
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px -5px var(--glow-color);
    transform: translateY(-3px);
}

.btn:hover::before {
    transform: translate(-50%, -75%) scale(1.5);
}

.btn:hover::after {
    left: 150%;
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Контент внутри (Текст и SVG) */
.btn > * {
    position: relative;
    z-index: 3; /* Поверх всех эффектов */
    pointer-events: none;
}

/* Анимация иконки */
.btn svg {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:hover svg {
    transform: translateY(2px) scale(1.1);
}

/* Активное состояние (клик) */
.btn:active {
    transform: translateY(-1px) scale(0.97);
    transition: 0.1s;
}

/* ============================================
   Адаптация
============================================ */

@media (max-width: 1180px) {
    .First-section {
        flex-direction: column;
    }

    .logo-main {
        align-self: center;
    }

    .First-section h1 {
        text-align: center;
    }

    .header {
        width: 100%;
        align-items: center;
    }

}

@media (max-width: 1090px) {
    h1 {
        font-size: 8rem;
    }

    .logo-main {
        width: 60%;
        align-self: center;
    }

    .about-me-line {
        width: 120%;
    }

    .about-me {
        width: 100dvw;
        padding: 0 1rem 0 0;
    }

    .about-me-text {
        padding: 0 1rem;
    }

    .about-me-image {
        height: 18rem;
    }

    .portfolio-preview {
        width: 100%;
    }

    .projects-container-preview {
        display:flex;
        width: 100%;
        flex-direction: row;
        gap: 1rem;
        overflow-x: auto;
        padding: 1rem;
    }

    .projects-container-preview::-webkit-scrollbar {
        display: none;
    }

    .skills-container {
        gap: 1rem;
    }
    
    .project-details-accordion {
        position: static;
    }
    
    .project-header-info h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .First-section, .about-me, .experience, .skills-container {
        flex-direction: column;
    }

    .header, .about-me-text, .about-me-image, .experience-text, .experience-title {
        width: 100%;
    }
}

@media (max-width: 600px) {
   .portfolio-preview-header {
        flex-direction: column;
    }
}

@media (max-width: 485px) {
    ::-webkit-scrollbar {
        display: none;
    }

    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .logo-main {
        width: 80%;
    }

    .about-me-text {
        padding-top: 2rem;
    }

    .about-me-image img {
        width: 100%; 
        align-self: center;
    }

    .education {
        padding-bottom: 24rem;
    }

    .social-icons {
        display: none;
    }

    .projects-container {
        display: flex;
        flex-direction: column;
    }

    .project-card {
        width: 100%;
    }

    .blob {
        width: 75vw;
        height: 75vw;
    }

    .bg-mesh {
        filter: blur(120px);
    }
}