/* === Base Styles & Variables === */
:root {
    /* Colors based on green theme request */
    --primary-color: #28a745;         /* Main green (Bootstrap success green) */
    --primary-darker-green: #218838;  /* Darker green for gradients/hovers */
    --secondary-color: #6c757d;       /* Muted gray text */
    --background-color: #ffffff;      /* White background */
    --text-color: #212529;            /* Dark gray text */
    --light-text-color: #f8f9fa;      /* Light gray text (for dark bg) */
    --pure-white: #ffffff;            /* Pure white text */
    --alternate-bg-color: #f8f9fa;    /* Very light gray for sections */
    --border-color: #dee2e6;          /* Light gray borders */
    --footer-bg-color: #343a40;       /* Dark gray footer */

    /* Fonts - Keep placeholder or replace */
    --heading-font: 'Arial', sans-serif;
    --body-font: 'Arial', sans-serif;

    /* Define category colors */
    --color-languages: #007bff;    /* Blue */
    --color-databases: #fd7e14;    /* Orange */
    --color-web:       #6f42c1;    /* Purple */
    --color-technologies:#dc3545;   /* Red */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding-top: 70px; /* Match header height */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Default heading color - Sections often use primary color */
h1, h2, h3 {
    font-family: var(--heading-font);
    margin-bottom: 1rem;
    color: var(--text-color); /* Default dark text */
}

/* Section titles often primary color */
h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color); /* Make section titles green by default */
}

p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

a {
    color: var(--primary-color); /* Green links */
    text-decoration: none;
}

a:hover {
    color: var(--primary-darker-green); /* Darker green hover */
    text-decoration: underline;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

section {
    padding: 60px 0;
}

.alternate-bg {
    background-color: var(--alternate-bg-color);
}

/* === Header / Navigation === */
#main-header {
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 70px;
}

#main-header nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

#main-header .site-title a {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color); /* Green site title */
    text-decoration: none;
}
#main-header .site-title a:hover {
    text-decoration: none;
    color: var(--primary-darker-green);
}

#main-header nav ul {
    display: flex;
    align-items: center;
}

#main-header nav ul li {
    margin-left: 20px;
}

#main-header nav ul li a {
    color: var(--text-color);
    padding: 5px 10px;
    transition: color 0.3s ease;
}

#main-header nav ul li a:hover {
    color: var(--primary-color); /* Green hover */
    text-decoration: none;
}

.nav-contact-btn {
    background-color: var(--primary-color); /* Green button */
    color: var(--pure-white);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    margin-left: 20px;
}

.nav-contact-btn:hover {
    background-color: var(--primary-darker-green); /* Darker green on hover */
}

/* Mobile Menu Styles */
#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color); /* Green hamburger */
}

#mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px 0;
}

#mobile-menu ul {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#mobile-menu ul li {
    margin: 10px 0;
}

#mobile-menu ul li a,
#mobile-menu ul li button {
    font-size: 1.2rem;
    width: 100%;
    text-align: center;
    color: var(--text-color);
}
#mobile-menu ul li a:hover {
    color: var(--primary-color);
}
#mobile-menu .nav-contact-btn {
     margin-left: 0;
     margin-top: 15px;
}


/* === Hero Section === */
.hero {
    /* Green gradient background */
    background: linear-gradient(to right, var(--primary-color), var(--primary-darker-green));
    color: var(--pure-white);
    text-align: center;
    padding: 100px 0;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--pure-white); /* Override default h2 color */
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--pure-white);
}

.cta-button {
    display: inline-block;
    background-color: var(--pure-white); /* White button */
    color: var(--primary-color);       /* Green text */
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
    border: 1px solid transparent;
}

.cta-button:hover {
    background-color: #e2e6ea;
    color: var(--primary-darker-green); /* Darker green text on hover */
    text-decoration: none;
}

/* === About Section === */
#about {
    /* text-align: center; REMOVED - Handled by flex container now */
}
#about h2 {
    color: var(--primary-color); /* Ensure 'About Me' title is green */
    text-align: center; /* Keep H2 centered */
    margin-bottom: 2rem; /* Ensure space below H2 */
}

/* NEW: Wrapper for image and text */
.about-content-wrapper {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    gap: 2.5rem; /* Space between image and text */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* UPDATED: Profile picture styling */
.profile-pic {
    width: 300px;  /* Increased size */
    height: 300px; /* Increased size */
    border-radius: 50%;
    object-fit: cover;
    /* margin: 0 auto 1.5rem auto; REMOVED - No longer centered block */
    /* display: block; REMOVED */
    border: 5px solid var(--alternate-bg-color);
    flex-shrink: 0; /* Prevent image from shrinking */
}

/* NEW: Text container styling */
.about-text {
    flex: 1; /* Allow text to take remaining space */
    min-width: 250px; /* Prevent text from becoming too narrow */
}

/* === Portfolio Section === */
/* Styles apply to both #portfolio and #professional-portfolio */
#portfolio h2,
#professional-portfolio h2 {
     color: var(--primary-color); /* Ensure titles are green */
}

