body {
    margin: 0;
    font-family: 'Mozilla Text', Arial, sans-serif; /* Use Mozilla Text for all content */
    background: #000000; /* Solid black background */
    color: #FFFFFF; /* Solid white text */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23FFF" stroke="%23000" stroke-width="1.25" d="M5.5 3.21V20.8c0 .45.54.67.85.35l4.86-4.86a.5.5 0 0 1 .35-.15h6.87a.5.5 0 0 0 .35-.85L6.35 2.85a.5.5 0 0 0-.85.35Z"></path></svg>') 0 0, auto; /* Custom cursor */
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

a {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23FFF" stroke="%23000" stroke-width="1.25" stroke-linejoin="round" d="M10 11V8.99c0-.88.59-1.64 1.44-1.86h.05A1.99 1.99 0 0 1 14 9.05V12v-2c0-.88.6-1.65 1.46-1.87h.05A1.98 1.98 0 0 1 18 10.06V13v-1.94a2 2 0 0 1 1.51-1.94h0A2 2 0 0 1 22 11.06V14c0 .6-.08 1.27-.21 1.97a7.96 7.96 0 0 1-7.55 6.48 54.98 54.98 0 0 1-4.48 0 7.96 7.96 0 0 1-7.55-6.48C2.08 15.27 2 14.59 2 14v-1.49c0-1.11.9-2.01 2.01-2.01h0a2 2 0 0 1 2.01 2.03l-.01.97v-10c0-1.1.9-2 2-2h0a2 2 0 0 1 2 2V11Z"></path></svg>') 0 0, auto; /* Custom cursor for links */
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent; /* Transparent background initially */
    z-index: 1000; /* Ensure it stays above other elements */
    padding: 0; /* Remove padding */
    transition: background 0.3s ease; /* Smooth transition for background change */
}

header.scrolled {
    background: #000000; /* Solid black background when scrolled */
}

nav ul {
    display: flex;
    justify-content: space-evenly;
    list-style: none;
    margin: 0;
    padding: 1.5rem;
    gap: 1rem;
}

nav a {
    text-decoration: none;
    color: #888888; /* Grey text for inactive links */
    font-size: 1rem;
    transition: color 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping */
    position: relative; /* Enable positioning for the underline */
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px; /* Position the underline just below the text */
    width: 0;
    height: 2px; /* Thickness of the underline */
    background: #FFFFFF; /* White underline */
    transition: width 0.3s ease; /* Smooth animation for the underline */
}

nav a.active {
    color: #FFFFFF; /* White text for active link */
}

nav a.active::after {
    width: 100%; /* Expand the underline for the active link */
}

nav a:hover {
    color: #FFFFFF; /* Change text color on hover */
}

.text-link {
    text-decoration: none;
    color: #FFFFFF; /* Updated color */
    position: relative; /* Enable positioning for the underline */
    font-size: 1rem;
    width: fit-content; /* Fit the link to its content */
}

.text-link::after {
    content: '';
    position: absolute;
    left: 0;
    top: 110%; /* Start underline just below the text */
    width: 100%;
    height: 1px; /* Initial height of the underline */
    background: #8A8A8A; /* Updated color */
}

.text-link:hover {
    color: #FFFFFF; /* Keep text white on hover */
}

.text-link:hover::after {
    height: 3px; /* Grow underline downwards */
    background: #FFFFFF; /* Updated color */
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4rem; /* Offset for fixed header */
}

section {
    min-height: 90vh; /* Each section takes up full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-content: center;
    font-size: 2rem;
    width: 80vw;
    opacity: 0; /* Initially hidden */
    transition: opacity 1s ease; /* Smooth fade-in and fade-out effect */
}

section.visible {
    opacity: 1; /* Fully visible when in view */
}

#about {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0 auto; /* Center the section horizontally */
    position: relative;
}

#about p {
    width: 33vw; /* Set width to 33% of the viewport width */
    line-height: 150%;
}

#about {
    width: 80vw; /* Limit width to 80% of the viewport on desktop */
}

#about .text-link {
    font-size: 1.5rem; /* Match the font size of the rest of the section's text */
}

.about-links {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 1rem; /* Add spacing between links */
    margin-top: 1rem; /* Add spacing above the links */
}

