/* 1. Global Setup */
:root {
    --bg-grad-1: #0a0e27;
    --bg-grad-2: #1a1a3e;
    --bg-grad-3: #2d1b4e;
    --text-white: #ffffff;
    --text-gray: #e0e0e0;
    --accent-cyan: #00d4ff;
    --accent-pink: #ff006e;

    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: rgba(0, 0, 0, 0.3);

    --font-primary: 'Poppins', sans-serif;

    --section-padding-desktop: 150px;
    --section-padding-mobile: 100px;
    --card-padding: 30px;
    --grid-gap: 40px;
    --nav-height: 70px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-gray);
    line-height: 1.7;
    overflow-x: hidden;
}

.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(250deg, var(--bg-grad-1), var(--bg-grad-2), var(--bg-grad-3));
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-grad-1);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-pink);
}

/* 2. Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-heading {
    font-size: clamp(2.25rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--text-white);
    text-align: center;
    margin-bottom: 60px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.glass-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    padding: var(--card-padding);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 212, 255, 0.4);
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-cyan);
    color: var(--bg-grad-1);
    border-color: var(--accent-cyan);
}
.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background-color: var(--accent-pink);
    color: var(--text-white);
    border-color: var(--accent-pink);
}
.btn-secondary:hover {
    background-color: transparent;
    color: var(--accent-pink);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 110, 0.4);
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* 3. Header & Navigation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: background 0.3s ease;
}
.main-header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link.active {
    color: var(--accent-cyan);
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-white);
    border-radius: 5px;
    transition: all 0.3s ease;
}


/* 4. Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    padding-top: var(--nav-height);
}

.hero-name {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 10px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    font-weight: 400;
    color: var(--text-gray);
    margin-bottom: 20px;
    min-height: 2.5rem;
}

.typing-effect::after {
    content: '|';
    animation: blink 0.7s infinite;
    color: var(--accent-cyan);
    font-weight: 600;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

/* 5. Content Sections */
.content-section {
    padding: var(--section-padding-desktop) 0;
    overflow: hidden;
}

.about-intro {
    font-size: 1.1rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

/* ▼▼▼ THIS IS THE UPDATED RULE ▼▼▼
*/
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Changed from 3 */
    gap: var(--grid-gap);
    max-width: 800px; /* Added to center the 2 cards */
    margin: 0 auto;
}

.stat-card {
    text-align: center;
    padding: var(--card-padding);
}
.stat-card h3 {
    font-size: 1.75rem;
    color: var(--text-white);
    margin-bottom: 10px;
}
.stat-card p {
    font-size: 1rem;
    color: var(--text-gray);
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap);
}

.profile-card {
    text-decoration: none;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: var(--card-padding);
}
.profile-card:nth-child(odd):hover {
    box-shadow: 0 15px 50px rgba(0, 212, 255, 0.4);
}
.profile-card:nth-child(even):hover {
    box-shadow: 0 15px 50px rgba(255, 0, 110, 0.4);
}

.profile-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-white);
}

.profile-rating-stars {
    font-size: 1.5rem;
    color: #FFD700;
    line-height: 1.2;
}

.profile-rating-number-container {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
}
.rating-stars-icon {
    font-size: 3rem !important;
    color: #FFD700;
}
.profile-rating-text {
    font-size: 1rem;
    color: var(--text-gray);
    margin-top: -10px;
}

.profile-link {
    margin-top: 15px;
    font-weight: 600;
    color: var(--accent-cyan);
    transition: letter-spacing 0.3s ease;
}
.profile-card:hover .profile-link {
    letter-spacing: 0.5px;
    text-decoration: underline;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap);
}

.achievement-card {
    padding: var(--card-padding);
}
.achievement-card h3 {
    font-size: 1.75rem;
    color: var(--text-white);
    margin-bottom: 10px;
}
.achievement-card p {
    font-size: 1.1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    text-decoration: none;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: var(--card-padding);
    height: 100%;
}
.project-card h3 {
    font-size: 1.5rem;
    color: var(--text-white);
}
.project-tech {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-cyan);
}
.project-desc {
    font-size: 1rem;
    flex-grow: 1;
}
.project-link {
    font-weight: 600;
    color: var(--accent-pink);
    transition: letter-spacing 0.3s ease;
}
.project-card:hover {
    box-shadow: 0 15px 50px rgba(255, 0, 110, 0.4);
}
.project-card:hover .project-link {
    letter-spacing: 0.5px;
    text-decoration: underline;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap);
}

