/* General Body & Typography */
:root {
    /* Original Light Theme Colors (Keep these) */
    --color-primary-light: #f4f4f4; /* Light gray for main backgrounds */
    --color-secondary-light: #ffffff; /* White for secondary backgrounds/cards */
    --color-text-dark: #333; /* Dark text color */
    --color-accent-blue: #007bff; /* Blue accent color */
    --color-link-hover: #0056b3; /* Darker blue for link hover */
    --color-border-light: #ddd; /* Light border color */
    --color-shadow-light: rgba(0, 0, 0, 0.1); /* Subtle light shadow */

    /* Dark Theme Colors (for header & hero) */
    --color-primary-dark: #1A1A2E; /* Deep Blue/Black for header & hero background */
    --color-text-light-hero: #E0E0E0; /* Light gray for text in hero (used for "Hi, I am") */
    --color-text-accent-hero: #00d1b2; /* Gold/Yellow accent in hero */
    --color-accent-red: #E74C3C; /* Red accent for active nav link */
    --color-card-background-hero: rgba(35, 41, 70, 0.9); /* Slightly transparent dark for hero card, matches screenshot */
    --color-border-accent-hero: #FFD700; /* Yellow border for hero card, matches screenshot */
    --color-shadow-dark: rgba(0, 0, 0, 0.4); /* Dark shadow for header & hero */
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--color-primary-dark); /* Changed to dark background to prevent white flash */
    color: var(--color-text-dark); /* Default to dark text */
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

/* Container for Centering Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--color-primary-dark); /* Dark background for header */
    box-shadow: 0 3px 15px var(--color-shadow-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: box-shadow 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo a {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.8em;
    color: var(--color-text-light-hero); /* White for the logo text in dark header */
    text-decoration: none;
    display: flex; /* To align circle and text */
    align-items: center;
}

.logo a:hover {
    color: var(--color-text-accent-hero); /* Yellow on hover */
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-text-accent-hero); /* Yellow circle */
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-primary-dark); /* Dark letter inside circle */
    font-size: 1.2em;
    font-weight: 700;
    margin-right: 10px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-list li {
    margin-left: 30px;
}

.nav-list li a {
    text-decoration: none;
    color: var(--color-text-light-hero); /* Light text for nav links in dark header */
    font-weight: 600;
    font-size: 1.05em;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    display: flex; /* To align icon and text */
    align-items: center;
}

.nav-list li a i {
    margin-right: 8px; /* Space between icon and text */
    color: var(--color-text-light-hero); /* Default icon color */
    transition: color 0.3s ease;
    font-size: 0.9em; /* Slightly smaller icon */
}

.nav-list li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px; /* Thinner underline for dark theme */
    bottom: -7px;
    left: 0;
    background-color: var(--color-accent-red); /* Red underline for active */
    transition: width 0.3s ease-in-out;
    border-radius: 2px;
}

.nav-list li a:hover::after,
.nav-list li a.active::after {
    width: 100%;
}

.nav-list li a:hover {
    color: var(--color-text-accent-hero); /* Yellow on hover */
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4); /* Subtle yellow shadow */
}
.nav-list li a:hover i {
    color: var(--color-text-accent-hero); /* Yellow icon on hover */
}

.nav-list li a.active {
    color: var(--color-accent-red); /* Red for active link */
    text-shadow: 0 0 8px rgba(231, 76, 60, 0.4); /* Subtle red shadow */
}
.nav-list li a.active i {
    color: var(--color-accent-red); /* Red icon for active link */
}


/* --- Hamburger Menu (Mobile Specific) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
    padding: 5px 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-text-light-hero); /* Light bars for dark background */
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

/* Transform hamburger to 'X' */
.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--color-accent-red); /* Red 'X' */
}
.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--color-accent-red); /* Red 'X' */
}


