/* =========================================================
   IIT Delhi Faculty Page – Custom Bootstrap 5 Styling
   Updated for smaller, crisper official typography
   Author: ChatGPT (for Dr. Amit Gupta)
   ========================================================= */

/* ---------- Color Variables ---------- */
:root {
    --iitd-red: #a80532;
    --iitd-grey: #414345;
    --light-grey: #f8f9fa;
}

/* ---------- Base ---------- */
body {
    font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-grey);
    color: #212529;
    scroll-behavior: smooth;
    line-height: 1.5;
    font-size: 0.92rem; /* smaller, cleaner look */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: #111;
}
/* ---------- Consistent Section Spacing ---------- */
section {
    padding-top: 100px; /* space below navbar */
    padding-bottom: 80px;
}

@media (max-width: 767px) {
    section {
        padding-top: 70px;
        padding-bottom: 60px;
    }
}

/* ---------- Navbar ---------- */
.navbar {
    background-color: var(--iitd-grey);
    transition: background-color 0.3s ease-in-out;
}

.navbar-brand {
    color: #fff !important;
    font-weight: 600;
    letter-spacing: 0.3px;
    font-size: 0.95rem;
}

.navbar .nav-link {
    color: #fff !important;
    font-weight: 500;
    font-size: 0.92rem;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--iitd-red) !important;
}

/* ---------- Sections ---------- */
section {
    padding: 80px 0;
}

.section-title {
    color: var(--iitd-red);
    font-weight: 600;
    font-size: 1.5rem; /* reduced for more refined look */
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--iitd-red);
    display: inline-block;
}

/* ---------- Profile / Home ---------- */
.profile-img {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
}

/* ---------- Accordion ---------- */
.accordion-button:not(.collapsed) {
    color: #fff;
    background-color: var(--iitd-red);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--iitd-red);
}

/* ---------- Elegant Table Styling ---------- */
.table {
    border-collapse: separate;
    border-spacing: 0 0.4rem;
    font-size: 0.9rem;
}

.table th {
    background-color: var(--iitd-red);
    color: #fff;
    font-weight: 600;
    text-align: center;
    border: none;
}

.table td {
    background-color: #ffffff;
    border: none;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 0.65rem;
}

.table-striped tbody tr:nth-of-type(odd) td {
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover td {
    background-color: #f0f0f0;
}

.table thead th:first-child {
    border-top-left-radius: 0.5rem;
}
.table thead th:last-child {
    border-top-right-radius: 0.5rem;
}
.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 0.5rem;
}
.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
}

/* ---------- IIT Delhi Official Carousel ---------- */

#labCarousel {
    margin-bottom: 3rem;
}

/* Keep layout clean */
.carousel-item {
    text-align: center;
}

/* Wrapper */
.carousel-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 4px; /* subtle, not rounded-corporate */
}

/* Image styling */
.carousel-item img {
    width: 100%;
    height: 260px;
    object-fit: contain; /* shows whole image */
    background-color: grey; /* optional: adds backdrop for empty space */
}

/* Caption – minimal academic style */
.carousel-caption-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 8px 0;
    background: rgba(0, 0, 0, 0.55); /* subtle dark overlay */
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: none;

    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Subtle fade only */
.carousel-item.active .carousel-caption-overlay {
    opacity: 1;
}

/* Controls – subtle, not bright */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(100%);
    opacity: 0.7;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
    opacity: 1;
}
/* ---------- Footer ---------- */
footer {
    background-color: var(--iitd-grey);
    color: #fff;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ---------- Scroll-to-top Button ---------- */
#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 25px;
    z-index: 999;
    display: none;
    background-color: var(--iitd-red);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 3px 6px #6c7074;
    transition: all 0.3s ease;
}

#scrollTopBtn:hover {
    background-color: #820428;
    transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    section {
        padding: 60px 0;
    }
    .section-title {
        font-size: 1.3rem;
    }
    #scrollTopBtn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 575px) {
    .profile-img {
        margin-bottom: 1rem;
    }
}

/* ---------- Links inside accordion ---------- */
.accordion-body a {
    color: black;
    text-decoration: none;
}

/* ---------- Hover shadow ---------- */
.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ---------- Prevent page jump during accordion toggle ---------- */
html {
    scroll-behavior: smooth;
}

body {
    scroll-behavior: auto;
}

#publicationsAccordion {
    overflow-anchor: none;
}
