/* =================================================================
   DHAKA METROPOLITAN UNIVERSITY: stylesheet
   Colours are defined once here. Change them to re-theme the site.
   ================================================================= */
:root {
  --plum: #3b1f4a;        /* main colour: menus, headings */
  --plum-dark: #26122f;   /* top bar, footer */
  --plum-light: #5a3570;  /* hover states */
  --accent: #a6adf3;       /* accent colour (periwinkle) */
  --accent-light: #c9cdf8;
  --parchment: #f6f3fa;   /* light purple-grey: alternate sections */
  --paper: #ffffff;       /* page background, cards and panels */
  --ink: #2b2230;         /* body text */
  --muted: #6b5f70;
  --teal: #2f6f6a;
  --line: #e4dcec;
  --radius: 6px;
  --wrap: 1180px;
  --head: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; font-family: var(--body); font-size: 17px; color: var(--ink); background: var(--paper); line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum-light); }
a:hover { color: var(--plum); }
h1, h2, h3 { font-family: var(--head); color: var(--plum); line-height: 1.25; margin: 0 0 .5em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--paper); padding: 8px 12px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--plum); color: #fff; padding: .55em 1.15em; border: 2px solid var(--plum);
  border-radius: var(--radius); text-decoration: none; font-weight: 600; font-family: var(--body); cursor: pointer; }