/* --- Hero Section --- */
#hero {
    /* Adjusted opacity for the gradient overlay and updated background image */
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.1) 0%, rgba(22, 33, 62, 0.1) 100%), /* Decreased opacity for more visibility */
                url('https://images.unsplash.com/photo-1517694712202-14dd9538aa97?q=80&w=2940&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center center / cover no-repeat; /* Example background image - replace with your own */
    background-attachment: fixed;
    color: #ffffff;
    text-align: center;
    padding: 120px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    position: relative;
    overflow: hidden;
    opacity: 1; /* Changed to 1 to make it immediately visible */
    transition: none; /* Removed transition for immediate visibility */
}

/* Removed .hero-loaded class as it's no longer needed for initial opacity */

.hero-content-box {
    background-color: var(--color-card-background-hero); /* Dark blue background from your screenshot */
    padding: 20px;
    border-radius: 20px; /* Adjust as needed to match the screenshot's curvature */
    box-shadow: 0 0 0 5px var(--color-border-accent-hero), /* The yellow border */
                0 15px 40px rgba(0, 0, 0, 0.7); /* Standard drop shadow for depth */
    /* Removed the inner shadow as it's not present in your screenshot's border style */
    max-width: 400px;
    /* height: 400px; */ /* REMOVED: This fixed height caused cutting on mobile */
    width: calc(100% - 40px); /* Makes it fluid on smaller screens (100% minus padding) */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    min-height: 300px; /* ADDED: Ensures a minimum height */
    justify-content: center; /* ADDED: Vertically centers content */
    /* NEW: Animation for hero-content-box */
    animation: fadeInScale 1s ease-out forwards;
}

.hero-content-box .intro-text {
    font-family: 'Lato', sans-serif;
    font-size: 1.3em; /* Slightly larger */
    color: var(--color-text-light-hero); /* Light gray for "Hi, I am" */
    margin-bottom: 5px;
    font-weight: 500; /* A bit bolder */
    font-style: italic; /* Added italic style for "Hi, I am" */
}

#hero h1 {
    font-size: 2.5em; /* Decreased further from 3em to 2.5em */
    margin-bottom: 5px; /* Reduce margin */
    font-weight: 700;
    color: mediumspringgreen; /* MODIFIED: Changed color to mediumspringgreen */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite; /* Updated animation for the name */
}

.hero-content-box .role-text {
    font-family: 'Lato', sans-serif;
    font-size: 1.3em; /* Decreased further from 1.6em to 1.3em */
    margin-bottom: 25px; /* Space before typewriter */
    color: var(--color-text-light-hero);
    font-weight: 400;
}

.typewriter-area {
    font-size: 1em; /* Decreased further from 1.3em to 1em */
    margin-bottom: 40px;
    font-weight: 600;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-light-hero); /* Default for typewriter text */
}

/* Blinking Cursor for Typewriter Effect */
.blinking-cursor {
    font-weight: 300;
    font-size: 1.1em;
    color: var(--color-text-light-hero);
    animation: blinkTextCursor 0.7s infinite normal;
    margin-left: 5px;
}

@keyframes blinkTextCursor {
    from { opacity: 1; }
    50% { opacity: 0; }
    to { opacity: 1; }
}


.btn {
    display: inline-block;
    background-color: var(--color-primary-dark); /* Dark button background */
    color: var(--color-text-accent-hero); /* Yellow text */
    padding: 18px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2em;
    transition: all 0.3s ease;
    border: 2px solid var(--color-border-accent-hero); /* Yellow border */
    position: relative;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* Stronger shadow */
    animation: buttonPulse 2s infinite ease-in-out; /* NEW: Added button animation */
}

.btn:hover {
    background-color: var(--color-text-accent-hero); /* Yellow background on hover */
    color: var(--color-primary-dark); /* Dark text on hover */
    border-color: var(--color-border-accent-hero);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    animation: none; /* Stop the pulse animation on hover for a distinct hover effect */
}

/* --- Section Styling (Light Theme for subsequent sections) --- */
section {
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--color-primary-light); /* Default light background */
    color: var(--color-text-dark); /* Default dark text */
}

.animated-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animated-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Removed alternating dark backgrounds for sections */


