/*
 * M. De La Croix — Author Page (Variant D)
 * Light + Dark theme via CSS variables
 */

/* ── Theme Variables ── */
:root {
    --bg-primary: #faf9f6;
    --bg-alt: #f4f2ed;
    --bg-nav: #fff;
    --bg-input: #fff;
    --text-body: #3d3d3d;
    --text-heading: #1a1a1a;
    --text-muted: #666;
    --text-subtle: #888;
    --text-faint: #999;
    --text-ghost: #aaa;
    --text-excerpt: #444;
    --border: #e0ddd8;
    --border-excerpt: #ccc;
    --divider: #ccc;
    --shadow-book: rgba(0, 0, 0, 0.15);
    --shadow-photo: rgba(0, 0, 0, 0.1);
    --accent: #8b0000;
    --accent-hover: #a50000;
    --link-hover: #b30000;
    --success-bg: #e8f5e9;
    --success-text: #2e7d32;
    --error-bg: #fce4ec;
    --error-text: #c62828;
    --toggle-icon: "◑";
    --nav-toggle-bar: #1a1a1a;
}

body.dark-mode {
    --bg-primary: #1c1a17;
    --bg-alt: #232019;
    --bg-nav: #242120;
    --bg-input: #2a2723;
    --text-body: #b8b0a4;
    --text-heading: #e8e4dc;
    --text-muted: #9a9488;
    --text-subtle: #8a8278;
    --text-faint: #7a7268;
    --text-ghost: #6a6258;
    --text-excerpt: #a89e92;
    --border: #3a3530;
    --border-excerpt: #4a4540;
    --divider: #4a4540;
    --shadow-book: rgba(0, 0, 0, 0.4);
    --shadow-photo: rgba(0, 0, 0, 0.3);
    --success-bg: rgba(46, 125, 50, 0.15);
    --success-text: #6abf6e;
    --error-bg: rgba(198, 40, 40, 0.15);
    --error-text: #e57373;
    --toggle-icon: "◐";
    --nav-toggle-bar: #e8e4dc;
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    background-color: var(--bg-primary);
    color: var(--text-body);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

/* ── Typography ── */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.3;
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-body);
    font-size: 1.05rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--link-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Layout ── */
.author-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.author-container-wide {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Navigation ── */
.author-nav {
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s, border-color 0.3s;
}

.author-nav .author-container-wide {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author-nav-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-heading);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.author-nav-logo:hover {
    color: var(--accent);
}

.author-nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.author-nav-links a {
    color: var(--text-muted);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: color 0.2s;
}

.author-nav-links a:hover {
    color: var(--text-heading);
}

.author-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.author-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--nav-toggle-bar);
    margin: 5px 0;
    transition: 0.3s;
}

/* Theme Toggle */
.author-theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
    padding: 0;
}

.author-theme-toggle:hover {
    border-color: var(--accent);
    color: var(--text-heading);
}

.author-theme-toggle::after {
    content: var(--toggle-icon);
}

/* ── Hero ── */
.author-hero {
    padding: 5rem 0 3rem;
    text-align: center;
    background: var(--bg-primary);
    transition: background 0.3s;
}

.author-hero-name {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}

.author-hero-tagline {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: var(--text-subtle);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 3rem;
}

.author-hero-book {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    text-align: left;
}

.author-hero-cover {
    flex-shrink: 0;
}

.author-hero-cover img {
    width: 220px;
    border-radius: 4px;
    box-shadow: 0 8px 30px var(--shadow-book);
}

.author-hero-info {
    max-width: 380px;
}

.author-hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.author-hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.author-hero-byline {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.author-hero-cta {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--accent);
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.2s;
}

.author-hero-cta:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* ── Section Divider ── */
.author-divider {
    width: 60px;
    height: 1px;
    background: var(--divider);
    margin: 0 auto;
}

/* ── Praise / Pull Quotes ── */
.author-praise {
    padding: 3.5rem 0;
    background: var(--bg-alt);
    transition: background 0.3s;
}

.author-praise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.author-praise-quote {
    text-align: center;
    padding: 1.5rem;
}

.author-praise-quote p {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.author-praise-quote cite {
    font-style: normal;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--text-faint);
    letter-spacing: 0.05em;
}

/* ── About the Book ── */
.author-book-section {
    padding: 4rem 0;
    background: var(--bg-primary);
    transition: background 0.3s;
}

.author-book-section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.author-book-section p {
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--text-body);
}

/* ── Excerpt ── */
.author-excerpt {
    padding: 3.5rem 0;
    background: var(--bg-alt);
    transition: background 0.3s;
}

