/* =========================================
   1. CSS VARIABLES (Bright, Modern & Premium)
   ========================================= */
/* 1. DEFINE THE THEMES */
:root {
    --bg-color: #ffffff;        
    --surface-color: #f8fafc;   
    --text-main: #0f172a;       
    --text-muted: #475569;      
    --accent-color: #4f46e5;    
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.95);
}

/* 2. THE DARK MODE OVERRIDE */
body.dark-mode {
    --bg-color: #0f172a;        /* Deep Navy/Black */
    --surface-color: #1e293b;   
    --text-main: #f8fafc;       
    --text-muted: #94a3b8;      
    --accent-color: #818cf8;    /* Lighter Indigo for better contrast */
    --card-bg: #1e293b;
    --nav-bg: rgba(15, 23, 42, 0.95);
}

/* 1. Ensure the Footer and Contact section behave in Dark Mode */
body.dark-mode .footer-section, 
body.dark-mode .contact-section {
    background-color: #0a0f1d; /* Deep contrast for the footer */
    color: #ffffff;
}

/* 2. Fix the "Ready to build something amazing?" text */
body.dark-mode h2, 
body.dark-mode p, 
body.dark-mode .contact-container h2 {
    color: var(--text-main) !important;
}

/* 3. Fix the "Let's Talk" button in the Hero section */
body.dark-mode .secondary-btn {
    background-color: transparent;
    border: 2px solid var(--text-main);
    color: var(--text-main);
}

body.dark-mode .secondary-btn:hover {
    background-color: var(--text-main);
    color: #0f172a; /* Dark text on white hover */
}

/* 4. Fix the Logo and Nav Links */
/* Ensure the Header background stays dark in Dark Mode */
body.dark-mode header {
    background-color: var(--nav-bg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5); /* Stronger shadow for depth */
}

/* Force the Logo to be pure white for visibility */
body.dark-mode .logo {
    color: #ffffff !important;
}

/* Force Navigation Links to be light-grey and white on hover */
body.dark-mode .nav-links a {
    color: var(--text-muted);
}

body.dark-mode .nav-links a:hover {
    color: #ffffff;
}

/* Adjust the Toggle Button border so it doesn't look too harsh */
body.dark-mode .theme-btn {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Fix the Footer button text visibility in Dark Mode */
body.dark-mode .inverted-btn {
    background-color: var(--accent-color); /* Changes button to indigo/gold */
    color: #ffffff; /* Ensures text is white on the dark button */
    border: none;
}

body.dark-mode .inverted-btn:hover {
    background-color: #ffffff;
    color: #0f172a; /* Switches to dark text on white hover */
}
/* 3. UPDATE ELEMENT STYLES to use variables */
body {
    background-color: var(--bg-color);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

header {
    background-color: var(--nav-bg);
}

.project-card, .service-card, .about-skills {
    background-color: var(--card-bg);
    color: var(--text-main);
}

/* =========================================
   2. GLOBAL RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scrolling from animations */
}

a {
    text-decoration: none;
    color: var(--text-main);
}

/* =========================================
   3. ANIMATIONS (UI/UX Magic)
   ========================================= */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.animate-slide-up {
    animation: slideUp 1s ease-out forwards;
}

.animate-fade-down {
    animation: fadeDown 0.8s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* =========================================
   4. NAVIGATION BAR
   ========================================= */
header {
    background-color: rgba(255, 255, 255, 0.95); 
    position: sticky; 
    top: 0;
    z-index: 100;
    padding: 20px 5%; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Premium soft shadow */
}

.navbar {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    max-width: 1200px;
    margin: 0 auto; 
}


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

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--accent-color);
    transition: color 0.3s ease; 
}

.nav-cta {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero {
    display: flex;
    align-items: center; 
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 5%;
    min-height: 85vh; 
    gap: 60px; 
}

.hero-text {
    flex: 1; 
}

/* UI/UX Badge Element */
.badge {
    display: inline-block;
    background-color: var(--surface-color);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.hero-text h1 {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 15px;
    letter-spacing: -1.5px;
}

.subtitle {
    font-size: 1.8rem;
    color: var(--accent-color); 
    font-weight: 600;
    margin-bottom: 25px;
}

.hero-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
    line-height: 1.8;
}

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

.btn {
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease; 
    cursor: pointer;
}

.primary-btn {
    background-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.primary-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px); 
    box-shadow: 0 15px 20px -3px rgba(79, 70, 229, 0.4);
}

