/* style.css - Modified for All Projects Page Layout */

:root {
    /* Define color variables for easier theme switching */
    --bg-color-dark: #1a202c;
    --bg-color-dark-gradient: #2a3749;
    --text-color-dark: #ffffff;
    --text-color-dark-secondary: rgba(255, 255, 255, 0.8);
    --text-color-dark-tertiary: rgba(255, 255, 255, 0.7);
    --border-color-dark: rgba(255, 255, 255, 0.5);
    --btn-bg-dark: rgba(255, 255, 255, 0.05);
    --btn-hover-bg-dark: rgba(255, 255, 255, 0.1);
    --btn-resume-bg-dark: #f59e0b;
    /* Orange */
    --btn-resume-text-dark: #1f2937;
    /* Dark text for orange btn */
    --btn-resume-hover-bg-dark: #d97706;
    /* Darker Orange */
    --profile-border-dark: rgba(255, 255, 255, 0.5);
    --profile-shadow-dark: rgba(255, 255, 255, 0.2);
    --theme-toggle-color-dark: #ffffff;
    --theme-toggle-hover-dark: rgba(255, 255, 255, 0.8);
    --space-object-color-dark: rgba(100, 116, 139, 0.4);
    --light-meteor-color-dark: rgba(255, 255, 255, 0.8);
    --light-meteor-glow-dark: rgba(255, 255, 255, 0.5);

    /* New variables for added sections - Dark Mode */
    --section-bg-dark: rgba(255, 255, 255, 0.03);
    /* Slightly visible background */
    --section-border-dark: rgba(255, 255, 255, 0.1);
    --toggle-bg-dark: rgba(255, 255, 255, 0.05);
    --toggle-btn-bg-dark: transparent;
    --toggle-btn-active-bg-dark: #f59e0b;
    /* Orange */
    --toggle-btn-active-text-dark: #1a202c;
    /* Dark text */
    --timeline-line-dark: rgba(255, 255, 255, 0.2);
    --timeline-circle-border-dark: #f59e0b;
    /* Orange */
    --timeline-circle-bg-dark: #1a202c;
    --timeline-content-bg-dark: rgba(255, 255, 255, 0.05);
    --skill-badge-bg-dark: rgba(255, 255, 255, 0.1);
    --skill-badge-text-dark: #ffffff;
    --project-card-bg-dark: #34495e;
    /* Slightly different background for projects */
    --project-card-border-dark: rgba(255, 255, 255, 0.1);
    --project-tech-badge-bg-dark: rgba(255, 255, 255, 0.08);
    --project-link-color-dark: #f59e0b;
    /* Orange */
    --form-bg-dark: rgba(255, 255, 255, 0.05);
    --form-border-dark: rgba(255, 255, 255, 0.1);
    --form-input-bg-dark: rgba(255, 255, 255, 0.02);
    --form-input-border-dark: rgba(255, 255, 255, 0.1);
    --form-input-text-dark: #ffffff;
    --submit-btn-bg-dark: #f59e0b;
    /* Orange */
    --submit-btn-text-dark: #1f2937;
    /* Dark text */
    --submit-btn-hover-bg-dark: #d97706;
    /* Darker Orange */
    --footer-text-dark: rgba(255, 255, 255, 0.6);
    --footer-icon-dark: rgba(255, 255, 255, 0.6);
    --footer-icon-hover-dark: #ffffff;

    /* Projects Page Specific Dark Mode */
    --projects-header-text-dark: #ffffff;
    --projects-header-underline-dark: #f59e0b;
    /* Orange underline for title */
    --back-link-dark: rgba(255, 255, 255, 0.7);
    --back-link-hover-dark: #ffffff;


    /* Light Mode Variables */
    --bg-color-light: #ffffff;
    --bg-color-light-gradient: #f0f0f0;
    --text-color-light: #1a202c;
    --text-color-light-secondary: rgba(26, 32, 44, 0.8);
    --text-color-light-tertiary: rgba(26, 32, 44, 0.6);
    --border-color-light: rgba(26, 32, 44, 0.3);
    --btn-bg-light: rgba(26, 32, 44, 0.05);
    --btn-hover-bg-light: rgba(26, 32, 44, 0.1);
    --btn-resume-bg-light: #f59e0b;
    /* Orange */
    --btn-resume-text-light: #ffffff;
    /* White text for orange btn */
    --btn-resume-hover-bg-light: #d97706;
    /* Darker Orange */
    --profile-border-light: rgba(26, 32, 44, 0.3);
    --profile-shadow-light: rgba(0, 0, 0, 0.1);
    --theme-toggle-color-light: #1a202c;
    --theme-toggle-hover-light: rgba(26, 32, 44, 0.8);

    /* New variables for added sections - Light Mode */
    --section-bg-light: #ffffff;
    --section-border-light: rgba(0, 0, 0, 0.1);
    --toggle-bg-light: #e2e8f0;
    /* Light grey */
    --toggle-btn-bg-light: transparent;
    --toggle-btn-active-bg-light: #f59e0b;
    /* Orange */
    --toggle-btn-active-text-light: #ffffff;
    /* White text */
    --timeline-line-light: rgba(0, 0, 0, 0.1);
    --timeline-circle-border-light: #f59e0b;
    /* Orange */
    --timeline-circle-bg-light: #ffffff;
    --timeline-content-bg-light: #ffffff;
    /* White */
    --skill-badge-bg-light: #e2e8f0;
    /* Light grey */
    --skill-badge-text-light: #1a202c;
    /* Dark text */
    --project-card-bg-light: #ffffff;
    /* White */
    --project-card-border-light: rgba(0, 0, 0, 0.1);
    --project-tech-badge-bg-light: #f7fafc;
    /* Lighter grey */
    --project-link-color-light: #f59e0b;
    /* Orange */
    --form-bg-light: #f7fafc;
    /* Lighter grey */
    --form-border-light: rgba(0, 0, 0, 0.1);
    --form-input-bg-light: #ffffff;
    --form-input-border-light: rgba(0, 0, 0, 0.2);
    --form-input-text-light: #1a202c;
    --submit-btn-bg-light: #f59e0b;
    /* Orange */
    --submit-btn-text-light: #ffffff;
    /* White text */
    --submit-btn-hover-bg-light: #d97706;
    /* Darker Orange */
    --footer-text-light: rgba(0, 0, 0, 0.6);
    --footer-icon-light: rgba(0, 0, 0, 0.6);
    --footer-icon-hover-light: #1a202c;

    /* Projects Page Specific Light Mode */
    --projects-header-text-light: #1a202c;
    --projects-header-underline-light: #f59e0b;
    /* Orange underline for title */
    --back-link-light: rgba(26, 32, 44, 0.7);
    --back-link-hover-light: #1a202c;


    /* Use the dark mode variables by default */
    --current-bg-color: var(--bg-color-dark);
    --current-bg-color-gradient: var(--bg-color-dark-gradient);
    --current-text-color: var(--text-color-dark);
    --current-text-color-secondary: var(--text-color-dark-secondary);
    --current-text-color-tertiary: var(--text-color-dark-tertiary);
    --current-border-color: var(--border-color-dark);
    --current-btn-bg: var(--btn-bg-dark);
    --current-btn-hover-bg: var(--btn-hover-bg-dark);
    --current-btn-resume-bg: var(--btn-resume-bg-dark);
    --current-btn-resume-text: var(--btn-resume-text-dark);
    --current-btn-resume-hover-bg: var(--btn-resume-hover-bg-dark);
    --current-profile-border: var(--profile-border-dark);
    --current-profile-shadow: var(--profile-shadow-dark);
    --current-theme-toggle-color: var(--theme-toggle-color-dark);
    --current-theme-toggle-hover: var(--theme-toggle-hover-dark);
    --current-space-object-color: var(--space-object-color-dark);
    --current-light-meteor-color: var(--light-meteor-color-dark);
    --current-light-meteor-glow: var(--light-meteor-glow-dark);

    /* Current variables for added sections */
    --current-section-bg: var(--section-bg-dark);
    --current-section-border: var(--section-border-dark);
    --current-toggle-bg: var(--toggle-bg-dark);
    --current-toggle-btn-bg: var(--toggle-btn-bg-dark);
    --current-toggle-btn-active-bg: var(--toggle-btn-active-bg-dark);
    --current-toggle-btn-active-text: var(--toggle-btn-active-text-dark);
    --current-timeline-line: var(--timeline-line-dark);
    --current-timeline-circle-border: var(--timeline-circle-border-dark);
    --current-timeline-circle-bg: var(--timeline-circle-bg-dark);
    --current-timeline-content-bg: var(--timeline-content-bg-dark);
    --current-skill-badge-bg: var(--skill-badge-bg-dark);
    --current-skill-badge-text: var(--skill-skill-badge-text-dark);
    --current-project-card-bg: var(--project-card-bg-dark);
    --current-project-card-border: var(--project-card-border-dark);
    --current-project-tech-badge-bg: var(--project-tech-badge-bg-dark);
    --current-project-link-color: var(--project-link-color-dark);
    --current-form-bg: var(--form-bg-dark);
    --current-form-border: var(--form-border-dark);
    --current-form-input-bg: var(--form-input-bg-dark);
    --current-form-input-border: var(--form-input-border-dark);
    --current-form-input-text: var(--form-input-text-dark);
    --current-submit-btn-bg: var(--submit-btn-bg-dark);
    --current-submit-btn-text: var(--submit-btn-text-dark);
    --current-submit-btn-hover-bg: var(--submit-btn-hover-bg-dark);
    --current-footer-text: var(--footer-text-dark);
    --current-footer-icon: var(--footer-icon-dark);
    --current-footer-icon-hover: var(--footer-icon-hover-dark);

    /* Projects Page Specific Current Variables */
    --current-projects-header-text: var(--projects-header-text-dark);
    --current-projects-header-underline: var(--projects-header-underline-dark);
    --current-back-link-color: var(--back-link-dark);
    --current-back-link-hover-color: var(--back-link-hover-dark);
}

