:root {
    --primary-color: #64ffda;
    --secondary-color: #112240;
    --text-color: #ccd6f6;
    --heading-color: #e6f1ff;
    --background-color: #0a192f;
    --card-background: rgba(17, 34, 64, 0.7);
    --hover-color: #64ffda;
    --light-text: #e6f1ff;
    --dim-text: #8892b0;
    --text-gradient: linear-gradient(135deg, #64ffda, #38bdf8);
    --card-border: rgba(100, 255, 218, 0.1);
    --nav-background: rgba(10, 25, 47, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fira Code', monospace;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    background-image: 
        radial-gradient(rgba(100, 255, 218, 0.1) 1px, transparent 1px),
        radial-gradient(rgba(100, 255, 218, 0.1) 1px, transparent 1px);
    background-position: 0 0, 25px 25px;
    background-size: 50px 50px;
    z-index: 1;
}

.content-wrapper {
    position: relative;
    z-index: 2;
    overflow-x: hidden;
}

header {
    padding: 15px 50px;
    position: fixed;
    width: 100%;
    top: 0;
    background: var(--nav-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#portfolio {
    color: var(--heading-color);
    font-size: 1.5rem; /* Example size, adjust as needed */
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem; /* Match font-size to prevent layout shift */
}

#portfolio .portfolio-text {
    padding: 0 0.5rem; /* Add space between text and brackets */
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInText 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.6s forwards;
}

#portfolio .bracket {
    color: var(--primary-color);
    will-change: transform; /* Performance optimization */
}

#portfolio .left-bracket {
    /* Moves from center to left */
    animation: moveLeft 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#portfolio .right-bracket {
    /* Moves from center to right */
    animation: moveRight 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes moveLeft {
    from { transform: translateX(50px); }
    to { transform: translateX(0); }
}

@keyframes moveRight {
    from { transform: translateX(-50px); }
    to { transform: translateX(0); }
}

@keyframes fadeInText {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.main-title-cursor {
    display: inline-block;
    background-color: var(--primary-color);
    width: 3px; /* Give the cursor a specific width to be visible */
    height: 54px; /* Adjust height to align with the text */
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.nav_links {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    gap: 2rem;
}

.nav_links a {
    color: var(--heading-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav_links a:hover {
    color: var(--primary-color);
}

.resume-button {
    color: var(--primary-color) !important; /* Override default link color */
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin-left: 1rem; /* Add some space from other links */
}

.resume-button:hover {
    background: rgba(100, 255, 218, 0.1);
    color: var(--primary-color) !important;
}

.hamburger-menu {
    display: none;
    font-size: 2rem;
    color: var(--heading-color);
    cursor: pointer;
    z-index: 1002; /* Ensure it's above the nav panel */
    width: 30px;
    height: 22px;
    position: relative;
    transform: rotate(0deg);
    transition: .5s ease-in-out;
}

.hamburger-menu span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--heading-color);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.hamburger-menu span:nth-child(1) { top: 0px; }
.hamburger-menu span:nth-child(2), .hamburger-menu span:nth-child(3) { top: 10px; }
.hamburger-menu span:nth-child(4) { top: 20px; }

.hamburger-menu.active span:nth-child(1), .hamburger-menu.active span:nth-child(4) {
    top: 10px;
    width: 0%;
    left: 50%;
}

.hamburger-menu.active span:nth-child(2) { transform: rotate(45deg); }
.hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg); }

.main-section { min-height: 100vh; display: flex; justify-content: center;
    align-items: center;
    padding: 0 100px;
    gap: 2rem;
}

.greeting-text-p {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.main-title {
    font-size: 60px;
    line-height: 1.1;
    font-weight: bold;
    color: var(--heading-color);
    text-shadow: 0 0 30px rgba(100, 255, 218, 0.1);
    margin-bottom: 0.5rem;
    display: flex; /* Add flex display */
    align-items: center; /* Vertically center content */
    min-height: 60px; /* Prevent layout shift during typing animation */
}

.role-title {
    font-size: 28px;
    font-weight: 400;
    margin-top: 10px;
    color: var(--light-text);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.profile-image img {
    width: 300px;
    border-radius: inherit;
    border: 2px solid var(--primary-color);
    transition: transform 0.3s;
}

.profile-image img:hover {
    transform: scale(1.05);
}

.section-heading {
    color: var(--heading-color);
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    width: fit-content;
    margin: 0 auto 3rem;
    position: relative;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -5px; /* Adjusted to be closer to the text */
    left: 0; /* Corrected from 50% to align the transform origin */
    width: 100%;
    height: 2px;
    background: var(--text-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.section-spacing {
    padding: 80px 100px;
}

.skill-tag {
    background: rgba(100, 255, 218, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(100, 255, 218, 0.2);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    margin: 5px;
    display: inline-block;
}

.project-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(100, 255, 218, 0.1);
    transform: translateY(-5px);
}

input, textarea {
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: var(--card-background);
    border: 1px solid var(--text-color);
    color: var(--heading-color);
    border-radius: 5px;
}

button#submit {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
}

button#submit:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.2);
}

footer {
    background: var(--card-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
}

.footer-left {
    flex: 1;
}

.footer-name {
    color: var(--heading-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.footer-title {
    color: var(--primary-color);
    font-size: 1rem;
    opacity: 0.9;
}

.footer-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.footer-links a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.footer-links img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Media query for tablets and smaller devices */
@media (max-width: 1024px) {
    .nav_links {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        height: 100vh;
        width: 60%;
        max-width: 300px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: var(--nav-background);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        transition: right 0.5s ease-in-out;
        gap: 2.5rem;
        z-index: 1001; /* Ensure nav panel is below the close button but above other content */
    }

    .nav_links.active {
        right: 0; /* Slide in */
    }

    .nav_links a {
        font-size: 1.2rem;
    }

    .hamburger-menu {
        display: block;
    }

    .hamburger-menu.active {
        position: fixed; /* Keep the 'X' in a fixed position relative to the viewport */
        top: 15px;       /* Align with the header's padding */
        right: 50px;     /* Align with the header's padding */
        font-size: 2.5rem; /* Make the 'X' a bit larger and easier to tap */
        z-index: 1002;   /* Ensure it's above the navigation panel */
    }

    .main-section {
        padding: 0 50px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .main-section {
        flex-direction: column;
        padding: 0 20px;
    }
    
    .section-spacing {
        padding: 50px 20px;
    }
    
    footer {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        gap: 1.5rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-title {
        font-size: 48px; /* Reduced font size for mobile */
    }

    .role-title {
        font-size: 24px;
    }

    .profile-image {
        width: 250px; /* Smaller profile image */
        height: 250px;
        margin: 0 auto; /* Center the image */
    }

    .social-links {
        justify-content: center; /* Center social links */
    }
}
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem; /* Slightly reduced gap for better fit */
    /* Removed padding and margin, now handled by .section-container */
}

.project-card h2 {
    color: var(--heading-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.project-card p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.skills-tags {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-links {
    display: flex;
    gap: 1.2rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-links a {
    color: var(--light-text);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.project-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.contact-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-container p {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.email-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.email-button:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0.7;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.email-text {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.email-text a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Unified container for all sections */
.section-container {
    background: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    max-width: 1200px; /* Unified max-width */
    margin: 50px auto;
    box-sizing: border-box;
}

.publication-card {
    background: var(--card-background);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
}

.publication-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.publication-card h2 {
    color: var(--heading-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: bold;
}

.publication-card h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.publication-year {
    color: var(--dim-text);
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.publications hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 1.5rem 0;
}

/* Add styles for the publication links */
.publication-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.publication-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.experience-card {
    background: var(--card-background);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0; /* Remove margin as it's inside .section-container */
    transition: transform 0.3s ease;
}

.experience-card:hover {
    border-color: var(--primary-color);
}

.experience-card h2 {
    color: var(--heading-color);
    margin-bottom: 10px;
}

.experience-card h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.experience-duration, .experience-location {
    color: var(--dim-text);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.experience-details {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.experience-details li {
    color: var(--light-text);
    margin-bottom: 0.5rem;
    line-height: 1.6;
    opacity: 0.9;
    font-size: 1rem;
}

.about-text {
    color: var(--light-text);
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
    text-align: justify;
}

.about-text br {
    display: block;
    content: "";
    margin-top: 10px;
}

/* Add this to ensure consistent image sizes */
.social-links a, .footer-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px; /* Added to maintain consistent height */
}

/* Add these styles to your existing CSS file */
.researcher-id {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.orcid-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #A6CE39;  /* ORCID's official green color */
    font-size: 1.1rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.orcid-link:hover {
    background: rgba(166, 206, 57, 0.1);  /* ORCID green with transparency */
    transform: translateY(-2px);
}

.orcid-link i {
    font-size: 1.3rem;
}

/* Add Scopus link styles */
.scopus-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #E9711C;  /* Scopus orange color */
    font-size: 1.1rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.scopus-link:hover {
    background: rgba(233, 113, 28, 0.1);  /* Scopus orange with transparency */
    transform: translateY(-2px);
}

.scopus-link i {
    font-size: 1.3rem;
}

/* Update project links to accommodate ORCID icon */
.project-links a[title="ORCID Profile"] {
    color: #A6CE39;  /* ORCID's official green color */
}

.project-links a[title="ORCID Profile"]:hover {
    color: #96BC34;  /* Slightly darker shade for hover */
}

/* Add Scopus icon styles */
.project-links a[title="Scopus Profile"] {
    color: #E9711C;  /* Scopus orange color */
}

.project-links a[title="Scopus Profile"]:hover {
    color: #D66116;  /* Slightly darker shade for hover */
}

.profile-image {
    width: 350px;
    height: 350px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    object-fit: cover;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    padding: 5px; /* Creates space for the gradient border */
    position: relative;
    animation: morphing 10s ease-in-out infinite;
    box-shadow: 
        0 0 20px rgba(85, 25, 139, 0.3),
        0 0 60px rgba(0, 188, 212, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 30px rgba(85, 25, 139, 0.5),
        0 0 80px rgba(0, 188, 212, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
}

@keyframes morphing {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* Add social links styling */

.social-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.social-links a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
}

a[title="ORCID Profile"] {
    color: #A6CE39; /* ORCID Green */
}

a[title="ORCID Profile"]:hover {
    background: rgba(166, 206, 57, 0.1);
    color: #A6CE39;
}

a[title="Scopus Profile"] {
    color: #E9711C; /* Scopus Orange */
}

a[title="Scopus Profile"]:hover {
    background: rgba(233, 113, 28, 0.1);
    color: #E9711C;
}

a[title="GitHub"] {
    color: #E6EDF3; /* GitHub Light Grey/White */
}

a[title="GitHub"]:hover {
    background: rgba(230, 237, 243, 0.1);
    color: #E6EDF3;
}

a[title="LinkedIn"] {
    color: #0A66C2; /* LinkedIn Blue */
}

a[title="LinkedIn"]:hover {
    background: rgba(10, 102, 194, 0.1);
    color: #0A66C2;
}

a[title="LeetCode"] {
    color: #FFA116; /* LeetCode Orange */
}

a[title="LeetCode"]:hover {
    background: rgba(255, 161, 22, 0.1); /* LeetCode Orange tint on hover */
    color: #FFA116;
}

.social-links img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.social-links span {
    font-size: 0.9rem;
}

/* Remove the previous complex animations */
.social-links a::before,
.social-links a:hover::before {
    content: none;
}

/* Add padding to account for fixed header */
main {
    padding-top: 80px; /* Adjust this value based on your header height */
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.skill-category {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
}

.skill-category h2 {
    color: var(--light-text);
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag:hover {
    background: rgba(100, 255, 218, 0.2);
    transform: translateY(-2px);
}

/* Style for cards inside the education section */
.section-container > div:not([class]),
.section-container > .publication-card,
.project-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.section-container > div:not([class]):hover,
.section-container > .publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.section-container h2 {
    color: var(--heading-color);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-container h2 i {
    color: var(--primary-color);
}

.section-container h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.section-container pre {
    font-family: 'Fira Code', monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-container .score-label {
    color: var(--text-color);
    opacity: 0.9;
}

.section-container .score-value {
    color: var(--primary-color);
    font-weight: 500;
}

.section-container hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 1.5rem 0;
}
.tech-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
}

.tech-icon {
    position: absolute;
    font-size: 2rem;
    color: var(--primary-color);
    animation: float 8s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.loader {
    position: relative;
    display: flex;
    gap: 2rem;
    margin-bottom: 20px; /* Space between loader and text */
}

.loader .loader-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.3;
    transform: scale(1);
    animation: power-up 2.4s infinite ease-in-out;
}

.loader .loader-icon:nth-child(1) {
    animation-delay: 0s;
}

.loader .loader-icon:nth-child(2) {
    animation-delay: 0.8s;
}

.loader .loader-icon:nth-child(3) {
    animation-delay: 1.6s;
}

@keyframes power-up {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    33% { /* Icon is "on" for a third of the animation time */
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    z-index: 1001; /* Ensure it's on top of everything */
    display: flex;
    flex-direction: column; /* Arrange loader and text vertically */
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Prevent icons from overflowing */
}

.tech-background {
    position: absolute; /* Changed to absolute to allow icons to move freely */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.tech-icon {
    position: absolute;
    font-size: 2.5rem; /* Slightly larger icons */
    color: var(--primary-color);
    opacity: 0; /* Start hidden, animate in */
    animation: float 10s infinite ease-in-out forwards, fade-in-out 10s infinite ease-in-out forwards; /* Combined animations */
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes fade-in-out {
    0%, 100% { opacity: 0; }   /* Start and end invisible */
    5% { opacity: 0.3; }     /* Fade in quickly */
    50% { opacity: 0.5; }    /* Reach peak opacity mid-cycle */
    95% { opacity: 0.2; }    /* Fade out slowly */
}

.loader {
    position: relative;
    display: flex;
    justify-content: center; /* Center the spans */
    align-items: center;
    animation: roll 3s linear infinite;
    margin-bottom: 20px; /* Space between loader and text */
}

.loader span {
    position: relative;
    width: 25px; /* Slightly smaller */
    height: 25px; /* Slightly smaller */
    border-radius: 50%;
    background: var(--primary-color);
    margin: 0 8px; /* Adjusted margin */
    cursor: pointer;
    animation: loading 1.8s ease-in-out infinite; /* Changed to ease-in-out for smoother bounce */
}

.loader span:nth-child(1) {
    animation-delay: 0s;
}

.loader span:nth-child(2) {
    animation-delay: 0.2s; /* Adjusted delay */
}

.loader span:nth-child(3) { /* Added for the third span */
    animation-delay: 0.4s;
}

@keyframes loading {
    0%, 100% {
       transform: translateY(0);
    }
    50% {
        transform: translateY(-20px); /* Increased bounce height */
    }
}

.loading-text {
    color: var(--light-text);
    font-size: 1.2rem;
    margin-top: 1rem;
    animation: text-fade-scale 2s infinite alternate; /* New animation for text */
}

@keyframes text-fade-scale {
    0% { opacity: 0.5; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Hide loading screen after page is loaded */
body.loaded #loading-screen {
    opacity: 0; /* Fade out the loading screen */
    visibility: hidden; /* Hide it completely */
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out; /* Smooth transition */
}

.skills-section {
    position: relative;
    z-index: 1; /* Lower z-index than header */
}

.section-heading:hover {
    color: white;
    transform: scale(1.05);
}

.section-heading:hover::after {
    transform: scaleX(1);
}

/* Animation for elements on scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform; /* Performance optimization */
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Resume Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(10, 25, 47, 0.8); /* Semi-transparent background */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background-color: var(--secondary-color);
    margin: 4vh auto;
    padding: 0; /* Remove padding to allow header to be full-width */
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    height: 92vh; /* Slightly increase height */
    position: relative;
    box-shadow: 0 5px 25px rgba(100, 255, 218, 0.2);
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack header and iframe vertically */
    overflow: hidden; /* Hide anything that spills out of the rounded corners */
}

.modal-content iframe {
    border: none;
    border-radius: 5px;
}

.modal-header {
    display: flex;
    justify-content: flex-end; /* Align items to the right */
    align-items: center;
    padding: 10px 20px;
    background-color: rgba(10, 25, 47, 0.9); /* Slightly different from modal bg for depth */
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0; /* Prevent header from shrinking */
}

.modal-download-button {
    color: var(--primary-color);
    background-color: transparent;
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: auto; /* Push to the far left */
}

.modal-download-button:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.modal-download-button i {
    margin-right: 8px;
}

.modal-close-button {
    color: var(--heading-color);
    background: none;
    border: none;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    padding: 0 5px;
}

.modal-close-button:hover,
.modal-close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
}

.resume-iframe {
    width: 100%;
    height: 100%; /* Fill remaining space */
    border: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}