/* ===================================================
   Syed Ejaz Digital Library — Stitch Custom Styles
   "The Illuminated Archive" — v1.0
   =================================================== */

/* --- Material Symbols --- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --- Premium Gradient CTAs --- */
.gradient-cta {
    background: linear-gradient(135deg, #006a6a 0%, #0132c5 100%);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.gradient-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
}

.gradient-cta:hover::before {
    left: 100%;
}

/* --- Text Gradient --- */
.text-gradient {
    background: linear-gradient(135deg, #006a6a 0%, #0132c5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Gradient Accent / Button --- */
.gradient-accent,
.gradient-button,
.gradient-brand {
    background: linear-gradient(135deg, #006a6a 0%, #0132c5 100%);
}

/* --- Glass Navigation --- */
.glass-nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* --- Premium Frame (About page portrait) --- */
.premium-frame {
    position: relative;
    padding: 0.5rem;
    background: white;
    border: 1px solid rgba(0, 106, 106, 0.1);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.premium-frame:hover {
    box-shadow: 0 30px 80px -12px rgba(0, 109, 111, 0.18);
}

.premium-frame::after {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    bottom: 10px;
    left: 10px;
    border: 2px solid #006a6a;
    z-index: -1;
    opacity: 0.2;
    border-radius: 0.5rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.premium-frame:hover::after {
    opacity: 0.3;
    top: -14px;
    right: -14px;
}

html.dark .premium-frame {
    background: #1a1c1e;
    border-color: rgba(0, 109, 111, 0.2);
}

/* --- Nastaliq (Urdu typography) --- */
.nastaliq {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaliq', 'Urdu Typesetting', serif;
    line-height: 2.2;
    font-size: 1.1em;
}

/* --- Ambient Shadow --- */
.ambient-shadow {
    box-shadow: 0px 20px 40px rgba(25, 28, 29, 0.05);
}

/* --- Reader Gradient --- */
.reader-gradient {
    background: linear-gradient(135deg, #006a6a 0%, #0132c5 100%);
}

/* --- Glass Panel --- */
.glass-panel {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

html.dark .glass-panel {
    background: rgba(17, 19, 20, 0.85);
}

/* --- Gallery Card Hover --- */
.gallery-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(25, 28, 29, 0.08);
}

.gallery-card:hover img {
    transform: scale(1.05);
}

/* --- Mobile Menu Overlay --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* --- Mobile Menu Drawer --- */
.mobile-menu {
    position: fixed;
    top: 0; right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu a:hover {
    background: rgba(0, 106, 106, 0.08);
    padding-left: 2rem;
}

.mobile-menu a.active-link {
    color: #006a6a;
    background: rgba(0, 106, 106, 0.08);
    border-left: 3px solid #006a6a;
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    z-index: 100;
    transition: width 0.15s ease-out;
    border-radius: 0 3px 3px 0;
}

/* --- Smooth Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.animate-fade-in-up { animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.animate-fade-in-left { animation: fadeInLeft 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.animate-fade-in-right { animation: fadeInRight 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.animate-scale-in { animation: scaleIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.animate-float { animation: float 6s ease-in-out infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* --- Dark Mode Overrides --- */
html.dark body {
    background: #0F1113;
    color: #e1e3e4;
}

html.dark nav {
    background: rgba(15, 17, 19, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html.dark .mobile-menu {
    background: #1a1c1e;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c5cece; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #006a6a; }

html.dark ::-webkit-scrollbar-thumb { background: #3e4948; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #006a6a; }

/* --- Selection Colors --- */
::selection { background: rgba(0, 106, 106, 0.15); color: #1A1A2E; }
html.dark ::selection { background: rgba(0, 106, 106, 0.3); color: #fff; }

/* --- Focus Styles --- */
:focus-visible {
    outline: 2px solid #006a6a;
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- Responsive Typography --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem !important;
        line-height: 1.15 !important;
    }
}

/* --- Image Loading --- */
img { transition: opacity 0.4s ease; }

/* --- Button Press Effect --- */
.btn-press { transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.btn-press:active { transform: scale(0.97); }
