/* --- 0. Global Reset & Variables --- */
:root {
    --bg-color: #0a0a1a;
    --card-bg: #1a1a2e;
    --text-color: #EAEAEA;
    --text-muted: #aaaaaa;
    --accent-color: #00BFFF; /* Deep Sky Blue */
    --neon-glow: 0 0 5px var(--accent-color), 0 0 10px var(--accent-color), 0 0 15px var(--accent-color);
    --card-border: rgba(0, 191, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
}

/* --- SCROLL ANIMATION --- */
section {
    padding: 6rem 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.show {
    opacity: 1;
    transform: translateY(0);
}

.hero {
    opacity: 1;
    transform: translateY(0);
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
}

/* --- 1. Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.navbar .nav-links {
    display: flex;
    list-style: none;
}

.navbar .nav-links li {
    margin-left: 2rem;
}

.navbar .nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar .nav-links a:hover {
    color: var(--accent-color);
    text-shadow: var(--neon-glow);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 2rem;
    user-select: none;
}

/* --- 2. Hero Section --- */
.hero-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    box-shadow: var(--neon-glow);
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(55, 123, 145, 0.3);
}

/* --- 2b. Latest Projects Gallery (NEW STYLES) --- */
#latest-projects {
    background-color: var(--bg-color); /* Same as body */
}

.latest-projects-grid {
    display: grid;
    /* Only one column, centered */
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2rem;
}

.latest-project-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    max-width: 1400px; /* Max width for the card */
    width: 100%;
}

.latest-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.latest-project-card img {
    width: 100%;
    height: 550px; /* Adjusted height */
    object-fit: cover;
    border-bottom: 1px solid var(--card-border);
}

/* This is the new style for the clickable image */
.latest-project-card .clickable-image {
    cursor: pointer;
    transition: opacity 0.2s ease-in-out;
}

.latest-project-card .clickable-image:hover {
    opacity: 0.9;
}


.latest-card-content {
    padding: 1.5rem;
}

.latest-card-content h3 {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.latest-card-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Re-using project-links style from projects section */
.latest-card-content .project-links a {
    text-decoration: none;
    font-weight: 600;
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.latest-card-content .project-links a:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}


/* --- 3. Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--card-border);
}

.skill-card .icon-placeholder {
    font-size: 4rem; /* Makes icons bigger */
    margin-bottom: 1.5rem;
    color: var(--accent-color); /* Fallback color */
}

.skill-card h3 {
    font-size: 1.1rem;
    font-weight: 400;
}

/* --- 3b. Skill Icon Styling --- */
/* This uses the icon's original brand color! */
.skill-card i {
    color: unset; /* Resets the fallback color */
    -webkit-text-fill-color: unset; /* Resets the fallback color */
    background-image: none; /* Resets any gradient */
}

.skill-card .colored {
    color: var(--accent-color); /* Default color for colored icons */
}

/* Specific Brand Colors (using the 'colored' class) */
.devicon-c-plain.colored { color: #A8B9CC; }
.devicon-cplusplus-plain.colored { color: #00599C; }
.devicon-java-plain.colored { color: #f89820; }
.devicon-python-plain.colored { color: #3776AB; }
.devicon-numpy-original.colored { color: #4D77CF; }
.devicon-vscode-plain.colored { color: #007ACC; }
.devicon-github-original.colored { color: #ffffff; } /* White, as it's just a logo */
.devicon-html5-plain.colored { color: #E34F26; }
.devicon-css3-plain.colored { color: #1572B6; }
.devicon-javascript-plain.colored { color: #F7DF1E; }
.devicon-powerbi-plain.colored { color: #F2C811; }

/* --- 4. Education Section --- */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.education-item {
    background: var(--card-bg);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.education-item:hover {
    box-shadow: 0 0 15px var(--card-border);
    transform: translateX(5px);
}

.education-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
}

.education-item .institution {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.education-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows wrapping on small screens */
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.education-meta .metric {
    font-weight: 600;
    color: var(--text-color);
}


/* --- 5. Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--card-border);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.card-content h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.tech-stack {
    margin-bottom: 1.5rem;
}

.tech-stack span {
    display: inline-block;
    background: #2a2a4e;
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

.project-links {
    margin-top: auto; 
}

.project-links a {
    text-decoration: none;
    font-weight: 600;
    color: var(--text-color);
    margin-right: 1.5rem;
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.project-links a:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* --- 6. Ongoing Work Section --- */
.ongoing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.ongoing-card {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.ongoing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.ongoing-card .card-content {
    padding: 2rem; /* More padding as there is no image */
}

.progress-bar-container {
    width: 100%;
    background-color: #2a2a4e; /* Darker background for the bar */
    border-radius: 5px;
    margin-top: 1.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 25px;
    line-height: 25px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-radius: 5px 0 0 5px;
    transition: width 0.5s ease-in-out;
}

/* --- 7. Events Section --- */
.event-item {
    background: var(--card-bg);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.event-item:hover {
    box-shadow: 0 0 15px var(--card-border);
    transform: translateX(5px);
}

.event-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

.event-item p {
    color: var(--text-muted);
}

/* --- 8. Contact Section --- */
#contact {
    text-align: center;
}

#contact p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

#contact a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
}

/* Make the contact button/email clearly visible and fixed width */
#contact .cta-button {
    width: 280px; /* requested 280px style */
    display: inline-block;
    text-align: center;
    text-transform: none; /* keep email case intact */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    color: white; /* Fix: Force text white */
    text-decoration: none; /* Fix: Remove underline */
}

/* Style for the new phone number link */
#contact .phone-link {
    display: block;
    margin: 1rem auto 0;
    font-size: 1.1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

#contact .phone-link:hover {
    color: var(--accent-color);
    text-shadow: var(--neon-glow);
}


.social-links {
    margin-top: 2rem;
}

.social-links a {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
    text-shadow: var(--neon-glow);
    transform: scale(1.1);
}

/* --- 9. Footer --- */
.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- 10. Responsive Design --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .navbar .nav-links {
        position: absolute;
        top: 65px; 
        left: 0;
        width: 100%;
        background: var(--bg-color);
        border-bottom: 1px solid var(--card-border);
        flex-direction: column;
        text-align: center;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: all 0.5s ease-out;
    }
    
    .navbar .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .navbar .nav-links li {
        margin: 1.5rem 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero {
        min-height: 80vh;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .projects-grid,
    .ongoing-grid,
    .latest-projects-grid { /* Added new grid */
        grid-template-columns: 1fr;
    }

    /* Responsive Education Section */
    .education-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .education-meta .location,
    .education-meta .metric {
        margin-top: 0.25rem;
    }
}