@import "default-styles.css";

body {
    display: flex;
}

.main {
    width: 100%;
    height: 100vh;
    position: relative;
}

.home-button {
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px 20px 20px 60px;
    background-color: var(--c1);

    cursor: pointer;
    user-select: none;
    color: var(--c4);

    font-family: "caveat", serif;
    font-size: 30px;
}

.home-button::before {
    content: "<-";
    font-family: "caveat", serif;
    transition: 0.3s;
    display: block;
    position: absolute;
    transform: translateX(-150%);
}

.home-button:hover::before {
    transform: translateX(-200%);
}

.main:has(.slide:not(.slide_inactive)) {
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    z-index: 3;
}

.slide_inactive {
    pointer-events: none;
}

.slide__block {
    transition: 0.3s transform;
}

.slide__block_hidden {
    transform: scale(0);
}

.hello-slide__block:nth-child(1) {
    background-color: var(--c1);
    grid-row: 3 / 8;
    grid-column: 2 / 4;
}

.hello-slide__block:nth-child(2) {
    background-color: var(--c2);
    grid-row: 1 / 3;
    grid-column: 1 / 4;
}

.hello-slide__block:nth-child(3) {
    background-color: var(--c3);
    grid-row: 3 / 10;
    grid-column: 1 / 2;
}

.hello-slide__block:nth-child(4) {
    background-color: var(--c2);
    grid-row: 10 / 11;
    grid-column: 1 / 3;
}

.hello-slide__block:nth-child(5) {
    background-color: var(--c2);
    grid-row: 8 / 10;
    grid-column: 2 / 4;
}

.hello-slide__block:nth-child(6) {
    background-color: var(--c1);
    grid-row: 10 / 11;
    grid-column: 3 / 7;
}

.hello-slide__block:nth-child(7) {
    background-color: var(--c3);
    grid-row: 6 / 10;
    grid-column: 4 / 6;
}

.hello-slide__block:nth-child(8) {
    background-color: var(--c0);
    grid-row: 1 / 6;
    grid-column: 4 / 7;
}

.hello-slide__block:nth-child(9) {
    background-color: var(--c0);
    grid-row: 1 / 6;
    grid-column: 4 / 7;
}

.hello-slide__block:nth-child(10) {
    background-color: var(--c2);
    grid-row: 1 / 8;
    grid-column: 7 / 10;
}

.hello-slide__block:nth-child(11) {
    background-color: var(--c4);
    grid-row: 6 / 10;
    grid-column: 6 / 7;
}

.hello-slide__block:nth-child(12) {
    background-color: var(--c0);
    grid-row: 8 / 11;
    grid-column: 7 / 10;
}


.hello-slide__block:nth-child(13) {
    background-color: var(--c1);
    grid-row: 1 / 11;
    grid-column: 10 / 11;
}



.hello-slide__block:nth-child(1) {
    position: relative;
}

.hello-slide__photo {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.hello-slide__block:nth-child(2) {
    padding: 15px;
}

.hello-slide__hello-block {
    width: 100%;
    height: 100%;
    text-align: center;
    font-family: 'caveat', serif;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7vh;
}


.hello-slide__block:nth-child(9) {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    font-family: 'caveat', serif;
    font-size: 40px;
}

.hello-slide__about,
.hello-slide__about2 {
    text-align: center;
}


.hello-slide__block:nth-child(10) {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
}

.hello-slide__code-wrapper {
    overflow: hidden;
    width: 100%;
    height: 100%;
    color: var(--c4);
    padding: 20px;
    user-select: none;
    position: relative;
}

.hello-slide__cat-eyes {
    object-fit: contain;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 100%;
    opacity: 0.7;
}

.hello-slide__about2 {
    margin-bottom: 10%;
}

.hello-slide__code {
    animation-name: code-animation;
    animation-duration: 10s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    font-size: 18px;
}

@keyframes code-animation {
    0% {
        transform: translateY(33.3333vh);
    }

    100% {
        transform: translateY(-105%);
    }
}



.hello-slide__block:nth-child(7) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    container-type: size;
}

.hello-slide__next-slide {
    user-select: none;
    cursor: pointer;
    width: 60%;
    filter: hue-rotate(-30deg) brightness(40%);
    transition: 0.2s;
}

.hello-slide__next-slide:hover {
    filter: hue-rotate(-10deg) brightness(70%) sepia(100%);
}

.hello-slide__block:nth-child(7) .hello-slide__text {
    font-size: 35px;
    color: var(--c5);
    text-align: center;
}

@container (width < 200px) {
    .hello-slide__block:nth-child(7) .hello-slide__text {
        font-size: 20px;
    }
}

@media (max-width: 1300px) {
    .hello-slide__block:nth-child(9) {
        font-size: 30px;
    }
}

@media (max-width: 925px) {
    .hello-slide__block:nth-child(13),
    .hello-slide__block:nth-child(11),
    .hello-slide__block:nth-child(3) {
        display: none;
    }

    .hello-slide__block:nth-child(1),
    .hello-slide__block:nth-child(5) {
        grid-column: 1 / 4;
    }

    .hello-slide__block:nth-child(7) {
        grid-column: 4 / 7;
    }

    .hello-slide__block:nth-child(10),
    .hello-slide__block:nth-child(12) {
        grid-column: 7 / 11;
    }

}

