/*
Theme Name: Murmann
Theme URI: https://professor-murmann.net
Author: Johann Peter Murmann
Author URI: https://professor-murmann.net
Description: A lightweight, secure, dependency-free shared theme for the Murmann family of sites (books, publications, and the main site). Clean, warm, responsive design. Includes styling for the teachPress publications plugin, a "Book" content type, and home/listing/single/about/contact templates with built-in server-side form handling. Works alongside teachPress without affecting publication imports.
Version: 1.5.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jpm-books
*/

/* ===========================================================
   Design tokens
   =========================================================== */
:root {
  --color-bg: #ffffff;
  --color-surface: #f7f6f3;
  --color-text: #1d1d1f;
  --color-muted: #6b6b70;
  --color-accent: #6b4226;        /* warm brown nod to the original */
  --color-accent-dark: #4f2f1a;
  --color-border: #e6e3dd;
  --max-width: 1140px;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0,0,0,0.08);
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ===========================================================
   Reset / base
   =========================================================== */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; color: var(--color-text); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--surface { background: var(--color-surface); }
.text-center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; color: var(--color-accent); font-weight: 600; }

/* ===========================================================
   Buttons
   =========================================================== */
.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.18s ease;
}
.btn:hover { background: var(--color-accent-dark); text-decoration: none; color: #fff; }
.btn--ghost { background: transparent; color: var(--color-accent); border: 1px solid var(--color-accent); }
.btn--ghost:hover { background: var(--color-accent); color: #fff; }

/* ===========================================================
   Header / nav
   =========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: var(--max-width); margin: 0 auto; }
.site-logo img { max-height: 52px; width: auto; }
.site-logo .site-title-text { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: var(--color-text); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-text); margin: 5px 0; transition: 0.2s; }
.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; align-items: center; }
.main-nav a { color: var(--color-text); font-weight: 500; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; }
.main-nav a:hover { color: var(--color-accent); text-decoration: none; }
.main-nav .menu-item-cta a { background: var(--color-accent); color: #fff; padding: 9px 16px; border-radius: var(--radius); }
.main-nav .menu-item-cta a:hover { background: var(--color-accent-dark); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--color-border); max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
  .main-nav.open { max-height: 520px; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; }
  .main-nav li { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
  .main-nav .menu-item-cta a { display: inline-block; }
}

/* ===========================================================
   Hero
   =========================================================== */
.hero { background: var(--color-surface); padding: 72px 0; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 14px; }
.hero p { font-size: 1.2rem; color: var(--color-muted); max-width: 640px; margin: 0 auto 28px; }

/* ===========================================================
   Book grid
   =========================================================== */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 36px; }
.book-card { text-align: center; }
.book-card__cover { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); transition: transform 0.18s ease; }
.book-card a:hover .book-card__cover { transform: translateY(-4px); }
.book-card__cover img { margin: 0 auto; border-radius: 4px; }
.book-card__title { font-family: var(--font-serif); font-size: 1.05rem; margin: 16px 0 6px; color: var(--color-text); }
.book-card__meta { color: var(--color-accent); font-weight: 600; font-size: 0.92rem; }
.book-card a { text-decoration: none; }
.book-card a:hover .book-card__title { color: var(--color-accent); }

/* ===========================================================
   Stats counter
   =========================================================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats__num { font-family: var(--font-serif); font-size: 2.6rem; font-weight: 700; color: var(--color-accent); }
.stats__label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; color: var(--color-muted); }
@media (max-width: 680px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 32px; } }

/* ===========================================================
   Single book
   =========================================================== */