body.light-mode {
    /* In light mode, switch the 'current' variables to light mode values */
    --current-bg-color: var(--bg-color-light);
    --current-bg-color-gradient: var(--bg-color-light-gradient);
    --current-text-color: var(--text-color-light);
    --current-text-color-secondary: var(--text-color-light-secondary);
    --current-text-color-tertiary: var(--text-color-light-tertiary);
    --current-border-color: var(--border-color-light);
    --current-btn-bg: var(--btn-bg-light);
    --current-btn-hover-bg: var(--btn-hover-bg-light);
    --current-btn-resume-bg: var(--btn-resume-bg-light);
    --current-btn-resume-text: var(--btn-resume-text-light);
    --current-btn-resume-hover-bg: var(--btn-resume-hover-bg-light);
    --current-profile-border: var(--profile-border-light);
    --current-profile-shadow: var(--profile-shadow-light);
    --current-theme-toggle-color: var(--theme-toggle-color-light);
    --current-theme-toggle-hover: var(--theme-toggle-hover-light);

    /* Current variables for added sections - Light Mode */
    --current-section-bg: var(--section-bg-light);
    --current-section-border: var(--section-border-light);
    --current-toggle-bg: var(--toggle-bg-light);
    --current-toggle-btn-bg: var(--toggle-btn-bg-light);
    --current-toggle-btn-active-bg: var(--toggle-btn-active-bg-light);
    --current-toggle-btn-active-text: var(--toggle-btn-active-text-light);
    --current-timeline-line: var(--timeline-line-light);
    --current-timeline-circle-border: var(--timeline-circle-border-light);
    --current-timeline-circle-bg: var(--timeline-circle-bg-light);
    --current-timeline-content-bg: var(--timeline-content-bg-light);
    --current-skill-badge-bg: var(--skill-badge-bg-light);
    --current-skill-badge-text: var(--skill-badge-text-light);
    --current-project-card-bg: var(--project-card-bg-light);
    /* White */
    --current-project-card-border: var(--project-card-border-light);
    --current-project-tech-badge-bg: var(--project-tech-badge-bg-light);
    --current-project-link-color: var(--project-link-color-light);
    --current-form-bg: var(--form-bg-light);
    --current-form-border: var(--form-border-light);
    --current-form-input-bg: var(--form-input-bg-light);
    --current-form-input-border: var(--form-input-border-light);
    --current-form-input-text: var(--form-input-text-light);
    --current-submit-btn-bg: var(--submit-btn-bg-light);
    --current-submit-btn-text: var(--submit-btn-text-light);
    --current-submit-btn-hover-bg: var(--submit-btn-hover-bg-light);
    --current-footer-text: var(--footer-text-light);
    --current-footer-icon: var(--footer-icon-light);
    --current-footer-icon-hover: var(--footer-icon-hover-light);

    /* Projects Page Specific Current Variables - Light Mode */
    --current-projects-header-text: var(--projects-header-text-light);
    --current-projects-header-underline: var(--projects-header-underline-light);
    --current-back-link-color: var(--back-link-light);
    --current-back-link-hover-color: var(--back-link-hover-light);
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    background-color: var(--current-bg-color);
    background-image: radial-gradient(at 50% 50%, var(--current-bg-color-gradient) 0%, var(--current-bg-color) 80%);
    color: var(--current-text-color);
    display: flex;
    flex-direction: column;
    /* Stack content vertically */
    align-items: center;
    /* Center content horizontally */
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent horizontal scroll from background objects */
    position: relative;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Background objects */
.stars,
.twinkling,
.animated-background-objects {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.5s ease;
    /* Smooth transition for hiding */
}

body.light-mode .stars,
body.light-mode .twinkling,
body.light-mode .animated-background-objects {
    opacity: 0;
}

.stars {
    background-image: radial-gradient(white 1px, transparent 0);
    background-size: 50px 50px;
    opacity: 0.5;
}

/* Space object styles from previous code */
.space-object {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--current-space-object-color);
    border-radius: 50%;
    filter: blur(0.5px);
    opacity: 0;
    will-change: transform, opacity;
}

