:root {
            --parchment-dark: #1a1612;
            --parchment-mid: #2d2520;
            --parchment-light: #3d3530;
            --ink-brown: #8b7355;
            --ink-gold: #c9a959;
            --ink-cream: #e8dcc4;
            --ink-faded: #a69680;
            --morocco-teal: #1a5f5f;
            --tamil-vermillion: #c94c4c;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        body {
            font-family: 'IM Fell English', Georgia, serif;
            background: var(--parchment-dark);
            color: var(--ink-cream);
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* Zellij Background */
        .zellij-bg {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            opacity: 0.03;
            pointer-events: none;
            z-index: 0;
            background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30L30 0z' fill='none' stroke='%23c9a959' stroke-width='0.5'/%3E%3Cpath d='M30 10L50 30L30 50L10 30L30 10z' fill='none' stroke='%23c9a959' stroke-width='0.5'/%3E%3Cpath d='M30 20L40 30L30 40L20 30L30 20z' fill='none' stroke='%23c9a959' stroke-width='0.5'/%3E%3C/svg%3E");
            background-size: 60px 60px;
        }

        /* Loading Screen - Converging Dialogue */
        .loading-screen {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: var(--parchment-dark);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            transition: opacity 1.5s ease, visibility 1.5s ease;
        }
        .loading-screen.hidden { opacity: 0; visibility: hidden; }

        .loading-animation {
            position: relative;
            width: 200px;
            height: 100px;
            margin-bottom: 2rem;
        }

        .loading-circle {
            position: absolute;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            top: 50%;
            transform: translateY(-50%);
        }

        .loading-circle.morocco {
            background: var(--morocco-teal);
            left: 0;
            animation: convergeLeft 2.5s ease-in-out infinite;
            box-shadow: 0 0 20px var(--morocco-teal);
        }

        .loading-circle.tamil {
            background: var(--tamil-vermillion);
            right: 0;
            animation: convergeRight 2.5s ease-in-out infinite;
            box-shadow: 0 0 20px var(--tamil-vermillion);
        }

        .loading-line {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 0;
            height: 1px;
            background: linear-gradient(90deg, var(--morocco-teal), var(--ink-gold), var(--tamil-vermillion));
            animation: expandLine 2.5s ease-in-out infinite;
        }

        .loading-pulse {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--ink-gold);
            animation: pulseCenter 2.5s ease-in-out infinite;
        }

        @keyframes convergeLeft {
            0%, 10% { left: 0; opacity: 1; }
            45%, 55% { left: calc(50% - 6px); opacity: 1; }
            70%, 100% { left: 0; opacity: 0.3; }
        }

        @keyframes convergeRight {
            0%, 10% { right: 0; opacity: 1; }
            45%, 55% { right: calc(50% - 6px); opacity: 1; }
            70%, 100% { right: 0; opacity: 0.3; }
        }

        @keyframes expandLine {
            0%, 30% { width: 0; opacity: 0; }
            50% { width: 60px; opacity: 1; }
            70%, 100% { width: 0; opacity: 0; }
        }

        @keyframes pulseCenter {
            0%, 40% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
            50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
            60% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
            100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
        }

        .loading-text {
            font-family: 'Special Elite', monospace;
            font-size: 0.75rem;
            color: var(--ink-faded);
            letter-spacing: 0.25em;
            text-transform: uppercase;
            animation: fadeInOut 2.5s ease-in-out infinite;
        }

        .loading-subtext {
            font-family: 'Playfair Display', serif;
            font-size: 0.9rem;
            color: var(--ink-brown);
            font-style: italic;
            margin-top: 0.5rem;
            opacity: 0;
            animation: fadeIn 1s ease 1s forwards;
        }

        @keyframes fadeInOut {
            0%, 100% { opacity: 0.4; }
            50% { opacity: 1; }
        }

        @keyframes fadeIn {
            to { opacity: 0.6; }
        }

        /* Scroll Progress */
        .scroll-progress {
            position: fixed; top: 0; left: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--morocco-teal), var(--ink-gold), var(--tamil-vermillion));
            z-index: 100; width: 0%;
        }

        /* Nav Bar */
        .nav-bar {
            position: fixed;
            top: 0; left: 0; right: 0;
            background: rgba(26, 22, 18, 0.95);
            backdrop-filter: blur(10px);
            padding: 1rem 2rem;
            z-index: 90;
            transform: translateY(-100%);
            transition: transform 0.3s ease;
            border-bottom: 1px solid var(--ink-brown);
        }
        .nav-bar.visible { transform: translateY(0); }
        .nav-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
        .nav-title { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--ink-gold); }
        .nav-links { display: flex; gap: 1.5rem; }
        .nav-link {
            font-family: 'Special Elite', monospace;
            font-size: 0.7rem;
            color: var(--ink-faded);
            text-decoration: none;
            letter-spacing: 0.1em;
            transition: color 0.3s ease;
            background: none;
            border: none;
            cursor: pointer;
        }
        .nav-link:hover { color: var(--ink-gold); }
        .nav-glossary-link {
            color: var(--ink-gold);
            border: 1px solid var(--ink-gold);
            padding: 0.3rem 0.6rem;
            transition: all 0.3s ease;
        }
        .nav-glossary-link:hover {
            background: var(--ink-gold);
            color: var(--parchment-dark);
        }

        /* Glossary Button - More Prominent */
        .glossary-btn {
            position: fixed;
            bottom: 2rem; left: 2rem;
            background: var(--parchment-light);
            border: 1px solid var(--ink-faded);
            color: var(--ink-cream);
            padding: 1rem 1.5rem;
            font-family: 'Special Elite', monospace;
            font-size: 0.8rem;
            cursor: pointer;
            z-index: 50;
            transition: all 0.3s ease;
            display: flex; align-items: center; gap: 0.6rem;
            letter-spacing: 0.1em;
        }
        .glossary-btn:hover { 
            background: var(--ink-cream); 
            color: var(--parchment-dark); 
            border-color: var(--ink-cream);
            transform: scale(1.05);
        }
        .glossary-btn-icon {
            font-size: 1rem;
            font-weight: bold;
        }

        /* Glossary Modal */
        .glossary-modal {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.9);
            z-index: 200;
            display: flex; justify-content: center; align-items: center;
            opacity: 0; visibility: hidden;
            transition: opacity 0.4s ease, visibility 0.4s ease;
        }
        .glossary-modal.active { opacity: 1; visibility: visible; }
        .glossary-content {
            background: var(--parchment-dark);
            border: 1px solid var(--ink-gold);
            max-width: 800px; width: 90%; max-height: 85vh;
            overflow-y: auto;
            transform: scale(0.9);
            transition: transform 0.4s ease;
        }
        .glossary-modal.active .glossary-content { transform: scale(1); }
        .glossary-header {
            position: sticky; top: 0;
            background: var(--parchment-mid);
            padding: 1.5rem 2rem;
            border-bottom: 1px solid var(--ink-brown);
            display: flex; justify-content: space-between; align-items: center;
        }
        .glossary-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--ink-gold); }
        .glossary-close {
            background: none;
            border: 1px solid var(--ink-faded);
            color: var(--ink-faded);
            width: 40px; height: 40px;
            font-size: 1.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .glossary-close:hover { border-color: var(--ink-gold); color: var(--ink-gold); transform: rotate(90deg); }
        .glossary-body { padding: 2rem; }
        .glossary-section { margin-bottom: 2rem; }
        .glossary-section-title {
            font-family: 'Special Elite', monospace;
            font-size: 0.75rem;
            color: var(--ink-faded);
            letter-spacing: 0.2em;
            text-transform: uppercase;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px dotted var(--parchment-light);
        }
        .glossary-item {
            display: grid;
            grid-template-columns: 1fr 1fr 2fr;
            gap: 1rem;
            padding: 1rem 0;
            border-bottom: 1px dotted var(--parchment-light);
        }
        .glossary-term-arabic { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.3rem; color: var(--morocco-teal); direction: rtl; text-align: right; }
        .glossary-term-tamil { font-family: 'Noto Sans Tamil', sans-serif; font-size: 1.1rem; color: var(--tamil-vermillion); }
        .glossary-term-english { font-family: 'Playfair Display', serif; color: var(--ink-cream); margin-bottom: 0.3rem; }
        .glossary-definition { font-size: 0.9rem; color: var(--ink-faded); line-height: 1.6; }

        /* Main Container */
        .book-container { max-width: 1000px; margin: 0 auto; padding: 2rem; position: relative; z-index: 1; }

        /* ============================================
           REDESIGNED HERO HEADER - CLEAN VERSION
           ============================================ */
        .hero {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
            overflow: hidden;
            padding: 2rem;
        }

        .hero-background {
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            z-index: 0;
        }

        .hero-bg-text {
            position: absolute;
            opacity: 0.06;
            white-space: nowrap;
            user-select: none;
            letter-spacing: 0.05em;
        }
        
        /* Arabic texts - teal */
        .hero-bg-text.arabic {
            font-family: 'Noto Nastaliq Urdu', serif;
            color: var(--morocco-teal);
            opacity: 0.08;
            animation: floatRight 90s linear infinite;
        }
        
        /* Tamil text - vermillion */
        .hero-bg-text.tamil {
            font-family: 'Noto Sans Tamil', sans-serif;
            color: var(--tamil-vermillion);
            opacity: 0.07;
            animation: floatLeft 85s linear infinite;
        }
        
        .hero-bg-text:nth-child(1) { 
            top: 8%; 
            left: 5%; 
            font-size: 9vw;
            animation-duration: 100s;
        }
        .hero-bg-text:nth-child(2) { 
            top: 45%; 
            right: 5%; 
            font-size: 10vw;
            animation-delay: -30s;
        }
        .hero-bg-text:nth-child(3) { 
            bottom: 12%; 
            left: 10%; 
            font-size: 8vw;
            animation-delay: -55s;
            animation-duration: 110s;
        }

        @keyframes floatRight {
            0% { transform: translateX(-5%); }
            50% { transform: translateX(5%); }
            100% { transform: translateX(-5%); }
        }
        
        @keyframes floatLeft {
            0% { transform: translateX(5%); }
            50% { transform: translateX(-5%); }
            100% { transform: translateX(5%); }
        }

        .hero-content {
            position: relative;
            z-index: 1;
            max-width: 800px;
            margin: 0 auto;
            text-align: center;
        }

        .hero-tag {
            font-family: 'Special Elite', monospace;
            font-size: 0.7rem;
            color: var(--ink-faded);
            letter-spacing: 0.4em;
            text-transform: uppercase;
            margin-bottom: 3rem;
            animation: fadeSlideIn 1s ease 0.3s both;
        }

        .hero-title-wrapper {
            position: relative;
            margin-bottom: 2.5rem;
        }

        .hero-title {
            position: relative;
            font-family: 'Playfair Display', serif;
            font-size: clamp(2.5rem, 7vw, 5rem);
            font-weight: 400;
            line-height: 1.15;
            color: var(--ink-cream);
            animation: fadeSlideIn 1s ease 0.5s both;
        }

        .hero-title-line {
            display: block;
        }

        .hero-title-line:nth-child(2) {
            color: var(--ink-gold);
            font-style: italic;
        }

        /* Bilingual Translations */
        .hero-translations {
            display: flex;
            justify-content: center;
            gap: 3rem;
            margin: 2.5rem 0;
            animation: fadeSlideIn 1s ease 0.7s both;
        }

        .hero-translation {
            position: relative;
            padding: 0 1.5rem;
        }

        .hero-translation:first-child::after {
            content: '';
            position: absolute;
            right: -1.5rem;
            top: 50%;
            transform: translateY(-50%);
            width: 1px;
            height: 60%;
            background: var(--ink-brown);
        }

        .hero-translation-arabic {
            font-family: 'Noto Nastaliq Urdu', serif;
            font-size: 1.6rem;
            color: var(--morocco-teal);
            direction: rtl;
        }

        .hero-translation-tamil {
            font-family: 'Noto Sans Tamil', sans-serif;
            font-size: 1.4rem;
            color: var(--tamil-vermillion);
        }

        /* Divider */
        .hero-divider {
            width: 60px;
            height: 1px;
            background: var(--ink-gold);
            margin: 2.5rem auto;
            animation: fadeSlideIn 1s ease 0.8s both;
        }

        /* Authors */
        .hero-authors {
            margin-bottom: 1rem;
            animation: fadeSlideIn 1s ease 0.9s both;
        }

        .hero-authors-label {
            font-family: 'Special Elite', monospace;
            font-size: 0.65rem;
            color: var(--ink-faded);
            letter-spacing: 0.2em;
            text-transform: uppercase;
            margin-bottom: 0.5rem;
        }

        .hero-authors-names {
            font-family: 'Playfair Display', serif;
            font-size: 1.3rem;
            color: var(--ink-cream);
            font-style: italic;
        }

        /* Institution */
        .hero-institution {
            animation: fadeSlideIn 1s ease 1s both;
        }

        .hero-institution-text {
            font-family: 'Special Elite', monospace;
            font-size: 0.65rem;
            color: var(--ink-faded);
            letter-spacing: 0.15em;
            line-height: 2;
        }

        .hero-year {
            font-family: 'Playfair Display', serif;
            font-size: 1.2rem;
            color: var(--ink-brown);
            letter-spacing: 0.3em;
            margin-top: 0.5rem;
        }

        /* Scroll CTA */
        .hero-scroll-cta {
            position: absolute;
            bottom: 3rem;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.8rem;
            animation: fadeSlideInCenter 1s ease 1.2s both;
            cursor: pointer;
            transition: opacity 0.3s ease;
        }

        .hero-scroll-cta:hover {
            opacity: 0.7;
        }

        .hero-scroll-text {
            font-family: 'Special Elite', monospace;
            font-size: 0.6rem;
            color: var(--ink-faded);
            letter-spacing: 0.25em;
            text-transform: uppercase;
        }

        .hero-scroll-arrow {
            width: 20px;
            height: 20px;
            border-right: 1px solid var(--ink-gold);
            border-bottom: 1px solid var(--ink-gold);
            transform: rotate(45deg);
            animation: scrollBounce 2s infinite;
        }

        @keyframes fadeSlideIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes fadeSlideInCenter {
            from { opacity: 0; transform: translateX(-50%) translateY(20px); }
            to { opacity: 1; transform: translateX(-50%) translateY(0); }
        }

        @keyframes scrollBounce {
            0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.4; }
            50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
        }

        /* Timeline TOC */
        .toc-section { padding: 6rem 0; position: relative; }
        .toc-header { font-family: 'Playfair Display', serif; font-size: 2rem; text-align: center; margin-bottom: 4rem; color: var(--ink-gold); letter-spacing: 0.2em; text-transform: uppercase; }
        .toc-header-sub { font-family: 'Special Elite', monospace; font-size: 0.8rem; color: var(--ink-faded); display: block; margin-top: 0.5rem; letter-spacing: 0.15em; }

        .toc-timeline { position: relative; max-width: 800px; margin: 0 auto; }
        .toc-timeline::before {
            content: '';
            position: absolute;
            left: 50%; top: 0; bottom: 0;
            width: 2px;
            background: linear-gradient(to bottom, transparent, var(--ink-gold), var(--ink-gold), transparent);
            transform: translateX(-50%);
        }

        .toc-item {
            position: relative;
            padding: 2rem;
            width: 45%;
            cursor: pointer;
            transition: all 0.4s ease;
            opacity: 0;
            transform: translateX(-30px);
        }
        .toc-item.visible { opacity: 1; transform: translateX(0); }
        .toc-item:nth-child(odd) { margin-left: 0; text-align: right; padding-right: 3rem; }
        .toc-item:nth-child(even) { margin-left: 55%; text-align: left; padding-left: 3rem; transform: translateX(30px); }
        .toc-item:nth-child(even).visible { transform: translateX(0); }
        .toc-item::before {
            content: '';
            position: absolute;
            width: 16px; height: 16px;
            background: var(--parchment-dark);
            border: 2px solid var(--ink-gold);
            border-radius: 50%;
            top: 2.5rem;
            transition: all 0.3s ease;
        }
        .toc-item:nth-child(odd)::before { right: -8px; }
        .toc-item:nth-child(even)::before { left: -8px; }
        .toc-item:hover::before { background: var(--ink-gold); transform: scale(1.3); }
        .toc-item:hover { background: var(--parchment-mid); }

        .toc-number { font-family: 'Playfair Display', serif; font-size: 3rem; color: var(--parchment-light); line-height: 1; margin-bottom: 0.5rem; transition: color 0.3s ease; }
        .toc-item:hover .toc-number { color: var(--ink-gold); }
        .toc-title-main { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--ink-cream); margin-bottom: 0.5rem; }
        .toc-title-bilingual { margin: 0.5rem 0; }
        .toc-title-arabic { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.2rem; color: var(--morocco-teal); direction: rtl; display: block; }
        .toc-title-tamil { font-family: 'Noto Sans Tamil', sans-serif; font-size: 1rem; color: var(--tamil-vermillion); display: block; }
        .toc-subtitle { font-family: 'Special Elite', monospace; font-size: 0.7rem; color: var(--ink-faded); letter-spacing: 0.1em; margin-top: 0.5rem; }

        /* Chapters */
        .chapter { padding: 5rem 0; border-bottom: 1px solid var(--ink-brown); position: relative; }
        .chapter-inner { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
        .chapter.visible .chapter-inner { opacity: 1; transform: translateY(0); }
        .chapter-header { margin-bottom: 3rem; position: relative; }
        .chapter-number {
            font-family: 'Playfair Display', serif;
            font-size: 6rem;
            color: var(--parchment-light);
            position: absolute;
            top: -2rem; left: -1rem;
            z-index: -1;
            opacity: 0;
            transform: translateX(-20px);
            transition: all 0.8s ease 0.2s;
        }
        .chapter.visible .chapter-number { opacity: 0.5; transform: translateX(0); }
        .chapter-title-bilingual { display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline; margin-bottom: 1rem; }
        .title-arabic { font-family: 'Noto Nastaliq Urdu', serif; font-size: 2rem; color: var(--morocco-teal); direction: rtl; }
        .title-tamil { font-family: 'Noto Sans Tamil', sans-serif; font-size: 1.6rem; color: var(--tamil-vermillion); }
        .chapter-title-english { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: var(--ink-cream); font-weight: 400; }

        .chapter-epigraph {
            font-style: italic;
            color: var(--ink-faded);
            padding-left: 2rem;
            border-left: 2px solid var(--ink-gold);
            margin: 2rem 0;
            position: relative;
            opacity: 0;
            transform: translateX(-20px);
            transition: all 0.6s ease 0.4s;
        }
        .chapter.visible .chapter-epigraph { opacity: 1; transform: translateX(0); }
        .chapter-epigraph::before {
            content: '"';
            font-family: 'Playfair Display', serif;
            font-size: 4rem;
            color: var(--ink-gold);
            position: absolute;
            left: -0.5rem; top: -1rem;
            opacity: 0.3;
        }

        .chapter-content { line-height: 1.9; font-size: 1.1rem; }
        .chapter-content p { 
            margin-bottom: 1.5rem; 
            text-align: justify;
            opacity: 0;
            transform: translateY(15px);
            transition: all 0.5s ease;
        }
        .chapter.visible .chapter-content p { opacity: 1; transform: translateY(0); }
        .chapter.visible .chapter-content p:nth-of-type(1) { transition-delay: 0.1s; }
        .chapter.visible .chapter-content p:nth-of-type(2) { transition-delay: 0.15s; }
        .chapter.visible .chapter-content p:nth-of-type(3) { transition-delay: 0.2s; }
        .chapter.visible .chapter-content p:nth-of-type(4) { transition-delay: 0.25s; }
        .chapter.visible .chapter-content p:nth-of-type(5) { transition-delay: 0.3s; }
        .chapter.visible .chapter-content p:nth-of-type(6) { transition-delay: 0.35s; }

        /* Animated content sections */
        .chapter-content h3 {
            opacity: 0;
            transform: translateY(15px);
            transition: all 0.5s ease;
        }
        .chapter.visible .chapter-content h3 { opacity: 1; transform: translateY(0); }
        .chapter.visible .chapter-content h3:nth-of-type(1) { transition-delay: 0.3s; }
        .chapter.visible .chapter-content h3:nth-of-type(2) { transition-delay: 0.4s; }
        .chapter.visible .chapter-content h3:nth-of-type(3) { transition-delay: 0.5s; }
        .chapter.visible .chapter-content h3:nth-of-type(4) { transition-delay: 0.6s; }

        /* Book excerpt animation */
        .book-excerpt {
            background: linear-gradient(135deg, var(--parchment-mid), var(--parchment-light));
            padding: 2rem;
            margin: 2rem 0;
            border-left: 4px solid #8b4513;
            position: relative;
            opacity: 0;
            transform: translateY(20px) rotate(-0.5deg);
            transition: all 0.6s ease;
        }
        .chapter.visible .book-excerpt { opacity: 1; transform: translateY(0) rotate(-0.5deg); }
        .book-excerpt:hover { transform: translateY(-2px) rotate(0deg); }
        .book-excerpt::before { content: '❧'; position: absolute; top: -10px; left: 20px; font-size: 1.5rem; color: var(--ink-gold); }
        .book-excerpt-text { font-style: italic; line-height: 1.8; }
        .book-excerpt-source { font-family: 'Special Elite', monospace; font-size: 0.75rem; color: var(--ink-faded); margin-top: 1rem; text-align: right; }

        /* Citation block animation */
        .citation-block {
            background: var(--parchment-dark);
            border: 1px solid var(--ink-brown);
            padding: 1.5rem;
            margin: 2rem 0;
            font-size: 0.9rem;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.6s ease;
        }
        .chapter.visible .citation-block { opacity: 1; transform: translateY(0); }
        .citation-block::before { content: 'SOURCE'; font-family: 'Special Elite', monospace; font-size: 0.7rem; color: var(--ink-gold); letter-spacing: 0.2em; display: block; margin-bottom: 0.5rem; }

        /* Media placeholder animation */
        .media-placeholder {
            background: var(--parchment-mid);
            border: 2px dashed var(--ink-brown);
            padding: 2rem;
            margin: 2rem 0;
            text-align: center;
            min-height: 200px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            transition: all 0.4s ease;
            opacity: 0;
            transform: scale(0.98);
        }
        .chapter.visible .media-placeholder { opacity: 1; transform: scale(1); }
        .media-placeholder:hover { border-color: var(--ink-gold); background: var(--parchment-light); transform: scale(1.01); }

        /* Actual images (replace placeholders with these) */
        .media-figure {
            margin: 2rem 0;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.6s ease;
        }
        .chapter.visible .media-figure { opacity: 1; transform: translateY(0); }
        
        .media-image {
            width: 100%;
            height: auto;
            display: block;
            border: 1px solid var(--ink-brown);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .media-image:hover {
            transform: scale(1.01);
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }
        
        .media-caption {
            font-family: 'Special Elite', monospace;
            font-size: 0.75rem;
            color: var(--ink-faded);
            padding: 1rem;
            background: var(--parchment-mid);
            border: 1px solid var(--ink-brown);
            border-top: none;
            line-height: 1.6;
        }

        /* Comparison tables animation */
        .comparison-table {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            margin: 2rem 0;
            padding: 1.5rem;
            background: var(--parchment-mid);
            border: 1px solid var(--ink-brown);
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.6s ease;
        }
        .chapter.visible .comparison-table { opacity: 1; transform: translateY(0); }

        .comparison-column h4 {
            font-family: 'Special Elite', monospace;
            font-size: 0.8rem;
            letter-spacing: 0.1em;
            margin-bottom: 1rem;
        }

        .comparison-column ul {
            list-style: none;
            font-size: 0.95rem;
            line-height: 1.8;
        }

        .comparison-column.morocco h4 { color: var(--morocco-teal); }
        .comparison-column.india h4 { color: var(--tamil-vermillion); }

        @media (max-width: 768px) {
            .comparison-table {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
        }

        .chapter-subheading {
            font-family: 'Playfair Display', serif;
            color: var(--ink-gold);
            margin: 2.5rem 0 1rem;
            font-size: 1.3rem;
            font-weight: 400;
        }

        /* Media Placeholders */
        .media-placeholder {
            background: var(--parchment-mid);
            border: 2px dashed var(--ink-brown);
            padding: 2rem;
            margin: 2rem 0;
            text-align: center;
            min-height: 200px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            transition: all 0.3s ease;
        }
        .media-placeholder:hover { border-color: var(--ink-gold); background: var(--parchment-light); }
        .media-placeholder-icon { 
            font-family: 'Special Elite', monospace;
            font-size: 1rem; 
            margin-bottom: 1rem; 
            color: var(--ink-faded);
            letter-spacing: 0.1em;
        }
        .media-placeholder-label { font-family: 'Special Elite', monospace; font-size: 0.8rem; color: var(--ink-faded); letter-spacing: 0.1em; text-transform: uppercase; }
        .media-placeholder-hint { font-size: 0.75rem; color: var(--ink-brown); margin-top: 0.5rem; font-style: italic; }

        .media-image { width: 100%; height: auto; display: block; }
        .media-caption { font-family: 'Special Elite', monospace; font-size: 0.75rem; color: var(--ink-faded); margin-top: 0.5rem; text-align: center; }

        .media-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 2rem 0; }
        .media-gallery .media-placeholder { min-height: 150px; margin: 0; }

        .media-full { margin: 3rem -2rem; }
        .media-full .media-placeholder { min-height: 300px; margin: 0; }

        /* Newspaper Excerpt */
        .newspaper-excerpt {
            background: var(--ink-cream);
            color: var(--parchment-dark);
            padding: 1.5rem;
            margin: 2rem 0;
            font-family: 'Special Elite', monospace;
            font-size: 0.9rem;
            position: relative;
            transform: rotate(-0.5deg);
            box-shadow: 4px 4px 15px rgba(0,0,0,0.4);
            transition: transform 0.3s ease;
        }
        .newspaper-excerpt:hover { transform: rotate(0deg) scale(1.02); }
        .newspaper-excerpt::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: repeating-linear-gradient(transparent, transparent 1.5rem, rgba(0,0,0,0.03) 1.5rem, rgba(0,0,0,0.03) 3rem);
            pointer-events: none;
        }
        .newspaper-source { font-size: 0.7rem; color: var(--ink-brown); margin-top: 1rem; text-align: right; }

        /* Book Excerpt */
        .book-excerpt {
            background: linear-gradient(135deg, var(--parchment-mid), var(--parchment-light));
            padding: 2rem;
            margin: 2rem 0;
            border-left: 4px solid #8b4513;
            position: relative;
        }
        .book-excerpt::before { content: '❧'; position: absolute; top: -10px; left: 20px; font-size: 1.5rem; color: var(--ink-gold); }
        .book-excerpt-text { font-style: italic; line-height: 1.8; }
        .book-excerpt-source { font-family: 'Special Elite', monospace; font-size: 0.75rem; color: var(--ink-faded); margin-top: 1rem; text-align: right; }

        /* Citation Block */
        .citation-block {
            background: var(--parchment-dark);
            border: 1px solid var(--ink-brown);
            padding: 1.5rem;
            margin: 2rem 0;
            font-size: 0.9rem;
        }
        .citation-block::before { content: 'SOURCE'; font-family: 'Special Elite', monospace; font-size: 0.7rem; color: var(--ink-gold); letter-spacing: 0.2em; display: block; margin-bottom: 0.5rem; }

        /* Hoverable Terms */
        .term-hover {
            color: var(--ink-gold);
            border-bottom: 1px dotted var(--ink-gold);
            cursor: help;
            position: relative;
        }
        .term-hover.arabic-term { color: var(--morocco-teal); border-bottom-color: var(--morocco-teal); }
        .term-hover.tamil-term { color: var(--tamil-vermillion); border-bottom-color: var(--tamil-vermillion); }

        .term-tooltip {
            position: absolute;
            bottom: calc(100% + 10px);
            left: 50%;
            transform: translateX(-50%) scale(0.9);
            background: var(--parchment-mid);
            border: 1px solid var(--ink-gold);
            padding: 1rem;
            min-width: 250px;
            z-index: 100;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            box-shadow: 0 5px 20px rgba(0,0,0,0.4);
        }
        .term-tooltip::after {
            content: '';
            position: absolute;
            top: 100%; left: 50%;
            transform: translateX(-50%);
            border: 8px solid transparent;
            border-top-color: var(--ink-gold);
        }
        .term-hover:hover .term-tooltip { opacity: 1; visibility: visible; transform: translateX(-50%) scale(1); }
        .tooltip-word { display: block; margin-bottom: 0.5rem; }
        .tooltip-word-ar { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.3rem; color: var(--morocco-teal); direction: rtl; }
        .tooltip-word-ta { font-family: 'Noto Sans Tamil', sans-serif; font-size: 1.1rem; color: var(--tamil-vermillion); }
        .tooltip-transliteration { font-family: 'Special Elite', monospace; font-size: 0.7rem; color: var(--ink-faded); display: block; margin-bottom: 0.5rem; }
        .tooltip-meaning { font-size: 0.85rem; color: var(--ink-cream); line-height: 1.4; }

        /* Dividers */
        .divider { text-align: center; margin: 3rem 0; color: var(--ink-gold); font-size: 1.2rem; letter-spacing: 1rem; }
        .divider-animated {
            position: relative;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 4rem 0;
            opacity: 0;
            transition: opacity 0.6s ease;
        }
        .chapter.visible .divider-animated { opacity: 1; }
        .divider-animated::before, .divider-animated::after { 
            content: ''; 
            flex: 1; 
            height: 1px; 
            background: linear-gradient(90deg, transparent, var(--ink-gold));
            transform: scaleX(0);
            transition: transform 0.8s ease;
        }
        .divider-animated::after { background: linear-gradient(90deg, var(--ink-gold), transparent); }
        .chapter.visible .divider-animated::before,
        .chapter.visible .divider-animated::after { transform: scaleX(1); }
        .divider-animated span { padding: 0 2rem; color: var(--ink-gold); animation: pulse 2s ease-in-out infinite; }
        @keyframes pulse { 0%, 100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.2); } }

        /* Epilogue */
        .epilogue { text-align: center; padding: 6rem 2rem; background: linear-gradient(to bottom, var(--parchment-dark), var(--parchment-mid)); }
        .epilogue-quote { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-style: italic; color: var(--ink-gold); margin-bottom: 1rem; }
        .epilogue-attribution { font-family: 'Special Elite', monospace; font-size: 0.9rem; color: var(--ink-faded); letter-spacing: 0.1em; }

        /* ============================================
           ABOUT THE FELLOWS SECTION
           ============================================ */
        .fellows-section {
            padding: 6rem 0;
            border-top: 1px solid var(--ink-brown);
            position: relative;
        }

        .fellows-header {
            text-align: center;
            margin-bottom: 4rem;
        }

        .fellows-header-tag {
            font-family: 'Special Elite', monospace;
            font-size: 0.7rem;
            color: var(--ink-faded);
            letter-spacing: 0.3em;
            text-transform: uppercase;
            margin-bottom: 1rem;
        }

        .fellows-header-title {
            font-family: 'Playfair Display', serif;
            font-size: 2rem;
            color: var(--ink-gold);
        }

        .fellows-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 3rem;
        }

        .fellow-card {
            position: relative;
            padding: 2rem;
            background: var(--parchment-mid);
            border-left: 3px solid var(--ink-brown);
            transition: all 0.4s ease;
            opacity: 0;
            transform: translateY(30px);
        }

        .fellow-card.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .fellow-card:hover {
            border-left-color: var(--ink-gold);
            background: var(--parchment-light);
        }

        .fellow-card:nth-child(1) { border-left-color: var(--morocco-teal); }
        .fellow-card:nth-child(2) { border-left-color: var(--tamil-vermillion); }
        .fellow-card:nth-child(1):hover { border-left-color: var(--morocco-teal); }
        .fellow-card:nth-child(2):hover { border-left-color: var(--tamil-vermillion); }

        .fellow-photo-placeholder {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: var(--parchment-dark);
            border: 2px solid var(--ink-brown);
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Playfair Display', serif;
            font-size: 2rem;
            font-style: italic;
            color: var(--ink-faded);
            margin-bottom: 1.5rem;
        }

        /* Actual fellow photos - use this class when replacing placeholders */
        .fellow-photo {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--ink-brown);
            margin-bottom: 1.5rem;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .fellow-photo:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 20px rgba(0,0,0,0.3);
        }

        .fellow-card:nth-child(1) .fellow-photo-placeholder { border-color: var(--morocco-teal); }
        .fellow-card:nth-child(2) .fellow-photo-placeholder { border-color: var(--tamil-vermillion); }
        .fellow-card:nth-child(1) .fellow-photo { border-color: var(--morocco-teal); }
        .fellow-card:nth-child(2) .fellow-photo { border-color: var(--tamil-vermillion); }

        .fellow-name {
            font-family: 'Playfair Display', serif;
            font-size: 1.5rem;
            color: var(--ink-cream);
            margin-bottom: 0.5rem;
        }

        .fellow-origin {
            font-family: 'Special Elite', monospace;
            font-size: 0.75rem;
            color: var(--ink-faded);
            letter-spacing: 0.1em;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .fellow-origin-arrow {
            color: var(--ink-gold);
        }

        .fellow-quote {
            font-style: italic;
            color: var(--ink-cream);
            line-height: 1.7;
            margin-bottom: 1.5rem;
            padding-left: 1rem;
            border-left: 2px solid var(--ink-brown);
            position: relative;
        }

        .fellow-card:nth-child(1) .fellow-quote { border-left-color: var(--morocco-teal); }
        .fellow-card:nth-child(2) .fellow-quote { border-left-color: var(--tamil-vermillion); }

        .fellow-quote::before {
            content: '"';
            font-family: 'Playfair Display', serif;
            font-size: 2rem;
            color: var(--ink-gold);
            position: absolute;
            left: -0.3rem;
            top: -0.5rem;
            opacity: 0.5;
        }

        .fellow-role {
            font-family: 'Special Elite', monospace;
            font-size: 0.7rem;
            color: var(--ink-faded);
            letter-spacing: 0.1em;
            line-height: 1.8;
        }

        .fellow-role-highlight {
            color: var(--ink-gold);
        }

        /* Footer */
        .book-footer { text-align: center; padding: 4rem 2rem; border-top: 1px solid var(--ink-brown); }
        .footer-ornament { color: var(--ink-gold); font-size: 1.5rem; margin-bottom: 1rem; }
        .footer-text { font-family: 'Special Elite', monospace; font-size: 0.75rem; color: var(--ink-faded); letter-spacing: 0.1em; line-height: 2; }
        .footer-link { color: var(--ink-gold); text-decoration: none; border-bottom: 1px dotted var(--ink-gold); }
        .footer-link:hover { color: var(--ink-cream); }

        /* Back to Top */
        .back-to-top {
            position: fixed;
            bottom: 2rem; right: 2rem;
            width: 50px; height: 50px;
            background: var(--parchment-mid);
            border: 1px solid var(--ink-gold);
            color: var(--ink-gold);
            font-size: 1.5rem;
            cursor: pointer;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.3s ease;
            z-index: 50;
        }
        .back-to-top.visible { opacity: 1; transform: translateY(0); }
        .back-to-top:hover { background: var(--ink-gold); color: var(--parchment-dark); }

        /* Responsive */
        @media (max-width: 768px) {
            .book-container { padding: 1rem; }
            .hero-title { font-size: 2.2rem; }
            .hero-translations { 
                flex-direction: column; 
                gap: 1rem; 
            }
            .hero-translation:first-child::after { display: none; }
            .hero-translation { padding: 0; }
            .hero-translation-arabic { font-size: 1.3rem; }
            .hero-translation-tamil { font-size: 1.1rem; }
            .hero-institution-text { font-size: 0.6rem; }
            .toc-timeline::before { left: 20px; }
            .toc-item { width: 100%; padding-left: 50px !important; padding-right: 1rem !important; text-align: left !important; margin-left: 0 !important; }
            .toc-item::before { left: 12px !important; right: auto !important; }
            .chapter-title-bilingual { flex-direction: column; gap: 0.5rem; }
            .chapter-number { font-size: 4rem; }
            .nav-links { display: none; }
            .glossary-btn { bottom: 1rem; left: 1rem; padding: 0.8rem 1rem; font-size: 0.7rem; }
            .glossary-item { grid-template-columns: 1fr; }
            .term-tooltip { min-width: 200px; left: 0; transform: translateX(0) scale(0.9); }
            .term-hover:hover .term-tooltip { transform: translateX(0) scale(1); }
            .term-tooltip::after { left: 20px; transform: none; }
            .media-full { margin: 2rem -1rem; }
            .fellows-grid { grid-template-columns: 1fr; }
        }
        /*
/* Newspaper Slideshow Styles */
.newspaper-slideshow {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
    background: var(--parchment-mid);
    border: 1px solid var(--ink-brown);
    padding: 1rem;
}

.slideshow-header {
    font-family: 'Special Elite', monospace;
    font-size: 0.8rem;
    color: var(--ink-faded);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ink-brown);
}

