/* WordPress-specific additions to site.css */

/* Blocks keep the design's own spacing: neutralise core layout gaps inside page content */
main :where(.wp-block-group) { margin: 0; }
main :where(.is-layout-flow) > *, main :where(.is-layout-constrained) > * { margin-block-start: 0; margin-block-end: 0; }
main :where(.is-layout-constrained) > * { max-width: none; margin-left: 0; margin-right: 0; }
main .wrap.is-layout-constrained > *, main .wrap > * { max-width: none; }
main .wp-block-group.wrap { margin-left: auto; margin-right: auto; }
.wp-block-heading { margin: 0; }
main p:empty { display: none; }

/* Step and outcome counts carried as classes (n-3 … n-10) */
.n-2 { --n: 2; } .n-3 { --n: 3; } .n-4 { --n: 4; } .n-5 { --n: 5; } .n-6 { --n: 6; } .n-7 { --n: 7; } .n-8 { --n: 8; } .n-9 { --n: 9; } .n-10 { --n: 10; }

/* Whole card clickable when its heading carries the link */
.card.is-link { position: relative; }
.card.is-link h3 a, .card.is-link h4 a { color: inherit; text-decoration: none; }
.card.is-link h3 a::after, .card.is-link h4 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card.is-link:hover { border-color: var(--blue); box-shadow: 0 8px 24px rgba(15,34,87,.10); }
.card.is-link .go a, .card.is-link p a { position: relative; z-index: 1; }

