body {
    min-height: 100vh;
    margin: 0;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #f2fefe;
    transition: background 0.1s ease-out;
    background-image: linear-gradient(45deg, #ffffff, #f2fefe); /* Initial gradient */
    animation: moveGradient 10s ease infinite; /* Animated background gradient */
}

main {
    padding-left: 30px;
    padding-right: 30px;
    scroll-behavior: smooth; /* Smooth scrolling */
}


header {
    padding-left: 30px;
    padding-right: 30px;
    scroll-behavior: smooth; /* Smooth scrolling */
}

/* General Heading and Paragraph Styling */
h1, h2, h3, h4, h5, h6, p {
    font-family: 'fenwick', sans-serif;
    margin: 0;
    font-weight: normal; /* Resets any font weight styling */
}

/* Specific Heading Styles */
h1 {    
    font-size: 64px;
    font-weight: 700;
}

h2 {
    font-size: 28px;
    font-weight: 700;
}

h3 {    
    font-size: 20px;
    font-weight: 300;
}

h4 {    
    font-size: 24px;
    font-weight: 700;
}

h5 {
    font-size: 18px;
    font-weight: 300;
    margin: 0;
    pointer-events: auto; /* Allow interaction on the text */
}

h6 {    
    font-size: 16px;
    font-weight: 800;
}

p { 
    font-size: 12px;
    font-weight: 300;
}

a {
    text-decoration: none; /* Removes underline from links */
}

/* Fullscreen Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #BBF9FF, #f2fefe, #d8f3f3);
    background-size: 300% 300%;
    animation: moveGradient 8s infinite ease-in-out;
    z-index: 9999;
    transition: opacity 1s ease-out, transform 0.8s ease-out;
}

/* Gradient Animation */
@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Logo */
.loading-logo {
    width: 120px;
    height: 120px;
    opacity: 0.9;
    animation: fadeIn 1.5s ease-in-out infinite alternate;
}

/* Logo Fade Animation */
@keyframes fadeIn {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Fade Out Effect */
.hide {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}





/*nav Bar*/
.navlogo {
    height: 50px;
    display: inline-block;
    background-color: transparent;
}

/* Sticky Navbar */
.navbar {
    width: 100%;
    padding-top: 20px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 2px;
    background-color: black;
    z-index: -1;
}

/* Animations */
.nav-link {
    font-size: 1.25rem;
    color: black;
    text-decoration: none;
    font-weight: 400;
}


/* About link underline effect */
#about-link {
    position: relative;
    text-decoration: none;
    display: inline-block;
}

#about-link::after {
    content: "";
    position: absolute;
    left: 10%; /* Starts slightly from the left */
    bottom: -3px; /* Adjusts the spacing below the text */
    width: 0;
    height: 2px;
    background-color: black;
    transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}

#about-link:hover::after {
    width: 100%; /* Expands fully */
    left: 0; /* Moves back to align with text */
}








/*toptop*/
.headhead { 
    padding-top: 20px;
    padding-bottom: 10px;
}








/* Landing Image */
.landingimg {   
    width: 100%; /* Ensures the image spans the container's width */
    height: auto; /* Maintains aspect ratio */
    max-width: 100%; /* Prevents it from exceeding the container's size */
    max-height: 500px; /* Sets a maximum height for large screens */
    object-fit: cover; /* Ensures the image fits nicely within the max height */
    display: block; /* Removes inline element spacing issues */
    margin: 0 auto; /* Centers the image horizontally */
}

.title {
    padding-top: 2rem;
    padding-bottom: 10px;
}

/* Styling for Services Section */
.services {
    display: flex; /* Enables Flexbox layout */
    flex-wrap: wrap; /* Allows wrapping if the row becomes too wide */
    gap: 1rem; /* Adds consistent spacing between items */
    list-style: none; /* Removes any default list styling (if applicable) */
}

.services p {
    margin: 0; /* Removes any default paragraph margins */
    font-family: 'fenwick', sans-serif; /* Matches your font style */
}



.one {  
    padding-top: 4rem;
}






