/* Mohamed Morshed author-site refinements — derived from official Ghost Solo.
   This CSS is intentionally separate from Ghost's compiled Solo stylesheet.
   Edit this file to change the design; no npm build step is needed. */

:root {
  --mm-accent: #9b795c;
  --mm-border: rgba(45, 34, 26, 0.13);
  --mm-muted: #756f6a;
}

/* Homepage introduction: keep Solo's existing cover image and Ghost text fields. */
.home-template .gh-about { margin-bottom: 0; }
.home-template.has-side-about .gh-about { margin-top: clamp(28px, 4vw, 56px); }
.home-template.has-side-about .gh-about-inner { align-items: center; }
.home-template .gh-about-primary {
  max-width: 670px;
  font-size: clamp(3.2rem, 2.25rem + 1.9vw, 5.2rem) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.035em;
}
.home-template .gh-about-secondary,
.home-template .gh-about-primary + .gh-about-secondary {
  max-width: 540px;
  font-size: clamp(1.7rem, 1.35rem + 0.65vw, 2.1rem) !important;
  line-height: 1.6;
  font-weight: 450;
  letter-spacing: 0;
}
.home-template.has-side-about .gh-about-image {
  display: block;
  width: 100%;
  max-height: 570px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
}
.home-template .gh-subscribe-input { margin-top: 26px; }

/* Section headings */
.home-template .mm-home-main { padding-top: clamp(64px, 6vw, 100px) !important; }
.mm-home-main .gh-inner,
.mm-explore-section .gh-inner,
.mm-bottom-cta .gh-inner { max-width: 1100px; }
.mm-section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; }
.mm-eyebrow {
  margin: 0 0 10px;
  color: var(--mm-accent);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .16em;
}
.mm-section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.9rem, 2.2rem + 1.2vw, 4.1rem);
  line-height: 1.2;
  letter-spacing: -.035em;
  color: var(--color-primary-text);
}
.mm-section-intro {
  margin: 12px 0 0;
  color: var(--mm-muted);
  font-size: clamp(1.55rem, 1.35rem + .3vw, 1.8rem);
  line-height: 1.6;
}

/* Homepage essay archive. These selectors intentionally outrank previous
   Code Injection rules for the typographic feed's large margins/gaps. */
.home-template .mm-home-main .gh-feed,
.home-template.has-typographic-feed .mm-home-main .gh-feed {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  border-top: 1px solid var(--mm-border);
}
.home-template .mm-home-main .gh-feed > .gh-card,
.home-template.has-typographic-feed .mm-home-main .gh-feed > .gh-card,
.home-template.has-classic-feed .mm-home-main .gh-feed > .gh-card,
.home-template.has-parallax-feed .mm-home-main .gh-feed > .gh-card {
  display: block !important;
  position: static !important;
  min-height: 0 !important;
  height: auto !important;
  max-width: 100%;
  padding: clamp(21px, 2.3vw, 33px) 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--mm-border);
  background: transparent !important;
}
.home-template .mm-home-main .gh-card-link {
  display: block !important;
  position: static !important;
  min-height: 0 !important;
  padding: 0 !important;
  color: inherit;
}
.home-template .mm-home-main .gh-card-link::before,
.home-template .mm-home-main .gh-card-image { display: none !important; }
.home-template .mm-home-main .gh-card-wrapper {
  width: 100% !important;
  padding: 0 !important;
  min-height: 0 !important;
  justify-content: flex-start;
}
.home-template .mm-home-main .gh-card-title,
.home-template.has-typographic-feed .mm-home-main .gh-card-title {
  max-width: 860px;
  margin: 0 !important;
  color: var(--color-primary-text) !important;
  font-size: clamp(2.35rem, 1.75rem + 1.15vw, 3.35rem) !important;
  font-weight: 750;
  line-height: 1.3 !important;
  letter-spacing: -.03em;
}
.home-template .mm-home-main .gh-card-link:hover .gh-card-title {
  color: var(--mm-accent) !important;
  opacity: 1;
}
.home-template .mm-home-main .gh-card-excerpt {
  max-width: 780px;
  margin: 9px 0 0 !important;
  font-size: 1.65rem;
  line-height: 1.55;
  color: var(--mm-muted);
}
.home-template .mm-home-main .gh-card-meta {
  margin-top: 10px !important;
  font-size: 1.27rem;
  color: var(--mm-muted);
}
.home-template .mm-home-main .pagination {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  font-size: 1.5rem;
}
.home-template .mm-home-main .pagination a {
  color: var(--mm-accent);
  text-decoration: none;
  font-weight: 700;
}