.secondary-btn {
    background-color: #ffffff;
    border: 2px solid var(--text-muted);
    color: var(--text-main);
}

.secondary-btn:hover {
    border-color: var(--text-main);
    transform: translateY(-3px);
}

.hero-image-container {
    flex: 1; 
    display: flex;
    justify-content: flex-end; 
    position: relative;
}

.profile-pic {
    max-width: 100%;
    width: 450px;
    height: auto;
    border-radius: 24px; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); 
    position: relative;
    z-index: 2;
}

/* UI/UX Graphic behind the image */
.image-backdrop {
    position: absolute;
    width: 450px;
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 24px;
    top: 20px;
    right: -20px;
    z-index: 1;
    opacity: 0.1;
}

/* =========================================
   6. SELECTED WORK SECTION
   ========================================= */
.work-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- The Grid Layout --- */
.project-grid {
    display: grid;
    /* This automatically makes it responsive! */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 40px;
}

/* --- Individual Project Cards --- */
.project-card {
    background-color: var(--bg-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* UI/UX Hover Effect */
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.15);
}

.project-image img {
    width: 100%;
    height: auto;
    object-fit: cover; /* Keeps images looking sharp without stretching */
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Stack the images nicely on mobile */
@media (max-width: 768px) {
    .project-image img {
        height: auto;
        width: 100%;
    }
}


.project-info {
    padding: 30px;
}

.project-category {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.project-info h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.project-info p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.project-link {
    font-weight: 600;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.project-card:hover .project-link {
    color: var(--accent-color);
}

/* =========================================
   7. SERVICES SECTION
   ========================================= */
.services-section {
    /* We use the slightly darker off-white here to create a visual break from the pure white Hero section */
    background-color: var(--surface-color); 
    padding: 100px 5%;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background-color: var(--bg-color); /* Pure white cards on the off-white background */
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* UI/UX Hover Effect */
.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 70, 229, 0.4); /* The border glows with your Indigo brand color */
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--text-main);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.service-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* =========================================
   8. ABOUT SECTION
   ========================================= */
.about-section {
    background-color: var(--bg-color); /* Back to pure white */
    padding: 100px 5%;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text .section-title {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 25px;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.resume-btn {
    display: inline-block;
    margin-top: 10px;
}

.about-skills {
    flex: 1;
    background-color: var(--surface-color);
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.about-skills h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 25px;
}

.skills-wrapper {
    display: flex;
    flex-wrap: wrap; /* Allows tags to wrap to the next line */
    gap: 15px;
}

.skill-tag {
    background-color: var(--bg-color);
    color: var(--accent-color);
    padding: 10px 20px;
    border-radius: 30px; /* Pill shape */
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(79, 70, 229, 0.2);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(79, 70, 229, 0.2);
}

/* Make it stack neatly on smaller screens */
@media (max-width: 900px) {
    .about-container {
        flex-direction: column;
    }
}

/* =========================================
   9. CONTACT & FOOTER SECTION
   ========================================= */
.footer-section {
    background-color: var(--text-main); /* Uses the deep slate grey to anchor the page */
    color: #ffffff;
    text-align: center;
    padding: 100px 5% 30px;
    margin-top: 50px;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto 80px;
    padding-bottom: 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* A subtle divider line */
}

.contact-container h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.contact-container p {
    font-size: 1.2rem;
    color: #cbd5e1; /* Soft, readable light grey */
    margin-bottom: 40px;
}

/* A custom button just for the dark footer */
.inverted-btn {
    display: inline-block;
    background-color: #ffffff;
    color: var(--text-main);
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.inverted-btn:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.95rem;
    color: #94a3b8;
}

.social-links {
    display: flex;
    gap: 25px;
}

.social-links a {
    color: #94a3b8;
    font-weight: 500;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffffff;
}

/* Stack the footer nicely on mobile */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}

/* =========================================
   10. MOBILE RESPONSIVENESS & HAMBURGER
   ========================================= */

/* --- Default Hamburger Styles (Hidden on Desktop) --- */

@media (max-width: 768px) {
    /* FIX: Show the burger icon on mobile */
    .burger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 1100; /* Keeps it above the menu */
        position: relative;
    }

    .burger span {
        width: 30px;
        height: 3px;
        background-color: var(--text-main); /* Matches light/dark mode */
        border-radius: 3px;
        transition: 0.3s ease;
    }

    /* FIX: Animation for the 'X' when active */
    .burger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .burger.active span:nth-child(2) {
        opacity: 0;
    }
    .burger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* FIX: Ensure Nav Links are hidden off-screen properly */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; 
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 1050;
    }

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 101; 
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease;
}


.mobile-only {
    display: none; /* Hide the extra Hire Me link on desktop */
}

/* --- Mobile Phone Rules (Screens smaller than 768px) --- */
@media (max-width: 768px) {
    
    /* 1. Hamburger Menu Activation */
    .hamburger { display: flex; }
    .desktop-cta { display: none; } /* Hide the normal button to save space */
    .mobile-only { display: block; margin-top: 20px; }

    /* The Slide-In Mobile Menu */
    @media (max-width: 768px) {
    /* FIX: This removes the white block and ensures the menu slides in correctly */
    .nav-links {
        position: fixed; /* Changed from absolute to fixed for a true overlay */
        top: 0;
        right: -100%; /* Keeps it fully hidden off-screen */
        width: 100%; /* Full screen width to prevent the side-gap */
        height: 100vh;
        background-color: var(--bg-color); /* Automatically matches light/dark theme */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 1050; /* Ensures it sits on top of everything */
    }

    /* When the menu is toggled open */
    .nav-links.active {
        right: 0;
    }

    /* FIX: Ensure links are large and visible on phone screens */
    .nav-links a {
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--text-main);
    }
    
    /* Ensure the logo and toggle don't get covered by the white block */
    .navbar {
        width: 100%;
        position: relative;
        z-index: 1100;
    }
}

    /* Animate Hamburger into an "X" */
    .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* 2. Scale down large typography */
    .hero-text h1 { font-size: 2.8rem; }
    .subtitle { font-size: 1.4rem; }
    .section-header h2, .about-text .section-title { font-size: 2.2rem; }
    .contact-container h2 { font-size: 2rem; }

    /* 3. Adjust Section Padding (Less empty space on phones) */
    .hero, .services-section, .work-section, .about-section, .footer-section { 
        padding: 60px 5%; 
    }

    /* 4. Stack the Hero Section (Text on top, Image on bottom) */
    .hero { 
        flex-direction: column; 
        text-align: center; 
        gap: 40px; 
        min-height: auto; 
        padding-top: 142px;
    }
    .hero-text p { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; flex-wrap: wrap; }
    
    .hero-image-container { justify-content: center; width: 100%; }
    .profile-pic { width: 320px; }
    .image-backdrop { display: none; } /* Hide backdrop shadow box to prevent scrolling glitches */

    /* 5. Force grids to a single column */
    .project-grid, .services-grid { grid-template-columns: 1fr; }

    /* 6. Center the About Section */
    .about-container { flex-direction: column; text-align: center; }
    .skills-wrapper { justify-content: center; }
    .about-skills { padding: 30px 20px; width: 100%; }

    /* 7. Footer Adjustments */
    .inverted-btn { width: 100%; } /* Massive, easily tappable button */
    .contact-container { padding-bottom: 50px; margin-bottom: 50px; }
    .footer-bottom { flex-direction: column; gap: 20px; }
}

