:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --ink: #18203a;
  --muted: #5d6680;
  --line: #e1e6f0;
  --brand: #1f3fa0;
  --brand-dark: #142a70;
  --brand-ink: #ffffff;
  --accent: #e0a526;
  --soft: #eaf0fb;
  --radius: 14px;
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1424; --surface: #171e33; --ink: #e8ecf6; --muted: #a5aec6;
    --line: #2a3350; --brand: #8ea6f5; --brand-dark: #0b1330; --brand-ink: #0e1430; --accent: #f0bf55; --soft: #1b2440;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 Inter, system-ui, sans-serif; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
img { max-width: 100%; display: block; }
.bn { font-family: "Noto Serif Bengali", serif; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.eyebrow { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: .5em; }
.muted { color: var(--muted); }
.todo { background: var(--soft); border: 1px dashed var(--accent); padding: 0 .35em; border-radius: 4px; font-size: .88em; }
section { padding: 64px 0; }
section.alt { background: var(--soft); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; gap: 28px; } }
.btn { display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; font-size: .95rem; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card .tag { font-size: .75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }

/* Top bar */
.topbar { background: var(--brand-dark); color: #dfe6ff; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar span + span::before { content: "·"; margin: 0 8px; opacity: .6; }
@media (max-width: 600px) { .topbar .email { display: none; } }

/* Header */
.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
.masthead img { width: 64px; height: 64px; border-radius: 50%; background: #fff; }
.masthead .names { line-height: 1.25; }
.masthead .bn { color: var(--brand); font-size: 1.15rem; }
.masthead strong { display: block; font-family: Fraunces, serif; font-size: clamp(1.15rem, 2.6vw, 1.6rem); }
.masthead small { color: var(--muted); }
.masthead a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 14px; }

.btn.accent { background: var(--accent); color: #2a1d00; }
.btn.light { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.masthead .admit { margin-left: auto; white-space: nowrap; }
@media (max-width: 640px) { .masthead .admit { display: none; } }

/* Quick cards under the slider */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.quick .card { text-decoration: none; color: var(--ink); border-top: 4px solid var(--brand); transition: transform .2s, box-shadow .2s; }
.quick .card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20,42,112,.12); }
.quick .icon { font-size: 1.8rem; display: block; margin-bottom: 6px; }
.quick b { color: var(--brand); font-size: .92rem; }
@media (max-width: 760px) { .quick { grid-template-columns: 1fr; } }

/* Legacy badge + values */
.legacy { display: flex; gap: 22px; align-items: center; margin: 8px 0 22px; }
.badge { flex: none; width: 112px; height: 112px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-content: center; text-align: center; box-shadow: 0 0 0 6px var(--soft), 0 0 0 8px var(--accent); }
.badge strong { font-family: Fraunces, serif; font-size: 2rem; line-height: 1; }
.badge span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; line-height: 1.25; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding: 3px 0 3px 28px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--soft); color: var(--brand); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }

/* Admission call-to-action band */
section.cta { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; }
section.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
section.cta p { opacity: .85; margin: 0; }
section.cta .btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* Nav */
nav.main { background: var(--brand); position: sticky; top: 0; z-index: 20; }
nav.main .wrap { display: flex; align-items: center; justify-content: space-between; }
nav.main ul { list-style: none; margin: 0; padding: 0; }
nav.main > .wrap > ul { display: flex; }
nav.main li { position: relative; }
nav.main a { display: block; padding: 13px 15px; color: var(--brand-ink); text-decoration: none; font-weight: 500; font-size: .93rem; }
nav.main a:hover, nav.main a[aria-current="page"] { background: rgba(255,255,255,.14); }
nav.main .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.15); border-radius: 0 0 10px 10px; overflow: hidden; }
nav.main .sub a { color: var(--ink); padding: 10px 16px; border-top: 1px solid var(--line); }
nav.main .sub a:hover { background: var(--soft); }
nav.main li:hover > .sub, nav.main li:focus-within > .sub { display: block; }
.burger { display: none; background: none; border: 0; color: var(--brand-ink); font-size: 1.5rem; padding: 8px 4px; cursor: pointer; }
@media (max-width: 900px) {
  .burger { display: block; }
  nav.main > .wrap { flex-wrap: wrap; }
  nav.main > .wrap > ul { display: none; flex-direction: column; width: 100%; padding-bottom: 8px; }
  nav.main > .wrap > ul.open { display: flex; }
  nav.main .sub { display: block; position: static; box-shadow: none; background: transparent; border-radius: 0; }
  nav.main .sub a { color: var(--brand-ink); opacity: .85; padding-left: 32px; border: 0; font-size: .88rem; }
  nav.main .sub a:hover { background: rgba(255,255,255,.1); }
}