.space-object-1 {
    width: 15px;
    height: 9px;
    border-radius: 50% / 30%;
    background-color: rgba(150, 150, 150, 0.5);
    /* Keep fixed color for subtle objects */
    animation: moveSpaceObject1 80s linear infinite;
    animation-delay: 5s;
}

.space-object-2 {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(120, 130, 140, 0.6);
    /* Keep fixed color for subtle objects */
    animation: moveSpaceObject2 100s linear infinite;
    animation-delay: 20s;
}

.light-meteor {
    width: 3px;
    height: 3px;
    background-color: var(--current-light-meteor-color);
    box-shadow: 0 0 5px 2px var(--current-light-meteor-glow);
    filter: blur(0.5px);
}

.light-meteor-1 {
    animation: moveLightMeteor1 15s linear infinite;
    animation-delay: 1s;
    width: 4px;
    height: 4px;
    box-shadow: 0 0 6px 3px var(--current-light-meteor-glow);
    /* Use variable */
}

.light-meteor-2 {
    animation: moveLightMeteor2 12s linear infinite;
    animation-delay: 8s;
}

.light-meteor-3 {
    animation: moveLightMeteor3 18s linear infinite;
    animation-delay: 15s;
    width: 2px;
    height: 2px;
    box-shadow: 0 0 4px 1px var(--current-light-meteor-glow);
    /* Use variable */
}


