/* Root variables for colors and typography */
:root {
    /* Light theme colors */
    --primary-color: #6c5ce7;
    --secondary-color: #a363d9;
    --text-color: #2d3436;
    --text-light: #636e72;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Lato', sans-serif;
    --nav-height: 70px;
}

/* Dark theme */
[data-theme="dark"] {
    --primary-color: #6c5ce7;
    --secondary-color: #a363d9;
    --text-color: #ffffff;
    --text-light: #a0a0a0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .navbar {
    background-color: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .navbar-collapse {
    background-color: rgba(30, 30, 30, 0.98);
}

[data-theme="dark"] .nav-link {
    color: var(--text-color) !important;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .profile-section,
[data-theme="dark"] .about-content {
    background-color: rgba(30, 30, 30, 0.9);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .profile-section h2,
[data-theme="dark"] .profile-section h3,
[data-theme="dark"] .about-content h3 {
    color: var(--text-color);
}

[data-theme="dark"] .about-content p {
    color: var(--text-color);
}

[data-theme="dark"] #particles-js {
    background-color: var(--bg-color);
}

[data-theme="dark"] .navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}

[data-theme="dark"] .theme-toggle {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .scroll-to-top {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

[data-theme="dark"] .progress-bar-container {
    background: rgba(255, 255, 255, 0.1);
}

/* Add transition for theme switching */
body,
.navbar,
.profile-section,
.about-content,
.nav-link,
#particles-js {
    transition: all 0.3s ease-in-out;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(45deg);
}

@media screen and (max-width: 768px) {
    .theme-toggle {
        top: 15px;
        right: 70px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav-link {
    font-family: var(--body-font);
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
}

.profile-section h2 {
    font-family: var(--heading-font);
    color: var(--text-color);
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.profile-section h3 {
    font-family: var(--body-font);
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* Navigation Styles */
.navbar {
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: var(--nav-height);
    transition: all 0.3s ease;
}

.navbar-nav {
    align-items: center;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-collapse {
    transition: all 0.3s ease-in-out;
}

@media screen and (max-width: 768px) {
    .navbar {
        backdrop-filter: blur(10px);
        background-color: rgba(255, 255, 255, 0.95);
    }

    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding: 1rem;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    .nav-item {
        transform: translateY(-5px);
        opacity: 0;
        animation: slideIn 0.3s forwards;
    }

    @keyframes slideIn {
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .nav-item:nth-child(1) { animation-delay: 0.1s; }
    .nav-item:nth-child(2) { animation-delay: 0.2s; }
    .nav-item:nth-child(3) { animation-delay: 0.3s; }
    .nav-item:nth-child(4) { animation-delay: 0.4s; }
    .nav-item:nth-child(5) { animation-delay: 0.5s; }
    .nav-item:nth-child(6) { animation-delay: 0.6s; }
}

/* Profile Section */
.profile-section {
    position: relative;
    text-align: center;
    padding: 2rem;
    margin-top: calc(var(--nav-height) + 2rem);
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    transition: transform 0.3s ease;
}

.profile-section:hover {
    transform: translateY(-5px);
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.profile-section h2 {
    color: var(--text-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.profile-section h3 {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* About Section */
.about-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    transition: transform 0.3s ease;
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-content:hover {
    transform: translateY(-5px);
}

.about-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px 15px 0 0;
}

.about-content h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.about-content h3 i {
    font-size: 1.5rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.1rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* Education Section */
#education {
    padding-top: calc(var(--nav-height) + 2rem);
    max-width: 800px;
    margin: 0 auto;
}

#education h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.education-container {
    margin-bottom: 3rem;
}

.education-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.education-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(31, 38, 135, 0.15);
}

.education-item:hover::after {
    opacity: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95) translate3d(0, 0, 0);
    }
    50% {
        transform: scale(1) translate3d(0, 0, 0);
    }
    100% {
        transform: scale(0.95) translate3d(0, 0, 0);
    }
}

.education-item h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.education-item h4 i {
    transition: transform 0.3s ease;
}

.education-item:hover h4 i {
    transform: rotate(15deg);
}

.education-item .institution {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.education-item .location {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    font-style: italic;
}

.education-item .date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Qualification Grid Styles */
.qualification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.qualification-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.qualification-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(31, 38, 135, 0.15);
}

.qualification-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.qualification-item:hover i {
    transform: scale(1.1) rotate(10deg);
}

.qualification-item h5 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.qualification-item p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

@media screen and (max-width: 768px) {
    .qualification-grid {
        grid-template-columns: 1fr;
    }
    
    .education-item {
        padding: 1.5rem;
    }
}

.qualifications-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.qualifications-container h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.qualifications-container ul {
    list-style-type: none;
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.qualifications-container ul li {
    margin-bottom: 0.75rem;
    position: relative;
    line-height: 1.6;
}

.qualifications-container ul li:before {
    content: "▹";
    position: absolute;
    left: -1.5rem;
    color: var(--primary-color);
}

.qualifications-container ul li:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .about-content, .education-item, .qualifications-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .about-content h3, .education-item h4, .qualifications-container h4 {
        font-size: 1.4rem;
    }

    .about-content p, .education-item p {
        font-size: 1rem;
    }

    .education-item .institution {
        font-size: 1rem;
    }
}

/* Skills Section */
#skills {
    padding-top: calc(var(--nav-height) + 2rem);
    max-width: 800px;
    margin: 0 auto;
}

#skills h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skills-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(31, 38, 135, 0.15);
}

.skill-category h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h4 i {
    font-size: 1.2rem;
}

.skill-category ul {
    list-style-type: none;
    padding-left: 0;
}

.skill-category ul li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.skill-category ul li:hover {
    transform: translateX(10px);
}

.skill-category ul li i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Languages Section */
#languages {
    padding-top: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

#languages h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.language-item {
    margin-bottom: 1.5rem;
}

.language-item:last-child {
    margin-bottom: 0;
}

.language-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.progress {
    height: 10px;
    background-color: rgba(108, 92, 231, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 1.5s ease-in-out;
}

@media (max-width: 768px) {
    .skills-container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .skill-category {
        padding: 1rem;
    }

    .skill-category h4 {
        font-size: 1.2rem;
    }

    .skill-category ul li {
        font-size: 0.9rem;
    }
}

/* Projects Section */
#projects {
    padding-top: calc(var(--nav-height) + 2rem);
    max-width: 1200px;
    margin: 0 auto;
}

#projects h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
}

.github-reference {
    background: rgba(108, 92, 231, 0.1);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(31, 38, 135, 0.15);
}

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-info p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-stack span {
    background: var(--bg-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.project-links {
    margin-top: auto;
    display: flex;
    gap: 1rem;
}

.project-links a {
    flex: 1;
    text-align: center;
}

/* Experience Section */
#experience {
    padding-top: calc(var(--nav-height) + 2rem);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

#experience::before {
    content: '';
    position: absolute;
    left: 0;
    top: 150px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    opacity: 0.2;
}

.experience-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin-left: 30px;
}

.experience-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
}

.experience-item:hover::after {
    opacity: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95) translate3d(0, 0, 0);
    }
    50% {
        transform: scale(1) translate3d(0, 0, 0);
    }
    100% {
        transform: scale(0.95) translate3d(0, 0, 0);
    }
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -36px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
    transition: all 0.3s ease;
}

