:root {
    --bg: #0a0a0a;
    --gold: #b8942a;
    --paper-bg: #f1e9d2;
    --ink: #1a1410;
    --glass: rgba(25, 25, 25, 0.8);
    --border: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
}

.bg-blobs { position: fixed; top: 0; width: 100%; height: 100%; z-index: -1; filter: blur(100px); opacity: 0.15; }
.blob { position: absolute; border-radius: 50%; background: var(--gold); }
.b1 { width: 300px; height: 300px; top: -50px; right: -50px; }
.b2 { width: 250px; height: 250px; bottom: 10%; left: -50px; background: #444; }

.container { max-width: 1250px; margin: 0 auto; padding: 0 15px; }

/* Navbar */
.nav-bar { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px 5%; background: var(--glass); backdrop-filter: blur(15px);
    position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--border);
}
.logo { font-family: 'Noto Serif Oriya'; font-weight: 700; font-size: 1.3rem; color: var(--gold); }
.nav-icon { color: var(--gold); font-size: 1.2rem; }

/* Hero */
.hero-glass {
    background: var(--glass); border-radius: 30px; border: 1px solid var(--border);
    padding: 30px; display: flex; flex-direction: column; align-items: center; gap: 30px; margin-top: 20px; text-align: center;
}
@media (min-width: 768px) {
    .hero-glass { flex-direction: row; text-align: left; padding: 50px; }
}

.hero-text h1 { font-family: 'Noto Serif Oriya'; font-size: clamp(2rem, 5vw, 3.5rem); margin: 15px 0; }
.hero-text p { color: #aaa; margin-bottom: 30px; font-size: 1rem; }
.badge { color: var(--gold); font-size: 0.65rem; letter-spacing: 3px; font-weight: 800; }
.btn-primary { background: var(--gold); color: #000; padding: 12px 30px; border-radius: 50px; text-decoration: none; font-weight: 800; display: inline-block; }

/* 3D Visual */
.hero-visual { perspective: 1000px; padding: 20px; }
.card-3d-wrap { position: relative; width: 220px; height: 320px; transform-style: preserve-3d; transition: transform 0.1s ease-out; }
.card-3d-inner { width: 100%; height: 100%; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.6); border: 2px solid var(--gold); }
.card-3d-inner img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* --- Archive Reader Box (The Main Part) --- */
.archive-wrapper { 
    display: flex; flex-direction: column; height: 110vh; margin: 40px 0; 
    border-radius: 20px; overflow: hidden; border: 1px solid var(--border); background: #000; 
}
@media (min-width: 992px) {
    .archive-wrapper { flex-direction: row; }
}

.sidebar { 
    width: 100%; height: 35%; background: #080808; border-bottom: 1px solid var(--border);
    display: flex; flex-direction: column; flex-shrink: 0;
}
@media (min-width: 992px) {
    .sidebar { width: 300px; height: 100%; border-bottom: none; border-right: 1px solid var(--border); }
}

.sidebar-top { padding: 15px; }
.sidebar-top h3 { color: var(--gold); font-family: 'Noto Serif Oriya'; font-size: 1.1rem; margin-bottom: 8px; }
#pageSearch { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #333; background: #1a1a1a; color: #fff; outline: none; }

.page-menu { flex: 1; overflow-y: auto; list-style: none; }
.page-menu li { padding: 12px 20px; border-bottom: 1px solid #1a1a1a; cursor: pointer; color: #888; font-size: 0.85rem; }
.page-menu li.active { color: var(--gold); background: rgba(184, 148, 42, 0.1); border-left: 4px solid var(--gold); }

.reader { flex: 1; padding: 15px; background: #050505; display: flex; justify-content: center; overflow: hidden; }

.vintage-paper {
    background: var(--paper-bg); color: var(--ink);
    width: 100%; max-width: 800px; height: 100%;
    border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: flex; flex-direction: column; border: 1px solid #d4c5a3;
}

/* Scrollable area inside paper */
.paper-content-scroll { 
    flex: 1; overflow-y: auto; padding: 30px 20px; 
    scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.paper-content-scroll::-webkit-scrollbar { width: 5px; }
.paper-content-scroll::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }

.paper-title { font-family: 'Noto Serif Oriya'; font-size: 1.5rem; color: #856404; font-weight: 700; margin-bottom: 10px; }
.paper-text { font-family: 'Noto Serif Oriya', serif; font-size: 1.15rem; line-height: 1.8; text-align: justify; white-space: pre-line; }

.paper-footer { 
    padding: 15px; border-top: 1px solid rgba(0,0,0,0.08); 
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.1);
}
.paper-btn { background: #3b241e; color: #fff; border: none; padding: 8px 18px; border-radius: 5px; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.page-num-display { font-size: 0.9rem; font-weight: 700; color: #3b241e; }

/* Gallery */
.masonry-grid { column-count: 2; column-gap: 15px; padding: 30px 0; }
@media (min-width: 768px) { .masonry-grid { column-count: 3; } }
.m-item { margin-bottom: 15px; border-radius: 15px; overflow: hidden; border: 1px solid var(--border); }
.m-item img { width: 100%; display: block; filter: grayscale(30%); transition: 0.4s; }
.m-item:hover img { filter: grayscale(0%); transform: scale(1.03); }

footer { text-align: center; padding: 40px 0; border-top: 1px solid var(--border); color: #555; font-size: 0.75rem; }

.reveal { opacity: 0; transform: translateY(20px); transition: 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }