/* styles.css */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif; /* Primary font from your :root styles */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem; /* Default padding for general containers */
}

h1, h2, h3 { /* General heading styles */
    font-family: 'Roboto', sans-serif; /* Using the second set's font for headings as it's more specific */
    color: #2c3e50;
}

h2 { /* General h2 style */
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
}

p { /* General paragraph style */
    font-size: 1.1em;
    color: #555; /* From second set, more specific than var(--text-color) for general paragraphs outside header */
}

a { /* General anchor style */
    color: #3498db; /* From second set */
    text-decoration: none;
}

a:hover { /* General anchor hover */
    text-decoration: underline;
}

/* Header Styles (Initial Fullscreen Header) */
.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: var(--white);
    min-height: 100vh;
    position: relative;
    overflow: hidden; /* This is important for the initial header's design */
}

/* Navbar - Base style for both header's navbar and sticky-nav */
/* .sticky-nav will also have the .navbar class from the JS clone */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0; /* Default padding for desktop */
    position: relative; /* Needed for absolute positioning of .nav-menu on mobile */
    width: 100%; /* Ensure it spans the container width */
    /* max-width: 1200px; /* If you want navbar constrained like container, ensure container padding handles edges */
    /* margin: 0 auto; */ /* If navbar is constrained */
}

.header .container .navbar {
     /* Styles specific to navbar inside the main .header's .container if needed */
     /* For example, if the .container adds padding, you might need to adjust */
}


.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--white); /* Logo color for main header */
}

/* Navigation Menu (Desktop) */
.nav-menu {
    display: flex; /* Shows on desktop */
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Hamburger Menu Icon (Hidden on Desktop, shown on Mobile) */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    color: var(--white); /* Color of the icon */
    font-size: 1.8rem; /* Made slightly larger */
    cursor: pointer;
    padding: 0.5rem; /* Clickable area */
    z-index: 1001; /* Above other navbar elements */
}

/* Sticky Navigation Bar */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(30, 58, 138, 0.95); /* Specific background for sticky */
    padding: 1rem 0; /* Specific padding for sticky */
    z-index: 1000;
    transform: translateY(-100%); /* Initially hidden off-screen */
    transition: transform 0.3s ease-in-out;
    /* .sticky-nav also has .navbar class, so it gets .navbar's flex properties */
    /* Ensure the .container structure is handled if you want its content aligned */
}
.sticky-nav .container { /* If sticky-nav has a container div inside it for content alignment */
    padding: 0 2rem; /* Match global container padding */
    /* OR if .sticky-nav itself should act like the container for width */
    /* max-width: 1200px; */
    /* margin: 0 auto; */
}


.sticky-nav.visible {
    transform: translateY(0); /* Slides into view */
	padding-right: 50px;
}

/* Ensure content within sticky-nav is styled correctly if needed */
.sticky-nav .logo {
    color: var(--white); /* Explicitly white for sticky nav logo */
}
/* .sticky-nav .hamburger-menu inherits color: var(--white) */
/* .sticky-nav .nav-menu a inherits color: var(--white) */


/* Hero Section (within .header) */
.hero {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%; /* Ensure hero content does not overflow small screens excessively */
}

.hero-title { /* Main definition */
    font-size: 4rem; /* Default for larger screens */
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
    color: var(--white); /* Ensure it's white, overriding general h1 if needed */
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* From later definition */
    position: relative; /* From later definition */
    z-index: 2; /* From later definition */
}

.hero-subtitle { /* Main definition */
    font-size: 1.5rem; /* Default for larger screens */
    font-weight: 300;
    margin-bottom: 3rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s backwards;
    color: var(--white); /* Ensure it's white/light */
}


/* Scroll Indicator (within .hero) */
.scroll-indicator {
    width: 30px;
    height: 50px;
    border: 2px solid var(--white);
    border-radius: 15px;
    position: relative; /* Changed from absolute for simpler centering */
    margin: 2rem auto 0; /* Adjusted margin */
    animation: bounceIndicator 2s infinite; /* Renamed one of the bounce animations */
    cursor: pointer;
    transition: transform 0.3s ease;
}
.scroll-indicator:hover {
    transform: translateY(5px);
}
.chevron {
    position: absolute;
    width: 25px;
    height: 5px;
    opacity: 0;
    transform: scale(0.3);
    animation: move-chevron 3s ease-out infinite;
}
.chevron:first-child { animation-delay: 1s; }
.chevron:nth-child(2) { animation-delay: 2s; }
.chevron:nth-child(3) { animation-delay: 0s; } /* Assuming 3 chevrons from HTML */

.chevron:before,
.chevron:after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    background: #fff;
}
.chevron:before { left: 0; transform: skewY(30deg); }
.chevron:after { right: 0; transform: skewY(-30deg); }


