/* Theme Variables */
:root {
    /* Light Mode Colors - Professional and Clean */
    --bg-primary-light: #ffffff;
    --bg-secondary-light: #f4f7f6;
    --text-primary-light: #1a2b3c;
    --text-secondary-light: #2c3e50;
    --accent-color-light: #3498db;
    --primary-color-light: #3498db;  /* Blue */
    --secondary-color-light: #2ecc71;  /* Green */
    --text-color-light: #333;
    --background-color-light: #f4f4f4;

    /* Dark Mode Colors - Deep Midnight Blue */
    --bg-primary-dark: #0a192f;
    --bg-secondary-dark: #112240;
    --text-primary-dark: #e6f1ff;
    --text-secondary-dark: #8892b0;
    --accent-color-dark: #64ffda;
    --primary-color-dark: #64ffda;  /* Teal */
    --secondary-color-dark: #2ecc71;  /* Green */
    --text-color-dark: #ffffff;
    --background-color-dark: #121212;

    /* Default to Light Mode */
    --bg-primary: var(--bg-primary-light);
    --bg-secondary: var(--bg-secondary-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --accent-color: var(--accent-color-light);
    --primary-color: var(--primary-color-light);
    --secondary-color: var(--secondary-color-light);
    --text-color: var(--text-color-light);
    --background-color: var(--background-color-light);
    --border-color: var(--bg-secondary-light);
    --shadow-color: rgba(0, 0, 0, 0.05);
}

/* Performance and Accessibility Optimizations */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text-color: #333;
    --background-color: #f4f4f4;
}

/* Optimize font loading */
@font-face {
    font-display: swap;
    font-family: 'Open Sans';
    src: url('../fonts/opensans-regular.woff2') format('woff2');
}

/* Accessibility and Performance Base Styles */
*, 
*::before, 
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Accessibility Improvements */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:focus,
a:hover {
    text-decoration: underline;
    outline: 2px solid var(--primary-color);
}

/* Keyboard Navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    font-family: 'object-fit: cover;';
}

/* Performance Optimization for Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Responsive Typography */
html {
    font-size: 16px;
}

