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

html {
    scroll-behavior: smooth;
}

body {
    font-family: sans-serif;
    line-height: 1.6;

    background-color: #000000;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 15px 30px;

    background-color: #d8d8d8f3;
    color:black;

    position: sticky;
    top: 0;

    z-index: 100;

    box-shadow: 0 3px 5px rgba(255, 255, 255, 0.747);
}

.logo {
    font-size: 25px;
    font-weight: bold;
    user-select: none;

    transition: all 0.1s ease;
}

.logo:active {
    transform: scale(1.2);
    text-shadow: 0 0 2px #000000;
    transition: all 0.5s;
}

.site-header a {
    text-decoration: none;
    color: black;
}

.main-nav {
    width: 67%;
    max-width: 350px;

    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 5px;

    padding: 5px 20px;

    border: 2px solid #adadad;
    border-radius: 30px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.main-nav a {
    transition: all 0.2s ease;
    padding: 5px 6px;
}

.main-nav a:hover {
    max-height: 50%;

    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-weight: bold;
    color: rgb(0, 0, 0);

    box-shadow: 0 0 15px 0px rgb(121, 121, 121);
}

.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;

    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
        url("images/photo_2025-11-06_20-46-01.jpg");
    background-size: cover;
    background-position: center;

    font-weight: bold;

    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 150px;

    background: linear-gradient(to top, rgb(17, 0, 11), transparent);
}

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

.hero-content h1 {
    font-size: 70px;
    color: black;
    -webkit-text-stroke: 2px;
    -webkit-text-stroke-color: white;
    text-shadow: 0px 0px 15px red;

    transition: all 0.4s ease;
}

.hero-content h1:hover {
    font-size: 100px;
    text-shadow: 0px 0px 15px rgb(255, 255, 255);
}

.hero-content p {
    font-size: 30px;
    color: black;
    -webkit-text-stroke: 1px;
    -webkit-text-stroke-color: white;
    text-shadow: 0px 0px 10px red;

    transition: all 0.4s ease;
}

.hero-content p:hover {
    font-size: 40px;
    text-shadow: 0px 0px 10px rgb(255, 255, 255);
}

.portfolio {
    color: white;
    padding: 2vh 6vh;
    background-color: rgb(17, 0, 11);
}

.section-title {
    text-align: center;
    font-size: 50px;
    margin-bottom: 20px;
    padding-left: 0;
    padding-right: 0;
    padding-top: 70px;

    user-select: none;

    line-height: 1;

    transition: all 0.4s ease;
}

.section-title:hover {
    font-size: 70px;
    text-shadow: 0 0 15px #f706ff49;
}

.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;

    gap: 30px;

    padding: 30px;
    background-color: #ebe1e149;
    border-radius: 15px;
    box-shadow: 0 0 15px 5px #000000;
}

.card {
    width: 350px;

    background-color: #ebe1e149;
    border-radius: 15px;
    box-shadow: 0 2px 15px #000000;

    transition: all 0.4s ease;

    user-select: none;

    overflow: hidden;
    position: relative;
}

.image-box {
    position: relative;
}

.card-content {
    display: flex;
    flex-direction: column;
    padding: 15px;
    flex-grow: 1;

    transition: all 0.6s ease;
}

.card-image {
    border-radius: 15px 15px 0 0 ;
    object-fit: cover;
    width: 100%;
    height: 350px;
}

.card:hover {
    transform: translateY(-0.5%);
    box-shadow: 0 2px 15px #ffffff;
}

.card-button {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    
    padding: 10px;
    text-align: center;

    background-color: #ebe1e1;
    border-radius: 15px;

    text-decoration: none;
    color: #000000;
    box-shadow: 0 0 5px #ffffff;

    opacity: 0;
    transform: translateY(60px);
    transition: all 0.6s ease;
}

.card:hover .card-button {
    opacity: 1;
    transform: translateY(0);
}

.card:hover .card-content {
    padding-bottom: 60px;
}

.card-button:hover {
    background-color: rgb(70, 0, 21);
    color: white;
    font-weight: bold;
    box-shadow: 0 0 10px 2px #000000;
}

.card-button:active {
    transform: scale(0.98);
    box-shadow: 0 0 2px #000000;
}

#site-card {
    position: relative;
}

#mika-card {
    position: relative;
}

.click-nose-mika {
    position: absolute;
    color: white;
    border-radius: 50%;

    width: 20px;
    height: 20px;

    left: 42.5%;
    top: 49%;
}

.click-nose-site {
    position: absolute;
    color: white;
    border-radius: 50%;

    width: 30px;
    height: 30px;

    left: 60%;
    top: 46%;
}

.site-footer-bottom {
    background-color: #d8d8d8;
    color:black;
    padding: 10px;

    box-shadow: 0 -1px 5px #d8d8d8;

    text-align: center;
}


@keyframes click-effect_animation {
    from {
        transform: scale(0.2) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: scale(50) rotate(70deg);
        opacity: 0;
    }
}

.click-symbol {
    position: fixed;

    font-size: 30px;
    color: white;
    
    user-select: none;
    display: none;

    animation: click-effect_animation 1.2s ease-out;
}

/* =================================================== */
/*          АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ          */
/* =================================================== */

/* Применяем стили, если ширина экрана 768px или меньше */
@media (max-width: 768px) {

    .site-header {
        /* Лого и навигация встают друг под другом */
        flex-direction: column;
        padding: 15px;
        /* Добавляем вертикальный отступ между лого и навигацией */
        gap: 15px;
    }

    .main-nav {
        /* Элементы внутри "таблетки" снова горизонтальны */
        flex-direction: row; 
        
        /* Заставляем "таблетку" занять всю доступную ширину */
        width: 100%; 
        
        /* Равномерно распределяем ссылки внутри "таблетки" */
        justify-content: space-around;
        
        /* Убираем лишние отступы, которые были у ссылок */
        padding: 5px;
    }

    .main-nav a {
        /* Убираем внешний отступ, так как justify-content делает всю работу */
        margin-left: 0;
        /* Можно немного уменьшить внутренний отступ для компактности */
        padding: 5px 8px;
    }

    .hero-content h1 {
        font-size: 48px; /* Уменьшаем размер */
        color: white;    /* Делаем текст чисто белым для максимального контраста */

        /* Убираем и обводку, и тень, которые могут давать артефакты */
        -webkit-text-stroke: none;
    }

    .hero-content p {
        font-size: 24px;
        color: white;
        -webkit-text-stroke: none;
    }

    .portfolio {
        /* Уменьшаем боковые отступы секции */
        padding: 50px 20px;
    }

    .portfolio-grid {
        /* Уменьшаем внутренние отступы сетки */
        padding: 20px;
    }

    .section-title {
        font-size: 36px; /* Было 50px */
        padding-top: 20px;
    }

    /* Карточки автоматически перестроятся благодаря flex-wrap,
       но мы можем немного уменьшить их высоту на всякий случай */
    .card-image {
        height: 250px;
    }
}