/* ===========================================================================
   REDESIGN 2 STYLESHEET
   Teal/Gold/Sand Premium Aesthetic for Inner Pages
   =========================================================================== */

/* CUSTOM PROPERTIES / CSS VARIABLES */
:root {
    --teal: #2a5f5e;
    --teal-dark: #1a3d3c;
    --teal-deeper: #0f2424;
    --teal-light: #7fb5b0;
    --teal-pale: #e0f0ee;
    --sand: #f5f0e8;
    --sand-dark: #d4c9b8;
    --gold: #c9a96e;
    --gold-light: #e8d5a8;
    --white: #ffffff;
    --text: #1a1a1a;
    --text-light: #6b7280;
    --card-shadow: 0 20px 60px rgba(0,0,0,0.08);
    --border: #dddcd4;

    /* Transitions for smooth interactions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-out;
}

/* ===========================================================================
   1. RESET & BASE STYLES
   =========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background-color: var(--sand);
    line-height: 1.6;
    font-size: 16px;
}

/* Ensure text is always readable */
body, button, input, textarea, select {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove list styling by default */
ul, ol {
    list-style: none;
}

/* Link reset */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Image defaults */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===========================================================================
   2. STICKY NAVIGATION (.top-bar)
   =========================================================================== */

.top-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--teal-deeper);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.top-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: #fff;
    text-transform: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.logo span {
    color: var(--gold);
}

.logo:hover {
    color: var(--gold-light);
}

.logo img {
    height: 32px;
    width: auto;
}

.top-bar nav {
    display: flex;
    align-items: center;
    gap: 2px;
    justify-content: flex-end;
}

.top-bar nav a {
    color: var(--white);
    padding: 0.6rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: var(--transition-fast);
    border-radius: 4px;
    position: relative;
    white-space: nowrap;
}

.top-bar nav a:hover {
    background-color: rgba(201, 169, 110, 0.1);
    color: var(--gold);
}

/* Highlight link (The Archive) */
.top-bar nav a.highlight {
    background-color: var(--gold);
    color: var(--teal-deeper);
    font-weight: 600;
}

.top-bar nav a.highlight:hover {
    background-color: var(--gold-light);
    box-shadow: 0 4px 12px rgba(201, 169, 110, 0.3);
}

/* ===========================================================================
   3. PAGE CONTENT WRAPPER
   =========================================================================== */

.page-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    min-height: calc(100vh - 100px);
}

/* ===========================================================================
   4. PAGE TITLES & SUBTITLES
   =========================================================================== */

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.page-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--gold);
    margin-bottom: 2rem;
    line-height: 1.4;
}

/* ===========================================================================
   5. BREADCRUMB NAVIGATION
   =========================================================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--teal);
    font-weight: 500;
    transition: var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-light);
    margin: 0 0.25rem;
}

/* ===========================================================================
   6. BACK LINK
   =========================================================================== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--teal);
    font-weight: 500;
    margin-bottom: 2rem;
    transition: var(--transition-fast);
}

.back-link:hover {
    color: var(--gold);
}

.back-link::before {
    content: '←';
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.back-link:hover::before {
    transform: translateX(-4px);
}

/* ===========================================================================
   7. ESSAY TYPOGRAPHY
   =========================================================================== */

.essay-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.essay-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.essay-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.essay-meta strong {
    color: var(--teal);
    font-weight: 600;
}

.essay-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
}

.essay-body p {
    margin-bottom: 1.5rem;
}

.essay-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--teal);
    margin: 2rem 0 1rem 0;
    padding-top: 1rem;
}

.essay-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--teal-dark);
    margin: 1.5rem 0 0.75rem 0;
}

.essay-body a {
    color: var(--teal);
    font-weight: 500;
    border-bottom: 2px solid var(--gold);
    transition: var(--transition-fast);
}

.essay-body a:hover {
    color: var(--gold);
    border-bottom-color: var(--teal);
}

.essay-body blockquote {
    border-left: 4px solid var(--gold);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
    font-size: 1.05rem;
}

.essay-body ul, .essay-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.essay-body li {
    margin-bottom: 0.75rem;
    list-style-position: outside;
}

.essay-body ul li {
    list-style: disc;
    color: var(--text);
}