/* Animations (Define keyframes once) */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIndicator { /* Renamed to avoid conflict if "bounce" is used elsewhere */
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); } /* Adjusted bounce height */
    60% { transform: translateY(-7px); }
}

@keyframes move-chevron {
    25% { opacity: 1; }
    33.3% { opacity: 1; transform: translateY(10px) scale(1); } /* Adjusted movement inside indicator */
    66.6% { opacity: 1; transform: translateY(15px) scale(1); }
    100% { opacity: 0; transform: translateY(25px) scale(0.5); }
}

@keyframes textFocus {
    0% { opacity: 0; letter-spacing: 0.2em; filter: blur(4px); }
    100% { opacity: 1; letter-spacing: normal; filter: blur(0); }
}

.animated-background {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        linear-gradient( 45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.02) 25%, transparent 25%);
    background-size: 60px 60px;
    animation: patternMove 120s linear infinite;
    z-index: 0;
}
.gradient-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.2), rgba(30, 58, 138, 0.8));
    z-index: 0;
}
@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 2000px 2000px; }
}

/* --- Content Sections --- */
/* About Section */
#about {
    background: var(--white); /* Or #fff */
    padding: 6rem 0;
}
.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.about-content p { /* Specific paragraph style for about if needed */
    color: #555; /* Ensuring consistency */
}

/* Expertise Section */
#expertise {
    background: #f4f4f4; /* Or var(--light-gray) */
    padding: 6rem 0;
}
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Adjusted minmax */
    gap: 2rem;
    margin-top: 3rem;
}
.expertise-item {
    background: var(--white);
    padding: 2rem; /* Increased padding */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* Softer shadow */
    text-align: center;
    /* flex properties removed as grid handles sizing */
}
.expertise-item i {
    font-size: 2.5em;
    color: var(--primary-color); /* Use theme color */
    margin-bottom: 1rem;
}
.expertise-item h3 {
    font-size: 1.5em;
    margin: 1rem 0 0.5rem; /* Adjusted margin */
    color: var(--text-color); /* Theme color */
}
.expertise-item p {
    font-size: 1em; /* Adjusted size */
    color: #555;
}


/* Certifications Section */
#certifications {
    padding: 6rem 0;
    background-color: var(--light-gray);
}
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.certification-item {
    display: flex;
    background: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    min-height: 150px;
}
.certification-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.certification-logo {
    width: 120px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    flex-shrink: 0;
}
.certification-logo img {
    max-width: 80px;
    max-height: 80px;
    transition: var(--transition);
}
.certification-item:hover .certification-logo img {
    filter: grayscale(0) brightness(1);
}
.certification-details {
    flex: 1;
    padding: 1.5rem;
}
.certification-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.4;
}
.certification-date, .certification-issuer {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.3rem;
}
.certification-link {
    display: inline-block;
    margin-top: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}
.certification-link:hover {
    color: var(--secondary-color);
}


/* Experience Section / Professional Journey (Timeline) */
#experience {
    background: var(--white);
    padding: 6rem 0;
}
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 4rem auto;
    padding-left: 40px; /* Adjusted for mobile first thinking, will override for desktop */
    z-index: 1; /* Lowered from 10, as content should be above */
}
.timeline-container::before { /* The line */
    content: '';
    position: absolute;
    left: 20px; /* For mobile */
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    z-index: 0; /* Behind items */
}
.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 40px; /* Space for the dot */
    z-index: 2; /* Above the line */
}
.timeline-item::before { /* The dot */
    content: '';
    position: absolute;
    left: 0; /* Aligns with padding-left of timeline-item */
    top: 5px; /* Adjust vertical alignment */
    width: 15px; /* Dot size */
    height: 15px;
    background: var(--white);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 3; /* Above line, below content if needed */
    transform: translateX(-50%) translateX(-18px); /* Center the dot on the line */
}
.timeline-date {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: block;
}
.timeline-content {
    background: var(--white);
    padding: 1.5rem; /* Adjusted padding */
    border-radius: 8px; /* Softer radius */
    box-shadow: 0 5px 15px rgba(41, 68, 144, 0.15); /* Softer shadow */
    position: relative;
}
.timeline-content h4 { /* Role/Degree Title */
    font-size: 1.25em;
    margin:0 0 0.25rem;
    color: var(--text-color);
}
.timeline-company { /* Company/Institution */
    font-size: 1em;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}
.timeline-duration { /* Full-time, etc. */
    font-size: 0.85em;
    color: #a0aec0;
    display: block;
}
.company-note {
    font-size: 0.8em;
    font-style: italic;
    color: #718096;
    display: block;
}
.timeline-heading { /* Work Experience / Education heading */
    font-size: 1.8em;
    margin-bottom: 2rem;
    padding-left: 40px; /* Align with items */
    position: relative; /* For icon */
}
.timeline-heading i {
    margin-right: 0.5rem;
}


