@font-face {
    font-family: "myVazir";
    src: url(/fonts/Vazir.ttf);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "myVazir", sans-serif;
    background:linear-gradient(
    180deg,
    #020617,
    #0F172A
    );
    color: #F8FAFC;
    user-select: none;
}

a {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.ltr {
    direction: ltr;
}

/* ==================== */
/* live background */
/* ==================== */
@keyframes background-float{

    0%{
        transform: translate(0,0) rotate(0deg);
    }

    25%{
        transform: translate(15px,-25px) rotate(30deg);
    }

    50%{
        transform: translate(-10px,15px) rotate(90deg);
    }

    75%{
        transform: translate(25px,5px) rotate(180deg);
    }

    100%{
        transform: translate(-15px,-10px) rotate(360deg);
    }

}
.particles{
    position:fixed;
    inset:0;
    overflow:hidden;
    pointer-events:none;
    z-index:-1;
}
.particle{
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 255, 0.185);
    background: rgba(34, 47, 197, 0.12);
    animation: background-float 2s infinite;
}
.particle:nth-child(1){
    top:10%;
    left:15%;
    animation-duration:10s;
}
.particle:nth-child(2){
    top:30%;
    left:80%;
    animation-duration:15s;
}
.particle:nth-child(3){
    top:60%;
    left:20%;
    animation-duration:13s;
}
.particle:nth-child(4){
    top:75%;
    left:65%;
    animation-duration:11s;
}
.particle:nth-child(5){
    top:20%;
    left:50%;
    animation-duration:17s;
}
.particle:nth-child(6){
    top:45%;
    left:5%;
    animation-duration:14s;
}
.particle:nth-child(7){
    top:80%;
    left:90%;
    animation-duration:18s;
}
.particle:nth-child(8){
    top:50%;
    left:35%;
    animation-duration:12s;
}


/* ==================== */
/* first page */
/* ==================== */
#first-page {
    width: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ==================== */
/* first page aboutme */
/* ==================== */
@keyframes idle {
    0%,100%{
        transform: translateY(0) rotate(-1deg) scale(1);
    }
    50%{
        transform: translateY(-4px) rotate(1deg) scale(1.01);
    }
}
#aboutme-container {
    display: flex;
    flex-direction: row;
    margin: .5rem .5rem 0rem 1rem;
}
#aboutme-description-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 2rem;
}
#aboutme-description-container h1 {
    font-size: 4rem;
    margin: 0;
}
#aboutme-description-container p {
    font-size: 1.2rem;
}
.avatar {
    height: 15rem;
    border-radius: 2rem;
    animation: idle 5s infinite;
}

