/* =====================================================================
   Public website — complete UI (navy + gold identity)
   Shared by every visitor-facing page. Legacy class names are kept so
   older pages keep working; new academics / teachers / gallery styles
   are appended at the end.
   ===================================================================== */

:root {
    --pub-primary: #0d5cb6;
    --pub-primary-dark: #0b3b6f;
    --pub-primary-deep: #071f3d;
    --pub-accent: #c9a227;
    --pub-accent-light: #f0c14b;
    --pub-ink: #0f1b2d;
    --pub-mut: #5b6b80;
    --pub-bg: #f4f7fc;
    --pub-card: #ffffff;
    --pub-line: #e3eaf5;
    --pub-radius: 18px;
    --pub-shadow: 0 18px 45px rgba(11, 59, 111, .10);
    --pub-shadow-sm: 0 8px 22px rgba(11, 59, 111, .08);
}

* { -webkit-tap-highlight-color: transparent; }

body {
    background: var(--pub-bg);
    color: var(--pub-ink);
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

.pub-container { max-width: 1180px; }

::selection { background: var(--pub-accent-light); color: var(--pub-primary-deep); }

/* ============================ NAVBAR ============================ */
.pub-nav {
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--pub-line);
    padding: .55rem 0;
    z-index: 1030;
}
.pub-nav .navbar-brand { font-weight: 800; color: var(--pub-primary-dark); }
.pub-nav .navbar-brand img { height: 42px; width: auto; border-radius: 10px; }
.pub-nav .navbar-brand span { letter-spacing: .2px; }

.brand-badge {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-primary-dark));
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem;
    box-shadow: 0 8px 18px rgba(13, 92, 182, .35);
}

.pub-nav .nav-link {
    font-weight: 600; font-size: .93rem; color: #23364f;
    border-radius: 10px; padding: .5rem .8rem !important;
    transition: .22s;
}
.pub-nav .nav-link:hover { color: var(--pub-primary); background: rgba(13, 92, 182, .07); }
.pub-nav .nav-link.active { color: var(--pub-primary); }
.pub-nav .nav-link.active::after {
    content: ""; display: block; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--pub-primary), var(--pub-accent));
    margin-top: 3px;
}

.pub-btn-login {
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-primary-dark));
    color: #fff !important; font-weight: 700; border-radius: 999px;
    padding: .48rem 1.15rem !important; box-shadow: 0 10px 22px rgba(11, 59, 111, .28);
    transition: .25s;
}
.pub-btn-login:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(11, 59, 111, .34); }

/* Academics dropdown */
.pub-nav .dropdown-menu {
    border: 1px solid var(--pub-line); border-radius: 14px;
    box-shadow: var(--pub-shadow); padding: .5rem; margin-top: .4rem;
    background: #fff;
}
.pub-nav .dropdown-menu .dropdown-item {
    border-radius: 9px; font-weight: 600; font-size: .89rem; color: #23364f;
    padding: .5rem .75rem; display: flex; align-items: center; gap: .55rem;
}
.pub-nav .dropdown-menu .dropdown-item i { color: var(--pub-primary); width: 18px; text-align: center; }
.pub-nav .dropdown-menu .dropdown-item:hover { background: rgba(13, 92, 182, .08); color: var(--pub-primary); }
.pub-nav .dropdown-menu .dropdown-divider { border-color: var(--pub-line); margin: .35rem 0; }
.pub-nav .dropdown-menu .dropdown-header {
    font-size: .7rem; text-transform: uppercase; letter-spacing: 1px;
    color: var(--pub-accent); font-weight: 800;
}

