:root {
  --bg: #f6f7f9; --surface: #fff; --text: #1f2430; --muted: #6b7280;
  --accent: #0f766e; --accent-d: #0b5a54; --border: #e5e7eb;
  --radius: 12px; --shadow: 0 2px 10px rgba(16,24,40,.07);
  --max: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-d); text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.btn { display: inline-block; background: var(--btn-bg, var(--accent)); color: var(--btn-fg, #fff) !important; padding: .55em 1.1em; border-radius: 999px; font-weight: 600; text-decoration: none !important; border: 0; cursor: pointer; }
.btn:hover { background: var(--btn-hover, var(--accent-d)); }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; flex-direction: column; line-height: 1.2; color: var(--text); text-decoration: none !important; }
.brand strong { font-size: 1.3rem; }
.brand span { font-size: .8rem; color: var(--muted); }
.main-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.main-nav a { color: var(--text); font-weight: 500; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; font-size: 1.3rem; padding: 4px 10px; cursor: pointer; }

/* Hero slider */
.hero { position: relative; width: 100%; height: var(--hero-h, clamp(260px, 42vw, 480px)); overflow: hidden; background: #111; }
.slider-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.4,0,.2,1); will-change: transform; }
.slide { flex: 0 0 100%; height: 100%; background-size: var(--hero-fit, cover); background-repeat: no-repeat; background-color: #111; background-position: center; position: relative; }
.slide-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: 0 max(20px, calc((100% - var(--max)) / 2 + 20px)); color: #fff; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0) 70%); }
.slide-overlay h2 { font-size: clamp(1.5rem, 4vw, 2.8rem); max-width: 18ch; margin: 0; }
.slide-overlay p { max-width: 46ch; font-size: clamp(1rem, 1.6vw, 1.2rem); margin: 0 0 10px; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: #111; font-size: 1.1rem; cursor: pointer; z-index: 2; }
.slider-arrow:hover { background: #fff; }
.slider-arrow.prev { left: 14px; } .slider-arrow.next { right: 14px; }
.slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.slider-dots button { width: 11px; height: 11px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.5); cursor: pointer; }
.slider-dots button.active { background: #fff; transform: scale(1.25); }

/* Layouts */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; padding-bottom: 48px; }
.full-width { padding-top: 32px; padding-bottom: 48px; }
.page { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 48px); }
.page-heading { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }

/* Widgets */
.widget { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 20px; }
.widget-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.widget p:last-child { margin-bottom: 0; }
.widget-list { list-style: none; margin: 0; padding: 0; }
.widget-list li { padding: 7px 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; }
.widget-list li:last-child { border-bottom: 0; }
.widget-list small { color: var(--muted); width: 100%; }
.count { background: var(--bg); border-radius: 999px; padding: 0 9px; font-size: .8rem; color: var(--muted); }
.search-form { display: flex; gap: 6px; }
.search-form input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.search-form button { padding: 0 14px; border: 0; background: var(--btn-bg, var(--accent)); color: var(--btn-fg, #fff); border-radius: 8px; cursor: pointer; font-weight: 600; }

/* Levels */
.level { margin-bottom: 40px; }
.level-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.level-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(16,24,40,.12); }
.card-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { margin: 0; }
.card-title a { color: var(--text); }
.excerpt { color: #4b5563; margin: 4px 0 8px; }
.meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.cat { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }
.card-featured .card-img img { aspect-ratio: 21/9; }
.card-featured .card-title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.card-featured .card-body { padding: 24px 28px 28px; align-items: flex-start; }
.card-featured .excerpt { font-size: 1.1rem; }
.card-medium .card-title { font-size: 1.3rem; }
.card-small .card-title { font-size: 1.05rem; }
.card-small .excerpt { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.headlines { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.headlines li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.headlines li:last-child { border-bottom: 0; }
.headlines a:first-child { font-weight: 600; color: var(--text); }

/* Single post */
.post { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 44px); }
.post-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 8px; }
.post-image { width: 100%; border-radius: var(--radius); margin: 16px 0 24px; aspect-ratio: 16/8; object-fit: cover; }
.post-content { font-size: 1.08rem; max-width: 72ch; }
.full-width .post-content { max-width: none; }
.post-content code { background: var(--bg); padding: 2px 6px; border-radius: 4px; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .95rem; }

/* Footer */
.site-footer { background: #111827; color: #d1d5db; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.site-footer .widget { background: transparent; box-shadow: none; padding: 0; margin: 0; }
.site-footer .widget-title { color: #fff; }
.site-footer a { color: #9ae6df; }
.site-footer .widget-list li { border-color: #374151; }
.site-footer .count { background: #1f2937; }
.footer-widgets { padding-top: 40px; padding-bottom: 20px; }
.footer-widgets .footer-grid { padding-top: 0; padding-bottom: 0; }
.footer-copyright { background: rgba(0,0,0,.28); border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0 20px; font-size: .85rem; color: #9ca3af; }
.footer-copyright p { margin: 0; }
.footer-widgets.custom-fg a, .footer-widgets.custom-fg .widget-title, .footer-copyright.custom-fg a { color: inherit; }

/* Responsive */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col:empty { display: none; }
}
@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 20px 14px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 10px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .headlines li { flex-direction: column; gap: 2px; }
  .slider-arrow { width: 36px; height: 36px; }
  .post-nav { flex-direction: column; }
}

/* Comments */
.comments{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);padding:clamp(20px,4vw,36px);margin-top:24px}
.comment-list{list-style:none;margin:0 0 24px;padding:0}
.comment-list li{display:flex;gap:14px;padding:14px 0;border-bottom:1px solid var(--border)}
.comment-list .avatar{width:40px;height:40px;border-radius:50%;flex:none}
.comment-list p{margin:4px 0 0}.comment-list small{color:var(--muted)}
.comment-form label{display:block;font-weight:600;font-size:.9rem}
.comment-form input,.comment-form textarea{width:100%;padding:9px 12px;border:1px solid var(--border);border-radius:8px;font:inherit;margin-top:4px}
.comment-form .two{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.comment-form .hp{position:absolute;left:-9999px;height:0;overflow:hidden}
.comment-note{background:#d1fae5;color:#065f46;padding:10px 14px;border-radius:8px}
.comment-error{background:#fee2e2;color:#991b1b;padding:10px 14px;border-radius:8px}
.reading-time{color:var(--muted);font-size:.9rem;margin:0 0 12px}
@media(max-width:680px){.comment-form .two{grid-template-columns:1fr}}

/* Optional right sidebar */

/* Layout columns depend on which sidebars are enabled */
.layout.has-left { grid-template-columns: 280px minmax(0, 1fr); }
.layout.has-right { grid-template-columns: minmax(0, 1fr) 260px; }
.layout.has-left.has-right { grid-template-columns: 260px minmax(0, 1fr) 260px; }
@media (max-width: 1100px) { .layout.has-left.has-right { grid-template-columns: 260px minmax(0, 1fr); } .layout.has-left.has-right .sidebar-right { grid-column: 1 / -1; } }
@media (max-width: 960px) { .layout.has-left, .layout.has-right, .layout.has-left.has-right { grid-template-columns: 1fr; } }

/* Pages and posts fill their column (sidebar layouts included) */
.layout .page .post-content, .layout .content .post-content { max-width: none; }

/* Sidebar content must fit its column and never be clipped */
.sidebar { min-width: 0; align-self: start; }
.sidebar .widget { overflow: visible; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.sidebar .widget img, .sidebar .widget video, .sidebar .widget iframe, .sidebar .widget embed, .sidebar .widget object, .sidebar .widget canvas, .sidebar .widget svg { max-width: 100%; height: auto; }
.sidebar .widget iframe { height: auto; aspect-ratio: 16 / 9; }
.sidebar .widget table { display: block; max-width: 100%; overflow-x: auto; }
.sidebar .widget pre, .sidebar .widget code { white-space: pre-wrap; max-width: 100%; }
.sidebar .widget input, .sidebar .widget select, .sidebar .widget textarea { max-width: 100%; box-sizing: border-box; }

/* Logo */
.brand.has-logo { flex-direction: row; align-items: center; gap: 12px; }
.brand .logo { max-height: 44px; width: auto; max-width: 200px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand .brand-text { font-size: 1rem; color: var(--text); }
.cat-desc { color: var(--muted); margin: -4px 0 20px; max-width: 70ch; }
.page-full .full-width .post-content, .layout.no-sidebar .page .post-content { max-width: none; }

/* Header colour options: text colour applies to brand, tagline and menu */
.site-header.custom-fg .brand, .site-header.custom-fg .brand strong, .site-header.custom-fg .brand-text, .site-header.custom-fg .main-nav a, .site-header.custom-fg .nav-toggle { color: inherit; }
.site-header.custom-fg .brand span { color: inherit; opacity: .72; }
.site-header.custom-fg .nav-toggle { border-color: currentColor; background: transparent; }
.site-header.custom-fg .main-nav { background: inherit; }

/* Social links widget */
.social-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #fff !important;
  font-weight: 700; font-size: .85rem; text-decoration: none !important; transition: transform .15s, opacity .15s; }
.social-links a:hover { transform: translateY(-2px); opacity: .88; }
.social-links.as-list { flex-direction: column; gap: 6px; }
.social-links.as-list a { width: auto; height: auto; border-radius: 0; background: none !important; color: var(--accent) !important; justify-content: flex-start; font-weight: 500; font-size: 1rem; }
.site-footer .social-links.as-list a { color: inherit !important; }

/* Accounts */
.account-wrap { padding-top: 40px; padding-bottom: 60px; }
.account-box { max-width: 1040px; margin: 0 auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.account-box h1 { font-size: 1.6rem; }
.account-alt { margin: 16px 0 0; color: var(--muted); font-size: .95rem; }
.nav-account a { font-weight: 600; }
.comment-as { background: var(--bg); border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; }

/* Homepage category sections */
.home-section .level-label a:first-child { color: var(--text); text-decoration: none; }
.home-section .see-all { order: 3; font-size: .8rem; text-transform: none; letter-spacing: 0; font-weight: 600; white-space: nowrap; }
.card-ph { display: block; width: 100%; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--accent), var(--accent-d)); opacity: .85; }
.single .post-image[src=""] { display: none; }

/* Account dropdown in the header */
.nav-dropdown { position: relative; }
.dd-toggle { background: none; border: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.main-nav a, .dd-toggle { color: var(--hdr-fg, var(--text)); }
.site-header.custom-fg .dd-toggle { color: inherit; }
.dd-toggle:hover { color: var(--accent); }
.dd-toggle .caret { font-size: .7em; transition: transform .15s; }
.nav-dropdown.open .caret { transform: rotate(180deg); }
.dd-menu { display: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 180px; list-style: none; margin: 0; padding: 6px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(16,24,40,.16); z-index: 60; }
.nav-dropdown.open .dd-menu { display: block; }
.main-nav .dd-menu { flex-direction: column; gap: 0; }
.dd-menu li { display: block; }
.dd-menu a, .dd-menu button { display: block; width: 100%; text-align: left; padding: 9px 16px; background: none; border: 0; font: inherit; font-weight: 500; color: var(--text) !important; cursor: pointer; text-decoration: none; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--bg); color: var(--accent) !important; text-decoration: none; }
.dd-menu form { margin: 0; }
.site-header.custom-fg .dd-menu a, .site-header.custom-fg .dd-menu button { color: var(--text) !important; }
@media (max-width: 680px) {
  .dd-menu { position: static; box-shadow: none; border: 0; border-left: 2px solid var(--border); border-radius: 0; margin: 6px 0 0 4px; background: transparent; }
  .dd-menu a, .dd-menu button { padding: 7px 12px; }
}

/* Wide account pages: coloured panel + roomy form */
.account-wrap { max-width: 1160px; }
.account-side { background: linear-gradient(145deg, var(--accent), var(--accent-d)); color: #fff; padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.account-side h2 { color: #fff; font-size: 1.7rem; margin: 0 0 8px; }
.account-side p { margin: 0 0 14px; opacity: .92; font-size: 1.05rem; }
.account-logo { max-height: 60px; max-width: 200px; width: auto; margin-bottom: 18px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.account-perks { margin: 4px 0 0; padding-left: 20px; opacity: .95; line-height: 1.7; }
.account-main { padding: 44px 48px; }
.account-main h1 { font-size: 1.9rem; margin-bottom: 18px; }
.account-main .comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.account-main .comment-form > p, .account-main .comment-form > button { grid-column: 1 / -1; }
.account-main .comment-form > p.half { grid-column: auto; }
.account-main .comment-form > button { justify-self: start; padding: .7em 2em; font-size: 1rem; }
@media (max-width: 860px) {
  .account-box { grid-template-columns: 1fr; }
  .account-side { padding: 28px 26px; }
  .account-main { padding: 28px 24px; }
  .account-main .comment-form { grid-template-columns: 1fr; }
}

/* The dropdown must stay closed until opened (beats the generic ".main-nav ul" flex rule) */
.main-nav .dd-menu { display: none; flex-direction: column; gap: 0; }
.main-nav .nav-dropdown.open .dd-menu { display: block; }
@media (max-width: 680px) { .main-nav .nav-dropdown.open .dd-menu { display: block; } }

.slide-overlay.no-shade { background: none; }


/* Top bar: welcome text + live date and time */
.topbar { background: var(--accent-d, #0b5a54); color: #fff; font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; padding-top: 5px; padding-bottom: 5px; }
.topbar-welcome { font-weight: 600; }
.topbar-clock { font-variant-numeric: tabular-nums; opacity: .95; white-space: nowrap; }
.topbar a { color: inherit; }
@media (max-width: 680px) { .topbar-inner { flex-direction: column; gap: 2px; text-align: center; min-height: 0; } .topbar-clock { white-space: normal; } }
/* Embedded videos */
.video-embed { position: relative; width: 100%; max-width: 960px; aspect-ratio: 16 / 9; margin: 1.2em 0; border-radius: 12px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed.video-file video { object-fit: contain; }

/* Keeps a hidden title available to screen readers */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Trending block */
.trending{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.trending li{display:flex;gap:12px;align-items:center;padding:12px;background:var(--surface,#fff);border:1px solid var(--border,#e5e7eb);border-radius:12px}
.trend-rank{flex:none;width:34px;height:34px;border-radius:50%;background:var(--accent,#0f766e);color:#fff;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.trend-img{flex:none;width:72px;height:72px;border-radius:10px;overflow:hidden}.trend-img img{width:100%;height:100%;object-fit:cover;display:block}
.trend-body{min-width:0}.trend-title{display:block;font-weight:600;line-height:1.3;color:var(--text,#111);text-decoration:none;margin-bottom:4px}.trend-title:hover{text-decoration:underline}
.trend-likes{margin-left:6px}
@media(max-width:640px){.trending{grid-template-columns:1fr}}

/* Hero slide with 3D portraits */
.slide.has-people .slide-overlay{width:min(42%,520px);right:auto;padding-right:0}
.slide.has-people .slide-overlay p{max-width:30ch}
.hero-people{position:absolute;top:0;bottom:0;right:max(20px,calc((100% - var(--max)) / 2 + 20px));display:flex;align-items:center;gap:clamp(8px,1.5vw,22px);perspective:1200px;perspective-origin:50% 42%;z-index:2;pointer-events:none;transform-style:preserve-3d}
.hp{--arc:calc((var(--i) - (var(--n) - 1) / 2) * -9deg);--depth:calc(-1px * (var(--i) - (var(--n) - 1) / 2) * (var(--i) - (var(--n) - 1) / 2) * 7);margin:0;width:clamp(66px,9.3vw,136px);text-align:center;color:#fff;position:relative;pointer-events:auto;transform-style:preserve-3d;transform:rotateX(var(--rx,0deg)) rotateY(calc(var(--arc) + var(--ry,0deg))) translateZ(calc(var(--depth) + 30px));transition:transform .45s cubic-bezier(.2,.8,.2,1);cursor:default}
.hp:hover{transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateZ(95px) scale(1.06);z-index:3}
.hp-in{transform-style:preserve-3d;animation:hpFloat 6s ease-in-out infinite;animation-delay:calc(var(--i) * -1.15s)}
.hp-photo{display:block;position:relative;border-radius:50%;aspect-ratio:1;border:3px solid #e8be50;overflow:hidden;background:#0b2a4a;box-shadow:0 0 0 5px rgba(232,190,80,.22),0 18px 34px rgba(0,0,0,.55),inset 0 -14px 26px rgba(0,0,0,.35);transform:translateZ(14px)}
.hp-photo img{width:100%;height:100%;object-fit:cover;display:block}
.hp-photo::after{content:"";position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 30% 24%,rgba(255,255,255,.55),rgba(255,255,255,0) 46%),linear-gradient(160deg,rgba(255,255,255,.12),rgba(0,0,0,.18));pointer-events:none}
.hp figcaption{display:flex;flex-direction:column;gap:2px;margin-top:10px;transform:translateZ(22px);text-shadow:0 2px 6px rgba(0,0,0,.7)}
.hp-name{font-family:Georgia,"Times New Roman",serif;font-size:clamp(.6rem,.95vw,.88rem);line-height:1.15}
.hp-role{font-size:clamp(.45rem,.66vw,.64rem);letter-spacing:.12em;text-transform:uppercase;color:#e8be50;font-weight:700}
.hp-years{font-size:clamp(.5rem,.74vw,.72rem);opacity:.85}
.hp-shadow{position:absolute;left:12%;right:12%;bottom:-16px;height:14px;border-radius:50%;background:radial-gradient(ellipse,rgba(0,0,0,.5),rgba(0,0,0,0) 70%);transform:translateZ(-30px);animation:hpShadow 6s ease-in-out infinite;animation-delay:calc(var(--i) * -1.15s)}
.hero-credit{position:absolute;left:max(20px,calc((100% - var(--max)) / 2 + 20px));right:20px;bottom:8px;margin:0;font-size:.58rem;color:rgba(255,255,255,.55);z-index:1;line-height:1.3;max-width:62%}
@keyframes hpFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
@keyframes hpShadow{0%,100%{transform:translateZ(-30px) scaleX(1);opacity:1}50%{transform:translateZ(-30px) scaleX(.86);opacity:.7}}
@media(prefers-reduced-motion:reduce){.hp-in,.hp-shadow{animation:none}.hp{transition:none}}
@media(max-width:760px){
  .slide.has-people .slide-overlay{width:100%;justify-content:flex-start;padding-top:18px}
  .slide.has-people .slide-overlay p,.slide.has-people .slide-overlay .btn,.hero-credit{display:none}
  .hero-people{top:auto;bottom:34px;left:0;right:0;justify-content:center;gap:6px;perspective:700px}
  .hp{width:15.5vw}.hp figcaption{display:none}.hp-photo{border-width:2px}
}
.slide.has-people .slide-overlay p{display:none}

/* keep the 3D portraits and title clear of the slider arrows */
.hero-people{right:max(64px,calc((100% - var(--max)) / 2 + 64px))}
.slide.has-people .slide-overlay{padding-left:max(64px,calc((100% - var(--max)) / 2 + 64px))}
@media(max-width:760px){.hero-people{right:0}.slide.has-people .slide-overlay{padding-left:20px}}

/* Banner and pictures inside pages (e.g. History) */
.page-hero{position:relative;display:flex;align-items:flex-end;min-height:clamp(200px,32vw,340px);margin:0 0 26px;padding:clamp(16px,3vw,32px);border-radius:14px;overflow:hidden;color:#fff;background:#0b2a4a center/cover no-repeat;box-shadow:0 10px 28px rgba(16,24,40,.22)}
.page-hero::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(8,28,60,.05) 20%,rgba(8,28,60,.82) 100%)}
.page-hero span{position:relative;font-size:clamp(1.15rem,3vw,2rem);font-weight:700;line-height:1.25;max-width:24ch;text-shadow:0 2px 10px rgba(0,0,0,.55)}
.page-fig{margin:26px 0;border-radius:14px;overflow:hidden;box-shadow:0 8px 22px rgba(16,24,40,.16)}
.page-fig img{display:block;width:100%;height:auto;max-height:420px;object-fit:cover}
.page-fig figcaption{padding:9px 14px;font-size:.88rem;color:#50575e;background:#f6f7f7}
html[dir=rtl] .page-hero{text-align:right}

/* clickable 3D portraits and biography pages */
.hp-link{display:block;color:inherit;text-decoration:none!important;cursor:pointer}
.hp-link:hover .hp-name{color:#e8be50}.hp-link:hover .hp-photo{box-shadow:0 0 0 6px rgba(232,190,80,.5),0 22px 40px rgba(0,0,0,.6)}
.hp-link:focus-visible{outline:3px solid #e8be50;outline-offset:6px;border-radius:14px}
.bio-facts{list-style:none;margin:0 0 1.2em;padding:14px 18px;background:#f6f7f7;border-left:4px solid var(--accent,#0f766e);border-radius:0 10px 10px 0}
.bio-facts li{margin:4px 0}.bio-facts b{display:inline-block;min-width:5.5em}
.post-content .bio-photo{float:left}.post-content::after{content:"";display:block;clear:both}
@media(max-width:560px){.post-content .bio-photo{float:none;margin:0 auto 1em!important}}

.bio-top{margin:0 0 14px;font-weight:600}
.bio-nav{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:28px 0 8px;padding-top:16px;border-top:1px solid var(--border,#e5e7eb)}
.bio-nav a:not(.btn){font-weight:600}

/* Leaders hub page */
.leaders-intro{font-size:1.05rem;color:var(--muted,#6b7280);margin:0 0 22px}
.leaders-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:20px}
.leader-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:22px 16px 18px;background:var(--surface,#fff);border:1px solid var(--border,#e5e7eb);border-radius:16px;box-shadow:0 4px 14px rgba(16,24,40,.07);color:inherit;text-decoration:none!important;transition:transform .2s,box-shadow .2s}
.leader-card:hover{transform:translateY(-5px);box-shadow:0 14px 30px rgba(16,24,40,.16)}
.leader-photo{display:block;width:132px;height:132px;border-radius:50%;overflow:hidden;border:4px solid #e8be50;box-shadow:0 0 0 5px rgba(232,190,80,.22),0 10px 20px rgba(0,0,0,.2);margin-bottom:10px}
.leader-photo img{width:100%;height:100%;object-fit:cover;display:block}
.leader-name{font-family:Georgia,"Times New Roman",serif;font-size:1.12rem;line-height:1.25;color:var(--text,#111)}
.leader-role{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;font-weight:700;color:#a8801f}
.leader-years{font-size:.85rem;color:var(--muted,#6b7280)}
.leader-desc{font-size:.92rem;line-height:1.45;margin:8px 0 6px;color:var(--text,#111)}
.leader-more{margin-top:auto;font-weight:600;color:var(--accent,#0f766e)}
.leaders-foot{margin-top:26px;text-align:center}