.skill-category {
    padding: var(--card-padding);
}
.skill-category h3 {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 10px;
}
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.skill-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.skill-pill:hover {
    background: var(--accent-cyan);
    color: var(--bg-grad-1);
    transform: translateY(-3px);
    border-color: var(--accent-cyan);
}

.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-tagline {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: var(--text-gray);
}
.email-btn {
    font-size: 1.1rem;
    padding: 16px 32px;
    margin-bottom: 40px;
    min-width: 300px;
}
.email-btn i {
    margin-right: 10px;
}

.social-links {
    display: flex;
    gap: 30px;
}
.social-links a {
    color: var(--text-gray);
    font-size: 2rem;
    transition: all 0.3s ease;
}
.social-links a:hover {
    color: var(--accent-pink);
    transform: translateY(-5px);
}

/* 6. Footer */
.main-footer {
    padding: 40px 20px;
    text-align: center;
    background: rgba(0,0,0,0.2);
    margin-top: 100px;
    color: var(--text-gray);
    font-size: 0.9rem;
}


/* 7. Responsive */
@media (max-width: 1024px) {
    :root {
        --card-padding: 25px;
        --grid-gap: 30px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding-desktop: var(--section-padding-mobile);
    }

    .stats-grid,
    .profiles-grid,
    .achievements-grid,
    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        max-width: 100%;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-grad-2);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: left 0.4s ease-in-out;
        box-shadow: 10px 0 30px rgba(0,0,0,0.3);
    }

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

    .nav-link {
        font-size: 1.5rem;
    }

    .hamburger-menu {
        display: flex;
        z-index: 1001;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-cta {
        flex-direction: column;
        width: 80%;
    }

    .email-btn {
        width: 100%;
        min-width: unset;
    }
}

/* --- Updates for Education Block --- */
.education-block {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 800px;
    margin: 40px auto;
    text-align: left;
}

.edu-icon {
    font-size: 3rem;
    color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.05);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.edu-details h3 {
    font-size: 1.25rem;
    color: var(--text-white);
    margin-bottom: 5px;
}

.edu-inst {
    font-size: 1.1rem;
    color: var(--accent-pink);
    font-weight: 600;
}

.edu-date {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-top: 5px;
    font-style: italic;
}

/* --- Updates for Achievement Cards --- */
.achievement-card {
    position: relative;
    padding-top: 40px; /* Space for date */
}

.achievement-date {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-weight: 600;
    background: rgba(0, 212, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

.achievement-stat {
    color: var(--text-white);
    font-weight: 700;
    margin: 10px 0;
    display: block;
}

.achievement-narrative {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-top: 10px;
    border-top: 1px solid var(--glass-border);
    padding-top: 10px;
}

/* Mobile responsive fix for education block */
@media (max-width: 768px) {
    .education-block {
        flex-direction: column;
        text-align: center;
    }
}

/* --- New Styles for Updated Project Section --- */

.project-cat-header {
    color: var(--accent-cyan);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 4px solid var(--accent-pink);
    text-align: left; /* Aligns header to left */
}

/* Update Card Layout for Bullet Points */
.project-card {
    align-items: flex-start; /* Align text to left, not center */
    text-align: left;
    height: 100%; /* Ensure uniform height in grid */
}

.project-bullets {
    list-style: none;
    margin-top: 15px;
    padding: 0;
    width: 100%;
}

.project-bullets li {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
    line-height: 1.5;
}

.project-bullets li::before {
    content: '▹'; /* Stylized bullet */
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-pink);
    font-weight: bold;
}

/* Emphasize keywords inside bullets */
.project-bullets li strong {
    color: var(--text-white);
    font-weight: 600;
}

/* Adjust grid for tablets */
@media (max-width: 1024px) {
    .project-card {
        padding: 20px;
    }
}