@keyframes moveSpaceObject1 {
    0% {
        transform: translate(-10vw, -10vh) rotate(0deg);
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    95% {
        opacity: 1;
    }

    100% {
        transform: translate(110vw, 110vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes moveSpaceObject2 {
    0% {
        transform: translate(110vw, -10vh) rotate(0deg);
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    95% {
        opacity: 1;
    }

    100% {
        transform: translate(-10vw, 110vh) rotate(-360deg);
        opacity: 0;
    }
}

@keyframes moveLightMeteor1 {
    0% {
        transform: translate(-5vw, 105vh);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(105vw, -5vh);
        opacity: 0;
    }
}

@keyframes moveLightMeteor2 {
    0% {
        transform: translate(-5vw, 50vh);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(105vw, -5vh);
        opacity: 0;
    }
}

@keyframes moveLightMeteor3 {
    0% {
        transform: translate(105vw, 105vh);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(-5vw, -5vh);
        opacity: 0;
    }
}

.theme-toggle-btn {
    position: fixed;
    /* Use fixed so it stays in view */
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--current-theme-toggle-color);
    font-size: 1.5em;
    cursor: pointer;
    outline: none;
    transition: color 0.3s ease;
    z-index: 10;
    /* Above everything else */
}

.theme-toggle-btn:hover {
    color: var(--current-theme-toggle-hover);
}


/* --- Page Container to hold content excluding background --- */
.page-container {
    width: 100%;
    max-width: 1200px;
    /* Wider max-width for projects page */
    margin: 0 auto;
    /* Center the container */
    padding: 0 20px;
    /* Horizontal padding */
    box-sizing: border-box;
    z-index: 1;
    /* Above background */
    display: flex;
    flex-direction: column;
    /* Stack children vertically */
    align-items: center;
    /* Center content within the container */
    padding-top: 80px;
    /* Space for the fixed theme toggle */
}


/* --- Profile Section (Header) - Only on index.html --- */
.profile-container {
    text-align: center;
    padding: 40px 20px;
    max-width: 600px;
    width: 100%;
    position: relative;
    margin-top: 0;
    /* Removed margin-top here, managed by page-container padding */
    margin-bottom: 60px;
    /* Space below profile container */
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px auto;
    border: 3px solid var(--current-profile-border);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px var(--current-profile-shadow);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

h1 {
    font-size: 2.5em;
    margin: 0 0 5px 0;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    /* Keep shadow in dark mode */
    transition: color 0.5s ease;
    color: var(--current-text-color);
}

body.light-mode h1 {
    text-shadow: none;
    /* Remove shadow in light mode */
}


.profession {
    font-size: 1.2em;
    color: var(--current-text-color-secondary);
    margin: 0 0 10px 0;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    /* Keep shadow in dark mode */
    transition: color 0.5s ease;
}

body.light-mode .profession {
    text-shadow: none;
    /* Remove shadow in light mode */
}

.location {
    font-size: 1em;
    color: var(--current-text-color-tertiary);
    margin: 0 0 30px 0;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    /* Keep shadow in dark mode */
    transition: color 0.5s ease;
}

body.light-mode .location {
    text-shadow: none;
    /* Remove shadow in light mode */
}

.location i {
    margin-right: 5px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

.btn {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border: 1px solid var(--current-border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--current-text-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    font-size: 1em;
    cursor: pointer;
    backdrop-filter: blur(3px);
    /* Add blur effect */
    background-color: var(--current-btn-bg);
}

.btn i {
    margin-right: 8px;
    font-size: 1.1em;
}

.btn-resume {
    background-color: var(--current-btn-resume-bg);
    border-color: var(--current-btn-resume-bg);
    /* Match border to background */
    color: var(--current-btn-resume-text);
    font-weight: 600;
    backdrop-filter: none;
    /* Remove blur for the main button */
}

/* Hover effects */
.btn:hover {
    background-color: var(--current-btn-hover-bg);
    border-color: var(--current-border-color);
    /* Keep or slightly change border on hover */
}

.btn-resume:hover {
    background-color: var(--current-btn-resume-hover-bg);
    border-color: var(--current-btn-resume-hover-bg);
}


/* --- Main Content Area --- */
.main-content {
    width: 100%;
    max-width: 900px;
    /* Default for sections on index.html */
    padding: 20px;
    box-sizing: border-box;
    z-index: 1;
    /* Above background */
    margin: 40px auto;
    /* Center and space from profile/footer */
}

/* Specific styles for the main content area on the projects page */
.main-content.projects-page {
    max-width: 1000px;
    /* Wider max-width for projects grid */
    margin-top: 0;
    /* Adjusted margin, header handles spacing */
    padding-top: 0;
    padding-bottom: 40px;
    /* Space before footer */
}


section {
    margin-bottom: 60px;
    /* Space between sections */
    padding: 20px;
    /* Inner padding for sections */
    background-color: var(--current-section-bg);
    border-radius: 8px;
    border: 1px solid var(--current-section-border);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

section h2 {
    font-size: 2em;
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--current-text-color);
}

/* --- Projects Page Header --- */
.projects-page-header {
    width: 100%;
    max-width: 1000px;
    /* Match main content width */
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    /* Needed for absolute positioning of back link on medium screens */
    margin-bottom: 30px;
    color: var(--current-projects-header-text);
}

.projects-page-header h2 {
    font-size: 2.5em;
    margin: 0;
    font-weight: 700;
    position: relative;
    /* Needed for underline */
    padding-bottom: 10px;
    /* Space for underline */
    text-align: center;
    color: inherit;
    /* Use the header color */
}

/* Underline effect for the All Projects title */
.projects-page-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    /* Underline width */
    height: 4px;
    /* Underline thickness */
    background-color: var(--current-projects-header-underline);
    border-radius: 2px;
}


.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    text-decoration: none;
    color: var(--current-back-link-color);
    font-size: 1em;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    z-index: 2;
    /* Ensure it's clickable */
}

.back-link i {
    margin-right: 5px;
}

.back-link:hover {
    color: var(--current-back-link-hover-color);
    text-decoration: underline;
}


/* --- Experience & Education Toggle - Only on index.html --- */
#experience-education .toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    background-color: var(--current-toggle-bg);
    border-radius: 5px;
    overflow: hidden;
    /* Ensures buttons fit within container border-radius */
    padding: 5px;
    /* Inner padding */
    transition: background-color 0.5s ease;
}

#experience-education .toggle-btn {
    flex-grow: 1;
    padding: 10px 20px;
    border: none;
    background-color: var(--current-toggle-btn-bg);
    color: var(--current-text-color-secondary);
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
    /* Slightly smaller radius inside container */
    text-align: center;
}

#experience-education .toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    /* Subtle hover */
}

body.light-mode #experience-education .toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    /* Subtle hover */
}

#experience-education .toggle-btn.active {
    background-color: var(--current-toggle-btn-active-bg);
    color: var(--current-toggle-btn-active-text);
    font-weight: 600;
}

