body {
    background: linear-gradient(to right, #3f9fff, #5fffc2);
    min-height: 100vh;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    /* Ensure no horizontal scroll */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

/* Ensure smooth scrolling for anchors if Tailwind doesn't catch it immediately */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideInUp 1s ease-out both;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.home-section {
    position: relative;
    background-image: url('../assets/avatar.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 2px 2px 4px rgb(7, 255, 201, 0.5);
    padding: 2rem;
}

/* Overlay for better readability */
.home-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    /* Dark overlay */
    z-index: 1;
}

.home-section>* {
    position: relative;
    z-index: 2;
    /* Place content above overlay */
}

/* Remove default display for specific sections if needed */
/* Remove default display for specific sections if needed */
/* #message-us-page styling handled by Tailwind in HTML */

@media (max-width: 768px) {
    #nav-menu {
        display: none;
        /* Ensure it's hidden by default on mobile if Tailwind hidden fails for some reason */
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 100;
    }

    #nav-menu.active {
        display: flex !important;
    }

    .home-section {
        min-height: 100vh;
        background-attachment: scroll;
    }

    /* Hamburger Animation */
    #menu-toggle.open span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    #menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    #menu-toggle.open span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }
}

.logo {
    height: 75px;
    width: 75px;
    background-color: transparent;
    border-radius: 50%;
    background-image: url(../assets/logo.png);
    background-size: cover;
}

/* Portfolio Section Styles */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background: white;
    border-radius: 0.75rem;
    /* Initial shadow */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

/* Scroll Reveal Animation Classes */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Nav Underline Animation */
.nav-underline {
    position: absolute;
    bottom: -0.25rem;
    left: 0;
    width: 0;
    height: 0.125rem;
    background-color: blue;
    transition: all 0.3s ease-in-out;
}

.group:hover .nav-underline {
    width: 100%;
}