@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}

body {
    background-color: #333;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    margin: 0;
    padding: 0;
    z-index: -2;
    box-sizing: none;
}

header > #navbar {
    background-color: #333333;
    display: flex;
    position: fixed;
    padding: 0px 10px;
    width: 100%;
    height: 55px;
    justify-content: flex-start;
    align-items: center;
    z-index: 10; 
}

ul {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
}

li {
    list-style: none;
    font-size: 1.2rem;
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 0 20px rgba(40, 40, 40);
}

a {
    text-decoration: none;
}

.nav-link {
    color: white;
}
.icon li a{
    color: white;
}

img {
    display: grid;
    width: 30vw;
}

.space {
    width: 90vw;
    margin: 0 auto;
    height: 5px;
    background-color: #333333;
    margin-top: 80px;
    border-radius: 50px;
    box-shadow: 0 0 10px #758bcc;
}

#welcome-section {
    padding: 4rem;
    display: flex;
    justify-content:center;
    align-items: center; 
    padding-top: 10vh;
    padding-left: 10rem;
    padding-right: 10rem;
    position: relative;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Keep it behind other content */
}

#welcome-section > .photo > img {
    border-radius: 25px;
    margin-right: 50%;
    box-shadow: 0 0 20px rgba(40, 40, 40);
    width: 20vw;
    height: auto;
}

#welcome-section > div > h1 {
    font-size: 2.1rem;
    text-align: left;
    color: white;
    padding-top: 20px;
    margin-left: 80px;
}

.welcome-contacts{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    padding-left: 5rem;
}

.welcome-contacts > a {
    font-size: 4rem;
    border: 2px solid #758bcc;
    padding: 1rem;
    border-radius: 20%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.welcome-contacts > a:hover {
    background-color: rgba(117, 139, 204, 0.5);
}
.welcome-contacts > a > i{
    color:#bebebe
}

.icon {
    font-weight: bold;
    display: flex;
    margin-right: 65%;
    padding-left: 10px;
}

#welcome-section > div > p {
    font-size: 1.5rem;
    text-align: left;
    color: #bebebe;
    width: 60%;
    padding-left: 5rem;
}

p {
    font-size: 1.2rem;
}

/* Education style */
#Education {
    background-color: #758bcc70; /* Light background for contrast */
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    width: 60%;
}

.university {
    display: flex;
    align-items: center;
    border: 1px solid #ccc; /* Subtle border */
    border-radius: 10px;
    padding: 15px;
    background-color: #333333; /* White background for the card */
    box-shadow: 0 0 20px rgba(40, 40, 40); /* Soft shadow */
}

.img {
    flex: 0 0 100px; /* Fixed width for the logo */
    margin-right: 20px; /* Space between logo and text */
}

.img img {
    width: 100%; /* Responsive logo */
    height: auto; /* Maintain aspect ratio */
}

.description {
    flex: 1; /* Take remaining space */
}

.description p {
    margin: 5px 0; /* Spacing between paragraphs */
    color: #bebebe; /* Darker text color */
}

.description p:first-child {
    font-weight: bold; /* Emphasize degree */
    font-size: 1.2rem; /* Slightly larger font */
}

.description p:last-child {
    font-style: italic; /* Italicize relevant coursework */
    color: #bebebe; /* Lighter color for coursework */
}


/* About  */
.About {
    color: #bebebe;
    text-align: center;
    font-size: 2rem;
    font-family: monospace;
}

#About {
    border-radius: 10px;
    box-shadow: 2px 2px 10px #111111;
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(3, 1fr); /* Three columns for desktop */
    gap: 15px;
    width: 85%;
    margin: 0 auto;
    padding: 2rem;
    color: rgb(219, 223, 226);
}

#About div {
    width: 90%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(40, 40, 40);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

#About div:hover {
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.5), rgba(40, 40, 40));
    cursor: pointer;
}

#About div i {
    color: #758bcc;
    font-size: 2rem;
    margin: 5px 0;
}

/* Projects style */
#projects {
    position: relative;
    max-width: 65rem;
    margin:0 auto;
    padding: 2rem;
}

.project-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.website{
    display: flex;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto;
    width: 60rem;
    padding: 2rem;
    gap: 1rem;
    border-radius: 1rem;
    color: #bebebe;
    flex: 0 0 auto;
    margin-right: 20px; 
    scroll-snap-align: start;
}
.website img{
    border-radius: 1rem;
    object-fit:contain;
    transition: transform 0.3s ease-out;
}
.website img:hover{
    transform: scale(1.1);
    cursor: pointer;
}
.project {
    display: flex;
    justify-content: center;
    flex-direction: row;
    margin: 0 auto;
    width: 60rem;
    padding: 2rem;
    gap: 3rem;
    border-radius: 1rem;
    color: #bebebe;
    flex: 0 0 auto;
    margin-right: 20px; 
    scroll-snap-align: start;
}
.hidden {
    display: none;
}