@media (max-width: 725px) {
    .hello-slide__block:nth-child(4),
    .hello-slide__block:nth-child(5),
    .hello-slide__block:nth-child(6) {
        display: none;
    }

    .hello-slide__block:nth-child(7) {
        grid-column: 1 / 4;
        grid-row: 8 / 11;
    }


    .hello-slide__block:nth-child(10) {
        grid-row: 4 / 7;
        grid-column: 4 / 11;
    }

    .hello-slide__about2 {
        margin-bottom: 6%;
    }

    .hello-slide__block:nth-child(9) {
        grid-column: 4 / 11;
        grid-row: 1 / 4;
    }

    .hello-slide__block:nth-child(12) {
        grid-row: 7 / 11;
        grid-column: 4 / 11;
    }

    .hello-slide__hello-block {
        font-size: 30pt;
    }
}

@media (max-width: 500px) {
    .hello-slide__block:nth-child(8) {
        display: none;
    }

    .hello-slide__block:nth-child(10) {
        grid-row: 4 / 8;
    }

    .hello-slide__block:nth-child(12) {
        grid-row: 8 / 11;
    }

    .hello-slide__hello-block {
        font-size: 20pt;
    }

    .hello-slide__block:nth-child(10) {
        padding: 10px;
    }
}

@media (max-height: 700px) {
    .hello-slide__block:nth-child(9) {
        padding: 10px;
    }

    .hello-slide__about {
        font-size: 16pt;
    }

    .hello-slide__about2 {
        font-size: 16pt;
    }
}

@media (max-width: 425px) {
    .hello-slide__about2 {
        font-size: 13pt;
    }
}

.about {
    width: 100%;
    min-height: 100vh;
    background-color: var(--c1);
    display: flex;
    justify-content: stretch;
    padding: 10px;
    font-family: 'animatic', serif;
    position: relative;
}

.about__column {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 20px;
    min-width: 300px;
    padding: 0 20px 20px 20px;
}

.about__column:not(:last-child) {
    border-right: 1px solid var(--c5);
}

.about__header {
    font-size: 35pt;
    font-weight: bold;
    align-self: center;
    text-align: center;
    position: sticky;
    top: 0;
    background-color: var(--c1);
    padding: 20px;
}

.list {
    font-weight: normal;
    font-size: 25pt;
}

.list__item .list__item {
    padding-left: 20px;
}

.list__item .list__item:not(:only-child) {
    border-left: 1px solid var(--c3);
}


.project {
    display: flex;
    gap: 10px;
    padding-bottom: 10px;
}

.project_short {
    flex-direction: column;
}

.project:not(:last-child) {
    border-bottom: 1px solid var(--c3);
}

.project__left,
.project__right {
    flex: 1 1 50%;
}

.project__left {

}

.project__img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.project__left:has(.project__no-img:only-child) {
    padding: 20px;
    font-size: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project__no-img {

}

.project__right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.project__right > *:not(:last-child) {
    margin-bottom: 10px;
}

.project__description {
    font-family: 'caveat', serif;
    font-size: 25px;
}

.project__link {
    color: var(--c5);
}


.contacts-button {
    position: fixed;
    top: 20px;
    right: 20px;
    font-family: Arial, serif;
    font-style: italic;
    padding: 10px 20px;
    background-color: red;
    border-radius: 9999px;
    color: white;
    cursor: pointer;
    user-select: none;
    transition: 0.3s;
}

.contacts {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 8;
    display: none;
}

.contacts_shown {
    display: block;
}

.contacts_shown ~ * {
    filter: blur(10px);
}

.contacts__form {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--c2);
    padding: 30px;
    border-radius: 10px;
}

.contacts__close {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background-color: brown;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
    cursor: pointer;
    transition: 0.3s;
}

.contacts__close:hover {
    filter: brightness(0.8);
}

.contacts__close::before,
.contacts__close::after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 30px;
    background-color: white;
    border-radius: 999px;
    transform: translate(-50%, -50%) rotate(45deg);
}

.contacts__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.contacts__body {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 10px;
}

.contacts__item {
    display: flex;
    gap: 10px;
}

.contacts__label {
    user-select: none;
}

.contacts__label::after {
    content: ':';
}

.contacts__link {
    user-select: all;
    color: var(--c5);
}

a.contacts__link {
    user-select: auto;
}

a.contacts__link:visited {
    color: var(--c5);
}

.contacts-button:hover {
    filter: hue-rotate(90deg);
}


@media (max-width: 1400px) {
    .about {
        padding-top: 80px;
    }

    .about__header {
        top: 80px;
    }
}

@media (max-width: 1200px) {
    .project {
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .about {
        flex-direction: column;
    }

    .about__column:not(:last-child) {
        border-right: none;
    }
}

@media (max-width: 600px) {
    .contacts__item {
        flex-direction: column;
        font-size: 20px;
    }

    .contacts__form {
        padding: 10px;
    }

    .contacts__close {
        transform: translate(-50%, -50%) scale(0.7);
    }
}

@media (max-width: 500px) {
    .home-button {
        font-size: 20px;
    }

    .contacts-button {
        font-size: 20px;
    }
}

@media (max-width: 380px) {
    .contacts__item {
        font-size: 15px;
    }
}