.pub-topstrip {
    background: linear-gradient(90deg, var(--pub-primary-deep), var(--pub-primary-dark));
    color: #cfe0f5; font-size: .8rem; padding: .35rem 0;
}
.pub-topstrip a { color: #fff; text-decoration: none; font-weight: 600; }
.pub-topstrip i { color: var(--pub-accent-light); margin-right: .35rem; }

/* ============================ HERO ============================ */
.pub-hero {
    position: relative;
    padding: 5.2rem 0 4.6rem;
    background:
        radial-gradient(1100px 520px at 85% -10%, rgba(201, 162, 39, .18), transparent 60%),
        linear-gradient(150deg, var(--pub-primary-deep) 0%, var(--pub-primary-dark) 45%, var(--pub-primary) 100%);
    color: #fff;
    overflow: hidden;
}
.pub-hero::after {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(700px 420px at 30% 30%, #000, transparent 75%);
    pointer-events: none;
}
.pub-hero > * { position: relative; z-index: 2; }

.pub-hero h1 {
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    font-weight: 800; line-height: 1.15; letter-spacing: .3px;
}
.pub-hero .lead { color: #d5e4f7; font-size: 1.06rem; }

.pub-hero-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: 1; }
.pub-blob-1 { width: 420px; height: 420px; background: #1d7fd6; top: -120px; left: -100px; }
.pub-blob-2 { width: 340px; height: 340px; background: var(--pub-accent); bottom: -140px; right: -80px; opacity: .35; }
.pub-blob-3 { width: 260px; height: 260px; background: #4f9bea; top: 40%; left: 46%; opacity: .25; }

.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff; font-weight: 600; font-size: .82rem;
    padding: .4rem 1rem; border-radius: 999px; margin-bottom: 1.1rem;
    backdrop-filter: blur(6px);
}
.hero-badge i { color: var(--pub-accent-light); }

.btn-hero {
    border-radius: 999px; font-weight: 700; padding: .72rem 1.5rem;
    display: inline-flex; align-items: center; gap: .45rem; transition: .25s;
    text-decoration: none;
}
.btn-hero-primary {
    background: linear-gradient(135deg, var(--pub-accent-light), var(--pub-accent));
    color: var(--pub-primary-deep) !important;
    box-shadow: 0 12px 26px rgba(201, 162, 39, .4);
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(201, 162, 39, .5); }
.btn-hero-ghost {
    border: 1.5px solid rgba(255, 255, 255, .55); color: #fff !important;
}
.btn-hero-ghost:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }

.pub-hero-chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.6rem; }
.pub-hero-chips span {
    display: inline-flex; align-items: center; gap: .45rem;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px; padding: .38rem .9rem; font-size: .8rem; font-weight: 600;
}
.pub-hero-chips i { color: var(--pub-accent-light); }

.pub-hero-media {
    position: relative; display: inline-block; max-width: 100%;
}
.pub-hero-media img {
    max-height: 380px; object-fit: contain;
    border-radius: 26px;
    box-shadow: 0 30px 70px rgba(4, 20, 40, .45);
    border: 6px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .06);
}

/* ======================= REVEAL ANIMATION ======================= */
.pub-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1); }
.pub-reveal-d1 { transition-delay: .1s; }
.pub-reveal-d2 { transition-delay: .2s; }
.pub-reveal-d3 { transition-delay: .3s; }
.pub-reveal.pub-in { opacity: 1; transform: none; }

/* ========================= QUICK LINKS ========================== */
.pub-quicklinks { margin-top: -3.2rem; position: relative; z-index: 5; }
.pub-qlink {
    display: flex; align-items: center; gap: .95rem;
    background: var(--pub-card); border: 1px solid var(--pub-line);
    border-radius: var(--pub-radius); padding: 1.15rem 1.25rem;
    text-decoration: none; color: var(--pub-ink);
    box-shadow: var(--pub-shadow-sm); transition: .28s;
}
.pub-qlink:hover { transform: translateY(-5px); box-shadow: var(--pub-shadow); border-color: rgba(13, 92, 182, .3); }
.pub-qlink h6 { margin: 0 0 .15rem; font-weight: 700; color: var(--pub-primary-dark); }
.pub-qlink small { color: var(--pub-mut); font-size: .8rem; }
.pub-qlink .q-icon {
    width: 52px; height: 52px; flex: 0 0 52px; border-radius: 15px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: #fff;
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-primary-dark));
    box-shadow: 0 10px 20px rgba(13, 92, 182, .3);
}
.pub-qlink .q-arrow { margin-left: auto; color: var(--pub-accent); transition: .25s; }
.pub-qlink:hover .q-arrow { transform: translateX(5px); }

/* ========================== SECTIONS ============================ */
.pub-section { padding: 4.2rem 0; }
.pub-section-soft { background: linear-gradient(180deg, #fff, #f0f5fd); }

.pub-eyebrow {
    display: inline-block; font-size: .74rem; font-weight: 800;
    letter-spacing: 2.4px; text-transform: uppercase;
    color: var(--pub-accent); margin-bottom: .5rem;
}
.pub-section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: var(--pub-primary-deep); }
.pub-section-sub { color: var(--pub-mut); max-width: 620px; }

.pub-card {
    background: var(--pub-card); border: 1px solid var(--pub-line);
    border-radius: var(--pub-radius); box-shadow: var(--pub-shadow-sm);
    transition: .28s; height: 100%;
}
.pub-card:hover { transform: translateY(-6px); box-shadow: var(--pub-shadow); }
.pub-card-icon {
    width: 56px; height: 56px; border-radius: 16px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 1.35rem; color: #fff;
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-accent));
}