/* Hero slider */
.slider { position: relative; height: clamp(300px, 56vw, 560px); overflow: hidden; background: #000; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s; }
.slide.on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.72)); }
.slide .quote { position: absolute; left: 0; right: 0; bottom: 48px; z-index: 1; color: #fff; text-align: center; padding: 0 20px; font-family: Fraunces, serif; font-size: clamp(1.05rem, 2.4vw, 1.6rem); text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.slide .quote small { display: block; font-family: Inter, sans-serif; font-size: .85rem; opacity: .85; margin-top: 6px; }
.dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.dots button.on { background: var(--accent); }

/* Notice ticker */
.ticker { background: var(--accent); color: #2a1d00; font-weight: 500; }
.ticker .wrap { display: flex; align-items: center; gap: 12px; overflow: hidden; }
.ticker b { background: var(--brand-dark); color: #fff; padding: 9px 14px; white-space: nowrap; font-size: .85rem; letter-spacing: .05em; }
.ticker .track { overflow: hidden; flex: 1; }
.ticker .run { display: inline-flex; gap: 48px; white-space: nowrap; animation: run 40s linear infinite; padding: 9px 0 9px 100%; }
.ticker:hover .run { animation-play-state: paused; }
.ticker a { color: inherit; }
@keyframes run { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker .run { animation: none; padding-left: 0; } }

/* Notice board panel */
.board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.board h3 { background: var(--brand); color: var(--brand-ink); margin: 0; padding: 14px 20px; font-size: 1.1rem; }
.board ul { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow: auto; }
.board li { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.board time { display: block; font-size: .8rem; font-weight: 600; color: var(--accent); }
.board .new { background: #d62f2f; color: #fff; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.board .more { display: block; padding: 12px 20px; font-weight: 600; text-decoration: none; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { text-align: center; padding: 26px 12px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.stat strong { display: block; font-family: Fraunces, serif; font-size: 2.3rem; color: var(--brand); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Desk */
.desk { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start; }
.desk .photo { aspect-ratio: 3/4; border-radius: var(--radius); background: var(--soft); display: grid; place-items: center; color: var(--muted); text-align: center; font-size: .85rem; border: 1px dashed var(--line); }
blockquote { margin: 0 0 1em; font-family: Fraunces, serif; font-size: 1.2rem; border-left: 4px solid var(--accent); padding-left: 18px; }
@media (max-width: 640px) { .desk { grid-template-columns: 1fr; } .desk .photo { max-width: 180px; } }

/* Facilities */
.facility { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; color: #fff; text-decoration: none; display: block; }
.facility img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.facility:hover img { transform: scale(1.05); }
.facility span { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 12px; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-weight: 600; }

/* Links */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.links a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; }
.links a::before { content: "↗"; color: var(--brand); font-weight: 700; }
.links a:hover { border-color: var(--brand); }

/* Page banner */
.banner { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; padding: 44px 0; }
.banner h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.banner p { margin: 6px 0 0; opacity: .85; }
.crumbs { font-size: .85rem; opacity: .8; margin-bottom: 6px; }
.crumbs a { color: #fff; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* Gallery */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.tabs button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 16px; font: 500 .92rem Inter, sans-serif; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tabs small { opacity: .7; margin-left: 5px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; }
.gallery button { all: unset; cursor: zoom-in; display: block; width: 100%; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; transition: transform .2s; }
.gallery button:hover img { transform: scale(1.02); }
.gallery button:focus-visible img { outline: 3px solid var(--accent); }
.gallery figcaption { font-size: .86rem; color: var(--muted); margin-top: 6px; }
dialog#lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog#lightbox::backdrop { background: rgba(0,0,0,.9); }
#lb-img { max-width: 92vw; max-height: 82vh; margin: 6vh auto 0; border-radius: 8px; object-fit: contain; }
#lb-cap { color: #eee; text-align: center; margin-top: 10px; }
.lb-btn { position: fixed; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 999px; width: 44px; height: 44px; font-size: 1.6rem; cursor: pointer; }
.lb-close { top: 14px; right: 14px; font-size: 1.1rem; }
.lb-prev { left: 10px; top: 50%; } .lb-next { right: 10px; top: 50%; }

/* Faculty */
.teacher { text-align: center; }
.teacher img, .teacher .avatar { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 12px; object-fit: cover; }
.teacher .avatar { background: var(--soft); color: var(--brand); display: grid; place-items: center; font: 700 1.6rem Fraunces, serif; }
.teacher h3 { margin-bottom: 2px; }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list b { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.map { border: 0; width: 100%; height: 100%; min-height: 340px; border-radius: var(--radius); }

/* Footer */
footer.site { background: var(--brand-dark); color: #cfd8f5; padding: 48px 0 0; font-size: .92rem; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
footer.site h4 { color: #fff; font-family: Fraunces, serif; font-size: 1.1rem; margin: 0 0 12px; }
footer.site a { color: #fff; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { padding: 4px 0; }
footer.site .base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding: 16px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .84rem; }
@media (max-width: 760px) { footer.site .cols { grid-template-columns: 1fr; } }
