/* =========================================================================
   Lady Brabourne College — Department section design system
   Used by application/views/department/*. Mobile-first.

   1. Tokens            8. Department cards       15. Profile page
   2. Base              9. About split            16. Profile sections + tables
   3. Layout helpers   10. Head of department     17. Timeline
   4. Icons & buttons  11. Faculty cards          18. Footer
   5. Header & nav     12. Contact                19. Motion
   6. Hero             13. Empty states           20. Legacy markup support
   7. Section heads    14. Stream toolbar
   ========================================================================= */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    --c-primary: #0F3D5E;          /* deep academic blue                     */
    --c-primary-700: #0B2E47;
    --c-primary-900: #071F31;
    --c-gold: #B88A44;             /* decorative only: rules, icons, borders */
    --c-gold-text: #8C6420;        /* gold for small text on light (5.3:1)   */
    --c-gold-light: #D9B97E;       /* gold on primary backgrounds (6:1)      */
    --c-bg: #FAFAFA;
    --c-surface: #FFFFFF;
    --c-text: #1F2937;
    --c-muted: #4B5563;            /* 7.2:1 on --c-bg                        */
    --c-accent: #E8EEF5;
    --c-line: #E5E7EB;
    --c-line-strong: #D6DCE4;

    --f-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(15, 61, 94, .06), 0 2px 8px -4px rgba(15, 61, 94, .10);
    --shadow-md: 0 2px 4px rgba(15, 61, 94, .05), 0 14px 32px -18px rgba(15, 61, 94, .30);
    --shadow-lg: 0 4px 8px rgba(15, 61, 94, .05), 0 24px 48px -24px rgba(15, 61, 94, .38);

    --ease: cubic-bezier(.2, .7, .2, 1);
    --t: 300ms;

    --container: 1200px;
    --gutter: 20px;
    --header-h: 68px;
}
@media (min-width: 768px) { :root { --gutter: 32px; --header-h: 76px; } }

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body.lbd-page {
    margin: 0;
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.lbd-page img { max-width: 100%; height: auto; display: block; }
.lbd-page :where(a) { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.lbd-page :where(a):hover { color: var(--c-primary-700); }
.lbd-page :where(h1, h2, h3, h4, h5, h6) { margin: 0; color: var(--c-primary); line-height: 1.2; }
.lbd-page :where(p) { margin: 0; }
.lbd-page :focus { outline: none; }
.lbd-page :focus-visible { outline: 3px solid var(--c-gold); outline-offset: 3px; border-radius: 4px; }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.lbd-skip {
    position: absolute; left: 16px; top: -60px; z-index: 1000;
    padding: 10px 18px; border-radius: var(--r-sm);
    background: var(--c-primary); color: #fff !important; font-weight: 600; text-decoration: none;
    transition: top var(--t) var(--ease);
}
.lbd-skip:focus { top: 12px; }

/* 3. Layout helpers -------------------------------------------------------- */
.lbd-container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.lbd-section { padding: 56px 0; }
.lbd-section--tight { padding-top: 0; }
.lbd-section--surface { background: var(--c-surface); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
@media (min-width: 992px) { .lbd-section { padding: 88px 0; } }

.lbd-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px)  { .lbd-grid--3, .lbd-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1024px) { .lbd-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
                             .lbd-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }

/* 4. Icons & buttons ------------------------------------------------------- */
.lbd-i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.lbd-i--sm { width: 15px; height: 15px; }
.lbd-i--lg { width: 22px; height: 22px; }

.lbd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 10px 20px;
    border: 1px solid transparent; border-radius: var(--r-pill);
    font: 600 14px/1 var(--f-body); letter-spacing: .01em;
    text-decoration: none !important; cursor: pointer;
    transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.lbd-btn .lbd-i { transition: transform var(--t) var(--ease); }
.lbd-btn:hover .lbd-i--arrow { transform: translateX(3px); }
.lbd-btn--primary { background: var(--c-primary); color: #fff !important; }
.lbd-btn--primary:hover { background: var(--c-primary-700); box-shadow: 0 8px 20px -10px rgba(15, 61, 94, .6); }
.lbd-btn--outline { background: var(--c-surface); color: var(--c-primary) !important; border-color: var(--c-line-strong); }
.lbd-btn--outline:hover { border-color: var(--c-primary); background: var(--c-accent); }
.lbd-btn--ghost-light { color: #fff !important; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
.lbd-btn--ghost-light:hover { border-color: var(--c-gold-light); background: rgba(255, 255, 255, .12); }
.lbd-btn--sm { min-height: 36px; padding: 8px 16px; font-size: 13px; }

.lbd-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: var(--r-pill);
    background: var(--c-accent); color: var(--c-primary);
    font-size: 12px; font-weight: 600; letter-spacing: .02em;
}

/* 5. Header & navigation --------------------------------------------------- */
.lbd-topbar { background: var(--c-primary-900); color: rgba(255, 255, 255, .82); font-size: 13px; display: none; }
.lbd-topbar .lbd-container { display: flex; gap: 28px; align-items: center; min-height: 40px; }
.lbd-topbar a { color: inherit !important; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.lbd-topbar a:hover { color: #fff !important; }
.lbd-topbar .lbd-i { color: var(--c-gold-light); width: 15px; height: 15px; }
@media (min-width: 768px) { .lbd-topbar { display: block; } }

.lbd-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--c-line);
    transition: box-shadow var(--t) var(--ease);
}
.lbd-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(15, 61, 94, .35); }
.lbd-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.lbd-brand { display: inline-flex; align-items: center; flex: none; }
.lbd-brand img { height: 40px; width: auto; }
@media (min-width: 768px) { .lbd-brand img { height: 46px; } }

.lbd-nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    border: 1px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-primary);
    cursor: pointer;
}
.lbd-nav-toggle .lbd-i--close { display: none; }
.lbd-nav-toggle[aria-expanded="true"] .lbd-i--menu { display: none; }
.lbd-nav-toggle[aria-expanded="true"] .lbd-i--close { display: block; }

