/*
Theme Name: BM Cards
Description: Bare-bones card directory. The homepage shows every published page using the "Model Profile" template as a card; each card opens that profile.
Version: 1.0.7
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: bm-cards
*/

*, *::before, *::after { box-sizing: border-box; }
html { background: #000; color: #fff; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: #fff; }

.bm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Site header (every page) ---------- */
.bm-site-header { display: flex; justify-content: center; align-items: center; padding: 14px 16px; background: #000; }
.bm-site-name { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.bm-site-name:hover { opacity: .8; }
.custom-logo-link { display: block; max-width: 100%; line-height: 0; }
.custom-logo { display: block; width: auto; max-width: 100%; height: auto; }
.bm-site-name:focus-visible, .custom-logo-link:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* ---------- Homepage cards ---------- */
.bm-grid-wrap { max-width: 1200px; margin: 0 auto; padding: 16px; }
.bm-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
.bm-card { margin: 0; }
.bm-card-link { position: relative; display: block; overflow: hidden; border-radius: 6px; background: #111; text-decoration: none; }
.bm-card-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.bm-card-img { display: block; aspect-ratio: 3 / 4; background: #111; }
.bm-card-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.bm-card-link:hover .bm-card-img img { opacity: .8; }
.bm-card-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 10px 0; border-bottom: 10px solid transparent; background: linear-gradient(transparent, rgba(0, 0, 0, .9)); font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (min-width: 700px) {
	.bm-grid { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
	.bm-card-name { font-size: 15px; padding: 48px 14px 0; border-bottom-width: 14px; }
}

/* ---------- Profile and other pages ---------- */
.bm-profile { margin: 0; }
.bm-page { max-width: 820px; margin: 0 auto; padding: 24px 16px 48px; }
.bm-title { margin: 0 0 24px; font-size: clamp(22px, 4vw, 32px); line-height: 1.25; }
.bm-content { overflow-wrap: anywhere; } /* long web addresses wrap instead of pushing the page wider than the phone */
.bm-content h2 { margin: 32px 0 8px; font-size: 20px; line-height: 1.3; }
.bm-content iframe, .bm-content video { max-width: 100%; }
.bm-empty { text-align: center; opacity: .7; }

/* Phones: profile text 50% bigger */
@media (max-width: 699px) {
	.bm-title { font-size: 33px; }
	.bm-content { font-size: 24px; }
	.bm-content h2 { font-size: 30px; }
	.profile-photos { justify-content: center; }
	.bm-content img { margin-left: auto; margin-right: auto; }
}

/* Classes already inside the old profile content */
.profile-photos { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; }
.profile-photos img { width: auto; max-height: 480px; border-radius: 6px; }
.profile-section { margin: 0 0 8px; }
