/* ==========================================================================
   POSTS PAGE & MODAL TEMPLATE (Strict Dark Mode)
   ========================================================================== */

/* Strict Dark Mode Lock */
:root {
    color-scheme: dark;
}

.posts-body {
    background-color: #03060a !important; 
    color: #f8fafc !important;
    position: relative;
    overflow-x: hidden;
}

/* Enforce Monospace globally for the logs, but protect the Navigation Bar */
.posts-body *:not(i):not(.fa-solid):not(.fas):not(.fixed-nav-wrapper):not(.fixed-nav-wrapper *) {
    font-family: 'JetBrains Mono', 'Courier New', monospace !important;
}

.posts-body .hero-typography,
.posts-body .hero-typography span,
.posts-body h2, .posts-body h3 {
    font-family: 'Neue Machina', -apple-system, sans-serif !important;
    letter-spacing: -0.04em;
}
/* --- Ambient Background Architecture --- */
.posts-gradient-mesh {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: #03060a;
}

.mesh-orb {
    position: absolute; border-radius: 50%; filter: blur(150px); opacity: 0.25;
    animation: meshDrift 25s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
    will-change: transform; backface-visibility: hidden;
}

.orb-orange {
    width: 70vw; height: 70vw; max-width: 800px; max-height: 800px;
    background: radial-gradient(circle, #f97316 0%, rgba(249, 115, 22, 0) 70%);
    top: -10%; left: 5%;
}
.orb-aqua {
    width: 80vw; height: 80vw; max-width: 900px; max-height: 900px;
    background: radial-gradient(circle, #06b6d4 0%, rgba(6, 182, 212, 0) 70%);
    top: 40%; right: -10%; animation-delay: -7s;
}
.orb-indigo {
    width: 60vw; height: 60vw; max-width: 700px; max-height: 700px;
    background: radial-gradient(circle, #3b82f6 0%, rgba(59, 130, 246, 0) 70%);
    bottom: -20%; left: -10%; animation-delay: -14s;
}

@keyframes meshDrift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(5vw, 5vh, 0) scale(1.05); }
    100% { transform: translate3d(-3vw, 8vh, 0) scale(0.95); }
}
/* --- Parallax Scroll Waves (Performance Optimized) --- */
.fluent-scroll-waves {
    position: fixed;
    inset: 0;
    z-index: 1; 
    pointer-events: none;
    overflow: hidden;
    /* Hardware acceleration lock to prevent repaints */
    transform: translateZ(0); 
}

.wave-wrapper {
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    will-change: transform;
    /* Move vertically based on scroll */
    transform: translateY(calc(var(--scroll-y, 0px) * var(--scroll-speed, 0)));
}

.wave-wrapper-1 { --scroll-speed: -0.15; top: 40vh; }
.wave-wrapper-2 { --scroll-speed: -0.3; top: 55vh; }
.wave-wrapper-3 { --scroll-speed: -0.45; top: 70vh; }

.fluent-wave {
    position: absolute;
    left: -25vw;
    width: 150vw;
    height: 150vw;
    border-radius: 43% 47% 41% 48%; 
    transform-origin: 50% 48%;
    will-change: transform;
    /* Rotate dynamically based on scroll position instead of time */
    transform: rotate(calc(var(--scroll-y, 0px) * var(--rotate-speed, 0.05deg)));
}

.wave-1 {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    border-top: 1px solid rgba(6, 182, 212, 0.15);
    --rotate-speed: 0.05deg;
}

.wave-2 {
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.06) 0%, transparent 40%);
    border-top: 1px solid rgba(249, 115, 22, 0.12);
    --rotate-speed: -0.08deg; /* Reverse rotation for complexity */
}

.wave-3 {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    --rotate-speed: 0.03deg;
}