/* Center the description text in the professional section */
#professional-portfolio > .container > p:first-of-type {
    text-align: center;
    max-width: 800px; /* Optional: Limit width of description */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem; /* Add space below description */
}

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

.portfolio-item {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Use flexbox for vertical alignment */
    flex-direction: column; /* Stack content vertically */
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.portfolio-item img { /* Only relevant if images are added */
    margin-bottom: 1rem;
    border-radius: 5px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.portfolio-item h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color); /* Project titles dark gray */
}

/* Target description paragraphs specifically */
.portfolio-item p {
    flex-grow: 1; /* Allow description to take up space */
    margin-bottom: 1rem; /* Space below description */
}
/* Style for the '(Details available...)' paragraph */
.portfolio-item p em {
    color: var(--secondary-color);
    font-size: 0.9em;
    display: block; /* Make it block for margin */
    margin-top: auto; /* Push to bottom */
}

.project-link { /* Only relevant for personal portfolio items */
    display: inline-block;
    margin-top: auto; /* Push button to bottom */
    background-color: var(--primary-color); /* Green button */
    color: var(--pure-white);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    align-self: center; /* Center button horizontally */
}

.project-link:hover {
    background-color: var(--primary-darker-green); /* Darker green hover */
    text-decoration: none;
}

/* === ORIGINAL Skills Section (REPLACED BELOW) === */
/*
#skills h2 {
    color: var(--primary-color);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}


.skills-list li {
    background-color: var(--primary-color);
    color: var(--pure-white);
    padding: 10px 20px;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-weight: normal;
}
*/
/* === Experience Section - Updated for 2 Columns === */

#experience h2 { /* Ensure title stays green */
    color: var(--primary-color);
}

/* Class for the grid container */
#experience .experience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Create two equal columns */
    gap: 2rem; /* Add space between grid items (adjust as needed) */
    margin-top: 2rem; /* Add some space below the H2 */
}

/* Adjust existing experience item styles */
.experience-item {
    margin-bottom: 0; /* Remove bottom margin, rely on gap for spacing */
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary-color); /* Keep the border */
}

.experience-item h3 {
    color: var(--text-color);
    margin-bottom: 0.2rem;
}

.experience-dates {
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.experience-item ul {
    list-style: disc;
    padding-left: 20px;
    color: var(--text-color);
}

/* Ensure the section still has its alternating background */
/* #experience.alternate-bg { MOVED to skills
    background-color: var(--alternate-bg-color);
} */


/* === Footer === */
footer {
    background-color: var(--footer-bg-color); /* Dark gray footer */
    color: var(--light-text-color);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

footer p {
    margin-bottom: 0;
    color: var(--light-text-color);
}
footer a {
    color: var(--pure-white);
}
footer a:hover {
    color: var(--border-color);
}


/* === Modal (Popup) Styles === */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer; /* Add pointer cursor */
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
}

.modal h2 {
    margin-top: 0;
    text-align: left;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* === Form Styles === */
#contact-form .form-group {
    margin-bottom: 1rem;
}

#contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color);
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--background-color);
}

#contact-form textarea {
    resize: vertical;
}

/* Focus style using green */
#contact-form input:focus,
#contact-form textarea:focus {
    outline: 0;
    border-color: #7fcc92; /* Lighter green border on focus */
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); /* Green glow */
}

.submit-btn {
    display: inline-block;
    background-color: var(--primary-color); /* Green button */
    color: var(--pure-white);
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--primary-darker-green); /* Darker green hover */
}

/* Style for disabled button */
.submit-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}


#form-status { /* No longer used for toasts, but keep for potential future use */
    margin-top: 1rem;
    font-weight: bold;
    min-height: 1.2em; /* Reserve space */
}

/* === Additions for Color-Coded Skills Section === */

/* Skills section general styling */
#skills h2 { /* Keep skills title green */
    color: var(--primary-color);
}

#skills .container {
    text-align: center; /* Center the skill categories */
}

.skills-category {
    margin-bottom: 2.5rem; /* Space between categories */
    text-align: left; /* Align text within category left */
    display: inline-block; /* Allow categories to sit side-by-side if space allows */
    vertical-align: top; /* Align tops of categories */
    width: 100%; /* Default to full width, adjust below for larger screens */
    max-width: 400px; /* Max width per category block */
    margin-left: 1rem;
    margin-right: 1rem;
}

.skills-heading {
    padding: 10px 15px;
    color: var(--pure-white);
    border-radius: 0.25rem 0.25rem 0 0; /* Rounded top corners */
    margin-bottom: 0; /* Remove space below heading */
    font-size: 1.4rem;
}

