/* ==========================================================================
   BITIGEY DIGITAL LITERATURE PLATFORM - UNIFIED DESIGN SYSTEM (css/main.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. COLOR PALETTE & DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
    /* Brand Accent Colors */
    --primary: #7C3AED;
    --primary-hover: #6D28D9;
    --primary-light: #A78BFA;
    --primary-soft: rgba(124, 58, 237, 0.12);
    --secondary: #F59E0B;
    --secondary-hover: #D97706;
    --accent: #EC4899;

    /* Dark Theme (Default) */
    --bg-body: #07070c;
    --bg-surface: #111118;
    --bg-surface-elevated: #161622;
    --bg-glass: rgba(17, 17, 24, 0.85);
    --border-color: #1e1e2a;
    --border-hover: #2d2d3f;

    /* Text Colors */
    --text-primary: #eceff4;
    --text-secondary: #a0a5b5;
    --text-muted: #8b8f9a;
    --text-on-primary: #FFFFFF;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #7C3AED 0%, #3B82F6 50%, #EC4899 100%);
    --gradient-gold: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --gradient-card-glow: radial-gradient(circle at top right, rgba(124, 58, 237, 0.15), transparent 70%);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    /* Shadows & Elevations */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 25px rgba(124, 58, 237, 0.25);

    /* Radii & Transitions */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Overrides */
body.dark-mode {
    --bg-body: #0B0F17;
    --bg-surface: #131B2E;
    --bg-surface-elevated: #1E293B;
    --bg-glass: rgba(19, 27, 46, 0.88);
    --border-color: #1E293B;
    --border-hover: #334155;

    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(167, 139, 250, 0.2);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}

button {
    cursor: pointer;
    background: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography Utilities */
h1, h2, h3, .font-serif {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.25;
}

.gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   3. LAYOUT & CONTAINERS
   -------------------------------------------------------------------------- */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.section {
    padding: 64px 0;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* --------------------------------------------------------------------------
   4. NAVIGATION BAR (STUNNING GLASSMORPHIC NAVBAR)
   -------------------------------------------------------------------------- */
.header-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-hero);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-size: 0.9rem;
    box-shadow: var(--shadow-glow);
}

.logo span {
    color: var(--primary);
}

/* Nav Links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 18px;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--text-secondary);
    position: relative;
    padding: 6px 0;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Icon Buttons */
.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    font-size: 0.85rem;
}

.btn-icon:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 16px;
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #FFF;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
    display: none;
    font-size: 1.4rem;
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   5. MOBILE DRAWER NAVIGATION
   -------------------------------------------------------------------------- */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-surface);
    z-index: 2001;
    box-shadow: var(--shadow-lg);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer::-webkit-scrollbar {
    width: 5px;
}
.drawer::-webkit-scrollbar-thumb {
    background: rgba(155, 89, 182, 0.4);
    border-radius: 10px;
}

.drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-links a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.drawer-links a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   6. HERO & FEATURED SECTIONS
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding: 80px 0 60px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.18) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 36px;
}

/* --------------------------------------------------------------------------
   7. CARDS & GRID SYSTEM
   -------------------------------------------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-author-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.card-title {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    transition: var(--transition);
}

.card:hover .card-title {
    color: var(--primary);
}

.card-snippet {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Category Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--primary-soft);
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   8. FOOTER DESIGN
   -------------------------------------------------------------------------- */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 64px 0 32px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 320px;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   9. MEDIA QUERIES (RESPONSIVE ADAPTABILITY)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero-title { font-size: 2.75rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
    .nav-menu { display: none; }
    .mobile-toggle { display: block !important; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .section { padding: 44px 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
    .btn { padding: 6px 12px; font-size: 0.78rem; }
}