/* --- Text Gradient Update --- */
.text-gradient {
    background: linear-gradient(90deg, #f97316 0%, #06b6d4 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.text-gradient-orange-aqua {
    background: linear-gradient(90deg, #f97316 0%, #06b6d4 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 600;
}

/* --- Container & Hero --- */
.posts-container {
    position: relative; z-index: 10; max-width: 1400px; margin: 0 auto; padding: 150px 40px 100px 40px; 
}

.posts-hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 100px; }
.posts-hero h1 { font-size: 4.5rem; font-weight: 500; line-height: 1.1; margin-bottom: 20px; color: #fff;}

.fluent-badge {
    display: inline-block; font-size: 0.75rem; color: #06b6d4; letter-spacing: 0.5px; 
    font-weight: 600; background: rgba(6, 182, 212, 0.1); padding: 6px 16px; 
    border-radius: 50px; border: 1px solid rgba(6, 182, 212, 0.25);
}

/* --- Refined, Deep-Space Hero Card (Reference Image Match) --- */
.problem-statement-card {
    margin-top: 50px; 
    display: grid; 
    /* 40% image / 60% text gives the typography an elegant, widescreen sweep */
    grid-template-columns: 4fr 6fr; 
    max-width: 1200px; 
    width: 100%; 
    border-radius: 24px;
    
    /* Solid deep dark navy to match the reference exactly */
    background: #050912; 
    
    /* Ultra-subtle edge lighting, no harsh borders */
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08); 
    
    /* Deep ambient shadow, no heavy glass blur */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    
    overflow: hidden; 
    /* Buttery smooth ease-out physics for the levitation */
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(0); 
}

/* Fluid Hover Levitation */
.problem-statement-card:hover {
    transform: translateY(-6px) translateZ(0);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(6, 182, 212, 0.05);
}

.ps-image-container { 
    position: relative; 
    width: 100%; 
    height: 100%; 
    min-height: 380px; 
    background: #000; /* Force pitch black behind the GIF */
}

.ps-image-container img { 
    display: block; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: left center; 
    filter: contrast(1.1) brightness(0.9);
    transition: transform 2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

/* Very slow, cinematic drift on hover */
.problem-statement-card:hover .ps-image-container img {
    transform: scale(1.04) translateX(2%);
    filter: contrast(1.15) brightness(1);
}

/* Flawless Gradient Fade into the exact background color (#050912) */
.ps-image-overlay {
    position: absolute; 
    inset: 0;
    /* Fades from clear to the exact dark navy of the right side, erasing the image's hard edge */
    background: linear-gradient(90deg, transparent 0%, rgba(5, 9, 18, 0.6) 50%, #050912 100%); 
    pointer-events: none;
}

.ps-content { 
    padding: 70px 80px 70px 20px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    gap: 40px; 
    background: #050912; /* Ensure strict background match */
    position: relative;
    z-index: 2;
}

.tech-paragraph { 
    display: flex; 
    align-items: flex-start; 
    gap: 24px; 
}

.prompt-arrow { 
    color: #06b6d4; /* Crisp Cyan */
    font-family: 'JetBrains Mono', monospace !important;
    font-weight: 600; 
    font-size: 1.1rem; 
    line-height: 1.8; /* Align precisely with the text height */
    user-select: none; 
}

.ps-content p { 
    font-family: 'JetBrains Mono', monospace !important; 
    font-size: 0.95rem; 
    color: #94a3b8; /* Soft slate for legibility without harsh glare */
    line-height: 1.8; 
    font-weight: 400; 
    margin: 0; 
    text-align: left; 
    letter-spacing: 0.5px;
    transition: color 0.4s ease;
}

/* Make text slightly brighter on card hover for visual feedback */
.problem-statement-card:hover .ps-content p {
    color: #cbd5e1;
}

/* --- Post Grid Cards --- */
.solutions-section { margin-bottom: 80px; }
.fluent-clean-header h2 { font-size: 1.5rem; color: #f8fafc; margin-bottom: 10px; letter-spacing: 2px; }
.fluent-clean-header p { font-size: 0.95rem; color: #94a3b8; margin-bottom: 60px; }

.solutions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 32px; }

.solution-card {
    padding: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 20px;
    background: linear-gradient(145deg, rgba(20, 30, 48, 0.7), rgba(13, 22, 38, 0.3));
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); transform: translateZ(0); height: 100%; 
}
.solution-card:hover {
    transform: translateY(-12px) scale(1.02); border-color: rgba(6, 182, 212, 0.5);
    background: linear-gradient(145deg, rgba(20, 30, 48, 0.9), rgba(13, 22, 38, 0.5));
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.card-media-banner {
    position: relative; height: 220px; width: 100%; overflow: hidden; transform: translateZ(0);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); transition: border-color 0.5s ease;
}
.solution-card:hover .card-media-banner { border-bottom-color: rgba(6, 182, 212, 0.3); }
.card-media-banner img {
    width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7) contrast(1.1); transform: scale(1.02); 
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 1.2s ease;
}
.solution-card:hover .card-media-banner img { transform: scale(1.12); filter: brightness(0.95) saturate(1.2); }

.media-gradient-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(3, 6, 10, 0.1) 0%, rgba(13, 22, 38, 0.6) 60%, rgba(20, 30, 48, 1) 100%); pointer-events: none;
}