/* ==================== */
/* first page skills */
/* ==================== */
@keyframes float {
    from {
        transform: translateY(-2px);
    }

    to {
        transform: translateY(2px);
    }
}
.skills-container {
    display: flex;
    justify-content: center;
}
.skills-icons-bar {
    display: flex;
    gap: 2rem;
    flex-direction: row-reverse; 
    align-items: center; 
    justify-content: center; 
    margin: 1rem 0; 
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(2px);
    padding: .5rem; 
    width: fit-content; 
    border: 1px solid blue; 
}
.skills-text-left,.skills-text-right {
    display: flex;
    align-items: center; 
    justify-content: center; 
    margin: 1rem 0; 
    background: rgba(255, 255, 255, 0.15); 
    padding: .5rem; 
    border: 1px solid blue; 
    backdrop-filter: blur(2px);
}
.skills-text-left {
    border-radius: 0 1rem 1rem 0;
}
.skills-text-right {
    border-radius: 1rem 0 0 1rem;
}
.skill {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.skill:nth-child(odd) {
    animation: float 2s ease-in-out infinite alternate;
}
.skill:nth-child(even) {
    animation: float 2s ease-in-out infinite alternate-reverse;
}
.skill span {
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,.08);
    transition: all .3s ease;
    opacity: 0;
    transform: translateY(-8px);
}
.skill:hover span {
    opacity: 1;
    transform: translateY(0);
}
.skill img {
    height: 3.5rem;
    transition: .3s;
}
.skill:hover img {
    transform: scale(1.1);
}
.skills-icons-bar img:nth-child(odd) {
    animation-direction: alternate;
}
.skills-icons-bar img:nth-child(even) {
    animation-direction: alternate-reverse;
}
/* skills colors */
.skill.py:hover img{
    filter: drop-shadow(0 0 12px #3776AB);
}
.skill.js:hover img{
    filter: drop-shadow(0 0 12px #F7DF1E);
}
.skill.html:hover img{
    filter: drop-shadow(0 0 12px #E34F26);
}
.skill.css:hover img{
    filter: drop-shadow(0 0 12px #1572B6);
}
.skill.ino:hover img{
    filter: drop-shadow(0 0 12px #00979D);
}
.skill.scratch:hover img{
    filter: drop-shadow(0 0 12px #FFAB19);
}
.skill.electronic:hover img{
    filter: drop-shadow(0 0 12px #22C55E);
}
.skill.bot:hover img{
    filter: drop-shadow(0 0 12px #229ED9);
}
.skill.py span{
    color: #3776AB;
    background: rgba(55, 118, 171, .15);
}
.skill.js span{
    color: #F7DF1E;
    background: rgba(247, 223, 30, .15);
}
.skill.html span{
    color: #E34F26;
    background: rgba(227, 79, 38, .15);
}
.skill.css span{
    color: #1572B6;
    background: rgba(21, 114, 182, .15);
}
.skill.ino span{
    color: #00979D;
    background: rgba(0, 151, 157, .15);
}
.skill.scratch span{
    color: #FFAB19;
    background: rgba(255, 171, 25, .15);
}
.skill.electronic span{
    color: #22C55E;
    background: rgba(34, 197, 94, .15);
}
.skill.bot span{
    color: #229ED9;
    background: rgba(34, 158, 217, .15);
}

/* ==================== */
/* first page nav & terminal */
/* ==================== */
#first-page-nav-and-terminal {
    display: flex;
    flex-direction: row;
    flex: 1;
}
/* navbar */
#first-page-navbar-container nav {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 0 1rem;
}
#first-page-navbar-container nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 3rem;
    border-radius: 1rem;
    padding: .3rem;
    background:#1e293b7c;
    backdrop-filter: blur(2px);
    border:1px solid #334155;
    color: inherit;
    font-weight: bold;
    transition: all .3s ease-in-out;
}
#first-page-navbar-container nav a:hover {
    background:#334155;
    border-color:#22C55E;
    transform:translateY(-6px);
    box-shadow:0 10px 30px rgba(34,197,94,.25);
}
#first-page-navbar-container nav a img {
    height: 2.5rem;
}
#first-page-navbar-container nav a p {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: bold;
}
/* terminal */
#first-page-terminal-container {
    width: 100%;
    background:#080808c9;
    border-radius: 0 1rem 0 0;
    border: 1px solid #334155;
    color:#e6edf3;
    font-family:"JetBrains Mono", monospace;
    font-size:15px;
    line-height:1.8;
    padding: 1rem;
}
#first-page-terminal-container .terminal-prompt {
    color: #22C55E;
}
#first-page-terminal-container .terminal-response {
    color: #E2E8F0;
}



/* ==================== */
/* home page styles */
/* ==================== */
@keyframes card-pulse {
    0%, 8%, 100% {
        transform: scale(1);
    }

    2%,
    6% {
        transform: scale(1.03);
    }
}
@keyframes blur-pulse {
    0%, 8%, 100% {
        filter: blur(3px);
    }

    2%,
    6% {
        filter: blur(0);
    }
}
@keyframes text-pulse {
    0%, 8%, 100% {
        opacity: 1;
    }

    2%,
    6% {
        opacity: 0;
    }
}
.home-page-navbar-links {
    animation: card-pulse 18s infinite ease-in-out;
}
.home-page-navbar-links::before {
    animation: blur-pulse 18s infinite ease-in-out;
}
.home-page-navbar-links p {
    animation: text-pulse 18s infinite ease-in-out;
}
.home-page-navbar-links:nth-child(1),
.home-page-navbar-links:nth-child(1)::before,
.home-page-navbar-links:nth-child(1) p {
    animation-delay: 0s;
}
.home-page-navbar-links:nth-child(2),
.home-page-navbar-links:nth-child(2)::before,
.home-page-navbar-links:nth-child(2) p {
    animation-delay: 2s;
}
.home-page-navbar-links:nth-child(3),
.home-page-navbar-links:nth-child(3)::before,
.home-page-navbar-links:nth-child(3) p {
    animation-delay: 4s;
}
.home-page-navbar-links:nth-child(4),
.home-page-navbar-links:nth-child(4)::before,
.home-page-navbar-links:nth-child(4) p {
    animation-delay: 6s;
}

