body {
    margin: 0;
    background: #1f1f1f;
    background-image:
        linear-gradient(to right, rgba(209, 209, 209, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(209, 209, 209, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23aaaaaa" stroke="%23aaaaaa" width="12px" height="12px" viewBox="0 0 10.04 10.04"><circle cx="5.02" cy="5.02" r="4.52"/></svg>') 10 10, auto;
    height: 100vh;
}


a {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23aaaaaa88" stroke="%23aaaaaa88" width="12px" height="12px" viewBox="0 0 10.04 10.04"><circle cx="5.02" cy="5.02" r="4.52"/></svg>') 10 10, auto;
}


nav {
    display: flex;
    color: #aaaaaa;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-family: "Geist Mono";
    font-style: normal;
    font-size: .75rem;
    border-bottom: .25px solid #555555;
    width: 100%;
}

html {
    scroll-behavior: smooth;
}

#navicon {
    height: 1rem;
    width: auto
}

#leftnav,
#rightnav,
#midnav {
    display: flex;
    list-style: none;
    flex-direction: row;
    align-items: center;
    padding: 0px 20px;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #aaaaaa;
    font-family: "Geist Mono";
    display: flex;
    flex-direction: row;
    align-items: center;
}

nav ul li a:hover {
    color: #ffffff;
    transition-duration: .25s;
}

nav .mdi {
    font-size: 1rem;
    padding: 6px
}

#target {
    background: linear-gradient(90deg, #00C9FF, #92FE9D);
    /* example gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


#robots {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    color: #ffffff;
    transition: all 0.25s ease-in-out;
}

#robots:hover {
    color: #aaaaaa;
}



#linkedinlink {
    text-decoration: none;
    color: #0077b5
}


#emaillink {
    text-decoration: none;
    color: #555555;
}

h1 {
    font-size: 3.25rem;
    font-family: "Crimson Pro", serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: italic;
    margin: 0px;
    text-align: left;
    color: #ffffff
}

@media (max-width: 767px) {
    #hi {
        font-size: 2.25rem;
    }
}


#text {
    font-size: 1.75rem;
    font-family: "Manrope";
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    text-align: left;
    margin: 0px;
    padding-top: 1.5rem;
    color: #cccccc
}

@media (max-width: 767px) {
    #text {
        font-size: 1rem;
    }
}



#cursor {
    width: 2px;
    height: 2.5rem;
    background-color: #ffffff;
    transform: rotate(14deg);
    display: inline-block;
    position: relative;
    top: .3rem;
    animation: blink 0.8s infinite;
}

@media (max-width: 767px) {
    #cursor {
        height: 1rem;
        top: .1rem;
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}


#toptext {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 2.5%;
}

@media (max-width: 767px) {
    #toptext {
        display: flex;
        flex-direction: row;
        position: fixed;
        align-items: center;
        top: 30%;
        left: 0%;
    }
}

#container {
    display: flex;
    flex-direction: column;
}

#projects {
    display: flex;
    flex-direction: column;
    padding: 2.5%;
    align-items: center;
    justify-content: center;
    margin: auto;
    width: 95%;
}

#projectslabel {
    color: #aaaaaa;
    font-family: "Geist Mono";
    font-size: .75rem;
    align-self: flex-start;
}

#toprow,
#bottomrow {
    display: flex;
    flex-direction: row;
    column-gap: 20px;
    justify-content: center;
    margin: 10px;
    width: 95%;
    flex-wrap: wrap;
}

#toprow {
    align-items: flex-end;
}

#bottomrow {
    align-items: flex-start;
}

#toprow a,
#bottomrow a {
    text-decoration: none;
}

.imagewrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: #555555;
    padding: 4px;
    border-radius: 22px;
    transition: all 0.25s ease-in-out;
    width: 100%;
    max-width: 450px;
}

#worldsdriving {
    max-width: 550px;
}

#wsoc {
    max-width: 650px;
}


.imagewrapper:hover {
    transform: scale(1.01);
    background-color: #aaaaaa
}


.imagewrapper img {
    border-radius: 18px;
    width: 100%;
    height: auto;
}

.textwrapper {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: .5rem;
}

.textwrapper p {
    color: #cccccc;
    font-family: "Geist Mono";
    font-weight: 400;
    font-size: .75rem;
    padding: .65rem;
    background-color: #1f1f1f;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    margin: 0;
}

.textwrapper .indicator {
    color: #cccccc;
    font-family: "Geist Mono";
    font-weight: 400;
    font-size: .75rem;
    padding: .65rem;
    background-color: #1f1f1f;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    margin: 0;
}



.dot {
    height: .5rem;
    width: .5rem;
    border-radius: 50%;
    margin-right: .5rem;
}

.dot.robotics {
    background-color: #7df090;
}

.dot.hardware {
    background-color: #6177f1;
}

.dot.media {
    background-color: #a858f3;
}

.dot.learning {
    background-color: #7de3f0;
}

nav {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    /* Apply animation */
}


#toptext {
    opacity: 0;
    transform: translateY(30px);
    /* Start 30px below */
    animation: fadeSlideUp 1s ease-out forwards;
    /* Apply animation */
}

#projects {
    opacity: 0;
    transform: translateY(30px);
    /* Start 30px below */
    animation: fadeSlideUp 1.25s ease-out forwards;
    animation-delay: .25s;
    /* Apply animation */
}


@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
        /* Start position */
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        /* Final position */
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        /* Start position */
    }

    100% {
        opacity: 1;
        /* Final position */
    }
}




/* Responsive styles for tablets (768px - 1024px) */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.75rem;
    }

    #text {
        font-size: 1.5rem;
    }

    .imagewrapper {
        max-width: 300px;
    }
}

/* Responsive styles for mobile devices (up to 767px) */
@media (max-width: 767px) {

    .imagewrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    html,
    body {
        margin: 0;
        padding: 0;
        width: 100%;
        overflow-x: hidden;
    }

    nav {
        flex-direction: row;
        width: 100%;
    }

    #leftnav,
    #rightnav,
    #midnav {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    #midnav {
        display: none;
        /* Hide the middle nav on mobile */
    }

    h1 {
        font-size: 2rem;
    }

    #text {
        font-size: 1.1rem;
        padding-top: 1rem;
    }

    #toptext {
        position: relative;
        top: auto;
        left: auto;
        padding: 1rem;
        margin-top: 1rem;
    }

    #projects {
        padding: 1rem;
        width: 100%;
        margin: 1.5rem auto 0;
        box-sizing: border-box;
    }

    .imagewrapper {
        max-width: 300px;
        margin: 0 auto;
    }

    #worldsdriving {
        max-width: 300px;
        width: auto;
    }

    #wsoc {
        max-width: 300px;
        width: auto;
    }

    #toprow,
    #bottomrow {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
    }

    .textwrapper {
        flex-direction: row;
        gap: 0.5rem;
        width: 100%;
        justify-content: space-between;
    }
}

/* Restore the small mobile breakpoint */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    #text {
        font-size: 1rem;
    }

    #leftnav,
    #rightnav {
        font-size: 0.7rem;
    }

    .mdi {
        font-size: 0.9rem;
    }

    .imagewrapper {
        max-width: 300px;
    }

    #worldsdriving {
        max-width: 300px;
    }

    #wsoc {
        max-width: 300px;
    }
}