*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body{
    background: #1a1a2e;
    color: rgb(194, 204, 219);
    transition: background-color 0.3s, color 0.3s; 
}

header {
    position: fixed; /* Make the header fixed */
    background: linear-gradient(4deg, #2e2e48, #666686);    
    top: 1rem; /* Stick it to the top */
    max-width: 100%; /* Set width */
    left: 50%; /* Move to the center of the page */
    transform: translateX(-50%); /* Offset by half its width to center */
    z-index: 1000; /* Ensure it stays above other content */
    display: flex; /* Use Flexbox */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    border-radius: 30px;
    border: 1px solid rgb(78, 77, 75);
    box-shadow: 0 6px 6px rgb(64, 64, 68);
}

nav {
    display: flex;           /* flexbox */
    justify-content: center; /* Center the items horizontally */
}

nav ul {
    display: flex; /* Use Flexbox for horizontal list */
    justify-content: space-evenly; /* Center the list items */
    list-style: none; /* Remove default bullets */
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    white-space: nowrap; /* Prevent text from wrapping */
    border-radius: 20px; /* Rounded edges like the image */
    padding: 0.25rem 0.5rem; /* Inner padding for nav */
}

nav ul li {
    list-style: none;       /* Remove bullet points */
    margin: 5px 20px ;      
    padding: 0; 
}

nav ul li a{
    color: azure;
    text-decoration: none; /*remove the underline*/
    font-size: 13px;
    position: relative; /*Establishes a positioning context for the link. allows child elements (like the ::after pseudo-element) to be positioned relative to this anchor*/
}

nav ul li a::after {
    content: ''; /* This creates an empty element */
    width: 0; /* Initial width */
    height: 3px; /* Height of the underline */
    background: plum; /* Color of the underline */
    position: absolute; /* Positioning relative to the parent */
    left: 0; /* Start from the left */
    bottom: -6px; /* Place it below the text */
    transition: width 0.5s; /* Smooth transition effect */
}

nav ul li a:hover::after {
    width: 100%;
}

.page {
    margin-top: 200px;
}

@media (max-width: 600px) {
  nav ul li {
    margin: 5px 10px ;   
  }

  nav ul li a {
    font-size: 9px;
  }
}

/*welcome*/
.welcome {
    font-size: 3.5rem; /* Large text size */
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    color: rgba(215, 158, 231, 0.845);
    text-align: center;
    margin: 200px 0;
    opacity: 0; /* Start invisible */
    animation: fadeIn 2s ease-in forwards; /* Fade-in animation */
}

/* Fade-in animation */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(80px); }
    100% { opacity: 1; transform: translateY(0); }
}

/*Home*/
#home{
    width: 100%;
    background-image: url(pic1.png);
    background-size: 30%;
    background-position: calc(100% - 10%) 80%;
    background-repeat: no-repeat;
    margin-top: 0px;
}

.page{
    padding: 10px 10%;
}

.homeText{
    font-size: 18px;
}

.homeText h1{
    margin-top:15%;
    font-size: 70px;
    color: rgb(246, 130, 246);
}

.homeText h2{
    color: rgb(129, 135, 239);
    font-size: 20px;
}

.homeText p{
    margin-top: 5%;
    margin-right: 50%;
}

.social-link {
  display: inline-block;
  transition: transform 0.2s;
}

.social-link:hover {
  transform: scale(1.1);  /* Slight zoom on hover */
}

.homeText i {
    color: white;
}

.x-icon {
  width: 28px;
  height: 28px;
  fill: white;
}

/* About */
.pic {
    width: 100%;
    margin-top: 0px;
    position: relative; /* For positioning content over the image */
}

.pic img {
    width: auto; /* Adjust size as needed */
    height: 90%; /* Maintains aspect ratio */
    object-fit: contain; /* Ensures the whole image is visible */
    position: absolute;
    bottom: 0;
    right: 10%; /* Matches your calc(100% - 10%) 100% positioning */
}

@media (max-width: 600px) {
  .pic img {
    height: 50%;   
    right: 5%;
  }
}

.purple_italic{
    font-style: italic;
    color:  rgba(215, 158, 231, 0.845);
    margin-top: 7%;
    margin-right: 50%;
    margin-bottom: 100px;
    font-size: 24px;
}

.category{
    display: flex;
    margin: 20px 0 40px;
}