.lbd-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--c-surface); border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow-md); display: none; }
.lbd-nav.is-open { display: block; animation: lbd-fade-down var(--t) var(--ease); }
.lbd-nav__list { list-style: none; margin: 0; padding: 8px var(--gutter) 16px; }
.lbd-nav__item { border-bottom: 1px solid var(--c-line); }
.lbd-nav__item:last-child { border-bottom: 0; }
.lbd-nav__row { display: flex; align-items: center; justify-content: space-between; }
.lbd-nav__link {
    display: block; padding: 14px 0; flex: 1;
    font-size: 15px; font-weight: 600; color: var(--c-text) !important; text-decoration: none !important;
}
.lbd-nav__link[aria-current="page"], .lbd-nav__link:hover { color: var(--c-primary) !important; }
.lbd-subtoggle { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--c-primary); cursor: pointer; border-radius: 10px; }
.lbd-subtoggle .lbd-i { transition: transform var(--t) var(--ease); }
.lbd-subtoggle[aria-expanded="true"] .lbd-i { transform: rotate(180deg); }
.lbd-sub { list-style: none; margin: 0; padding: 0 0 10px 14px; display: none; }
.lbd-sub.is-open { display: block; }
.lbd-sub a { display: block; padding: 9px 0; color: var(--c-muted) !important; text-decoration: none !important; font-size: 14px; font-weight: 500; }
.lbd-sub a:hover, .lbd-sub a[aria-current="page"] { color: var(--c-primary) !important; }

@media (min-width: 992px) {
    .lbd-nav-toggle { display: none; }
    .lbd-nav { position: static; display: block; background: none; border: 0; box-shadow: none; }
    .lbd-nav__list { display: flex; gap: 6px; padding: 0; }
    .lbd-nav__item { border: 0; position: relative; }
    .lbd-nav__link {
        position: relative; padding: 10px 14px; font-size: 14px; letter-spacing: .02em;
    }
    .lbd-nav__link::after {
        content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
        background: var(--c-gold); transform: scaleX(0); transform-origin: left;
        transition: transform var(--t) var(--ease);
    }
    .lbd-nav__link:hover::after, .lbd-nav__link[aria-current="page"]::after { transform: scaleX(1); }
    .lbd-subtoggle { width: 28px; height: 28px; margin-left: -10px; }
    .lbd-sub {
        position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px;
        padding: 8px; background: var(--c-surface);
        border: 1px solid var(--c-line); border-radius: 14px; box-shadow: var(--shadow-lg);
        display: block; opacity: 0; visibility: hidden; transform: translateY(6px);
        transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t);
    }
    .lbd-nav__item:hover > .lbd-sub, .lbd-nav__item:focus-within > .lbd-sub, .lbd-sub.is-open { opacity: 1; visibility: visible; transform: none; }
    .lbd-sub a { padding: 10px 14px; border-radius: 10px; }
    .lbd-sub a:hover { background: var(--c-accent); }
}

