:root {
    /* Color Palette - consolidated for better maintainability */
    --primary-color: #9c27b0;
    --secondary-color: #e91e63;
    --gradient-start: #6a1b9a;
    --gradient-end: #e91e63;
    
    /* Theme Colors with Light/Dark variants */
    --bg-color-light: #f9f0ff;
    --bg-color-dark: #121212;
    --text-color-light: #212121;
    --text-color-dark: #f5f5f5;
    --section-bg-light: #f8f0fb;
    --section-bg-dark: #1e1e1e;
    
    /* Heading Colors */
    --heading-primary-light: #1e1e1e;
    --heading-secondary-light: #424242;
    --heading-tertiary-light: #616161;
    --heading-primary-dark: #f5f5f5;
    --heading-secondary-dark: #e0e0e0;
    --heading-tertiary-dark: #bdbdbd;
    
    /* Dynamic theme variables - will be used throughout the CSS */
    --bg-color: var(--bg-color-light);
    --text-color: var(--text-color-light);
    --section-bg: var(--section-bg-light);
    --heading-primary: var(--heading-primary-light);
    --heading-secondary: var(--heading-secondary-light);
    --heading-tertiary: var(--heading-tertiary-light);
}

/* Dark Mode Variables */
.dark-mode {
    --bg-color: var(--bg-color-dark);
    --text-color: var(--text-color-dark);
    --section-bg: var(--section-bg-dark);
    --heading-primary: var(--heading-primary-dark);
    --heading-secondary: var(--heading-secondary-dark);
    --heading-tertiary: var(--heading-tertiary-dark);
}

/* --- General Styles --- */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.5s ease, color 0.5s ease;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
}

/* Typography */
h1, h2, h3, p {
    margin: 0 0 20px;
    color: var(--heading-primary);
    transition: color 0.3s ease;
}

h1 {
    font-size: 9em;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.05em;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
}

h2 {
    font-size: 2.5em;
    font-weight: 500;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.7em;
    font-weight: 500;
    color: var(--heading-secondary);
}

p {
    font-size: 1.15em;
    line-height: 1.8;
    color: var(--text-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

a:hover {
    color: var(--gradient-start);
}

/* Header Styles */
header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    text-align: center;
    margin-bottom: 60px;
}

.animated-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2em;
    color: transparent;
    background: linear-gradient(
        110deg,
        var(--gradient-start) 0%,
        var(--gradient-end) 35%,
        #ffffff 50%,
        var(--gradient-end) 65%,
        var(--gradient-start) 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 8s ease-out forwards;
}

.animated-name span {
    display: inline-block;
}

@keyframes shine {
    0% { background-position: -200% 50%; }
    100% { background-position: 300% 50%; }
}

.title-description {
    font-size: 1.5em;
    margin-bottom: 0;
    font-weight: 400;
}

.title-description span {
    background: linear-gradient(135deg, #969696, var(--gradient-start));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Section Styles */
section {
    margin-bottom: 60px;
}

.section-title {
    margin-bottom: 35px;
    position: relative;
}

/* About Section */
.about-content {
    padding-top: 40px;
}

.about-content h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    margin-top: 5px;
}

.highlight {
    background: linear-gradient(130deg, var(--text-color), var(--primary-color));
    font-weight: 500;
    -webkit-background-clip: text;
    color: transparent;
}

/* Flexible Boxes */
.flexible-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin: 40px auto;
}

.box {
    position: relative;
    height: 200px;
    background: linear-gradient(rgba(255, 255, 255, 0.05), transparent);
    border: 1px solid rgba(250, 250, 250, 0.5);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.15);
}

.box i {
    font-size: 2.5em;
    color: var(--text-color);
}

.box h3 {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40px;
    background: rgba(249, 249, 249, 0.9);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0 0 10px 10px;

    font-size: 1.2em;
}

.dark-mode .box {
    background: linear-gradient(rgba(30, 30, 30, 0.05), transparent);
    border: 1px solid rgba(50, 50, 50, 0.5);
}

.dark-mode .box h3 {
    background: rgba(30, 30, 30, 0.9);
}

/* Tech Stack Section */
.tech-stack-content {
    margin: 80px 0;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.tech-grid div {
    padding: 20px;
    border-radius: 12px;
    /* background: rgba(255, 255, 255, 0.5); */
    backdrop-filter: blur(15px);
    background-image: linear-gradient(
    20deg,
    hsla(0, 0%, 100%, 0) 0%,
    hsl(277, 95%, 60%) 40%,
    hsl(277, 95%, 60%) 60%,
    hsla(0, 0%, 40%, 0) 100%
  );
  border: 0.5px solid rgba(0, 0, 0, 0.50);
}

.dark-mode .tech-grid div {
    border: 0.5px solid rgba(255, 255, 255, 0.50); /* Change border to black in dark mode */
}

.tech-grid ul {
    list-style-type: disc;
    padding-left: 20px;
    display: flex;
    flex-wrap: wrap;
}

.tech-grid li {
    margin: 0 30px 10px 0;
    font-size: 1.15em;
    line-height: 1.6;
}
.tech-grid li::marker {
    font-size: 1.2em;
    color: var(--text-color-light);
}

/* Work Experience Section */
.experience-list article {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
}
.dark-mode .experience-list article {
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.experience-list article:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.experience-list h3 {
    color: var(--primary-color);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(224, 224, 224, 0.5); /* Adjusted for a more blurred effect */
    color: #424242;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px); /* Added backdrop filter for blurring effect */
}

.dark-mode-toggle:hover {
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.15);
}

.dark-mode .dark-mode-toggle {
    background-color: rgba(66, 66, 66, 0.8);
    color: #e0e0e0;
}



/* Navigation Bar */
.nav-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(240, 240, 240, 0.7);
    padding: 10px 20px;
    border-radius: 30px;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 240, 240, 0.3);
}