/* Contact Section */
#contact.section-contact { /* More specific if .section-contact is used elsewhere */
    padding: 6rem 0;
    background-color: var(--light-gray);
}
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}
.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    outline: none;
}
.form-group textarea {
    height: 150px;
    resize: vertical;
}
.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}
.btn-primary:hover {
    background: var(--secondary-color);
}
#contact .contact-info { /* More specific if .contact-info is used elsewhere */
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: left;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.info-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 20px; /* Align icons */
    text-align: center;
}
.info-item p, .info-item a {
    font-size: 1rem; /* Standardize text size */
    color: var(--text-color);
}
.info-item a:hover {
    color: var(--primary-color);
    text-decoration: none;
}
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}
.social-links a {
    font-size: 1rem;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.social-links a:hover {
    color: var(--primary-color);
    text-decoration: none;
}
.social-links i { /* Icon styling within social links */
    font-size: 1.2rem; /* Consistent with other icons */
}


/* Footer Styling */
footer {
    background: #2c3e50; /* Using specific color from your later definition */
    color: #ecf0f1; /* Lighter color for footer text */
    text-align: center;
    padding: 2rem 0; /* Adjusted padding */
    margin-top: 4rem; /* Adjusted margin */
}
footer p {
    margin: 0;
    font-size: 1rem; /* Adjusted size */
    color: #ecf0f1; /* Ensure footer text color is explicitly set */
    opacity: 0.9;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px; /* Slightly larger */
    height: 45px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 999; /* Below sticky-nav and hamburger if they overlap */
}
.scroll-to-top.show {
    opacity: 1;
    transform: translateY(0);
}
.scroll-to-top i {
    color: var(--white);
    font-size: 1.2rem;
}

/* Scroll-triggered Download Button */
.scroll-download-btn {
    position: fixed;
    bottom: 20px; /* Same as scroll-to-top, might overlap */
    right: 20px;  /* Same as scroll-to-top, might overlap. Adjust one. e.g., bottom: 70px; */
    z-index: 998; /* Ensure it's distinct from scroll-to-top */
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    /* Adjust margin if scroll-to-top is also present */
    margin-bottom: 55px; /* Example to lift it above scroll-to-top */
}
.scroll-download-btn.visible {
    opacity: 1;
    transform: translateY(0);
}
.scroll-download-btn a {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}
.scroll-download-btn a:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.scroll-download-btn i {
    margin-right: 8px;
    animation: pulseIcon 2s infinite; /* Renamed pulse to avoid conflict */
}

/* Download Popup Styles */
.download-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000; /* Highest z-index */
    align-items: center;
    justify-content: center;
}
.popup-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInPopup 0.3s ease; /* Renamed to avoid conflict */
}
.close-popup {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}
.close-popup:hover {
    color: var(--primary-color);
}
.download-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.download-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: var(--light-gray);
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}
.download-item:hover {
    background-color: var(--primary-color);
    color: var(--white);
}
.download-item i { font-size: 2rem; }
.download-item span { font-weight: 500; }

/* Keyframes for popups/buttons (ensure names are unique if effects are different) */
@keyframes fadeInPopup {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseIcon {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
@keyframes bounceIcon { /* Single definition for a generic bounce */
    0%, 100% { transform: translateY(0) scale(1.1); }
    50% { transform: translateY(-5px) scale(1.1); }
}
.scroll-download-btn a:hover i {
    animation: bounceIcon 0.9s ease;
}

/* Animation Trigger for sections */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease; /* Specify properties */
}
.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}