/* 6. Hero ------------------------------------------------------------------ */
.lbd-hero {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: center;
    min-height: 260px; padding: 44px 0 52px;
    color: #fff;
    background: var(--c-primary-900);
}
.lbd-hero::before {                       /* photograph, kept quiet */
    content: ''; position: absolute; inset: 0; z-index: -2;
    background: var(--lbd-hero-img, none) center / cover no-repeat;
    opacity: .16; filter: grayscale(.3);
}
.lbd-hero::after {                        /* tonal wash + fine gold baseline */
    content: ''; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, var(--c-primary-900) 0%, rgba(11, 46, 71, .92) 45%, rgba(15, 61, 94, .78) 100%),
        linear-gradient(0deg, var(--c-gold) 0, var(--c-gold) 2px, transparent 2px);
}
.lbd-hero__ornament {                     /* two hairline arcs, purely decorative */
    position: absolute; right: -120px; top: 50%; z-index: -1;
    width: 420px; height: 420px; transform: translateY(-50%);
    border: 1px solid rgba(217, 185, 126, .28); border-radius: 50%;
    pointer-events: none; display: none;
}
.lbd-hero__ornament::after { content: ''; position: absolute; inset: -64px; border: 1px solid rgba(217, 185, 126, .12); border-radius: 50%; }
@media (min-width: 768px) {
    .lbd-hero { min-height: 300px; padding: 56px 0 64px; }
    .lbd-hero__ornament { display: block; }
}
.lbd-crumbs ol { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; }
.lbd-crumbs li { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .72); }
.lbd-crumbs li + li::before { content: ''; width: 5px; height: 5px; border-top: 1.5px solid rgba(255, 255, 255, .45); border-right: 1.5px solid rgba(255, 255, 255, .45); transform: rotate(45deg); }
.lbd-crumbs a { color: rgba(255, 255, 255, .9) !important; text-decoration: none; }
.lbd-crumbs a:hover { color: var(--c-gold-light) !important; text-decoration: underline; }
.lbd-crumbs [aria-current] { color: var(--c-gold-light); }

.lbd-eyebrow {
    display: inline-flex; align-items: center; gap: 12px; margin-bottom: 12px;
    font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
    color: var(--c-gold-light);
}
.lbd-eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.lbd-hero h1 {
    font-family: var(--f-display); font-weight: 600;
    font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.05; letter-spacing: -.005em;
    color: #fff; max-width: 820px;
}
.lbd-hero__lead { margin-top: 14px; max-width: 640px; font-size: 15px; line-height: 1.7; color: rgba(255, 255, 255, .82); }
.lbd-hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.lbd-hero__meta .lbd-chip { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .16); font-weight: 500; }
.lbd-hero__meta .lbd-chip strong { color: var(--c-gold-light); font-weight: 700; }
.lbd-hero__meta a.lbd-chip { text-decoration: none; transition: border-color var(--t) var(--ease), background var(--t) var(--ease); }
.lbd-hero__meta a.lbd-chip:hover { border-color: var(--c-gold-light); background: rgba(255, 255, 255, .14); color: #fff !important; }
@media (min-width: 768px) { .lbd-hero__lead { font-size: 16px; } }

/* 7. Section heads --------------------------------------------------------- */
.lbd-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.lbd-head__kicker { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--c-gold-text); }
.lbd-head h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.75rem, 3.4vw, 2.4rem); line-height: 1.1; }
.lbd-head p { margin-top: 8px; color: var(--c-muted); font-size: 15px; max-width: 620px; }
.lbd-head--compact { margin-bottom: 18px; }
.lbd-head__rule { height: 1px; background: linear-gradient(90deg, var(--c-gold) 0, var(--c-gold) 48px, var(--c-line) 48px); margin: -12px 0 32px; }

