/* Mentors pages. Builds on /styles.css: same tokens, no new colours. */

/* Listing hero */
.m-hero { padding: 40px 0 48px; }
.m-hero .hero-title { font-size: clamp(2.25rem, 6.4vw, 4.25rem); max-width: 16ch; }
.m-hero .hero-tagline { margin-top: 24px; max-width: 34em; }
@media (min-width: 768px) { .m-hero { padding: 56px 0 72px; } }
@media (min-width: 1024px) { .m-hero::after { top: 0; width: 320px; height: 320px; } }

.m-hero .hero-notes { margin-bottom: 24px; }

/* Filters + list */
.m-browse { padding: 32px 0 72px; border-bottom: 1px solid var(--rule); }
.m-cols { display: grid; gap: 28px; }
.m-cols > * { min-width: 0; }
.m-filter-h { font-size: 1rem; margin-bottom: 12px; }
.m-filters ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.m-filters a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; padding: 8px 12px;
  border: 1.5px solid var(--ink); background: var(--card);
  font-size: 0.9375rem; line-height: 1.25; text-decoration: none;
  transition: background-color 160ms var(--ease);
}
.m-filters a:hover { background: var(--lift); }
.m-filters a[aria-current] { background: var(--signal); font-weight: 600; }
.m-filters .n { font: 600 0.875rem/1 var(--mono); }
@media (min-width: 1024px) {
  .m-browse { padding: 48px 0 96px; }
  .m-cols { grid-template-columns: 256px 1fr; gap: 40px; align-items: start; }
  .m-filters { position: sticky; top: calc(var(--header-h) + 24px); }
  .m-filters ul { flex-direction: column; gap: 0; border-top: 1.5px solid var(--ink); }
  .m-filters a { border-top: 0; padding: 10px 14px; }
}