.nav-buttons {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-button {
    background-color: transparent;
    border: none;
    color: #424242;
    font-size: 1.1em;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-button i {
    font-size: 1.2em;
}

.nav-button:hover {
    background-color: rgba(224, 224, 224, 0.7);
}

.dark-mode .nav-bar {
    background-color: rgba(42, 42, 42, 0.7);
    border: 1px solid rgba(42, 42, 42, 0.3);
}

.dark-mode .nav-button {
    color: #e0e0e0;
}

.dark-mode .nav-button:hover {
    background-color: rgba(74, 74, 74, 0.7);
}
.separator-li {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Center items vertically */
}

.nav-button img {
    width: 1.5rem; /* Adjust size as needed */
    height: 1.5rem; /* Adjust size as needed */
    border-radius: 50%; /* Make the image circular */
}
.profile-span{
    display: none;
}
.separator {
    display: inline-block; /* Ensure it behaves like an inline element */
    width: 2px; /* Set the width of the separator */
    height: 80%; /* Set the height of the separator */
    background: var(--text-color); /* Gradient color */
    margin: 0 10px; /* Add some space around the separator */
    opacity: 0.2;
}
.profile-section {
    width: 450px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0); /* Start scaled down */
    z-index: 1000;
    opacity: 0; /* Start hidden */
    transition: opacity 0.5s ease, transform 0.5s ease; /* Add transition for opacity and transform */
    display: none; /* Ensure it's not displayed initially */
}
.profile-section.show {
    display: block; /* Show the section */
    opacity: 1; /* Fully visible when the class is added */
    transform: translate(-50%, -50%) scale(1); /* Scale to normal size */
}
.dark-mode .profile-section{
    background: rgba(30, 30, 30, 0.8); /* Adjust opacity as needed for blur effect */
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.profile-container{
    display: flex;
    align-items: center;
    gap: 25px;
}
.profile-hr{
    border: 1px solid rgba(74, 74, 74, 0.195);
    margin: 20px 0;
}
.copyright-container{
    display: flex;
    justify-content: center;
    align-items: center;
}
.copyright-container p{
    margin-bottom: 0;
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--heading-secondary);
}

.dark-mode .profile-hr{
    border: 1px solid rgba(255, 255, 255, 0.195);
}
.profile-desc-line{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}
.profile-desc-line i{
    color: var(--heading-secondary);
}
.profile-desc-line p{
    margin-bottom: 0;
    font-size: 0.9rem;
}


.profile-section h2{
    margin-bottom: 5px;
}
.profile-section img {
    max-width: 150px;
    height: auto;
    margin: 10px auto;
    border-radius: 50%;
   
}

.profile-section .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    z-index: 10; /* Ensure the close button is above other elements */
    transition: transform 0.3s ease; /* Smooth transition for scaling */
}

.profile-section .close-button:hover {
    transform: scale(1.2); /* Scale up the button on hover */
}

.social-box{
    display: flex;
    gap: 10px;
}
.social-box a{
    padding: 5px;
    border-radius: 50%;
    background: linear-gradient(rgba(255, 255, 255, 0.05), transparent);
    border: 1px solid rgba(0, 0, 0, 0.5);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    
}
.social-box a:hover{
    transform: scale(1.1);
    box-shadow: 0 3px 7px rgba(252, 252, 252, 0.15);

}
.social-box i{
    font-size: 1.2rem;
    color: var(--text-color);
}
.dark-mode .social-box a{
    background: linear-gradient(rgba(30, 30, 30, 0.05), transparent);
    border: 1px solid rgba(50, 50, 50, 0.5);
}





/* Loading state */
.loading {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

body:not(.loading) {
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin-bottom: 80px; /* Space for fixed navbar */
    }
    
    h1 {
        font-size: 6em;
    }
    
    h2 {
        font-size: 2em;
    }
    
    .animated-name {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    header {
        align-items: flex-start;
        text-align: left;
        min-height: 60vh;
    }
    
    .title-description {
        font-size: 1.2em;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .flexible-boxes {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .nav-bar {
        bottom: 0;
        width: 95%;
        left: 0;
        right: 0;
        transform: none;
        border-radius: 0;
        padding: 10px;
        background-color: rgba(240, 240, 240, 0.95);
        border: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .nav-buttons {
        width: 100%;
        justify-content: space-around;
        gap: 5px;
    }
    
    .nav-button {
        flex-direction: column;
        padding: 8px;
        border-radius: 10px;
    }
    .separator{
        display: none;
    }
    .profile-span{
        display: inline-block;
    }
    .nav-button img{
        width: 1.2rem; /* Adjust size as needed */
        height: 1.2rem; /* Adjust size as needed */
    }
    

    .dark-mode-toggle {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
    }
    
    .dark-mode-toggle span{
        display: none;
    }


    .profile-section{
        width: 90%;
        padding: 10px;
    }
    .profile-container{
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    
}

/* Small screens */
@media (max-width: 480px) {
    h1 {
        font-size: 5em;
    }
    
    .box {
        height: 180px;
    }
    
    .flexible-boxes {
        padding: 10px;
    }
}