/* Dark Mode Gradient Theme with Grainy Effect */
:root {
    --font-main: 'Poppins', sans-serif;
    --text-color: #e0e0e0;
    --nav-bg: rgba(30, 30, 30, 0.9);
    --border-color: #333;
    --primary-gradient: linear-gradient(90deg, #64b5f6, #e57373);
    --social-icon-color: white;
    --footer-bg: rgba(15, 15, 15, 0.6);
}

/* Ensure Navbar Styling is Applied to All Pages */
body {
    font-family: var(--font-main);
    color: var(--text-color);
    margin: 0;
    padding: 80px 0 0; /* Ensure content is not hidden under navbar */
    text-align: center;
    background: radial-gradient(circle at top, #2c2c3e, #1e1e2f);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    cursor: url('/assets/images/cursor2.png') 16 16, auto;
}


/* Apply a fine grain texture using CSS - Per Page Background */
.index-page::before, 
.projects-page::before, 
.resume-page::before, 
.contact-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

/* Unique background gradients per page */
.index-page::before {
    background: radial-gradient(circle at top, #3b3b5f, #1e293b);
}

.projects-page::before {
    background: radial-gradient(circle at top, #5a3794, #1b142f);
}


.resume-page::before {
    background: radial-gradient(circle at top, #3b5f5a, #1e293b);
}

.contact-page::before {
    background: radial-gradient(circle at top, #914646, #2e1e1e);
}


/* Noise Effect Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/asfalt-light.png'); /* Use a fine noise texture */
    opacity: 0.9999; /* Adjust intensity */
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: soft-light; /* Helps blend better with the gradient */
}


/* Enhanced Navigation Bar for All Pages */
header {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background 0.3s ease-in-out;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px; /* Increase if necessary */
    width: 100%;
    margin: auto;
    padding: 15px 20px;
    flex-wrap: nowrap; /* Prevents items from squeezing */
    overflow: visible; /* Allows items to fully render */
}


.nav-links a {
    position: relative;
    text-decoration: none;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: #64b5f6;
    transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    transition: text-shadow 0.3s ease-in-out;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: #64b5f6; /* Light blue underline */
    transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

/* Enhanced glow effect */
.nav-links a:hover {
    text-shadow: 0px 0px 15px rgba(100, 181, 246, 0.9), 
                 0px 0px 25px rgba(100, 181, 246, 0.7);
}


.footer {
    position: fixed;
    bottom: 15px;
    left: 15px;
    font-size: 12px;
    color: #e0e0e0; /* Slightly brighter text */
    opacity: 0.9;
    background: rgba(20, 20, 20, 0.85); /* A slightly darker, richer black */
    padding: 8px 20px; /* More padding for breathing room */
    border-radius: 12px; /* Softer, rounded edges */
    white-space: nowrap;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3); /* Adds subtle depth */
    transition: transform 0.2s ease-in-out, opacity 0.3s;
}

.footer:hover {
    transform: scale(1.02); /* Slight hover effect for interaction */
    opacity: 1; /* More visibility on hover */
}

.footer a {
    color: #64b5f6; /* Light blue to match branding */
    text-decoration: none;
    font-weight: bold;
}

.footer a:hover {
    text-decoration: underline;
    color: #90caf9; /* Slightly lighter blue on hover */
}

/* Hide the mobile footer by default */
.mobile-footer {
    display: none;
}

/* Show the mobile footer and hide the desktop footer on small screens */
@media (max-width: 768px) {
    .mobile-footer {
        display: block;
    }

    .desktop-footer {
        display: none;
    }
}


@media (max-width: 768px) {
    .footer {
        position: relative !important; /* Keeps it part of normal content flow */
        bottom: unset !important; /* Removes forced fixing */
        left: auto !important; /* Centers naturally within page */
        width: auto !important; /* Prevents stretching across the whole page */
        max-width: 90%; /* Ensures floating effect without being too wide */
        padding: 10px 15px;
        text-align: left;
        border-radius: 12px; /* Keeps floating look */
        background: rgba(20, 20, 20, 0.85);
        box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
        margin: 20px auto; /* Pushes it below content and centers it */
        word-wrap: break-word !important; /* Forces text wrapping */
        white-space: normal !important; /* Ensures text does not overflow */
    }

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh; /* Ensures full height so footer isn't stuck mid-page */
    }

    main {
        flex: 1; /* Ensures footer appears at the bottom of content */
    }
}


/* Fancy effect ONLY on homepage */
.home-logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(90deg, #64b5f6, #e57373, #85f9c1);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 3s ease-in-out infinite;
}

/* Normal text on other pages */
.logo {
    font-size: 24px;
    font-weight: bold;
    color: white; /* Make it plain white */
    text-decoration: none;
}



.home-logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(90deg, #64b5f6, #e57373, #85f9c1);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-right: 2px solid white; /* Simulates a blinking cursor */
    white-space: nowrap;
    overflow: visible;
    width: auto;
    display: inline-block;
    padding: 5px 10px;
    animation: typing 2s steps(12, end) forwards, blink 0.8s infinite steps(2, start), gradientText 3s ease-in-out infinite 2s, removeCursor 3.5s forwards 3s;
}

@keyframes typing {
    from { width: 0; }
    to { width: 190px; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

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

@keyframes removeCursor {
    to { border-right: none; }
}

.home-logo {
    text-decoration: none;
}

.logo:hover {
    text-shadow: 0px 0px 5px rgba(100, 181, 246, 0.7), 
                 0px 0px 8px rgba(100, 181, 246, 0.4);
}


.nav-links {
    list-style: none !important;
    display: flex;
    gap: 25px;
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 15px;
    transition: color 0.3s ease-in-out;
    position: relative;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        cursor: pointer;
        z-index: 1100; /* Ensure it's above other elements */
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        text-align: center;
        padding: 15px 0;
        border-radius: 10px;
        z-index: 1000; /* Ensure it's above other elements */
    }

    .nav-links a {
        padding: 10px;
        display: block;
    }

    /* This ensures the menu appears when toggled */
    .nav-links.active {
        display: flex !important;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.9);
        z-index: 1000;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
}

.landing-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    width: 100%;
    max-width: 1200px;
    margin: 0px auto 0;
    padding: 10px;
    text-align: left;
}

.open-to-work-container {
    display: flex;
    justify-content: center; /* Centers it horizontally */
    align-items: center; 
    margin-top: 10px; /* Adds space below the profile pic */
    width: 100%;
}

.neon-sign {
    transform: translateX(-20px); /* Moves left by 20px */
}


.neon-sign {
    font-family: 'Press Start 2P', serif;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    color: #32CD32; /* Neon green */
    text-shadow: 0 0 5px #32CD32, 0 0 10px #32CD32, 0 0 20px #228B22, 0 0 40px #228B22;
    animation: flicker 1.5s infinite alternate, neon-glow 1s infinite alternate;
    text-align: center;
    margin-right: 50px;
}

@media (max-width: 768px) {
    .open-to-work-container {
        display: flex;  
        justify-content: center; /* Centers horizontally */
        align-items: center; /* Centers vertically */
        text-align: center; /* Ensures text stays centered */
    }

    .neon-sign {
        display: block;
        margin: 0 auto; /* Forces centering */
        text-align: center; /* Ensures the text inside is centered */
        transform: translateX(0px); /* Moves left by 20px */
    }
}


/* Flickering Effect */
@keyframes flicker {
    0% { opacity: 0.2; text-shadow: 0 0 5px #32CD32, 0 0 10px #32CD32, 0 0 20px #228B22, 0 0 40px #228B22; }
    10% { opacity: 1; }
    20% { opacity: 0.6; }
    30% { opacity: 1; }
    40% { opacity: 0.8; }
    50% { opacity: 1; }
    60% { opacity: 0.4; }
    70% { opacity: 1; }
    80% { opacity: 0.9; }
    90% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Subtle Neon Glow */
@keyframes neon-glow {
    from { text-shadow: 0 0 10px #32CD32, 0 0 20px #228B22, 0 0 30px #32CD32; }
    to { text-shadow: 0 0 15px #32CD32, 0 0 25px #228B22, 0 0 35px #32CD32; }
}


@media (max-width: 768px) {
    .landing-container, 
    .contact-container {
        margin: 5px; /* Reduce the gap */
    }
}


* {
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: visible;
}


.headshot {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    margin-right: 30px;
}

@media (max-width: 768px) {
    .landing-container {
        flex-direction: column; /* Stack elements vertically */
        text-align: center; /* Center align text */
        padding: 20px;
    }

    .headshot {
        width: 120px; /* Slightly smaller for mobile */
        height: 120px;
        margin: 0 auto 15px; /* Center and add space below */
    }

    .bio {
        max-width: 100%; /* Allow text to expand */
    }
}


.bio {
    max-width: 600px;
}

.bio h1 {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    margin-bottom: 10px;
}

.highlights {
    list-style: circle;
    padding: 5;
    margin-top: 10px;
}

.highlights li {
    font-size: 1.1rem;
    margin: 5px 0;
}


.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    color: var(--social-icon-color) !important;
    transition: color 0.3s;
    font-size: 1.8rem;
}

.social-icons a:hover {
    color: #64b5f6 !important;
}

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

.gradient-text {
    background: linear-gradient(90deg, #7FC8A9, #74b9ff, #a29bfe, #ff7675);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    font-size: 2em;
}


/* Resume Page styling */

.download-button.enhanced {
    display: inline-block;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    background: linear-gradient(135deg, #7fc8f8, #0056b3);
    padding: 10px 16px;
    border-radius: 6px;
    color: white;
    transition: all 0.3s ease;
}

.download-button.enhanced:hover {
    background: linear-gradient(135deg, #0056b3, #003366);
    transform: scale(1.05);
}

.timeline-entry {
    display: grid;
    grid-template-columns: 150px auto; 
    align-items: center;
    position: relative;
    margin-bottom: 40px;
    width: 100%; 
    max-width: 1500px; 
    overflow: visible;
}

.timeline-bar {
    width: 6px;
    height: calc(100% + 20px);
    border-radius: 4px;
    position: absolute;
    left: 0;
    opacity: 1;
}

.timeline-entry:nth-child(1) .timeline-bar, 
.timeline-entry:nth-child(1) .timeline-date, 
.timeline-entry:nth-child(1) .timeline-content { background: rgba(85, 239, 196, 0.2); } 

.timeline-entry:nth-child(2) .timeline-bar, 
.timeline-entry:nth-child(2) .timeline-date, 
.timeline-entry:nth-child(2) .timeline-content { background: rgba(100, 181, 246, 0.2); } 

.timeline-entry:nth-child(3) .timeline-bar, 
.timeline-entry:nth-child(3) .timeline-date, 
.timeline-entry:nth-child(3) .timeline-content { background: rgba(177, 85, 239, 0.2); }

.timeline-entry:nth-child(4) .timeline-bar, 
.timeline-entry:nth-child(4) .timeline-date, 
.timeline-entry:nth-child(4) .timeline-content { background: rgba(255, 118, 117, 0.2); }

.timeline-entry:nth-child(5) .timeline-bar, 
.timeline-entry:nth-child(5) .timeline-date, 
.timeline-entry:nth-child(5) .timeline-content { background: rgba(97, 234, 131, 0.25); }

.timeline-date {
    color: white;
    padding: 8px 14px;
    border-radius: 0 6px 6px 0; 
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    width: 140px; 
    position: relative;
    z-index: 2; 
    margin-left: 6px; 
    white-space: pre-line;
}

.timeline-content {
    width: 100%;
    max-width: 900px; 
    padding: 20px;
    border-radius: 8px;
    margin: 0 auto 0 20px; 
    flex-grow: 1;
    overflow-y: auto; 
    max-height: 100%; 
}


.timeline-content h3 {
    width: 100%; 
    text-align: center; 
}

.timeline-content h3 {
    margin: 0 auto; 
}

.timeline-content {
    clip-path: inset(0 round 8px);
}


.company-info {
    width: 100%; 
    display: flex;
    justify-content: center; 
    align-items: center;
    flex-direction: column; 
}

.company-info h3 {
    display: flex;
    justify-content: center; 
    align-items: center;
    flex-grow: 1; 
}

.company-logo {
    width: 150px; /* Set a reasonable fixed width */
    height: auto; /* Maintain aspect ratio */
    max-height: 80px; /* Prevents it from being too tall */
    object-fit: contain;
}

.timeline-content ul {
    list-style-type: circle;
}



/* Fix role info alignment */
.role-info {
    text-align: left;
}

.contract-details {
    font-size: 0.9em; /* Slightly smaller than normal text */
    color: rgba(255, 255, 255, 0.7); /* Lighter, muted color */
    margin-bottom: 10px;
}


/* Responsive behavior to adjust layout for larger screens */
@media (min-width: 1400px) {
    .timeline-content {
        max-width: 1100px;
    }
}



/* contact form styling */

/* 🔹 Contact Page - Two Column Layout */
.contact-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 10px 20px;
    margin: 15px;
}

@media (max-width: 768px) {
    .contact-container {
        margin-top: 5px !important; /* Reduce extra space */
        padding-top: 5px !important; /* Adjust for fixed navbar */
    }
}
@media (max-width: 768px) {
    header {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

@media (max-width: 768px) {
    .contact-title {
        margin-top: 10px !important; /* Reduce excess spacing */
    }
}


/* 🔹 Flexbox: Form Left, Cards Right */
.contact-content {
    display: flex;
    width: 100%;
    max-width: 1000px;
    gap: 40px;
    justify-content: center;
}

.contact-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* Ensures centering */
    text-align: center;
    width: 100%;
}


/* Contact Form (Preserving Previous Styling) */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.12);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(15px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.8s ease-out forwards;
}

/* Form Inputs */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 16px;
}

/* Placeholder Styling */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.contact-form textarea {
    height: 120px;
}

.contact-form button {
    padding: 14px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #64b5f6, #e57373);
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-form button:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #e57373, #64b5f6);
    box-shadow: 0px 6px 15px rgba(100, 181, 246, 0.5);
}

.contact-title {
    font-size: 2.5rem;
    color: white;
    text-align: center;
    text-shadow: 0px 0px 10px rgba(100, 181, 246, 0.8);
    animation: waveText 3s infinite ease-in-out, textExpand 2s infinite alternate;
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    justify-content: center; 
}



/* Animations */
@keyframes waveText {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(10px); }
}

@keyframes textExpand {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Right Side: Contact Cards */
.contact-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Contact Cards Styling */
.contact-card {
    width: 100%;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    max-height: 100%;;
    border-radius: 12px;
    text-align: center;
    color: white;
    text-decoration: none;
    font-weight: bold;
    backdrop-filter: blur(15px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-card svg {
    margin-bottom: 2px; 
}

.contact-card h2 {
    margin-bottom: 1px;
}

.contact-card p {
    margin-bottom: 5px;
}


/* 🔹 Default Icon Colors */
.contact-card svg {
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 5px;
    transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* 🔹 Individual Icon Colors */
.contact-card[href*="linkedin"] svg {
    color: #5A8FCC; /* Softer blue */
}

/* 🔹 Hover Colors */
.contact-card:hover[href*="linkedin"] svg {
    color: #3B5998; /* Darker LinkedIn blue */
}

.contact-card[href*="mailto"] svg {
    color: #D4AF37; /* Soft gold */
}

.contact-card:hover[href*="mailto"] svg {
    color: #B8860B; /* Deeper gold for hover */
}


.contact-card[href*="calendly"] svg {
    color: #43D6A6; /* Soft teal */
}

.contact-card:hover[href*="calendly"] svg {
    color: #2A9D8F; /* Deeper teal */
}



/* 🔹 Hover Effects */
.contact-card:hover {
    transform: scale(1.05);
    box-shadow: 0px 10px 30px rgba(100, 181, 246, 0.5);
}

.contact-card:hover i {
    color: #e57373;
    transform: scale(1.1);
}

/* 🔹 Subtle Border Effect */
.contact-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #64b5f6, #e57373);
    z-index: -1;
    border-radius: 12px;
    opacity: 0.3;
    transition: opacity 0.3s;
}

/* Hover Effect on Border */
.contact-card:hover::before {
    opacity: 1;
}

/* 🔹 Fade-in Animation */
.contact-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 0.8s ease-out forwards;
}

/* Staggered Fade-in Delay */
.contact-card:nth-child(1) { animation-delay: 0.2s; }
.contact-card:nth-child(2) { animation-delay: 0.4s; }
.contact-card:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 🔹 Responsive Adjustments */
@media (max-width: 768px) {
    .contact-content {
        flex-direction: column;
        align-items: center;
    }

    .contact-form-container,
    .contact-cards {
        width: 100%;
        align-items: center;
    }

    .contact-form {
        max-width: 100%;
    }

    .contact-card {
        max-width: 90%;
    }
}

/* Projects Page */
.under-construction-container {
    display: flex;
    justify-content: center; /* Centers the text */
    align-items: center;
    margin-top: 20px; /* Adjust position */
    width: 100%;
}

/* Customizing the neon effect for 'Under Construction' */
.under-construction-container .neon-sign {
    font-size: 28px;
    font-family: 'Press Start 2P', serif;
    font-weight: bold;
    text-transform: uppercase;
    color: #e44506; 
    text-shadow: 0 0 5px #FFA500, 0 0 10px #FF8C00, 0 0 20px #FF4500, 0 0 40px #FF4500;
    text-align: center;
}


/* Projects Page */
/* Project Page styling */

.projects-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 20px;
}

.projects-container {
    margin-top: 30px; /* Adjust this value if needed */
}


.hero {
    text-align: center;
    margin-bottom: 40px;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);  /* Subtle transparent background */
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); /* Soft shadow for contrast */
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    bottom: 0; /* Move to bottom corner */
    right: 0; /* Keep aligned to right */
    width: 40px;
    height: 40px;
    background: linear-gradient(-45deg, #ffffff 50%, transparent 50%); /* Flip orientation */
    border-bottom-right-radius: 8px; /* Adjust for bottom corner */
    box-shadow: none;
}

.project-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.project-inner img {
    width: 50%;          /* Image on the left */
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

.project-text {
    width: 45%;          /* Text on the right */
    padding: 20px;
    text-align: left;
    color: #f0f0f0;
}

.project-text h2 {
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.project-text p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.project-text a {
    display: inline-block;
    margin: 10px 0;
    text-decoration: none;
    color: #64b5f6;
    font-weight: bold;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    .project-inner {
        flex-direction: column;    /* Stacks on small screens */
        text-align: center;
    }

    .project-inner img, .project-text {
        width: 100%;             /* Full width on small screens */
    }
}

.project-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(-45deg, #ffffff 50%, transparent 50%);
    border-bottom-right-radius: 8px;
    box-shadow: none;
    transform: rotateY(0deg);
    transform-style: preserve-3d;
    transition: transform 0.8s;
}

/* Flip animation on click */
.project-card {
    perspective: 1000px;
    cursor: pointer;
}

.project-inner {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s;
}

.project-card.flipped .project-inner {
    transform: rotateY(180deg);
}

.project-card.flipped::after {
    right: auto; /* Remove right positioning */
    left: 0;      /* Move to bottom left */
    transform: scaleX(-1); /* Mirror the fold horizontally */
}



.project-front, .project-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    z-index: 2;
    transform: rotateY(0deg); 
    border-radius: 15px;
}

.project-front img, .project-back img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

.project-front h2, .project-back h2 {
    font-size: 1.8rem;
    color: #e0e0e0;
    margin-bottom: 15px;
}

.project-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(46, 46, 79, 0.97), rgba(30, 30, 47, 0.97));
    color: #f0f0f0;
    padding: 0;          /* Match .project-card padding */
    margin: 0;           /* Match .project-card margin */
    border-radius: 15px; /* Keep border radius same */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transform: rotateY(180deg);
    overflow: hidden;    /* Prevents content from overflowing */
}


.project-back p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.project-back a {
    display: inline-block;
    margin: 10px;
    text-decoration: none;
    color: #64b5f6;
    font-weight: bold;
    transition: color 0.3s ease;
}

.project-back a:hover {
    color: #90caf9;
}