:root {
    --primary-color: #58a6ff; /* Lighter blue for dark mode */
    --secondary-color: #8b949e; /* GitHub dark mode secondary */
    --light-bg: #161b22; /* Darker background */
    --dark-bg: #010409; /* Very dark background */
    --text-dark: #c9d1d9; /* Light text for dark mode */
    --text-light: #f0f6fc; /* Lighter text */
    --accent-color: #ff7b72; /* Coral accent */
    --section-padding: 4rem 1rem;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Adjusted shadow */
    --card-hover-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Adjusted shadow */
    --border-color: #30363d; /* Dark border color */
}

/* Keyframes for subtle background animation */
@keyframes subtleGradient {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

/* Keyframes for Go Home button pulse */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 148, 158, 0.4); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 5px rgba(139, 148, 158, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 148, 158, 0); }
}

html {
    height: 100%; /* Restore height */
}

html, body {
    /* height: 100%; /* Removed - Rely on body min-height for flex layout */
    /* overflow: hidden; /* Removed to allow natural scrolling if needed */
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark); /* Light text */
    line-height: 1.7;
    /* Darker subtle animated gradient background */
    background: linear-gradient(-45deg, #1a1f29, #0d1117, #1a1f29, #0d1117); /* Even darker */
	background-size: 400% 400%;
	animation: subtleGradient 30s ease infinite; /* Slower */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Use viewport height */
}

/* Particle Canvas Styles */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind #root */
    /* background-color: #0d1117; Remove, let body show through */
}


/* Language Switcher Styles */
.language-switcher {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1050;
    background-color: rgba(33, 38, 45, 0.7); /* Darker semi-transparent */
    padding: 5px 8px;
    border-radius: 5px;
    backdrop-filter: blur(3px);
}
.language-switcher .btn {
    transition: transform 0.2s ease-in-out, background-color 0.2s ease;
    border-color: rgba(139, 148, 158, 0.5); /* Lighter border */
    color: var(--secondary-color);
}
.language-switcher .btn:hover {
    transform: translateY(-2px);
    background-color: rgba(139, 148, 158, 0.1);
    border-color: rgba(139, 148, 158, 0.7);
    color: var(--text-light);
}
.language-switcher .btn.active {
    background-color: var(--primary-color);
    color: var(--dark-bg); /* Dark text on primary */
    border-color: var(--primary-color);
}

/* Go Home Button */
.go-home-btn {
    position: fixed;
    top: 15px;
    left: 20px;
    z-index: 1050;
    background-color: rgba(54, 61, 71, 0.7); /* Darker */
    border-color: rgba(88, 96, 105, 0.8);
    color: var(--text-light);
    backdrop-filter: blur(3px);
    transition: transform 0.2s ease-in-out, background-color 0.2s ease;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    animation: pulse 2s infinite ease-in-out; /* Apply pulse animation */
    animation-delay: 1s; /* Start after a short delay */
}
.go-home-btn:hover {
    transform: translateY(-2px);
    background-color: rgba(88, 96, 105, 0.8);
    color: var(--text-light);
    animation-play-state: paused; /* Pause animation on hover */
}


/* Ensure React root div takes full height and manages layout */
#root {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Make root fill the available space in body */
    position: relative;
    z-index: 10; /* Above canvas */
    /* overflow: hidden; /* Removed to allow natural scrolling */
    background-color: transparent; /* See through to body/canvas */
}


/* Hero Section Styling */
.hero-section {
    background-color: transparent; /* Make hero transparent */
    position: relative;
    overflow: visible;
    width: 100%;
    display: flex;
    /* min-height: 60vh; */ /* REMOVED - Let flex-grow handle height */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: var(--text-light); /* Light text */
    z-index: 10;
    flex-grow: 1; /* Add this to make hero section fill available space */
    /* flex-shrink: 0; /* Removed */
    /* min-height removed, rely on flex-grow */
}