/* --- Timeline Styles - Only on index.html --- */
.timeline {
    position: relative;
    padding-left: 30px;
    /* Space for the vertical line and circles */
    margin-left: 10px;
    /* Offset to center the line a bit */
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    /* Center the line */
    width: 2px;
    background-color: var(--current-timeline-line);
    transition: background-color 0.5s ease;
}

.timeline-item {
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 20px;
    /* Space below each item */
    border-bottom: 1px dashed var(--current-timeline-line);
    /* Dashed separator */
}

.timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    /* No border on the last item */
}

.timeline-circle {
    position: absolute;
    left: 0;
    /* Aligned with the vertical line */
    top: 5px;
    /* Adjust vertical position */
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid var(--current-timeline-circle-border);
    background-color: var(--current-timeline-circle-bg);
    z-index: 2;
    /* Above the line */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Ensure image fits */
    transition: border-color 0.5s ease, background-color 0.5s ease;
}

.timeline-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    /* Make image round */
}

.timeline-content {
    margin-left: 30px;
    /* Space for the circle and line */
    background-color: var(--current-timeline-content-bg);
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.timeline-date {
    display: block;
    font-size: 0.9em;
    color: var(--current-text-color-tertiary);
    margin-bottom: 5px;
}

.timeline-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    color: var(--current-text-color-secondary);
}

