:root {
  --mf-frost: #F7F7FF;
  --mf-midnight: #27187D;
  --mf-cream: #E9E3CD;
  --mf-orange: #FCA019;
  --mf-sky: #98CBFF;
  --mf-green: #114A37;
  --mf-ink: #15131f;
  --mf-muted: #686477;
  --mf-line: rgba(39, 24, 125, .16);
  --mf-card: rgba(255, 255, 255, .72);
  --mf-radius: 0px;
  --mf-shadow: 0 14px 40px rgba(39, 24, 125, .08);
  --mf-max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--mf-ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(152,203,255,.38), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(252,160,25,.22), transparent 22rem),
    var(--mf-frost);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
  display: flex;
  flex-direction: column;
}

.mf-site-main { flex: 1 0 auto; width: 100%; }
.mf-site-footer { flex-shrink: 0; }

a { color: var(--mf-midnight); text-decoration-thickness: .08em; text-underline-offset: .18em; }
img { max-width: 100%; height: auto; display: block; }

.mf-container { width: min(calc(100% - 32px), var(--mf-max)); margin-inline: auto; }
.mf-skip-link { position: absolute; left: -999px; top: 8px; background: white; padding: 8px 12px; }
.mf-skip-link:focus { left: 8px; z-index: 99; }

.mf-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(247,247,255,.78);
  border-bottom: 1px solid var(--mf-line);
}
.mf-site-header__inner { width: min(calc(100% - 32px), var(--mf-max)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.mf-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 900; letter-spacing: -.02em; }
.mf-brand__mark { display: inline-flex; align-items: center; justify-content: center; min-width: 0; }
.mf-brand__mark .custom-logo-link { display: inline-flex; align-items: center; }
.mf-brand__mark .custom-logo, .mf-default-logo { width: auto; max-width: min(270px, 38vw); max-height: 54px; object-fit: contain; }
.mf-logo-text { color: var(--mf-midnight); font-weight: 950; font-style: italic; font-size: 1.35rem; }
.mf-brand__title { color: var(--mf-midnight); font-size: clamp(1.05rem, 2vw, 1.42rem); letter-spacing: -.03em; white-space: nowrap; }
.mf-primary-nav ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.mf-primary-nav a { text-decoration: none; font-size: .92rem; font-weight: 700; }
.mf-menu-toggle { display: none; border: 1px solid var(--mf-line); background: white; border-radius: 0; padding: 7px 11px; }

.mf-hero { padding: 72px 0 24px; }
.mf-kicker { color: var(--mf-midnight); text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 900; margin: 0 0 8px; }
h1, h2, h3 { line-height: 1.04; letter-spacing: -.045em; margin-top: 0; }
.mf-hero h1 { font-size: clamp(2.6rem, 8vw, 6.4rem); max-width: 1080px; margin-bottom: 0; }
.mf-gallery-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 20px 0 16px; border-top: 1px solid var(--mf-line); }
.mf-gallery-intro h2 { color: var(--mf-midnight); margin-bottom: 6px; font-size: clamp(1.7rem, 3vw, 2.6rem); }
.mf-gallery-intro p { color: var(--mf-muted); margin: 0; max-width: 640px; }

.mf-search-form { display: flex; gap: 8px; background: white; border: 1px solid var(--mf-line); border-radius: 0; padding: 6px; box-shadow: var(--mf-shadow); max-width: 520px; }
.mf-search-form input { min-width: 0; flex: 1; border: 0; background: transparent; padding: 10px 12px; outline: none; }
.mf-search-form button, .mf-button { border: 0; border-radius: 0; background: var(--mf-midnight); color: white; padding: 10px 15px; font-weight: 800; text-decoration: none; display: inline-flex; }

.mf-home-search { padding: 40px 0 18px; display: flex; justify-content: flex-end; }
.mf-home-search .mf-search-form { width: min(100%, 520px); }

