@font-face {
    font-family: "Kreadon";
    src: url("./fonts/Kreadon-B.otf");
}

* {
    padding: 0;
    margin: 0;
    font-family: "Kreadon";
    color: rgb(214, 210, 224);
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

html{
    scroll-behavior: smooth;
}

html::-webkit-scrollbar {
    width: 0;
}

body {
    position: relative;
    min-height: 100vh;
}


main, header, footer {
    z-index: 2;
    display: flex;
}

main {
    justify-content: center;
    align-items: center;
    width: 100vw;
    min-height: 100vh;
    padding-top: 100px;
}

header {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 50px;
    background-color: rgba(5, 0, 14, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 10px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 20px 0;
}

.logo p{
    font-size: 30px;
}

nav {
    display: flex;
    flex-direction: row;
    gap:40px
}

nav a{
    text-decoration: none;
    font-size: 20px;
    position: relative;
}

nav a::after {
    position: absolute;
    content: "";
    transform-origin: center;
    width: 100%;
    transform: scale(0);
    transition: 0.3s;
    background-color: white;
    height: 2px;
    bottom: 0;
    left: 0;
}

nav a:hover::after{
    transform: scale(1);
}

.container {
    width: 80%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 150px;
    align-items: center;
}

.hello p{
    font-size: 75px;
}

span{
    display: inline-block;
}

.hello span:nth-child(1){
    font-size: 100px;
    animation: slide-Y 0.4s forwards;
    opacity: 0;
    transform: translateY(-50px);
}

@keyframes slide-Y{
    to{
        opacity: 1;
        transform: translateY(0);
    }
}

.hello span:nth-child(3){
    animation: slide-X 0.4s forwards;
    animation-delay: 0.2s;
    opacity: 0;
    transform: translateX(-50px);
}

@keyframes slide-X{
    to{
        opacity: 1;
        transform: translateX(0);
    }
}


.hello span:nth-child(4){
    animation: slide-X 0.4s forwards;
    animation-delay: 0.2s;
    opacity: 0;
    transform: translateX(50px);
}

.hello span:nth-child(6){
    animation: slide-Y 0.8s forwards;
    animation-delay: 0.4s;
    opacity: 0;
    transform: translateY(50px);
    color: rgb(99, 75, 255);
}

.hello-container img{
    width: 35%;
    min-width: 450px;
    height: 300px;
    opacity: 0;
    animation: opc 0.8s forwards;
    animation-delay: 0.6s;
    transition: 0.3s;
    border-radius: 10px;
}

@keyframes opc {
    to{
        opacity: 1;
    }
}


.hello-container {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    height: 70vh;
}

.about-container {
    width: 85%;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
}

legend, .name {
    font-size: 32px;
    color: rgb(138, 120, 255);
}

fieldset{
    border: 1px solid rgba(35, 0, 80, 0.7);
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(15, 0, 42, 0.7);
    backdrop-filter: blur(2px);
}

.description {
    width: 60%;
    height: 90%;
    font-size: 24px;
    position: relative;
}

.description::after{
    position: absolute;
    content: '';
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(30px);
    width: 1px;
    height: 100%;
    background-color: rgba(35, 0, 100, 0.7)
}

.icons {
    width: 15%;
    height: 90%;
}

.icons img{
    margin: 10px;
}

.hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.works, .services {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}



.cards{
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 50px
}

.card, .service {
    width: 25%;
    min-width: 300px;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 20px 0;
    align-items: center;
    background-color: rgba(15, 0, 42, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(35, 0, 100, 0.7);
    border-radius: 10px;
    transition: 0.3s;
}

.service{
    font-size: 20px;
    height: 400px;
}

.card {
    font-size: 56px;
    text-align: center;
}

.card:hover, .service:hover {
    transform: translateY(-10px);
    border: 1px solid rgba(35, 0, 200, 0.7);
}


.service::before {
    position: absolute;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(35, 0, 100, 0.3);
    content: '';
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    z-index: 1;
}

.service p{
    z-index: 2;
}

ul {
    display: flex;
    gap: 40px;
    flex-direction: column;
}

li {
    border-bottom: 1px solid rgb(99, 75, 255);
}

li::marker{
    color: rgb(99, 75, 255);
}

footer{
    margin-top: 50px;
    width: 100%;
    height: 100px;
    background-color: rgba(10, 0, 50, 0.6);
    backdrop-filter: blur(4px);
    position: relative;
}

footer::after{
    position: absolute;
    content: "© 2026 Иванников И.• Fullstack developer";
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
}

.contact {
    width: 50%;
    height: 400px;
    display: flex;
    flex-direction: row;
}
.direct-contact {
    height: 100%;
    width: 30%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.direct-contact::after {
    position: absolute;
    content: '';
    width: 1px;
    height: 90%;
    right: 0;
    background-color: rgba(35, 0, 100, 0.7);
}

.icon-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-contact img {
    width: 70px;
}

.contact form {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 50px;
    width: 40%;
    min-height: 100%;
}

input {
    width: 100%;
    height: 40px;
    background-color: transparent;
    border: 0;
    border-bottom: 1px solid rgba(35, 0, 150);
    font-size: 18px;
}

input:focus{
    outline: none;
}

button {
    width: 200px;
    align-self: center;
    height: 50px;
    border-radius: 10px;
    background-color: rgb(99, 75, 255);
    border: 0;
    transition: 0.3s;
    cursor: pointer;
    font-size: 20px;
}

button:hover{
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(35, 0, 100, 0.7);
}

div, fieldset {
    flex-wrap: wrap;
    justify-content: center;
}


.success-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
}

.checkmark {
    width: 50px;
    height: 50px;
}

.checkmark__circle {
    stroke: #4caf50;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    stroke: #4caf50;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}


.error-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
}

.crossmark {
    width: 50px;
    height: 50px;
}

.crossmark__circle {
    stroke: #f44336;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.crossmark__cross {
    stroke: #f44336; 
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s 0.4s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

.notification {
    transition: opacity 0.3s ease;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: opc 0.4s forwards;
}

@keyframes ops {
    to {
        opacity: 1;
    }
}

.notification-content{
    text-align: center;
    height: 120px;
    background-color: rgba(35, 0, 100, 0.7);
    border-radius: 10px;
    transform: translateY(-30px);
    opacity: 0;
    animation: slide 0.6s forwards;
    animation-delay: 0.2s;
    padding: 0 10px;
}

@keyframes slide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.hide {
    animation: none;
    opacity: 0;
    visibility: hidden;
}

@media (max-width: 768px) {

    nav{
        gap: 10px;
    }

    nav a{
        font-size: 15px;
    }

    body {
        min-width: 100vw;
        height: 100vh;
    }

    main{
        min-width: 100%;
        min-height: 100%;
    }
    
    div, fieldset{
        justify-content: center;
        align-items: center;
        padding: 0 !important;
    }

    fieldset{
        text-align: center;
    }

    legend{
        display: inline-block;
    }

    .about-container p{
        font-size: 14px;
        margin: 0;
        text-align: start;
    }

    .about-container {
        flex-direction: column;
        justify-self: start;
        gap: 20px;
    }

    .description{
        margin: 0;
        padding: 0;
        text-indent: 0;
        width: 80%;
        padding-top: 10px;
    }

    .icons{
        width: 80%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .icons img{
        width: 40px;
        height: 40px;
    }

    .description::after{
        top: auto;
        transform: none;
        left: auto;

        width: 100%;
        height: 2px;
        bottom: 0;
        right: 0;
        transform: translateY(10px);
    }

    .container {
        gap: 25px;
    }
    
    .hello p{
        text-align: center;
        font-size: 45px;
    }
    span:nth-child(1){
        font-size: 2px;
    }

    #gif {
        display: none;
    }

    .contact {
        width: 100%;
        flex-direction: column;
    }


    .direct-contact {
        display: flex;
        flex-wrap: nowrap;
        flex-direction: row;
    }
    .icon-contact img {
        width: 35px;
        height: 35px;
    }
    .icon-contact label {
        display: none;
    }

    .direct-contact::after {
        top: auto;
        left: auto;

        width: 100%;
        height: 1px;

        bottom: 0;
        transform: translateY(20px);
    }

    .contact {
        padding-top: 20px;
        gap: 50px;
    }

    .contact form {
        width: 70%;
        margin: 0;
    }

    footer{
        height: 50px;
    }

    footer::after{
        text-align: center;
        bottom: 50%;
        left: 50%;
        transform: translateY(50%) translateX(-50%);
    }
    .service p {
        margin: 10px 0;
    }
}