/* ==========================================================================
   Modern Tech / Light Space Design System (Reverted to Bright Style)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Rajdhani:wght@500;600;700&family=Syncopate:wght@400;700&display=swap');

:root {
    /* Color Palette - Bright Nordic Style */
    --bg-color: #fdfdfd;
    --bg-surface: rgba(255, 255, 255, 0.95);
    --bg-overlay: rgba(248, 250, 252, 0.9);

    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(148, 163, 184, 0.15);

    /* Vibrant Accents */
    --brand-primary: #1e40af; /* Deep Royal Blue */
    --brand-accent: #3b82f6; /* Bright Sky Blue */
    --brand-accent-hover: #2563eb;
    --brand-vibrant: #7c3aed;

    --gradient-primary: linear-gradient(135deg, #1e40af, #3b82f6);
    --gradient-text: linear-gradient(135deg, #fff 10%, #38bdf8 60%, #818cf8 100%);
    --gradient-glow: linear-gradient(135deg, rgba(30, 64, 175, 0.1), rgba(59, 130, 246, 0.1));

    /* UI Tokens */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --card-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);

    /* Typography */
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-display: 'Syncopate', sans-serif;
}

/* Global Reset Overrides */
html, body, body.light-theme {
    background-color: var(--bg-color) !important;
    color: var(--text-main) !important;
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(30, 64, 175, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.02) 0%, transparent 40%) !important;
}

/* Base Headings */
h1, h2, h3, h4, .logo-text, .section-title {
    font-family: var(--font-heading) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main) !important;
}

.gradient-text {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: var(--brand-primary) !important;
    color: var(--brand-primary) !important;
    display: inline-block;
}

/* Navbar Restoration */
.navbar.scrolled, body:not(.homepage) .navbar, .navbar--hero.scrolled {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(30, 64, 175, 0.1) !important;
    box-shadow: 0 4px 30px rgba(15, 23, 42, 0.05);
}

.nav-links a {
    color: var(--text-main);
    font-weight: 500;
}

/* Ensure white links over dark hero when NOT scrolled */
.navbar--hero:not(.scrolled) .nav-links a {
    color: rgba(255, 255, 255, 0.85) !important;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--brand-primary) !important;
}

/* Hero Enhancements */
.hero-section {
    background: #020912 !important; /* Deep dark hero */
}

.hero-section::before {
    background: url('../assets/hero_banner.svg') no-repeat !important;
    background-size: cover !important;
}

.hero-overlay {
    background: linear-gradient(to bottom, rgba(2, 9, 18, 0.15), rgba(2, 9, 18, 0.85)) !important;
}

.hero-title {
    font-family: var(--font-display) !important;
    color: #ffffff !important;
    letter-spacing: -2px !important;
    line-height: 1.1 !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Lightbox Restoration */
#cert-lightbox > div {
    background: #fff !important; /* Force white for doc background */
    border: none !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}
#cert-lightbox-title { color: var(--text-main) !important; }

/* Glass Components */
.glass-card {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px !important;
    transition: all 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: var(--brand-primary) !important;
    box-shadow: var(--card-shadow) !important;
}

/* Utility Overrides */
p, .section-desc {
    color: var(--text-muted) !important;
    line-height: 1.8;
}

.tag, .detail-tag {
    background: rgba(30, 64, 175, 0.08) !important;
    border: 1.5px solid var(--brand-primary) !important;
    color: var(--brand-primary) !important;
    font-weight: 600;
}

/* Footer Reversion */
.footer {
    background: #f1f5f9 !important; /* Light Slate Gray */
    border-top: 1px solid var(--border-color);
    padding: 6rem 0 3rem !important;
}

.footer-brand p, .footer-contact p, .footer-bottom p {
    color: var(--text-muted) !important;
    font-size: 0.95rem;
}

.footer-links h3, .footer-contact h3 {
    color: var(--text-main) !important;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.footer-links ul li a {
    color: var(--text-muted) !important;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--brand-primary) !important;
}

.footer-contact a {
    color: var(--brand-primary) !important;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.btn-outline {
    border: 2px solid var(--brand-primary) !important;
    color: var(--brand-primary) !important;
    background: transparent !important;
}

.btn-outline:hover {
    background: var(--brand-primary) !important;
    color: #fff !important;
}

/* High-End Page Headers */
.page-header {
    padding: 10rem 0 6rem;
    background: radial-gradient(circle at 10% 90%, #1e4ed8, #020912);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 250px; /* Taller fade for smoother transition */
    background: linear-gradient(to top, var(--bg-color) 0%, rgba(255,255,255,0.4) 40%, transparent 100%);
    pointer-events: none;
}

.page-header p {
    color: rgba(255, 255, 255, 0.85) !important; /* High-contrast white for dark backgrounds */
    position: relative;
    z-index: 2;
}

.page-header .tag {
    margin-bottom: 2rem !important;
    display: inline-block;
}

.page-header .hero-title {
    color: #fff !important;
    margin: 0 !important;
    line-height: 1.2;
}

.page-header .gradient-text, .article-header .gradient-text, .hero-section .hero-title .gradient-text {
    /* Solid white for dark headers */
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.hero-title, .hero-subtitle, .page-header p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Elegant Article Headers */
.article-header {
    padding: 10rem 0 6rem;
    background: radial-gradient(circle at 50% 100%, #1e4ed8, #020912);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.article-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 250px;
    background: linear-gradient(to top, var(--bg-color) 0%, rgba(255,255,255,0.4) 40%, transparent 100%);
    pointer-events: none;
}

.article-meta {
    display: flex;
    gap: 2rem;
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.article-header .hero-title {
    color: #fff !important;
    margin: 0 !important;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}
