/* 1. Global Page Setup */
html {
    scroll-behavior: smooth;
}

.library-container {
    max-width: 1000px;
    margin: 100px auto; /* Space for fixed navigation */
    padding: 20px;
    font-family: 'Spectral', serif;
}

.library-header {
    text-align: center;
    margin-bottom: 50px;
}

.library-subtitle {
    font-style: italic;
    color: #666;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* 2. Visual Archive (The Mini Grid) */
.mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.mini-card {
    text-decoration: none;
    text-align: center;
    transition: transform 0.3s ease;
}

.mini-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 12px;
    transition: box-shadow 0.3s ease;
}

.mini-title {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #888;
    font-weight: 600;
}

.mini-card:hover {
    transform: translateY(-10px);
}

.mini-card:hover img {
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* 3. Layout Dividers */
.divider {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 40px 0 80px 0;
}

/* 4. Detailed Book Summary Sections */
.book-summary-card {
    padding: 20px 0 60px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 60px;
    scroll-margin-top: 120px; /* Cushion so the nav doesn't cover the title on jump */
}

.book-summary-card:last-child {
    border-bottom: none;
}

.book-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.book-author {
    font-size: 1rem;
    font-style: italic;
    color: #555;
    margin-bottom: 30px;
}

/* 5. Summary Content & Typography */
.summary-content h3 {
    font-size: 1.3rem;
    margin-top: 35px;
    color: #222;
    border-left: 4px solid #333;
    padding-left: 15px;
    line-height: 1.2;
}

.summary-content p, 
.summary-content li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

.summary-content ul {
    padding-left: 20px;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .mini-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .book-title {
        font-size: 1.8rem;
    }
}


/* Minimalist Archive Section */
#finished-archive {
    padding: 60px 0;
    margin-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.archive-count {
    text-align: center;
    font-family: 'Spectral', serif;
    font-style: italic;
    color: #888;
    margin-bottom: 40px;
}

.archive-list-container {
    max-width: 700px;
    margin: 0 auto;
}

.simple-book-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Creates two columns to save space */
    gap: 20px 40px;
}

.simple-book-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f9f9f9;
    display: flex;
    flex-direction: column;
}

.book-title-simple {
    font-family: 'Spectral', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.book-author-simple {
    font-size: 0.9rem;
    color: #777;
    margin-top: 2px;
}

/* Mobile: Single column for the list */
@media (max-width: 600px) {
    .simple-book-list {
        grid-template-columns: 1fr;
    }
}

/* Styling for linked archive items */
.archive-link {
    text-decoration: none;
    display: block; /* Makes the entire block clickable */
    transition: transform 0.2s ease;
}

.archive-no-link {
    display: block;
}

/* Interactive hover effect */
.archive-link:hover {
    transform: translateX(5px); /* Subtle slide effect indicating it's clickable */
}

.archive-link:hover .book-title-simple {
    color: #555; /* Slightly changes text color on hover */
    text-decoration: underline; /* Clear visual cue that notes exist */
    text-decoration-color: #ccc;
}

/* Ensure typography remains consistent for both linked and unlinked items */
.book-title-simple {
    display: block;
    font-family: 'Spectral', serif;
    font-weight: 600;
    color: #333;
    transition: color 0.2s ease;
}

.book-author-simple {
    font-size: 0.85rem;
    color: #777;
}

/* =========================================
   6. Individual Annotation Page Styles 
   ========================================= */

.back-link {
    display: inline-block;
    margin-top: 15px;
    font-family: 'Spectral', serif;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #000;
    border-bottom: 1px solid #000;
}

.annotation-card {
    background: #fafafa;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    margin-bottom: 40px;
}

.annotation-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
}

.highlight-list {
    list-style: none;
    padding: 0;
}

.highlight-list li {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 4px solid #ffb400; /* Gold/yellow border to match your portfolio accent */
    position: relative;
}

/* Adds a subtle quotation mark aesthetic to the bullet points */
.highlight-list li::before {
    content: "“";
    font-size: 2.5rem;
    color: #e0e0e0;
    position: absolute;
    left: -18px;
    top: -12px;
    font-family: serif;
    line-height: 1;
}

/* Mobile Adjustments for Annotations */
@media (max-width: 600px) {
    .annotation-card {
        padding: 20px;
    }
    
    .highlight-list li {
        font-size: 1.05rem;
    }
}