/* --- 1. GLOBAL STYLES --- */
* {
    box-sizing: border-box; /* Prevents padding from breaking layout widths */
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    /* Clean, Modern Font Stack */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: white;
    line-height: 1.6;
    
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: center;
    padding: 40px 20px;

    /* Background Animation Logic */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- 2. HEADER STYLES --- */
h1 {
    font-size: clamp(2rem, 8vw, 3.5rem); /* Responsive font size: gets smaller on mobile */
    margin: 0 0 20px 0;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* --- 3. NAVIGATION BAR (Mobile-Responsive Fix) --- */
.navbar {
    margin-bottom: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 8px;
    display: flex;
    flex-wrap: wrap; /* Allows links to drop to a new line on small screens */
    justify-content: center;
    gap: 5px;
    
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap; /* Keeps link names on one line */
}

.navbar a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    transform: translateY(-2px);
}

/* --- 4. PROFILE CARD (About Me Page) --- */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.profile-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.profile-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: left; /* Left-aligned for better reading flow */
    color: rgba(255, 255, 255, 0.95);
}

/* --- 5. PROJECTS SECTION --- */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1100px;
    padding: 20px 0;
}

.project-card {
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.project-info {
    padding: 20px;
    flex-grow: 1;
}

.project-info h3 {
    margin: 0 0 10px 0;
    color: #222;
}

.project-info p {
    margin: 0;
    color: #444;
    font-size: 0.95rem;
}

/* --- 6. UTILITIES & ICONS --- */
.linkedin-icon {
    transition: color 0.3s ease;
}

.linkedin-icon:hover {
    color: #0077b5;
}

/* --- 7. MOBILE ADJUSTMENTS --- */
@media (max-width: 600px) {
    body {
        padding-top: 20px;
    }

    .navbar ul {
        border-radius: 20px; /* Looks better when wrapping */
        width: 90%;
    }

    .navbar a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .profile-card {
        padding: 20px;
    }
}

/* --- 8. INDEX PAGE SPECIFIC (CENTERED LAYOUT) --- */
/* This only triggers when the body has the 'home-page' class */
body.home-page {
    justify-content: center; 
    padding-top: 0; /* Removes the top padding we added for the other pages */
}

body.home-page .navbar {
    margin-bottom: 0;
    margin-top: 20px; /* Adds a little gap between your name and the menu */
}

body.home-page h1 {
    margin-bottom: 10px;
}