/* ------------------------------------------------------------------ *
 * Custom styles for "From Stability to Chaos".
 * ------------------------------------------------------------------ */

/* --- Landing-page hero ------------------------------------------------ */

/* Subtitle directly under the book title on the front page. */
p.sfc-subtitle {
    font-size: 1.35rem;
    font-weight: 400;
    font-style: italic;
    color: var(--pst-color-text-muted, #646464);
    margin: -0.4rem 0 0.6rem 0;
}

/* Author line. */
p.sfc-authors {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 1.4rem 0;
}

/* Give the front-page chapter/appendix card grid a little breathing room. */
.bd-article h2 {
    margin-top: 2rem;
}

/* Make the chapter cards feel clickable and consistent in height. */
.bd-article .sd-card {
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    height: 100%;
}
.bd-article .sd-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Hero row: vertically centre the text column against the cover figure. */
.sfc-hero {
    align-items: center;
    margin-top: 0.5rem;
}

/* Cover figure on the front page. */
img.sfc-cover {
    width: 100%;
    max-width: 420px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

/* "Start reading" call-to-action button. */
.sfc-cta {
    margin-top: 0.6rem;
    font-size: 1.05rem;
    padding: 0.5rem 1.4rem;
}

/* --- Top header menu -------------------------------------------------- */

/* Curated part menu in the header centre (Text / Exercises / ...). */
#sfc-topmenu {
    flex-direction: row;
    gap: 0.25rem;
    margin-bottom: 0;
}
#sfc-topmenu .nav-link {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
}

/* --- About page ------------------------------------------------------- */

/* Author portrait: a circular thumbnail floated beside the bio. */
/* Custom "Exercises" sidebar section: match native nav links (no underline). */
.sfc-exercises-nav a.reference {
    text-decoration: none;
}

/* Justified body text (e.g. the About intro). */
.sfc-justify {
    text-align: justify;
}

/* Small circular author thumbnail in the About table. */
img.sfc-portrait-sm {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 50%;
    background: #e9ebee;
}

/* Borderless author table: thumbnail beside the bio, vertically centred. */
table.sfc-authors-table,
.sfc-authors-table td,
.sfc-authors-table tr {
    border: none !important;
    background: none !important;
}
.sfc-authors-table td {
    vertical-align: middle;
    padding: 0.5rem 0.9rem;
}
.sfc-authors-table {
    margin-top: 1rem;
}