.slideshow-container {
    position: relative;
    overflow: hidden;
}

.slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    background: var(--parchment-dark);
    border: 1px solid var(--ink-brown);
}

.slide-caption {
    padding: 1rem;
    text-align: center;
}

.slide-caption-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--ink-gold);
    margin-bottom: 0.5rem;
}

.slide-caption-source {
    font-family: 'IM Fell English', serif;
    font-size: 0.85rem;
    color: var(--ink-faded);
    font-style: italic;
}

.slide-caption-description {
    font-family: 'IM Fell English', serif;
    font-size: 0.9rem;
    color: var(--ink-cream);
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* Navigation Arrows */
.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--parchment-dark);
    border: 1px solid var(--ink-gold);
    color: var(--ink-gold);
    padding: 1rem 0.75rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.slideshow-nav:hover {
    background: var(--ink-gold);
    color: var(--parchment-dark);
}

.slideshow-nav.prev {
    left: 0.5rem;
}

.slideshow-nav.next {
    right: 0.5rem;
}

/* Slide Counter / Dots */
.slideshow-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ink-brown);
}

.slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ink-brown);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slideshow-dot.active {
    background: var(--ink-gold);
    transform: scale(1.2);
}

.slideshow-dot:hover {
    background: var(--ink-faded);
}

.slideshow-counter {
    font-family: 'Special Elite', monospace;
    font-size: 0.75rem;
    color: var(--ink-faded);
    text-align: center;
    margin-top: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .newspaper-slideshow {
        margin: 1rem;
    }
    
    .slideshow-nav {
        padding: 0.5rem;
        font-size: 1rem;
    }
    
    .slide-image {
        max-height: 350px;
    }
}





