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

:root {
    --bg-primary: #0f172a;
    --bg-surface: #1e293b;
    --bg-elevated: #334155;
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Navigation */
.nav {
    margin-bottom: 2rem;
}

.nav-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.nav-home svg {
    transition: transform 0.2s ease;
}

.nav-home:hover svg {
    transform: translateX(-3px);
}

/* Hero */
.hero {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--bg-elevated);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 540px;
}

/* Section Titles */
.section-title {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
}

/* Writing Sections */
.writing-section {
    margin-bottom: 3rem;
}

.section-placeholder {
    color: var(--text-dim);
    font-size: 0.9375rem;
    font-style: italic;
}

/* Book Card - Base */
.book-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    align-items: start;
    background: var(--bg-surface);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    margin-bottom: 1rem;
}

.book-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 25px var(--accent-glow);
    transform: translateY(-2px);
}

.book-card:last-child {
    margin-bottom: 0;
}

.book-cover {
    aspect-ratio: 2 / 3;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-content {
    display: flex;
    flex-direction: column;
}

.book-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.375rem;
    flex-wrap: wrap;
}

.book-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.book-badge {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.book-badge.on-hold {
    color: var(--text-dim);
    background: rgba(100, 116, 139, 0.2);
}

.book-series {
    font-size: 0.8125rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.book-tagline {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 0.75rem;
}

.book-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.book-link {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 500;
}

/* Featured Book Card */
.book-card.featured {
    grid-template-columns: 180px 1fr;
    padding: 1.75rem;
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.book-card.featured:hover {
    border-color: var(--accent);
    box-shadow: 0 0 35px var(--accent-glow);
}

.book-card.featured .book-header h3 {
    font-size: 1.5rem;
}

.book-card.featured .book-tagline {
    font-size: 1rem;
}

.book-card.featured .book-description {
    font-size: 0.9375rem;
}

.featured-cover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.15);
}

/* Compact Book Card (On Hold / Secondary) */
.book-card.compact {
    grid-template-columns: 80px 1fr;
    padding: 1rem 1.25rem;
    background: var(--bg-surface);
    opacity: 0.7;
    border: 1px solid var(--bg-elevated);
}

.book-card.compact:hover {
    opacity: 1;
    border-color: var(--text-dim);
    box-shadow: none;
    transform: translateY(-1px);
}

.book-card.compact .book-header h3 {
    font-size: 1rem;
}

.book-card.compact .book-series {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.book-card.compact .book-description {
    font-size: 0.8125rem;
    margin-bottom: 0;
    color: var(--text-dim);
}

.book-card.compact .book-tagline {
    display: none;
}

.book-card.compact .book-link {
    display: none;
}

.compact-cover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Non-fiction Callout */
.nonfiction-callout {
    margin-top: 3rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-surface);
    border-radius: 6px;
    border-left: 3px solid var(--bg-elevated);
}

.nonfiction-callout p {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin: 0;
}

.nonfiction-callout a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--bg-elevated);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nonfiction-callout a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--bg-elevated);
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-dim);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .hero {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .book-card {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
        padding: 1.25rem;
    }

    .book-card.featured {
        grid-template-columns: 120px 1fr;
        padding: 1.25rem;
    }

    .book-card.featured .book-header h3 {
        font-size: 1.25rem;
    }

    .book-card.compact {
        grid-template-columns: 60px 1fr;
        padding: 0.875rem 1rem;
    }

    .book-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .book-header h3 {
        font-size: 1.0625rem;
    }

    .book-tagline {
        font-size: 0.875rem;
    }

    .book-description {
        font-size: 0.8125rem;
    }

    .nonfiction-callout {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 400px) {
    .book-card.featured {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .book-card.featured .book-cover {
        max-width: 200px;
        margin: 0 auto 1rem;
    }

    .book-card.featured .book-header {
        align-items: center;
    }

    .book-card.compact {
        grid-template-columns: 50px 1fr;
    }
}