/* 8. Department cards (listing + stream) ----------------------------------- */
.lbd-dcard {
    position: relative; display: flex; flex-direction: column; height: 100%;
    background: var(--c-surface);
    border: 1px solid var(--c-line); border-radius: var(--r-md);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.lbd-dcard:hover, .lbd-dcard:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(184, 138, 68, .55); }
.lbd-dcard__media { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: var(--c-accent); }
.lbd-dcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.lbd-dcard:hover .lbd-dcard__media img { transform: scale(1.045); }
.lbd-dcard__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.lbd-dcard__kicker { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--c-gold-text); margin-bottom: 6px; }
.lbd-dcard__title {
    font-family: var(--f-body); font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -.005em;
    color: var(--c-primary);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.7em;
}
.lbd-dcard__title a { color: inherit !important; text-decoration: none !important; }
.lbd-dcard__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }   /* whole card is the link */
.lbd-dcard__title a:focus-visible { outline: none; }
.lbd-dcard:has(a:focus-visible) { outline: 3px solid var(--c-gold); outline-offset: 3px; }
.lbd-dcard__desc {
    margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--c-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 3.2em;
}
.lbd-dcard__foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-line); display: flex; align-items: center; justify-content: space-between; }
.lbd-dcard__cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px 8px 16px; border-radius: var(--r-pill);
    background: var(--c-accent); color: var(--c-primary);
    font-size: 13px; font-weight: 600;
    transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.lbd-dcard__cta .lbd-i { transition: transform var(--t) var(--ease); }
.lbd-dcard:hover .lbd-dcard__cta { background: var(--c-primary); color: #fff; }
.lbd-dcard:hover .lbd-dcard__cta .lbd-i { transform: translateX(3px); }
@media (min-width: 640px)  { .lbd-dcard__title { font-size: 17px; } }
@media (min-width: 1024px) { .lbd-dcard__title { font-size: 18px; } }

/* Shared "no image" placeholder: initials on a quiet blue field */
.lbd-ph { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-900) 100%); }
.lbd-ph span { font-family: var(--f-display); font-size: 44px; font-weight: 600; letter-spacing: .04em; color: var(--c-gold-light); }
.is-empty > .lbd-ph { display: flex; }

/* 9. About split ----------------------------------------------------------- */
.lbd-about { display: grid; gap: 28px; align-items: start; }
.lbd-about__media { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); background: var(--c-accent); aspect-ratio: 4 / 3; }
.lbd-about__media img { width: 100%; height: 100%; object-fit: cover; }
.lbd-about__media::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(15, 61, 94, .08); pointer-events: none; }
.lbd-about__text { font-size: 16px; line-height: 1.8; color: var(--c-text); }
.lbd-about__text p + p { margin-top: 1em; }
.lbd-about__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
@media (min-width: 992px) {
    .lbd-about { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; }
    .lbd-about__media { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* 10. Head of department --------------------------------------------------- */
.lbd-hod {
    display: grid; gap: 24px; align-items: center;
    padding: 28px; border-radius: var(--r-lg);
    background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
}
.lbd-hod::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c-gold); }
.lbd-hod__photo { position: relative; width: 148px; height: 148px; border-radius: 50%; overflow: hidden; background: var(--c-accent); box-shadow: 0 0 0 6px var(--c-surface), 0 0 0 7px rgba(184, 138, 68, .55); }
.lbd-hod__photo img { width: 100%; height: 100%; object-fit: cover; }
.lbd-hod__photo .lbd-ph span { font-size: 40px; }
.lbd-hod__role { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--c-gold-text); }
.lbd-hod__name { margin-top: 6px; font-family: var(--f-display); font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 600; }
.lbd-hod__desig { margin-top: 2px; color: var(--c-muted); font-size: 15px; }
.lbd-hod__facts { display: grid; gap: 8px; margin: 16px 0 20px; padding: 0; list-style: none; font-size: 14px; color: var(--c-text); }
.lbd-hod__facts li { display: flex; gap: 10px; align-items: flex-start; }
.lbd-hod__facts .lbd-i { color: var(--c-gold); margin-top: 3px; }
.lbd-hod__facts a { word-break: break-word; }
.lbd-hod__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 768px) { .lbd-hod { grid-template-columns: auto 1fr; gap: 40px; padding: 36px 40px; } .lbd-hod__photo { width: 184px; height: 184px; } }