/* Manual "Show 5 more" control; doesn't trigger on scroll. */
.mm-loadmore-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 0 0;
}
.mm-loadmore-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 160px;
  padding: 13px 24px;
  border: 1px solid var(--mm-border);
  border-radius: 5px;
  color: var(--color-primary-text);
  background: transparent;
  text-decoration: none;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 750;
  transition: background-color .15s ease, border-color .15s ease;
}
.mm-loadmore-button:hover,
.mm-loadmore-button:focus-visible {
  border-color: var(--mm-accent);
  background: rgba(153, 118, 85, .09);
}
.mm-loadmore-button[aria-disabled="true"] { opacity: .65; cursor: progress; }
.mm-loadmore-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--mm-muted);
  font-size: 1.2rem;
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  .mm-loadmore-button { transition: none; }
}

/* Beyond-the-newsletter navigation cards */
.mm-explore-section { padding-top: clamp(66px, 7vw, 108px); }
.mm-explore-head { margin-bottom: 25px; }
.mm-explore-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.mm-explore-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: clamp(24px, 2.7vw, 34px);
  border: 1px solid var(--mm-border);
  border-radius: 6px;
  background: rgba(153, 118, 85, .035);
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.mm-explore-card:hover {
  border-color: var(--mm-accent);
  background: rgba(153, 118, 85, .075);
  transform: translateY(-2px);
}
.mm-card-kind {
  font-size: 1.15rem;
  color: var(--mm-accent);
  letter-spacing: .12em;
  font-weight: 800;
}
.mm-explore-card h3 {
  margin: 27px 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 1.8rem + .6vw, 2.8rem);
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--color-primary-text);
}
.mm-explore-card p {
  margin: 0 0 24px;
  font-size: 1.55rem;
  line-height: 1.65;
  color: var(--mm-muted);
}
.mm-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  font-size: 1.48rem;
  font-weight: 750;
  color: var(--mm-accent);
}
.mm-card-action [aria-hidden] { font-size: 2.2rem; }

/* Final invitation — Ghost Portal remains the subscription mechanism. */
.mm-bottom-cta { padding-top: clamp(70px, 7vw, 100px); }
.mm-bottom-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-top: 35px;
  padding-bottom: 0;
  border-top: 1px solid var(--mm-border);
}
.mm-bottom-cta h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 2rem + 1.1vw, 3.7rem);
  line-height: 1.28;
  letter-spacing: -.03em;
}
.mm-bottom-cta p:not(.mm-eyebrow) { margin: 12px 0 0; color: var(--mm-muted); font-size: 1.6rem; }
.mm-subscribe-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 15px 23px;
  color: white !important;
  background: #9b795c;
  border-radius: 4px;
  white-space: nowrap;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
}
.mm-subscribe-button:hover { background: #7b5d45; }

/* Tablet and phone */
@media (max-width: 840px) {
  .home-template.has-side-about .gh-about-inner { gap: 26px; }
  .home-template.has-side-about .gh-about-image { max-height: 450px; }
  .mm-bottom-cta-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
  .home-template .mm-home-main { padding-top: 52px !important; }
  .home-template.has-side-about .gh-about-image { max-height: 380px; }
  .mm-section-head { margin-bottom: 20px; }
  .mm-explore-section { padding-top: 62px; }
  .mm-explore-grid { grid-template-columns: 1fr; }
  .mm-explore-card { min-height: 215px; }
  .mm-bottom-cta { padding-top: 70px; }
  .mm-bottom-cta-inner { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-explore-card { transition: none; transform: none !important; }
}