@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body {
        background-color: #000;
        color: #fff;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}

/* Lazy Loading Support */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Screen Reader Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Light Mode Specific Styles */
.light-mode {
    --bg-primary: var(--bg-primary-light);
    --bg-secondary: var(--bg-secondary-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --accent-color: var(--accent-color-light);
    --primary-color: var(--primary-color-light);
    --secondary-color: var(--secondary-color-light);
    --text-color: var(--text-color-light);
    --background-color: var(--background-color-light);
    --border-color: var(--bg-secondary-light);
    --shadow-color: rgba(0, 0, 0, 0.05);
}

/* Dark Mode Specific Styles */
.dark-mode {
    --bg-primary: var(--bg-primary-dark);
    --bg-secondary: var(--bg-secondary-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --accent-color: var(--accent-color-dark);
    --primary-color: var(--primary-color-dark);
    --secondary-color: var(--secondary-color-dark);
    --text-color: var(--text-color-dark);
    --background-color: var(--background-color-dark);
    --border-color: #233554;
    --shadow-color: rgba(2, 12, 27, 0.7);
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-color);
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    width: 100%;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

nav .logo {
    flex: 0 1 auto;
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    list-style-type: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-color);
}

.theme-toggle {
    flex: 0 1 auto;
}

.hero {
    text-align: center;
    padding: 4rem 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-buttons {
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 10px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: darken(var(--secondary-color), 10%);
}

.skills {
    background-color: var(--bg-secondary);
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill {
    max-width: 300px;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 10px;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-links a {
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

.social-links a i {
    font-size: 1.5rem;
}

/* Additional styles for projects and contact pages */


/* Project Section Styles */
.projects-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.project-insights {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 2rem;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project-insights h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-image-content {
    text-align: center;
    color: var(--text-primary);
    padding: 1rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-card:hover .project-image-overlay {
    opacity: 1;
}

.project-card:hover .project-image-content {
    transform: translateY(0);
    opacity: 1;
}

.project-image-content h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.project-image-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-card .duration {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.project-description ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.project-description ul li {
    margin-bottom: 0.5rem;
}

.project-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tech-tags span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background-color: rgba(40, 167, 69, 0.1); /* Light green background */
    color: #28a745 !important; /* Force green text */
    border: 1px solid rgba(40, 167, 69, 0.3); /* Green border */
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-tags span:hover {
    background-color: rgba(40, 167, 69, 0.2);
    transform: scale(1.05);
}

.tech-tags span i {
    margin-right: 0.3rem;
    color: #28a745 !important; /* Force green icon */
    opacity: 0.8;
}

/* Dark Mode Compatibility */
@media (prefers-color-scheme: dark) {
    .tech-tags span {
        background-color: rgba(40, 167, 69, 0.2) !important;
        color: #5cff87 !important; /* Brighter green for dark mode */
        border-color: rgba(40, 167, 69, 0.4) !important;
    }

    .tech-tags span i {
        color: #5cff87 !important;
        opacity: 1;
    }

    .tech-tags span:hover {
        background-color: rgba(40, 167, 69, 0.3) !important;
    }
}

.project-links {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--primary-color);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.btn-small:hover {
    background-color: darken(var(--primary-color), 10%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto;
}

.contact-form input, 
.contact-form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.contact-form textarea {
    height: 150px;
}

.contact-info {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-links {
    margin-top: 1rem;
}

.about-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.about-hero {
    text-align: center;
    margin-bottom: 3rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.professional-overview {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.overview-grid {
    display: flex;
    gap: 2rem;
}

.overview-item {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.education-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 2rem;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-category {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.skill-category {
    margin-bottom: 1.5rem;
}

.skill-category h3 {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-tags span:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px var(--shadow-color);
}

.skill-tags span i {
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Specific Icon Colors */
.skill-tags span i.fa-html5 { color: #E34F26; }
.skill-tags span i.fa-css3-alt { color: #1572B6; }
.skill-tags span i.fa-react { color: #61DAFB; }
.skill-tags span i.fa-bootstrap { color: #7952B3; }
.skill-tags span i.fa-node-js { color: #339933; }
.skill-tags span i.fa-git-alt { color: #F05032; }
.skill-tags span i.fa-microsoft { color: #5E5E5E; }
.skill-tags span i.fa-python { color: #3776AB; }
.skill-tags span i.fa-laptop-code { color: #0078D4; }

.certification-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.certification-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Certification Section Styling */
.certifications-section {
    padding: 2rem 0;
    background-color: var(--bg-secondary);
}

.certification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.certification-card {
    background-color: var(--bg-primary);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certification-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.certification-details {
    text-align: center;
}

.certification-details h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.certification-details p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.certification-details i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.btn-small {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.btn-small:hover {
    background-color: var(--accent-hover);
}

/* Internships Section Styles */
.internships-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.internship-insights {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 2rem;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.internship-insights h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.internship-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.internship-card {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.internship-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.internship-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.internship-card .company {
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.internship-card .duration {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.internship-description ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.internship-description ul li {
    margin-bottom: 0.5rem;
}

.internship-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.internship-links {
    display: flex;
    gap: 0.5rem;
}

.internship-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.internship-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.internship-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.internship-image-content {
    text-align: center;
    color: var(--text-primary);
    padding: 1rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.internship-card:hover .internship-image {
    transform: scale(1.1);
}

.internship-card:hover .internship-image-overlay {
    opacity: 1;
}

.internship-card:hover .internship-image-content {
    transform: translateY(0);
    opacity: 1;
}

.internship-image-content h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.internship-image-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .internship-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero Section Styles */
.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem; /* Space between image and text */
    padding: 2rem;
}

.hero-content img {
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideIn 1s ease-out;
    max-width: 300px;
    transition: transform 0.3s ease;
}

.hero-content img:hover {
    transform: scale(1.05);
}

.hero-text {
    animation: slideIn 1s ease-out 0.5s backwards;
    max-width: 600px;
}

.hero-text h1 {
    margin-bottom: 1rem; /* Space after name */
}

.hero-text p {
    margin-bottom: 0.75rem; /* Space between paragraphs */
}

.hero-text p:first-of-type {
    margin-bottom: 1rem; /* Extra space for first paragraph */
}

.hero-cta {
    margin-top: 1.5rem; /* Space before CTA buttons */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 1rem;
    }

    .hero-content img {
        max-width: 250px;
    }
}

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

/* Global Section Animations */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Section Animations */
.about-hero h1,
.projects-section h1,
.internships-section h1,
.contact-section h1 {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.about-hero p,
.project-insights,
.internship-insights {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.professional-overview .overview-grid,
.project-grid,
.internship-grid {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.7s forwards;
}

.skills-section .skills-categories,
.certifications-section .certification-grid {
    opacity: 0;
    animation: slideInLeft 1s ease-out 0.9s forwards;
}

.education-section .education-card,
.project-card,
.internship-card {
    opacity: 0;
    animation: slideInRight 1s ease-out 1.1s forwards;
}

/* Stagger animations for grid items */
.project-grid .project-card,
.internship-grid .internship-card {
    animation-delay: calc(1.1s + (var(--index, 0) * 0.2s));
}

.skills-categories .skill-category {
    animation-delay: calc(0.9s + (var(--index, 0) * 0.2s));
}

/* Theme Toggle Styles with Enhanced Sliding Motion */
.theme-toggle {
    display: flex;
    align-items: center;
    margin-left: auto;
    position: relative;
}

.theme-switch-input {
    display: none;
}

.theme-switch-label {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    background-color: var(--bg-secondary);
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.theme-switch-label::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: var(--accent-color);
    border-radius: 50%;
    transition: 
        transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55),
        background-color 0.3s ease;
}

.theme-switch-input:checked + .theme-switch-label {
    background-color: var(--bg-secondary);
}

.theme-switch-input:checked + .theme-switch-label::before {
    transform: translateX(30px);
    background-color: var(--accent-hover);
}

.theme-switch-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    z-index: 1;
}

.theme-switch-icon.sun {
    left: 5px;
    color: #ffc107;
    opacity: 0.7;
}

.theme-switch-icon.moon {
    right: 5px;
    color: #2196f3;
    opacity: 0.7;
}

/* Hover and Focus Effects */
.theme-switch-label:hover::before {
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.theme-switch-input:focus + .theme-switch-label {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Global element theme adjustments */
a {
    color: var(--accent-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

.btn-primary, .btn-secondary {
    background-color: var(--accent-color);
    color: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.btn-primary:hover, .btn-secondary:hover {
    background-color: var(--accent-hover);
}

/* Contact Page Layout */
.contact-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.contact-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.contact-info {
    flex: 1;
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    min-width: 30px;
    text-align: center;
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 600;
}

.form-group input, 
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }
    
    .contact-info, 
    .contact-form {
        width: 100%;
    }
}

/* Project Tech Tags */
.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-tech-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: transform 0.3s ease;
}

.project-tech-tags span:hover {
    transform: translateY(-2px);
}

.project-tech-tags span i {
    color: var(--accent-color);
    font-size: 1rem;
}

/* Professional About Page Styles */
.about-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

.about-content {
    max-width: 1200px;
    width: 100%;
}

.professional-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.professional-intro h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.professional-intro h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.professional-highlights {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.professional-highlights .highlight {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 10px;
    flex: 1;
    transition: transform 0.3s ease;
}

.professional-highlights .highlight:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.professional-highlights .highlight i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-right: 1rem;
}

.professional-skills {
    margin-top: 3rem;
}

.skill-matrix {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.skill-column {
    flex: 1;
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.skill-column:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.skill-column h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

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

.skill-column ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.professional-philosophy {
    margin-top: 3rem;
    text-align: center;
}

.professional-philosophy blockquote {
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
}

/* Theme Modal Styles */
.theme-toggle {
    position: relative;
}

#theme-modal-toggle {
    background: var(--accent-color);
    color: var(--text-primary);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

#theme-modal {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-color);
    padding: 15px;
    z-index: 1000;
    min-width: 200px;
}

#theme-modal.show {
    display: block;
}

#theme-modal .modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#theme-modal #theme-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

#theme-modal button {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    background: var(--accent-color);
    color: var(--text-primary);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Achievements and Extracurricular Sections */
.achievements-section,
.extracurricular-section {
    display: none;
}

/* Technical Skills Section */
.technical-skills-section {
    background-color: var(--bg-secondary);
    padding: 3rem 0;
}

.technical-skills-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.technical-skills-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.technical-skills-section h2 i {
    color: var(--accent-color);
    font-size: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background-color: var(--bg-primary);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.skill-category h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

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

.skill-category li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-primary);
    transition: color 0.3s ease, transform 0.2s ease;
}

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

.skill-category li i {
    color: var(--accent-color);
    font-size: 1.2rem;
    min-width: 1.5rem;
    text-align: center;
}

/* Project Image Container Styles */
.project-image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 300px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-image-content {
    text-align: center;
    color: var(--text-primary);
    padding: 1rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-card:hover .project-image-overlay {
    opacity: 1;
}

.project-card:hover .project-image-content {
    transform: translateY(0);
    opacity: 1;
}

.project-image-content h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.project-image-content p {
    color: var(--text-secondary);
}

/* Mobile-First Responsive Enhancements */
@media (max-width: 768px) {
    /* Navigation Optimization */
    header nav {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    header nav ul li {
        margin: 0.5rem 0;
    }

    /* Hero Section Mobile Adjustments */
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 1rem;
    }

    .hero-content img {
        max-width: 250px;
        margin-bottom: 1rem;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-text p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        margin: 0.5rem 0;
    }

    /* Touch Target Size Optimization */
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1rem;
    }

    /* Social Links Mobile */
    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .social-links a {
        margin: 0.5rem;
    }
}

/* Ultra-Small Devices */
@media (max-width: 375px) {
    .hero-content img {
        max-width: 200px;
    }

    .hero-text h1 {
        font-size: 1.5rem;
    }

    .hero-text p {
        font-size: 0.9rem;
    }
}

/* Ensure Smooth Scaling */
html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    html {
        font-size: 12px;
    }
}

/* Certification Sliding Animation */
@keyframes certificationSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.certification-section .certification-card {
    opacity: 0;
    animation: certificationSlideIn 0.8s ease-out forwards;
    animation-delay: calc(var(--delay) * 0.2s);
}

/* Staggered Animation Delays */
.certification-section .certification-card:nth-child(1) {
    --delay: 1;
}
.certification-section .certification-card:nth-child(2) {
    --delay: 2;
}
.certification-section .certification-card:nth-child(3) {
    --delay: 3;
}
.certification-section .certification-card:nth-child(4) {
    --delay: 4;
}
.certification-section .certification-card:nth-child(5) {
    --delay: 5;
}
.certification-section .certification-card:nth-child(6) {
    --delay: 6;
}

/* Hover Effect */
.certification-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certification-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Project Description Readability */
.project-card .project-description {
    color: #333; /* Dark gray for better contrast */
    line-height: 1.6; /* Improved readability */
    font-weight: 400; /* Slightly bolder for clarity */
    opacity: 0.9; /* Slight transparency for softer look */
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .project-card .project-description {
        color: #e0e0e0; /* Lighter color for dark mode */
        opacity: 0.85;
    }
}

/* Ensure good contrast with background */
.project-card {
    background-color: #fff; /* Ensure white background */
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Technology Tags */
.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.project-technologies span {
    background-color: #f0f0f0;
    color: #333;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Dark Mode Internship Skills Visibility */
@media (prefers-color-scheme: dark) {
    .internship-skills {
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .internship-skills span {
        background-color: rgba(255, 255, 255, 0.15);
        color: #e0e0e0; /* Lighter text for better readability */
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .internship-skills span i {
        color: #4db8ff; /* Brighter icon color */
        opacity: 0.8;
    }
}

/* Consistent Skill Tag Styling */
.internship-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    transition: background-color 0.3s ease;
}

.internship-skills span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background-color: rgba(40, 167, 69, 0.1); /* Light green background */
    color: #28a745; /* Green text */
    border: 1px solid rgba(40, 167, 69, 0.3); /* Green border */
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.internship-skills span:hover {
    background-color: rgba(40, 167, 69, 0.2);
    transform: scale(1.05);
}

.internship-skills span i {
    margin-right: 0.3rem;
    color: #28a745; /* Green icon */
    opacity: 0.8;
}

/* Dark Mode Compatibility */
@media (prefers-color-scheme: dark) {
    .internship-skills span {
        background-color: rgba(40, 167, 69, 0.2);
        color: #5cff87; /* Brighter green for dark mode */
        border-color: rgba(40, 167, 69, 0.4);
    }

    .internship-skills span i {
        color: #5cff87;
        opacity: 1;
    }

    .internship-skills span:hover {
        background-color: rgba(40, 167, 69, 0.3);
    }
}

/* Green Button and Link Styling */
.internship-links .btn-small,
.btn-small {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background-color: rgba(40, 167, 69, 0.1) !important; /* Light green background */
    color: #28a745 !important; /* Green text */
    border: 1px solid rgba(40, 167, 69, 0.3) !important; /* Green border */
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.internship-links .btn-small:hover,
.btn-small:hover {
    background-color: rgba(40, 167, 69, 0.2) !important;
    transform: scale(1.05);
    color: #28a745 !important;
}

.internship-links .btn-small i,
.btn-small i {
    margin-right: 0.3rem;
    color: #28a745 !important;
    opacity: 0.8;
}

/* Dark Mode Compatibility */
@media (prefers-color-scheme: dark) {
    .internship-links .btn-small,
    .btn-small {
        background-color: rgba(40, 167, 69, 0.2) !important;
        color: #5cff87 !important; /* Brighter green for dark mode */
        border-color: rgba(40, 167, 69, 0.4) !important;
    }

    .internship-links .btn-small:hover,
    .btn-small:hover {
        background-color: rgba(40, 167, 69, 0.3) !important;
        color: #5cff87 !important;
    }

    .internship-links .btn-small i,
    .btn-small i {
        color: #5cff87 !important;
        opacity: 1;
    }
}

/* Project Skills and Links Styling */
.project-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem; /* Added space before project links */
}

.project-links {
    display: flex;
    gap: 1rem; /* Space between View Details and GitHub buttons */
}

.project-links .btn-small,
.project-tech-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background-color: rgba(40, 167, 69, 0.1) !important; /* Light green background */
    color: #28a745 !important; /* Green text */
    border: 1px solid rgba(40, 167, 69, 0.3) !important; /* Green border */
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-links .btn-small:hover,
.project-tech-tags span:hover {
    background-color: rgba(40, 167, 69, 0.2) !important;
    transform: scale(1.05);
    color: #28a745 !important;
}

.project-links .btn-small i,
.project-tech-tags span i {
    margin-right: 0.3rem;
    color: #28a745 !important;
    opacity: 0.8;
}

/* Dark Mode Compatibility */
@media (prefers-color-scheme: dark) {
    .project-links .btn-small,
    .project-tech-tags span {
        background-color: rgba(40, 167, 69, 0.2) !important;
        color: #5cff87 !important; /* Brighter green for dark mode */
        border-color: rgba(40, 167, 69, 0.4) !important;
    }

    .project-links .btn-small:hover,
    .project-tech-tags span:hover {
        background-color: rgba(40, 167, 69, 0.3) !important;
        color: #5cff87 !important;
    }

    .project-links .btn-small i,
    .project-tech-tags span i {
        color: #5cff87 !important;
        opacity: 1;
    }
}