.essay-body ol li {
    list-style: decimal;
    color: var(--text);
}

/* ===========================================================================
   8. ESSAY LISTS
   =========================================================================== */

.essay-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.essay-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 1.25rem;
    transition: var(--transition-fast);
}

.essay-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--teal);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.essay-list a {
    color: var(--teal);
    font-weight: 500;
    transition: var(--transition-fast);
}

.essay-list a:hover {
    color: var(--gold);
}

.essay-list li:hover {
    padding-left: 2.25rem;
}

/* ===========================================================================
   9. CATEGORY CARDS
   =========================================================================== */

.category-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border-left: 4px solid transparent;
    cursor: pointer;
}

.category-card:hover {
    box-shadow: 0 30px 80px rgba(0,0,0,0.12);
    border-left-color: var(--gold);
    transform: translateY(-4px);
}

.category-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 0.75rem;
}

.category-card p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.category-card .essay-count {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
}

/* ===========================================================================
   10. BOOK CARDS (2-column grid)
   =========================================================================== */

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.book-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    box-shadow: 0 30px 80px rgba(0,0,0,0.12);
    transform: translateY(-6px);
}

.book-card-image {
    width: 100%;
    height: 280px;
    background-color: var(--teal-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

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

.book-card-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 0.5rem;
}

.book-card .author {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.book-card .description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1.5rem;
}

.book-card .cta {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    align-self: flex-start;
}

.book-card .cta:hover {
    color: var(--teal);
    text-decoration: underline;
}

/* ===========================================================================
   11. SEARCH COMPONENT
   =========================================================================== */

.search-container {
    margin: 2rem 0;
    position: relative;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    background-color: var(--white);
    color: var(--text);
    transition: var(--transition-fast);
    font-family: 'DM Sans', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(42, 95, 94, 0.1);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-results {
    margin-top: 2rem;
}

.search-result-item {
    background-color: var(--white);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition-fast);
}

.search-result-item:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    transform: translateX(4px);
}

.search-result-item h3 {
    font-family: 'Playfair Display', serif;
    color: var(--teal);
    margin-bottom: 0.5rem;
}

.search-result-item p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===========================================================================
   12. RELATED ESSAYS (3-column grid)
   =========================================================================== */

.related-essays {
    margin: 3rem 0;
}

.related-essays-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 1.5rem;
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
}

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

.related-card {
    background-color: var(--white);
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    box-shadow: 0 25px 70px rgba(0,0,0,0.1);
    border-top: 3px solid var(--gold);
}

.related-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.related-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}

.related-card a {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.related-card a:hover {
    color: var(--teal);
}

/* ===========================================================================
   13. CONTACT FORM
   =========================================================================== */

.contact-form {
    background-color: var(--white);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    max-width: 600px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--teal);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    background-color: var(--sand);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--teal);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(42, 95, 94, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-submit {
    background-color: var(--gold);
    color: var(--text);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: 'DM Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-submit:hover {
    background-color: var(--gold-light);
    box-shadow: 0 8px 20px rgba(201, 169, 110, 0.25);
    transform: translateY(-2px);
}

.form-submit:active {
    transform: translateY(0);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    font-weight: 500;
}

.form-message.success {
    background-color: rgba(42, 95, 94, 0.1);
    color: var(--teal-dark);
    border-left: 4px solid var(--teal);
}

.form-message.error {
    background-color: rgba(220, 38, 38, 0.1);
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

/* ===========================================================================
   14. SECTION HEADERS
   =========================================================================== */

.section-header {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--teal);
    margin: 2.5rem 0 1.5rem 0;
    padding-bottom: 1rem;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
}

/* ===========================================================================
   15. CATEGORY DESCRIPTION
   =========================================================================== */

.category-description {
    background-color: var(--teal-pale);
    border-left: 6px solid var(--teal);
    padding: 1.75rem;
    margin: 2rem 0;
    border-radius: 4px;
    line-height: 1.7;
    color: var(--text);
}

.category-description strong {
    color: var(--teal-dark);
    font-weight: 600;
}

.category-description a {
    color: var(--teal);
    font-weight: 500;
    border-bottom: 2px solid var(--gold);
    transition: var(--transition-fast);
}

.category-description a:hover {
    color: var(--gold);
    border-bottom-color: var(--teal);
}

/* ===========================================================================
   16. FOOTER
   =========================================================================== */

footer {
    background: var(--teal-deeper);
    color: rgba(255,255,255,0.5);
    padding: 60px;
    margin-top: 0;
}

footer .footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

footer .footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.4em;
    color: var(--teal-light);
    font-style: italic;
}

