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

html {
    overflow-x: hidden;
}

body {
    background: #1e1a18;
    color: #e8d8c0;
    font-family: 'Merriweather', serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.15vw, 1.1rem);
    line-height: 1.9;
    overflow-x: hidden;
    position: relative;
    --amber-gold: #b8860b;
    --deep-gold: #8a6a08;
    --cool-teal: #5a9ea8;
    --bright-teal: #70b8c4;
}

/* Reading lamp */
.reading-lamp {
    position: fixed;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 240, 220, 0.03) 0%,
        rgba(184, 134, 11, 0.06) 30%,
        transparent 70%);
    pointer-events: none;
    z-index: 50;
    transform: translate(-50%, -50%);
    transition: left 0.08s linear, top 0.08s linear;
}

/* Gold thread bookmarks */
.bookmark {
    position: absolute;
    top: 0;
    width: 1px;
    background: rgba(184, 134, 11, 0.2);
    pointer-events: none;
    z-index: 1;
}

/* Entrance */
.entrance {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 5;
}

.entrance-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #e8d8c0;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: entranceFade 1.2s ease-out 1s forwards;
}

.entrance-japanese {
    font-family: 'Merriweather', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #a09080;
    margin-top: 12px;
    opacity: 0;
    animation: entranceFade 1s ease-out 1.8s forwards;
}

.entrance-subtitle {
    font-family: 'Fira Mono', monospace;
    font-size: 0.8rem;
    color: #5a9ea8;
    letter-spacing: 0.06em;
    margin-top: 20px;
    opacity: 0;
    animation: entranceFade 1s ease-out 2.5s forwards;
}

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

/* Lectern Sections */
.lectern-section {
    position: relative;
    padding: 20vh 0;
    z-index: 5;
}

/* Background numbers */
.bg-number {
    position: absolute;
    top: 50%;
    left: 8vw;
    transform: translateY(-50%);
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(4rem, 12vw, 10rem);
    color: rgba(232, 216, 192, 0.05);
    pointer-events: none;
    z-index: 0;
    line-height: 1;
}

.bg-number-right {
    left: auto;
    right: 8vw;
}

/* Lectern */
.lectern {
    max-width: 640px;
    padding: 2.5rem;
    background: #2a2420;
    border-bottom: 2px solid #b8860b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.lectern.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.lectern.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Lectern positioning */
.lectern-left {
    margin-left: 12vw;
}

.lectern-right {
    margin-left: auto;
    margin-right: 12vw;
}

.lectern-center {
    margin: 0 auto;
}

/* Lectern rules */
.lectern-rule-top {
    width: 100%;
    height: 1px;
    background: rgba(184, 134, 11, 0.3);
    margin-bottom: 24px;
}

.lectern-rule-bottom {
    width: 100%;
    height: 1px;
    background: rgba(184, 134, 11, 0.3);
    margin-top: 24px;
}

/* Lectern typography */
.lectern-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #e8d8c0;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.lectern-body {
    font-family: 'Merriweather', serif;
    font-weight: 300;
    color: #e8d8c0;
    margin-bottom: 16px;
}

.lectern-body strong {
    font-weight: 700;
    color: #e8d8c0;
}

/* Teal notation */
.teal-notation {
    font-family: 'Fira Mono', monospace;
    font-size: 0.85rem;
    color: #5a9ea8;
}

/* Block quote */
.lectern-quote {
    font-family: 'Merriweather', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 1.1rem;
    color: #a09080;
    padding-left: 2rem;
    border-left: 2px solid #5a9ea8;
    margin: 24px 0;
    line-height: 1.7;
}

.lectern-quote cite {
    display: block;
    font-size: 0.85rem;
    color: #70b8c4;
    margin-top: 8px;
    font-style: normal;
}

/* Syllogism diagram */
.syllogism-diagram {
    margin: 24px 0;
    overflow-x: auto;
}

.syllogism-svg {
    width: 100%;
    max-width: 600px;
    height: auto;
}

.syl-rect {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.syl-rect.visible {
    opacity: 1;
}

.syl-arrow {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1s ease-in-out;
}

.syl-arrow.drawn {
    stroke-dashoffset: 0;
}

/* Reading desk section - wider lamp */
.reading-desk-section {
    padding-bottom: 30vh;
}

/* Responsive */
@media (max-width: 768px) {
    .lectern-left,
    .lectern-right {
        margin-left: 5vw;
        margin-right: 5vw;
    }

    .lectern {
        padding: 1.5rem;
    }

    .lectern-section {
        padding: 12vh 0;
    }

    .bookmark {
        display: none;
    }

    .bg-number {
        font-size: 20vw;
    }
}
