/* ailab.stevens.edu: every page but the homepage (design SD Babbio Panel). Loaded after site.css.
   No new colour token: every colour is one of site.css's :root tokens, used in the job site.css gives it. */

h4, dl, dd, blockquote { margin: 0; }
strong { font-weight: 600; }
em { font-style: italic; }

/* ---------- Interior hero: the homepage's photo and red panel, shorter, arriving still ---------- */
.ihero .hero-photo { height: clamp(200px, 20vw, 360px); }
.ihero .hero-photo img { object-position: 50% 45%; }
.ipanel { margin-top: calc(-1 * clamp(110px, 10vw, 180px)); padding-block: 32px 36px; }
.crumbs ol { display: flex; flex-wrap: wrap; column-gap: 10px; }
.crumbs li + li::before { content: "/"; content: "/" / ""; margin-right: 10px; }
.ipanel .kick { margin-top: 14px; }
.ipanel h1 { margin-top: 10px; font-weight: 700; overflow-wrap: break-word; }
.ipanel .ih-t2 { font-size: 44px; line-height: 48px; }
.ipanel .ih-t3 { font-size: 38px; line-height: 42px; }
.ipanel .ih-t4 { font-size: 32px; line-height: 36px; }
.ipanel .h1-line { margin-top: 10px; }
.ipanel .act { margin-top: 26px; }
.ipanel .lede { margin-top: 20px; }
.ipanel address { margin-top: 26px; }
.ipanel .map { margin-top: 10px; }
.ih-side { text-wrap: pretty; }
/* /contact/: the page is the panel, so the photo and its overlap are the homepage's closing ones */
.pcontact .hero-photo { height: clamp(260px, 30vw, 540px); }
.pcontact .hero-photo img { object-position: 50% 60%; }
.pcontact .ipanel { margin-top: calc(-1 * clamp(140px, 17vw, 300px)); }

/* ---------- A post: when and tags on the left, picture and text across the other three columns ---------- */
.pbody { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: var(--gap); align-items: start; padding-top: var(--sec); }
.pmeta { grid-column: 1; }
.pmeta dl > div + div { margin-top: 24px; }
.pmeta dd { margin-top: 6px; }
.ptags li + li { margin-top: 6px; }
.pmain { grid-column: 2 / -1; min-width: 0; }
.pfig { max-width: 760px; margin-bottom: 40px; }
.pfig img { width: 100%; height: auto; }
.plinks { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 20px; }

