/* General Styles */
body {
    font-family: 'Baskerville', serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #333;
    text-align: center;
}

/* Container */
.container {
    width: 90%; /* Change to a relative width for mobile */
    max-width: 1200px; /* Max width for larger screens */
    margin: 0 auto;
    padding: 20px;
}

/* Profile Picture and Button Container */
.profile-container {
    display: flex;
    flex-direction: column; /* Stack elements on smaller screens */
    align-items: center;
    gap: 15px; /* Space between the photo and button */
    justify-content: center; /* Center the elements */
}

/* Profile Picture */
.researcher-photof {
    width: 200px; /* Ensures a perfect circle */
    height: 200px; /* Ensures a perfect circle */
    border-radius: 50%;
    border: 5px solid #800080; /* Always purple border */
    object-fit: cover; /* Ensures the image scales correctly */
    filter: grayscale(100%); /* Start with grayscale */
    transition: filter 0.3s ease-in-out; /* Smooth transition for the image */
}

#profile-picture:hover .researcher-photo {
    filter: grayscale(0%) sepia(1) hue-rotate(270deg); /* Change to purple on hover */
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensures it appears above other content */
}

.modal-content {
    background: #800080; /* Purple background */
    color: #fff; /* White text */
    padding: 20px;
    border-radius: 10px;
    max-width: 90%; /* Responsive width */
    width: 80%; /* Responsive width */
    text-align: center;
    position: relative;
    max-height: 80vh; /* Ensures the modal doesn't exceed 80% of the viewport height */
    overflow-y: auto; /* Adds vertical scrolling if content exceeds the modal height */
}

/* Close Button */
.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
}

.modal-button {
    background-color: #800080; /* Purple */
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Baskerville', serif; /* Use Baskerville font */
}

.modal-button:hover {
    background-color: #5e005e; /* Darker purple */
}

/* Welcome Message */
.welcome-message {
    font-size: 1.5em;
    margin-top: 15px;
    color: #000; /* Black font */
    font-weight: normal; /* Removes bold */
}

/* Profile Picture */
#profile-picture {
    margin-top: 20px;
}

.researcher-photo {
    width: 200px; /* Ensures a perfect circle */
    height: 200px; /* Ensures a perfect circle */
    border-radius: 50%;
    border: 5px solid #800080; /* Always purple border */
    object-fit: cover; /* Ensures the image scales correctly */
    filter: grayscale(100%); /* Start with grayscale */
    transition: filter 0.3s ease-in-out; /* Smooth transition for the image */
}

#profile-picture:hover .researcher-photo {
    filter: grayscale(0%) sepia(1) hue-rotate(270deg); /* Change to purple on hover */
}


.welcome-message {
    font-size: 1.5em;
    margin-top: 15px;
    color: #000; /* Black font */
    font-weight: normal; /* Removes bold */
}


/* Responsive Styles */
@media (min-width: 600px) {
    /* For tablets */
    .profile-container {
        flex-direction: row; /* Align elements in a row */
    }
    
    .researcher-photo {
        width: 150px; /* Adjust photo size for tablets */
        height: 150px;
    }
    
    .modal-content {
        max-width: 500px; /* Limit modal width for tablets */
    }
}

@media (min-width: 900px) {
    /* For desktops */
    .researcher-photo {
        width: 200px; /* Adjust photo size for desktops */
        height: 200px;
    }
}

/* Logo Grid Section */
#links-grid {
    margin-top: 30px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Default: 4 columns */
    gap: 10px; /* Space between grid items */
    justify-items: center; /* Center items within the grid */
    align-items: center; /* Center items vertically */
}

/* Adjust the grid for smaller screens */
@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(1, 1fr); /* 2 columns on smaller screens */
    }
}

/* Grid Item */
.grid-item img {
    width: auto; /* Adjusted to make logos larger */
    height: 150px;
    display: block;
    margin-bottom: 10px;
    filter: grayscale(100%);
    transition: filter 0.3s ease-in-out;
}



/* Change Grayscale to Purple on Hover */
.grid-item:hover img {
    filter: grayscale(0%) sepia(1) hue-rotate(270deg);
}


.grid-item {
    position: relative;
    text-align: center;
}

.grid-item p {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #800080; /* Purple background */
    color: #fff; /* Black font */
    padding: 5px 0;
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9; /* Slight transparency for better readability */
}

.grid-item:hover p {
    display: block;
}



/* Footer Section */
footer {
    background: #800080; /* Purple */
    color: #fff;
    text-align: center;
    padding: 10px 0;
    margin-top: 50px;
}

/* Link styled as a button */
.link-button {
    background-color: #800080; /* Purple */
    color: #fff;
    text-decoration: none; /* Removes underline from the link */
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1em;
    display: inline-block; /* Makes the link behave like a button */
    text-align: center;
    cursor: pointer;
    font-family: 'Baskerville', serif; /* Use Baskerville font */
}

.link-button:active,
.link-button:visited,
.link-button:focus {
    text-decoration: none; /* Ensures no underline or style change on click or focus */
    color: #fff; /* Keeps the text color the same */
}

.link-button:hover {
    background-color: #5e005e; /* Darker purple */
}