h1, h2, h3 {
    font-weight: normal; /* Remove bold styling from headings */
}

#projects {
    flex-wrap: wrap;
    width: 100vw;
    margin: 10vh 0; /* Add 10vh margin to the top and bottom */
    opacity: 1; /* Ensure the projects section is always visible */
    transition: none; /* Remove fade-in and fade-out effect */
}

#projects a {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="%23000" stroke-width="1.25" stroke-linejoin="round"><path fill="%23FFDE00" d="M17.5 21h-11A1.5 1.5 0 0 1 5 19.5v-7c0-.83.67-1.5 1.5-1.5h11c.83 0 1.5.67 1.5 1.5v7c0 .83-.67 1.5-1.5 1.5Z"></path><path d="M8 11V7a4 4 0 1 1 8 0v4"></path><circle cx="12" cy="16" r=".25"></circle></g></svg>') 0 0, auto; /* Custom cursor for project links */
}

.project-card {
    width: 80%;
    height: 50vh;
    opacity: 0.8;
    background-size: cover;
    background-position: center;
    transition: 0.5s ease;
    filter: saturate(50%);
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    position: relative;
    text-align: center;
}

.project-card h2 {
    color: #000000; /* Black text */
    font-size: 2rem;
    margin: 0;
    z-index: 1; /* Ensure text is above the background */
    transition: 0.3s ease-out;
    background: #FFFFFF; /* Solid white background */
    padding: 0.5rem 1rem; /* Add padding around the text */
}

.project-card:hover, .project-card:active{
    width: 100vw; /* Stretch the card to the full width of the viewport */
    opacity: 1;
    filter: saturate(100%);
    transition: 0.3s ease-out;
}

.project-card:hover h2 {
    font-size: 3rem; /* Increase text size on hover */
    transition: 0.3s ease-out; /* Smooth transition for text size */
}

html {
    scroll-behavior: smooth; /* Enable smooth scrolling */
}

#experience {
    gap: 3rem;
    max-width: 40vw;
    margin: 10vh 0; /* Add 10vh margin to the top and bottom */
}

.work-history-card {
    width: 100%;
}

.work-history-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    color: #FFFFFF; /* White text for the title */
}

.work-history-card ul {
    list-style: disc;
    padding-left: 1.5rem; /* Add padding for the list */
    color: #8A8A8A; /* Updated color */
}

.work-history-card ul li {
    margin-bottom: 0.5rem; /* Add spacing between list items */
}

.strapline {
    font-size: 1.2rem;
    font-weight: bold;
    color: #8A8A8A; /* Updated color */
    margin-bottom: 0.5rem; /* Add spacing below the strapline */
    text-transform: uppercase; /* Make the text uppercase */
}

.work-history-card p {
    font-size: 1rem; /* Set font size to 1rem for paragraphs inside cards */
    color: #8A8A8A; /* Updated color */
}

.work-details {
    display: flex;
    flex-direction: row;
    font-size: 0.9rem; /* Slightly smaller font size */
    color: #ffffff; /* Light grey text */
    gap: 1rem;
}

.work-details p{
    margin: 0;
}

.vl {
    border-left: 2px solid #888888; /* Light grey line */
    height: 2rem;
    opacity: 0.25; /* Slightly transparent */
    border-radius: 2px;
}

#work-history {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#vanta-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Place behind other content */
}

.headshot {
    height: 20vh;
    width: auto;
    border-radius: 50%;
    animation: fadeIn 1.5s ease-out forwards; /* Fade-in animation */
}

#alejandro {
    flex-direction: row;
    height: 90vh;
    gap: 2rem;
}

#alejandro h1{
    font-size: 5rem;
}

.headshotContainer {
    display: flex;
    justify-content: flex-end;
    width: 33%;
    position: relative; /* Remove positioning for the timer */
}

.typewriterContainer{
    width: 66%;
    display: flex;
    justify-content: flex-start;
}

#testimonials {
    width: 100vw;
    margin: 10vh 0; /* Add 10vh margin to the top and bottom */
    overflow: hidden; /* Hide overflowing content */
    position: relative;
}