.col{
    margin-right: 35px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.col::after{
    content: '';
    width: 0;
    height: 3px;
    background: plum;
    position: absolute;
    left: 0;
    bottom: -6px;
}

.col:hover::after, 
.col.active::after { /* Keep the underline for active class */
    width: 100%;
}

.col.active-link::after{
    width: 100%;
}
.tab-contents ul li{
    list-style: none;
    margin: 20px 0;
}

.tab-contents ul li span{
    color:  rgb(219, 122, 219);
}

.tab-contents{
    display: none;
}

.tab-contents.active-tab{
    display: block;
}

.purple {
    color: rgb(219, 122, 219);
}

/*project*/
.project-list{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 40px;
    margin-top: 50px;
}

.project-list i {
    color: #ffffff;
}

.project-list div{
    background: #878ceb3a;
    padding: 40px;
    font-size: 13px;
    font-weight: 300;
    border-radius: 10px; /*the boxes are round*/
    transition: background 0.5s, transform 0.5s; /* for hover function*/
    cursor: pointer; /* Change cursor to pointer */
}

.project-list div i{
    font-size: 50px;
    margin-bottom: 30px;
}

.project-list div h4{
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 15px;
}

.project-list div:hover{
    background: rgba(176, 138, 202, 0.795);
    transform: scale(1.05); /* Slightly enlarge on hover */
}

.web {
    display: none; /* Hide all pages by default */
}
.active {
    display: block; /* Show the active page */
}

/*
.box-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.box {
    display: flex;
    background: #222; /* Dark background for boxes *
    border: 2px solid purple; /* Purple border *
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.box img {
    max-width: 10%;
    height: auto;
    padding: 10px; /*Padding around images *
}
.box h4, .box p {
    padding: 15px;
    display: flex;
    align-items: center;
}

@media (max-width: 600px) {
    .box {
        flex-direction: column;
    }
    .box img {
        width: 100%; /* Full width on small screens *
    }
}

.box-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    
}
*/

/*blog*/
.blog-container {
    border-left: 6px solid rgba(215, 158, 231, 0.845);
    background-color:  #878ceb3a ;
    display: flex;
    align-items: center;
    margin: 30px 0;
    /*border-radius: 8px; */
    padding: 15px;
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    cursor: pointer; /* Change cursor to pointer */
}

.blog-container:hover{
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/*certificate*/
.box {
    border: 2px solid rgba(215, 158, 231, 0.845);
    background-color:  #878ceb3a ;
    display: flex;
    align-items: center;
    margin: 30px 0;
    /*border-radius: 8px; */
    padding: 20px;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

.box img {
    width: 70px;
    height: auto;
    margin-right: 10px;
}
.text {
    display: flex;
    flex-direction: column;
}
.text h4{
    font-size: 19px;
}

/* Base styles for mobile */
body {
  font-size: 16px;
  margin: 0;
  padding: 10px;
}

/* Styles for larger screens */
@media (min-width: 768px) {
  body {
    font-size: 18px;
    padding: 20px;
  }
}

/*contact*/
.contact-container {
    margin-top: 50px;
    margin-bottom: 100px;
    background-color: #878ceb3a;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    width: 90%;
    box-shadow: 0 2px 5px rgba(224, 216, 216, 0.902);
}
.contact-box {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #666690;
}
.contact-box:hover {
    transform: scale(1.05);
    transition: background 0.5s, transform 0.5s;
    cursor: pointer;
    background: #666686;
}
.contact-box .label {
    font-weight: bold;
    color: white;
    margin-right: 10px;
    font-size: medium;
    display: block;
}
.contact-box .value {
    color: #f2d7f3f7;
    font-size: medium;
    display: block;
}
.contact-box a {
    color: inherit;
    text-decoration: none;
}

/*back-to-top button */
#back-to-top {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(4deg, #8f8fde, #5d5d79);    
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: opacity 0.3s, transform 0.3s;
}

#back-to-top:hover {
    transform: scale(1.1);
}

#themeButton {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: linear-gradient(4deg, #8f8fde, #5d5d79);    
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.3s;
}

#themeButton:hover {
    transition: background 0.5s, transform 0.5s; 
    cursor: pointer; 
}

.skills {
    font-style: italic; 
    background: #d172f35b; 
    padding: 4px 13px; 
    border-radius: 999px; 
    margin: 10px 0px 0px 6px;
    font-size: 13px;
}


/*light mode*/
.skills {
    font-style: italic; 
    background: #c9a1d75b; 
    padding: 4px 13px; 
    border-radius: 999px; 
    margin: 10px 0px 0px 6px;
    font-size: 13px;
}

body.light-mode #back-to-top {
    background: linear-gradient(4deg, rgb(239, 214, 250), rgb(255, 255, 255));
    color: black;
    border: 1px solid #65657660;
}

body.light-mode #themeButton {
    background: linear-gradient(4deg, rgb(239, 214, 250), rgb(253, 249, 255));
    color: black;
}

body.light-mode {
    background-color: rgb(255, 255, 255); 
    color: black; 
}

/*light mode -- project*/
body.light-mode .project-list div {
    background: rgb(241, 235, 247); 
    color: black; 
}

body.light-mode .project-list div i {
    color: black; /* Black icon color */
}

body.light-mode .project-list div:hover {
    background: rgb(225, 205, 242);
}

/*light mode -- blogs*/
body.light-mode .blog-container{
    background: rgba(237, 230, 242, 0.806); /* Lighter grey for project list items */
    color: black; /* Black text for readability */
}

body.light-mode .blog-container:hover {
    background: rgb(241, 225, 252);
}

/*light mode -- cert*/
body.light-mode .box{
    background: rgba(238, 236, 238, 0.806); 
    color: black; 
}

/*light mode -- header*/
body.light-mode header {
    background: linear-gradient(4deg, rgb(239, 214, 250), rgb(255, 255, 255));
    box-shadow: 0 6px 6px rgb(198, 198, 202);
}

body.light-mode nav ul li a{
    color: black;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/*light mode icon*/
body.light-mode .x-icon {
    fill: black;
}

body.light-mode .homeText i {
    color: black;
}

/*light mode project icon*/
body.light-mode .project-list i {
    color: black;
}

/*light mode -- contact*/
body.light-mode .contact-container {
    background: rgba(237, 230, 242, 0.806); /* Lighter grey for project list items */
}

body.light-mode .contact-box {
    background-color: #ead1f0d4;
}

body.light-mode .contact-box .label {
    color: #1a1a2e;
}

body.light-mode .contact-box .value {
    color: #5d5d79;
}