.experience-item:hover::before {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.7);
}

.experience-item h4 i {
    transition: transform 0.3s ease;
}

.experience-item:hover h4 i {
    transform: rotate(15deg);
}

.experience-item ul li::before {
    transition: transform 0.3s ease;
}

.experience-item:hover ul li::before {
    transform: translateX(3px);
}

.experience-item h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.experience-item .company {
    color: var(--text-color);
    font-weight: 600;
}

.experience-item .location {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    font-style: italic;
}

.experience-item .date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.experience-item ul {
    list-style-type: none;
    padding-left: 1.5rem;
}

.experience-item ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

.experience-item ul li:before {
    content: "▹";
    position: absolute;
    left: -1.5rem;
    color: var(--primary-color);
}

/* Contact Section */
#contact {
    padding-top: calc(var(--nav-height) + 2rem);
    max-width: 800px;
    margin: 0 auto;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-card h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.contact-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--primary-color);
}

.quran-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.arabic-verse {
    font-size: 1.8rem;
    line-height: 2;
    margin-bottom: 1rem;
}

.verse-reference {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-section {
        margin-top: calc(var(--nav-height) + 1rem);
        padding: 1.5rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .navbar-collapse {
        background: var(--card-bg);
        padding: 1rem;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .profile-section h2 {
        font-size: 2rem;
    }

    .profile-section h3 {
        font-size: 1.2rem;
    }

    .about-content, .education-item, .skills-container, .project-card, .experience-item, .contact-card {
        padding: 1.5rem;
        margin: 1rem;
    }

    .project-image {
        height: 200px;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }

    .projects-container {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .project-image {
        height: 200px;
    }
}

.container {
    max-width: 1200px;
    padding: 0 1rem;
}

section {
    padding: 2rem 0;
}

/* Particles.js Container */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: -1;
}

/* Typed.js Cursor */
.typed-cursor {
    color: var(--primary-color);
}

/* Enhanced Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
}

@media screen and (max-width: 992px) {
    :root {
        --nav-height: 60px;
    }

    .profile-section {
        padding-top: 100px;
    }

    .profile-section h2 {
        font-size: 2.2rem;
    }

    .profile-section h3 {
        font-size: 1.3rem;
    }

    .about-content {
        padding: 2rem;
        margin: 0 1rem;
    }

    .education-item {
        padding: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    body {
        font-size: 0.95rem;
    }

    .navbar {
        padding: 0.5rem 1rem;
    }

    .navbar-collapse {
        background: var(--card-bg);
        padding: 1rem;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-item {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .profile-section {
        padding: 1.5rem;
        margin: 1rem;
    }

    .about-content {
        padding: 1.5rem;
        font-size: 1rem;
    }

    .about-content h3 {
        font-size: 1.5rem;
    }

    .education-item h4 {
        font-size: 1.3rem;
    }

    .education-item .institution {
        font-size: 1rem;
    }
}

@media screen and (max-width: 576px) {
    .profile-section {
        margin-top: calc(var(--nav-height) + 1rem);
        padding: 1.25rem;
        margin: 0.5rem;
    }

    .profile-section h2 {
        font-size: 1.8rem;
    }

    .profile-section h3 {
        font-size: 1.1rem;
    }

    .profile-image {
        width: 120px;
        height: 120px;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }

    .about-content {
        padding: 1.25rem;
        margin: 0 0.5rem;
    }

    .about-content h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .about-content p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .education-item {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .education-item h4 {
        font-size: 1.2rem;
    }

    .education-item ul {
        padding-left: 1.25rem;
    }

    .education-item ul li {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
}

/* Dark mode styles should be placed after media queries */

/* Print Styles */
@media print {
    /* Hide unnecessary elements */
    #particles-js,
    .navbar,
    .progress-bar {
        display: none !important;
    }

    /* Reset background colors and shadows */
    body {
        background: white !important;
        color: black !important;
    }

    .profile-section,
    .about-content,
    .education-item,
    .skills-item,
    .project-card {
        background: none !important;
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin: 1rem 0;
        padding: 1rem;
    }

    /* Ensure text is readable */
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid;
    }

    p, li {
        color: black !important;
    }

    /* Ensure links are useful in printed version */
    a {
        text-decoration: none !important;
        color: black !important;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    /* Optimize images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}

/* Loading State Styles */
.loading {
    position: relative;
}

.loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    z-index: 10000;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Lazy Loading Images */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[data-src][src] {
    opacity: 1;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.scroll-to-top i {
    font-size: 1.2rem;
}

/* Loading Progress Bar */
.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(108, 92, 231, 0.1);
    z-index: 9999;
}

.progress-bar-container .progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0;
    transition: width 0.3s ease;
}

#experience h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

#experience h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

#experience h3:hover::after {
    width: 100px;
}

#experience h3 i {
    transition: transform 0.3s ease;
}