.testimonial-marquee {
    display: flex;
    gap: 4rem; /* Remove gaps between items */
    animation: scrollMarquee 60s linear infinite; /* Slow scrolling animation */
    width: max-content; /* Ensure the width adjusts to fit all items */
    position: absolute;
    left: 0;
}

.testimonial-marquee:hover {
    animation-play-state: paused; /* Pause the animation on hover */
}

.testimonial {
    max-width: 50vw;
    color: #ffffff; /* White text */
    padding: 1rem 2rem;
    border-radius: 8px;
    white-space: normal; /* Allow text wrapping */
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Add spacing between elements */
}

.testimonial-quote {
    font-size: 1.5rem;
    line-height: 1.5;
}

.testimonial-author-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.testimonial-linkedin {
    font-size: 1rem;
}

.testimonial-linkedin:hover {
    color: #ffffff; /* Change to white on hover */
}

.testimonial-carousel-controls {
    display: flex;
    justify-content: space-between; /* Space between the buttons */
    align-items: center;
    position: fixed; /* Fix position to prevent jumping */
    bottom: 10%; /* Position near the bottom of the viewport */
    left: 0;
    right: 0;
    z-index: 10; /* Ensure it stays above other content */
    padding: 0 2rem; /* Add padding for spacing */
}

.carousel-prev, .carousel-next {
    background: none; /* Transparent background */
    color: #FFFFFF; /* White arrow color */
    border: none;
    font-size: 2rem; /* Increase arrow size */
    cursor: pointer;
    transition: color 0.3s ease;
    width: 44px; /* Set width */
    height: 44px; /* Set height */
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-prev:hover, .carousel-next:hover {
    color: #888888; /* Grey color on hover */
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: inherit; /* Inherit font size from parent */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

.testimonial-author {
    color: #8A8A8A; /* Updated color */
}

@media all and (max-width: 1024px) { /* Mobile and tablet styles */
    nav a {
        font-size: 0.9rem; /* Scale down font size for smaller screens */
    }

    #about p {
        font-size: 1.5rem;
        text-align: justify; /* Justify text for paragraphs in the about section */
    }

    #alejandro {
        flex-direction: column; /* Change to column layout */
        align-items: center; /* Center align items */
        height: auto; /* Adjust height for column layout */
        gap: 1rem; /* Reduce gap between elements */
        width: 90vw; /* Set width to 90% of the viewport */
        text-align: center;
    }
    #alejandro h1{
        font-size: 2.5rem;
    }

    .headshotContainer, .typewriterContainer {
        justify-content: center; /* Center the headshot */
        width: auto; /* Adjust width for column layout */
        text-align: center;
    }

    #about {
        width: 90vw; /* Limit width to 80% of the viewport on desktop */
        flex-direction: column; /* Stack elements vertically */
        justify-content: center;
    }

    #about p {
        width: 100%; /* Set width to 33% of the viewport width */
        text-align: left;
    }
    

    #projects{
        width: 90vw;
    }
    .project-card {
        width: 100%; /* Full width for smaller screens */
    }
    #experience {
        width: 90vw; /* Set width to 90% of the viewport */
        max-width: none; /* Remove max-width restriction */
    }
    .testimonial-marquee {
        animation: none; /* Disable marquee animation */
        position: static; /* Reset position */
        display: flex;
        flex-direction: column; /* Stack testimonials vertically */
        gap: 2rem; /* Add spacing between testimonials */
        width: 100%; /* Full width */
    }

    .testimonial {
        max-width: 90%; /* Reduce width for smaller screens */
        margin: 0 auto; /* Center testimonials */
    }

    .testimonial:nth-child(n+5) {
        display: none; /* Hide items after the first four */
    }

    .testimonial-carousel-controls {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-top: 1rem;
    }

    .testimonial-carousel-controls button {
        background: #888888; /* Grey background */
        border: none;
        border-radius: 50%;
        cursor: pointer;
        transition: background 0.3s ease;
    }

    .testimonial-carousel-controls button.active {
        background: #FFFFFF; /* White background for active button */
    }
}

@keyframes scrollMarquee {
    from {
        transform: translateX(0); /* Start at the left edge */
    }
    to {
        transform: translateX(-50%); /* Move halfway to create a seamless loop */
    }
}