.book-single { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.book-single__cover { position: sticky; top: 100px; }
.book-single__cover img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 auto; }
.book-single__purchase { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.book-single h1 { font-size: 2.2rem; margin: 0 0 6px; }
.book-single .subtitle { font-size: 1.25rem; color: var(--color-muted); margin: 0 0 14px; font-family: var(--font-serif); font-style: italic; }
.book-single .authors { font-weight: 600; margin: 0 0 10px; }
.book-single .availability { display: inline-block; background: var(--color-surface); color: var(--color-accent); font-weight: 600; padding: 6px 14px; border-radius: var(--radius); margin-bottom: 20px; }
.book-content { font-size: 1.04rem; }
.book-content h2, .book-content h3 { margin-top: 1.6em; }
@media (max-width: 760px) {
  .book-single { grid-template-columns: 1fr; gap: 28px; }
  .book-single__cover { position: static; max-width: 260px; margin: 0 auto; }
}

/* ===========================================================
   About page
   =========================================================== */
.about-hero { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: center; }
.about-hero img { border-radius: var(--radius); box-shadow: var(--shadow); }
.logos { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; margin-top: 24px; }
.logos img { max-height: 56px; width: auto; filter: grayscale(100%); opacity: 0.8; }
blockquote.review { border-left: 4px solid var(--color-accent); margin: 0 0 28px; padding: 6px 0 6px 22px; font-style: italic; color: #333; }
blockquote.review cite { display: block; margin-top: 10px; font-style: normal; font-weight: 600; color: var(--color-muted); font-size: 0.92rem; }
@media (max-width: 680px) { .about-hero { grid-template-columns: 1fr; text-align: center; } .about-hero img { max-width: 240px; margin: 0 auto; } }

/* ===========================================================
   Forms
   =========================================================== */
.form-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 32px; max-width: 620px; margin: 0 auto; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.form-row input, .form-row textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--color-border);
  border-radius: 8px; font-size: 1rem; font-family: inherit; background: #fff;
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--color-accent); border-color: var(--color-accent); }
.form-notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 22px; font-weight: 500; }
.form-notice--success { background: #e7f4e8; color: #1e5128; border: 1px solid #bcdfc0; }
.form-notice--error { background: #fbeaea; color: #842029; border: 1px solid #f1c2c2; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* Mailing list inline form */
.subscribe-form { display: flex; gap: 12px; max-width: 520px; margin: 22px auto 0; }
.subscribe-form input { flex: 1; padding: 13px 16px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 1rem; }
@media (max-width: 520px) { .subscribe-form { flex-direction: column; } }

/* ===========================================================
   Footer
   =========================================================== */
.site-footer { background: #2a2320; color: #d8d2cc; padding: 48px 0 28px; margin-top: 0; }
.site-footer a { color: #e8c9a8; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.social-links { display: flex; gap: 16px; list-style: none; padding: 0; margin: 0; }
.social-links a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid #4a3f39; border-radius: 50%; }
.social-links a:hover { background: var(--color-accent); border-color: var(--color-accent); text-decoration: none; }
.social-links svg { width: 18px; height: 18px; fill: currentColor; }
.copyright { font-size: 0.88rem; color: #b3aaa3; }

/* ===========================================================
   Misc / WP core
   =========================================================== */
.page-content { font-size: 1.05rem; }
.aligncenter { margin: 0 auto; }
.screen-reader-text { position: absolute; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.entry-title { margin-bottom: 24px; }

/* ===========================================================
   teachPress (publications plugin) — matched to the books look
   Styles the plugin's output; does NOT affect imports or data.
   =========================================================== */
.tp_publication_list, #tp_publications, .teachpress_pub_list { max-width: var(--max-width); margin: 0 auto; }

/* Year section headings produced by teachPress */
h2.tp_h2, h3.tp_h3, .tp_year, .tp_year, .tp_pub_year_heading {
  font-family: var(--font-serif); color: var(--color-accent);
  font-size: 1.6rem; margin: 1.8em 0 0.6em; padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}

/* Each publication row as a clean card */
.tp_publication {
  display: flex; gap: 20px; align-items: flex-start; list-style: none;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 18px 20px; margin: 0 0 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.tp_publication:hover { box-shadow: var(--shadow); }

/* Thumbnail */
.tp_pub_image_left, .tp_pub_image_right { flex: 0 0 auto; }
.tp_pub_image_left img, .tp_pub_image_right img {
  border-radius: 6px; border: 1px solid var(--color-border); width: 80px; height: auto; display: block;
}

/* Text block */
.tp_pub_info { flex: 1 1 auto; min-width: 0; }
.tp_pub_author { color: var(--color-muted); font-size: 0.95rem; margin: 0 0 4px; }
.tp_pub_title { margin: 0 0 4px; }
.tp_pub_title a, a.tp_title_link {
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600;
  color: var(--color-text); cursor: pointer; text-decoration: none;
}
.tp_pub_title a:hover, a.tp_title_link:hover { color: var(--color-accent); }
.tp_pub_additional, .tp_pub_journal { color: var(--color-muted); font-size: 0.92rem; font-style: italic; }

/* Expandable panels (Abstract / BibTeX) and action links */
.tp_links, .tp_bibtex, .tp_abstract {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 8px; padding: 12px 14px; margin-top: 10px; font-size: 0.9rem; overflow: auto;
}
.tp_pub_info a { color: var(--color-accent); }

/* Tags / keywords */
.tp_pub_tags { margin-top: 8px; font-size: 0.85rem; color: var(--color-muted); }
.tp_pub_tags a {
  display: inline-block; background: var(--color-surface); color: var(--color-accent);
  border: 1px solid var(--color-border); border-radius: 999px;
  padding: 2px 10px; margin: 2px 4px 2px 0; text-decoration: none; font-size: 0.82rem;
}
.tp_pub_tags a:hover { background: var(--color-accent); color: #fff; text-decoration: none; }

/* teachPress search / filter controls */
.tp_search, .tp_pub_filter, .teachpress_filter, #tp_search {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 0 0 24px; padding: 14px 16px;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
}
.tp_search input[type="text"], .teachpress_filter select, .tp_pub_filter select {
  padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 0.95rem; background: #fff;
}

@media (max-width: 560px) {
  .tp_publication { flex-direction: column; }
}

/* ===========================================================
   CV page
   =========================================================== */
.cv-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.cv-intro { margin-bottom: 20px; color: var(--color-muted); }
.cv-section { display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding: 22px 0; border-top: 1px solid var(--color-border); }
.cv-section:first-of-type { border-top: none; }
.cv-section__label { font-family: var(--font-serif); font-weight: 700; color: var(--color-accent); font-size: 1.15rem; }
.cv-org { margin: 0 0 4px; }
.cv-org__name { font-weight: 600; }
.cv-org__loc { color: var(--color-muted); font-size: 0.9rem; }
.cv-item { margin: 0 0 10px; }
.cv-item__dates { color: var(--color-muted); font-size: 0.9rem; }
.cv-item__detail { font-size: 0.95rem; color: #444; margin-top: 3px; }
@media (max-width: 640px) { .cv-section { grid-template-columns: 1fr; gap: 6px; } }

/* ===========================================================
   Blog / archive / collection post lists
   =========================================================== */
.post-list__item { padding: 20px 0; border-bottom: 1px solid var(--color-border); }
.post-list__date { color: var(--color-muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.post-list__date a { color: var(--color-accent); }
.post-list__title { font-family: var(--font-serif); font-size: 1.3rem; margin: 4px 0 8px; }
.post-list__title a { color: var(--color-text); }
.post-list__title a:hover { color: var(--color-accent); }
.post-meta { color: var(--color-muted); font-size: 0.9rem; margin-bottom: 18px; }
.post-meta a { color: var(--color-accent); }
.post-thumb { margin: 0 0 20px; }
.post-thumb img { border-radius: var(--radius); }
.post-content { font-size: 1.05rem; }
.post-tags { margin-top: 24px; font-size: 0.88rem; color: var(--color-muted); }
.post-tags a { color: var(--color-accent); }

/* ===========================================================
   Print / PDF — clean CV (and any page)
   =========================================================== */
@media print {
  .site-header, .site-footer, .nav-toggle, .cv-print, .subscribe-form, .post-tags { display: none !important; }
  .site-content { margin: 0; }
  .section { padding: 0; }
  body { color: #000; background: #fff; font-size: 11pt; }
  .container { max-width: none !important; width: 100%; }
  .cv-section { break-inside: avoid; border-top: 1px solid #ccc; }
  a { color: #000; text-decoration: none; }
}

/* ===========================================================
   Tilly methodology collection
   =========================================================== */
.tilly-filter { font-size: 0.92rem; color: var(--color-muted); margin: 0 0 20px; padding-bottom: 12px; border-bottom: 2px solid var(--color-border); }
.tilly-filter a { color: var(--color-accent); }
.tilly-item { display: flex; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--color-border); }
.tilly-pdf { flex: 0 0 auto; display: inline-block; background: var(--color-accent); color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; padding: 16px 9px; border-radius: 6px; text-decoration: none; height: fit-content; }
.tilly-pdf:hover { background: var(--color-accent-dark); color: #fff; text-decoration: none; }
.tilly-body { flex: 1 1 auto; min-width: 0; }
.tilly-title { font-family: var(--font-serif); font-size: 1.2rem; margin: 0 0 4px; }
.tilly-title a { color: var(--color-accent); }
.tilly-byline { font-weight: 600; margin: 0 0 10px; }
.tilly-keyword { color: var(--color-muted); font-size: 0.92rem; margin: 0 0 10px; }
.tilly-desc { font-size: 1rem; }
.tilly-desc p:first-child { margin-top: 0; }

/* ===========================================================
   Tilly collection — refined (bold title/byline, 2-col, truncated)
   =========================================================== */
.tilly-intro { color: var(--color-muted); border-bottom: 2px solid var(--color-border); padding-bottom: 16px; margin-bottom: 8px; }
.tilly-layout { display: grid; grid-template-columns: 1fr 240px; gap: 44px; }
.tilly-main { min-width: 0; }
.tilly-item { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--color-border); }
.tilly-pdf { flex: 0 0 46px; }
.tilly-pdf a { display: flex; align-items: center; justify-content: center; width: 46px; height: 56px; background: #fff; border: 1px solid var(--color-border); border-radius: 6px; color: var(--color-accent); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-decoration: none; }
.tilly-pdf a:hover { background: var(--color-surface); }
.tilly-title { font-family: var(--font-serif); font-size: 1.18rem; font-weight: 700; margin: 0 0 3px; }
.tilly-title a { color: var(--color-accent); }
.tilly-byline { font-weight: 700; margin: 0 0 8px; font-size: 0.97rem; }
.tilly-keyword { color: var(--color-muted); font-size: 0.9rem; margin: 0 0 8px; }
.tilly-desc { margin: 0; }
.tilly-more { color: var(--color-accent); font-weight: 600; white-space: nowrap; }
.tilly-side h3 { font-family: var(--font-serif); color: var(--color-accent); font-size: 1rem; border-bottom: 1px solid var(--color-border); padding-bottom: 6px; margin: 0 0 10px; }
.tilly-side ul { list-style: none; padding: 0; margin: 0 0 24px; }
.tilly-side li { padding: 4px 0; }
.tilly-side a { color: var(--color-text); text-decoration: none; font-size: 0.95rem; }
.tilly-side a:hover { color: var(--color-accent); }
@media (max-width: 820px) { .tilly-layout { grid-template-columns: 1fr; } }

/* Tilly pinned entries (Introductory Essay / User Guide) */
.tilly-pinned { margin: 0 0 8px; }
.tilly-pin-item { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 2px solid var(--color-border); }
.tilly-pin-item .tilly-title { font-size: 1.3rem; }

/* Tilly icon slot: PDF badge vs. featured-image (e.g. author photo) */
.tilly-pdf { flex: 0 0 60px; }
.tilly-pdf a.tilly-pdficon { display: flex; align-items: center; justify-content: center; width: 46px; height: 56px; background: #fff; border: 1px solid var(--color-border); border-radius: 6px; color: var(--color-accent); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-decoration: none; }
.tilly-pdf a.tilly-pdficon:hover { background: var(--color-surface); }
.tilly-pdf a:not(.tilly-pdficon) { display: block; width: auto; height: auto; background: none; border: 0; padding: 0; border-radius: 0; }
.tilly-thumb { width: 56px; height: auto; border-radius: 6px; border: 1px solid var(--color-border); display: block; }

/* Tilly sidebar search box */
.tilly-search { display: flex; flex-direction: column; gap: 8px; }
.tilly-search input[type="search"] { width: 100%; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 0.95rem; }
.tilly-search button { align-self: flex-start; background: var(--color-accent); color: #fff; border: 0; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.tilly-search button:hover { background: var(--color-accent-dark); }

/* Single collection post: icon/photo in a left column */
.tilly-single { display: flex; gap: 28px; align-items: flex-start; }
.tilly-single-icon { flex: 0 0 auto; }
.tilly-single-icon .tilly-pdficon { display: flex; align-items: center; justify-content: center; width: 72px; height: 90px; background: #fff; border: 1px solid var(--color-border); border-radius: 8px; color: var(--color-accent); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-decoration: none; }
.tilly-single-icon .tilly-pdficon:hover { background: var(--color-surface); }
.tilly-thumb-single { width: 150px; height: auto; border-radius: 8px; border: 1px solid var(--color-border); display: block; }
.tilly-single-body { min-width: 0; }
.tilly-single-body .entry-title { margin-top: 0; }
@media (max-width: 640px) { .tilly-single { flex-direction: column; } }

/* ===========================================================
   Header brand lockup (round photo + name) — main site
   =========================================================== */
.brand-lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-lockup .brand-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block; }
.brand-lockup .brand-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--color-text); }
.brand-lockup:hover { text-decoration: none; }

/* ===========================================================
   Home hub
   =========================================================== */
.hero--home { padding: 52px 0; text-align: left; }
.hero-inner { display: grid; grid-template-columns: 160px 1fr; gap: 36px; align-items: center; }
.hero-inner--nophoto { grid-template-columns: 1fr; }
.hero-portrait { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; display: block; }
.hero--home h1 { font-size: clamp(1.9rem, 4vw, 2.4rem); margin: 0 0 6px; }
.hero-role { font-size: 1.1rem; color: var(--color-muted); margin: 0 0 12px; }
.hero-intro { max-width: 680px; }
.hero-intro p { margin: 0 0 10px; }

.home-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.home-card { display: block; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--color-text); box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.home-card:hover { box-shadow: var(--shadow); text-decoration: none; }
.home-card h3 { font-family: var(--font-serif); margin: 0 0 6px; color: var(--color-accent); font-size: 1.1rem; }
.home-card p { margin: 0; font-size: 0.9rem; color: var(--color-muted); }

.home-h2 { font-family: var(--font-serif); color: var(--color-accent); font-size: 1.5rem; margin: 0 0 20px; }
.home-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 40px; }
.home-theme h3 { font-family: var(--font-serif); font-size: 1.12rem; margin: 0 0 4px; }
.home-theme p { margin: 0; color: #333; }
.home-theme a { color: var(--color-accent); }

.home-latest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.home-post { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px; }
.home-post h3 { font-family: var(--font-serif); font-size: 1.03rem; margin: 5px 0 6px; }
.home-post h3 a { color: var(--color-text); }
.home-post h3 a:hover { color: var(--color-accent); }
.home-post p { margin: 0; font-size: 0.9rem; color: #444; }
.home-affil { text-align: center; color: var(--color-muted); font-size: 0.95rem; padding: 26px 24px; }

@media (max-width: 860px) {
  .home-cards, .home-latest { grid-template-columns: 1fr 1fr; }
  .home-themes { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-portrait { margin: 0 auto; }
}
@media (max-width: 520px) { .home-cards, .home-latest { grid-template-columns: 1fr; } }

/* Fix: keep the home hero role + intro left-aligned (override base .hero p auto-centering) */
.hero--home .hero-role { margin: 0 0 12px; max-width: 680px; }
.hero--home .hero-intro p { margin: 0 0 10px; max-width: 680px; }