.timeline-content p {
    margin: 0;
    font-size: 1em;
    color: var(--current-text-color-tertiary);
}

.timeline.hidden {
    display: none;
    /* Hide inactive timelines */
}

/* --- Skills Section - Only on index.html --- */
#skills .skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* Space between badges */
    justify-content: center;
}

#skills .skill-badge {
    display: inline-flex;
    /* Use inline-flex for centering content */
    align-items: center;
    padding: 8px 12px;
    background-color: var(--current-skill-badge-bg);
    color: var(--current-skill-badge-text);
    border-radius: 20px;
    /* Pill shape */
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#skills .skill-badge i {
    margin-right: 6px;
    font-size: 1em;
}


/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Responsive grid */
    gap: 25px;
    /* Space between project cards */
}

.project-card {
    background-color: var(--current-project-card-bg);
    border: 1px solid var(--current-project-card-border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease, border-color 0.5s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.project-icon {
    font-size: 2.5em;
    color: var(--current-project-link-color);
    /* Use accent color for icons */
    margin-bottom: 15px;
    text-align: center;
}

.project-icon img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    /* Optional: round image slightly */
    filter: invert(var(--current-icon-invert, 0)) grayscale(var(--current-icon-grayscale, 0));
    /* Apply theme filter */
    transition: filter 0.5s ease;
}

/* Add light mode filters if needed for images */
/* body.light-mode .project-icon img { --current-icon-invert: 1; --current-icon-grayscale: 1; } */


.project-card h3 {
    font-size: 1.3em;
    margin: 0 0 10px 0;
    color: var(--current-text-color-secondary);
}

.project-card p {
    font-size: 1em;
    color: var(--current-text-color-tertiary);
    flex-grow: 1;
    /* Makes sure cards with less text are same height */
    margin-bottom: 15px;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    /* Space between tech badges */
    margin-top: auto;
    /* Push tech list to the bottom */
    margin-bottom: 15px;
}

.project-tech-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--current-project-tech-badge-bg);
    color: var(--current-text-color-tertiary);
    border-radius: 15px;
    /* Smaller pill shape */
    font-size: 0.8em;
    font-weight: 500;
}

