/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0; padding: 0; box-sizing: border-box;
    background-color: #f4f4f9; color: #333; line-height: 1.6;
    overflow-x: hidden; 
}

/* Header and Navigation */
header {
    background-color: #ffffff; padding: 0.5rem 1.5rem;
    position: fixed; 
    top: 0; left: 0; width: 100%;
    z-index: 1200;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

nav .logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-firstname, .logo-lastname { font-weight: 700; color: #0056b3; font-size: 1.2rem; white-space: nowrap; }

/* Photo in the header */
.header-photo {
    width: 45px; height: 45px; border-radius: 50%;
    object-fit: cover; opacity: 0;
    transform: rotateY(0deg);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}
header.header-scrolled .header-photo { opacity: 1; transform: rotateY(360deg); }


/* Independent Navigation Container */
.nav-menu-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    margin-left: 1.5rem;
}

/* Default Desktop Navigation Styles */
.nav-links {
    list-style: none; margin: 0; padding: 0;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    height: 100%;
    flex-wrap: wrap; 
    justify-content: flex-end;
}


.nav-links a { text-decoration: none; color: #333; font-weight: 500; transition: color 0.3s ease; }
.nav-links a:hover, .nav-links a.active { color: #0056b3; font-weight: bold; }

/* Main Content and Sections */
main { padding: 0 2rem; margin-top: 80px; }
section { padding: 4rem 0 6rem 0; max-width: 900px; margin: 0 auto; border-bottom: 1px solid #ddd; }
section:last-of-type { border-bottom: none; }
h1, h2, h3 { color: #121212; }
h2 { text-align: center; margin-bottom: 2rem; font-size: 2.2rem; }

/* Hero Section */
#hero { text-align: center; padding: 4rem 0; }
.hero-profile-photo {
    width: 180px; height: 180px; border-radius: 50%;
    object-fit: cover; margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: opacity 0.4s ease-in-out;
}
.hero-photo-scrolled { opacity: 0; }

#hero h1 { font-size: 3rem; margin-bottom: 0.5rem; }
#hero p { font-size: 1.2rem; color: #555; margin-bottom: 2rem; }
.cta-button { display: inline-block; background-color: #007bff; color: #fff; padding: 0.8rem 1.6rem; border-radius: 5px; text-decoration: none; font-weight: bold; transition: background-color 0.3s ease; }
.cta-button:hover { background-color: #0056b3; }
.about-container, #contact, #resume { text-align: center; }
.skills-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.skill-item { background-color: #e9ecef; color: #333; padding: 0.7rem 1.2rem; border-radius: 20px; font-size: 0.9rem; font-weight: 500; }
.experience-item, .education-item { background-color: #ffffff; padding: 1.5rem; margin-bottom: 1.5rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
#contact a { color: #007bff; text-decoration: none; }
footer { text-align: center; padding: 2rem; background-color: #333; color: #f4f4f9; }

/* Mobile and Tablet Navigation Styles */
@media (max-width: 992px) {
    /* This creates the clean shadow/fade on the left of the nav links */
    .nav-menu-container::before {
        content: '';
        position: absolute;
        left: 0; top: 0; bottom: 0;
        width: 30px;
        background: linear-gradient(to right, white 40%, transparent);
        z-index: 2;
        pointer-events: none;
    }

    .nav-links {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start; 
        flex-wrap: nowrap;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    
    /* Invisible spacers for centering */
    .nav-links::before, .nav-links::after {
        content: '';
        min-width: calc(50vw - 120px);
    }
                                 }
