/* Общие настройки */
* {
    font-family: Arial, Helvetica, sans-serif;
}
body{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;

    /* Фон */
    background-color: black;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}
.wrapper {
    position: relative;
    animation: pageTransition 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}


/* Меню */
aside {
    position: absolute;
    right: 100%;
    margin-right: 20px;
    top: 50%;
    transform: translateY(-50%);
}
.menu ul{
    list-style: none;
    text-align: right;

    /* Запрещаем выделение текста */
    user-select: none; 
    -webkit-user-select: none; /* Поддержка для Safari */
    -moz-user-select: none;    /* Поддержка для старых версий Firefox */
    -ms-user-select: none;     /* Поддержка для Internet Explorer/Edge */
}
.menu a{
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 300;
    font-size: 20px;

    font-size: 20pt;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}
.menu a:hover{
    color: white;
}
.menu__selected a{
    color: white;
}
.menu__selected a:hover{
    text-decoration: none;
}

/* Основная карточка */
.container{
    color: white;
    /* Liquid Glass */
    background-color: rgba(26, 26, 26, 1);
    max-width: 509px;
    min-width: 210px;
    padding: 40px 0px;
    border-radius: 40px;
    background: rgba(26, 26, 26, 0.4); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); /* Поддержка для браузеров Safari */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3),
                inset 0 0 12px rgba(255, 255, 255, 0.05);
}

/* Social */
.icons{
    display: flex;
    gap: 20px
}


/* Main */
.background-main{
    background-image: url(./images/main__background.png);
}
.container__main{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 40px 40px;
}
.container__main__content{
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 11px;
}
.container__main__content__label{
    font-weight: bold;
    font-size: 30pt;
}
.container__main__content__description{
    font-size: 20pt;
}
.icons img{
    width: 30px;
    height: 30px;
    transition: transform 0.2s ease-in-out, filter 0.2s ease-in-out;
}
.icons img:hover {
    transform: scale(1.2); /* Увеличивает иконку на 20% */
}


/* About me */
.background-aboutme{
    background-image: url(./images/aboutme__background.png);
}
.container__aboutme__content{
    flex-direction: column;
    display: flex;
    gap: 25px;
    padding: 0px 40px;
    color: white;
}
.container__aboutme__content p{
    font-size: 15pt;
    margin: 0px;
}
/* Иконки соц сетей */
.social{
    /* Вниз */
    position: absolute;
    top: 100%;
    margin-top: 20px;
    left: 50%;
    transform: translateX(-50%);

    /* Liquid Glass */
    background-color: rgba(26, 26, 26, 1);
    border-radius: 25px;
    background: rgba(26, 26, 26, 0.4); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); /* Поддержка для браузеров Safari */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3),
                inset 0 0 12px rgba(255, 255, 255, 0.05);
}
.social__icons{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 10px 15px;
}
.social__icons img {
    width: 30px;
    height: 30px;
    transition: transform 0.2s ease-in-out, filter 0.2s ease-in-out;
}
.social__icons img:hover {
    transform: scale(1.2); /* Увеличивает иконку на 20% */
}


/* Projects */
.background-projects{
    background-image: url(./images/projects_background.png);
}
.container__projects{
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 0px 40px;
}
.project{
    cursor: pointer;
}
.project__top{
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    color: white;
}
.project__users-count{
    display: flex;
    align-items: center;
    gap: 3px;

    text-align: right;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 300;
    color: white;
    font-size: 15pt;
}
.project__title{
    font-size: 15pt;
    font-weight: bold;
    color: white;
}
.project__description{
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 300;
    color: white;
    font-size: 15pt;
}