/* News feed block */
.mim-news .news-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.mim-news .news-more { margin-left: auto; font-size: 14px; font-weight: 700; }
.g-side > .mim-news { min-width: 0; }
.ncard.has-img { padding-top: 0; overflow: hidden; }
.ncard .ncard-img { width: calc(100% + 40px); margin: 0 -20px 4px; height: 170px; object-fit: cover; max-width: none; }
.mim-news-sec .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mim-news-empty { border: 1px dashed var(--line-2); border-radius: 12px; padding: 18px 20px; color: var(--muted); font-size: 14px; background: #fff; }
.pager { margin-top: 28px; display: flex; gap: 8px; flex-wrap: wrap; }
.pager .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 22px; border: 2px solid var(--navy); color: var(--navy); font-weight: 700; background: #fff; }
.pager .page-numbers.current { background: var(--navy); color: var(--amber); }
.pager a.page-numbers:hover { text-decoration: none; background: var(--tint); }

/* Templates */
.phero h1 .l1-sm { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; }
.entry { font-size: 16px; line-height: 1.75; }
.entry > * + * { margin-top: 1em; }
.entry h2 { font-family: var(--display); text-transform: uppercase; color: var(--navy); font-size: 28px; }
.entry h3 { font-family: var(--display); text-transform: uppercase; color: var(--navy); font-size: 22px; }
.entry img { border-radius: 10px; height: auto; }
.entry .entry-img { width: 100%; margin-bottom: 8px; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry blockquote { margin: 0; background: var(--navy); color: #fff; border-radius: 12px; padding: 18px 22px; }
.search-form { display: flex; gap: 10px; flex-wrap: wrap; }
.search-form label { flex: 1; min-width: 200px; }
.search-form .search-field { width: 100%; height: 48px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 14px; font: inherit; }
.search-form .search-submit { height: 48px; padding: 0 22px; border-radius: 10px; border: 0; background: var(--navy); color: #fff; font-weight: 700; cursor: pointer; }
.review-bar a { color: #3D2C00; font-weight: 700; text-decoration: underline; }
body.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .nav { top: 0; } }
@media (max-width: 960px) { .mim-news-sec .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mim-news-sec .news-grid { grid-template-columns: 1fr; } .ncard .ncard-img { height: 150px; } }

/* ===== Faculty directory & profiles (from the MIM theme) ===== */
/* Photos inside avatars */
.av.has-photo { background: #DCE6F5; padding: 0; }
.av.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* Faculty directory and profiles */
a.person { color: inherit; text-decoration: none; }
a.person:hover { border-color: var(--blue); box-shadow: 0 8px 24px rgba(15,34,87,.10); text-decoration: none; }
.person .go { font-size: 12px; font-weight: 700; color: var(--blue); margin-top: 8px; }
.plist a.pr { color: inherit; text-decoration: none; }
.plist a.pr:hover b { color: var(--blue); }
.fac-photo { object-fit: cover; margin: 6px auto 10px; display: block; }
.erp-dl { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 10px 20px; margin: 0; font-size: 14.5px; }
.erp-dl dt { color: var(--muted); font-weight: 600; }
.erp-dl dd { margin: 0; overflow-wrap: anywhere; }
.erp-data .tbl td { overflow-wrap: anywhere; }
@media (max-width: 640px) { .erp-dl { grid-template-columns: 1fr; gap: 2px 0; } .erp-dl dd { margin-bottom: 10px; } }

/* ---------- v1.4: faculty profile sections ---------- */
.fsec-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.fsec-nav a { font-size: 12px; font-weight: 600; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; text-decoration: none; }
.fsec-nav a:hover { border-color: var(--red); color: var(--red); }
.fsec { scroll-margin-top: 90px; }
.fsec h3 { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.fsec h3 svg { color: var(--red); flex: none; }
.fsec-n { font-family: var(--body); font-size: 12px; font-weight: 700; color: var(--blue); background: var(--tint); border-radius: 999px; padding: 2px 9px; letter-spacing: 0; }
.fsec-list { margin: 0; padding: 0; list-style: none; }
.fsec-list li { position: relative; padding: 9px 0 9px 18px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.fsec-list li:last-child { border-bottom: 0; }
.fsec-list li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 7px; height: 7px; border-radius: 2px; background: var(--amber); }
.fsec-more summary { cursor: pointer; font-weight: 600; color: var(--red); padding: 10px 0 2px; }
#sec-scholar { scroll-margin-top: 90px; }
.fac-profile > * { min-width: 0; }
@media (max-width: 960px) { .fac-profile { grid-template-columns: minmax(0, 1fr) !important; } }

/* WordPress toolbar and comment avatars (class "avatar photo") keep their normal small size. */
#wpadminbar img.avatar, img.avatar { min-height: 0; padding: 0; background: none; display: inline-block; vertical-align: middle; }
#wpadminbar #wp-admin-bar-my-account.with-avatar > a img { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #8c8f94; margin: -2px 0 0 6px; }
#wpadminbar #wp-admin-bar-user-info .avatar { width: 64px; height: 64px; border-radius: 0; border: 0; }

/* ---------- v1.5: faculty profile page ---------- */
.fp-hero { position: relative; background: radial-gradient(1200px 400px at 85% -10%, rgba(245,168,28,.18), transparent 60%), linear-gradient(120deg, var(--navy-2), var(--navy) 55%, var(--navy-3)); color: #fff; padding-bottom: 34px; overflow: hidden; }
.fp-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--red) 0 33%, var(--amber) 33% 66%, var(--blue) 66%); }
.fp-hero .crumbs, .fp-hero .crumbs a { color: rgba(255,255,255,.7); }
.fp-hero .crumbs a:hover { color: #fff; }
.fp-head { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; gap: 36px; align-items: center; margin-top: 18px; }
.fp-photo { width: 210px; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; border: 4px solid #fff; box-shadow: 0 18px 40px rgba(0,0,0,.35); background: var(--navy-3); }
.fp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fp-initials { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-family: var(--display); font-size: 64px; font-weight: 600; color: var(--amber); }
.fp-id { min-width: 0; }
.fp-group { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); background: var(--amber); border-radius: 999px; padding: 5px 12px; }
.fp-id h1 { font-family: var(--display); font-size: clamp(34px, 4vw, 54px); line-height: 1.02; text-transform: uppercase; color: #fff; margin: 12px 0 6px; letter-spacing: .01em; }
.fp-desig { font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin: 0; }
.fp-qual { font-size: 15px; color: rgba(255,255,255,.82); margin: 6px 0 0; }
.fp-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fp-links a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #fff; text-decoration: none; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 7px 14px; max-width: 100%; }
.fp-links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-links a:hover { background: #fff; color: var(--navy); }
.fp-links svg { flex: none; }
.fp-figs { display: grid; grid-template-columns: repeat(3, minmax(108px, 1fr)); gap: 1px; margin: 0; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; overflow: hidden; align-self: center; }
.fp-figs div { background: rgba(11,26,71,.55); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.fp-figs dd { order: -1; }
.fp-figs dd { margin: 0; font-family: var(--display); font-size: 32px; font-weight: 600; line-height: 1; color: var(--amber); }
.fp-figs dt { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.78); line-height: 1.3; }

.fp-body-sec { padding-top: 32px; }
.fp-body { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: start; }
.fp-body.no-side { grid-template-columns: minmax(0, 1fr); }
.fp-body > * { min-width: 0; }
.fp-side { display: flex; flex-direction: column; gap: 14px; }
.fp-side .fsec { padding: 18px 20px; gap: 10px; border-top: 3px solid var(--navy); }
.fp-side .fsec:nth-child(2) { border-top-color: var(--red); }
.fp-side .fsec:nth-child(3) { border-top-color: var(--amber); }
.fp-side .fsec:nth-child(4) { border-top-color: var(--blue); }
.fp-side .fsec h3 { font-size: 17px; gap: 8px; }
.fp-side .fsec-list li { font-size: 13.5px; padding: 7px 0 7px 16px; }
.fp-side .fsec-list li::before { top: 14px; width: 6px; height: 6px; }
.fp-side .chips { gap: 6px; }
.fp-side .chip { font-size: 12px; padding: 6px 10px; }
.fp-side .fsec-more summary { font-size: 13px; }
.fp-side .tbl { font-size: 12px; }

.fp-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 5px; margin-bottom: 18px; position: sticky; top: 72px; z-index: 5; box-shadow: 0 6px 18px rgba(15,34,87,.06); }
.fp-tabs::-webkit-scrollbar { display: none; }
.fp-tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--navy); text-decoration: none; padding: 10px 16px; border-radius: 8px; white-space: nowrap; }
.fp-tabs a span { font-size: 11px; font-weight: 700; background: var(--tint); color: var(--blue); border-radius: 999px; padding: 1px 8px; }
.fp-tabs a:hover { background: var(--bg); }
.fp-tabs a[aria-selected="true"] { background: var(--navy); color: #fff; }
.fp-tabs a[aria-selected="true"] span { background: var(--amber); color: var(--navy); }
.fp-panel + .fp-panel { margin-top: 26px; }
.fp-panel-title { font-family: var(--display); font-size: 26px; text-transform: uppercase; color: var(--navy); margin: 0 0 12px; }
.js-tabs .fp-panel + .fp-panel { margin-top: 0; }
.js-tabs .fp-panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fp-panel > * + * { margin-top: 16px; }
.fp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 16px; align-items: start; }
.fp-grid > .wide, .fp-grid > .pub-card { grid-column: 1 / -1; }
.fp-grid .fsec { padding: 22px 24px; }
.fp-bio { padding: 24px 28px; border-left: 4px solid var(--amber); }
.fp-bio h3, .fp-hl h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.fp-bio h3 svg, .fp-hl h3 svg { color: var(--red); }
.fp-bio p { font-size: 15.5px; line-height: 1.7; }
.fp-hl { padding: 22px 24px; background: linear-gradient(180deg, #fff, #FBFCFF); }
.fp-hl .fsec-list li { font-size: 14px; }
.fp-hl .go { font-size: 13px; font-weight: 700; color: var(--red); margin-top: auto; }
.fp-sub { font-family: var(--display); font-size: 20px; text-transform: uppercase; color: var(--navy); margin: 0 0 10px; }
.fp-news .card { padding: 6px 22px; }

@media (max-width: 1320px) {
  .fp-tabs a { padding: 10px 12px; font-size: 13px; }
}
@media (max-width: 1180px) {
  .fp-head { grid-template-columns: 180px minmax(0, 1fr); }
  .fp-photo { width: 180px; }
  .fp-figs { grid-column: 1 / -1; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .fp-body { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .fp-body { grid-template-columns: minmax(0, 1fr); }
  .fp-side { order: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .fp-tabs { top: 64px; }
  .fp-main { order: 1; }
  .fp-figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .fp-head { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 18px; }
  .fp-photo { width: 150px; }
  .fp-links { justify-content: center; }
  .fp-figs { width: 100%; }
  .fp-figs dd { font-size: 26px; }
  .fp-side { grid-template-columns: minmax(0, 1fr); }
  .fp-grid { grid-template-columns: minmax(0, 1fr); }
  .fp-tabs { border-radius: 10px; }
}