.hero-section > div { /* Content wrapper */
    position: relative;
    z-index: 2;
    background-color: rgba(1, 4, 9, 0.3); /* Darker subtle bg */
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(48, 54, 61, 0.5); /* Subtle border */
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-light); /* Light text */
}
.hero-section .lead {
    font-size: 1.3rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    color: var(--secondary-color); /* Muted text */
}
/* Styles for the hero buttons (About, Projects, etc.) */
.hero-buttons .btn {
    padding: 0.8rem 1.8rem;
    font-size: 1.05rem;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Darker shadow */
    border-width: 1px; /* Thinner border */
    margin: 0.5rem;
    background-color: rgba(33, 38, 45, 0.6); /* Darker button bg */
    border-color: var(--border-color);
    color: var(--text-light);
    backdrop-filter: blur(3px);
}
.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(88, 166, 255, 0.2); /* Primary color glow */
    background-color: rgba(54, 61, 71, 0.8);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.hero-buttons .btn-outline-primary:hover {
     background-color: rgba(88, 166, 255, 0.1); /* Primary color tint */
     color: var(--primary-color);
}

/* Styling for the sections when they are displayed */
.section {
    width: 100%;
    flex-grow: 1; /* Add back: Make active Section grow */
    display: flex; /* Use flex for centering */
    align-items: center; /* Always center vertically */
    justify-content: center;
    padding: 1rem; /* Base padding */
    box-sizing: border-box;
    /* overflow: hidden; /* Removed to allow inner container scrolling */
    min-height: 0;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    position: relative;
    z-index: 15;
    background-color: transparent; /* Make section transparent */
}

/* Container within the active section for content and scrolling */
.section > .container {
     /* max-height: calc(100vh - 100px); /* Removed to allow full content height */
     overflow-y: auto; /* Keep scroll for potential desktop overflow */
     width: 100%;
     max-width: 1140px;
     padding: 2rem;
     background-color: rgba(22, 27, 34, 0.95); /* Darker opaque container */
     border-radius: 10px;
     box-shadow: 0 0 20px rgba(0,0,0,0.3); /* Slightly stronger shadow */
     border: 1px solid var(--border-color);

     /* Modern Scrollbar Styles (WebKit & Firefox) */
     scrollbar-width: thin; /* Firefox */
     scrollbar-color: var(--secondary-color) var(--light-bg); /* Firefox */
}
/* WebKit Scrollbar Styles */
.section > .container::-webkit-scrollbar {
    width: 8px;
}
.section > .container::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 4px;
}
.section > .container::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 4px;
    border: 2px solid var(--light-bg); /* Creates padding around thumb */
}
.section > .container::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}


/* Remove specific background overrides - Empty ruleset removed */
/*
#about.section,
#projects.section,
#skills.section,
#contact.section,
#career.section {
     // Styles are handled by the general .section rule now
}
*/


.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    color: var(--text-light); /* Light text */
}
.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0.7rem auto 0 auto;
    border-radius: 3px;
}

/* Styling for About and Career text */
#about p, #career .career-list {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: left; /* Align list left */
    color: var(--secondary-color); /* Muted text */
}
#career .career-list dt {
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 1rem;
}
#career .career-list dd {
    margin-left: 0;
    margin-bottom: 0.5rem;
}


.project-card {
    background-color: var(--light-bg); /* Darker card background */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary-color);
}
.project-card img {
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    filter: saturate(0.9) brightness(0.9); /* Slightly desaturate/darken image */
    transition: filter 0.3s ease; /* Add transition for potential hover effects */
}
 .project-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}
.project-card .card-title {
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}
.project-card .card-text {
    flex-grow: 1;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    color: var(--secondary-color); /* Muted text */
}
.project-card .btn {
    margin-top: auto;
    margin-right: 0.5rem;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}
.project-card .btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
    border-color: var(--secondary-color);
}


/* Subtitle for Experience */
.section-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-light);
}

.skill-item {
    background-color: var(--light-bg); /* Darker item background */
    padding: 1.8rem 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}
