body {
    margin: 0;
    padding: 0;
    width: 100%;
    /* overflow-x: hidden; */
    font-family: Arial, sans-serif;
    background-color: var(--secondary-color);
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}

html.menu-active,
body.menu-active {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

.navbar {
    display: flex;
    height: 70px;
    justify-content: space-between; /* Spread content evenly */
    align-items: center; /* Center items vertically in the navbar */
    background-color: var(--secondary-color);
    border-bottom: 3px solid #000000;
    position: relative;
    z-index: 1000; /*above everything*/
}

.navbar-left {
    display: flex; /* Ensure it's a flex container */
    align-items: center; /* Center items vertically */
    height: 100%;
}

.navbar-right {
    display: flex; /* Ensure it's a flex container */
    align-items: center; /* Center items vertically */
    height: 100%;
}

.navbar-left .home-button {
    font-weight: bold;
    font-size: 30px;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 0 15px; /* Adjust horizontal padding */
    display: flex; /* Make <a> a flex container */
    align-items: center; /* Center text vertically */
    height: 100%; /* Match the height of the navbar */
    transition: background-color 0.3s;
}

.navbar a:hover {
    background-color: var(--primary-color);
}

.hamburger-button {
    display: none;
    margin-right: 20px;
    font-size: 1.5em;
    cursor: pointer;
}

.hamburger-button img {
    width: 30px;
    height: 30px;
}

/* Mobile Menu Styles */
.mobile-menu {
    display: flex;
    visibility: hidden; /* Hidden by default */
    opacity: 0; /* Fully transparent */
    flex-direction: column;
    position: fixed;
    top: -100%; /* Start off-screen */
    left: 0; /* Align to the left edge of the viewport */
    right: 0; /* Align to the right edge of the viewport */
    width: 100%; /* Ensure full width */
    background-color: var(--secondary-color);
    padding: 20px;
    border-bottom: 3px solid #000000;
    transition: top 0.3s ease, opacity 0.3s ease, visibility 0.3s ease; /* Smooth slide-in animation */
    z-index: 4; /* Ensure it's below the navbar */
    box-sizing: border-box; /* Include padding and border in the element's total width */
}

.mobile-menu.active {
    visibility: visible; /* Make the menu visible */
    opacity: 1; /* Fully opaque */
    top: 60px; /* Adjust this value to match the height of your navbar */
}

.mobile-menu a {
    text-decoration: none;
    color: white;
    font-size: 1.1em;
    padding: 10px 0;
    border-bottom: 1px solid #5500ff /* Optional: Add separators */
}

/* Overlay Styles */
.overlay {
    display: none;
    opacity: 0;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    z-index: 3;
}

.overlay.active {
    opacity: 1;
    display: block;
}

@media (max-width: 768px) {
    .navbar-right {
        display: none;
        align-items: center; /* Center items vertically */
        height: 100%;
    }

    .navbar-right.active {
        display: flex;
    }

    .hamburger-button {
        display: block;
    }
}

/*TIMELINE*/
.beginline {
    background-color: #5500ff; /*#5918df*/
    left: calc(10vw - 9px);
    position: absolute;
    top: 200px;
    width: 20px;
    height: 4px;
    z-index: 1;
  }
.line {
    background-color: #5500ff;
    left: 10vw;
    position: absolute;
    top: 200px;
    bottom: 0px;
    width: 2px;
    z-index: 1;
  }

/* General Timeline Styles */
.timeline {
    position: relative;
    width: 100%;
    margin: 0 auto;
    /* padding: 20px; */
}

.timeline-item1 {
    position: relative;
    height: calc(100vh - 73px);
    /*background: linear-gradient(var(--primary-color), var(--secondary-color));*/
    background-image: url("images/symbol-bg_002.svg"); /* Use url() for background images */
    background-size: 50vw; /* Ensures the image covers the entire element */
    background-position: center; /* Centers the image */
    /* background-position-x: 300px; */
    /* background-repeat: no-repeat; Prevents the image from repeating */
    display: flex;
    /* justify-content: center;
    align-items: center;
    text-align: center; */
}

.timeline-item1 p {
    position: absolute;
    font-weight: bold;
    font-size: 3.5em;
    color: white;
    top: 180px;
    left: calc(10vw + 20px);
    right: 5vw;
    overflow: hidden;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    justify-content: left; /*Centers horizontally */
    align-items: flex-start; /* Centers vertically */
    
    position: relative;
    width: 100%;
    padding: 0vh 0 5vh; /* Adds dynamic space above and below */
    background: linear-gradient(var(--primary-color), var(--secondary-color));
}

.timeline-item p {
    position: relative;
    font-weight: bold; /* Make the text bold */
    font-size: 3em; /* Adjust the size for a title-like appearance */
    color: white; /* Ensure it contrasts with the background */
    margin-top: 1vh; /* Adds space above */
    margin-bottom: 3vh; /* Adds space below */
    margin-left: calc(10vw + 20px);
    margin-right: 5vw; /* Ensures right spacing */
}


h4,
h5 {
    font-weight: 500; /* Medium weight, less bold */
}

.item-list {
    display: flex; /* Use flex instead of grid */
    flex-wrap: wrap; /* Allows items to wrap to new lines */
    justify-content: center; /* Centers items */
    gap: 30px; /* Adds spacing between items */
    width: 85%; /* Makes it a little narrower */
    /* max-width: 1000px; Prevents it from stretching too much */
    margin: 0 auto; /* Centering */
    z-index: 2;
}

.project-item {
    width: 100%; /* Allow it to shrink when needed */
    max-width: 350px; /* Prevents excessive stretching */
    aspect-ratio: 1 / 1; /* Ensures it stays square */
    border-radius: 20px;
    background: #300781;
    /* transition: transform 0.3s ease-in-out; */
    text-decoration: none;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.project-item.show {
    opacity: 1;
    transform: translateY(0);
}

.project-item .project-image {
    width: 100%; /* Scales with container */
    height: 70%; /* Limits image height */
    object-fit: cover; /* Crops instead of stretching */
    border-radius: 20px 20px 0 0; /* Matches container rounding */
}

.project-item h3 {
    margin: 5px 10px 0px 10px;
    font-size: 1.2em;
    color: white;
}

.project-item h4 {
    margin: 10px 10px 10px 10px;
    font-size: 0.8em;
    color: white;
}

.project-item:hover {
    transform: scale(1.05);
}

.education-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 60vw;
    min-height: 300px; /* Allow it to expand if needed */
    border-radius: 20px;
    background: #300781;
    transition: transform 0.3s ease-in-out;
    /* overflow: hidden; */
    text-decoration: none; /* Ensure no unwanted link styles */
}

/* Ensure image maintains its aspect ratio */
.education-item img {
    width: 300px;
    max-width: 50%;
    height: auto; /* Allow height to adapt */
    object-fit: cover;
    border-radius: 20px 0 0 20px;
}

/* Allow text-content to expand naturally */
.education-item .text-content {
    flex: 1;
    padding: 15px;
    color: white;
    display: flex;
    flex-direction: column;
    /* justify-content: center; Centers text, remove if unnecessary */
}

.education-item h3 {
    margin: 5px 10px 10px 10px;
    font-size: 1.2em;
}

.education-item h4 {
    margin: 0px 10px;
    font-size: 0.8em;
}

.education-item h5 {
    margin: 15px 10px 10px 10px;
    font-size: 0.8em;
}

.text-content a {
    display: inline; /* Ensure the link behaves like normal inline text */
    text-decoration: none; /* Optional: Removes the underline */
    color: inherit; /* Ensures it takes the same color as the surrounding text */
}

.education-item:hover {
    transform: scale(1.05);
}

/* Responsive: Allow item to grow based on text */
@media (max-width: 1000px) {
    .education-item {
        flex-direction: column;
        width: 100%;
        max-width: 350px;
        min-height: auto; /* Ensure height can grow */
    }

    .education-item img {
        width: 100%;
        max-width: none;
        height: auto;
        border-radius: 20px 20px 0 0;
    }

    .education-item .text-content {
        padding: 10px;
        text-align: center;
    }
}

#contactForm {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: auto;
    width: calc(85vw - 38px);
    max-width: 600px;
    border-radius: 10px;
    margin-left: calc(10vw + 20px);
}

#contactForm label {
    font-size: 16px;
    color: white;
}

#contactForm input,
#contactForm textarea {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid white;
    padding: 8px;
    border-radius: 5px;
    outline: none;
}

#contactForm input::placeholder,
#contactForm textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Prevent Selection Highlight */
#contactForm input:focus,
#contactForm textarea:focus {
    background: rgba(255, 255, 255, 0.15); 
}

#contactForm textarea {
    min-height: 100px;
    resize: vertical;
}

#contactForm button {
    background: white;
    color: black;
    font-weight: bold;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#contactForm button:hover {
    background: gray;
    color: white;
}

.formResponse {
    width: calc(85vw - 38px);
    max-width: 600px;
    border-radius: 10px;
    margin-left: calc(10vw + 20px);
    margin-top: 10px;
}