.contact-section {
    padding: 8rem 10%;
    background-color: var(--primary-bg);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.contact-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin: 20px 0;
}

.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input, .contact-form textarea {
    background: #252525;
    border: 1px solid #333;
    padding: 15px;
    color: white;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

.theme-btn {
    background: none;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.theme-btn:hover {
    transform: scale(1.1);
    background-color: rgba(79, 70, 229, 0.1);
}

/* --- PREMIUM IMAGE HOVER --- */
.hero-image-container {
    perspective: 1000px; /* Adds depth for the 3D effect */
}

.profile-pic {
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); /* Ultra-smooth timing */
    cursor: pointer;
}

.profile-pic:hover {
    transform: scale(1.03) translateY(-10px); /* Lifts and grows slightly */
    box-shadow: 0 30px 60px rgba(79, 70, 229, 0.2); /* Soft indigo glow */
    filter: brightness(1.05); /* Subtle lighting boost */
}

/* Add a slight pulse to the backdrop in dark mode */
body.dark-mode .image-backdrop {
    transition: 0.6s;
}

.hero-image-container:hover .image-backdrop {
    transform: translate(10px, 10px);
    opacity: 0.2;
}

@media (max-width: 768px) {
    /* 1. The Smart Navbar Wrapper */
    header {
        transition: transform 0.4s ease-in-out; /* For the disappear effect */
        width: 100%;
        position: fixed;
    }

    /* Class to hide the navbar via JavaScript */
    .nav-hidden {
        transform: translateY(-100%);
    }

    /* 2. The Sleek 30% Mobile Sidebar */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden by default */
        width: 30%;   /* Professional 30% width */
        min-width: 250px; /* Ensures it doesn't get TOO thin on small phones */
        height: 100vh;
        background-color: var(--nav-bg);
        backdrop-filter: blur(15px); /* Premium frosted glass */
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.2);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0; /* Slides in to show 30% of screen */
    }
}
@media (max-width: 768px) {
    /* 1. Force the Contact Container to stack and fill the screen */
    .contact-container {
        display: flex;
        flex-direction: column; /* Stacks text and form vertically */
        gap: 40px;
        width: 100%;
        padding: 0 5%; /* Adds a tiny bit of breathing room on the edges */
    }

    /* 2. Make the Text and Form both 100% wide */
    .contact-text, 
    .contact-form {
        width: 100% !important;
        max-width: 100%;
        margin: 0;
    }

    /* 3. Fix the Services and Project grids to be one column */
    .services-grid, 
    .project-grid {
        grid-template-columns: 1fr !important; /* Forces one card per row */
        width: 100%;
    }

    /* 4. Ensure the About section image and text also stack */
    .about-container {
        flex-direction: column;
        text-align: center;
    }
}