#home-page{
    display: flex;
    min-height: 100dvh;
}
/* news section */
#home-page-news-image-container img,
#home-page-news-description{
    transition: opacity .5s;
}
.fade{
    opacity:0;
}
.home-page-left-section {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border-right: 1px solid #334155;
    border-bottom: 1px solid #334155;
    backdrop-filter: blur(2px);
    padding: 1rem;
}
.home-page-left-section p {
    font-size: .9rem;
}
.home-page-left-section h2 {
    font-size: 1.3rem;
}
#home-page-news-image-container {
    display: flex;
    justify-content: center;
}
#home-page-news-image-container img {
    width: 80%;
}
/* right section */
.home-page-right-section{
    flex: 2;
}
/* selected projects cards */
.home-page-navbar-links {
    padding: .8rem;
    position: relative;
    aspect-ratio: 1 / 1;
    width: 13rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
    border-radius: 1rem;
    color: #F8FAFC;
    text-shadow: 1px 1px 1px black;
    transition: all .3s ease-in-out;
}
.home-page-navbar-links::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    background-position: inherit;
    background-size: inherit;
    background-repeat: inherit;
    filter: blur(3px);
    transform: scale(1.08);
    z-index: -1;
}
#home-page-selected-projects-container nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: .6rem;
    border-bottom: 1px solid #334155;
}
/* cards backgrounds */
.home-page-navbar-links.project-a::before {
    background-image: url(/images/projects-images/2.png);
}
.home-page-navbar-links.project-b::before {
    background-image: url(/images/projects-images/2.png);
}
.home-page-navbar-links.project-c::before {
    background-image: url(/images/projects-images/2.png);
}
.home-page-navbar-links.project-d::before {
    background-image: url(/images/projects-images/2.png);
}
/* home page navbar */
#home-page-navbar-container nav{
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
}
#home-page-navbar-container nav div{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.home-page-big-card {
    width: 15rem;
    aspect-ratio: 1 / 1;
}
.home-page-small-card {
    width: 35rem;
    flex: 1;
}
#home-page-navbar-container nav a {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    font-size: 1.2rem;
    background: rgba(0,0,0,.4);
    border: 1px solid #334155;
    box-shadow: 1rem 1rem 1rem rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    border-radius: 2rem;
    transition: all .3s ease-in-out;
}
#home-page-navbar-container nav a:hover {
    background: rgba(22, 22, 22, 0.4);
    transform: translateY(-5px);
    box-shadow: 1rem 1.5rem 1rem rgba(0, 0, 0, 0.3);
}
.home-page-out-of-div-link {
    aspect-ratio: 1 / 1;
    width: 13rem;
    flex-direction: column;
}
#home-page-navbar-container img {
    width: 4rem;
}