/* --- MOBILE STYLES (max-width: 768px) --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem; /* Global mobile container padding */
    }

    .navbar { /* Applies to main header navbar AND sticky-nav */
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 0; /* Consistent padding for mobile navbars */
    }

    .navbar .logo {
        margin-bottom: 0.5rem; /* Create space if menu drops below */
        /* The hamburger is positioned absolutely, so logo margin mainly affects flow before menu opens */
    }

    .nav-menu { /* The <ul> for mobile dropdown */
        display: none; /* Hidden by default, JS toggles with .active */
        flex-direction: column;
        width: 100%; /* Full width of its parent (.navbar) */
        background-color: rgba(30, 58, 138, 0.95); /* Background for the dropdown */
        position: absolute; /* Relative to the .navbar */
        top: 100%; /* Position it right below the .navbar content area (logo) */
        left: 0;
        padding: 0.5rem 0;
        z-index: 1000; /* Ensure dropdown is above subsequent page content */
        box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Optional: add shadow to dropdown */
    }

    .nav-menu.active {
        display: flex; /* Show the menu */
    }

    .nav-menu li {
        text-align: center;
        width: 100%;
    }

    .nav-menu li a {
        padding: 0.85rem 1rem; /* Slightly more padding */
        display: block;
        width: 100%; /* Ensure link takes full width of li */
        color: var(--white);
        text-decoration: none;
    }
    .nav-menu li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    .nav-menu a::after { /* Hide desktop underline effect */
        display: none;
    }

    .hamburger-menu {
        display: block; /* Show hamburger */
        position: absolute; /* Position relative to .navbar */
        /* Calculate top based on .navbar's padding and desired alignment */
        /* If .navbar padding is 1rem (16px), and hamburger is 1.8rem tall (28.8px) + 0.5rem padding (8px) = ~37px height */
        /* top: 1rem; align with top padding of navbar */
        /* right: 1rem; align with right padding of container usually */
        /* Let's try to center it vertically within the initial navbar height before stacking */
        top: 1rem; /* Adjust if logo is tall, this aligns with top of navbar padding */
        right: 1rem; /* Aligns with the container's right padding */
    }


    /* Responsive Hero Section */
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }

    /* Responsive Contact Section */
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    /* Responsive Scroll Indicator */
    .scroll-indicator {
        width: 25px;
        height: 45px;
    }
    .scroll-indicator .chevron {
        width: 20px;
        height: 6px;
    }

    /* Responsive Certifications */
    .certifications-grid {
        grid-template-columns: 1fr;
    }
    .certification-item {
        flex-direction: column; /* Stack logo and details */
    }
    .certification-logo {
        width: 100%; /* Full width logo area */
        padding: 1rem;
    }
    .certification-logo img{
        max-width: 70px; /* Adjust logo size */
        max-height: 70px;
    }
    .certification-details {
        padding: 1rem;
        text-align: center;
    }

    /* Responsive Timeline */
    .timeline-container {
        padding-left: 0; /* Remove desktop left padding */
        max-width: 100%; /* Allow full width */
    }
    .timeline-container::before { /* Line down the center */
        left: 20px; /* Small offset from left */
        transform: none;
    }
    .timeline-item {
        padding-left: 40px; /* Space from the line */
        margin-bottom: 2rem;
        text-align: left; /* Align content to left */
    }
    .timeline-item::before { /* Dot on the line */
        left: 0;
        top: 0px; /* Align dot with top of timeline content */
        transform: translateX(10.5px); /* Center on the line */
        /* z-index already set */
    }
    .timeline-date {
        position: static; /* No longer absolute */
        width: auto;
        text-align: left;
        font-size: 0.9rem;
        margin-bottom: 0.5rem; /* Space below date */
        padding-right: 0;
        background-color: transparent; /* Remove white background if not needed */
    }
    .timeline-content {
        margin-left: 0; /* No extra margin needed */
        margin-top: 0;
        padding: 1rem; /* Adjust padding */
    }
    .timeline-heading{
        padding-left: 0;
        text-align: center; /* Center "Work Experience / Education" */
        font-size: 1.5em;
    }
}


/* Additional styles for even smaller devices (e.g., max-width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .navbar {
        padding: 1.5rem 0; /* Further reduce navbar padding */
    }
    .hamburger-menu {
        top: 0.75rem; /* Adjust to match new navbar padding */
        right: 0.75rem;
        font-size: 1.6rem;
    }
    .logo {
        font-size: 1.3rem;
    }

    .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    .contact-form, #contact .contact-info {
        padding: 1.5rem;
    }

    .expertise-item {
        padding: 1.5rem;
    }
    .expertise-item i { font-size: 2em; }
    .expertise-item h3 { font-size: 1.3em; }

    .certifications-grid { gap: 1.5rem; }
    .certification-details { padding: 1rem; }
    .certification-details h3 { font-size: 1rem; }

    .timeline-container::before { left: 15px; }
    .timeline-item { padding-left: 30px; }
    .timeline-item::before { transform: translateX(8px); width:12px; height:12px; border-width: 2px;}
    .timeline-content { padding: 1rem; }


    /* Footer */
    footer p {
        font-size: 0.9rem;
    }

    /* Scroll/Download buttons adjustments if needed */
    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
    }
    .scroll-to-top i { font-size: 1rem; }

    .scroll-download-btn {
        /* Adjust if it overlaps too much, e.g. by changing its margin-bottom more */
        margin-bottom: 60px; /* Increased space from scroll-to-top */
    }
    .scroll-download-btn a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* New styles for the Back to Top button */
#back-to-top-btn {
    display: none; /* Hidden by default */
    position: fixed; /* Keep it in view while scrolling */
    bottom: 20px;
    right: 30px;
    z-index: 99; /* Make sure it's on top of other content */
    border: none;
    outline: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%; /* Make it a circle */
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s, opacity 0.3s;
}

#back-to-top-btn:hover {
    background-color: #0056b3;
}
