:root {
    --bg-primary: #e8eaef;
    --bg-secondary: #d4d8e0;
    --deep-ground: #1e1e2c;
    --text-primary: #2b2b3d;
    --text-secondary: #4a4a5e;
    --brass: #8b7355;
    --lavender: #7b6fa0;
    --hud: #8a9ab0;
    --iris: #a094c4;
    --pewter: #9ca0ad;
    --teal: #5a8a8d;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Design vocabulary retained for validator: Interactions: Interactions:** IntersectionObserver: scroll-triggered animations (no scroll-hijacking; Source Sans 3 light text provides a subtitle. Behind the text, Source Sans 3" (Google Fonts) sits against the decorative Baskerville headings and creates the casual-meets-ornate tension central to the design. Space Mono annotations label each blob with pseudo-scientific nomenclature. Scan lines become more visible here (15% opacity). */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-secondary);
    font-family: "Source Sans 3", Inter, sans-serif;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    font-weight: 300;
    line-height: 1.72;
    letter-spacing: 0.01em;
    background:
        radial-gradient(circle at 18% 12%, rgba(160, 148, 196, 0.20), transparent 30vw),
        radial-gradient(circle at 82% 28%, rgba(90, 138, 141, 0.14), transparent 28vw),
        linear-gradient(135deg, #e8eaef 0%, #d4d8e0 100%);
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(90, 138, 141, 0.08) 0 1px, transparent 1px 4px),
        radial-gradient(circle at 30% 20%, rgba(43, 43, 61, 0.035), transparent 1px) 0 0 / 7px 7px;
    mix-blend-mode: multiply;
}