/* ==================== */
/* projects page styles */
/* ==================== */
header {
    width: 100%;
}
header .header {
    display: flex;
    flex-direction: row;
    background: #29292993;
    backdrop-filter: blur(3px);
    border: 1px solid rgba(0, 0, 255, 0.5);
    border-radius: 8rem;
    padding: 1rem;
    margin: 2rem;
    gap: 1rem;
}
header .header img {
    width: 7rem;
    border-radius: .5rem 50% 50% .5rem;
    border: 1px solid rgba(141, 141, 141, 0.356);
}
header .header h2 {
    font-size: 1.7rem;
    margin: .5rem 0;
}
header .header p {
    font-size: 1rem;
    margin: 0;
}
#projects-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.project-card-container{
    display: flex;
    gap: 1rem;
    width: 80%;
    margin: 1.5rem;
}
.project-card-image-container{
    aspect-ratio: 1 / 1;
    height: 15rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.project-card-description-container{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex: 1;
}
.project-card-image-container div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
}
.project-card-image-container div span {
    color: rgba(255, 255, 255, 0.4);
    border-radius: 1rem;
    padding: .4rem;
}
.project-card-image-container div span.project-date {
    background: rgba(255, 166, 0, 0.3);
    border: 1px solid orange;
}
.project-card-image-container div span.project-status-completed {
    background: rgba(0, 128, 0, 0.3);
    border: 1px solid green;
}
.project-card {
    padding: 1rem;
    background: #00000066;
    backdrop-filter: blur(2px);
    border: 1px solid #334155;
    border-radius: 1rem;
}
.project-card-image-container img {
    height: 65%;
    border-radius: .7rem;
    animation: idle 3s infinite;
}
/* left section (name & description & ...)  */
.project-card-name-and-description div {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.project-card-name-and-description div img {
    height: 2rem;
}
.project-card-info-box {
    background: rgba(25, 25, 25, 0.5);
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 1rem;
    padding: .5rem;
    display: flex;
    justify-content: center;
}
.show-projects-link-container a {
    justify-content: space-evenly !important;
    aspect-ratio: 1 / 1 !important;
    width: 13rem !important;
    font-size: 1.5rem !important;
}
.show-projects-link-container a:hover {
    transform: translateY(-4px) scale(1.01) rotate(1deg);
}
.project-details-and-title-container,.show-projects-link-container {
    justify-content: center;
    display: flex;
}
.project-details-and-title-container a,.show-projects-link-container a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background:#1e293b7c;
    backdrop-filter: blur(2px);
    border:1px solid #334155;
    width: 2.5rem;
    font-size: 1.2rem;
    border-radius: 1rem;
    padding: .3rem;
    transition: all .3s ease-in-out;
}
.project-details-and-title-container a:hover {
    background:#334155;
    border-color:#22C55E;
    transform:translateY(-4px);
    box-shadow:0 10px 30px rgba(34,197,94,.25);
}
.project-technologies-used-container {
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(2px);
    padding: .5rem; 
    border: 1px solid rgba(0, 0, 255, 0.575); 
    border-radius: 1rem;
    width: fit-content;
}
.project-technologies-container {
    display: flex;
    flex-direction: row;
}
.project-technologies-used-container .skill {
    display: flex;
    flex-direction: column;
}



/* ==================== */
/* Labs page styling */
/* ==================== */
#labs-page {
    border-bottom: 1px solid #334155;
}
.labs-projects-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin: 2rem;
}
.labs-pair-projects-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 2;
}
.big-labs-project {
    flex-direction: column;
    flex: 1;
}
.big-labs-project-details-container, .big-labs-project-failed-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.big-labs-project-details-container div, .big-labs-project-failed-container div {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}
.big-labs-project img {
    height: 12rem;
}
.big-labs-project img, .pair-labs-project img {
    border-radius: 1rem;
    animation: idle 5s infinite;
}
.labs-project {
    display: flex;
    align-items: center;
    padding: 1rem;
    background:#1e293b7c;
    backdrop-filter: blur(2px);
    border:1px solid #334155;
    border-radius: 1rem;
    transition: all .3s ease-in-out;
}
.pair-labs-project {
    flex-direction: row;
    height: 100%;
    gap: 1rem;
}
.pair-labs-project img {
    height: 10rem;
}
.labs-project-name-and-details, .labs-project-failed {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}
.labs-project-failed p, .big-labs-project-failed-container p {
    background: rgba(255, 0, 0, 0.4) !important;
}
.labs-project-name-and-details p, .big-labs-project-details-container div p, .labs-project-failed p, .big-labs-project-failed-container p {
    background: rgba(128, 128, 128, 0.4);
    padding: .35rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 1rem;
}
/* labs page idea board */
#idea-board-container {
    display: flex;
    align-items: center;
    justify-content: center;
}
.idea-board-info {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: .1rem .1rem .1rem rgb(0, 0, 0);
    text-align: center;
}
.idea-board{
    position:relative;
    width:850px;
    height:500px;
    background-image: url(/images/backgrounds/granite-texture.webp);
    border: 5px solid gray;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius:24px;
    box-shadow:0 20px 50px rgba(0,0,0,.08);
}
.note{
    position:absolute;
    width:110px;
    height:140px;
    padding:14px;
    border-radius:8px;
    background:#F8FAFC;
    box-shadow:0 8px 18px rgba(0,0,0,.15);
    transition:.3s;
}
.note::before{
    content: "";
    position: absolute;
    top: 3px;
    left: 45%;
    width: 10px;
    height: 10px;
    background: rgb(200, 0, 0);
    border: 1px solid rgb(180, 0, 0);
    border-radius: 50%;
}
.note:hover{
    transform:scale(1.08) rotate(0deg) !important;
    z-index:10;
}
.note h3{
    font-size:18px;
    color:#0f172a;
}
.note span{
    display:block;
    width:100%;
    height:2px;
    background:#0f172a33;
    margin:8px 0 16px;
}
.note p{
    color:#0f172a;
    font-size:14px;
    line-height:30px;
    background-image:linear-gradient(rgba(15,23,42,.18) 1px, transparent 1px);
    background-size:100% 30px;
    padding-bottom:10px;
}
.note-one{
    top:40px;
    left:50px;
    transform:rotate(-9deg);
}
.note-two{
    top: 90px;
    left: 303px;
    transform:rotate(6deg);
}
.note-three{
    top:280px;
    left:130px;
    transform:rotate(-4deg);
}
.note-four{
    top: 240px;
    right:200px;
    transform:rotate(10deg);
}
.note-five{
    top:60px;
    right:40px;
    transform:rotate(-7deg);
}



