body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb); /* Gradient background */
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background: linear-gradient(135deg, #2c3e50, #34495e); /* Darker gradient for dark mode */
    color: #f7f8fc;
}

.navbar {
    background-color: #343a40;
    padding: 1rem 2rem; /* Increased padding for larger navbar */
}

.navbar-brand img {
    width: 150px;
    height: 60px;
}

.navbar-nav .nav-link {
    color: #f8f9fa !important;
    font-size: 1.1rem;
}

.navbar-nav .nav-link:hover {
    color: #f39c12 !important;
    text-decoration: underline;
}

/* Dark Mode Text Fix */
body.dark-mode .info p,
body.dark-mode .info h2,
body.dark-mode .info h3,
body.dark-mode .info ul li,
body.dark-mode .education ul li {
    color: #f7f8fc;
}

body.dark-mode #header {
    color: #f7f8fc;
}

/* Sun/Moon Toggle Styling */
.navbar .dark-mode-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-top: 8px;
    margin-left: 2px;
}

.dark-mode-switch i {
    color: #f39c12;
    font-size: 1.6rem;
}

/* Content Styling */

#header {
    text-align: center;
    margin-top: 1rem;
    font-family: 'Lora', serif;
    line-height: 1;
}

.content-container {
    flex: 1;
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem;
    gap: 3rem;
    flex-direction: row;
    overflow: visible;
}

.info {
    flex: 3;
    text-align: justify;
    font-family: 'Lora', serif;
    line-height: 1.6;
    margin-left: -2rem;
    margin-bottom: -5rem;
}

.photo {
    width: 250px; /* Increased size of the photo */
    height: 250px; /* Increased size of the photo */
    background-color: #e0e0e0;
    border-radius: 15px; /* Rounded square */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.5rem;
    margin: 0 auto 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.info h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: left;
}

.info p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #252525;
    text-align: justify;
}

.info h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.info ul {
    list-style: none;
    padding: 0;
}

.info ul li {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1rem;
    padding-left: 20px;
    position: relative;
}

.info ul li::before {
    content: "•";
    color: #f39c12;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 0;
}

#word-cloud-container {
    flex: 1;
    width: 400px;
    height: 400px;
    perspective: 1000px;
    display: flex;
    margin-top: -5rem;
    margin-left: 6rem;
    margin-right: -2rem;
    margin-bottom: 2.5rem;
}

.footer {
    background-color: #343a40;
    color: white;
    padding: 20px;
    margin-top: 2rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center; /* Ensures center alignment in the middle section */
    flex-wrap: wrap; /* Allows stacking on small screens */
}

.footer-left,
.footer-center,
.footer-right {
    flex: 1;
}

.footer-center {
    text-align: center;
}

.footer-right {
    text-align: right;
}

.footer p {
    margin: 0;
}

h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 700;
    font-family: 'Lora', serif;
}

.right-panel {
    margin-bottom: -5rem;
}

/* Fundings Section Styling */
.fundings-section {
    text-align: center;
    margin-top: 3rem;
}

.fundings-section h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 2rem;
    font-weight: 700;
}

.funding-images {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap; /* Allow wrapping for mobile responsiveness */
}

.funding-image-placeholder {
    width: 250px;
    height: 100px;
    border-radius: 15px; /* Rounded rectangle look */
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

.funding-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.funding-image-placeholder:nth-child(2) img {
    width: 100%;
    height: auto; /* Allow height to adjust based on aspect ratio */
    object-fit: contain; /* Change to contain to fit the image without cropping */
    transform: scale(1.1); /* Scale down the image to zoom out */
}

.funding-image-placeholder:nth-child(3) img {
    width: 100%;
    height: auto; /* Allow height to adjust based on aspect ratio */
    object-fit: contain; /* Change to contain to fit the image without cropping */
    transform: scale(1.05); /* Scale down the image to zoom out */
}

.logo-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo-container img {
    width: 120px;
    height: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-container {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
        gap: 30px;
        max-width: 100%; /* Ensure it doesn't exceed the screen width */
    }

    #header {
        text-align: center;
        width: 100%;
    }
    
    .info {
        max-width: 100%;
        text-align: left;
        margin-left: 0;
        margin-bottom: 0;
    }

    #word-cloud-container {
        width: 250px;
        height: 250px;
        margin: auto;
        margin-bottom: 10rem;
        margin-top: -3rem;
    }

    .funding-images {
        flex-direction: column;
        align-items: center;
    }

    .funding-image-placeholder {
        width: 90%;
        height: 200px;
        margin-bottom: 1.5rem;
    }
}