.mf-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 24px 0 70px; align-items: start; }
.mf-column { background: rgba(255,255,255,.36); border: 1px solid var(--mf-line); border-radius: 0; padding: 14px; min-width: 0; }
.mf-column h2 { color: var(--mf-midnight); margin: 4px 4px 14px; }
.mf-column-note { color: var(--mf-muted); font-size: .8rem; margin: -6px 4px 12px; }

.mf-post-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 18px 0 76px; align-items: stretch; }
.mf-post-gallery .mf-post-card { margin-bottom: 0; min-height: 100%; }
.mf-post-gallery .mf-post-card:nth-child(n) { grid-column: auto; }
.mf-post-gallery .mf-post-card:nth-child(n) .mf-post-card__thumb { aspect-ratio: 1.35; }

.mf-post-card { background: var(--mf-card); border: 1px solid var(--mf-line); border-radius: 0; padding: 12px; box-shadow: var(--mf-shadow); margin-bottom: 14px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.mf-post-card:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(39, 24, 125, .14); }
.mf-post-card__link { text-decoration: none; color: inherit; display: block; }
.mf-post-card__thumb { aspect-ratio: 1.35; border-radius: 0; overflow: hidden; margin-bottom: 12px; background: var(--mf-cream); }
.mf-post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mf-post-card h3 { color: var(--mf-midnight); font-size: 1.15rem; margin-bottom: 6px; }
.mf-post-card p { color: var(--mf-muted); font-size: .93rem; margin: 0; }
.mf-post-card__footer { display: flex; justify-content: flex-end; margin-top: 14px; }
.mf-author-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--mf-ink); font-weight: 800; font-size: .82rem; }
.mf-author-chip img { border-radius: 999px; border: 2px solid var(--mf-sky); }

.mf-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-bottom: 70px; }
.mf-archive-header, .mf-search-page { padding: 54px 0 22px; }
.mf-archive-header h1, .mf-search-page h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); color: var(--mf-midnight); }

.mf-single-layout { display: grid; grid-template-columns: minmax(0, 760px) 300px; gap: 54px; align-items: start; padding: 58px 0 76px; }
.mf-single__header h1 { font-size: clamp(2.4rem, 7vw, 5.2rem); color: var(--mf-midnight); margin-bottom: 10px; }
.mf-subtitle { font-size: 1.25rem; color: var(--mf-muted); }
.mf-post-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; padding-top: 12px; border-top: 1px solid var(--mf-line); color: var(--mf-muted); font-size: .9rem; }
.mf-featured-image { margin: 28px 0; border-radius: 0; overflow: hidden; }
.mf-content { font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif; font-size: clamp(1.05rem, 1.5vw, 1.22rem); }
.mf-content p, .mf-content ul, .mf-content ol { margin-bottom: 1.2em; }
.mf-content h2, .mf-content h3 { font-family: ui-sans-serif, system-ui, sans-serif; color: var(--mf-midnight); margin-top: 1.8em; }

.mf-author-aside { position: sticky; top: 90px; background: var(--mf-author-bg); border: 3px var(--mf-author-border-style) var(--mf-author-border); border-radius: var(--mf-author-radius); padding: 18px; box-shadow: var(--mf-shadow); }
.mf-author-card__avatar img, .mf-author-profile__avatar img { border-radius: 999px; border: 4px solid var(--mf-author-border, var(--mf-sky)); }
.mf-author-card h2, .mf-author-profile h1 { color: var(--mf-author-accent, var(--mf-midnight)); }
.mf-author-card__degree, .mf-author-subtitle { font-weight: 800; color: var(--mf-muted); }

.mf-author-profile { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center; margin-top: 48px; margin-bottom: 34px; background: var(--mf-author-bg); border: 4px var(--mf-author-border-style) var(--mf-author-border); border-radius: var(--mf-author-radius); padding: 28px; }
.mf-author-profile h1 { font-size: clamp(2.2rem, 7vw, 4.8rem); margin-bottom: 8px; }
.mf-author-posts h2 { color: var(--mf-midnight); }

.mf-page { padding: 54px 0 80px; max-width: 780px; }
.mf-page-header h1 { color: var(--mf-midnight); font-size: clamp(2.4rem, 8vw, 5rem); }