/* Модальное окно */
.modal__background{
    display: none;

    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
}
.modal__item{
    flex-direction: column;
    display: flex;
    gap: 24px;
    position: fixed;
    animation: pageTransition 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    margin: 20px;

    /* Liquid Glass */
    background-color: rgba(26, 26, 26, 1);
    max-width: 509px;
    min-width: 210px;
    padding: 40px 40px;
    border-radius: 40px;
    background: rgba(26, 26, 26, 0.4); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); /* Поддержка для браузеров Safari */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3),
                inset 0 0 12px rgba(255, 255, 255, 0.05);
}
.modal__top{
    display: flex;
    justify-content: center;
    text-align: center;
}
.modal_content{
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.modal__title{
    font-size: 20pt;
    font-weight: bold;
    color: white;
    text-decoration: none;
}
.modal__title:hover{
    text-decoration: underline;
}
.modal__tags{
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 300;
    color: white;
    font-size: 15pt;

    display: flex;
    gap: 20px;
}
.modal__tag{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.photos{
    display: flex;
    gap: 20px;
}
.photos img{
    cursor: pointer;
    border-radius: 20px;
    height: 131px;
    transition: transform 0.2s ease-in-out, filter 0.2s ease-in-out;
}
.photos img:hover {
    transform: scale(1.05); /* Увеличивает иконку на 20% */
}
.tags{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.tag{
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    border-radius: 11px;
    color: white;
    padding: 5px 10px;

    /* Запрещаем выделение текста */
    user-select: none; 
    -webkit-user-select: none; /* Поддержка для Safari */
    -moz-user-select: none;    /* Поддержка для старых версий Firefox */
    -ms-user-select: none;     /* Поддержка для Internet Explorer/Edge */
}


/* 404 */
.background-404{
    background-image: url(/images/404_background.png);
}


/* Адаптивная вёрстка */
@media (max-width: 768px) {
    
    /* 1. Настройки экрана */
    body {
        height: auto;
        min-height: 100vh; /* Разрешаем экрану листаться, если контент не влезает */
        padding: 100px 20px 120px 20px; /* Выделяем место сверху под меню и снизу под соцсети */
        box-sizing: border-box;
    }
    
    * {
        box-sizing: border-box; /* Чтобы паддинги не растягивали контейнер шире экрана */
    }

    /* 2. Переносим меню НАВЕРХ контейнера */
    aside {
        position: absolute;
        bottom: 100%; /* Поднимаем НАД верхней границей wrapper */
        top: auto;
        right: auto;
        left: 50%;
        transform: translateX(-50%); /* Центрируем по горизонтали */
        margin-right: 0;
        margin-bottom: 20px; /* Отступ от меню до карточки */
    }

    /* Превращаем вертикальное меню в удобную горизонтальную строчку */
    .menu ul {
        display: flex;
        gap: 20px; 
        text-align: center;
        padding: 0;
        margin: 0;
    }

    .menu a {
        font-size: 16px; /* Уменьшаем размер шрифта ссылок меню */
    }

    /* Уменьшаем аватарку */
    .container__main__avatar img {
        width: 110px;
        height: 110px;
        object-fit: cover;
    }

    /* Уменьшаем шрифты на главной */
    .container__main__content__label {
        font-size: 24px; /* Вместо 30pt */
    }

    .container__main__content__description {
        font-size: 16px; /* Вместо 20pt */
    }

    /* 4. Адаптация страницы "About me" */
    .container__aboutme__content {
        gap: 15px;
    }

    .container__aboutme__content p {
        font-size: 14px; /* Вместо 15pt */
    }

    /* 5. Адаптация страницы "Projects" */
    .container__projects {
        gap: 20px;
    }

    .project__title, .project__description, .project__users-count {
        font-size: 14px; /* Вместо 15pt */
    }
    
    .project__users-count img {
        width: 14px; /* Чуть уменьшаем иконку человечков */
    }

    /* Добавляем адаптацию модалки внутрь медиа-запроса */
    .modal__title {
        font-size: 20px; /* Вместо 20pt */
    }

    .modal__tags {
        font-size: 14px; /* Вместо 15pt */
        flex-wrap: wrap; /* Если теги даты/пользователей не влезут в строку, они перенесутся */
        gap: 12px;
    }

    .modal__item {
        padding: 25px 20px; /* Еще немного уменьшаем отступы на смартфонах */
        gap: 16px;
    }
}

/* 1. Создаем саму анимацию плавного увеличения и проявления */
@keyframes pageTransition {
    from {
        transform: scale(0.98); 
    }
    to {
        transform: scale(1);    
    }
}