/* Overriding general ul style for skills list */
#skills ul.skills-list {
    list-style: none; /* Ensure no list bullets */
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem; /* Space between skill pills */
    padding: 15px; /* Padding inside the list area */
    border: 1px solid var(--border-color);
    border-top: none; /* Remove top border as heading provides it */
    border-radius: 0 0 0.25rem 0.25rem; /* Rounded bottom corners */
    background-color: var(--alternate-bg-color); /* Light background for the list area */
    justify-content: flex-start; /* Align pills to the start */
    margin: 0; /* Reset margin for the ul */
}

/* Individual skill pill styling */
.skills-list li {
    color: var(--pure-white);
    padding: 8px 15px; /* Slightly smaller padding */
    border-radius: 0.25rem;
    font-size: 0.95rem;
    margin: 0; /* Remove default margins */
    line-height: 1.4; /* Adjust line height if needed */
    /* Reset background to be set by specific rules */
    background-color: transparent;
}

/* --- Apply Category Colors --- */

/* Languages */
.languages-heading { background-color: var(--color-languages); }
.skills-languages li { background-color: var(--color-languages); }

/* Databases */
.databases-heading { background-color: var(--color-databases); }
.skills-databases li { background-color: var(--color-databases); }

/* Web */
.web-heading { background-color: var(--color-web); }
.skills-web li { background-color: var(--color-web); }

/* Technologies */
.technologies-heading { background-color: var(--color-technologies); }
.skills-technologies li { background-color: var(--color-technologies); }

/* === Toaster Notification Styles === */

#toast-container {
    position: fixed;
    bottom: 20px; /* Position toasts at the bottom */
    right: 20px;
    z-index: 1050; /* Ensure toasts appear above other elements */
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Align toasts to the right */
    pointer-events: none; /* Allow clicking through container */
}

.toast {
    background-color: #333; /* Default dark background */
    color: #fff;
    padding: 15px 25px;
    border-radius: 5px;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0; /* Start hidden */
    transform: translateX(100%); /* Start off-screen right */
    transition: opacity 0.5s ease, transform 0.5s ease;
    max-width: 350px; /* Limit width */
    font-size: 0.95rem;
    pointer-events: auto; /* Allow clicking on toast itself if needed */
}

/* Style for showing the toast */
.toast.show {
    opacity: 1;
    transform: translateX(0); /* Slide in */
}

/* Specific styles for success/error */
.toast-success {
    background-color: var(--primary-color); /* Use your theme's green */
    color: var(--pure-white);
}

.toast-error {
    background-color: #dc3545; /* Red for errors */
    color: var(--pure-white);
}

/* === End Toaster Styles === */


/* === Responsive Design === */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    #main-header {
        height: 60px;
    }

    #main-header nav .container {
        position: relative;
    }

    #main-header nav ul {
        display: none;
    }

    #mobile-menu-toggle {
        display: block;
    }

    body.mobile-menu-active #mobile-menu {
        display: block;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        padding: 80px 0;
        min-height: 50vh;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

     /* Make Experience section single-column on smaller screens */
    #experience .experience-grid {
        grid-template-columns: 1fr; /* Stack to single column */
        gap: 1.5rem; /* Adjust gap for single column */
    }

    .modal-content {
        width: 90%;
        margin: 15% auto;
    }

    /* Responsive About Me section */
    .about-content-wrapper {
        flex-direction: column; /* Stack image and text vertically */
        align-items: center; /* Center items when stacked */
        gap: 1.5rem; /* Adjust gap for vertical layout */
    }

    .profile-pic {
        width: 200px; /* Slightly smaller image on mobile */
        height: 200px;
        margin-bottom: 1rem; /* Add some space below image when stacked */
    }

     .about-text {
         text-align: center; /* Center text when stacked */
     }


    /* Responsive Skills */
     .skills-category {
         margin-left: 0;
         margin-right: 0;
         max-width: 100%; /* Ensure full width on smaller screens */
     }

     /* Responsive Toasts */
     #toast-container {
         bottom: 10px;
         right: 10px;
         left: 10px; /* Allow toasts to span more width on mobile */
         align-items: center; /* Center toasts horizontally */
     }
     .toast {
         width: 90%; /* Make toasts wider on mobile */
         max-width: none; /* Remove max width */
         transform: translateY(100%); /* Start below screen */
     }
      .toast.show {
         transform: translateY(0); /* Slide up */
     }

}

@media (max-width: 480px) {
    h2 {
        font-size: 1.8rem;
    }
     .hero h2 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .cta-button {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .profile-pic {
         width: 150px; /* Even smaller image on very small screens */
         height: 150px;
     }

    /* Responsive Skills */
     .skills-heading {
        font-size: 1.2rem;
     }
    .skills-list li {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 20px;
    }
}
/* === End of File === */