.project-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--current-project-link-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-link i {
    margin-right: 5px;
}

.project-link:hover {
    text-decoration: underline;
    color: var(--current-btn-resume-hover-bg);
    /* Darker orange on hover */
}

/* Hide the 'More Projects' link on the projects page itself */
.main-content.projects-page .more-projects-link {
    display: none;
}

/* Only show the 'More Projects' link on the index page's project section */
#projects .more-projects-link {
    text-align: center;
    margin-top: 30px;
    font-size: 1.1em;
    display: block;
    /* Ensure it's shown on index */
}

#projects .more-projects-link a {
    color: var(--current-project-link-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

#projects .more-projects-link a:hover {
    text-decoration: underline;
    color: var(--current-btn-resume-hover-bg);
}


/* --- Contact Form Section - Only on index.html --- */
#contact .contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    /* Center the form */
    padding: 20px;
    background-color: var(--current-form-bg);
    border-radius: 8px;
    border: 1px solid var(--current-form-border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

#contact .form-group {
    margin-bottom: 20px;
}

#contact .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--current-text-color-secondary);
}

#contact .form-group input[type="text"],
#contact .form-group input[type="email"],
#contact .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--current-form-input-border);
    border-radius: 4px;
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
    font-size: 1em;
    background-color: var(--current-form-input-bg);
    color: var(--current-form-input-text);
    transition: border-color 0.3s ease, background-color 0.3s ease;
    outline: none;
    /* Remove default focus outline */
}

#contact .form-group input[type="text"]:focus,
#contact .form-group input[type="email"]:focus,
#contact .form-group textarea:focus {
    border-color: var(--current-project-link-color);
    /* Accent color on focus */
    box-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
    /* Subtle glow */
    background-color: var(--current-form-input-bg);
    /* Keep background on focus */
}

#contact .form-group textarea {
    resize: vertical;
    /* Allow vertical resizing */
}

#contact .submit-btn {
    display: block;
    /* Make button full width */
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    background-color: var(--current-submit-btn-bg);
    color: var(--current-submit-btn-text);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#contact .submit-btn:hover {
    background-color: var(--current-submit-btn-hover-bg);
}


/* --- Footer --- */
footer {
    margin-top: 60px;
    /* Space above the footer */
    padding: 30px 20px;
    text-align: center;
    font-size: 0.9em;
    color: var(--current-footer-text);
    width: 100%;
    box-sizing: border-box;
    z-index: 1;
}

.footer-content {
    max-width: 900px;
    /* Match section width on index */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    /* Space out copyright and icons */
    align-items: center;
    flex-wrap: wrap;
    /* Allow wrapping */
    gap: 15px;
    /* Space between items when wrapped */
}

/* Adjust footer width for projects page */
.page-container>footer .footer-content {
    max-width: 1000px;
    /* Match projects content width */
}


.footer-icons {
    display: flex;
    gap: 15px;
    /* Space between footer icons */
    align-items: center;
}