h2 {
    font-size: 3.2em;
    margin-bottom: 60px;
    color: var(--color-accent-blue); /* Blue for headings */
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 80px;
    height: 5px;
    background-color: var(--color-accent-blue); /* Blue underline */
    border-radius: 3px;
}


/* --- About Section --- */
.about-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    text-align: left;
}

.about-image img {
    max-width: 320px;
    border-radius: 50%;
    border: 10px solid var(--color-accent-blue); /* Blue border */
    box-shadow: 0 10px 30px var(--color-shadow-light);
    transition: transform 0.4s ease;
    animation: float 3s ease-in-out infinite;
}

.about-image img:hover {
    transform: scale(1.08);
    animation-play-state: paused;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    color: var(--color-text-dark); /* Dark text */
}

.about-content h3 {
    font-size: 2em;
    color: var(--color-accent-blue); /* Blue for sub-heading */
    margin-bottom: 25px;
}

.about-content p {
    font-size: 1.15em;
    color: var(--color-text-dark);
    margin-bottom: 18px;
}

.about-content p mark {
    background-color: rgba(0, 123, 255, 0.15); /* Subtle blue highlight */
    color: var(--color-text-dark);
    padding: 3px 6px;
    border-radius: 3px;
}

#about.visible .about-image img {
    animation: float 3s ease-in-out infinite;
}
#about.visible .about-content h3 {
    animation: slideInRight 1s ease-out;
}
#about.visible .about-content p {
    animation: fadeInUp 1s ease-out forwards;
}
#about.visible .about-content p:first-of-type {
    animation-delay: 0.2s;
}
#about.visible .about-content p:nth-of-type(2) {
    animation-delay: 0.4s;
}
#about.visible .about-content p:nth-of-type(3) {
    animation-delay: 0.6s;
}
#about.visible .about-content p:nth-of-type(4) {
    animation-delay: 0.8s;
}
#about.visible .about-content p:last-of-type {
    animation-delay: 1s;
}


@media (min-width: 768px) {
    .about-content-wrapper {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }

    .about-image {
        flex-shrink: 0;
        margin-right: 60px;
    }
}


/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.skill-item {
    background-color: var(--color-secondary-light); /* White card background */
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--color-shadow-light);
    transition: all 0.4s ease;
    text-align: center;
    border-bottom: 5px solid transparent;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

#skills.visible .skill-item {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s ease-out forwards;
}

#skills.visible .skill-item:nth-child(1) { animation-delay: 0.2s; }
#skills.visible .skill-item:nth-child(2) { animation-delay: 0.4s; }
#skills.visible .skill-item:nth-child(3) { animation-delay: 0.6s; }
#skills.visible .skill-item:nth-child(4) { animation-delay: 0.8s; }


.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 123, 255, 0.05); /* Subtle blue overlay on hover */
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 0;
}

.skill-item:hover::before {
    transform: translateY(0);
}

.skill-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
    border-bottom-color: var(--color-accent-blue); /* Blue border on hover */
}

.skill-item i {
    font-size: 3.5em;
    color: var(--color-accent-blue); /* Blue icons */
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    animation: float 2s ease-in-out infinite;
}

.skill-item h3 {
    font-size: 1.5em;
    color: var(--color-text-dark); /* Dark text for headings */
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.skill-item p {
    font-size: 1.05em;
    color: var(--color-text-dark);
    position: relative;
    z-index: 1;
    line-height: 1.7;
    padding-top: 10px;
}

/* --- Education & Certifications Sections --- */
.education-list, .certification-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 35px;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.education-item, .certification-item {
    background-color: var(--color-secondary-light); /* White card background */
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--color-shadow-light);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-left: 6px solid var(--color-accent-blue); /* Blue left border */
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-30px);
}

#education.visible .education-item,
#certifications.visible .certification-item {
    opacity: 1;
    transform: translateX(0);
    animation: slideInLeft 0.8s ease-out forwards;
}

#education.visible .education-item:nth-child(1) { animation-delay: 0.2s; }
#education.visible .education-item:nth-child(2) { animation-delay: 0.4s; }