/*first grid*/
/* Image Grid Styling */
.image-grid {
    padding-top: 3rem;
    display: flex; /* Enables Flexbox layout */
    flex-wrap: wrap; /* Allows items to wrap to the next line */
    gap: 1rem; /* Adds space between images */
    justify-content: center; /* Centers the grid content horizontally */
}

.image-grid img {
    width: calc(50% - 0.5rem); /* Each image takes 50% of the row minus gap space */
    max-width: 100%; /* Ensures images don't exceed their container */
    height: auto; /* Maintains aspect ratio */
    object-fit: cover; /* Ensures images fit nicely */
}










/* Project navigation container */
.project-links {
    padding: 2rem 0;
    display: flex;
    justify-content: right;
    width: 100%;
}

/* Styling for each link */
.project-links a {
    text-decoration: none;
    color: black;
    font-family: 'fenwick', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    flex-direction: row; /* Keeps content and arrow horizontally aligned */
    align-items: center;
    gap: 15px; /* Adds space between the text and chevron */
}


/* Right-aligned for the second link */
.right-link {
    text-align: right;
    justify-content: flex-end; /* Align content to the right */
}

/* Content section for text (heading and project name) */
.link-content {
    display: flex;
    flex-direction: column;
}

/* Project Heading */
.next {
    font-size: 13px;
    margin: 0;
}

/* Project Name */
.nextp {
    font-size: 10px;
    margin: 0;
}

/* Chevron arrow styling */
.chevron-arrow {
    display: flex;
    align-items: center;
    height: 100%; /* Matches text height */
}

/* SVG inside the chevron - Increased size */
.chevron-arrow svg {
    width: 40px; /* Increased size */
    height: 40px; /* Increased size */
    fill: black;
}

/* Right Chevron Arrow */
.right-chevron svg {
    width: 40px; /* Chevron arrow size */
    height: 40px;
    fill: black;
}

/* Hover effect for both links */
.project-links a:hover {
    cursor: pointer; /* Change cursor to indicate hover */
}

/* Shaking effect for right arrow */
.right-link:hover .right-chevron svg {
    animation: right-shake 0.5s ease-in-out 1; /* Right arrow shake animation */
}

/* Shaking effect for text */
.project-links a:hover .link-content {
    animation: text-shake 0.5s ease-in-out 1; /* Text shake animation */
}

/* Left arrow shaking animation (translation only) */
@keyframes left-shake {
    0% { transform: translateX(0px); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0px); }
}

/* Right arrow shaking animation (translation only) */
@keyframes right-shake {
    0% { transform: translateX(0px); }
    20% { transform: translateX(5px); } /* Reversed translation direction */
    40% { transform: translateX(-5px); }  /* Reversed translation direction */
    60% { transform: translateX(5px); }  /* Reversed translation direction */
    80% { transform: translateX(-5px); }  /* Reversed translation direction */
    100% { transform: translateX(0px); }
}

/* Styling for the right chevron arrow */
.right-chevron-icon {
    width: 40px; /* Chevron arrow size */
    height: 40px;
    fill: black;
    /* Remove the transform: rotate(180deg); here to stop the flipping on hover */
}

/* Remove any additional rotation on hover */
.right-link:hover .right-chevron-icon {
    animation: right-shake 0.5s ease-in-out 1; /* Apply shake animation */
    transform: none; /* Make sure no rotation happens */
}


/* Text shaking animation */
@keyframes text-shake {
    0% { transform: translateX(0px); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0px); }
}









/*fades*/
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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















/*footer*/
footer {
    background-color: #070A11;
    color: white; /* Ensures all text inside the footer is white */
    margin: 0;
    padding-left: 30px;
    padding-right: 30px;
    padding-top: 4rem;
}

.footer {
    padding-bottom: 20rem; /* Adds 30rem space at the bottom of the .footer class */
    font-family: 'fenwick', sans-serif;
    font-size: 48px;
    font-weight: 700;
}

.linkdin {  
    padding-bottom: 20px;
    transition: text-shadow 0.3s ease, color 0.3s ease; /* Smooth transition for glow effect */
}

.lindkin :hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
    0 0 20px rgba(255, 255, 255, 0.6), 
    0 0 30px rgba(255, 255, 255, 0.4); /* Create a glowing effect */
    color: #f2fefe; /* Optional: Slightly change text color for more emphasis */
}