footer .footer-links a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.82em;
    margin-left: 24px;
    transition: color 0.3s;
}

footer .footer-links a:hover { color: var(--gold); }

footer .footer-bottom {
    max-width: 1300px;
    margin: 24px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    font-size: 0.78em;
    color: rgba(255,255,255,0.3);
}

/* ===========================================================================
   17. SCROLL ANIMATIONS (.reveal)
   =========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal.stagger-1 {
    transition-delay: 0.1s;
}

.reveal.stagger-2 {
    transition-delay: 0.2s;
}

.reveal.stagger-3 {
    transition-delay: 0.3s;
}

/* ===========================================================================
   18. RESPONSIVE BREAKPOINTS
   =========================================================================== */

/* ─── HAMBURGER MENU (subpages) ─── */
.top-bar .hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.top-bar .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.top-bar .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.top-bar .hamburger.active span:nth-child(2) { opacity: 0; }
.top-bar .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Tablet / iPad (max-width: 1024px) */
@media (max-width: 1024px) {
    .page-content {
        padding: 2.5rem 1.25rem;
    }

    .page-title {
        font-size: 2.25rem;
    }

    .page-subtitle {
        font-size: 1.25rem;
    }

    .essay-title {
        font-size: 2rem;
    }

    .section-header {
        font-size: 1.65rem;
    }

    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-bar-inner {
        padding: 0.75rem 1.25rem;
        gap: 1.5rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .top-bar nav a {
        padding: 0.65rem 0.8rem;
        font-size: 0.85rem;
    }

    footer {
        padding: 40px 20px;
    }
}

/* Mobile (max-width: 700px) */
@media (max-width: 700px) {
    .page-content {
        padding: 1.75rem 1rem;
        min-height: calc(100vh - 80px);
    }

    .page-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .page-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .essay-title {
        font-size: 1.5rem;
    }

    .essay-meta {
        gap: 1rem;
        margin-bottom: 1.75rem;
        padding-bottom: 1rem;
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .essay-body {
        font-size: 1rem;
        line-height: 1.7;
    }

    .essay-body h2 {
        font-size: 1.35rem;
        margin: 1.5rem 0 0.75rem 0;
    }

    .essay-body h3 {
        font-size: 1.1rem;
    }

    .section-header {
        font-size: 1.4rem;
        margin: 2rem 0 1rem 0;
    }

    .top-bar .hamburger { display: flex; position: absolute; top: 16px; right: 16px; z-index: 1001; }
    .top-bar.menu-open .logo { display: none; }

    .top-bar-inner {
        padding: 0.6rem 1rem;
        gap: 1rem;
    }

    .logo {
        font-size: 1rem;
        flex: 1;
    }

    .logo img {
        height: 28px;
    }

    .top-bar.menu-open {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        height: 100dvh;
        background: rgba(15, 36, 36, 0.98);
        backdrop-filter: blur(20px);
    }

    .top-bar nav {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        z-index: 1000;
    }

    .top-bar nav.open { display: flex; }

    .top-bar nav a {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
        text-align: center;
    }

    body.menu-open { overflow: hidden; }

    .breadcrumb {
        font-size: 0.8rem;
        gap: 0.25rem;
        margin-bottom: 1.5rem;
    }

    .back-link {
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }

    .book-grid {
        grid-template-columns: 1fr;
    }

    .book-card-image {
        height: 220px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-submit {
        width: 100%;
    }

    .search-input {
        max-width: 100%;
    }

    footer { padding: 40px 20px; }
    footer .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
    footer .footer-links a { margin-left: 0; margin: 0 8px; }

    .essay-list li {
        padding-left: 1.5rem;
    }

    .essay-list li::before {
        left: -0.25rem;
    }

    .essay-list li:hover {
        padding-left: 1.5rem;
    }

    .breadcrumb {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
}

/* Extra small devices (max-width: 480px) */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .page-content {
        padding: 1.25rem 0.75rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .essay-title {
        font-size: 1.25rem;
    }

    .essay-body {
        font-size: 0.95rem;
    }

    .top-bar nav a {
        padding: 0.5rem 0.4rem;
        font-size: 0.7rem;
    }

    .section-header {
        font-size: 1.2rem;
    }

    .contact-form {
        padding: 1.25rem;
    }

    .category-card {
        padding: 1.25rem;
    }
}

/* ===========================================================================
   19. UTILITY CLASSES
   =========================================================================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.italic {
    font-style: italic;
}

.font-light {
    color: var(--text-light);
    font-weight: 400;
}

.font-semibold {
    font-weight: 600;
}

.gold-text {
    color: var(--gold);
}

.teal-text {
    color: var(--teal);
}

/* ===========================================================================
   20. PRINT STYLES
   =========================================================================== */

@media print {
    .top-bar,
    footer,
    .back-link,
    .breadcrumb {
        display: none;
    }

    .page-content {
        max-width: 100%;
        padding: 0;
    }

    .essay-body a {
        border-bottom: none;
        text-decoration: underline;
    }

    body {
        background-color: var(--white);
        color: var(--text);
    }
}

/* ===========================================================================
   ARCHIVE INDEX COMPAT — classes used by collected/index.html
   =========================================================================== */

.site-intro {
    font-size: 0.95em;
    color: var(--text-light);
    margin-bottom: 30px;
}

.section-header {
    font-family: 'Playfair Display', serif;
    font-size: 1.4em;
    font-weight: 500;
    color: var(--teal);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
}

.books-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 10px;
}

.books-row .book-card {
    text-decoration: none;
    color: var(--text);
    display: block;
    padding: 24px 28px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-left: 4px solid transparent;
    transition: all 0.3s;
}

.books-row .book-card:hover {
    border-left-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.book-card .book-meta {
    font-size: 0.82em;
    color: var(--gold);
    margin-bottom: 6px;
    font-weight: 500;
}

.book-card .book-desc {
    font-size: 0.88em;
    color: var(--text-light);
    line-height: 1.6;
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.category-grid .category-card {
    text-decoration: none;
    display: block;
    color: var(--text);
    padding: 24px 28px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-left: 4px solid transparent;
    transition: all 0.3s;
}

.category-grid .category-card:hover {
    border-left-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.category-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35em;
    font-weight: 500;
    color: var(--teal);
    margin-bottom: 6px;
}

.category-card .count {
    font-size: 0.82em;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 10px;
}

.category-card .desc-teaser {
    font-size: 0.9em;
    color: var(--text-light);
    line-height: 1.6;
}

.category-card .desc-full {
    display: none;
}

.category-card .desc-full.expanded {
    display: inline;
}

.category-card .card-toggle {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.82em;
    color: var(--teal);
    font-weight: 600;
    cursor: pointer;
}

.category-card .card-toggle:hover {
    color: var(--gold);
}

/* Essay list page compat */
.essay-list .wordcount {
    font-size: 0.8em;
    color: var(--text-light);
    margin-top: 2px;
}

.essay-summary {
    font-size: 0.9em;
    color: var(--text-light);
    margin-top: 4px;
    line-height: 1.5;
    font-style: italic;
}

.category-description {
    font-size: 0.95em;
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 35px;
    padding: 20px 24px;
    border-left: 3px solid var(--gold);
    background: var(--teal-pale);
}

/* Related essays compat */
.related-essays {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.related-essays h3 {
    font-size: 1.1em;
    color: var(--teal);
    margin-bottom: 16px;
    font-weight: normal;
    font-style: italic;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.related-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.related-card:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.related-card .rc-title {
    font-size: 0.92em;
    font-weight: bold;
    color: var(--teal);
    margin-bottom: 6px;
    line-height: 1.3;
}

.related-card .rc-meta {
    font-size: 0.78em;
    color: var(--text-light);
}

@media (max-width: 900px) {
    .books-row { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
}

/* ===========================================================================
   END OF STYLESHEET
   =========================================================================== */