#certifications.visible .certification-item:nth-child(1) { animation-delay: 0.2s; }
#certifications.visible .certification-item:nth-child(2) { animation-delay: 0.4s; }
#certifications.visible .certification-item:nth-child(3) { animation-delay: 0.6s; }


.education-item:hover, .certification-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.education-item p, .certification-item p {
    font-size: 1.05em;
    color: var(--color-accent-blue); /* Blue for emphasis */
    font-weight: 600;
    margin-bottom: 10px;
}

.education-item h3, .certification-item h3 {
    font-size: 1.6em;
    color: var(--color-text-dark);
    margin-top: 0;
    margin-bottom: 12px;
}


.education-item ul, .certification-item ul {
    list-style: disc;
    padding-left: 25px;
    color: var(--color-text-dark);
    font-size: 1em;
    line-height: 1.8;
}

.education-item ul li, .certification-item ul li {
    margin-bottom: 10px;
}

/* --- Certification PDF Link Styling --- */
.certification-link {
    margin-top: 20px;
    text-align: center;
}

.certification-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-accent-blue); /* Blue color */
    font-weight: 600;
    padding: 10px 15px;
    border: 2px solid var(--color-accent-blue); /* Blue border */
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.certification-link a:hover {
    background-color: var(--color-accent-blue);
    color: var(--color-secondary-light); /* White text on hover */
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.certification-link a .fas.fa-image { /* Updated from fa-file-pdf to fa-image */
    font-size: 1.2em;
    color: var(--color-accent-blue);
    transition: color 0.3s ease;
}

.certification-link a:hover .fas.fa-image {
    color: var(--color-secondary-light);
}


@media (min-width: 768px) {
    .education-list, .certification-list {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* --- Portfolio Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-item {
    background-color: var(--color-secondary-light); /* White card background */
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--color-shadow-light);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-align: left;
    opacity: 0;
    transform: translateY(30px);
}

#portfolio.visible .portfolio-item {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s ease-out forwards;
}

#portfolio.visible .portfolio-item:nth-child(1) { animation-delay: 0.2s; }
#portfolio.visible .portfolio-item:nth-child(2) { animation-delay: 0.4s; }
#portfolio.visible .portfolio-item:nth-child(3) { animation-delay: 0.6s; }


.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.08);
}

.portfolio-info {
    padding: 30px;
}

.portfolio-info h3 {
    font-size: 1.5em;
    color: var(--color-text-dark);
    margin-top: 0;
    margin-bottom: 12px;
}

.portfolio-info p {
    font-size: 1.05em;
    color: var(--color-text-dark);
    margin-bottom: 25px;
    line-height: 1.7;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-accent-blue); /* Blue links */
    font-weight: 600;
    margin-right: 20px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.project-links a:hover {
    color: var(--color-link-hover); /* Darker blue on hover */
    transform: translateX(5px);
}

.project-links a i {
    margin-right: 10px;
    font-size: 1.2em;
}


/* --- Resume Section --- */
#resume {
    background-color: var(--color-primary-light); /* Light background */
}

#resume p, #resume .btn {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#resume.visible p {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

#resume.visible .btn {
    opacity: 1;
    transform: translateY(0);
    animation: bounceIn 1s ease-out forwards;
    animation-delay: 0.5s;
}


#resume p {
    font-size: 1.15em;
    color: var(--color-text-dark);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

#resume .btn {
    background-color: var(--color-accent-blue); /* Blue for download button */
    color: var(--color-secondary-light);
    border-color: var(--color-accent-blue);
}

#resume .btn:hover {
    background-color: var(--color-link-hover); /* Darker blue */
    border-color: var(--color-link-hover);
    transform: translateY(-5px) scale(1.05);
    animation: none;
}

/* --- Contact Section --- */
#contact {
    background-color: var(--color-secondary-light); /* White background */
}
.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
}

.contact-item {
    background-color: var(--color-primary-light); /* Light card background */
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--color-shadow-light);
    flex: 1 1 calc(33% - 40px);
    max-width: 350px;
    min-width: 280px;
    text-align: center;
    border-top: 6px solid var(--color-accent-blue); /* Blue top border */
    transition: transform 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