.mf-site-footer { background: var(--mf-midnight); color: white; margin-top: 0; padding: 34px 0; }
.mf-site-footer__inner { width: min(calc(100% - 32px), var(--mf-max)); margin-inline: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.mf-slogan { color: rgba(255,255,255,.72); font-size: .95rem; font-weight: 400; letter-spacing: 0; margin: 0; text-align: right; }
.mf-disclaimer { color: rgba(255,255,255,.72); margin: 0; }
.mf-footer-nav { width: min(calc(100% - 32px), var(--mf-max)); margin: 20px auto 0; }
.mf-footer-nav ul { list-style: none; display: flex; gap: 16px; flex-wrap: wrap; padding: 0; margin: 0; }
.mf-footer-nav a { color: white; }

.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

@media (max-width: 900px) {
  .mf-hero, .mf-home-grid, .mf-single-layout, .mf-card-grid, .mf-author-profile, .mf-site-footer__inner { grid-template-columns: 1fr; }
  .mf-post-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mf-author-aside { position: static; }
  .mf-menu-toggle { display: inline-flex; }
  .mf-primary-nav { display: none; position: absolute; right: 16px; top: 60px; background: white; border: 1px solid var(--mf-line); border-radius: 0; padding: 12px; box-shadow: var(--mf-shadow); }
  .mf-primary-nav.is-open { display: block; }
  .mf-primary-nav ul { flex-direction: column; gap: 8px; }
}

@media (max-width: 560px) {
  .mf-post-gallery { grid-template-columns: 1fr; }
  .mf-brand__mark .custom-logo, .mf-default-logo { max-width: min(210px, 48vw); max-height: 42px; }
}

.mf-authors-header { padding: 54px 0 18px; }
.mf-authors-header h1 { color: var(--mf-midnight); font-size: clamp(2.4rem, 8vw, 5rem); margin-bottom: 10px; }
.mf-authors-header p:not(.mf-kicker) { max-width: 680px; color: var(--mf-muted); margin: 0; font-size: 1.08rem; }
.mf-authors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; padding: 18px 0 76px; }
.mf-author-tile { background: var(--mf-author-bg); border: 3px var(--mf-author-border-style) var(--mf-author-border); border-radius: var(--mf-author-radius); box-shadow: var(--mf-shadow); padding: 18px; min-height: 100%; transition: transform .18s ease, box-shadow .18s ease; }
.mf-author-tile:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(39, 24, 125, .14); }
.mf-author-tile__link { color: inherit; display: block; height: 100%; text-decoration: none; }
.mf-author-tile__avatar img { border-radius: 999px; border: 4px solid var(--mf-author-border, var(--mf-sky)); margin-bottom: 14px; }
.mf-author-tile h2 { color: var(--mf-author-accent, var(--mf-midnight)); margin-bottom: 6px; font-size: 1.45rem; }
.mf-author-tile p { color: var(--mf-muted); margin: 0 0 10px; }
.mf-author-tile__count { color: var(--mf-author-accent, var(--mf-midnight)); font-weight: 900; font-size: .84rem; }
.mf-author-tagline { color: var(--mf-muted); font-weight: 700; }
.mf-author-custom-html { margin-top: 20px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--mf-author-border, var(--mf-line)) 60%, transparent); }
.mf-author-custom-html :first-child { margin-top: 0; }
.mf-author-custom-html :last-child { margin-bottom: 0; }

/* v2.1 author profile fields */
.mf-author-card__blurb { color: var(--mf-muted); font-size: .95rem; line-height: 1.55; }
.mf-author-blurb-box, .mf-author-about-box { margin-top: 20px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--mf-author-border, var(--mf-line)) 60%, transparent); }
.mf-author-blurb-box h2, .mf-author-about-box h2 { color: var(--mf-author-accent, var(--mf-midnight)); font-size: 1rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .08em; }
.mf-author-about-html :first-child { margin-top: 0; }
.mf-author-about-html :last-child { margin-bottom: 0; }
