/* ==========================================
   PAPER THEME & DARK MODE VARIABLES
========================================== */
:root {
    --bg: #fdfdfc; 
    --ink: #1a1a1a; 
    --ink-light: #555555;
    --accent: #7366ff;
    --border: #eaeaea;
    --paper-card: #ffffff;
    --nav-bg: rgba(253, 253, 252, 0.95);
}

[data-theme="dark"] {
    --bg: #121212; 
    --ink: #e4e4e4; 
    --ink-light: #a0a0a0;
    --accent: #9084ff;
    --border: #333333;
    --paper-card: #1e1e1e;
    --nav-bg: rgba(18, 18, 18, 0.98);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Rubik', sans-serif; background: var(--bg); color: var(--ink); overflow-x: hidden; transition: background 0.3s, color 0.3s; }
h1, h2, h3 { font-family: 'Lora', serif; color: var(--ink); line-height: 1.2; }
a { text-decoration: none; color: inherit; transition: 0.2s; }

/* ==========================================
   SPECIAL SCROLL ANIMATIONS (Reversible)
========================================== */
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.slide-left { opacity: 0; transform: translateX(-80px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.slide-right { opacity: 0; transform: translateX(80px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }

.reveal.active, .slide-left.active, .slide-right.active { opacity: 1; transform: translate(0, 0); }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.3s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.floating-mascot { animation: float 6s ease-in-out infinite; }

/* ==========================================
   NAVIGATION
========================================== */
nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; max-width: 1200px; margin: 0 auto; position: sticky; top: 0; background: var(--nav-bg); z-index: 1000; backdrop-filter: blur(10px); }
.logo { font-size: 1.5rem; font-weight: 700; font-family: 'Lora', serif; display: flex; align-items: center; }
.nav-controls { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 20px; font-weight: 500; align-items: center; }
.nav-links a:hover { color: var(--accent); }

#theme-toggle-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 5px; }
#mobile-menu-btn { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--ink); }

/* ==========================================
   LAYOUT STRUCTURE
========================================== */
section { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 60px 5%; }
.container { max-width: 1100px; width: 100%; display: flex; align-items: center; gap: 50px; }

.text-content { flex: 1; }
.text-content h1 { font-size: 4rem; margin-bottom: 20px; }
.text-content h2 { font-size: 3rem; margin-bottom: 20px; }
.text-content p { font-size: 1.2rem; color: var(--ink-light); margin-bottom: 30px; line-height: 1.8; }

.image-content { flex: 1; display: flex; justify-content: center; }
.image-content img { width: 100%; max-width: 400px; }

.btn { display: inline-block; padding: 15px 30px; background: var(--ink); color: var(--bg); border-radius: 8px; font-weight: bold; transition: 0.2s; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.btn-outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); }

/* Elements */
.articles-section { max-width: 1200px; margin: 0 auto; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 30px; }
.paper-card { background: var(--paper-card); border: 1px solid var(--border); padding: 25px; border-radius: 12px; transition: 0.3s; display: flex; flex-direction: column; }
.paper-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.card-tag { font-size: 0.8rem; color: var(--accent); margin-bottom: 10px; font-weight: 700; text-transform: uppercase;}

.faq-item { background: var(--paper-card); border: 1px solid var(--border); border-radius: 12px; padding: 25px; margin-bottom: 15px; transition: 0.3s; }
.faq-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.faq-item h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--ink); }
.faq-item p { color: var(--ink-light); line-height: 1.6; }
.faq-item a { color: var(--accent); text-decoration: underline; }

.seo-hub { background: var(--paper-card); border-top: 1px solid var(--border); padding: 80px 5%; text-align: center; }
.seo-links { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 40px; }
.seo-card { border: 1px solid var(--border); padding: 25px; border-radius: 12px; width: 300px; text-align: left; transition: 0.3s; }
.seo-card:hover { border-color: var(--accent); transform: translateY(-5px); }

footer { text-align: center; padding: 40px; color: var(--ink-light); font-size: 0.9rem; }
footer a { margin: 0 10px; text-decoration: underline; }

/* ==========================================
   MOBILE RESPONSIVENESS (Image on Top Fix)
========================================== */
@media (max-width: 900px) {
    /* Forces mascots to ALWAYS be on top of text */
    .container { flex-direction: column; text-align: center; }
    .image-content { order: -1; margin-bottom: 20px; }
    .text-content { order: 2; }
    
    .text-content h1 { font-size: 2.8rem; }
    .text-content h2 { font-size: 2.2rem; }

    /* Mobile Nav */
    #mobile-menu-btn { display: block; }
    .nav-links { 
        display: none; flex-direction: column; position: absolute; 
        top: 75px; left: 0; right: 0; background: var(--nav-bg); 
        padding: 20px; border-bottom: 1px solid var(--border); box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    .nav-links.active { display: flex; }
}