/* 11. Faculty cards -------------------------------------------------------- */
.lbd-fcard {
    display: flex; flex-direction: column; height: 100%;
    padding: 24px 20px 20px; text-align: center;
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.lbd-fcard:hover, .lbd-fcard:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(184, 138, 68, .55); }
.lbd-fcard__photo { position: relative; width: 112px; height: 112px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden; background: var(--c-accent); box-shadow: 0 0 0 4px var(--c-surface), 0 0 0 5px var(--c-line-strong); transition: box-shadow var(--t) var(--ease); }
.lbd-fcard:hover .lbd-fcard__photo { box-shadow: 0 0 0 4px var(--c-surface), 0 0 0 5px var(--c-gold); }
.lbd-fcard__photo img { width: 100%; height: 100%; object-fit: cover; }
.lbd-fcard__photo .lbd-ph span { font-size: 34px; }
.lbd-fcard__name { font-family: var(--f-body); font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--c-primary); }
.lbd-fcard__desig { margin-top: 4px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--c-gold-text); }
.lbd-fcard__facts { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--c-line); display: grid; gap: 8px; text-align: left; font-size: 13px; color: var(--c-muted); }
.lbd-fcard__facts li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.lbd-fcard__facts .lbd-i { color: var(--c-gold); margin-top: 2px; width: 15px; height: 15px; }
.lbd-fcard__facts > li > span { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lbd-fcard__facts a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-muted) !important; }
.lbd-fcard__facts a:hover { color: var(--c-primary) !important; }
.lbd-fcard__actions { margin-top: auto; padding-top: 18px; }
.lbd-fcard__actions .lbd-btn { width: 100%; }
.lbd-fcard__note { margin-top: auto; padding-top: 18px; font-size: 12px; color: var(--c-muted); }

.lbd-subhead { display: flex; align-items: center; gap: 14px; margin: 48px 0 22px; font-family: var(--f-display); font-size: 1.6rem; font-weight: 600; color: var(--c-primary); }
.lbd-subhead::after { content: ''; flex: 1; height: 1px; background: var(--c-line); }
.lbd-subhead small { font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--c-gold-text); letter-spacing: .04em; }

/* 12. Contact -------------------------------------------------------------- */
.lbd-contact { display: grid; gap: 24px; }
.lbd-contact__card { padding: 28px; border-radius: var(--r-lg); background: var(--c-primary); color: rgba(255, 255, 255, .86); position: relative; overflow: hidden; }
.lbd-contact__card::after { content: ''; position: absolute; width: 260px; height: 260px; right: -110px; bottom: -110px; border: 1px solid rgba(217, 185, 126, .25); border-radius: 50%; }
.lbd-contact__title { font-family: var(--f-display); font-size: 1.9rem; font-weight: 600; color: #fff; }
.lbd-contact__card p.lbd-contact__intro { margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, .72); }
.lbd-contact__list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; }
.lbd-contact__list li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; }
.lbd-contact__list .lbd-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .08); color: var(--c-gold-light); }
.lbd-contact__list small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.lbd-contact__list a { color: #fff !important; text-decoration: none; }
.lbd-contact__list a:hover { color: var(--c-gold-light) !important; text-decoration: underline; }
.lbd-map { position: relative; min-height: 300px; border-radius: var(--r-lg); overflow: hidden; background: var(--c-accent); border: 1px solid var(--c-line); }
.lbd-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.35) contrast(1.05); }
@media (min-width: 992px) { .lbd-contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .lbd-contact__card { padding: 40px; } }

/* 13. Empty states ---------------------------------------------------------- */
.lbd-empty { padding: 48px 24px; text-align: center; color: var(--c-muted); border: 1px dashed var(--c-line-strong); border-radius: var(--r-md); background: var(--c-surface); }
.lbd-empty strong { display: block; margin-bottom: 4px; font-family: var(--f-display); font-size: 1.6rem; color: var(--c-primary); }
[hidden] { display: none !important; }