.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg-color);
}

.success-page h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .success-page h1 { font-size: 2.5rem; }
    .success-actions .hero-buttons { flex-direction: column; }
}

/* Ensure the button has a smooth transition */
.btn {
    transition: all 0.3s ease;
}

/* Fix for the "View My Work" (Primary) Button */
.primary-btn:hover {
    background-color: #fff !important; /* The white background you have now */
    color: #4f46e5 !important;        /* Changes text to your brand blue */
    border: 1px solid #4f46e5;       /* Adds a border so it doesn't "disappear" */
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2); /* Soft glow effect */
}

/* Fix for general links that turn blue to white */
a:hover {
    color: #4f46e5; /* Or any dark color so it stays visible against white */
}

/* --- TECH STACK BADGES FOR PROJECT CARDS --- */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.tech-stack span {
    background-color: var(--surface-color);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

/* Make sure they look sharp in Dark Mode */
body.dark-mode .tech-stack span {
    border-color: rgba(255, 255, 255, 0.1);
}

.tech-stack span:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

/* --- NEW LOGO STYLES --- */
.nav-logo {
    height: 70px; /* Increased from 45px to make it much bigger */
    width: auto;
    transition: all 0.3s ease;
    display: block; 
}

.logo-link:hover .nav-logo {
    opacity: 0.8;
    transform: scale(0.98); /* Subtle click effect */
}

/* THE DARK MODE FIX: Adds a clean white background pill behind the logo so the dark text stays readable */
body.dark-mode .nav-logo {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 4px 8px; /* Slightly thinner padding so the logo takes up maximum space */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* =========================================
   PAGINATION STYLES
   ========================================= */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px; /* Gives breathing room below the grid */
}

.page-btn {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--accent-color);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

.page-btn:disabled {
    border-color: var(--text-muted);
    color: var(--text-muted);
    opacity: 0.4;
    cursor: not-allowed;
}

#page-info {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.1rem;
}