:root {
    --rk-bg: #0f1720;
    --rk-surface: #ffffff;
    --rk-surface-soft: #f4f6f8;
    --rk-text: #1f2933;
    --rk-text-soft: #5b6773;
    --rk-border: #dde3ea;
    --rk-accent: #c48a2c;
    --rk-accent-dark: #a86f16;
    --rk-link: #1f4f7a;
    --rk-shadow: 0 0.5rem 1.25rem rgba(15, 23, 32, 0.08);
    --rk-shadow-lg: 0 0.85rem 2rem rgba(15, 23, 32, 0.14);
}

html {
    font-size: 14px;
    overflow-y: scroll;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(196, 138, 44, 0.08), transparent 24rem), linear-gradient(to bottom, #f8fafc, #f4f6f8 40%, #f8fafc);
    color: var(--rk-text);
    font-family: Georgia, "Times New Roman", serif;
}

h1, h2, h3, h4, h5, .navbar-brand, .btn {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
    color: var(--rk-link);
}

    a:hover {
        color: #163c5d;
    }

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.12rem white, 0 0 0 0.28rem rgba(196, 138, 44, 0.35);
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
}

/* Header / nav */

.site-header {
    background: linear-gradient(180deg, #121b25, #182330);
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.18);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff !important;
}

.site-header .nav-link {
    color: rgba(255, 255, 255, 0.84) !important;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

    .site-header .nav-link:hover,
    .site-header .nav-link:focus {
        color: #fff !important;
    }

.site-header .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.22);
}

.site-header .navbar-toggler-icon {
    filter: invert(1);
}

/* Hero */

.hero-section {
    padding: 0.35rem 0 1.5rem;
}

.hero-panel {
    background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(255,255,255,0.88));
    border: 1px solid rgba(196, 138, 44, 0.16);
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--rk-shadow);
}

.hero-title {
    font-size: clamp(2.3rem, 4vw, 4.25rem);
    line-height: 1.03;
    margin-bottom: 0.75rem;
}

.hero-subheadline {
    max-width: 46rem;
    font-size: 1.15rem;
    color: var(--rk-text-soft);
    margin-bottom: 1.25rem;
}

.hero-photo {
    border-radius: 0.5rem;
    box-shadow: var(--rk-shadow-lg);
    border: 4px solid rgba(255, 255, 255, 0.7);
}

/* Sections */

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

    .section-heading h2 {
        margin: 0;
        font-size: 1.6rem;
    }

/* Cards */

.card {
    border: 0;
    border-radius: 0.4rem;
    overflow: hidden;
    background: var(--rk-surface);
    box-shadow: var(--rk-shadow);
}

.book-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .book-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--rk-shadow-lg);
    }

.card-body {
    padding: 1.25rem;
}

.card-title-link {
    color: inherit;
    text-decoration: none;
}

    .card-title-link:hover {
        color: inherit;
        text-decoration: none;
    }

/* Covers */

.book-cover-link,
.home-book-cover-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f9fbfc, #eef2f5);
    padding: 0.75rem 1rem;
}

.book-cover {
    display: block;
    width: 100%;
    max-width: 240px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    background: transparent;
}

.home-book-cover {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    background: transparent;
}

/* Series stack */

.series-stack-link {
    display: inline-block;
    text-decoration: none;
}

.series-stack {
    position: relative;
    width: 190px;
    height: 245px;
    margin: 0 auto 1rem;
}

.series-stack-item {
    position: absolute;
    display: block;
    width: 150px;
    height: 220px;
    border-radius: 0.3rem;
    overflow: hidden;
    box-shadow: 0 0.7rem 1.25rem rgba(15, 23, 32, 0.2);
    background: #fff;
}

.series-stack-link:hover .series-stack-item:nth-child(1) {
    transform: rotate(-6deg) translateY(-2px);
}

.series-stack-link:hover .series-stack-item:nth-child(2) {
    transform: rotate(-2deg) translateY(-2px);
}

.series-stack-link:hover .series-stack-item:nth-child(3) {
    transform: rotate(3deg) translateY(-2px);
}

.series-stack-item:nth-child(1) {
    left: 0;
    top: 14px;
    z-index: 1;
    transform: rotate(-6deg);
    opacity: 0.92;
}

.series-stack-item:nth-child(2) {
    left: 18px;
    top: 7px;
    z-index: 2;
    transform: rotate(-2deg);
    opacity: 0.96;
}

.series-stack-item:nth-child(3) {
    left: 36px;
    top: 0;
    z-index: 3;
    transform: rotate(3deg);
}

.series-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Utility text */

.meta-line {
    color: var(--rk-text-soft);
    font-size: 0.96rem;
}

.lead-soft {
    color: var(--rk-text-soft);
}

/* Buttons */

.btn-primary {
    background-color: var(--rk-accent);
    border-color: var(--rk-accent);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--rk-accent-dark);
        border-color: var(--rk-accent-dark);
    }

.btn-outline-dark:hover {
    background-color: #1d2833;
}

/* Promo / panels */

.soft-panel {
    background: linear-gradient(180deg, #ffffff, #f7f9fb);
    border: 1px solid var(--rk-border);
    border-radius: 0.5rem;
    box-shadow: var(--rk-shadow);
}

/* Bio */

.bio-wrap {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.bio-content {
    max-width: 820px;
}

@media (max-width: 991.98px) {
    .bio-wrap {
        grid-template-columns: 1fr;
    }

    .bio-photo {
        max-width: 260px;
    }
}

/* Contact form */

.contact-form {
    max-width: 680px;
}

.contact-field-sm {
    max-width: 360px;
}

.contact-field-md {
    max-width: 520px;
}

.contact-field-lg {
    max-width: 680px;
}

.contact-form .form-control {
    max-width: 100%;
}

/* Footer */

.site-footer {
    margin-top: 3rem;
    background: #121b25;
    color: rgba(255, 255, 255, 0.76);
}

    .site-footer a {
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
    }

        .site-footer a:hover {
            color: #fff;
            text-decoration: underline;
        }