/* 14. Stream toolbar (jump links + search) --------------------------------- */
.lbd-toolbar {
    position: relative; z-index: 2; margin-top: -28px;
    display: flex; flex-direction: column; gap: 12px; padding: 12px;
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); box-shadow: var(--shadow-md);
}
.lbd-tabs { display: flex; gap: 6px; }
.lbd-tab { flex: 1; text-align: center; padding: 9px 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; color: var(--c-primary) !important; text-decoration: none !important; transition: background var(--t) var(--ease); }
.lbd-tab:hover { background: var(--c-accent); }
.lbd-tab span { color: var(--c-muted); font-weight: 500; margin-left: 4px; }
.lbd-search { position: relative; display: block; }
.lbd-search .lbd-i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.lbd-search input {
    width: 100%; height: 46px; padding: 0 16px 0 42px;
    border: 1px solid var(--c-line-strong); border-radius: 12px; background: var(--c-bg);
    font: 400 15px var(--f-body); color: var(--c-text);
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.lbd-search input::placeholder { color: #6B7280; }
.lbd-search input:focus { outline: none; border-color: var(--c-primary); background: #fff; box-shadow: 0 0 0 4px rgba(15, 61, 94, .12); }
@media (min-width: 768px) {
    .lbd-toolbar { flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 12px 12px 16px; margin-top: -32px; }
    .lbd-tab { flex: none; }
    .lbd-search { width: 340px; }
}
.lbd-stream + .lbd-stream { margin-top: 64px; }
.lbd-stream { scroll-margin-top: calc(var(--header-h) + 24px); }

/* 15. Profile page --------------------------------------------------------- */
.lbd-profile-hero { background: var(--c-primary-900); position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 32px 0 176px; }
.lbd-profile-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 85% 0%, rgba(184, 138, 68, .18), transparent 55%), linear-gradient(180deg, var(--c-primary-900), var(--c-primary-700)); }
.lbd-profile-card {
    position: relative; z-index: 2; margin-top: -96px;
    display: grid; gap: 24px; padding: 24px;
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.lbd-profile-card__photo { position: relative; width: 148px; height: 148px; border-radius: 50%; overflow: hidden; background: var(--c-accent); box-shadow: 0 0 0 6px var(--c-surface), 0 0 0 7px rgba(184, 138, 68, .6); margin-top: -70px; }
.lbd-profile-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.lbd-profile-card__photo .lbd-ph span { font-size: 44px; }
.lbd-profile-card__dept { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--c-gold-text); }
.lbd-profile-card h1 { margin-top: 6px; font-family: var(--f-display); font-weight: 600; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.05; }
.lbd-profile-card__desig { margin-top: 4px; font-size: 16px; color: var(--c-muted); }
.lbd-facts { display: grid; gap: 14px 28px; margin: 20px 0 0; padding: 20px 0 0; border-top: 1px solid var(--c-line); }
.lbd-facts div { min-width: 0; }
.lbd-facts dt { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--c-muted); }
.lbd-facts dd { margin: 3px 0 0; font-size: 15px; font-weight: 500; color: var(--c-text); word-break: break-word; }
.lbd-profile-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (min-width: 640px) { .lbd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) {
    .lbd-profile-hero { padding-bottom: 120px; }
    .lbd-profile-card { grid-template-columns: auto 1fr; gap: 40px; padding: 36px 40px; align-items: start; }
    .lbd-profile-card__photo { width: 184px; height: 184px; margin-top: 0; }
    .lbd-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.lbd-profile-body { padding: 40px 0 88px; }
.lbd-profile-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .lbd-profile-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; } }

/* "On this page" navigation: chip bar on small screens, sticky sidebar on desktop */
.lbd-toc { position: sticky; top: var(--header-h); z-index: 20; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter); background: rgba(250, 250, 250, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-line); }
.lbd-toc__title { display: none; }
.lbd-toc__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lbd-toc__list::-webkit-scrollbar { display: none; }
.lbd-toc__list a {
    display: block; white-space: nowrap; padding: 7px 14px; border-radius: var(--r-pill);
    background: var(--c-surface); border: 1px solid var(--c-line);
    font-size: 13px; font-weight: 500; color: var(--c-muted) !important; text-decoration: none !important;
    transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.lbd-toc__list a:hover { color: var(--c-primary) !important; border-color: var(--c-line-strong); }
.lbd-toc__list a.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff !important; }
@media (min-width: 1100px) {
    .lbd-toc { top: calc(var(--header-h) + 24px); margin: 0; padding: 22px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; }
    .lbd-toc__title { display: block; margin-bottom: 12px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--c-gold-text); }
    .lbd-toc__list { flex-direction: column; gap: 2px; overflow: visible; }
    .lbd-toc__list a {
        position: relative; white-space: normal; padding: 8px 12px 8px 16px; border: 0; border-radius: 8px; background: none; line-height: 1.4;
    }
    .lbd-toc__list a::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--c-line); transition: background var(--t) var(--ease); }
    .lbd-toc__list a:hover { background: var(--c-accent); }
    .lbd-toc__list a.is-active { background: var(--c-accent); color: var(--c-primary) !important; font-weight: 600; }
    .lbd-toc__list a.is-active::before { background: var(--c-gold); }
}

