/* --- Setup & Variables --- */
:root {
    --color-primary: #2563eb;

    /* Light Mode (Default) */
    --color-background: #ffffff;
    --color-background-light: #f8fafc;
    --color-text: #1e293b;
    --color-heading: #0f172a;
    --color-border: #e2e8f0;
    --color-muted: #64748b;

    /* Base Fonts */
    --font-heading: 'Source Serif Pro', serif;
    --font-body: 'Inter', sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}


body.dark-mode {
    /* Dark Mode Overrides */
    --color-primary: #388bfd;
    --color-background: #0f172a;
    --color-background-light: #1e293b;
    --color-text: #cbd5e1;
    --color-heading: #ffffff;
    --color-border: #334155;
    --color-muted: #94a3b8;
}

/* --- Global Styles --- */

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    margin: 0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    line-height: 1.4;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1140px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

/* --- Header & Footer --- */
/* .site-header {
    background-color: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}
.site-header .container, .site-nav ul {
    display: flex;
    align-items: center;
}
.site-header .container {
    justify-content: space-between;
}
.site-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
}
.site-title:hover { text-decoration: none; }

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}
.site-nav a {
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 600;
}
.site-nav a.active {
    color: var(--color-primary);
}
.contact-button {
    background-color: var(--color-text);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}
.contact-button:hover {
    background-color: #334155;
    text-decoration: none;
}

.site-footer {
    background-color: white;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 4rem;
    margin-bottom: 0%;
    padding: 1.5rem 0;
} */

/* --- Page Content --- */
.main-content {
    padding-top: 3rem;
    padding-bottom: 3rem;
    flex-grow: 1;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

/* --- Cover Page Homepage --- */
/* --- Page Content --- */
.main-content {
    padding-top: 3rem;
    padding-bottom: 3rem;
    flex-grow: 1;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

/* --- Cover Page Homepage Styles --- */
/* The .cover-page class on the body allows for homepage-specific overrides */

/* The lead paragraph should use the theme's muted text color */
.cover-page .lead {
    color: var(--color-muted);
}

/* We remove the default title border on the homepage */
.cover-page h1 {
    border-bottom: 0;
}

/* This container ensures the content fills the screen */
.cover-container {
    height: calc(100vh - 72px);
    min-height: 500px;
}

/* --- Page Specific Styles --- */
/* --- Page Header Image --- */
/* --- Prof. Khan Page Styles --- */
.profile-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    justify-content: start;
    background-color: var(--color-background-light);
    border-bottom: 1px solid var(--color-border);
    /* padding: 2.5rem 0; */
    gap: 2em;
    margin-bottom: 3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* box-shadow: ; */
}

.profile-banner-image {
    width: 600px;
    /* height: 280px; */
    /* border-radius:50%; */
    object-fit: cover;
    border: 5px solid var(--color-background);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* .profile-text {} */

body.dark-mode .profile-banner-image {
    border-color: var(--color-background-light);
}

@media screen and (min-width: 768px) {
    .profile-banner {
        flex-direction: row;
    }
}

/* --- Member Grid Styles --- */
.member-card-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: fill;
    margin: 1.5rem auto 0 auto;
    /* Centers the image */
    border: 4px solid var(--color-border);
}

/*--- Alumni Page Styles ---*/
.nav-pills .nav-link {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.search-container {
    background-color: var(--color-background);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.count-badge {
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.input-group-text {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    color: var(--color-text)
}

/* Make Bootstrap Tables theme-aware by overriding Bootstrap's own CSS variables */
.table {
    --bs-table-bg: var(--color-background);
    --bs-table-color: var(--color-text);
    --bs-table-border-color: var(--color-border);
    --bs-table-striped-bg: var(--color-background-light);
    --bs-table-striped-color: var(--color-text);
    --bs-table-hover-bg: var(--color-border);
    --bs-table-hover-color: var(--color-text);
}

/* We still need to specify the header color for proper contrast */
.table th {
    color: var(--color-heading);
}

/* --- Teaching Page Styles --- */
.icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    color: var(--color-primary);

    /* Add these lines to control size and centering */
    width: 100px;
    height: 100px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Teaching Page Styles --- */
.course-list h3 {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.course-list ul {
    list-style-type: none;
    padding-left: 0;
}

.course-list li {
    position: relative;
    /* This is the required context */
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    /* Make space for the new bullet */
    border-bottom: 1px solid var(--color-border);
}

.course-list li:last-child {
    border-bottom: none;
}

/* Create a custom bullet point for the list items */
.course-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    top: 0.25rem;
    color: var(--color-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

/* --- Contact Page Styles --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    /* Address column is smaller than map column */
    gap: 3rem;
    align-items: start;
}

.contact-details address,
.contact-details p {
    font-style: normal;
    line-height: 1.8;
}

.map-embed {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
    /* Fixes extra space below iframe */
}

.map-embed iframe {
    width: 100%;
    height: 350px;
    border: 0;
}



/* --- Theme Toggle Button --- */
#theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--color-border);
    background-color: var(--color-background-light);
    color: var(--color-text);
}

#theme-toggle:hover {
    background-color: var(--color-border);
}

#theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* --- BOOTSTRAP COMPONENT OVERRIDES --- */

/* This makes Bootstrap's Card component theme-aware. */
.card {
    background-color: var(--color-background-light);
    border-color: var(--color-border);
    color: var(--color-text);
}

/* This makes the List Group component theme-aware. */
.list-group-item {
    background-color: var(--color-background);
    border-color: var(--color-border);
    color: var(--color-text);
}

/* This fixes the sidebar card on the 'Prof. Khan' page. */
.bg-light {
    background-color: var(--color-background-light) !important;
}

.text-muted {
    color: var(--color-muted) !important;
}

/* Justify Text */
.text-justify {
    text-align: justify;
}

#pub-list {
    list-style: none;
    padding-left: 0;
}

/* Footer styling */
#sticky-footer {
    background-color: rgba(33, 37, 41, 0.75);
    color: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    /* for Safari */
    transition:
        background-color 0.3s ease,
        backdrop-filter 0.3s ease,
        opacity 0.3s ease;
    opacity: 0.95;
}

#sticky-footer.opaque {
    background-color: rgba(33, 37, 41, 1);
    color: rgba(255, 255, 255, 1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 1;
}

.form-control,
.form-select {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.form-control::placeholder {
    color: var(--color-text)
}

.form-control:focus {
    background-color: var(--color-background);
    color: var(--color-text);

}