.btn:hover { background: var(--plum-light); border-color: var(--plum-light); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--plum-dark); }
.btn-accent:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--plum-dark); }
.btn-outline { background: transparent; color: var(--plum); }
.btn-outline:hover { color: #fff; }

/* ---------- Top bar ---------- */
.topbar { background: var(--plum-dark); color: #e3d6ea; font-size: .82rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 4px 16px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.topbar-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.topbar a { color: #e3d6ea; text-decoration: none; }
.topbar a:hover { color: var(--accent-light); }

/* ---------- Masthead (crest + name) ---------- */
.masthead { background: var(--paper); border-bottom: 3px solid var(--accent); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand img { height: 72px; width: auto; max-width: 280px; }
.brand-name { display: block; font-family: var(--head); font-weight: 700; font-size: 1.75rem; line-height: 1.1; color: var(--plum); }
.brand-tag { display: block; font-style: italic; color: var(--muted); font-size: .92rem; }

/* ---------- Main menu ---------- */
.mainnav { background: var(--plum); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.menu > li { position: relative; }
.menu > li > a, .menu > li > button { display: block; padding: 14px 17px; color: #fff; text-decoration: none; background: none; border: 0;
  font: 600 .95rem/1.2 var(--body); letter-spacing: .02em; cursor: pointer; }
.menu > li > button::after { content: "▾"; margin-left: 6px; font-size: .8em; }
.menu > li > a:hover, .menu > li > button:hover, .menu > li.open > button, .menu .active { background: var(--plum-light); color: var(--accent-light); }
.sub { list-style: none; margin: 0; padding: 6px 0; display: none; position: absolute; left: 0; top: 100%; min-width: 250px;
  background: var(--paper); border-top: 3px solid var(--accent); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.sub a { display: block; padding: 9px 18px; color: var(--ink); text-decoration: none; }
.sub a:hover { background: var(--parchment); color: var(--plum); }
.has-sub.open .sub { display: block; }
@media (hover: hover) and (min-width: 861px) {
  .has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
}
.nav-toggle { display: none; }

/* ---------- Banner slideshow ---------- */
.hero { position: relative; background: var(--plum-dark); overflow: hidden; }
.slides { position: relative; aspect-ratio: 16 / 6; max-height: 540px; width: 100%; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 0 48px; color: #fff;
  background: linear-gradient(transparent, rgba(18, 8, 26, .88)); }
.slide-caption h2 { color: #fff; font-size: clamp(1.3rem, 3vw, 2.3rem); margin-bottom: .25em; }
.slide-caption p { margin: 0 0 14px; max-width: 640px; }
.hero-btn { position: absolute; bottom: 6px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.4); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.hero-btn:hover { background: var(--accent); color: var(--plum-dark); }
.prev { left: calc(50% - 82px); } .next { left: calc(50% + 48px); }
.dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 10px; }
.dots button { width: 13px; height: 13px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; }
.dots button[aria-current="true"] { background: var(--accent); border-color: var(--accent); }

/* ---------- Quick link tiles ---------- */
.quicklinks { background: var(--paper); border-bottom: 1px solid var(--line); }
.ql-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.ql { display: flex; flex-direction: column; padding: 18px 16px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); }
.ql:last-child { border-right: 0; }
.ql:hover { background: var(--parchment); }
.ql strong { font-family: var(--head); color: var(--plum); }
.ql span:last-child { color: var(--muted); font-size: .9rem; }
.ql-icon { color: var(--accent); font-size: 1.3rem; }

/* ---------- Section headings ---------- */
.section { padding: 44px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.section-title { font-size: 1.6rem; margin: 0; padding-bottom: 6px; border-bottom: 3px solid var(--accent); display: inline-block; }
.section-head a { font-weight: 600; white-space: nowrap; }

/* ---------- Home: welcome ---------- */
.section-alt { background: var(--parchment); }
.welcome-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; align-items: center; }
.welcome-logo img { width: 180px; margin: 0 auto; }

/* ---------- Faculties ---------- */
.faculty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.faculty { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink);
  transition: transform .15s, box-shadow .15s; }
.faculty:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(59,31,74,.14); color: var(--ink); }
.sigil { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--plum); color: var(--accent-light);
  font-family: var(--head); font-weight: 700; font-size: 1.2rem; margin-bottom: 10px; border: 2px solid var(--accent); }
.faculty h3 { font-size: 1.05rem; margin-bottom: 4px; }
.faculty p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Stats band ---------- */
.stats { background: var(--plum-dark); color: #fff; padding: 36px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stat b { display: block; font-family: var(--head); font-size: 2.2rem; color: var(--accent-light); }
.stat span { color: #d9cbe1; }

/* ---------- Inner pages ---------- */
.page-hero { background: linear-gradient(120deg, var(--plum-dark), var(--plum) 60%, var(--plum-light)); color: #f1e8f5; padding: 40px 0 36px; }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: .2em; }
.page-hero p { margin: 0; max-width: 720px; }
.crumbs { font-size: .88rem; margin-bottom: 10px; color: #cdbbd8; }
.crumbs a { color: var(--accent-light); }
.page-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding-top: 40px; padding-bottom: 56px; }
.page-nav { align-self: start; position: sticky; top: 70px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.page-nav h2 { font-size: 1rem; }
.page-nav ul { list-style: none; margin: 0; padding: 0; }
.page-nav li { border-top: 1px solid var(--line); }
.page-nav a { display: block; padding: 8px 0; text-decoration: none; }
.prose section { background: var(--paper); box-shadow: 0 1px 3px rgba(59,31,74,.06); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 26px; }
.prose section > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 1.5rem; border-bottom: 2px solid var(--accent); padding-bottom: 6px; }
.prose h3 { font-size: 1.12rem; margin-top: 1.4em; }
.prose blockquote { margin: 1em 0; padding: 12px 18px; border-left: 4px solid var(--accent); background: var(--parchment); font-style: italic; }
.prose figure { margin: 1em 0; }
.prose figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.signature { font-style: italic; color: var(--muted); }
.callout { background: #f3ecf6; border: 1px solid #d9c6e3; border-radius: var(--radius); padding: 12px 16px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--plum); color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: var(--parchment); }
.crest-figure { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.crest-figure img { width: 140px; }
.crest-figure ul { flex: 1; min-width: 220px; margin: 0; }

.notfound { text-align: center; padding: 80px 16px; }
.notfound img { width: 120px; margin: 0 auto 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum-dark); color: #d9cbe1; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding-top: 44px; padding-bottom: 36px; }
.footer-brand img { height: 64px; width: auto; max-width: 240px; margin-bottom: 12px; }
.footer-brand strong { color: #fff; font-family: var(--head); }
.site-footer h2 { color: var(--accent-light); font-size: 1rem; letter-spacing: .04em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #e9dcf0; text-decoration: none; }
.site-footer a:hover { color: var(--accent-light); text-decoration: underline; }
.footer-bottom .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 14px; padding-bottom: 14px; font-size: .85rem; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .page-layout { grid-template-columns: 1fr; gap: 24px; }
  .page-nav { position: static; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; background: none; border: 0; color: #fff; font: 600 1rem var(--body); padding: 13px 0; cursor: pointer; }
  .menu { display: none; flex-direction: column; padding-bottom: 10px; }
  .mainnav.open .menu { display: flex; }
  .menu > li > a, .menu > li > button { width: 100%; text-align: left; padding: 12px 4px; border-top: 1px solid rgba(255,255,255,.1); }
  .sub { position: static; box-shadow: none; border-top: 0; background: var(--plum-dark); min-width: 0; }
  .sub a { color: #eadff0; padding-left: 22px; }
  .sub a:hover { background: var(--plum-light); color: #fff; }
  .mast-cta { display: none; }
  .ql-grid { grid-template-columns: repeat(2, 1fr); }
  .ql:nth-child(2) { border-right: 0; }
  .ql:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand img { height: 50px; }
  .brand-name { font-size: 1.25rem; }
  .brand-tag { font-size: .8rem; }
  .topbar-links { display: none; }
  .slides { aspect-ratio: auto; height: 380px; }
  .slide-caption { padding-top: 40px; }
  .slide-caption p { font-size: .92rem; }
  .footer-grid, .welcome-grid { grid-template-columns: 1fr; }
  .welcome-logo { display: none; }
  .prose section { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { transition: none; }
  .faculty { transition: none; }
}


/* ---------- Logo (images/logo.png: black on white) ---------- */
.brand img { height: 84px; mix-blend-mode: multiply; }
.welcome-logo img { width: 260px; mix-blend-mode: multiply; }
.crest-figure img { width: 220px; mix-blend-mode: multiply; }
/* On the dark footer, flip the logo to white and let the purple show through */
.footer-brand img { height: 80px; filter: invert(1); mix-blend-mode: screen; }
@media (max-width: 640px) { .brand img { height: 56px; } }