#contact.visible .contact-item {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s ease-out forwards;
}

#contact.visible .contact-item:nth-child(1) { animation-delay: 0.2s; }
#contact.visible .contact-item:nth-child(2) { animation-delay: 0.4s; }
#contact.visible .contact-item:nth-child(3) { animation-delay: 0.6s; }


.contact-item:hover {
    transform: translateY(-8px);
}

.contact-item i {
    font-size: 3em;
    color: var(--color-accent-blue); /* Blue icons */
    margin-bottom: 20px;
}

.contact-item p {
    margin: 0;
    font-size: 1.1em;
    color: var(--color-text-dark);
}

/* New: Contact Form Toggle Button Styling */
.contact-toggle-btn {
    margin-top: 30px;
    background-color: var(--color-accent-blue); /* Blue button */
    color: #ffffff;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.contact-toggle-btn:hover {
    background-color: var(--color-link-hover); /* Darker blue on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* New: Contact Form Wrapper - Initially hidden with smooth transition */
.contact-form-wrapper {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-in-out, opacity 0.7s ease-in-out;
    margin-top: 30px;
}

.contact-form-wrapper.active {
    max-height: 1000px;
    opacity: 1;
}

/* Existing .contact-form styling, applies when .contact-form-wrapper is active */
.contact-form {
    max-width: 750px;
    margin: 0 auto;
    background-color: var(--color-secondary-light); /* White form background */
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--color-shadow-light);
    text-align: left;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--color-text-dark);
    font-size: 1.05em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--color-border-light); /* Subtle border */
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Lato', sans-serif;
    background-color: var(--color-primary-light); /* Light input background */
    color: var(--color-text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-accent-blue); /* Blue focus */
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
    outline: none;
}

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

.contact-form button {
    background-color: var(--color-accent-blue); /* Blue send button */
    color: var(--color-secondary-light); /* White text */
    padding: 16px 35px;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.contact-form button:hover {
    background-color: var(--color-link-hover); /* Darker blue */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* --- Footer --- */
footer {
    background-color: #333; /* Darker footer */
    color: var(--color-secondary-light);
    padding: 50px 20px;
    text-align: center;
}

footer p {
    margin-bottom: 25px;
    font-size: 0.95em;
}

.social-links a {
    color: var(--color-secondary-light);
    font-size: 2em;
    margin: 0 18px;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--color-accent-blue); /* Blue highlight */
    transform: translateY(-7px) scale(1.15);
}

/* --- Keyframe Animations --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* NEW: Animation for hero-content-box */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* NEW: Enhanced Button Pulse Animation (includes subtle vertical movement) */
@keyframes buttonPulse {
    0% { transform: translateY(0) scale(1); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); }
    50% { transform: translateY(-5px) scale(1.03); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65); }
    100% { transform: translateY(0) scale(1); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); }
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80%, 100% {
        transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
    0% {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(0.9, 0.9, 0.9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(0.97, 0.97, 0.97);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* --- Floating Chatbot Widget --- */
.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

#chatbot-toggle-btn {
    background-color: var(--color-accent-blue); /* Blue button */
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-size: 1.8em;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#chatbot-toggle-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background-color: var(--color-link-hover);
}

.chatbot-window {
    position: absolute;
    bottom: 80px; /* Position above the button */
    right: 0;
    width: 350px; /* Slightly wider */
    height: 450px; /* Taller */
    background-color: var(--color-secondary-light); /* White chat window */
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--color-shadow-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8); /* Start smaller */
    opacity: 0;
    pointer-events: none; /* Make it unclickable when hidden */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.chatbot-window.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

.chatbot-header {
    background-color: var(--color-accent-blue); /* Blue header for chat */
    color: #ffffff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #ffffff; /* Explicitly set text color for contrast */
}

#chatbot-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.8em;
    cursor: pointer;
    transition: transform 0.2s ease;
}
#chatbot-close-btn:hover {
    transform: rotate(90deg);
}