.project .left_section{
    display: flex;
    flex-direction: column;
    background-color: #313131;
    padding: 1rem;
    gap: 1rem;
    border-radius: 1rem;
    box-shadow: 0 0 15px rgba(29, 29, 29, 0.8);
}
.left_section #image {
    border-radius: 1rem;
    transition: transform 0.3s ease-out;
}
.left_section #image:hover {
    transform: scale(1.1);
    cursor: pointer;
}
.left_section .title-techstack h1{
    color: #758bcc;
    font-size: medium;
}
.left_section .title-techstack .name{
    margin-top: 3rem;
    color: #bebebe;
}
.name h1{
    font-size: 2rem;
}
.name p{
    color: rgba(190, 190, 190, 0.5);
    font-family:'Times New Roman', Times, serif;
}
.right_section .project_title{
    display: flex;
    justify-content: space-between;
} 
.project_title .builtIn{
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.project_title .builtIn img{
    width: 2rem;
    height: 2rem;
    object-fit:fill;
}
#github_link {
    color: #758bcc;
    text-decoration: none; 
    font-size: 1rem;
}

#github_link:hover {
    color: rgb(90, 138, 199);
}

#github_link i {
    color: inherit;
    margin-left: 5px;
}

/* Dot buttons style */
.dot-buttons {
    display: flex;
    justify-content: center; 
    margin-top: 10px;
    gap: 1rem;
}

.dot {
    height: 15px; 
    width: 15px;
    margin: 0 5px;
    background: radial-gradient(circle, rgba(48, 48, 48, 0.5) 0%, rgba(48, 48, 48, 0.9) 70%); /* Black hole effect */
    border-radius: 50%; 
    cursor: pointer; 
    transition: background-color 0.3s, transform 0.3s; /* Added transform for scale effect */
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8); /* Inner shadow for depth */
}

.dot.active {
    background: radial-gradient(circle, rgba(90, 138, 199, 0.7) 0%, rgba(90, 138, 199, 0.9) 70%); /* Color when active */
    transform: scale(1.2); /* Slightly scale up when active */
}

.dot:hover{
    border-color: #758bcc;
}
.dot:active {
    background-color: #758bcc;
}

#professional_experiance {
    display: grid;
    color: #bebebe;
    text-align: center;
}

#professional_experiance .container {
    display: grid;
    width: 100%;
    margin: 0 auto;
    max-width: 1200px;
    grid-template-columns: 1fr 3fr; 
    gap: 20px;
    padding: 20px;
    box-shadow: 0 2px 2px #8f9dc5;
}

#professional_experiance .container:hover {
    background-color: #444444b9;
}

.contacts {
    font-size: 2rem;
    color: #bebebe;
    text-align: center;
}

#contacts {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 50px;
}

#contacts div {
    border-radius: 5px;
    border: 2px solid #758bcc;
    padding: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#contacts div:hover {
    color: white;
    background-color: rgba(117, 139, 204, 0.5);
}

#contacts div a {
    text-decoration: none;
    color: #758bcc;
}

/* Responsive Styles */
@media (max-width: 768px) {
    ul {
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 55px; 
        left: 0;
        right: 0;
        background-color: #333;
        z-index: 1000;
        padding: 10px 0; 
    }

    ul.active {
        display: flex; 
    }

    .hamburger {
        display: flex; 
    }
    #About {
        grid-template-columns: 1fr; 
        padding: 10px; 
    }

    #projects {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        padding: 5px; 
    }

    #welcome-section {
        grid-template-columns: 1fr; 
        padding-top: 20vh;
    }

    #welcome-section > .photo > img {
        width: 80vw; 
        margin: 0 auto;
    }

    #welcome-section > div > h1 {
        font-size: 1.8rem;
        margin-left: 0;
        text-align: center;
    }

    #welcome-section > div > p {
        width: 90%;
        margin-left: 0;
        text-align: center;
    }

    .projects {
        font-size: 2.5rem;
    }

    #professional_experiance .container {
        grid-template-columns: 1fr; 
    }

    .contacts {
        font-size: 1.5rem;
    }
    #Education {
        padding: 15px; /* Reduced padding for smaller screens */
    }

    .university {
        flex-direction: column; /* Stack the logo and description */
        align-items: flex-start; /* Align items to the start */
    }

    .img {
        margin-right: 0; /* Remove right margin */
        margin-bottom: 10px; /* Add space below the logo */
    }

    .img img {
        width: 80px; /* Adjust logo size for smaller screens */
    }

    .description p {
        font-size: 0.9rem; /* Slightly smaller text */
    }

    .description p:first-child {
        font-size: 1.1rem; /* Slightly smaller degree text */
    }
    #welcome-section {
        flex-direction: column; /* Stack elements vertically */
        padding: 2rem; /* Reduced padding */
        align-items: center; /* Center items */
    }

    #welcome-section > .photo > img {
        width: 80vw; /* Make photo larger on smaller screens */
        margin: 0 auto; /* Center the image */
        margin-bottom: 20px; /* Add space below the image */
    }

    #welcome-section > div > h1 {
        font-size: 1.8rem; /* Smaller font size for the heading */
        margin-left: 0; /* Remove left margin */
        text-align: center; /* Center the heading */
    }

    .welcome-contacts {
        padding-left: 0; /* Remove padding */
        justify-content: center; /* Center social icons */
        gap: 1rem; /* Reduce gap between icons */
    }

    .welcome-contacts > a {
        font-size: 3rem; /* Smaller icon size */
        padding: 0.5rem; /* Adjust padding */
    }

    #welcome-section > div > p {
        font-size: 1.2rem; /* Smaller font size for paragraph */
        width: 90%; /* Take full width */
        padding-left: 0; /* Remove left padding */
        text-align: center; /* Center text */
    }
}