/* running text from Markdown */
.prose { max-width: 65ch; }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: 44px; font: 400 var(--f-sub)/var(--l-sub) var(--disp); color: var(--red); text-wrap: balance; }
.prose h3, .prose h4 { margin-top: 32px; font: 700 var(--f-body)/1.2 var(--disp); letter-spacing: 1px; text-transform: uppercase; }
.prose ul { list-style: square; padding-left: 1.2em; }
.prose ol { list-style: decimal; padding-left: 1.5em; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--red); }
.prose blockquote { border-left: 4px solid var(--red); padding-left: 20px; }
.prose hr { border: 0; border-top: 1px solid var(--rule); }
.prose img { height: auto; }
.prose p, .prose li { text-wrap: pretty; }
.video { position: relative; aspect-ratio: 16 / 9; width: 100%; background: var(--slate); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* "More ..." and "Talks and lectures" under a post or a person */
.pmore { padding-bottom: 0; }

/* ---------- A person: the square photo on the left, as on the homepage ---------- */
.pp-body { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: var(--gap); align-items: start; padding-top: var(--sec); }
.pp-photo { grid-column: 1; }
.pp-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.pp-main { grid-column: 2 / -1; min-width: 0; }
.pp-links { margin-top: 44px; max-width: 65ch; }
.pp-links ul { margin-top: 16px; border-top: 1px solid var(--rule); }
.pp-links li { border-bottom: 1px solid var(--rule); }
.pp-links a { display: flex; align-items: center; min-height: 54px; }

/* the people before and after */
.pn { margin-top: var(--sec); }
.pn ul { display: grid; grid-template-columns: 1fr 1fr 1fr; column-gap: var(--gap); border-block: 1px solid var(--slate); }
.pn li { position: relative; padding-block: 20px 22px; }
.pn .pn-all { text-align: center; }
.pn .pn-next { text-align: right; grid-column: 3; }
.pn a { display: block; margin-top: 6px; font: 400 var(--f-sub)/var(--l-sub) var(--disp); text-decoration: none; }

/* ---------- Lists: tag pages, events, resources ---------- */
.plist { padding-bottom: 0; }
.pgrid { grid-template-columns: repeat(5, 1fr); }
.pgrid > li { position: relative; }
.p-role { margin-top: 14px; }
.p-role + .p-name { margin-top: 4px; }
.tiles + .rows { margin-top: var(--gap); }
.pempty { margin-top: 20px; max-width: 65ch; }
.res-all > .res + .res { margin-top: var(--gap); }
.pager ol { display: flex; flex-wrap: wrap; column-gap: 30px; margin-top: var(--gap); }
.pager a[aria-current] { font-weight: 600; text-decoration-thickness: 2px; }

/* recordings: picture tiles with a red play square in the lower left */
.recs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 50px var(--gap); }
.recs > li { position: relative; }
.rec-pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); }
.rec-pic img { width: 100%; height: 100%; object-fit: cover; }
.rec-play { position: absolute; left: 0; bottom: 0; width: 48px; height: 48px; background: var(--red); }
.rec-play::before {
  content: ""; position: absolute; left: 18px; top: 15px; width: 14px; height: 18px;
  background: var(--white); clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.rec-meta { margin-top: 16px; display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 4px; }
.rec-t { margin-top: 8px; font: 400 var(--f-name)/var(--l-name) var(--disp); color: var(--red); text-wrap: balance; }
.rec-t a { text-decoration: none; }
.rec-who { margin-top: 6px; text-wrap: pretty; }

/* page not found: the pages to start from, as large red links under 1 px rules */
.nf-links { max-width: 680px; border-top: 1px solid var(--rule); }
.nf-links li { position: relative; border-bottom: 1px solid var(--rule); }
.nf-links a { display: flex; align-items: center; min-height: 60px; font: 400 var(--f-sub)/var(--l-sub) var(--disp); text-decoration: none; }

/* ---------- The close of every subpage: the red panel with the contact paragraph ---------- */
.iclose { margin-top: var(--sec); }
.iclose-panel { width: calc((100% - var(--gap)) / 2); }
.iclose-panel .lede { margin-top: 20px; }

/* ---------- Hover, fine pointers only ---------- */
@media (hover: hover) and (pointer: fine) {
  .crumbs a:hover { text-decoration-thickness: 2px; }
  .pn li:hover a, .recs > li:hover .rec-t a, .nf-links li:hover a, .ws-list .h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .pgrid > li:hover .p-name a { text-decoration-thickness: 2px; }
}

/* ---------- 1024 to 1199 px: one column for the hero panel, the photo column narrower ---------- */
@media (max-width: 1199px) {
  .ipanel, .iclose-panel { width: min(75%, 680px); }
  .pbody { grid-template-columns: 200px 1fr; }
  .pmain { grid-column: 2; }
  .pp-body { grid-template-columns: 240px 1fr; }
  .pp-main { grid-column: 2; }
  .recs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pgrid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 768 to 1023 px ---------- */
@media (max-width: 1023px) and (min-width: 768px) {
  .pgrid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Phones (under 768 px): full-width panels, one column ---------- */
@media (max-width: 767px) {
  .ihero .hero-photo, .pcontact .hero-photo { height: auto; aspect-ratio: 2 / 1; }
  .ipanel, .pcontact .ipanel, .iclose-panel {
    width: auto; margin-top: -40px;
    margin-inline: calc(-1 * var(--gut) / (1 - 2 * 0.0625));
    padding: 26px calc(var(--gut) / (1 - 2 * 0.0625)) 30px;
  }
  .iclose-panel { margin-top: 0; }
  .ipanel .ih-t2 { font-size: 30px; line-height: 33px; }
  .ipanel .ih-t3 { font-size: 27px; line-height: 30px; }
  .ipanel .ih-t4 { font-size: 24px; line-height: 27px; }
  .ipanel .act { margin-top: 22px; }
  .pbody, .pp-body { grid-template-columns: 1fr; }
  .pmain, .pp-main { grid-column: 1; }
  .pmeta { order: 2; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule); }
  .pfig { margin-bottom: 30px; }
  .plinks { gap: 14px; }
  .pp-photo img { width: 200px; }
  .pp-main { margin-top: 30px; }
  .pn ul { grid-template-columns: 1fr; }
  .pn .pn-all, .pn .pn-next { text-align: left; grid-column: auto; }
  .pn li + li { border-top: 1px solid var(--rule); }
  .pgrid { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .recs { grid-template-columns: 1fr; gap: 40px; }
}