.chatbot-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--color-primary-light); /* Light body background */
}

.chat-message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    font-size: 0.95em;
    line-height: 1.4;
}

.bot-message {
    background-color: var(--color-secondary-light); /* White bubble */
    color: var(--color-text-dark);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}
/* You can add .user-message styles if implementing user input messages */


.chatbot-footer {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--color-border-light);
    background-color: var(--color-secondary-light);
}

.chatbot-footer input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid var(--color-border-light);
    border-radius: 20px;
    margin-right: 10px;
    font-size: 0.95em;
    background-color: var(--color-primary-light);
    color: var(--color-text-dark);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.chatbot-footer input:focus {
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* MODIFIED: Chatbot Send Button (General) */
.chatbot-footer button {
    background-color: var(--color-accent-blue); /* Blue send button */
    color: var(--color-secondary-light); /* White text */
    border: none;
    border-radius: 17.5px; /* Pill shape - Adjusted to match height */
    padding: 10px 20px; /* Adjust padding for text */
    min-width: 70px; /* Ensure enough width for "Send" */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1em; /* Adjust font size for text */
    font-weight: 600; /* Make text bolder */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.chatbot-footer button:hover {
    background-color: var(--color-link-hover);
    transform: translateY(-2px); /* Subtle lift on hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}
/* Ensure icon within send button is hidden if text is used, or styled if both are present */
.chatbot-footer button i {
    display: none; /* Hide icon if you're using text "Send" */
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    .nav-list {
        position: fixed;
        top: 0;
        left: 100%;
        width: 100%;
        height: 100%;
        background-color: rgba(26, 26, 46, 0.98); /* Darker overlay for mobile menu */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.4s ease-in-out;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }

    .nav-list.active {
        left: 0;
    }

    .nav-list li {
        margin: 20px 0;
    }

    .nav-list li a {
        font-size: 1.8em; /* Slightly smaller for better fit on small screens */
        color: var(--color-text-light-hero);
        font-weight: 700;
    }
    .nav-list li a i {
        font-size: 1.5em; /* Adjust icon size */
    }

    .nav-list li a::after {
        background-color: var(--color-accent-red);
        height: 4px;
        bottom: -8px;
    }

    .menu-toggle {
        display: flex;
    }

    #hero {
        background-attachment: scroll;
        background-position: center 20%;
        min-height: 70vh;
    }

    .hero-content-box {
        padding: 25px 20px; /* Adjusted padding for better fit */
        width: calc(100% - 40px); /* Ensure it expands to full width minus padding */
        min-height: 270px; /* Slightly reduced min-height for better balance */
    }

    #hero h1 {
        font-size: 2em; /* Slightly larger for better readability on tablets */
    }

    .hero-content-box .role-text {
        font-size: 1.1em;
    }
    .typewriter-area {
        font-size: 0.9em;
    }

    h2 {
        font-size: 2.5em;
    }

    .skills-grid, .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .contact-item {
        flex: 1 1 calc(50% - 20px);
    }

    .contact-form {
        padding: 30px;
    }

    .form-group input, .form-group textarea, .contact-form button {
        padding: 12px 15px;
    }

    .chatbot-window {
        width: 320px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    #hero {
        padding: 100px 20px;
        min-height: 60vh;
        background-position: center top;
    }
    #hero h1 {
        font-size: 1.8em; /* Adjusted for smaller screens too */
    }

    .hero-content-box {
        padding: 20px 15px; /* Adjusted padding for smaller screens */
        width: calc(100% - 30px); /* Full width minus padding */
        min-height: 230px; /* Further reduced min-height for better balance */
        border-radius: 15px; /* Slightly smaller border-radius */
    }
    .hero-content-box .role-text {
        font-size: 1em; /* Adjusted for smaller screens too */
    }
    .typewriter-area {
        font-size: 0.9em; /* Further adjusted for smaller screens */
    }
    .blinking-cursor {
        font-size: 1.1em; /* Keep cursor size consistent */
    }

    .btn {
        padding: 15px 30px;
        font-size: 1.1em;
    }

    section {
        padding: 60px 0;
    }

    h2 {
        font-size: 2em;
        margin-bottom: 40px;
    }

    .about-content-wrapper {
        flex-direction: column;
    }

    .about-image {
        margin-right: 0;
        margin-bottom: 30px;
    }

    .education-list, .certification-list,
    .skills-grid, .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact-item {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .contact-form {
        padding: 30px;
    }

    .form-group input, .form-group textarea, .contact-form button {
        padding: 12px 15px;
    }

    .chatbot-widget {
        bottom: 20px;
        right: 20px;
    }
    #chatbot-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }
    .chatbot-window {
        bottom: 70px;
        width: 280px;
        height: 350px;
    }
    .chatbot-header h3 {
        font-size: 1em;
    }
    #chatbot-close-btn {
        font-size: 1.5em;
    }
    .chatbot-body, .chatbot-footer {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 1.5em;
    }
    .logo-circle {
        width: 35px;
        height: 35px;
        font-size: 1.1em;
    }

    #hero h1 {
        font-size: 1.3em; /* Further reduced for very small screens */
        margin-bottom: 0px; /* Reduce margin more */
    }

    .hero-content-box {
        padding: 15px 10px; /* Further reduced padding for very small screens */
        width: calc(100% - 20px); /* Even tighter width */
        min-height: 200px; /* Further reduced min-height */
        border-radius: 10px; /* Even smaller border-radius */
    }
    .hero-content-box .intro-text {
        font-size: 0.95em; /* Slightly smaller intro text */
    }
    .hero-content-box .role-text {
        font-size: 0.75em; /* Further reduced */
        margin-bottom: 12px; /* Adjusted margin */
    }
    .typewriter-area {
        font-size: 0.65em; /* Further reduced for very small screens */
        margin-bottom: 20px; /* Adjusted margin */
    }
    .blinking-cursor {
        font-size: 1em;
    }

    .btn {
        padding: 9px 18px; /* Smallest button padding */
        font-size: 0.85em; /* Smallest button font */
    }

    section {
        padding: 60px 0;
    }

    h2 {
        font-size: 1.5em;
    }

    h2::after {
        width: 60px;
        height: 4px;
    }

    .portfolio-info h3 {
        font-size: 1.2em;
    }

    .skill-item i {
        font-size: 3em;
    }

    .contact-form {
        padding: 20px;
    }

    .nav-list li a {
        font-size: 1.5em;
    }
    .certification-link a {
        font-size: 0.9em;
        padding: 8px 12px;
    }
    .certification-link a .fas.fa-image {
        font-size: 1em;
    }
    .chatbot-window {
        width: 260px;
        height: 320px;
    }
    .chatbot-footer { /* NEW: Added to adjust padding for the footer itself */
        padding: 8px; /* Reduced overall padding for the footer */
    }
    .chatbot-footer input {
        flex-grow: 1;
        flex-shrink: 1; /* Allow the input to shrink */
        flex-basis: 0; /* Allows it to shrink smaller than its content if necessary */
        padding: 8px 10px; /* Reduced padding for input */
        margin-right: 5px; /* Reduced margin */
        min-width: 80px; /* Give it a minimum width to still be usable */
    }
    /* MODIFIED: Chatbot Send Button for small screens - Corrected placement */
    .chatbot-footer button {
        width: auto; /* Allows the button to expand horizontally to fit content */
        height: 35px; /* Keep a consistent height for compactness */
        padding: 0 10px; /* Adjusted horizontal padding */
        border-radius: 17.5px; /* Makes it a pill shape (half of height for radius) */
        font-size: 0.8em; /* Further reduced font size to help text fit */
        min-width: unset; /* Remove min-width to ensure it scales with content */
        flex-shrink: 0; /* IMPORTANT: Prevent the button from shrinking */
        white-space: nowrap; /* Keep "Send" text on one line */
        box-sizing: border-box; /* Ensure padding is included in the width */
    }
}