/* Global Styles */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb); /* Soft Pastel Blue and Peach Gradient */
    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 */
.navbar {
    background-color: #343a40;
    padding: 1rem 2rem; /* Increased padding for larger navbar */
}

.navbar-brand img {
    width: 150px;
    height: 60px;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.6rem;
}

.navbar-nav .nav-link {
    color: #f8f9fa !important;
    font-size: 1.1rem;
}

.navbar-nav .nav-link:hover {
    color: #f39c12 !important;
    text-decoration: underline;
}

/* Sun/Moon Toggle */
.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;
}

/* Principal Investigator's (PI) Photo */
.pi-photo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pi-photo .photo-box {
    width: 250px;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    position: relative;
}

.pi-photo .photo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 70px;
    left: 0px;
    transform: scale(1.5); /* Scale the image to "zoom in" */
    transform-origin: center center; /* Ensure it scales from the center */
}

/* Principal Investigator Box */
.pi-box {
    background-color: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    margin-top: 3rem;
}

/* Dark mode styles for PI box */
body.dark-mode .pi-box {
    background-color: #34495e;
    color: #f7f8fc;
}

/* Principal Investigator Container (Left and Right side layout) */
.pi-container {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping for smaller devices */
    gap: 2rem; /* Space between the left and right sections */
}

/* Left Section - Photo and Bio */
.pi-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: -5rem;
    margin-right: 1.5rem;
}

/* Right Section - Education and Experience */
.pi-right {
    margin-top: -2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Header inside PI box */
.pi-box h3,h4 {
    text-align: center;
    font-family: 'Lora', serif;
    font-weight: 700;
}

/* Text inside PI box */
.pi-box p,
.pi-box ul {
    font-family: 'Roboto', sans-serif; /* Ensures the same font as the rest of the page */
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    text-align: justify;
}

/* Dark mode text color in PI box */
body.dark-mode .pi-box p,
body.dark-mode .pi-box ul {
    color: #f7f8fc; /* Ensure text is white in dark mode */
}

/* Education and Experience Lists */
.pi-box ul {
    margin-left: 0.5rem;
}

/* Honors and Awards Styling */
.pi-box h4 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 2rem;
    text-align: justify;
}

.pi-box li {
    margin-bottom: 0.5rem;
}

/* Profile Grid Layout */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* change the 220px value here to change the no. of profile cards in a single line */
    gap: 1rem;
    margin: 0.5rem;
}

/* Profile Card */
.profile-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    padding: 1.0rem;
    height: auto;
    display: flex;
    flex-direction: column;
}

.profile-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* Dark Mode for Profile Cards */
body.dark-mode .profile-card {
    background: #34495e;
    color: #f7f8fc;
}

/* Profile Card Text */
body.dark-mode .profile-card .info h2,
body.dark-mode .profile-card .info p {
    color: #f7f8fc; /* Light text color in dark mode */
}

/* Photo */
.photo {
    width: 150px;
    height: 150px;
    background-color: #e0e0e0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Info Section */
.info {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.2rem;
    color: #555;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* LinkedIn Icon */
.linkedin-icon {
    font-size: 1.8rem;
    color: #0e76a8;
    transition: color 0.3s;
}

.linkedin-icon:hover {
    color: #00a6ff;
}

body.dark-mode .linkedin-icon {
    color: #1da1f2;
}

body.dark-mode .linkedin-icon:hover {
    color: #66ccff;
}

/* Footer */
.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;
}

.logo-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo-container img {
    width: 120px;
    height: auto;
}

/* Alumni Card Specific Styling */
.profile-card-alumni {
    width: 300px;
    padding: 0.8rem;
    font-size: 0.95rem;
    align-self: center;
}

/* Optional: Alumni grid for consistent layout */
.alumni-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

/* Dark Mode for Alumni Cards */
body.dark-mode .profile-card-alumni {
    background: #34495e;
    color: #f7f8fc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pi-left {
        margin-top: -1.8rem;
    }

    .profile-card {
        padding: 0.5rem;
        height: auto;
        width: 75%;
    }

    .profile-grid {
        display: flex;
        flex-direction: column;
        align-items: center; /* Center horizontally */
        justify-content: center; /* Center vertically if needed */
        gap: 2rem;
    }

    .photo {
        width: 130px;
        height: 130px;
    }

    .info h2 {
        font-size: 1.6rem;
    }

    .info p {
        font-size: 1rem;
    }
}

/* Section Headings */
h2 {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

body.dark-mode h2 {
    color: #f7f8fc; /* Light text color in dark mode */
}