/* 16. Profile sections + responsive tables --------------------------------- */
.lbd-profile-main { display: grid; gap: 20px; min-width: 0; }
.lbd-profile-main > .row { display: contents; }
.lbd-profile-main .col-lg-12 { min-width: 0; }
.lbd-profile-main .teachers-right {
    margin: 0 !important; padding: 24px 20px;
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
    scroll-margin-top: calc(var(--header-h) + 72px);
}
.lbd-profile-main .single-dashboard { padding: 0 !important; }
.lbd-psec__title {
    display: flex; align-items: center; gap: 12px;
    margin: 0 0 18px !important; font-family: var(--f-display); font-size: 1.55rem; font-weight: 600; line-height: 1.2; color: var(--c-primary);
}
.lbd-psec__title::before { content: ''; width: 4px; height: 22px; border-radius: 2px; background: var(--c-gold); flex: none; }
@media (min-width: 768px) { .lbd-profile-main .teachers-right { padding: 30px 32px; } .lbd-psec__title { font-size: 1.75rem; } }
@media (min-width: 1100px) { .lbd-toc { scroll-margin-top: 0; } .lbd-profile-main .teachers-right { scroll-margin-top: calc(var(--header-h) + 24px); } }

.lbd-profile-main .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lbd-profile-main table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; color: var(--c-text); margin: 0; }
.lbd-profile-main thead th {
    padding: 12px 14px; text-align: left !important; vertical-align: bottom;
    font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted);
    background: var(--c-accent); border-bottom: 1px solid var(--c-line-strong); white-space: nowrap;
}
.lbd-profile-main thead th:first-child { border-top-left-radius: 10px; }
.lbd-profile-main thead th:last-child { border-top-right-radius: 10px; }
.lbd-profile-main tbody td { padding: 14px; vertical-align: top; text-align: left !important; border-bottom: 1px solid var(--c-line); line-height: 1.55; }
.lbd-profile-main tbody tr:last-child td { border-bottom: 0; }
.lbd-profile-main tbody tr { transition: background var(--t) var(--ease); }
.lbd-profile-main tbody tr:hover { background: #F6F8FB; }
.lbd-profile-main td a { font-weight: 600; }
.lbd-profile-main .dataTables_wrapper { width: 100%; }
/* DataTables sort indicators (its own stylesheet is not loaded) */
.lbd-profile-main th.sorting, .lbd-profile-main th.sorting_asc, .lbd-profile-main th.sorting_desc { cursor: pointer; position: relative; padding-right: 26px; }
.lbd-profile-main th.sorting::after, .lbd-profile-main th.sorting_asc::after, .lbd-profile-main th.sorting_desc::after { content: ''; position: absolute; right: 10px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; opacity: .35; transform: rotate(45deg); }
.lbd-profile-main th.sorting_asc::after { transform: rotate(-135deg); margin-top: -1px; opacity: 1; color: var(--c-gold-text); }
.lbd-profile-main th.sorting_desc::after { opacity: 1; color: var(--c-gold-text); }

/* Phones and tablets: every table row becomes a labelled card (labels from data-label) */
@media (max-width: 991.98px) {
    .lbd-profile-main table, .lbd-profile-main tbody, .lbd-profile-main tr, .lbd-profile-main td { display: block; width: 100% !important; }
    .lbd-profile-main thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .lbd-profile-main tbody tr { padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-bg); }
    .lbd-profile-main tbody tr:hover { background: var(--c-bg); }
    .lbd-profile-main tbody td { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 12px; padding: 7px 0; border: 0 !important; }
    .lbd-profile-main tbody td::before { content: attr(data-label); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); padding-top: 2px; }
    .lbd-profile-main tbody td:not([data-label])::before, .lbd-profile-main tbody td[data-label=""]::before { content: none; }
    .lbd-profile-main tbody td:not([data-label]), .lbd-profile-main tbody td[data-label=""] { grid-template-columns: 1fr; }
}

