@import url('chillax.css');

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

:root {
    /* Цвета */

    --frame-size: ;

    --color-background: #eeeeee;
    --color-text: #333333;
    --color-white: #ffffff;
    --color-shadow: rgba(0, 0, 0, 0.2);

    /* Размеры шрифтов */
    --font-size-small: clamp(0.875rem, 1vw, 1rem);
    --font-size-medium: clamp(1rem, 1.5vw, 1.25rem);
    --font-size-large: clamp(1.625rem, 3vw, 2.625rem);
    --font-size-xlarge: clamp(4.25rem, 10vw, 6.875rem);

    /* Отступы */
    --spacing-small: 0.5rem;
    --spacing-medium: 1rem;
    --spacing-large: 2rem;

    /* Радиусы */
    --border-radius-small: 0.25em;
    --border-radius-medium: 1em;

    /* Анимации */
    --transition-default: 0.3s ease;

    --box-shadow-default: 12px 12px 12px rgba(0, 0, 0, 0.1);
    --box-shadow-card: 0 4px 8px var(--color-shadow);
    --container-padding: min(12.5rem, 5%);
    --card-gap: 1rem;
}

button,
a {
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

body,
html {
    background: var(--color-background);
    color: var(--color-text);

    height: 100vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    font-family: "Chillax-Regular", sans-serif;
}

#typing-text {
    font-weight: 300;
    font-size: var(--font-size-large);
}

body {
    display: flex;
    flex-direction: column;
}

.content {
    display: flex;
    text-align: center;
    justify-content: center;
}

header .btn {
    border: none;
    background-color: none;
    background: none;
    cursor: pointer;
    height: 10%;
}

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

    height: 10vh;
    padding: 20px 10vw;
}

header .logo {
    height: 2rem;
}

header span {
    font-size: 1rem;
}

.frames-container {
    flex: 1;
    position: relative;
    display: flex;
    overflow: visible;
    justify-content: center;
    height: 70%;
}

.frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
    z-index: 1;
}

.frame.active {
    opacity: 1;
    z-index: 2;
}

#welcome .text {
    font-weight: 300;
    font-size: clamp(4.25rem, 10vw, 6.875rem);
}

#welcome .content {
    width: min(670px, 90%);
}

#about-me .content {
    width: 90vw;
}

#stack .content {
    width: 80vw;
}

#stack .card {
    display: flex;
    flex-direction: column;
    gap: 1em;

    width: 18%;
    height: 40%;
    border-radius: 1em;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    transform-style: preserve-3d;
    perspective: 50em;
    will-change: transform;
}

#stack {
    overflow-y: none;
}

#stack .stack_name {
    font-weight: 400;
    font-size: clamp(1.625rem, 3vw, 2.625rem);
    line-height: 120%;
}

#stack .stack_yo_exp {
    font-size: 1rem;
    line-height: 135%;
}

#stack .content img {
    /* height: 4em; */
    height: 30%;
}

#stack .stack_content {
    gap: 0.5em;
    display: flex;
    flex-direction: column;
}

#stack #stack_container {
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    direction: ltr;
    justify-content: center;
    gap: 1rem;
}

.swiper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80vw;
    height: 75vh;
}

.swiper-slide {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    text-align: center;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    will-change: transform;
}

.project-card {
    display: flex;
    flex-direction: row;
    background: var(--color-white);
    border-radius: var(--border-radius-medium);
    box-shadow: 0 4px 8px var(--color-shadow);
    overflow: hidden;
    text-align: center;
    gap: 1rem;
    width: 80%;
    height: 70%;
    padding: var(--spacing-medium);
    margin: auto;
    position: relative;
}