.solution-header-floating { position: absolute; bottom: 20px; left: 24px; right: 24px; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.solution-icon {
    width: 52px; height: 52px; border-radius: 50px; background: rgba(6, 182, 212, 0.15);
    backdrop-filter: blur(12px); border: 1px solid rgba(6, 182, 212, 0.4);
    display: flex; justify-content: center; align-items: center; color: #06b6d4; font-size: 1.3rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.solution-card:hover .solution-icon { transform: scale(1.15) translateY(-6px); background: rgba(6, 182, 212, 0.3); color: #fff; }
.solution-number {
    font-size: 1.2rem; color: rgba(255, 255, 255, 0.6); background: rgba(0, 0, 0, 0.6); padding: 6px 14px; border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px); transition: all 0.5s ease;
}

.solution-content { padding: 28px 32px 36px 32px; display: flex; flex-direction: column; flex-grow: 1; }
.solution-content h3 { font-size: 1.35rem; color: #f8fafc; margin-bottom: 24px; transition: color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.solution-card:hover .solution-content h3 { color: #06b6d4; transform: translateX(4px); }
.solution-content p { font-size: 0.9rem; color: #94a3b8; line-height: 1.7; transition: color 0.4s ease; }
.solution-card:hover .solution-content p { color: #cbd5e1; }

.status-pill {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 1px; display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 6px; margin-bottom: 14px; width: max-content; transition: all 0.4s ease;
}
.problem-pill { color: #f97316; background: rgba(249, 115, 22, 0.05); border: 1px dashed rgba(249, 115, 22, 0.2); }
.problem-pill-green { color: #16f916; background: rgba(86, 249, 22, 0.05); border: 1px dashed rgba(48, 249, 22, 0.2); }
.solution-link {
    margin-top: auto !important; display: flex; align-items: center; justify-content: space-between; color: #f8fafc;
    font-size: 0.85rem; font-weight: 600; padding: 16px 20px !important; background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important; border-radius: 12px; text-transform: uppercase; width: 100%;
    cursor: pointer; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.solution-card:hover .solution-link {
    background: rgba(6, 182, 212, 0.1) !important; border-color: rgba(6, 182, 212, 0.4) !important; color: #06b6d4;
    transform: translateY(-4px);
}
.solution-link i { background: rgba(255, 255, 255, 0.08); padding: 8px; border-radius: 50%; color: #94a3b8; transition: all 0.4s ease; }
.solution-card:hover .solution-link i { background: #06b6d4; color: #000; transform: translateX(2px) rotate(-45deg); }

/* ==========================================================================
   FULL SCREEN POST MODALS
   ========================================================================== */
.fluent-framework-modal {
    position: fixed; top: 80px; left: 0; right: 0; bottom: 0; z-index: 90;
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
    pointer-events: none;
}
.fluent-framework-modal.active { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: all; }

.framework-glass-surface {
    width: 100%; height: 100%; background: rgba(3, 6, 10, 0.98); backdrop-filter: blur(40px) saturate(150%);
    display: flex; flex-direction: column; overflow: hidden;
}

.framework-header {
    display: flex; justify-content: space-between; align-items: center; padding: 40px 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); background: rgba(3, 6, 10, 0.6); z-index: 2;
}
.header-titles { display: flex; flex-direction: column; gap: 12px; }
.framework-header h2 { font-size: 2.5rem; color: #f8fafc; margin: 0; }
.glass-btn-secondary { background: rgba(255,255,255,0.08); color: #f8fafc; border: 1px solid rgba(255,255,255,0.15); padding: 10px 24px; border-radius: 100px; cursor: pointer; transition: 0.2s; font-weight: 500;}
.glass-btn-secondary:hover { background: rgba(255,255,255,0.15); }

.framework-body {
    display: flex; flex-direction: column; flex-grow: 1; padding: 60px 80px 100px 80px; overflow-y: auto; scroll-behavior: smooth;
}
.custom-scroll::-webkit-scrollbar { width: 18px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background-color: rgba(6, 182, 212, 0.3); border-radius: 20px; border: 6px solid transparent; background-clip: padding-box; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background-color: rgba(6, 182, 212, 0.6); }

.framework-intro { max-width: 900px; margin: 0 auto 80px auto; text-align: center; }
.framework-desc { color: #cbd5e1; font-size: 1.15rem; line-height: 1.9; font-weight: 300; }

.concept-cards-wrapper { display: flex; flex-direction: column; gap: 60px; max-width: 1400px; margin: 0 auto; width: 100%; }
.concept-card { display: flex; flex-direction: row; padding: 0; overflow: hidden; min-height: 450px; background: rgba(255, 255, 255, 0.02); border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.05); }
.concept-media { width: 50%; position: relative; }
.concept-media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.85) contrast(1.1); }
.concept-media-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(5, 8, 14, 1) 100%); }

.concept-details { width: 50%; padding: 60px 80px; display: flex; flex-direction: column; justify-content: center; }
.concept-details h3 { font-size: 2.2rem; color: #f8fafc; margin-bottom: 20px; }
.concept-details p { font-size: 1.05rem; color: #cbd5e1; line-height: 1.8; margin-bottom: 35px; }

.concept-specs { display: flex; flex-direction: column; gap: 16px; background: rgba(0, 0, 0, 0.4); padding: 24px 30px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.05); }
.spec-row { display: flex; justify-content: space-between; }
.spec-label { color: #64748b; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px;}
.spec-value { color: #fff; }

/* Sticky Marquee Audit Box */
.ai-audit-container {
    position: sticky; top: 20px; z-index: 100; margin: 20px auto 60px auto; width: 100%; max-width: 900px;
    padding: 20px 24px; background: linear-gradient(145deg, rgba(6, 182, 212, 0.08), rgba(15, 23, 42, 0.95));
    backdrop-filter: blur(25px); border: 1px solid rgba(6, 182, 212, 0.3); border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-audit-container.compact {
    padding: 12px 24px; border-radius: 12px; background: rgba(15, 23, 42, 0.98);
    border-color: rgba(6, 182, 212, 0.6); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.15);
}
.ai-audit-container.compact .audit-header { margin-bottom: 0; }
.ai-audit-container.compact .audit-content { margin-top: 8px; padding-top: 8px; }
.ai-audit-container.compact .audit-step:not(:last-child) { display: none; }

.audit-header { display: flex; align-items: center; gap: 12px; color: #06b6d4; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; }
.ai-pulse-icon { animation: fluentPulse 2s infinite; }
.btn-small { margin-left: auto; padding: 8px 16px; font-size: 0.75rem; border-color: rgba(6, 182, 212, 0.3); color: #06b6d4; background: transparent; border-radius: 50px; border-style: solid; cursor: pointer;}
.btn-small:hover { background: rgba(6, 182, 212, 0.1); }
.audit-content { margin-top: 16px; padding-top: 16px; border-top: 1px dashed rgba(6, 182, 212, 0.2); color: #cbd5e1; transition: opacity 0.4s ease; }
.audit-content.hidden { display: none; opacity: 0; }
.audit-step { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; opacity: 0; transform: translateY(4px); animation: auditReveal 0.5s forwards; }
.audit-step i { color: #06b6d4; font-size: 14px; }
@keyframes auditReveal { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
    .posts-container { padding: 110px 24px 40px 24px; }
    .posts-hero h1 { font-size: 3rem; }
    .problem-statement-card { flex-direction: column; padding: 32px; align-items: center; text-align: center; }
    .solutions-grid { grid-template-columns: 1fr; }
    .framework-header { padding: 30px 40px; flex-direction: column; gap: 20px; align-items: flex-start;}
    .framework-body { padding: 40px; }
    .concept-card { flex-direction: column; }
    .concept-media { width: 100%; height: 300px; }
    .concept-media-overlay { background: linear-gradient(180deg, transparent 0%, rgba(5, 8, 14, 1) 100%); }
    .concept-details { width: 100%; padding: 40px; }
}
.tb{
    width: fit-content;
}