/* ==================== */
/* About me page */
/* ==================== */
.avatar-container{
    position: relative;
    width: 220px;
    aspect-ratio: 1;
    margin: 4rem 4rem 4rem 3rem;
}
.aboutme-page-avatar{
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    object-fit: cover;
    position: relative;
    z-index: 2;
}
.avatar-ring{
    position: absolute;
    inset: -18px;
    border-radius: 35%;
    padding: 8px;
    background:
        repeating-conic-gradient(
            #38bdf8 0deg 4deg,
            transparent 4deg 10deg
        );

    animation: spin 8s linear infinite;

    -webkit-mask:
        radial-gradient(farthest-side,
        transparent calc(100% - 12px),
        #000 calc(100% - 12px));

    mask:
        radial-gradient(farthest-side,
        transparent calc(100% - 12px),
        #000 calc(100% - 12px));
}
@keyframes spin{
    to{
        transform: rotate(360deg);
    }
}
#aboutme-page-info-container {
    display: flex;
    flex-direction: row;
    align-items: center;
}
/* Timeline */
#aboutme-timeline {
    margin: 2rem;
}
#aboutme-timeline h3 {
    font-size: 2rem;
}
.timeline-box {
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1.5rem;
    backdrop-filter: blur(2px);
    border: 1px solid #ffffff46;
    border-radius: 2rem;
    gap: 1rem;
}
.timeline-description {
    width: 100rem;
}
.timeline-info {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    width: 45rem;
}
.timeline-info p {
    display: flex;
    align-items: center;
    margin: 0;
    border-radius: .3rem;
    padding: .5rem;
    transition: all .3s ease-in-out;
}
.timeline-info:hover p {
    filter: blur(2px);
}
.timeline-info p:hover {
    filter: blur(0);
    transform: translateY(-2px);
}
.timeline-info p:nth-child(1) {
    background: rgba(218, 165, 32, 0.4);
    border: 1px solid goldenrod;
    border-radius: 2rem 2rem .2rem .2rem;
}
.timeline-info p:nth-child(2) {
    background: rgba(255, 99, 71, 0.4);
    border: 1px solid red;
}
.timeline-info p:nth-child(3) {
    background: rgba(45, 45, 255, 0.4);
    border: 1px solid blue;
}
.timeline-info p:nth-child(4) {
    background: rgba(0, 128, 0, 0.4);
    border: 1px solid green;
    border-radius: .2rem .2rem 2rem 2rem;
}
.timeline-info img {
    height: 1.6rem;
}
/* timeline laptop */
.laptop {
    position: relative;
    width: 80rem;
    margin: auto;
    overflow: hidden;
}

.laptop-screen {
    position: absolute;
    top: 14.5%;
    left: 18.7%;

    /* فضای واقعی نمایشگر */
    width: 126%;
    height: 119.4%;

    border: none;

    /* کوچک کردن محتوا */
    transform: scale(.5);
    transform-origin: top left;
}
.laptop img{
    width: 100%;
    display: block;
}