@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');
@import url('https://cdn.fontcdn.ir/Font/Vazir/Vazir.css');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

html{
    font-size: 62.5%;
}

body{
    font-family: 'Vazir', sans-serif;
    line-height: 1.8;
    font-size: 1.6rem; /* متن‌های عادی */
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    color: black;
    direction: rtl;
    text-align: right;

    /* پس‌زمینه هوش مصنوعی */
    background: linear-gradient(135deg, #0ff, #8f00ff, #ff0080, #0ff);
    background-size: 400% 400%;
    animation: aiBackground 12s ease infinite;
}

@keyframes aiBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


header{
    margin-top: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 9%;
    background-color: transparent;
    filter: drop-shadow(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo{
    font-size: 3rem;
    color: black;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo:hover{
    transform: scale(1.1);
}

nav a{
    font-size: 1.8rem;
    color: black;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-right: 4rem;
    margin-left: 0; /* چون RTL شد نیازی به margin-left نیست */
}

nav a:hover,
nav a.active{
    color: black;
    border-bottom: 3px solid black;
}

@media(max-width:995px){
    nav{
        position: absolute;
        display: none;
        top: 0;
        right: 0;
        width: 40%;
        border-left: 3px solid black;
        border-bottom: 3px solid black;
        border-bottom-left-radius: 2rem;
        padding: 1rem solid;
        background-color: #161616;
        border-top: 0.1rem solid rgba(0,0,0,0.1);
    }

    nav.active{
        display: block;
    }

    nav a{
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    nav a:hover,
    nav a.active{
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: 0.5rem solid #3852d2;
    }
}

section{
    min-height: 100vh;
    padding: 5rem 9% 5rem;
}

.home{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;

}

.home .home-content h1{
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

span{
    color: rgb(255, 255, 255);
}

.home-content h3{
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p{
    font-size: 1.6rem;
}

.home-img{
    border-radius: 0;
}

.home-img img {
    width: 32vw;
    border-radius: 0;  /* مستطیلی */
    cursor: pointer;

    animation: upDown 3s ease-in-out infinite;

    /* افکت نئونی زیبا و تمیز */
    box-shadow:
        0 0 25px rgba(0, 255, 255, 0.7),
        0 0 45px rgba(143, 0, 255, 0.5),
        0 0 70px rgba(255, 0, 128, 0.4);

    transition: 0.3s ease;

    filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.6));
}

.home-img img:hover {
    transform: scale(1.05);

    box-shadow:
        0 0 35px rgba(0, 255, 255, 0.9),
        0 0 65px rgba(143, 0, 255, 0.6),
        0 0 95px rgba(255, 0, 128, 0.6);

    filter: drop-shadow(0 0 18px rgba(255, 0, 128, 0.9));
}

/* همان انیمیشن تو ولی نرم‌تر */
@keyframes upDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}


.social-icons a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid black;
    font-size: 2rem;
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
    color: black;
}

.social-icons a:hover{
    color: black);
    transform: scale(1.3) translateY(-5px);
    background-color: rgb(255, 255, 255);
    box-shadow: 0  0 25px rgb(255, 255, 255);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.3rem;
    cursor: pointer;
    border-radius: 4rem;
    border: 2px solid transparent;
    color: #fff;

    /* استایل هوش مصنوعی */
    background: linear-gradient(135deg, #0ff, #8f00ff, #ff0080);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;

    transition: 0.3s ease;
    box-shadow: 0 0 15px rgba(0,255,255,0.4);
}

.btn:hover {
    transform: scale(1.07);

    /* افکت درخشش هوش مصنوعی */
    box-shadow: 
        0 0 20px #0ff,
        0 0 30px #8f00ff,
        0 0 40px #ff0080;

    background: linear-gradient(135deg, #8f00ff, #ff0080, #0ff);
    background-size: 300% 300%;
}

/* گرادیان متحرک */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.typing-text{
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.typing-text span{
    position: relative;
}

.typing-text span::before{
    content: "software Developer";
    color: white;
    animation: words 20s infinite;
}

.typing-text span::after{
    content: "";
    background-color: black;
    position: absolute;
    width: 3 ;
    height: 100%;
    border-left: 3px solid black;
    right: -8;
    animation: cursor 0.6s infinite;
}
@keyframes upDown {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px); /* بالا رفتن */
    }
    100% {
        transform: translateY(0); /* برگشتن به حالت اول */
    }
}
@keyframes cursor{
    to{
        border-left: 3px solid black;
    }
}

@keyframes words{
    0%, 20%{
        content: "برنامه نویس";
    }
    21%, 40%{
        content: "گسترش دهنده وب";
    }
    41%, 60%{
        content: "دانشجو";
    }
    61%, 80%{
        content: "Youtuber";
    }
    81%, 100%{
        content: "نویسنده";
    }
}

@media (max-width: 1000px){
    .home{
        gap: 4rem;
    }
}

@media(max-width:995px){
    .home{
        flex-direction: column;
        margin: 5rem 4rem;
    }

    .home .home-content h3{
        font-size: 2.5rem;
    }

    .home-content h1{
        font-size: 5rem;
    }

    .home-img img{
        width: 70vw;
        margin-top: 4rem;
    }
}
#toggle-lang {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #b74b4b;
    color: black;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.4rem;
    transition: 0.3s;
    z-index: 200;
}

#toggle-lang:hover {
    background: black;
}