.skill-item:hover {
     transform: translateY(-8px) scale(1.03);
     box-shadow: var(--card-hover-shadow);
     border-color: var(--primary-color);
}
.skill-item i {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
    transition: color 0.3s ease;
}
 .skill-item:hover i {
     color: var(--accent-color);
 }
.skill-item span {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-dark);
}

/* Experience Badges Styling */
/* SVG badges don't need specific CSS class */


#contact p {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    text-align: center;
    font-size: 1.1rem;
    color: var(--secondary-color); /* Muted text */
}
#contact .btn {
     padding: 0.8rem 2rem;
     font-size: 1.05rem;
     border-radius: 50px;
     transition: transform 0.3s ease, box-shadow 0.3s ease;
     box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
     background-color: var(--primary-color);
     border-color: var(--primary-color);
     color: var(--dark-bg);
}
 #contact .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(88, 166, 255, 0.3); /* Primary color glow */
    background-color: #79c0ff; /* Lighter primary on hover */
    border-color: #79c0ff;
 }
 #contact .btn i {
     transition: transform 0.3s ease;
 }
 #contact .btn:hover i {
     transform: rotate(15deg);
 }


/* Footer Styling */
/* #footer-root rule removed as footer is now rendered within #root */

footer { /* Style the footer element rendered by React */
    background-color: var(--dark-bg);
    color: var(--secondary-color); /* Muted color */
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color); /* Add border */
    position: relative; /* Ensure z-index applies */
    z-index: 20; /* Ensure footer is above other content like sections (z-index 15) */
    /* margin-top: auto; */ /* REMOVED - Push footer to the bottom of the flex container (#root) */
}
footer p {
    margin-bottom: 0;
}

/* AOS Animation adjustments */
[data-aos] {
    transition-property: transform, opacity;
}

/* --- Media Queries for Mobile Optimization --- */

/* Removed redundant media query for section align-items */

@media (max-width: 991.98px) { /* Medium devices (tablets, less than 992px) */
    .hero-section h1 {
        font-size: 2.8rem;
    }
    .hero-section .lead {
        font-size: 1.15rem;
    }
    .section-title {
        font-size: 2.2rem;
    }
    .section > .container {
        padding: 1.5rem; /* Reduce padding */
        /* max-height: calc(100vh - 80px); /* Removed */
    }
    .project-card img {
        height: 180px; /* Slightly reduce image height */
    }
}

@media (max-width: 767.98px) { /* Small devices (landscape phones, less than 768px) */
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section .lead {
        font-size: 1.1rem;
    }
    .hero-buttons .btn {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
        margin: 0.4rem;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .section > .container {
        padding: 1rem; /* Further reduce padding */
    }
    #about p, #career .career-list {
        font-size: 1rem;
    }
    .skill-item i {
        font-size: 2.5rem; /* Reduce icon size */
    }
    .language-switcher {
        top: 10px;
        right: 10px;
    }
    .go-home-btn {
        top: 10px;
        left: 10px;
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 575.98px) { /* Extra small devices (portrait phones, less than 576px) */
    .hero-section {
        padding: 1rem;
    }
    .hero-section > div {
        padding: 1.5rem; /* Reduce padding inside hero content */
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .hero-buttons .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        display: block; /* Stack buttons */
        margin: 0.5rem auto; /* Center stacked buttons */
        width: 80%;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .section > .container {
        padding: 1rem 0.5rem; /* Minimal horizontal padding */
        /* max-height: calc(100vh - 70px); /* Removed */
    }
    .project-card .card-title {
        font-size: 1.05rem;
    }
    .project-card .card-text {
        font-size: 0.9rem;
    }
    .project-card .btn {
        font-size: 0.85rem;
        padding: 0.35rem 0.8rem;
    }
    .skill-item {
        padding: 1.2rem 0.8rem;
    }
    .skill-item i {
        font-size: 2.2rem;
    }
    #contact p {
        font-size: 1rem;
    }
    #contact .btn {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }
    footer {
        font-size: 0.85rem;
        padding: 1rem 0;
    }
}