.pub-director-media img { border-radius: 26px; }

.pub-quote {
    border-left: 4px solid var(--pub-accent);
    padding-left: 1rem; color: var(--pub-primary-dark); font-weight: 500;
}

.pub-mission-card {
    background: var(--pub-card); border: 1px solid var(--pub-line);
    border-radius: var(--pub-radius); padding: 1.9rem; height: 100%;
    box-shadow: var(--pub-shadow-sm); transition: .28s; position: relative; overflow: hidden;
}
.pub-mission-card:hover { transform: translateY(-6px); box-shadow: var(--pub-shadow); }
.pub-mission-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, var(--pub-primary), var(--pub-accent));
}
.pub-mission-card h5, .pub-mission-card h4 { font-weight: 800; color: var(--pub-primary-deep); }
.pub-mission-card .m-icon {
    width: 58px; height: 58px; border-radius: 16px; font-size: 1.4rem; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--pub-primary-dark), var(--pub-primary));
}

/* ======================== ANNOUNCEMENTS ========================= */
.pub-announcement {
    background: var(--pub-card); border: 1px solid var(--pub-line);
    border-radius: var(--pub-radius); padding: 1.4rem 1.5rem;
    box-shadow: var(--pub-shadow-sm); transition: .28s;
}
.pub-announcement:hover { transform: translateY(-4px); box-shadow: var(--pub-shadow); }
.pub-announcement .a-title { font-weight: 700; color: var(--pub-primary-deep); font-size: 1.02rem; }
.pub-announcement .a-content { color: var(--pub-mut); font-size: .9rem; line-height: 1.6; }
.pub-announcement .a-meta { color: var(--pub-mut); font-size: .78rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.date-chip {
    background: rgba(13, 92, 182, .08); color: var(--pub-primary);
    border-radius: 999px; padding: .2rem .7rem; font-weight: 600;
}

/* ============================= CTA ============================== */
.pub-cta {
    background:
        radial-gradient(600px 300px at 15% 0%, rgba(201, 162, 39, .25), transparent 60%),
        linear-gradient(135deg, var(--pub-primary-dark), var(--pub-primary-deep));
    color: #fff; border-radius: 26px; padding: 3.2rem 2rem; text-align: center;
    box-shadow: var(--pub-shadow);
}
.pub-cta h2 { font-weight: 800; }
.pub-gradient-text {
    background: linear-gradient(90deg, var(--pub-accent-light), var(--pub-accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btn-cta {
    background: linear-gradient(135deg, var(--pub-accent-light), var(--pub-accent));
    color: var(--pub-primary-deep); font-weight: 700; border-radius: 999px;
    padding: .72rem 1.7rem; display: inline-flex; align-items: center; gap: .45rem;
    text-decoration: none; transition: .25s;
    box-shadow: 0 12px 26px rgba(201, 162, 39, .4);
}
.btn-cta:hover { transform: translateY(-2px); }

/* ============================ FOOTER ============================ */
.pub-footer {
    background: linear-gradient(180deg, var(--pub-primary-deep), #05152b);
    color: #b9cbe3; padding-top: 3.4rem; margin-top: 2rem;
}
.pub-footer h6, .pub-footer h5 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.pub-footer a { color: #b9cbe3; text-decoration: none; display: block; padding: .22rem 0; font-size: .89rem; transition: .2s; }
.pub-footer a:hover { color: var(--pub-accent-light); transform: translateX(4px); }
.pub-footer p { font-size: .88rem; }
.pub-footer .social a {
    width: 38px; height: 38px; border-radius: 11px; display: inline-flex;
    align-items: center; justify-content: center; background: rgba(255,255,255,.08);
    margin-right: .4rem; padding: 0; transition: .25s;
}
.pub-footer .social a:hover { background: var(--pub-accent); color: var(--pub-primary-deep); transform: translateY(-3px); }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2.4rem;
    padding: 1rem 0 .9rem; font-size: .82rem; color: #8fa6c4;
}
.footer-bottom .dev-credit { color: #fff; font-weight: 700; }
.footer-bottom .dev-credit a { display: inline; color: var(--pub-accent-light); padding: 0; }

/* ====================== INNER PAGE HERO ========================= */
.pub-page-hero {
    background:
        radial-gradient(900px 380px at 88% -20%, rgba(201, 162, 39, .22), transparent 60%),
        linear-gradient(135deg, var(--pub-primary-dark), var(--pub-primary-deep));
    color: #fff; padding: 2.9rem 0 2.5rem; position: relative; overflow: hidden;
}
.pub-page-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); font-weight: 800; margin: 0; }
.pub-page-hero .pub-crumb { font-size: .82rem; color: #b9cbe3; margin-bottom: .35rem; }
.pub-page-hero .pub-crumb a { color: var(--pub-accent-light); text-decoration: none; font-weight: 600; }
.pub-page-hero .pub-crumb a:hover { text-decoration: underline; }
.pub-page-hero p { color: #cfe0f5; margin: .4rem 0 0; max-width: 720px; }

/* ========================== SEARCH BAR ========================== */
.pub-searchbar { margin-top: -1.7rem; position: relative; z-index: 6; }
.pub-searchbar .pub-search-inner {
    background: var(--pub-card); border: 1px solid var(--pub-line);
    border-radius: var(--pub-radius); box-shadow: var(--pub-shadow);
    padding: .7rem .8rem; display: flex; align-items: center; gap: .6rem;
}
.pub-searchbar i { color: var(--pub-primary); font-size: 1.05rem; }
.pub-searchbar input {
    border: 0; outline: 0; flex: 1; font-size: .95rem; font-weight: 500;
    background: transparent; color: var(--pub-ink);
}
.pub-searchbar .search-count { font-size: .78rem; color: var(--pub-mut); font-weight: 600; white-space: nowrap; }

/* ====================== DEPARTMENT CARDS ======================== */
.pub-dep-card {
    background: var(--pub-card); border: 1px solid var(--pub-line);
    border-radius: var(--pub-radius); padding: 1.4rem; height: 100%;
    box-shadow: var(--pub-shadow-sm); transition: .28s; display: flex; flex-direction: column;
}
.pub-dep-card:hover { transform: translateY(-6px); box-shadow: var(--pub-shadow); border-color: rgba(13, 92, 182, .3); }
.pub-dep-card .dep-top { display: flex; align-items: center; gap: .85rem; margin-bottom: .7rem; }
.pub-dep-card .dep-icon {
    width: 50px; height: 50px; flex: 0 0 50px; border-radius: 14px; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem;
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-primary-dark));
}
.pub-dep-card h5 { margin: 0; font-weight: 800; color: var(--pub-primary-deep); font-size: 1.05rem; }
.pub-dep-card .dep-code { font-size: .74rem; font-weight: 700; color: var(--pub-accent); text-transform: uppercase; letter-spacing: 1px; }
.pub-dep-card p { color: var(--pub-mut); font-size: .85rem; flex-grow: 1; }
.pub-dep-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.pub-stat-pill {
    background: rgba(13, 92, 182, .08); color: var(--pub-primary);
    border-radius: 999px; font-size: .74rem; font-weight: 700; padding: .25rem .7rem;
    display: inline-flex; align-items: center; gap: .35rem;
}
.pub-dep-actions { display: flex; gap: .5rem; }
.pub-dep-actions a {
    flex: 1; text-align: center; border-radius: 10px; padding: .5rem .4rem;
    font-size: .82rem; font-weight: 700; text-decoration: none; transition: .22s;
    border: 1.5px solid var(--pub-line); color: var(--pub-primary-dark);
}
.pub-dep-actions a:hover { background: var(--pub-primary); border-color: var(--pub-primary); color: #fff; }
.pub-dep-actions a.solid { background: var(--pub-primary); border-color: var(--pub-primary); color: #fff; }
.pub-dep-actions a.solid:hover { background: var(--pub-primary-dark); }

/* ======================= SUBJECT CARDS ========================== */
.pub-subject-card {
    background: var(--pub-card); border: 1px solid var(--pub-line);
    border-radius: 14px; padding: .95rem 1.05rem; height: 100%;
    box-shadow: var(--pub-shadow-sm); transition: .25s; text-decoration: none; display: block;
}
.pub-subject-card:hover { transform: translateY(-4px); box-shadow: var(--pub-shadow); border-color: rgba(13, 92, 182, .3); }
.pub-subject-card .s-name { font-weight: 800; color: var(--pub-primary-deep); font-size: .98rem; display: block; }
.pub-subject-card .s-meta { color: var(--pub-mut); font-size: .76rem; font-weight: 600; }
.pub-subject-card .s-go { color: var(--pub-accent); font-size: .78rem; font-weight: 700; }

/* ======================== TEACHER CARDS ========================= */
.pub-head-card {
    background:
        radial-gradient(500px 200px at 90% 0%, rgba(201, 162, 39, .16), transparent 65%),
        var(--pub-card);
    border: 1.5px solid rgba(201, 162, 39, .45);
    border-radius: var(--pub-radius); padding: 2.4rem 1.5rem 1.5rem; height: 100%;
    box-shadow: var(--pub-shadow); position: relative; overflow: hidden;
}
.pub-head-card .head-ribbon {
    position: absolute; top: 14px; right: -42px; transform: rotate(38deg);
    background: linear-gradient(135deg, var(--pub-accent-light), var(--pub-accent));
    color: var(--pub-primary-deep); font-size: .68rem; font-weight: 800;
    letter-spacing: 1px; padding: .28rem 3rem; text-transform: uppercase;
}
.pub-teacher-grid { row-gap: 1.2rem; }
.pub-teacher-card {
    background: var(--pub-card); border: 1px solid var(--pub-line);
    border-radius: var(--pub-radius); padding: 1.3rem 1.2rem; height: 100%;
    text-align: center; box-shadow: var(--pub-shadow-sm); transition: .28s;
}
.pub-teacher-card:hover { transform: translateY(-6px); box-shadow: var(--pub-shadow); }
.pub-teacher-card.pt-head { border-color: rgba(201, 162, 39, .55); }
.pub-teacher-card .pt-photo {
    width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto .7rem;
    border: 4px solid #fff; box-shadow: 0 10px 24px rgba(11, 59, 111, .22); display: block;
}
.pub-teacher-card .pt-placeholder {
    width: 96px; height: 96px; border-radius: 50%; margin: 0 auto .7rem; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800;
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-primary-dark));
    border: 4px solid #fff; box-shadow: 0 10px 24px rgba(11, 59, 111, .22);
}
.pub-teacher-card .pt-name { font-weight: 800; color: var(--pub-primary-deep); margin: 0; font-size: 1.02rem; }
.pub-teacher-card .pt-role {
    font-size: .76rem; font-weight: 700; color: var(--pub-accent);
    text-transform: uppercase; letter-spacing: .8px;
}
.pub-teacher-card .pt-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    background: linear-gradient(135deg, var(--pub-accent-light), var(--pub-accent));
    color: var(--pub-primary-deep); font-size: .68rem; font-weight: 800;
    border-radius: 999px; padding: .2rem .7rem; text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: .4rem;
}
.pt-info { list-style: none; margin: .9rem 0 0; padding: 0; text-align: left; }
.pt-info li {
    display: flex; justify-content: space-between; gap: .6rem;
    border-bottom: 1px dashed var(--pub-line); padding: .38rem 0; font-size: .83rem;
}
.pt-info li:last-child { border-bottom: 0; }
.pt-info .k { color: var(--pub-mut); font-weight: 600; }
.pt-info .v { color: var(--pub-ink); font-weight: 700; text-align: right; }
.pt-subjects { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; margin-top: .8rem; }
.pt-subjects span {
    background: rgba(13, 92, 182, .08); color: var(--pub-primary);
    border-radius: 999px; padding: .18rem .6rem; font-size: .7rem; font-weight: 700;
}

/* ====================== SUBJECTS / TABS ========================= */
.pub-tabs { border-bottom: 2px solid var(--pub-line); margin-bottom: 1.6rem; display: flex; gap: .3rem; flex-wrap: wrap; }
.pub-tab {
    border: 0; background: transparent; font-weight: 700; font-size: .92rem;
    color: var(--pub-mut); padding: .65rem 1.15rem; border-radius: 12px 12px 0 0;
    display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; transition: .22s;
}
.pub-tab:hover { color: var(--pub-primary); background: rgba(13, 92, 182, .06); }
.pub-tab.active { color: var(--pub-primary); background: #fff; box-shadow: 0 -6px 16px rgba(11, 59, 111, .07); border-bottom: 3px solid var(--pub-accent); }

/* ========================== GALLERY ============================= */
.pub-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.pub-gal-item {
    position: relative; border-radius: 16px; overflow: hidden; cursor: pointer;
    border: 1px solid var(--pub-line); background: #000; aspect-ratio: 4 / 3;
    box-shadow: var(--pub-shadow-sm); transition: .25s;
}
.pub-gal-item:hover { transform: translateY(-5px); box-shadow: var(--pub-shadow); }
.pub-gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: .4s; }
.pub-gal-item:hover img { transform: scale(1.07); }
.pub-gal-item .gal-cap {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent, rgba(5, 21, 43, .9));
    color: #fff; font-size: .78rem; font-weight: 600; padding: 1.6rem .8rem .55rem;
}
.pub-gal-empty {
    background: var(--pub-card); border: 2px dashed var(--pub-line);
    border-radius: var(--pub-radius); padding: 2.6rem 1.5rem; text-align: center; color: var(--pub-mut);
}
.pub-gal-empty i { font-size: 2.2rem; color: var(--pub-accent); display: block; margin-bottom: .6rem; }

.pub-lightbox {
    position: fixed; inset: 0; background: rgba(5, 15, 30, .92); z-index: 2000;
    display: none; align-items: center; justify-content: center; padding: 1.4rem;
}
.pub-lightbox.open { display: flex; }
.pub-lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.pub-lightbox .lb-close {
    position: absolute; top: 18px; right: 22px; color: #fff; font-size: 1.9rem;
    background: transparent; border: 0; cursor: pointer; line-height: 1;
}
.pub-lightbox .lb-cap { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: #dbe7f6; font-weight: 600; }

/* ====================== MISC / HELPERS ========================== */
.pub-empty {
    background: var(--pub-card); border: 1px dashed var(--pub-line);
    border-radius: var(--pub-radius); padding: 2.4rem; text-align: center; color: var(--pub-mut);
}
.pub-empty i { font-size: 2rem; color: var(--pub-accent); display: block; margin-bottom: .5rem; }

.pub-back-btn {
    display: inline-flex; align-items: center; gap: .45rem; font-weight: 700;
    color: var(--pub-primary); text-decoration: none; font-size: .88rem;
}
.pub-back-btn:hover { color: var(--pub-accent); }

.pub-info-strip { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .9rem; }
.pub-info-strip .pub-stat-pill { background: rgba(255,255,255,.14); color: #fff; }

/* ============================ RESPONSIVE ========================= */
@media (max-width: 991.98px) {
    .pub-nav .navbar-collapse { background: #fff; border-radius: 16px; margin-top: .6rem; padding: .8rem; box-shadow: var(--pub-shadow); }
    .pub-nav .nav-link.active::after { display: none; }
    .pub-hero { padding: 3.4rem 0 3rem; text-align: center; }
    .pub-hero-chips { justify-content: center; }
    .pub-quicklinks { margin-top: -1.6rem; }
}
@media (max-width: 575.98px) {
    .pub-section { padding: 3rem 0; }
    .pub-qlink { padding: 1rem; }
}

/* ================== ACADEMIC SUB MENU (2nd nav) ================= */
.pub-subnav {
    position: sticky; top: 68px; z-index: 1030;
    background: var(--pub-card); border-bottom: 1px solid var(--pub-line);
    box-shadow: 0 6px 18px rgba(11, 59, 111, .06);
}
.pub-subnav .container { display: flex; flex-wrap: wrap; gap: .3rem; padding: .4rem 1rem; }
.pub-subnav a {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .45rem 1rem; border-radius: 999px; text-decoration: none;
    font-size: .86rem; font-weight: 700; color: var(--pub-primary-dark); transition: .22s;
}
.pub-subnav a:hover { background: rgba(13, 92, 182, .08); color: var(--pub-primary); }
.pub-subnav a.active {
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-primary-dark));
    color: #fff; box-shadow: 0 6px 16px rgba(13, 92, 182, .28);
}

/* Head-card layout helpers */
.pub-head-card .pt-photo, .pub-head-card .pt-placeholder { width: 84px; height: 84px; flex: 0 0 84px; font-size: 1.7rem; }
.pub-dep-hero-media { text-align: center; }
.pub-dep-hero-media img, .pub-dep-hero-media .dep-fallback {
    width: 108px; height: 108px; border-radius: 50%; object-fit: cover;
    border: 4px solid #fff; box-shadow: 0 14px 32px rgba(11, 59, 111, .25);
}
.pub-dep-hero-media .dep-fallback {
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 2.4rem; font-weight: 800;
    background: linear-gradient(135deg, var(--pub-accent-light), var(--pub-accent));
}

@media (max-width: 991.98px) {
    .pub-subnav { top: 0; }
}
