html{
    scroll-behavior: smooth;
    font-size: max(3vw, 20px);
    /* -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale; */
}
body {
    line-height: 1;
    background-color: #121216;
    margin: 0;
    color: #FFFFFF;
}

a {
    text-decoration: none;
}

button {
    padding: 0;
    border: none;
    background: none;
    text-decoration: none;
    font: inherit;
}

ul,
ol,
li {
    list-style: none;
    margin: 0;
}

h1 {
    all: unset;
}

:root {
    --link-color: #464FEE;
}
/* wrapper
/* ======================================= */
.wrapper {
    min-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* media requests
/* ======================================= */
[class*="__container"] {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 15px;
}

@media (max-width: 1199.98px) {
    [class*="__container"] {
        max-width: 970px;
    }
}

@media (max-width: 990.98px) {
    [class*="__container"] {
        max-width: 750px;
    }
}

@media (max-width: 767.98px) {
    [class*="__container"] {
        max-width: none;
    }
}

@media (min-width: 2200px) {
    [class*="__container"] {
        max-width: 2000px;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(50px); 
    animation: fadeIn 2s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* header
/* ======================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    transition: background-color 0.5s ease;
}

.header.scrolled{
    background-color: #121216;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px, 0px;
}

.header__logo {
    /* width: 52px;
    height: 73px; */
    width: max(2.8vw, 52px);
    height: auto;
    padding: 5px;
}

.logo__image {
    /* width: 52px;
    height: 73px; */
    width: max(2.8vw, 52px);
    height: auto;
}

/*.header__menu {    }*/
.header__menu_icon {
    display: none;
}

/* menu
/* ======================================= */
/*.menu {}*/
.menu__list {
    display: flex;
    align-items: flex-start;
    /* gap: 25px; */
    gap: 2vw;
}

.menu__item {
    display: flex;
    padding: 8px 14px;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.menu__link {
    position: relative;
    transition: color 0.3s ease-in-out;
    color: var(--shade1, #FFF);
    /* font-size: 16px; */
    font-size: max(1vw, 16px);
    font-style: normal;
    font-weight: 600;
    line-height: 150%;
    /* 150% */
}
.menu__link::before{
    content: '';
    position: absolute;
    top: 100%;
    width: 100%;
    height: 3px;
    background-color: #464FEE;
    transform: scaleX(0);
    transition: transform 0.3s ease-in-out;
}

.menu__link:hover {
    color: #464FEE;
}

.menu__link:hover::before {
    transform: scaleX(1);
}

.menu__link_games {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #464FEE;
    font-size: max(1vw, 16px);
    font-weight: 600;
    line-height: 150%;
}

.menu__ext {
    flex: none;
}

.header__right_side {
    display: flex;
}

/* translator
/* ======================================= */
/*.header__translator {}*/
.translator__list {
    display: flex;
    gap: 10px;
}

/*.translator__item {}*/
#en {
    color: var(--shade1, #FFF);
    font-family: "Lexend Deca";
    /* font-size: 20px; */
    font-size: max(1.2vw, 18px);
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    /* 120% */
    padding: 3px;
}

#ua {
    color: var(--shade1, #FFF);
    font-family: "Lexend Deca";
    /* font-size: 20px; */
    font-size: max(1.2vw, 18px);
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    /* 120% */
    padding: 3px
}

.translator__item {
    transition: background-color 0.5s ease, color 0.5s ease;
    /* Додаємо плавність для фону та кольору тексту */
    cursor: pointer;
    /* Змінює курсор для наочності */
}

.translator__selected {
    background-color: #464FEE;
    border-radius: 5px;
    color: #FFF;
    /* Щоб текст залишався читабельним */
}

.en-style {
    font-family: "Lexend Deca";
}

.ua-style {
    font-family: "Geologica";
}


/* ======================================= */
/* .page {}

.page__main {} */

.main-block {
    position: relative;
}

.main-block__container {
    display: block;
    justify-content: center;
}

.main-block__logo {
    width: 100%;
    height: 75vh;
    display: block;
    position: relative;
    touch-action: none;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.page__background_gradient {
    top: 0;
    right: 0px;
    position: absolute;
    /*width: 510.712px;
    height: 1109.345px;*/
    width: 30.61vw;
    height: 92.45vh;
    transform: rotate(51.133deg);
    flex-shrink: 0;
    border-radius: 233.5px;
    background: linear-gradient(180deg, rgba(71, 79, 236, 0.27) 0%, rgba(69, 78, 234, 0.27) 100%);
    filter: blur(9vw);
    z-index: -10;
}

.page__background_gradient2 {
    bottom: 0;
    left: 0px;
    position: absolute;
    /*width: 250px;
    height: 654px;*/
    width: 13.02vw;
    height: 54.5vh;
    flex-shrink: 0;
    background: rgba(88, 120, 246, 0.25);
    filter: blur(8vw);
    z-index: -10;
}

.main-block__heading {
    position: relative;
    top: -12vh;
    margin: 0 5%;
    color: #FFF;
    /*font-size: 90px;*/
    font-size: max(6vw, 28px);
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    /* 108px */
    letter-spacing: -0.9px;
    text-transform: capitalize;
}

.main-block__heading_TheDeiw {
    color: #464FEE;
}

.main-block__sub-heading {
    margin-top: 2vh;
    color: #FFF;
    /*font-size: 32px;*/
    font-size: max(2vw, 14px);
    font-style: normal;
    padding-right: 5%;
    font-weight: 150;
    line-height: 118%;
    /* 37.76px */
    letter-spacing: -0.32px;
    text-transform: none;
}

/* ======================================= */
.page__about_me {
    padding-top: 10vh;
    padding-bottom: 10vh;
    position: relative;
}

.about_me__container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section_name {
    text-align: left;
    width: 100%;
}

.section_name__heading {
    /* font-size: 48px; */
    font-size: max(3vw, 20px);
    font-style: normal;
    font-weight: 700;
    line-height: 150%;
    /* 72px */
}

.about_me__card {
    display: flex;
    width: 70%;
    /*height: 351px;*/
    padding: 0.5rem;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid #30363D;
    background: rgba(22, 27, 34, 0.80);
}

.card__avatar_name {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.avatar_name__avatar {
    /* width: 150px;
    height: 150px; */
    width: max(10vw, 100px);
    height: max(10vw, 100px);
    border-radius: 35px;
    border: 1px solid #30363D;
}

/* .avatar_name__name {

} */

.name__my_name {
    /* font-size: 25px; */
    font-size: max(1.7vw, 18px);
    font-style: normal;
    font-weight: 400;
    line-height: 136.023%;
}

.name__small_description {
    color: #C9D1D9;
    font-feature-settings: 'salt' on;
    /* font-size: 16px; */
    font-size: max(1.2vw, 14px);
    font-style: normal;
    font-weight: 200;
    line-height: 143.75%; 
}

.card__desctiption {
    color: #C9D1D9;
    font-feature-settings: 'salt' on;
    /* font-size: 16px; */
    font-size: max(1vw, 13px);
    font-style: normal;
    font-weight: 200;
    line-height: 168.75%; 
}

/* ======================================= */
.about_me__links_table {
    margin-top: 25px;
    width: 65%;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 колонки */
    gap: 12px;
    justify-items: center;
}

.link_block {
    display: flex;
    align-items: center;
    /* width: 175px; */
    width: 11vw;  /* (175 / 1920) × 100 ≈ 9.1146vw */
    /* padding: 6px 10px 6px 10px; */
    padding: 0.15rem 0.3rem;
    gap: 0.5rem;
    border-radius: 10px;
    border: 1px solid #30363D;
    background: rgba(22, 27, 34, 0.70);
    transition: all 0.5s ease-in-out;
}
.link_block:hover {
    background: var(--link-color);
    box-shadow: 0px 0px 15px 0px var(--link-color);
    transition: all 0.5s ease-in-out;
}

.link_block__image {
    align-self: left;
    width: 2vw;  /* (30 / 1920) × 100 = 1.5625vw */
    height: auto;
}
.link_block__text {
    width: 100%;
    color: #FFF;
    text-align: center;
    font-family: Fredoka;
    /* font-size: 20px; */
    font-size: 1.3vw;  /* (20 / 1920) × 100 ≈ 1.0417vw */
    font-style: normal;
    font-weight: 500;
    line-height: 130%; /* 26px */
}

.page__background_gradient3{
    top: 0;
    left: 30%;
    position: absolute;
    width: 28.27vw;
    height: 87.86vh;
    transform: rotate(75.076deg);
    flex-shrink: 0;
    border-radius: 233.5px;
    background: linear-gradient(180deg, rgba(71, 79, 236, 0.27) 0%, rgba(69, 78, 234, 0.27) 100%);
    filter: blur(10vw);
    z-index: -10;
}

/* ======================================= */
.page__games_projects__container {
    padding-top: 10vh;
    padding-bottom: 10vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.projects_games__project_block {
    margin-bottom: 1rem;
    display: flex;
    gap: 5%;
    padding: 1rem;
    align-items: flex-start;
    border-radius: 24px;
    border: 1px solid var(--shade-3, #3B3B3B);
    background: rgba(22, 27, 34, 0.50);
    /* min-height: 50vh; */
}

.projects_games__project_block.inverse {
    flex-direction: row-reverse;
}
.project_block__description {
    position: relative;
    align-items: flex-start;
    flex: 3;
    gap: 15px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.project_block__description_text_box{
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.project_block__name {
    /* font-size: 32px; */
    font-family: "Lexend Deca";
    font-size: max(2.2vw, 24px);
    font-style: normal;
    font-weight: 700;
    line-height: 130%;
}
.project_block__type {
    /* font-size: 14px; */
    font-size: max(0.9vw, 11px);
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}
.project_block__description_text {
    align-self: stretch;
    color: #B3B3B3;
    /* font-size: 18px; */
    font-size: max(1.1vw, 14px);
    font-style: normal;
    font-weight: 200;
    line-height: 150%;
}
.project_block__link {
    display: inline-block;
    color: #FFF;
    padding: 0.2rem 0.4rem;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #FFF;
    font-size: max(1vw, 14px);
    font-style: normal;
    font-weight: 600;
    line-height: 150%;
    transition: all 0.5s ease-in-out;
}
.project_block__link:hover {
    background-color: color-mix(in srgb, var(--link-color) 50%, transparent);
    box-shadow: 0px 0px 15px 0px var(--link-color);
}

.project_block__img {
    flex: 6;
    flex-basis: 0;
    min-width: 0;
    height: 100%;
    border-radius: 10px;
}

.project_block__gradient_color{
    position: absolute;
    left: 25%;
    top: 25%;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    /* background: #c89b14; */
    background: var(--link-color);
    opacity: 0.4;
    filter: blur(120px);
    z-index: 0;
}

/* ======================================= */
.projects_games__github_block{
    margin: 1rem 0;
    width: 40%;
    align-self: center;
    position: relative;
}
.github_block__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.github_block__img {
    width: 40%;
    height: auto;
}
.github_block__text {
    text-align: center;
    /*font-size: 32px;*/
    font-size: max(2.2vw, 18px);
    font-style: normal;
    font-weight: 650;
    line-height: 111%;
}
.project_block__link.github_block {
    --link-color: #6e5494;
}
.github_block__gradient {
    top: 25%;
    left: 24%;
    position: absolute;
    width: 60%;
    height: 60%;
    border-radius: 100%;
    background: rgba(110, 10, 161, 0.60);
    filter: blur(120px);
    z-index: -10;
}

.footer__container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}
.footer__text{
    color: var(--shade-2, #B3B3B3);
    font-family: "Lexend Deca";
    font-size: max(1vw, 8px);
    font-style: normal;
    font-weight: 400;
    line-height: 171.429%; 
}

/* ======================================= games ring */
.games-wrap {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}
.games-stage {
    position: relative;
    width: 100%;
    height: clamp(640px, 82vh, 780px);
}
.games-stage canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: pan-y;
}
.games-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    list-style: none;
}
/* Картка повторює блок з розділу Projects: ті самі класи шрифтів, відступи, рамка й радіус. */
.games-card {
    position: absolute;
    right: 104px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: var(--games-card-w, min(56%, 620px));
    box-sizing: border-box;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 24px;
    border: 1px solid var(--shade-3, #3B3B3B);
    background: rgba(22, 27, 34, 0.92);
}
.games-card[hidden] {
    display: none;
}
.games-card__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 10px;
    background: #16161b;
}
.games-card .project_block__link {
    align-self: flex-start;
}
.games-card > :not(.project_block__gradient_color) {
    position: relative;
    z-index: 1;
}
.games-card__hint {
    margin: 0;
    font-size: 14px;
    color: #a9a9b6;
}
.games-click {
    position: absolute;
    transform: translate(-50%, 0);
    padding: 3px 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(27, 27, 36, 0.9);
    color: #fff;
    font: 500 12px "Lexend Deca";
    white-space: nowrap;
    pointer-events: none;
}
.games-click[hidden] {
    display: none;
}
/* Керування відкритою грою: поза карткою, по боках сцени. */
.games-arrow,
.games-back {
    position: absolute;
    z-index: 6;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(22, 27, 34, 0.9);
    color: #fff;
    font-family: "Lexend Deca";
    cursor: pointer;
}
.games-arrow:hover,
.games-back:hover {
    background: rgba(255, 255, 255, 0.12);
}
.games-arrow {
    top: 50%;
    width: 64px;
    height: 64px;
    margin-top: -32px;
    border-radius: 50%;
    font-size: 40px;
    line-height: 1;
}
.games-arrow--prev {
    left: 0;
}
.games-arrow--next {
    right: 0;
}
.games-back {
    left: 0;
    top: 0;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 18px;
}
.games-back::before {
    content: "\2190\00a0";
}
.games-wrap.is-open .games-arrow,
.games-wrap.is-open .games-back {
    display: flex;
}
@media (min-width: 2200px) {
    .games-wrap {
        max-width: 1400px;
    }
}
/* Фонові розмиті еліпси, як у hero. */
#games {
    position: relative;
}
.games-glow {
    position: absolute;
    pointer-events: none;
    z-index: -10;
}
.games-glow--a {
    top: 0;
    right: -6%;
    width: 30.61vw;
    height: 60vh;
    transform: rotate(51.133deg);
    border-radius: 233.5px;
    background: linear-gradient(180deg, rgba(71, 79, 236, 0.27) 0%, rgba(69, 78, 234, 0.27) 100%);
    filter: blur(9vw);
}
.games-glow--b {
    bottom: 0;
    left: -6%;
    width: 20vw;
    height: 45vh;
    background: rgba(88, 120, 246, 0.25);
    filter: blur(8vw);
}
.games-subtitle {
    margin: -0.6rem 0 0;
    color: #B3B3B3;
    font-size: max(1.1vw, 14px);
    font-weight: 200;
    line-height: 150%;
}
/* Блок Itch.io: той самий, що GitHub, але червоний. */
.project_block__link.itch_block__link {
    --link-color: #fa5c5c;
}
.github_block__gradient.itch_block__gradient {
    background: rgba(250, 92, 92, 0.5);
}
.itch_block__img {
    width: 46%;
}
