/* ============================================================
   home.css — page-specific styling for index.html
   Extends the shared ab-* library in assets/css/site.css.
   Everything here is scoped with .home-* so no other page moves.
   ============================================================ */

/* ---------- hero: text column + portrait ---------- */
.home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr);
  gap: clamp(28px, 5vw, 62px);
  align-items: center;
}

.home-hero__grid .ab-hero__title { max-width: 14ch; }
.home-hero__grid .ab-hero__lede { max-width: 58ch; }

/* the source's standing-capital line under the name */
.home-hero__badge {
  display: inline-block;
  margin: 0 0 22px;
  padding: 9px 18px;
  border: 1px solid rgba(232, 217, 174, .45);
  border-radius: 999px;
  background: rgba(201, 168, 76, .12);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .17em;
  line-height: 1.5;
  color: var(--gold-soft);
}

.home-portrait { margin: 0; }
.home-portrait img {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .35);
}
.home-portrait figcaption {
  margin: 20px auto 0;
  max-width: 340px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  line-height: 1.7;
  color: rgba(255, 255, 255, .62);
}

@media (max-width: 880px) {
  .home-hero__grid { grid-template-columns: 1fr; }
  .home-hero__grid .ab-hero__title { max-width: 18ch; }
  .home-portrait { order: -1; }
  .home-portrait img { max-width: 220px; }
  .home-portrait figcaption { max-width: 100%; }
}

/* gold accent inside a section heading */
.home-accent {
  font-style: italic;
  color: var(--gold);
}

/* ---------- button row on light sections ---------- */
.home-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}
.ab-btn--navy {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: #fff;
  box-shadow: 0 8px 22px rgba(27, 42, 94, .28);
}
.ab-btn--line {
  border: 1.5px solid var(--line);
  color: var(--navy);
  background: var(--card);
}
.ab-btn--line:hover { border-color: var(--gold); color: var(--navy); }

/* ---------- numbered card index ---------- */
.home-num {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--navy);
}

/* tag row inside a field card */
.home-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.home-tags li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-nav);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- timeline extras ---------- */
.home-t__year {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .13em;
  color: var(--gold);
}
.home-t__ctx {
  display: block;
  margin: -4px 0 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15.5px;
  color: var(--muted);
}

/* ---------- published work ---------- */
.home-books {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.home-books > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 34px;
  align-items: start;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
  transition: background .2s ease;
}
.home-books > li:hover { background: var(--paper); }
.home-books h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 1.9vw, 21px);
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 8px;
}
.home-books p { margin: 0; font-size: 15px; line-height: 1.7; }
.home-books .home-isbn {
  margin: 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.home-isbn { font-family: var(--font-mono); }
.home-isbn b {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--gold);
}
.home-isbn span { color: var(--ink); }

@media (max-width: 640px) {
  .home-books > li { grid-template-columns: 1fr; }
  .home-books .home-isbn { white-space: normal; }
}

/* the "full method at …" credit under the square-root explainer */
.home-feature__isbn {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.home-feature__isbn .home-nb { color: var(--ink); }

/* ---------- the square-root feature ---------- */
.home-feature {
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.home-feature__head {
  padding: 24px 30px 0;
}
.home-feature__head em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.home-feature__head h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(23px, 2.6vw, 30px);
  color: var(--ink);
  margin: 10px 0 0;
}
.home-feature__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 30px;
  padding: 22px 30px 30px;
  align-items: start;
}
.home-feature__grid p { margin: 0 0 1.1em; }
.home-feature__grid p:last-child { margin-bottom: 0; }

.home-formula {
  border-radius: 18px;
  padding: 24px 22px;
  color: #fff;
  background:
    radial-gradient(420px 200px at 90% -20%, rgba(201, 168, 76, .30), transparent 60%),
    linear-gradient(135deg, var(--navy), var(--navy-deep));
}
.home-formula__m {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.4;
  color: var(--gold-soft);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.home-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  font-size: .68em;
  line-height: 1.15;
}
.home-frac .n { border-bottom: 1.5px solid currentColor; padding: 0 6px 2px; }
.home-frac .d { padding: 2px 6px 0; }

.home-eg {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  color: rgba(255, 255, 255, .82);
}
.home-eg b { color: var(--gold-soft); }

.home-nb { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

@media (max-width: 820px) {
  .home-feature__grid { grid-template-columns: 1fr; }
}

/* ---------- explore-the-site cards ---------- */
.home-nav { margin-top: 34px; }
.home-navcard {
  display: block;
  text-decoration: none;
  color: inherit;
}
.home-navcard h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.home-navcard h3::after {
  content: "\2192";
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--gold);
  transition: transform .2s ease;
}
.home-navcard:hover h3::after { transform: translateX(4px); }
.home-navcard__label {
  display: block;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