/* 17. Timeline (qualifications, colleges served) --------------------------- */
.lbd-timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.lbd-timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--c-gold), var(--c-line)); }
.lbd-timeline__item { position: relative; padding: 0 0 22px; }
.lbd-timeline__item:last-child { padding-bottom: 0; }
.lbd-timeline__item::before { content: ''; position: absolute; left: -26px; top: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-gold); }
.lbd-timeline__item:first-child::before { background: var(--c-gold); }
.lbd-timeline__when { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-gold-text); }
.lbd-timeline__what { margin-top: 2px; font-size: 16px; font-weight: 600; color: var(--c-primary); line-height: 1.4; }
.lbd-timeline__where { margin-top: 2px; font-size: 14px; color: var(--c-muted); }
.lbd-timeline__where .lbd-sep { margin: 0 6px; color: var(--c-line-strong); }

/* 18. Footer --------------------------------------------------------------- */
.lbd-footer { background: var(--c-primary-900); color: rgba(255, 255, 255, .72); font-size: 14px; }
.lbd-footer__top { display: grid; gap: 32px; padding: 56px 0 40px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lbd-footer__top > * { min-width: 0; }
.lbd-footer__brand { grid-column: 1 / -1; }
.lbd-footer__brand p { margin-top: 14px; max-width: 320px; line-height: 1.7; }
.lbd-footer__logo { display: inline-block; padding: 10px 14px; background: #fff; border-radius: 12px; }
.lbd-footer__logo img { height: 36px; width: auto; }
.lbd-footer__title { margin: 0 0 14px !important; font-family: var(--f-body); font-size: 12px !important; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--c-gold-light) !important; }
.lbd-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.lbd-footer a { color: rgba(255, 255, 255, .78) !important; text-decoration: none; transition: color var(--t) var(--ease); }
.lbd-footer a:hover { color: #fff !important; text-decoration: underline; }
.lbd-footer__title--spaced { margin-top: 28px !important; }
.lbd-footer__contact li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.lbd-footer__contact a { overflow-wrap: anywhere; }
.lbd-footer__contact .lbd-i { color: var(--c-gold-light); margin-top: 2px; }
.lbd-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; color: rgba(255, 255, 255, .6); }
@media (min-width: 768px) { .lbd-footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .lbd-footer__top { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); padding: 72px 0 48px; } .lbd-footer__brand { grid-column: auto; } }

.lbd-top {
    position: fixed; right: 18px; bottom: 18px; z-index: 90;
    width: 46px; height: 46px; border-radius: 50%; border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--c-primary); color: #fff; box-shadow: var(--shadow-lg); cursor: pointer;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t), background var(--t) var(--ease);
}
.lbd-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.lbd-top:hover { background: var(--c-primary-700); }

/* 19. Motion --------------------------------------------------------------- */
@keyframes lbd-fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.lbd-js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 350ms var(--ease), transform 350ms var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.lbd-js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .lbd-page *, .lbd-page *::before, .lbd-page *::after { transition: none !important; animation: none !important; }
    .lbd-js [data-reveal] { opacity: 1; transform: none; }
    .lbd-dcard:hover, .lbd-fcard:hover { transform: none; }
}

/* 20. Legacy markup support (profile sections still use these class names) - */
.lbd-page .container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.lbd-page .text-center { text-align: center; }
.lbd-page .text-left { text-align: left; }
.lbd-page .w-100 { width: 100%; }
.lbd-page .dNo { display: none !important; }       /* fields a teacher chose to hide */

@media print {
    .lbd-header, .lbd-topbar, .lbd-footer, .lbd-toc, .lbd-top, .lbd-toolbar { display: none !important; }
    .lbd-hero, .lbd-profile-hero { background: none; color: #000; padding: 0; min-height: 0; }
    .lbd-hero h1, .lbd-crumbs li { color: #000; }
}