.project-card img {
    height: 100%;
    width: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

.project-img {
    height: 100%;
    width: auto;
}

.project-card .project-info {
    display: flex;
    flex-direction: column;
    text-align: start;
    gap: 2em;
}

.project-card h2 {
    font-size: clamp(1.25rem, 2vw, 2rem);
    color: #000000;
    margin: 10px 0;
}

.project-card p {
    font-size: 1rem;
    line-height: 1.2rem;
    color: #000000;
}

.project-card .stacks-for-project {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.project-card .stack-for-project {
    padding: 0.25rem 0.5rem;
    border-radius: 2rem;
    background-color: rgba(0, 0, 0, 0.05);
}

.card-buttons button {
    display: flex;
    justify-content: center;
    flex-direction: column;
    background: none;
    border: none;
    padding: 1rem 1.625rem;
    font-size: 1rem;
    cursor: pointer;
    align-items: center;
    border-radius: 0.25em;
    position: relative;
    transition: 0.3s;
}

.card-buttons {
    display: flex;
    justify-content: space-between;
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.card-buttons .btn-more {
    box-shadow: 12px 12px 12px rgba(0, 0, 0, 0.1);
    box-shadow: -10px -10px -10px white;
    width: 70%;
}

.card-buttons .btn-link {
    display: flex;
    padding: 0.5rem;
}
.card-buttons .btn-link img {
    width: 3em;
    height: 3em;
    margin-bottom: 0;
}

.swiper-button-prev,
.swiper-button-next {
    --swiper-navigation-color: black !important;
}

.contacts {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    color: black;
}

.contacts .contact {
    display: flex;
    flex-direction: column;
}

.contacts .contact img {
    width: 10em;
    height: 10em;
}

.contacts .contact a {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    color: black;
    text-decoration: none;
}

/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

/* Футер */
footer {
    display: flex;
    justify-content: center;
    align-items: start;
    height: 20%;
    gap: 26px;
    padding: 10px 0;
}

footer .btn {
    display: flex;
    justify-content: center;
    flex-direction: column;
    background: none;
    border: none;
    padding: var(--spacing-medium) calc(var(--spacing-medium) * 1.625);
    font-size: var(--font-size-medium);
    cursor: pointer;
    align-items: center;
    border-radius: var(--border-radius-small);
    position: relative;
    transition: var(--transition-default);
}

footer .btn img {
    display: none;
}

footer .btn.active::after {
    content: "";
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.6rem;
    height: 0.6rem;
    background-color: #333;
    border-radius: 50%;
    opacity: 1;
}

footer .btn::after {
    content: "";
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.6rem;
    height: 0.6rem;
    background-color: #333;
    border-radius: 50%;
    opacity: 0;
    transition:
        opacity 0.3s,
        transform 0.3s;
}

@media (hover: hover) {
    footer .btn:hover::after {
        opacity: 1;
        transform: translateX(-50%) translateY(8px);
    }
    footer .btn:hover {
        box-shadow: 12px 12px 12px rgba(0, 0, 0, 0.1);
        box-shadow: -10px -10px -10px white;
    }

    .card-buttons button:hover {
        box-shadow: 12px 12px 12px rgba(0, 0, 0, 0.1);
        box-shadow: -10px -10px -10px white;
    }
}

@media (hover: none) and (pointer: coarse) {
    .project-card p.about {
        display: none;
    }

    .project-card img,
    .project-img {
        margin-bottom: 0;
        height: auto;
        width: 100%;
    }
    .project-card {
        display: flex;
        flex-direction: column;
        width: 90%;
        height: 90%;
        justify-content: space-between;
        border: 1px solid #ccc;
        border-radius: 8px;
        overflow: hidden;
        padding: 16px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-width: 300px;
    }

    .project-info {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }

    .project-main-info {
        margin-bottom: auto;
    }

    .card-buttons {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        margin-top: 16px;
    }

    .project-card .project-info {
        display: flex;
        flex-direction: column;
        text-align: start;
        justify-content: space-between;
        gap: auto;
    }

    .card-buttons .btn-more {
        display: flex;
    }
    .card-buttons .btn-link {
        box-shadow: 12px 12px 12px rgba(0, 0, 0, 0.1);
        box-shadow: -10px -10px -10px white;
    }

    .card-frame {
        display: flex;
        flex-direction: column;
    }

    #stack_container {
        -webkit-overflow-scrolling: touch;
    }
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }
}

@media (max-width: 800px) {
    .contacts {
        flex-direction: column;
        gap: 1em;
    }

    .contact a {
        gap: 1em;
        align-items: center;
    }

    .contacts .contact img {
        width: 5em;
        height: 5%;
    }

    footer .btn.active::after,
    footer .btn::after {
        top: -0.5rem;
    }

    #stack_container {
        flex-wrap: wrap;
        flex-direction: column;
        max-height: 80%;
        gap: 1rem;
        overflow-x: auto;
        scroll-behavior: smooth;
    }

    #stack_container .card {
        width: 9rem;
        padding: 1rem;
    }

    #stack_container > * {
        flex: 0 0 auto;
    }

    footer .btn img {
        display: flex;
    }

    footer {
        gap: 1rem;
    }

    footer .btn {
        font-size: 0;
        padding: 1rem;
    }

    footer .btn.active {
        font-size: 0;
        padding: 1rem;
    }
}

/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
.hidden {
    display: none;
}

::selection {
    background-color: #333333;
    color: white;
}

::-webkit-selection {
    background-color: #333333;
    color: white;
}

@keyframes fadeOutAndUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