.email {    
    padding-bottom: 3rem;
    transition: text-shadow 0.3s ease, color 0.3s ease; /* Smooth transition for glow effect */
}

footer a {
    color: white; /* Ensures links are white */
    text-decoration: none; /* Remove default underline */
    transition: text-shadow 0.3s ease, color 0.3s ease; /* Smooth transition for glow effect */
}   

footer a:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
                 0 0 20px rgba(255, 255, 255, 0.6), 
                 0 0 30px rgba(255, 255, 255, 0.4); /* Create a glowing effect */
    color: #f2fefe; /* Optional: Slightly change text color for more emphasis */
}

/* Parent container to center the .ed element */
.center-container {
    display: flex; /* Enables Flexbox */
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    text-align: center; /* Centers text within the container */
}

/* Styling for the .ed element */
.ed {    
    font-family: 'fenwick', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: #ccdede71;
    max-width: 85rem;
    margin: 0 auto; /* Ensures proper alignment */
    padding-bottom: 2rem;
}







@media screen and (min-width: 769px) {

    main {
        padding-left: 150px;
        padding-right: 150px;
        scroll-behavior: smooth; /* Smooth scrolling */
    }
}

@media (max-width: 1097px) {  /* Adjusts for mobile */
    
    .section, .section2 {
        flex-direction: column; /* Stack on mobile */
        padding: 1rem 0;
    }

    .section h5, .section2 h5,
    .section p, .section2 p {
        width: 100%; /* Full width on smaller screens */
        text-align: left;
    }

    .section h5::before, .section2 h5::before,
    .section p::before, .section2 p::before {
        width: 100%;
    }
}



/* Media query for desktop view */
@media screen and (min-width: 1098px) {

    main {
        padding-left: 150px;
        padding-right: 150px;
        scroll-behavior: smooth; /* Smooth scrolling */
    }

    h1 {    
        font-size: 128px;
        font-weight: 700;
    }
    
    h2 {
        font-size: 64px;
        font-weight: 700;
    }
    
    h3 {    
        font-size: 48px;
        font-weight: 300;
    }
    
    h4 {    
        font-size: 36px;
        font-weight: 700;
    }
    
    h5 {    
        font-size: 24px;
        font-weight: 300;
    }
    
    h6 {    
        font-size: 26px;
        font-weight: 700;
    }
    
    p { 
        font-size: 16px;
        font-weight: 300;
    }

    .next { 
        font-size: 26px;
    }


    .linkdin h4.footerh4, .email h4.footerh4 {     
        font-size: 24px;
        font-weight: 700;
        margin: 0;
        color: rgb(255, 255, 255);
    }

    .linkdin {  
        padding-bottom: 20px;
    }
    
    .linkdin p.footerp, .email p.footerp {   
        font-size: 12px;
        font-weight: 300;
        margin: 0;
        color: rgb(255, 255, 255);
    }

    .thegap {
        padding-left: 12rem;
        padding-top: 2rem;
    }
    
    /* Layout for each section */
    .section, .section2 {
        display: flex;
        align-items: flex-start;
        position: relative;
        justify-content: space-between;
        margin-bottom: 3rem; /* Increased spacing between sections */
        padding: 1.5rem 0; /* Added padding above and below each section */
    }
    
    /* Header (Left Side) - 35% Width */
    .section h5, .section2 h5 {
        width: 35%;
        position: relative;
        padding-top: 1rem;
        font-weight: 600;
    }
    
    /* Paragraph (Right Side) - 65% Width */
    .section p, .section2 p {
        width: 65%;
        line-height: 1.6;
        position: relative;
        padding-top: 1rem;
    }
    
    /* Thick Line Above h5 */
    .section h5::before, .section2 h5::before {
        content: "";
        position: absolute;
        top: -0.5rem; 
        left: 0;
        width: 100%;
        height: 3px;
        background: black;
    }
    
    /* Thinner Line Above the Paragraph - Now Properly Connected */
    .section p::before, .section2 p::before {
        content: "";
        position: absolute;
        top: -0.4rem; 
        left: 0;
        width: 100%;
        height: 1px;
        background: black;
    }
    
    

}