.footer-icons i {
    color: var(--current-footer-icon);
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.footer-icons a {
    color: var(--current-footer-icon);
    /* Inherit color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-icons i:hover,
.footer-icons a:hover {
    color: var(--current-footer-icon-hover);
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .page-container {
        padding-top: 60px;
        /* Adjust padding for smaller theme toggle */
    }

    .profile-container {
        padding: 30px 10px;
        /* Adjust profile padding */
        margin-bottom: 40px;
        /* Less space below profile */
    }

    .social-links {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
        /* Center button content */
    }

    .main-content {
        padding: 20px 10px;
        /* Less padding on smaller screens */
        margin: 20px auto;
        /* Adjust vertical margin */
    }

    .main-content.projects-page {
        padding: 20px 10px;
        margin-bottom: 30px;
    }

    section {
        padding: 15px;
        /* Less padding for sections */
        margin-bottom: 40px;
    }

    section h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    /* Timeline adjustments for small screens (index page) */
    .timeline {
        padding-left: 20px;
        margin-left: 5px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-circle {
        left: -5px;
    }

    .timeline-content {
        margin-left: 25px;
    }

    /* Toggle adjustments for small screens (index page) */
    #experience-education .toggle-container {
        flex-direction: column;
        gap: 5px;
        padding: 10px;
    }

    #experience-education .toggle-btn {
        padding: 10px;
    }

    /* Projects grid adjustment */
    .projects-grid {
        grid-template-columns: 1fr;
        /* Stack projects vertically on smaller screens */
        gap: 20px;
    }

    .project-card {
        padding: 15px;
    }

    .project-card h3 {
        font-size: 1.2em;
    }

    .project-card p {
        font-size: 0.95em;
    }

    .project-icon {
        font-size: 2em;
    }

    .project-tech-list {
        gap: 4px;
    }

    .project-tech-badge {
        font-size: 0.75em;
        padding: 3px 6px;
    }

    .project-link {
        font-size: 0.9em;
    }

    /* Projects Page Header adjustments */
    .projects-page-header {
        padding: 10px 10px 20px 10px;
        /* Adjust padding */
        margin-bottom: 20px;
        align-items: flex-start;
        /* Align items to start */
        position: relative;
        /* Keep relative */
        flex-direction: column-reverse;
        /* Put title above back link */
    }

    .projects-page-header h2 {
        width: 100%;
        /* Ensure title takes full width */
        text-align: left;
        /* Align title left */
        font-size: 2em;
        /* Adjust title size */
        padding-bottom: 8px;
    }

    .projects-page-header h2::after {
        left: 0;
        /* Align underline to left */
        transform: translateX(0);
        width: 60px;
        /* Smaller underline */
        height: 3px;
    }

    .back-link {
        position: static;
        /* Remove absolute positioning */
        margin-bottom: 15px;
        /* Add space below the link */
        left: auto;
        top: auto;
        font-size: 0.95em;
    }


    .form-group label,
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group textarea,
    .submit-btn {
        font-size: 0.95em;
    }

    .submit-btn {
        padding: 10px 15px;
    }

    footer {
        font-size: 0.8em;
        padding: 20px 10px;
    }

    .footer-content {
        flex-direction: column;
        /* Stack footer content */
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding-top: 50px;
    }

    .theme-toggle-btn {
        top: 10px;
        right: 10px;
        font-size: 1.3em;
    }

    .profile-image {
        width: 120px;
        height: 120px;
    }

    h1 {
        font-size: 2em;
    }

    .profession {
        font-size: 1em;
    }

    .location {
        font-size: 0.9em;
        margin-bottom: 20px;
    }

    section h2 {
        font-size: 1.6em;
    }

    /* Projects Page Header adjustments */
    .projects-page-header {
        padding: 10px;
    }

    .projects-page-header h2 {
        font-size: 1.8em;
    }

    .back-link {
        font-size: 0.9em;
        margin-bottom: 10px;
    }

    /* Project card adjustments */
    .project-card h3 {
        font-size: 1.1em;
    }

    .project-card p {
        font-size: 0.9em;
    }

    .project-tech-badge {
        font-size: 0.7em;
        padding: 2px 5px;
    }

    .project-link {
        font-size: 0.85em;
    }

    /* Contact form adjustments */
    .form-group label,
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group textarea,
    .submit-btn {
        font-size: 0.9em;
    }

    .submit-btn {
        padding: 8px 12px;
    }

    footer {
        font-size: 0.75em;
    }

    .footer-icons i {
        font-size: 1em;
    }
}