/* =========================================================
   home.css — front-page-only styling for heather.cafe
   Loaded by index.qmd via include-in-header.
   All selectors are scoped with `.hc-` so nothing leaks.
   ========================================================= */

/* Hide the default title block; our hero replaces it */
main > header#title-block-header { display: none; }

/* Force our HTML blocks out of any inherited grid so flex/grid
   children can claim full width — but ONLY within the article
   body column, never the outer page grid (which would cover the
   sidebar). We do this by making each component display:block
   and giving it the full width of its own container. */
.hc-hero,
.hc-research-grid,
.hc-callout {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* The hero uses grid internally but must behave as block outside. */
.hc-hero { display: grid; }

/* Research cards likewise. */
.hc-research-grid { display: grid; }

/* Callout likewise. */
.hc-callout { display: grid; }

/* Soft heather-tinted page wash (home page only) */
body.quarto-body,
body {
  background:
    radial-gradient(ellipse 900px 500px at 85% -10%, rgba(201,180,230,0.35), transparent 60%),
    radial-gradient(ellipse 700px 400px at -5% 30%, rgba(245,233,215,0.55), transparent 55%),
    var(--bs-body-bg, #fbf7f3);
}

/* --- Hero ---------------------------------------------- */
.hc-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
  align-items: center;
  padding: 36px 40px 32px;
  margin: 8px 0 32px;
  background: linear-gradient(135deg, #efe4f7 0%, #f9eee0 55%, #f7e3dc 100%);
  border-radius: 20px;
  border: 1px solid rgba(122,76,191,0.14);
  box-shadow: 0 1px 2px rgba(74,38,128,0.06),
              0 20px 40px -28px rgba(74,38,128,0.25);
  overflow: hidden;
}
.hc-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 82%, rgba(122,76,191,0.12) 0, transparent 22%),
    radial-gradient(circle at 88% 18%, rgba(217,164,65,0.14) 0, transparent 25%);
  pointer-events: none;
}
.hc-hero-text { position: relative; z-index: 1; }

.hc-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: #4a2680;
  background: rgba(255,255,255,0.55);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(122,76,191,0.18);
  margin-bottom: 14px;
}
.hc-eyebrow .sprig { font-size: 14px; }

.hc-hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 44px;
  line-height: 1.08;
  margin: 0 0 12px;
  color: #4a2680;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 80, "SOFT" 50;
}
.hc-hero-title em {
  font-style: italic;
  font-weight: 400;
  color: #6a3fa8;
}

.hc-lede {
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 18px;
  max-width: 48ch;
  color: #3a2b52;
}

.hc-meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 14px; color: #5a4876;
}
.hc-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hc-meta svg { opacity: 0.75; }

.hc-hero-photo {
  position: relative;
  z-index: 1;
  width: 200px; height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 10px 30px -10px rgba(74,38,128,0.3);
  justify-self: end;
}
.hc-hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 45% 40%;
}
.hc-hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(122,76,191,0.2);
}

@media (max-width: 640px) {
  .hc-hero { grid-template-columns: 1fr; padding: 28px 22px; }
  .hc-hero-photo { justify-self: start; width: 140px; height: 140px; }
  .hc-hero-title { font-size: 34px; }
}

/* --- Section headers (home page only) ------------------ */
.hc-section {
  font-family: 'Fraunces', Georgia, serif !important;
  font-weight: 500;
  font-size: 18px;
  color: #4a2680;
  margin: 36px 0 14px !important;
  letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 10px;
  border: none;
}
.hc-section::after {
  content: ""; flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(122,76,191,0.3), transparent);
}

/* --- Research cards ------------------------------------ */
.hc-research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 40px;
}
@media (max-width: 820px) {
  .hc-research-grid { grid-template-columns: 1fr; }
}

.hc-rcard {
  position: relative;
  padding: 22px 20px 20px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #fff;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hc-rcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(74,38,128,0.25);
}
.hc-rcard::before {
  content: "";
  position: absolute; left: 0; top: 0; right: 0; height: 4px;
  background: var(--accent, #7b4cbf);
}
.hc-glyph {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg);
  color: var(--accent);
  margin-bottom: 12px;
}
.hc-rcard h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 19px;
  margin: 0 0 6px;
  color: #241838;
  letter-spacing: -0.01em;
}
.hc-rcard p {
  font-size: 14px; line-height: 1.5;
  color: #4a3e5e; margin: 0;
}

.hc-rcard.groups  { --accent: #7b4cbf; --accent-bg: #f1eaf9; }
.hc-rcard.cp      { --accent: #3f8a94; --accent-bg: #e6f1f2; }
.hc-rcard.puzzles { --accent: #c66b6b; --accent-bg: #fbe9e6; }

/* --- PhD callout --------------------------------------- */
.hc-callout {
  margin: 20px 0 36px;
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(217,164,65,0.12), rgba(232,164,164,0.14));
  border: 1px solid rgba(217,164,65,0.35);
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
}
.hc-cup {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(217,164,65,0.5);
}
.hc-callout h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500; font-size: 19px;
  margin: 0 0 6px; color: #5a3a10;
}
.hc-callout p { margin: 0; font-size: 15px; line-height: 1.55; color: #3a2b1a; }
.hc-callout code {
  font-size: 13px;
  background: rgba(255,255,255,0.6);
  padding: 1px 6px;
  border-radius: 4px;
}

/* --- Posts listing (table form) ------------------------ */
#recent-posts { margin-top: 8px; }
#recent-posts table.quarto-listing-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
#recent-posts table.quarto-listing-table thead { display: none; }
#recent-posts table.quarto-listing-table tr {
  border-bottom: 1px solid rgba(122,76,191,0.12);
  transition: background 0.15s;
}
#recent-posts table.quarto-listing-table tr:hover {
  background: rgba(122,76,191,0.04);
}
#recent-posts table.quarto-listing-table td {
  padding: 14px 8px;
  vertical-align: baseline;
  border: none;
}
#recent-posts td.listing-date {
  width: 120px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 13px;
  color: #8266a6;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
#recent-posts td.listing-title a {
  font-size: 17px;
  font-weight: 500;
  color: #241838;
  line-height: 1.3;
  text-decoration: none;
}
#recent-posts tr:hover td.listing-title a { color: #7b4cbf; }
#recent-posts td.listing-categories {
  text-align: right;
  font-size: 12px;
  color: #8266a6;
}
#recent-posts td.listing-categories .listing-category,
#recent-posts .listing-category {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(122,76,191,0.08);
  color: #5a2bb0;
  font-size: 12px;
}
@media (max-width: 640px) {
  #recent-posts td.listing-date { width: auto; display: block; padding-bottom: 2px; }
  #recent-posts td.listing-title, #recent-posts td.listing-categories { display: block; text-align: left; padding-top: 2px; }
}

/* --- Legacy class-based posts list (kept for fallback) - */
.hc-posts { display: grid; gap: 2px; margin-top: 8px; }
.hc-post {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(122,76,191,0.12);
  transition: background 0.15s;
  color: inherit;
  text-decoration: none;
}
.hc-post:hover { background: rgba(122,76,191,0.04); text-decoration: none; }
.hc-post-date {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 13px; color: #8266a6;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.hc-post-title { font-size: 17px; font-weight: 500; color: #241838; line-height: 1.3; }
.hc-post:hover .hc-post-title { color: #7b4cbf; }
.hc-post-cats { font-size: 12px; color: #8266a6; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hc-post-cats span { padding: 1px 8px; border-radius: 999px; background: rgba(122,76,191,0.08); }