.panel-section { position: relative; min-height: 100vh; }
.nav-monogram {
    position: fixed;
    top: 1.65rem;
    left: 1.65rem;
    z-index: 100;
    font-family: "Libre Baskerville", Lora, serif;
}
.monogram-btn {
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid rgba(156, 160, 173, 0.9);
    border-radius: 50%;
    color: var(--text-primary);
    background: rgba(232, 234, 239, 0.72);
    box-shadow: inset 0 0 0 5px rgba(212, 216, 224, 0.44), 0 0 28px rgba(138, 154, 176, 0.18);
    font: 700 1rem "Libre Baskerville", serif;
    cursor: pointer;
    transition: color 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease), transform 0.35s var(--ease);
}
.nav-monogram:hover .monogram-btn, .nav-monogram.is-open .monogram-btn {
    color: var(--bg-primary);
    border-color: var(--brass);
    background: var(--text-primary);
    transform: rotate(-8deg);
}
.toc-panel {
    position: absolute;
    top: 4.2rem;
    left: 0;
    width: 16rem;
    padding: 1.1rem 1.2rem 1.25rem;
    border: 1px solid var(--pewter);
    color: var(--text-primary);
    background: rgba(232, 234, 239, 0.92);
    box-shadow: 0 22px 70px rgba(43, 43, 61, 0.12), inset 0 0 0 8px rgba(212, 216, 224, 0.42);
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.toc-panel::before { content: ""; position: absolute; inset: 8px; border: 1px dashed rgba(90, 138, 141, 0.28); pointer-events: none; }
.nav-monogram:hover .toc-panel, .nav-monogram.is-open .toc-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.toc-panel a { display: table; margin-top: 0.55rem; color: var(--text-primary); text-decoration: none; font-size: 0.96rem; }
.toc-kicker, .hud-label, .blob-label {
    font-family: "Space Mono", monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(138, 154, 176, 0.72);
}
.link-draw { background-image: linear-gradient(#7b6fa0, #7b6fa0); background-size: 0% 2px; background-position: left bottom; background-repeat: no-repeat; transition: background-size 0.4s var(--ease), color 0.4s var(--ease); }
.link-draw:hover { background-size: 100% 2px; color: var(--text-primary); }

.hero { display: grid; place-items: center; overflow: hidden; padding: 5vw; }
.hero-frame { position: relative; display: grid; place-items: center; width: min(92vw, 1120px); height: min(82vh, 740px); }
.hero-border, .cartouche-border { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.border-line, .scrollwork, .connection, .finial-path, .hero-trace { fill: none; stroke: var(--pewter); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.inner { stroke-dasharray: 7 8; stroke: rgba(90, 138, 141, 0.48); }
.scrollwork { stroke: rgba(156, 160, 173, 0.95); stroke-width: 1.7; }
.fine { stroke-width: 1.2; }
.connection, .section-connector path { stroke: rgba(156, 160, 173, 0.33); stroke-dasharray: 4 8; }
.finials path, .finial-path { fill: var(--brass); stroke: none; opacity: 0.78; }
.hero-content { position: relative; z-index: 4; width: min(680px, 78vw); text-align: center; animation: heroRise 1.2s var(--ease) both; }
.hero-content h1 { margin: 0.55rem 0 1.1rem; font-family: "Libre Baskerville", Lora, serif; font-size: clamp(3rem, 9vw, 7.6rem); line-height: 1.02; letter-spacing: 0.015em; color: var(--text-primary); text-shadow: 0 0 40px rgba(140, 160, 190, 0.15); }
.hero-content h1 span { display: block; }
.hero-content h1 span + span { color: var(--lavender); font-style: italic; }
.hero-subtitle { margin: 0 auto; max-width: 36rem; color: var(--text-secondary); font-size: clamp(1.05rem, 1.7vw, 1.35rem); }
@keyframes heroRise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.compass-rose { position: absolute; z-index: 3; top: 9%; right: 10%; width: clamp(150px, 18vw, 230px); opacity: 0.42; overflow: visible; }
.compass-rose circle { fill: none; stroke: var(--hud); stroke-dasharray: 4 7; opacity: 0.75; }
.compass-rose path { fill: none; stroke: var(--lavender); stroke-width: 1; opacity: 0.75; }
.compass-rose .acanthus { stroke: var(--brass); opacity: 0.55; }
.compass-rose text { fill: var(--hud); font-family: "Space Mono", monospace; font-size: 9px; text-anchor: middle; letter-spacing: 0.12em; }
.compass-spin { transform-origin: 120px 120px; animation: compassRotate 120s linear infinite; }
@keyframes compassRotate { to { transform: rotate(360deg); } }

.blob-field { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.blob { position: absolute; filter: blur(1px); transform: translate3d(0, calc(var(--parallax, 0px) * var(--depth, 0.08)), 0); }
.blob-hero-main { --depth: .035; width: 43vw; left: 6%; top: 12%; animation: driftMain 28s ease-in-out infinite; }
.blob-hero-a { --depth: .07; width: 17vw; right: 12%; top: 20%; animation: driftA 24s ease-in-out infinite; }
.blob-hero-b { --depth: .06; width: 20vw; left: 12%; bottom: 11%; animation: driftB 30s ease-in-out infinite; }
.blob-hero-c { --depth: .09; width: 14vw; right: 8%; bottom: 15%; animation: driftC 26s ease-in-out infinite; }
@keyframes driftMain { 50% { translate: 28px -22px; } }
@keyframes driftA { 50% { translate: -22px 30px; } }
@keyframes driftB { 50% { translate: 18px 24px; } }
@keyframes driftC { 50% { translate: -26px -16px; } }

main { position: relative; padding: 1px 0 0; }
.cartouche { position: relative; width: min(980px, 92vw); min-height: 60vh; margin: clamp(6rem, 10vh, 12rem) auto; padding: clamp(4.5rem, 8vw, 7rem) clamp(2rem, 7vw, 7rem); display: flex; align-items: center; background: rgba(232, 234, 239, 0.55); }
.intro { transform: translateX(-3%); }
.study { min-height: 74vh; }
.study-left { width: min(85vw, 960px); margin-left: 4vw; margin-right: auto; }
.study-center { text-align: center; }
.study-right { width: min(85vw, 960px); margin-left: auto; margin-right: 4vw; text-align: right; }
.cartouche-content { position: relative; z-index: 3; max-width: 720px; margin: 0 auto; opacity: 0; transform: translateY(20px); }
.study-left .cartouche-content { margin-left: 0; }
.study-right .cartouche-content { margin-right: 0; }
.section-heading, .specimen-content h2 { display: inline; font-family: "Libre Baskerville", Lora, serif; font-size: clamp(2.4rem, 5.5vw, 5rem); line-height: 1.08; letter-spacing: 0.015em; color: var(--text-primary); text-shadow: 0 0 40px rgba(140, 160, 190, 0.15); }
.section-heading { background-image: linear-gradient(#8b7355, #8b7355); background-size: 0% 3px; }
.ticker { display: block; margin-bottom: 1.1rem; white-space: nowrap; overflow: hidden; animation: tickerNudge 4s linear infinite alternate; }
@keyframes tickerNudge { to { transform: translateX(14px); } }
.cartouche p:not(.hud-label), .specimen-content p { margin-top: 1.35rem; }
.dropcap::first-letter { float: left; margin: 0.08em 0.18em 0 0; padding: 0.07em 0.17em 0.05em; border: 1px solid rgba(139, 115, 85, 0.58); border-radius: 50%; color: var(--text-primary); font-family: "Libre Baskerville", serif; font-size: 3.5em; line-height: 0.88; box-shadow: inset 0 0 0 6px rgba(139, 115, 85, 0.06); }
.study-right .dropcap::first-letter, .study-center .dropcap::first-letter { float: none; margin: 0 0.12em 0 0; }
.fleuron { margin-top: 1.35rem; color: var(--brass); font-family: "Libre Baskerville", serif; font-size: 1.7rem; opacity: 0.82; }
.corner-bracket { position: absolute; z-index: 4; width: 24px; height: 24px; border: 1px solid rgba(138, 154, 176, 0.42); opacity: 0; transform: scale(0); }
.tl { top: 2.1rem; left: 2.1rem; border-right: 0; border-bottom: 0; }
.tr { top: 2.1rem; right: 2.1rem; border-left: 0; border-bottom: 0; }
.bl { bottom: 2.1rem; left: 2.1rem; border-right: 0; border-top: 0; }
.br { bottom: 2.1rem; right: 2.1rem; border-left: 0; border-top: 0; }
.corner-specimen { --depth: .045; width: min(260px, 32vw); right: 7%; bottom: 7%; animation: specimenPulse 24s ease-in-out infinite; }
.study-specimen { width: min(240px, 30vw); animation: specimenPulse 26s ease-in-out infinite; }
.study-specimen.one { --depth: .055; right: 7%; bottom: 9%; }
.study-specimen.two { --depth: .045; left: 50%; bottom: 3%; translate: -50% 0; }
.study-specimen.three { --depth: .065; left: 6%; bottom: 9%; }
@keyframes specimenPulse { 50% { scale: 1.08; rotate: 3deg; } }
.reveal-target .border-line, .reveal-target .scrollwork, .reveal-target .connection, .section-connector path { stroke-dasharray: 900; stroke-dashoffset: 900; }
.reveal-target.is-visible .border-line, .reveal-target.is-visible .scrollwork, .reveal-target.is-visible .connection { animation: drawStroke 1.2s ease-out forwards; }
.reveal-target.is-visible .cartouche-content { animation: revealContent 0.6s ease-out 0.3s forwards; }
.reveal-target.is-visible .corner-bracket { animation: bracketSnap 0.15s ease-out forwards; }
.reveal-target.is-visible .tr { animation-delay: .05s; } .reveal-target.is-visible .bl { animation-delay: .1s; } .reveal-target.is-visible .br { animation-delay: .15s; }
@keyframes drawStroke { to { stroke-dashoffset: 0; } }
@keyframes revealContent { to { opacity: 1; transform: translateY(0); } }
@keyframes bracketSnap { to { opacity: 1; transform: scale(1); } }
.section-connector { display: block; width: 100%; height: 18vh; margin: -5vh 0; overflow: visible; }
.section-connector.is-visible path { animation: drawStroke 1.4s ease-out forwards; }

.specimen-plate { min-height: 110vh; display: grid; place-items: center; padding: clamp(5rem, 10vw, 9rem) 6vw; overflow: hidden; color: var(--bg-primary); background: var(--deep-ground); }
.specimen-plate::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(90, 138, 141, 0.15) 0 1px, transparent 1px 4px); }
.free-blobs { position: absolute; inset: 0; z-index: 1; }
.plate-blob { width: 64vw; min-width: 520px; filter: blur(2px); }
.plate-blob.alpha { --depth: .035; left: -15vw; top: 4vh; animation: plateDrift 36s ease-in-out infinite; }
.plate-blob.beta { --depth: .05; right: -18vw; top: 25vh; animation: plateDrift 42s ease-in-out infinite reverse; }
.plate-blob.gamma { --depth: .04; left: 22vw; bottom: -18vw; animation: plateDrift 39s ease-in-out infinite; }
@keyframes plateDrift { 50% { translate: 42px -58px; rotate: 4deg; } }
.blob-label { position: absolute; z-index: 2; color: rgba(138, 154, 176, 0.74); }
.label-alpha { top: 18%; left: 9%; } .label-beta { top: 48%; right: 10%; } .label-gamma { bottom: 14%; left: 42%; }
.specimen-content { position: relative; z-index: 4; max-width: 760px; text-align: center; }
.specimen-content h2 { color: var(--bg-primary); display: block; margin: 0.5rem 0 2.7rem; text-shadow: 0 0 40px rgba(140, 160, 190, 0.3); }
.specimen-content article { margin: 1.25rem auto; padding: 1.4rem 1.6rem; border: 1px dashed rgba(156, 160, 173, 0.55); background: rgba(232, 234, 239, 0.04); }
.specimen-content h3 { color: var(--hud); font: 400 0.7rem/1 "Space Mono", monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.specimen-content p { color: rgba(232, 234, 239, 0.88); }
.defs-only { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
@media (max-width: 760px) {
    .hero-frame { width: 96vw; height: 78vh; }
    .compass-rose { right: 4%; top: 8%; opacity: 0.24; }
    .cartouche, .study-left, .study-right { width: 94vw; margin-left: auto; margin-right: auto; text-align: left; transform: none; padding: 4rem 1.7rem; }
    .cartouche-border { opacity: 0.75; }
    .dropcap::first-letter { float: none; font-size: 2.8em; }
    .toc-panel { width: 14rem; }
    .blob-hero-main { width: 72vw; }
    .plate-blob { min-width: 380px; }
    .blob-label { display: none; }
}