.m-list { list-style: none; padding: 0; display: grid; gap: 16px; scroll-margin-top: calc(var(--header-h) + 16px); }
.m-card {
  position: relative;
  display: grid; grid-template-columns: 76px 1fr; gap: 16px;
  padding: 16px; border: 1.5px solid var(--ink); background: var(--card);
  transition: box-shadow 160ms var(--ease), background-color 160ms var(--ease);
}
.m-card:hover, .m-card:focus-within { background: var(--lift); box-shadow: 4px 4px 0 var(--blue); }
.m-card > * { min-width: 0; }
.m-face { display: block; width: 76px; height: 76px; object-fit: cover; border: 1.5px solid var(--ink); }
.m-body { display: contents; }
.m-title { font-size: 1.1875rem; letter-spacing: -0.01em; align-self: center; overflow-wrap: anywhere; }
.m-title a { text-decoration: none; }
.m-title a::after { content: ""; position: absolute; inset: 0; }
.m-title a:focus-visible { outline: none; }
.m-card:has(a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.m-card:hover .m-title a { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.m-sub { display: block; margin-top: 6px; font: 400 1rem/1.35 var(--sans); letter-spacing: 0; color: var(--ink-2); }
.m-who, .m-blurb, .m-foot { grid-column: 1 / -1; }
.m-who { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 1rem; line-height: 1.4; color: var(--ink-2); }
.m-who strong { color: var(--ink); font-weight: 600; }
.m-blurb {
  font-size: 1rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.m-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.m-team { font: 600 0.875rem/1.3 var(--mono); white-space: nowrap; }
.m-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.m-tags li { border: 1px solid var(--ink); background: var(--paper); font-size: 0.875rem; line-height: 1.3; }
.m-card .m-tags li, .m-tags a { padding: 3px 8px; }
.m-tags a { display: block; padding: 8px 12px; text-decoration: none; transition: background-color 160ms var(--ease); }
.m-tags a:hover { background: var(--signal); }
@media (min-width: 640px) {
  .m-card { grid-template-columns: 136px 1fr; gap: 24px; padding: 20px; }
  .m-face { width: 136px; height: 136px; }
  .m-body { display: flex; flex-direction: column; gap: 10px; }
  .m-title { font-size: 1.3125rem; align-self: auto; }
  .m-blurb { -webkit-line-clamp: 3; line-clamp: 3; }
  .m-foot { margin-top: 4px; }
}

/* Mentor page */
.d-grid { display: grid; gap: 32px; padding-top: 28px; padding-bottom: 64px; }
.d-grid > * { min-width: 0; }
.d-back { margin-bottom: 28px; font-size: 1rem; }
.d-title { font-size: clamp(1.875rem, 4.6vw, 3.25rem); letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; overflow-wrap: break-word; }
.d-sub { margin-top: 14px; font-size: clamp(1.125rem, 2vw, 1.375rem); line-height: 1.4; color: var(--ink-2); max-width: 34em; }
.d-head .m-tags { margin-top: 22px; gap: 8px; }
.d-main { max-width: 66ch; }
.d-main section + section .minor { margin-top: 40px; }
.d-main .minor { margin-top: 0; font-size: 1rem; letter-spacing: 0; text-transform: none; font-weight: 700; }
.d-main p a, .d-facts a, .d-main .bullets a {
  color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.d-main p a:hover, .d-facts a:hover { color: var(--signal-ink); }
.d-mentor { border: 1.5px solid var(--ink); background: var(--card); box-shadow: 6px 6px 0 var(--blue); align-self: start; }
.d-photo { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-bottom: 1.5px solid var(--ink); }
.d-mentor-in { padding: 22px; }
.d-name { font-size: 1.375rem; overflow-wrap: anywhere; }
.d-intro { margin-top: 8px; font-size: 1rem; line-height: 1.5; }
.d-facts { margin: 18px 0 22px; border-top: 1px solid var(--rule); font-size: 1rem; line-height: 1.45; }
.d-facts > div { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.d-facts dt { font: 600 0.875rem/1.4 var(--mono); }
.d-facts dd { margin: 2px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.d-facts dd a { display: inline-block; padding: 2px 0; }
.d-mentor-in .btn { width: 100%; }
.d-mentor-in .form-open { margin: 10px 0 0; }
.d-apply-go .form-open { margin: 8px 0 0; }
.d-apply-go .btn { width: 100%; }
.d-deadline { margin-top: 14px; font-size: 1rem; line-height: 1.4; color: var(--ink-2); }
@media (max-width: 639px) {
  /* Phones: photo beside the name so the project stays close */
  .d-mentor { display: grid; grid-template-columns: 112px 1fr; }
  .d-photo { width: 112px; height: 112px; border-right: 1.5px solid var(--ink); }
  .d-mentor-in { display: contents; }
  .d-name { align-self: center; padding: 12px 16px; font-size: 1.1875rem; }
  .d-intro, .d-facts, .d-mentor-in .btn, .d-mentor-in .form-open, .d-mentor-in .d-deadline { grid-column: 1 / -1; margin-left: 16px; margin-right: 16px; }
  .d-mentor-in .btn { width: auto; }
  .d-mentor-in .d-deadline { margin-bottom: 18px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .d-mentor { display: grid; grid-template-columns: 240px 1fr; }
  .d-photo { border-right: 1.5px solid var(--ink); height: 240px; align-self: start; }
}
@media (min-width: 1024px) {
  .d-grid { grid-template-columns: 1fr 352px; grid-template-rows: auto 1fr; gap: 48px 64px; padding-top: 40px; padding-bottom: 96px; }
  .d-mentor { grid-column: 2; grid-row: 1 / span 2; }
  .d-main { grid-column: 1; grid-row: 2; }
}

.d-apply .hazard { margin-bottom: 0; }
.d-apply-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-top: 48px; padding-bottom: 48px; }
.d-apply h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); letter-spacing: -0.02em; }
.d-next { display: grid; gap: 16px; padding-bottom: 64px; }
.d-next a {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  border: 1.5px solid var(--ink); background: var(--card); text-decoration: none; line-height: 1.35;
  transition: background-color 160ms var(--ease);
}
.d-next a:hover { background: var(--lift); }
.d-next strong { font: 700 1.0625rem/1.3 var(--mono); }
.d-next span { font-size: 1rem; color: var(--ink-2); }
.d-dir { margin-bottom: 4px; }
@media (min-width: 768px) {
  .d-next { grid-template-columns: 1fr 1fr; }
  .d-next a + a { text-align: right; }
}
.d-next + *, .site-footer { border-top: 1px solid var(--rule); }

@media (max-width: 17em) { .m-team { white-space: normal; } }