.author-excerpt h2 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.author-excerpt-label {
    text-align: center;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.author-excerpt-text {
    border-left: 3px solid var(--border-excerpt);
    padding-left: 2rem;
    margin: 0 auto;
    max-width: 640px;
}

.author-excerpt-text p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-excerpt);
}

/* ── Buy Section ── */
.author-buy {
    padding: 3.5rem 0;
    background: var(--bg-primary);
    text-align: center;
    transition: background 0.3s;
}

.author-buy h2 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.author-buy-subtitle {
    color: var(--text-subtle);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.author-buy-options {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.author-buy-btn {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s;
    letter-spacing: 0.03em;
}

.author-buy-btn-primary {
    background: var(--accent);
    color: #fff;
    border: 2px solid var(--accent);
}

.author-buy-btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.author-buy-btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.author-buy-btn-secondary:hover {
    background: var(--accent);
    color: #fff;
}

.author-buy-gift {
    font-size: 0.9rem;
    color: var(--text-subtle);
}

.author-buy-gift a {
    color: var(--accent);
}

/* ── About the Author ── */
.author-about {
    padding: 4rem 0;
    background: var(--bg-alt);
    transition: background 0.3s;
}

.author-about-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
}

.author-about-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    box-shadow: 0 4px 15px var(--shadow-photo);
}

.author-about-text h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.author-about-text p {
    font-size: 1.02rem;
    line-height: 1.85;
}

/* ── Press ── */
.author-press {
    padding: 3.5rem 0;
    background: var(--bg-primary);
    text-align: center;
    transition: background 0.3s;
}

.author-press h2 {
    font-size: 1.6rem;
    margin-bottom: 2rem;
}

.author-press-list {
    list-style: none;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.author-press-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
}

.author-press-list li:last-child {
    border-bottom: none;
}

.author-press-contact {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--text-subtle);
}

/* ── Newsletter ── */
.author-newsletter {
    padding: 3.5rem 0;
    background: var(--bg-alt);
    text-align: center;
    transition: background 0.3s;
}

.author-newsletter h2 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.author-newsletter-sub {
    color: var(--text-subtle);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.author-newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 440px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.author-newsletter-input {
    flex: 1;
    min-width: 240px;
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    font-family: Georgia, serif;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--bg-input);
    color: var(--text-body);
    transition: border-color 0.2s;
}

.author-newsletter-input:focus {
    outline: none;
    border-color: var(--accent);
}

.author-newsletter-input::placeholder {
    color: var(--text-faint);
}

.author-newsletter-submit {
    padding: 0.75rem 1.8rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

.author-newsletter-submit:hover {
    background: var(--accent-hover);
}

.author-newsletter-submit:disabled {
    background: #999;
    cursor: not-allowed;
}

.author-newsletter-privacy {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.78rem;
    color: var(--text-ghost);
    margin-top: 1rem;
}

.author-newsletter-message {
    max-width: 440px;
    margin: 1rem auto;
    padding: 0.75rem 1.2rem;
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: 600;
}

.author-newsletter-message.success {
    background: var(--success-bg);
    border: 1px solid #4caf50;
    color: var(--success-text);
}

.author-newsletter-message.error {
    background: var(--error-bg);
    border: 1px solid #e57373;
    color: var(--error-text);
}

/* ── Footer ── */
.author-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
    transition: background 0.3s, border-color 0.3s;
}

.author-footer p {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--text-ghost);
    margin-bottom: 0.3rem;
}

.author-footer a {
    color: var(--text-faint);
}

.author-footer a:hover {
    color: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .author-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-nav);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 1rem;
    }

    .author-nav-links.active {
        display: flex;
    }

    .author-nav-toggle {
        display: block;
    }

    .author-hero {
        padding: 3rem 0 2rem;
    }

    .author-hero-name {
        font-size: 2.2rem;
    }

    .author-hero-book {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .author-hero-info {
        max-width: 100%;
        text-align: center;
    }

    .author-hero-cover img {
        width: 180px;
    }

    .author-praise-grid {
        grid-template-columns: 1fr;
    }

    .author-about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .author-about-photo {
        margin: 0 auto;
    }

    .author-excerpt-text {
        padding-left: 1.2rem;
    }
}

@media (max-width: 480px) {
    .author-hero-name {
        font-size: 1.8rem;
    }

    .author-hero-title {
        font-size: 1.4rem;
    }

    .author-hero-cover img {
        width: 150px;
    }

    .author-buy-options {
        flex-direction: column;
        align-items: center;
    }

    .author-buy-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
    }
}

a:focus, button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