#experience h3:hover i {
    transform: rotate(15deg);
}

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

.skill-tag {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 92, 231, 0.3);
}

.skill-tag:hover::before {
    opacity: 1;
    animation: shine 1.5s infinite;
}

@keyframes shine {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media screen and (max-width: 576px) {
    .skill-tags {
        gap: 0.3rem;
    }
    
    .skill-tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Mobile Responsive Styles for Education Section */
@media screen and (max-width: 768px) {
    #education {
        padding-top: calc(var(--nav-height) + 1rem);
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #education h3 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .education-item {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        margin-left: 0;
        margin-right: 0;
    }

    .education-item h4 {
        font-size: 1.3rem;
        gap: 0.5rem;
    }

    .education-item .institution {
        font-size: 1rem;
    }

    .education-item .location,
    .education-item .date {
        font-size: 0.9rem;
    }

    .education-item ul {
        padding-left: 1.25rem;
    }

    .education-item ul li {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        line-height: 1.5;
    }

    .skill-tags {
        gap: 0.4rem;
        margin: 0.75rem 0;
    }

    .skill-tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }

    .qualification-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .qualification-item {
        padding: 1.25rem;
        margin: 0;
    }

    .qualification-item h5 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .qualification-item p {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .qualification-item i {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .qualifications-container {
        padding: 1rem;
        margin: 0;
    }
}

@media screen and (max-width: 576px) {
    #education {
        padding-top: calc(var(--nav-height) + 0.5rem);
    }

    .education-item {
        padding: 1.25rem;
    }

    .education-item h4 {
        font-size: 1.2rem;
    }

    .skill-tags {
        gap: 0.3rem;
    }

    .skill-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}