/* ======================================================================
   PORTFOLIO — MARLON REYNAUD
   Design System v10.0 — Premium Cyber-Luxury
   Inspired by Esteban Guillermin (eguillermin.vercel.app)
 ====================================================================== */

:root {
    /* Architectural Tech Tokens */
    --ha-bg: #07090e;
    --ha-bg-2: #0c0f17;
    --ha-line: rgba(255, 255, 255, 0.08);
    --ha-line-2: rgba(255, 255, 255, 0.12);
    --ha-txt: #f1f5f9;
    --ha-mute: #94a3b8;
    --ha-cyan: #38bdf8;
    --ha-cyan-soft: rgba(56, 189, 248, 0.12);
    --ha-amber: #f59e0b;
    --ha-lime: #10b981;
    --ha-violet: #818cf8;
    --ha-rose: #f43f5e;

    /* Color Palette - Refined Architectural Dark Mode */
    --brand-solid: #38bdf8;
    --brand-glow: rgba(56, 189, 248, 0.35);
    --brand-blue: #3b82f6; 
    --brand-deep: #0369a1;
    --brand-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #818cf8 100%); 
    --brand-background: rgba(56, 189, 248, 0.06);
    --brand-playful: rgba(255, 255, 255, 0.08); 
    
    --bg-page: #07090e;
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-navbar: rgba(7, 9, 14, 0.92);

    --text-strong: #f8fafc;
    --text-medium: #e2e8f0;
    --text-weak: #94a3b8;
    
    --glass-blur: 24px;
    --glass-reflection: linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 50%);
    --card-shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
    --neon-glow: 0 0 20px var(--brand-glow);

    --radius-m: 10px;
    --radius-l: 16px;
    --container-max: 1400px;
    --header-height: 76px;

    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] {
    --bg-page: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.25);
    --bg-card-hover: rgba(255, 255, 255, 0.65);
    --bg-navbar: rgba(255, 255, 255, 0.85);
    --text-strong: #0f172a;
    --text-medium: #334155;
    --text-weak: #64748b;
    --brand-solid: #0ea5e9; 
    --brand-subtle: rgba(14, 165, 233, 0.08);
    --brand-glow: rgba(14, 165, 233, 0.15);
    --glass-blur: 40px;
    --card-shadow-premium: 0 20px 60px rgba(15, 23, 42, 0.05);
    --scanline-opacity: 0.001;
}

/* ============================================================
   TECHENCLAIR.FR DESIGN SYSTEM COMPONENTS
   ============================================================ */
.mono {
    font-family: 'JetBrains Mono', monospace;
}

.h-display {
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 0.95;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--ha-line-2);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--ha-cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12), 0 0 12px rgba(34, 211, 238, 0.7);
    animation: dotPulse 2.2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.brutal-card,
.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012));
    border: 1px solid var(--ha-line);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: 2rem;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
    transition: border-color .35s ease, transform .35s ease, background .35s ease, box-shadow .35s ease, translate .35s ease;
}

.brutal-card:hover,
.card:hover {
    border-color: var(--ha-line-2);
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
    box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.ring-glow:hover {
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35), 0 20px 60px -20px rgba(34, 211, 238, 0.35);
}

.btn-primary {
    background: linear-gradient(180deg, #f5fbfd 0%, #cfeef6 100%);
    color: #04181d !important;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 30px -12px rgba(34, 211, 238, 0.5);
    transition: transform .25s ease, box-shadow .25s ease;
    font-weight: 800;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 20px 50px -16px rgba(34, 211, 238, 0.7);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ha-line-2);
    color: #e6ebf0 !important;
    transition: background .25s ease, border-color .25s ease;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
}

.underline-grow {
    position: relative;
}

.underline-grow::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, var(--ha-cyan), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s ease;
}

.underline-grow:hover::after {
    transform: scaleX(1);
}

.shine-wrap {
    position: relative;
    overflow: hidden;
}

.shine-img {
    transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

.shine-wrap:hover .shine-img {
    transform: scale(1.06);
}

.shine-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.10) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform .9s ease;
    pointer-events: none;
}

.shine-wrap:hover::after {
    transform: translateX(120%);
}

.h-rule {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.text-neon-cyan {
    color: var(--ha-cyan);
    text-shadow: 0 0 15px rgba(34, 211, 238, 0.6);
}

/* ============================================================
   BASE STYLES
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body,
.admin-login-body {
    background-color: var(--ha-bg);
    color: var(--ha-txt);
    font-family: 'Inter', var(--font-body);
    font-weight: var(--font-weight-body);
    letter-spacing: var(--letter-spacing);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: var(--transition-theme);
    background-image:
        radial-gradient(1200px 600px at 50% -10%, rgba(34, 211, 238, 0.08), transparent 60%),
        radial-gradient(900px 500px at 90% 20%, rgba(167, 139, 250, 0.06), transparent 60%),
        var(--ha-bg);
    background-attachment: fixed;
}

/* TechEnClair Grid BG */
.grid-bg,
.aurora-container {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-color: var(--ha-bg);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    background-position: -1px -1px;
    mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
    pointer-events: none;
}

.aurora-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 10%, #02040a 90%);
    z-index: -1;
}

/* We repurpose the aurora blobs into glowing data nodes / servers */
.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    mix-blend-mode: screen;
    animation: nodeFloat 20s infinite alternate ease-in-out;
}

/* Cyber Data Streams (BTS SIO) */
.blob-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #0ea5e9, #00f2ff);
    top: -10%; left: -5%;
    animation-duration: 25s;
}

.blob-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #6366f1, #8b5cf6);
    top: 20%; right: -10%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #0284c7, #0ea5e9);
    bottom: -10%; left: 20%;
    animation-duration: 22s;
    animation-delay: -10s;
}

.blob-4 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #38bdf8, #0ea5e9);
    bottom: 30%; right: 20%;
    animation-duration: 28s;
    animation-delay: -15s;
}

@media (max-width: 1024px) {
    .aurora-container {
        background-size: 20px 20px;
    }
    .aurora-blob { filter: blur(50px); animation-duration: 40s !important; }
    .blob-1 { width: 300px; height: 300px; }
    .blob-2 { width: 250px; height: 250px; }
    .blob-3 { width: 200px; height: 200px; }
    .blob-4 { width: 150px; height: 150px; }
}

@keyframes nodeFloat {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(50px, -30px, 0) scale(1.1); }
    100% { transform: translate3d(-30px, 50px, 0) scale(0.9); }
}

/* Glass Grain Overlay */
.aurora-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
    background: var(--text-alpha);
    border-radius: 10px;
    border: 2px solid var(--bg-page);
}

/* ==========================================================================
   PREMIUM BADGES
   ========================================================================== */
.premium-badge {
    position: relative;
    display: inline-flex;
    width: fit-content;
    margin-bottom: 1rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: badgeReveal 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
    animation-delay: 0.2s;
}

.badge-pdf {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.9), rgba(255, 140, 0, 0.9));
}

.badge-ekloud {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
}

@keyframes badgeReveal {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-solid);
}

.container {
    width: 92%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2.5rem);
}

/* Resolution Optimization */
@media screen and (min-width: 2560px) {
    :root {
        --container-max: 2000px;
        font-size: 18px;
    }
}

@media screen and (min-width: 3840px) {
    :root {
        --container-max: 2800px;
        font-size: 22px;
    }
}

/* Structural Glass Panels */
.glass-panel {
    background: var(--bg-glass-gradient);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 40px;
    padding: 6rem 5rem;
    backdrop-filter: blur(120px) saturate(180%);
    -webkit-backdrop-filter: blur(120px) saturate(180%);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    margin-bottom: 7rem;
    position: relative;
    overflow: hidden;
    will-change: transform, opacity, backdrop-filter;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08), transparent 40%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}

.glass-panel:hover::after {
    opacity: 1;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: glassSweep 12s infinite ease-in-out;
    pointer-events: none;
    z-index: 2;
}

@keyframes glassSweep {
    0% {
        left: -150%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.glass-panel-grain {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.60' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4 {
    color: var(--text-strong);
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    letter-spacing: -0.03em;
    word-break: break-word;
    overflow-wrap: break-word;
}

h1 {
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

h2 {
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 700;
    margin-bottom: 2rem;
}

p {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--brand-solid) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(96, 165, 250, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(96, 165, 250, 0.2);
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--brand-solid);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.badge-github {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(129, 140, 248, 0.1) 100%);
    color: #a5b4fc;
    border: 1px solid rgba(129, 140, 248, 0.5);
    box-shadow: 
        0 0 20px rgba(99, 102, 241, 0.2),
        inset 0 0 10px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.badge-pdf {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.2) 0%, rgba(251, 113, 133, 0.1) 100%);
    color: #fda4af;
    border: 1px solid rgba(251, 113, 133, 0.5);
    box-shadow: 
        0 0 20px rgba(225, 29, 72, 0.2),
        inset 0 0 10px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.badge-doc {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(96, 165, 250, 0.1) 100%);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.5);
    box-shadow: 
        0 0 20px rgba(37, 99, 235, 0.2),
        inset 0 0 10px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.badge-github::after, .badge-pdf::after, .badge-doc::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.1) 50%, transparent 55%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%); }
    100% { transform: translateX(100%) translateY(100%); }
}

/* ============================================================
   NAVBAR & MENU
   ============================================================ */
/* ── Premium Navbar (PC & Mobile) ── */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: var(--container-max);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar {
    background: var(--bg-navbar);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
}

.logo-btn {
    display: inline-flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-strong) !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    font-family: var(--font-display);
    letter-spacing: 1.5px;
}

.logo-btn span {
    color: var(--brand-solid) !important;
    text-shadow: 0 0 15px var(--brand-glow) !important;
}

.logo-btn:hover {
    transform: translateY(-2px);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

#nav-menu {
    display: flex;
    gap: 8px;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

#nav-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-weak);
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

#nav-menu li a i {
    font-size: 0.9rem;
    opacity: 0.5;
    transition: 0.3s;
}

#nav-menu li a:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-strong);
}

#nav-menu li a:hover i {
    opacity: 1;
    transform: scale(1.1);
}

#nav-menu li a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-strong);
    box-shadow: none;
}

#nav-menu li a.active i {
    opacity: 1;
    color: var(--brand-solid);
}

/* Dropdown Logic */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 290px;
    background: rgba(10, 15, 26, 0.92);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(34, 211, 238, 0.15);
    z-index: 2000;
}

.btn-filter {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-family: var(--font-display);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-filter:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.3);
    color: #22d3ee;
}

.btn-filter.active {
    background: rgba(34, 211, 238, 0.2);
    border-color: #22d3ee;
    color: #fff;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 20px;
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    padding: 10px 15px;
    border-radius: 10px;
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.dropdown-item i {
    font-size: 0.8rem;
    color: var(--brand-solid);
    opacity: 0.6;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--brand-solid);
    transform: translateX(5px);
}

.dropdown-item:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 2001;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-strong);
    transition: var(--transition-smooth);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Toggle Base */
.mobile-menu-toggle {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    font-family: var(--font-display);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease, background 0.3s ease;
    cursor: pointer;
    border: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    will-change: transform;
}

.btn:hover {
    box-shadow: 0 15px 40px var(--brand-glow);
}

.btn:active {
    transform: scale(0.92) !important;
}

.primary-btn {
    background: var(--brand-solid);
    color: #ffffff; /* White text for better contrast */
    font-weight: 800;
    box-shadow: 0 10px 30px var(--brand-glow);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-strong);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--brand-solid);
}

.secondary-btn.active {
    background: var(--brand-solid) !important;
    color: #000 !important;
    border-color: var(--brand-solid) !important;
    box-shadow: 0 0 25px var(--brand-glow), inset 0 0 10px rgba(255, 255, 255, 0.3);
    font-weight: 800;
}

.btn.active {
    background: var(--brand-solid) !important;
    color: #000 !important;
    border-color: var(--brand-solid) !important;
    box-shadow: 0 0 20px var(--brand-glow) !important;
}

/* Category Specific Button Colors */
.btn.filter-github.active {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4) !important;
}

.btn.filter-documentation.active {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4) !important;
}

/* Badge Modifiers */
.section-badge.badge-github {
    color: #818cf8;
    border-color: rgba(129, 140, 248, 0.4);
    background: rgba(129, 140, 248, 0.1);
}

.section-badge.badge-pdf {
    color: #fb7185;
    border-color: rgba(251, 113, 133, 0.4);
    background: rgba(251, 113, 133, 0.1);
}

.section-badge.badge-doc {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(96, 165, 250, 0.1);
}

.danger-btn {
    background: var(--accent-solid);
    color: #fff;
}

.danger-btn:hover {
    background: #ff1a53;
    transform: translateY(-3px);
}

/* ============================================================
   GRID & CARDS
   ============================================================ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3rem;
    margin-bottom: 6rem;
}

.span-1 {
    grid-column: span 1;
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.span-4 {
    grid-column: span 4;
}

.span-5 {
    grid-column: span 5;
}

.span-6 {
    grid-column: span 6;
}

.span-7 {
    grid-column: span 7;
}

.span-8 {
    grid-column: span 8;
}

.span-9 {
    grid-column: span 9;
}

.span-10 {
    grid-column: span 10;
}

.span-11 {
    grid-column: span 11;
}

.span-12 {
    grid-column: span 12;
}

@media (max-width: 1024px) {
    .bento-grid {
        gap: 1.5rem;
    }

    .span-8, .span-9, .span-6, .span-4, .span-3, .span-2 {
        grid-column: span 12 !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .glass-panel {
        padding: 3rem 1.5rem;
        border-radius: 24px;
    }

    .bento-grid {
        gap: 1rem;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, opacity;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.markdown-body {
    color: var(--text-medium);
    line-height: 1.8;
}

.markdown-body {
    color: #e2e8f0;
    line-height: 1.8;
    font-size: 1rem;
    padding: 3rem;
    overflow-y: auto;
    height: 100%;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    color: var(--brand-solid);
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-family: var(--font-display);
    font-weight: 800;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.markdown-body h1 {
    font-size: 2.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.markdown-body h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
}

.markdown-body p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.markdown-body li {
    margin-bottom: 0.5rem;
}

.markdown-body code {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.markdown-body pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
    overflow-x: auto;
}

.markdown-body blockquote {
    border-left: 4px solid var(--brand-solid);
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #cbd5e1;
}

.markdown-body img {
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

/* ── Markdown Tables ── */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.88rem;
    overflow-x: auto;
    display: block;
}

.markdown-body table thead tr {
    background: rgba(96, 165, 250, 0.08);
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
}

.markdown-body table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--brand-solid);
    text-transform: uppercase;
    white-space: nowrap;
}

.markdown-body table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-medium);
    vertical-align: top;
    line-height: 1.5;
}

.markdown-body table tbody tr:hover {
    background: rgba(96, 165, 250, 0.04);
}

.markdown-body table tbody tr:last-child td {
    border-bottom: none;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-spring);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.01);
    will-change: transform, box-shadow, border-color;
}

.card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(96, 165, 250, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.glass-panel {
    position: relative;
    overflow: hidden;
    background: rgba(13, 17, 23, 0.2);
    backdrop-filter: blur(80px) saturate(200%);
    -webkit-backdrop-filter: blur(80px) saturate(200%);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.glass-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(96, 165, 250, 0.08),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.glass-panel:hover::after {
    opacity: 1;
}

/* Premium Project Cards */
.project-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card-header {
    position: relative;
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: #000;
}

.project-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

/* Zoom sur les images projet désactivé */

.project-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.02));
}

.tag {
    font-size: 0.65rem;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-strong);
}

/* Horizontal Card (Desktop) */
@media (min-width: 1024px) {
    .horizontal-card {
        flex-direction: row !important;
        grid-column: span 12 !important;
    }

    .horizontal-card .project-card-header {
        width: 400px;
        aspect-ratio: auto;
    }
}

/* ============================================================
   MODAL SYSTEM
   ============================================================ */
/* MODAL SYSTEM DEPRECATED — MOVED TO READER.HTML */

}

/* ============================================================
   THEME SWITCH (DAY/NIGHT TOGGLE)
   ============================================================ */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 68px;
}

.theme-switch input {
    display: none;
}

.slider {
    background: rgba(255, 255, 255, 0.05);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.slider:before {
    background-color: #60a5fa;
    bottom: 4px;
    content: "";
    height: 24px;
    left: 4px;
    position: absolute;
    transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    width: 24px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 0 15px rgba(96, 165, 250, 0.4);
    z-index: 2;
}

input:checked + .slider {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

input:checked + .slider:before {
    transform: translateX(34px);
    background-color: #f59e0b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), 0 0 15px rgba(245, 158, 11, 0.5);
}

.slider i {
    font-size: 0.85rem;
    z-index: 1;
    transition: 0.3s;
}

.fa-moon { color: #60a5fa; }
.fa-sun { color: #f59e0b; }

[data-theme="light"] .fa-moon { opacity: 0.3; transform: scale(0.8); }
[data-theme="dark"] .fa-sun { opacity: 0.3; transform: scale(0.8); }

.theme-switch:hover .slider {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

/* ============================================================
   PROJECT CARDS & BENTO (MINIMAL PREMIUM REWRITE)
   ============================================================ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: auto;
    gap: 1.5rem;
    padding: 1rem 0;
}

.project-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.2, 1, 0.2, 1);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.project-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 211, 238, 0.1);
}

.project-card-visual {
    position: relative;
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.2, 1);
}

.project-card:hover .project-card-visual {
    transform: scale(1.05);
}

.visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(5, 7, 8, 0.8));
    z-index: 1;
}

.project-type-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: var(--font-mono);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.type-github { color: #818cf8; border-color: rgba(129, 140, 248, 0.3); background: rgba(129, 140, 248, 0.2); }
.type-pdf { color: #fb7185; border-color: rgba(251, 113, 133, 0.3); background: rgba(251, 113, 133, 0.2); }
.type-doc { color: #22d3ee; border-color: rgba(34, 211, 238, 0.3); background: rgba(34, 211, 238, 0.2); }

.project-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    z-index: 2;
    background: var(--bg-card);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #fff;
    letter-spacing: -0.5px;
}

.project-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags-minimal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.minimal-tag {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: #64748b;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.project-action {
    margin-top: auto;
}

.btn-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-minimal:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.4);
    color: #22d3ee;
}

.btn-minimal i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.btn-minimal:hover i {
    transform: translateX(4px);
}

/* Card Size Variants */
.project-card.span-12 { grid-column: span 12; }
.project-card.span-8 { grid-column: span 8; }
.project-card.span-6 { grid-column: span 6; }
.project-card.span-4 { grid-column: span 4; }

@media (max-width: 1024px) {
    .project-card.span-12, .project-card.span-8, .project-card.span-6, .project-card.span-4 {
        grid-column: span 12;
    }
}

/* Stats Section Modernization */
.system-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0 4rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.01);
        border: 1px solid rgba(255, 255, 255, 0.1);

    border-radius: 24px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-solid), transparent);
    opacity: 0.3;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    font-family: var(--font-mono);
    text-shadow: 0 0 10px var(--brand-glow);
}

.stat-label {
    font-size: 0.55rem;
    color: var(--text-weak);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .project-card {
        padding: 1.8rem;
    }
}

/* ============================================================
   RESPONSIVE REFINEMENTS
   ============================================================ */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr !important;
        gap: 1.2rem;
    }

    .span-1,
    .span-2,
    .span-3,
    .span-4,
    .span-5,
    .span-6,
    .span-7,
    .span-8,
    .span-9,
    .span-10,
    .span-11,
    .span-12 {
        grid-column: span 1 !important;
    }

    .horizontal-card .project-card-header {
        width: 100% !important;
        height: 220px;
    }

    .horizontal-card {
        flex-direction: column !important;
    }

    .card {
        padding: 1.8rem;
        border-radius: 20px;
        backdrop-filter: blur(20px) saturate(140%);
        /* Lighter blur for mobile performance */
        -webkit-backdrop-filter: blur(20px) saturate(140%);
    }

    header {
        width: calc(100% - 20px);
        top: 10px;
    }

    .navbar {
        padding: 0 1.2rem;
    }

    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Scroll Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 100000 !important;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    pointer-events: none;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #60a5fa, #3b82f6, #00f2ff);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.8), 0 0 40px rgba(96, 165, 250, 0.4);
    transition: width 0.15s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.scroll-progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 10px;
    background: #fff;
    box-shadow: 0 0 15px #fff;
    filter: blur(2px);
}

.scroll-percentage {
    position: fixed;
    top: 10px;
    right: 25px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--brand-solid);
    text-shadow: 0 0 10px var(--brand-glow);
    z-index: 100001;
    pointer-events: none;
    opacity: 0.8;
    letter-spacing: 1px;
    background: rgba(13, 17, 23, 0.4);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(96, 165, 250, 0.2);
    backdrop-filter: blur(10px);
}

/* Performance Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

section, .card, .project-card, .bento-grid {
    content-visibility: auto;
    contain-intrinsic-size: 1px 500px; /* Aide le navigateur à anticiper la taille avant le rendu */
}

.card, .project-card {
    contain: paint; /* Isole le rendu de la carte */
    backface-visibility: hidden;
}

.reveal {
    will-change: transform, opacity;
    transform: translate3d(0, 15px, 0);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.visible {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.aurora-blob {
    will-change: transform;
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    perspective: 1000px;
    pointer-events: none;
    contain: strict;
    filter: blur(60px); /* Un peu moins de flou pour plus de performance GPU */
}

/* Base Styles */
:root {
}

/* Inputs & Forms - Liquid Glass Style */
input,
textarea,
select,
.admin-input {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-strong);
    font-family: var(--font-body);
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

/* Consolidation of PIN Styles moved to end for clarity */
/* Premium Primary Button - Cyber-Violet */
.btn.primary-btn {
    background: var(--brand-gradient);
    color: #000;
    font-weight: 800;
    border: none;
    box-shadow: 0 10px 25px var(--brand-glow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn.primary-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px var(--brand-glow);
    filter: brightness(1.1);
}

.section-badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-solid);
    border: 1px solid rgba(96, 165, 250, 0.3);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

/* Admin Dashboard Specific Glass */
.admin-dashboard-body {
    background: rgba(13, 17, 23, 0.4);
    backdrop-filter: blur(100px) saturate(200%);
    -webkit-backdrop-filter: blur(100px) saturate(200%);
    min-height: 100vh;
}

.admin-input {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-radius: 10px !important;
}

.admin-input:focus {
    background: rgba(59, 130, 246, 0.05) !important;
    border-color: var(--brand-solid) !important;
    box-shadow: 0 0 15px var(--brand-glow) !important;
}

/* Status Badges (Glow Style) */
.status-badge {
    background: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-solid), transparent);
    opacity: 0.3;
}

.status-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 255, 255, 0.2);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
}

.status-dot.green {
    background: #10b981;
    box-shadow: 0 0 15px #10b981;
    animation: pulse-green 2s infinite;
}

.status-value {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.status-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-weak);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Fin Status Badges */

/* PIN Entry Styles */
.pin-dot {
    width: 50px;
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--brand-solid);
    font-size: 1.8rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 60px;
    /* Force vertical center */
}

.pin-dot:focus {
    outline: none !important;
    border-color: var(--brand-solid) !important;
    background: rgba(59, 130, 246, 0.08) !important;
    box-shadow: 0 0 20px var(--brand-glow), inset 0 0 10px rgba(59, 130, 246, 0.2) !important;
    transform: scale(1.08);
}

.pin-dot.success {
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.pin-dot.error {
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    animation: shake 0.4s ease;
}

#pin-status {
    margin-top: 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    height: 1.5rem;
    transition: 0.3s;
}

#pin-status.success {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

#pin-status.error {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ============================================================
   ADMIN DASHBOARD LAYOUT (MISSION CONTROL)
   ============================================================ */
#dashboard-section {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    background: transparent;
}

/* Sidebar Styles (PC Only) */
.admin-sidebar {
    width: 260px;
    background: rgba(13, 17, 23, 0.4);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 1001;
    transition: var(--transition-smooth);
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 3.5rem;
}

.sidebar-header .logo-btn {
    font-size: 1rem;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    width: fit-content;
}

.sidebar-header .logo {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.system-tag {
    font-size: 0.5rem;
    font-family: var(--font-mono);
    color: var(--brand-solid);
    letter-spacing: 2px;
    opacity: 0.6;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-weak);
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: var(--font-display);
    letter-spacing: 1px;
}

.sidebar-nav .nav-item i {
    width: 20px;
    font-size: 1rem;
    text-align: center;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-strong);
}

.sidebar-nav .nav-item.active {
    background: rgba(96, 165, 250, 0.1);
    color: var(--brand-solid);
    box-shadow: inset 0 0 15px rgba(96, 165, 250, 0.05);
}

.sidebar-footer {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.logout-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.05);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.logout-btn:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.admin-main-content {
    flex: 1;
    margin-left: 260px !important; 
    transition: margin-left 0.4s ease;
    padding: 3rem 4rem;
    max-width: 100%;
    position: relative;
    z-index: 10;
    min-height: 100vh;
    background: rgba(2, 4, 10, 0.7);
    backdrop-filter: blur(20px);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: var(--brand-solid);
    color: #000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    box-shadow: 0 0 20px var(--brand-glow);
    font-family: var(--font-display);
}

/* Status Monitor Overrides for Sidebar */
.admin-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
}

.admin-status .status-item {
    font-size: 0.6rem;
    font-family: var(--font-mono);
}

/* Mobile Topbar Styles */
.admin-topbar {
    display: none; /* Hidden on PC */
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.7);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1rem 0 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--text-weak);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    font-family: var(--font-mono);
    text-transform: uppercase;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
}

.admin-nav-item i {
    font-size: 1rem;
    opacity: 0.7;
}

.admin-nav-item:hover {
    color: var(--text-medium);
    background: rgba(255, 255, 255, 0.03);
}

.admin-nav-item.active {
    color: var(--brand-solid);
    border-bottom-color: var(--brand-solid);
    background: rgba(96, 165, 250, 0.05);
}

/* Custom scrollbar for topbar nav */
.topbar-nav::-webkit-scrollbar {
    height: 4px;
}
.topbar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.topbar-nav::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.3);
    border-radius: 4px;
}

/* ============================================================
   ADMIN AUTHENTICATION GATE & PIN KEYPAD
   ============================================================ */
.admin-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.admin-auth-card {
    max-width: 440px;
    width: 100%;
    background: rgba(10, 15, 30, 0.75);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(59, 130, 246, 0.15);
    animation: authCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardIn {
    from { opacity: 0; transform: scale(0.94) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-icon-badge {
    width: 70px;
    height: 70px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    color: var(--brand-solid);
    font-size: 1.8rem;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
}

.system-tag-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--brand-solid);
    letter-spacing: 2px;
    background: rgba(59, 130, 246, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 0.8rem;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 0 0.4rem 0;
    letter-spacing: 1px;
    color: #fff;
}

.auth-subtitle {
    font-size: 0.75rem;
    color: var(--text-weak);
    margin: 0;
}

.pin-hint {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--text-weak);
    text-align: center;
    letter-spacing: 1.5px;
    margin-bottom: 1.2rem;
}

.pin-dots-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pin-dot {
    width: 54px;
    height: 60px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.pin-dot:focus {
    border-color: var(--brand-solid);
    background: rgba(59, 130, 246, 0.12);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.pin-dot.success {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.pin-dot.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.auth-status-msg {
    min-height: 24px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    text-align: center;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.auth-status-msg.error { color: #ef4444; }
.auth-status-msg.success { color: #10b981; }

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.8rem;
}

.keypad-btn {
    height: 52px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.keypad-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.04);
}

.keypad-btn:active {
    transform: scale(0.96);
}

.keypad-btn.keypad-alt {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--brand-solid);
}

.auth-toggle-row {
    text-align: center;
    margin-top: 1rem;
}

.auth-switch-btn {
    background: none;
    border: none;
    color: var(--text-weak);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
}

.auth-switch-btn:hover {
    color: var(--brand-solid);
    text-decoration: underline;
}

.return-site-link {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-weak);
    text-decoration: none;
    transition: color 0.3s ease;
}

.return-site-link:hover {
    color: #fff;
}

/* ============================================================
   ADMIN DASHBOARD LAYOUT & KPI MATRIX
   ============================================================ */
#dashboard-section {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    background: #02040a;
}

.admin-sidebar {
    width: 270px;
    background: rgba(8, 12, 22, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 1.8rem 1.2rem;
    position: fixed;
    height: 100vh;
    z-index: 1001;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 2rem;
}

.sidebar-header .logo-btn {
    display: inline-flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-decoration: none;
    color: #fff;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.sidebar-header .logo-accent {
    color: #ef4444;
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.system-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--brand-solid);
    letter-spacing: 1px;
    opacity: 0.8;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-weak);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all 0.25s ease;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
    position: relative;
}

.sidebar-nav .nav-item i {
    width: 18px;
    font-size: 0.95rem;
    text-align: center;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-nav .nav-item.active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-solid);
    border-left: 3px solid var(--brand-solid);
    box-shadow: inset 0 0 15px rgba(59, 130, 246, 0.05);
}

.nav-badge {
    margin-left: auto;
    font-size: 0.6rem;
    font-family: var(--font-mono);
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-medium);
}

.nav-badge.msg-badge { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.nav-badge.contact-badge { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-status-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px 12px;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.62rem;
    font-family: var(--font-mono);
}

.status-row.metrics {
    justify-content: space-between;
    margin-top: 4px;
    color: var(--text-weak);
    font-size: 0.58rem;
}

.status-indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.status-indicator-dot.online { background: #10b981; box-shadow: 0 0 6px #10b981; }

.sidebar-actions-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.logout-btn {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.admin-main-content {
    flex: 1;
    margin-left: 270px;
    padding: 2.5rem 3.5rem;
    min-height: 100vh;
    background: rgba(2, 4, 10, 0.6);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title {
    font-size: 1.35rem;
    font-weight: 900;
    margin: 0.3rem 0 0 0;
    letter-spacing: 0.5px;
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.maintenance-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.maintenance-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.maintenance-toggle-btn.active {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

.maint-icon i {
    color: var(--brand-solid);
    font-size: 1rem;
}

.maintenance-toggle-btn.active .maint-icon i {
    color: #ef4444;
}

.maint-info {
    display: flex;
    flex-direction: column;
}

.maint-label {
    font-size: 0.55rem;
    font-family: var(--font-mono);
    color: var(--text-weak);
    letter-spacing: 1px;
}

.maint-value {
    font-size: 0.72rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #10b981;
}

.user-avatar-badge {
    width: 40px;
    height: 40px;
    background: var(--brand-solid);
    color: #000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    font-family: var(--font-display);
    box-shadow: 0 0 20px var(--brand-glow);
}

/* KPI GRID */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.admin-stat-card {
    background: rgba(10, 15, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.3s ease;
}

.admin-stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.stat-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--text-weak);
    letter-spacing: 1px;
    font-weight: 700;
}

.stat-icon {
    font-size: 0.9rem;
    opacity: 0.8;
}

.stat-icon.blue { color: #60a5fa; }
.stat-icon.cyan { color: #00ffff; }
.stat-icon.indigo { color: #818cf8; }
.stat-icon.yellow { color: #facc15; }
.stat-icon.green { color: #10b981; }
.stat-icon.red { color: #ef4444; }

.stat-number {
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1;
    margin: 4px 0;
}

.stat-footer {
    font-size: 0.62rem;
    color: var(--text-weak);
}

/* COMMON ADMIN CARDS & SECTIONS */
.admin-card {
    background: rgba(10, 15, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.card-head-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.card-head-row h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-subtitle {
    font-size: 0.68rem;
    color: var(--text-weak);
    margin: 4px 0 0 0;
}

.section-two-cols {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 1.8rem;
}

.grid-dual-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 1.8rem;
}

.admin-form-group {
    margin-bottom: 1.3rem;
}

.grid-two-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions-row {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.subhead-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-medium);
    margin: 1.2rem 0 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

/* DROPZONE */
.admin-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.admin-dropzone:hover {
    border-color: var(--brand-solid);
    background: rgba(59, 130, 246, 0.05);
}

.admin-dropzone.mini {
    padding: 1.2rem 1rem;
}

.dropzone-icon {
    font-size: 2rem;
    color: var(--brand-solid);
    opacity: 0.7;
    margin-bottom: 4px;
}

.dropzone-text {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: #fff;
    font-weight: 700;
    margin: 0;
}

.dropzone-hint {
    font-size: 0.6rem;
    color: var(--text-weak);
}

/* LIST ITEMS */
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 580px;
    overflow-y: auto;
    padding-right: 4px;
}

.admin-list-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.1rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s ease;
}

.admin-list-item:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.12);
}

.item-icon-col {
    width: 42px;
    height: 42px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-solid);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.item-info-col {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.62rem;
    color: var(--text-weak);
    font-family: var(--font-mono);
}

.item-tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-solid);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
}

.item-desc-snippet {
    font-size: 0.68rem;
    color: var(--text-weak);
    margin: 6px 0 0 0;
    line-height: 1.4;
}

.item-desc-pre {
    font-family: inherit;
    font-size: 0.68rem;
    color: var(--text-weak);
    margin: 6px 0 0 0;
    white-space: pre-wrap;
    line-height: 1.4;
}

.item-actions-col {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.btn-xs {
    padding: 5px 10px !important;
    font-size: 0.65rem !important;
    border-radius: 8px !important;
}

.btn-sm {
    padding: 8px 14px !important;
    font-size: 0.72rem !important;
    border-radius: 10px !important;
}

.table-head-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-search-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 6px 12px;
    color: #fff;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    outline: none;
}

.table-search-input:focus {
    border-color: var(--brand-solid);
}

.empty-state-card {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-weak);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.empty-state-card i {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
    opacity: 0.4;
}

.list-loading-state {
    text-align: center;
    padding: 2rem;
    color: var(--brand-solid);
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

/* TERMINAL TEXTAREA */
.terminal-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.terminal-textarea {
    width: 100%;
    height: 220px;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    border-radius: 14px;
    padding: 1rem;
    color: #10b981 !important;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.5;
    resize: none;
    outline: none;
}

.terminal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-status {
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--text-weak);
}

/* CHAT LOGS */
.chat-logs-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-height: 560px;
    overflow-y: auto;
}

.chat-session-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 1.2rem;
}

.chat-session-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--text-weak);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.chat-bubbles-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-bubble-row {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.chat-bubble-row.user-side {
    align-self: flex-start;
}

.chat-bubble-row.ai-side {
    align-self: flex-end;
}

.bubble-author {
    font-size: 0.55rem;
    font-family: var(--font-mono);
    color: var(--text-weak);
    margin-bottom: 2px;
}

.chat-bubble-content {
    padding: 8px 14px;
    border-radius: 14px;
    font-size: 0.75rem;
    line-height: 1.4;
}

.chat-bubble-row.user-side .chat-bubble-content {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.chat-bubble-row.ai-side .chat-bubble-content {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #d1fae5;
    border-bottom-right-radius: 4px;
}

/* CONTACT MESSAGES */
.contact-messages-stream {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 560px;
    overflow-y: auto;
}

.contact-msg-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 1.3rem;
}

.contact-msg-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contact-sender-name {
    font-size: 0.9rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
}

.contact-sender-email {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--brand-solid);
}

.contact-msg-actions {
    display: flex;
    gap: 6px;
}

.contact-msg-body {
    font-size: 0.78rem;
    color: var(--text-medium);
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.contact-msg-date {
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--text-weak);
    margin-top: 8px;
    text-align: right;
}

/* BIO LIVE PREVIEW */
.bio-live-preview {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 1.8rem;
    text-align: center;
}

.preview-avatar {
    width: 64px;
    height: 64px;
    background: var(--brand-solid);
    color: #000;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.4rem;
    margin: 0 auto 1rem;
    box-shadow: 0 0 25px var(--brand-glow);
}

.preview-role {
    font-size: 0.7rem;
    color: var(--brand-solid);
    font-family: var(--font-mono);
    margin-top: 4px;
}

.preview-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 1.2rem 0;
}

.preview-text {
    font-size: 0.72rem;
    color: var(--text-weak);
    line-height: 1.5;
    text-align: left;
}

/* HEALTH BANNER & QUICK ACTIONS */
.system-health-banner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.health-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.health-lbl {
    font-size: 0.55rem;
    font-family: var(--font-mono);
    color: var(--text-weak);
    letter-spacing: 1px;
}

.health-val {
    font-size: 0.75rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #10b981;
}

.quick-actions-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.compact-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.compact-feed-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.7rem;
}

.compact-feed-item .feed-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: var(--brand-solid);
}

.badge-status-pill {
    font-size: 0.6rem;
    font-family: var(--font-mono);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 800;
}

.badge-status-pill.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ============================================================
   NOTIFICATION SYSTEM
   ============================================================ */
.notify {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 16px 28px;
    border-radius: 16px;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    font-family: var(--font-mono);
    z-index: 10000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.notify.visible {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.notify.success {
    border-left: 4px solid #27c93f;
    box-shadow: 0 20px 40px rgba(39, 201, 63, 0.15);
}

.notify.error {
    border-left: 4px solid #ff4444;
    box-shadow: 0 20px 40px rgba(255, 68, 68, 0.15);
}

/* Mobile Dashboard Adjustments */
@media (max-width: 1024px) {
    #dashboard-section {
        flex-direction: column;
    }

    .admin-sidebar {
        display: none; /* Hide sidebar on mobile */
    }

    .admin-topbar {
        display: block; /* Show topbar on mobile */
    }

    .admin-main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .topbar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 1rem;
    }

    .topbar-nav {
        display: flex;
        overflow-x: auto;
        gap: 5px;
        padding-bottom: 5px;
        scrollbar-width: none;
    }

    .topbar-nav::-webkit-scrollbar {
        display: none;
    }

    .topbar-nav .nav-item {
        padding: 10px 15px;
        border-radius: 10px;
        background: rgba(255,255,255,0.03);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .container {
        width: 98%;
        padding: 0 0.5rem;
    }

    .glass-panel {
        padding: 2rem 1rem;
        border-radius: 20px;
        margin-bottom: 2rem;
    }

    header {
        top: 10px;
        height: 60px;
        width: 98%;
    }

    .card {
        padding: 1.5rem !important;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.4rem;
    }
}

/* ============================================================
   PREMIUM CHATBOT WIDGET
   ============================================================ */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-body);
}

.chat-fab {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0284c7 0%, #22d3ee 100%);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 4001;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #020617;
    position: relative;
    overflow: hidden;
}

.chat-fab::after {
    display: none;
}

.chat-fab i {
    font-size: 1.5rem;
    color: #020617;
    transition: transform 0.3s ease;
}

.chat-fab:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 16px 40px rgba(34, 211, 238, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.chat-fab:hover i {
    transform: rotate(12deg) scale(1.1);
}

.chat-window {
    width: 380px;
    height: 540px;
    background: rgba(8, 12, 24, 0.88);
    backdrop-filter: blur(50px) saturate(210%);
    -webkit-backdrop-filter: blur(50px) saturate(210%);
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 26px;
    margin-bottom: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.85),
        0 0 40px rgba(34, 211, 238, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 4001;
    animation: chatOpen 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}
    animation: chatOpen 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

@keyframes chatOpen {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-window.active {
    display: flex;
}

.chat-tooltip {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 260px;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: var(--border-subtle);
    border-radius: 20px;
    padding: 18px;
    color: var(--text-medium);
    font-size: 0.85rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    z-index: 4002;
    animation: tooltipPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 25px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--bg-card);
}

.chat-tooltip-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-weak);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    transition: 0.3s;
}

.chat-tooltip-close:hover {
    background: var(--accent-solid);
    color: #fff;
}

.chat-tooltip h5 {
    color: var(--text-strong);
    font-size: 0.95rem;
    margin: 0;
}

.chat-tooltip p {
    margin: 0;
    line-height: 1.4;
}

.chat-tooltip .cta {
    color: var(--brand-solid);
    font-weight: 700;
    cursor: pointer;
}

@keyframes tooltipPop {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-avatar-frame {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.chat-version-tag {
    font-size: 0.58rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.35);
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: 'JetBrains Mono', monospace;
}

.close-chat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-chat:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.chat-header {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-strong);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.05), transparent 50%), #060913;
}

.msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 88%;
    font-size: 0.88rem;
    line-height: 1.6;
    position: relative;
    animation: msgReveal 0.35s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    will-change: transform, opacity;
}

.msg.bot::before {
    content: '🤖';
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #0284c7, #22d3ee);
    border-radius: 8px;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}

.msg.bot {
    background: rgba(30, 41, 59, 0.7);
    color: #f1f5f9;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.msg.user {
    flex-direction: row-reverse;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.online-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 12px #10b981;
    animation: pulseStatus 2s infinite;
}

@keyframes pulseStatus {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

.msg-content strong {
    color: var(--text-strong);
    font-weight: 700;
}

.msg-content a {
    color: #38bdf8;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s ease;
}
.msg-content a:hover {
    color: #7dd3fc;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 999px;
    color: #38bdf8;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.chat-chip:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.chat-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
}

.chat-typing-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #38bdf8;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.chat-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.chat-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.msg-time {
    font-size: 0.6rem;
    opacity: 0.4;
    margin-top: 5px;
    display: block;
    text-align: right;
}

.chat-input-area {
    padding: 14px 18px;
    background: rgba(8, 12, 24, 0.95);
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.chat-input-icon {
    position: absolute;
    left: 14px;
    font-size: 0.75rem;
    color: #22d3ee;
    pointer-events: none;
}

.chat-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 14px 10px 36px;
    color: #f8fafc;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.82rem;
    outline: none;
    transition: all 0.25s ease;
}

.chat-input:focus {
    border-color: #22d3ee;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.25);
}

.chat-send {
    background: #22d3ee;
    color: #020617;
    border: none;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.85rem;
}

.chat-send:hover {
    background: #38bdf8;
    transform: scale(1.06);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.5);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100% - 40px);
        height: 70vh;
        right: 20px;
    }
}

/* ============================================================
   FOXIT-STYLE PDF VIEWER (PREMIUM)
   ============================================================ */
/* OLD PDF VIEWER DEPRECATED */
/* ============================================================
   ULTRA-LUXURY STYLE INJECTION (ANTIGRAVITY)
   ============================================================ */

/* PREMIUM CYBER-BADGE LOGO DESIGN */
.logo, a.logo, .navbar .logo, .sidebar-header .logo, .topbar-header .logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    background: rgba(13, 17, 23, 0.6) !important;
    border: 1px solid rgba(96, 165, 250, 0.3) !important;
    border-radius: 12px !important;
    font-family: var(--font-display) !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    color: #ffffff !important;
    letter-spacing: 1px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(96, 165, 250, 0.1) !important;
    transition: var(--transition-smooth) !important;
    position: relative;
    overflow: hidden;
}

/* Glowing Indicator Dot */
.logo::before, a.logo::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--brand-solid);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--brand-solid);
    animation: badgePulse 2s infinite;
}

/* Colored span styling */
.logo span, a.logo span {
    color: var(--brand-solid) !important;
    text-shadow: 0 0 15px var(--brand-glow) !important;
    text-decoration: none !important;
}

/* Hover effects */
.logo:hover, a.logo:hover {
    background: rgba(30, 40, 60, 0.8) !important;
    border-color: var(--brand-solid) !important;
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.3), inset 0 0 20px rgba(96, 165, 250, 0.2) !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
}

/* Scanning effect on the logo badge */
.logo::after, a.logo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 0.1) 50%, transparent 75%);
    transform: rotate(30deg);
    animation: btnScan 5s infinite linear;
    pointer-events: none;
}

.primary-btn { position: relative; overflow: hidden; }
.primary-btn::after { content: ''; position: absolute; top: -50%; left: -150%; width: 200%; height: 200%; background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 0.3) 50%, transparent 75%); transform: rotate(30deg); animation: btnScan 4s infinite linear; }
@keyframes btnScan { 0% { left: -150%; } 20% { left: 150%; } 100% { left: 150%; } }
.card:hover { background: var(--bg-card-hover) !important; border-color: var(--brand-playful) !important; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 40px var(--brand-glow) !important; transform: translateY(-10px) scale(1.01); }
.gradient-text { filter: drop-shadow(0 0 15px var(--brand-glow)); display: inline-block; }
.section-badge { box-shadow: 0 0 15px var(--brand-glow); animation: badgePulse 3s infinite; }
@keyframes badgePulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.02); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } }
header:hover { border-color: var(--brand-playful); background: rgba(0, 10, 30, 0.6); }
. c a r d 
 
 . b t n 
 
 . g l a s s - p a n e l 
 
 . r e v e a l 
 
   w i l l - c h a n g e :   t r a n s f o r m ,   o p a c i t y ;   b a c k f a c e - v i s i b i l i t y :   h i d d e n ;   - w e b k i t - f o n t - s m o o t h i n g :   s u b p i x e l - a n t i a l i a s e d ;   
 
 
/* SECURITY REINFORCEMENT */
body { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
input, textarea { -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; }
@media print { body { display: none !important; } }

/* About Page Grid - Responsive */
.about-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 4rem;
    margin-top: 4rem;
}

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-grid aside {
        position: static !important;
    }
}

/* Experience Timeline Enhancement */
#xp-container {
    position: relative;
    padding-left: 2.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.05);
    margin-left: 1rem;
}

[data-theme="light"] #xp-container {
    border-left-color: rgba(15, 23, 42, 0.1);
}

/* Alternating Timeline Layout */
#xp-container {
    position: relative;
    padding: 2rem 0;
}

#xp-container::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--brand-solid);
    opacity: 0.3;
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: 4rem;
}

.timeline-item.right {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50%;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 2rem;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--bg-page);
    border: 3px solid var(--brand-solid);
    border-radius: 50%;
    z-index: 10;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: var(--brand-solid);
    border-radius: 50%;
}

.timeline-content {
    width: 85%;
    margin: 0 40px;
}

@media (max-width: 1024px) {
    #xp-container::before {
        left: 30px;
    }
    .timeline-item, .timeline-item.right {
        padding-left: 60px;
        padding-right: 0;
        justify-content: flex-start;
    }
    .timeline-dot {
        left: 30px;
    }
    .timeline-content {
        width: 100%;
        margin: 0;
    }
}

/* Veille Page Grid - Responsive */
.veille-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .veille-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .veille-grid aside {
        position: static !important;
    }
}


/* Contact Page Grid - Responsive */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@keyframes msgReveal {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}


/* ============================================================
   PREMIUM APPLE LIQUID GLASS � Skill Cards
   ============================================================ */

.skill-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.02) 60%,
        rgba(0, 242, 255, 0.03) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15),
        inset 1px 0 0 rgba(255, 255, 255, 0.08) !important;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
    position: relative;
    overflow: hidden !important;
}

/* Top glass sheen � Apple signature effect */
.skill-card::before {
    content: "" !important;
    position: absolute !important;
    top: 0; left: 0; right: 0;
    height: 55%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(255, 255, 255, 0.02) 60%,
        transparent 100%
    ) !important;
    border-radius: 24px 24px 0 0;
    pointer-events: none;
    z-index: 0;
    opacity: 1 !important;
}

/* Glow border on hover */
.skill-card:hover {
    transform: translateY(-8px) scale(1.01) !important;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(0, 242, 255, 0.05) 60%,
        rgba(255, 255, 255, 0.06) 100%
    ) !important;
    border-color: rgba(0, 242, 255, 0.5) !important;
    border-top-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 242, 255, 0.25),
        0 0 40px rgba(0, 242, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
}

/* Skill icon container premium */
.skill-card .skill-icon-box {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.12), rgba(14, 165, 233, 0.08)) !important;
    border: 1px solid rgba(0, 242, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.1) !important;
}

/* Skill item rows premium */
.skill-item-row {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-item-row {
    background: rgba(0, 242, 255, 0.04) !important;
    border-color: rgba(0, 242, 255, 0.15) !important;
}

/* Light theme overrides for skill cards */
:root[data-theme="light"] .skill-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.3) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05) !important;
}

:root[data-theme="light"] .skill-card:hover {
    border-color: rgba(14, 165, 233, 0.5) !important;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.12),
        0 0 30px rgba(14, 165, 233, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* ============================================================
   PREMIUM GLASS � About Page Timeline & Diploma Cards
   ============================================================ */

#xp-container .card,
#diploma-container .card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(255, 255, 255, 0.02) 60%,
        rgba(0, 242, 255, 0.02) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
    position: relative;
    overflow: hidden !important;
}

#xp-container .card::before,
#diploma-container .card::before {
    content: "" !important;
    position: absolute !important;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.06) 0%,
        transparent 100%
    ) !important;
    pointer-events: none;
    z-index: 0;
    opacity: 1 !important;
}

#xp-container .card:hover,
#diploma-container .card:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(0, 242, 255, 0.35) !important;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 242, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

:root[data-theme="light"] #xp-container .card,
:root[data-theme="light"] #diploma-container .card {
    background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(255,255,255,0.3)) !important;
    border: 1px solid rgba(255,255,255,0.8) !important;
    border-top: 1px solid rgba(255,255,255,0.95) !important;
    box-shadow: 0 8px 30px rgba(15,23,42,0.07), inset 0 1px 0 rgba(255,255,255,0.9) !important;
}



/* ============================================================
   RESPONSIVE MOBILE & MICRO-INTERACTIONS  Premium Fluidity
   ============================================================ */

/* --- Touch-Optimized Micro-Interactions (Global but mostly for mobile) --- */
@media (hover: none) and (pointer: coarse) {
    /* Add spring physics to touch targets */
    .btn, .card, .project-card, .skill-card, .logo-btn, .nav-dropdown > a {
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease !important;
    }
    
    .btn:active, .card:active, .project-card:active, .skill-card:active, .logo-btn:active, .nav-dropdown > a:active {
        transform: scale(0.95) !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
    }

    /* Force hardware acceleration on background for better performance on mobile */
    .aurora-container, .glass-panel {
        will-change: transform, opacity;
        transform: translateZ(0);
    }
}

/* ============================================================
   FLUID RESPONSIVE DESIGN (< 1024px)
   ============================================================ */

@media (max-width: 1024px) {
    /* === FLUID LAYOUT & SPACING === */
    .container {
        padding: 0 clamp(1rem, 4vw, 2rem) !important;
    }

    main.container {
        padding-top: clamp(80px, 12vh, 120px) !important;
    }

    /* === PREMIUM FLUID NAVBAR === */
    header {
        width: calc(100% - clamp(16px, 4vw, 32px)) !important;
        top: clamp(8px, 2vw, 16px) !important;
        left: clamp(8px, 2vw, 16px) !important;
        right: clamp(8px, 2vw, 16px) !important;
        transform: none !important;
    }

    .navbar {
        padding: 0 clamp(1rem, 3vw, 1.5rem) !important;
        height: clamp(60px, 8vh, 70px) !important;
        border-radius: 16px !important;
    }

    .logo-btn {
        font-size: clamp(1rem, 4vw, 1.3rem) !important;
    }

    /* Mobile Menu Fullscreen with Staggered Animations */
    #nav-menu {
        position: fixed;
        top: 0; left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(3, 7, 18, 0.97) !important;
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 1.2rem;
        z-index: 9998;
        display: flex;
        opacity: 0;
        visibility: hidden;
        clip-path: circle(0% at top right);
        transition: clip-path 0.7s cubic-bezier(0.86, 0, 0.07, 1), opacity 0.4s ease, visibility 0.7s;
        padding: 6rem 1.5rem 3rem 1.5rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #nav-menu.active {
        opacity: 1;
        visibility: visible;
        clip-path: circle(150% at top right);
    }

    #nav-menu li {
        width: 100%;
        max-width: 360px;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    #nav-menu.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered delays for nav items */
    #nav-menu.active li:nth-child(1) { transition-delay: 0.06s; }
    #nav-menu.active li:nth-child(2) { transition-delay: 0.12s; }
    #nav-menu.active li:nth-child(3) { transition-delay: 0.18s; }
    #nav-menu.active li:nth-child(4) { transition-delay: 0.24s; }
    #nav-menu.active li:nth-child(5) { transition-delay: 0.30s; }
    #nav-menu.active li:nth-child(6) { transition-delay: 0.36s; }
    #nav-menu.active li:nth-child(7) { transition-delay: 0.42s; }

    #nav-menu li a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        padding: 12px 20px;
        border-radius: 14px;
        font-size: clamp(1rem, 4.5vw, 1.3rem) !important;
        letter-spacing: 2px;
        color: var(--text-strong) !important;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.07);
        text-decoration: none;
        transition: all 0.25s ease;
        box-sizing: border-box;
    }

    #nav-menu li a:hover,
    #nav-menu li a.active {
        background: rgba(34, 211, 238, 0.12);
        border-color: rgba(34, 211, 238, 0.35);
        color: #ffffff !important;
        box-shadow: 0 4px 20px rgba(34, 211, 238, 0.2);
    }

    .nav-dropdown {
        width: 100%;
        max-width: 360px;
    }

    .nav-dropdown .dropdown-content {
        display: flex !important;
        position: static !important;
        transform: none !important;
        width: 100% !important;
        max-width: 360px !important;
        box-shadow: none !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 12px !important;
        padding: 6px !important;
        margin-top: 6px !important;
        opacity: 1 !important;
        visibility: visible !important;
        gap: 4px !important;
        box-sizing: border-box !important;
    }

    .nav-dropdown .dropdown-item {
        font-size: 0.75rem !important;
        padding: 10px 14px !important;
        color: rgba(226, 232, 240, 0.85) !important;
        border-radius: 8px !important;
        justify-content: flex-start !important;
        background: transparent !important;
        border: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .nav-dropdown .dropdown-item:hover,
    .nav-dropdown .dropdown-item.active {
        background: rgba(34, 211, 238, 0.12) !important;
        color: #22d3ee !important;
    }

    .nav-status-monitor, .theme-switch-wrapper {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        z-index: 10001;
    }

    /* === FLUID HERO SECTION === */
    .home-hero,
    body:has(.topology-container) #hero {
        min-height: clamp(75vh, 90vh, 100vh) !important;
    }

    main.container > #hero {
        min-height: auto !important;
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    #hero h1,
    h1 {
        font-size: clamp(2.2rem, 9vw, 3.8rem) !important;
        line-height: 1.1 !important;
        letter-spacing: -1.5px !important;
        text-wrap: balance;
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem) !important;
        line-height: 1.6 !important;
    }

    /* === DYNAMIC BENTO GRID (Auto-flowing) === */
    .bento-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
    }

    .bento-grid > div,
    .bento-grid > article,
    .bento-grid .span-8,
    .bento-grid .span-6,
    .bento-grid .span-4,
    .bento-grid .span-12 {
        grid-column: span 12 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: clamp(1.2rem, 4vw, 2rem) !important;
        box-sizing: border-box !important;
    }

    .project-card, .card {
        padding: clamp(1.2rem, 4vw, 2rem) !important;
        border-radius: clamp(16px, 4vw, 24px) !important;
    }

    /* === OTHER GRIDS FLUIDITY === */
    .about-grid, .contact-grid, .veille-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: clamp(1.5rem, 5vw, 3rem) !important;
    }

    .about-grid aside, .veille-grid aside {
        position: static !important;
    }

    .system-stats {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        gap: clamp(0.6rem, 2vw, 1rem) !important;
        padding: 1.2rem 1rem !important;
    }

    .stat-value {
        font-size: clamp(1.1rem, 4vw, 1.5rem) !important;
    }

    /* === MISC IMPROVEMENTS === */
    .timeline-item {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .timeline-item.right {
        flex-direction: column !important;
    }

    .timeline-dot {
        display: none !important;
    }

    .filter-buttons-group {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        max-width: 100% !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }

    .filter-buttons-group::-webkit-scrollbar { display: none; }

    .section-badge {
        font-size: clamp(0.5rem, 2vw, 0.65rem) !important;
        padding: clamp(4px, 1.5vw, 6px) clamp(10px, 3vw, 16px) !important;
    }

    #chatbot-widget {
        width: calc(100% - clamp(16px, 4vw, 32px)) !important;
        height: clamp(60vh, 70vh, 80vh) !important;
        bottom: clamp(60px, 10vh, 80px) !important;
        right: clamp(8px, 2vw, 16px) !important;
        left: clamp(8px, 2vw, 16px) !important;
    }

    input, textarea {
        font-size: clamp(0.9rem, 3vw, 1rem) !important;
        padding: clamp(0.8rem, 3vw, 1rem) !important;
    }

    .btn {
        padding: clamp(12px, 3vw, 16px) clamp(20px, 5vw, 32px) !important;
        font-size: clamp(0.75rem, 2.5vw, 0.85rem) !important;
    }

    .hide-mobile {
        display: none !important;
    }
}

/* ======================================================================
   TECHENCLAIR-INSPIRED EDITORIAL PROJECT SHOWCASE & STUDIO DESIGN SYSTEM
   ====================================================================== */

/* 1. EDITORIAL SHOWCASE PROJECT CARDS */
.editorial-project-card {
    position: relative;
    background: linear-gradient(180deg, rgba(12, 17, 29, 0.75) 0%, rgba(6, 9, 16, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 3.5rem;
    overflow: hidden;
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-project-card:hover {
    border-color: rgba(34, 211, 238, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 35px 80px -10px rgba(0, 0, 0, 0.9), 0 0 40px rgba(34, 211, 238, 0.12);
}

.editorial-project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.editorial-project-card:hover::before {
    opacity: 1;
}

.editorial-grid-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
}

@media (max-width: 1024px) {
    .editorial-grid-layout {
        grid-template-columns: 1fr;
    }
}

.project-meta-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.project-number-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--ha-cyan);
    letter-spacing: 2px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.25);
    padding: 4px 12px;
    border-radius: 999px;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.project-category-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.status-indicator-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    margin-left: auto;
}

.status-indicator-pill.production {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-indicator-pill.production .live-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: dotPulse 2s infinite;
}

.status-indicator-pill.lab {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-indicator-pill.lab .live-dot {
    width: 6px;
    height: 6px;
    background: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 8px #38bdf8;
}

.status-indicator-pill.security {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.editorial-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 1.2rem;
}

.editorial-description {
    font-size: clamp(0.95rem, 1.5vw, 1.08rem);
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 1.8rem;
    max-width: 680px;
}

.editorial-specs-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 2rem;
}

.specs-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--ha-cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.specs-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-spec-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 12px;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.tech-spec-pill:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.3);
    color: #ffffff;
}

.editorial-actions-group {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.btn-editorial-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #22d3ee 100%);
    color: #040810 !important;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 14px 28px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(34, 211, 238, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-editorial-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 35px rgba(34, 211, 238, 0.5);
}

.btn-editorial-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0 !important;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 14px 24px;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-editorial-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
}

/* VISUAL STAGE & SCREENSHOT MOCKUP */
.editorial-visual-stage {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(3, 7, 18, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-mockup-frame {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.mockup-top-bar {
    height: 36px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 6px;
}

.mockup-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.mockup-dot.red { background: #ef4444; opacity: 0.8; }
.mockup-dot.yellow { background: #f59e0b; opacity: 0.8; }
.mockup-dot.green { background: #10b981; opacity: 0.8; }

.mockup-url-bar {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    color: #64748b;
    letter-spacing: 1px;
}

.mockup-screen-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-blueprint-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.08) 0%, rgba(2, 6, 23, 0.8) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.mockup-center-icon {
    font-size: 3.5rem;
    color: var(--ha-cyan);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.5));
}

.mockup-center-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #fff;
    letter-spacing: 3px;
    font-weight: 800;
    text-transform: uppercase;
}

/* 2. REINVENTED "STUDIO DE GESTION" COCKPIT */
#dashboard-section,
.studio-cockpit-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    background: #02040a;
    padding-bottom: 5rem;
    overflow-x: hidden;
    box-sizing: border-box;
}

.studio-top-nav {
    background: rgba(8, 12, 22, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.studio-brand-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.studio-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff;
    text-decoration: none;
}

.studio-logo span {
    color: var(--ha-cyan);
}

.studio-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 4px 12px;
    border-radius: 999px;
}

.studio-top-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.studio-hero-banner {
    padding: 3rem 2.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.studio-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.studio-title-block h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.studio-title-block p {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0;
    max-width: 600px;
}

/* KPI STRIP */
.studio-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.studio-kpi-card {
    background: rgba(12, 17, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1.5rem 1.6rem;
    transition: all 0.3s ease;
}

.studio-kpi-card:hover {
    border-color: rgba(34, 211, 238, 0.25);
    transform: translateY(-2px);
    background: rgba(15, 23, 42, 0.7);
}

.kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.kpi-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #94a3b8;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
}

.kpi-icon {
    font-size: 1rem;
    color: var(--ha-cyan);
    opacity: 0.8;
}

.kpi-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.kpi-subtext {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #64748b;
}

/* STUDIO TABS NAV */
.studio-tabs-bar {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.studio-tabs-bar::-webkit-scrollbar { display: none; }

.studio-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.studio-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.studio-tab-btn.active {
    background: rgba(34, 211, 238, 0.12);
    color: var(--ha-cyan);
    border: 1px solid rgba(34, 211, 238, 0.25);
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

/* EDITORIAL PROJECT MANAGER ROWS */
.studio-projects-stream {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.studio-project-card-row {
    background: rgba(10, 15, 28, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 22px;
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: 80px 1.5fr 1fr 180px;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .studio-project-card-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }
}

.studio-project-card-row:hover {
    background: rgba(14, 21, 38, 0.8);
    border-color: rgba(34, 211, 238, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.studio-row-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ha-cyan);
    letter-spacing: 2px;
}

.studio-row-main h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.3rem 0;
}

.studio-row-main p {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.studio-row-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.studio-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* HIGH-END MODAL */
.studio-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 10, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.studio-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.studio-modal-card {
    background: rgba(11, 17, 32, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-modal-backdrop.active .studio-modal-card {
    transform: scale(1);
}

/* ============================================================
   TP SECTIONS & EDITORIAL CHAPTER ENGINE (WINDOWS, LINUX, CISCO)
   ============================================================ */
.editorial-chapter-header {
    margin: 3.5rem 0 1.8rem 0;
    padding: 1.6rem 2rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(10, 15, 28, 0.7) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
}

.editorial-chapter-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--chapter-accent, #22d3ee);
    box-shadow: 0 0 15px var(--chapter-accent, #22d3ee);
}

.editorial-chapter-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.editorial-chapter-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--chapter-accent, #22d3ee);
}

.editorial-chapter-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.editorial-chapter-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--chapter-accent, #22d3ee);
}

.editorial-chapter-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
}

.editorial-chapter-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 2px;
}

.editorial-chapter-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* SECTION THEME ACCENTS */
.chapter-windows {
    --chapter-accent: #38bdf8;
}
.chapter-linux {
    --chapter-accent: #f59e0b;
}
.chapter-reseau {
    --chapter-accent: #22d3ee;
}
.chapter-securite {
    --chapter-accent: #10b981;
}
.chapter-virt {
    --chapter-accent: #a855f7;
}
.chapter-autre {
    --chapter-accent: #64748b;
}

/* Section Tag in Cards */
.section-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid currentColor;
}
.section-tag-pill.tp-windows {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
}
.section-tag-pill.tp-linux {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.25);
}
.section-tag-pill.tp-reseau {
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.25);
}
.section-tag-pill.tp-securite {
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
}
.section-tag-pill.tp-virt {
    color: #c084fc;
    background: rgba(192, 132, 252, 0.08);
    border-color: rgba(192, 132, 252, 0.25);
}
.section-tag-pill.tp-autre {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.25);
}

/* Studio Group Section Header */
.studio-group-header {
    margin: 2rem 0 1rem 0;
    padding: 0.9rem 1.4rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.studio-group-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.studio-group-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: 0.5px;
}

/* ============================================================
   2026 NATIVE MOBILE UX & MASTER-TIER RESPONSIVE ENGINE
   ============================================================ */

/* Global Viewport & Touch Stability */
html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
}

body.menu-open {
    overflow: hidden !important;
    touch-action: none;
}

/* Touch targets and media elements */
img, svg, video, canvas, iframe {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   TOPOLOGY INFRASTRUCTURE DIAGRAM (DESKTOP & MOBILE)
   ============================================================ */
.topology-container {
    width: 100%;
    max-width: 960px;
    margin: 2rem auto;
    padding: 3rem 2.2rem 2.2rem 2.2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 15, 28, 0.85);
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(34, 211, 238, 0.08);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-sizing: border-box;
}

.topo-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.2rem 1.4rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    min-width: 140px;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.topo-node:hover {
    border-color: rgba(34, 211, 238, 0.4);
    transform: translateY(-2px);
}

.topo-node i {
    font-size: 1.8rem;
    color: var(--ha-cyan, #22d3ee);
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.5));
}

.topo-node .server-icons {
    display: flex;
    gap: 8px;
    margin-bottom: 0.6rem;
}

.topo-node .server-icons i {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.topo-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1.5px;
}

.topo-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 4px;
}

.topo-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.2), rgba(34, 211, 238, 0.8), rgba(34, 211, 238, 0.2));
    position: relative;
    margin: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topo-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    background: #22d3ee;
    border-radius: 50%;
    box-shadow: 0 0 12px #22d3ee;
    animation: flowPulseX 2.8s infinite linear;
}

.topo-badge {
    position: absolute;
    top: -24px;
    padding: 3px 10px;
    background: rgba(10, 15, 28, 0.95);
    border: 1px solid rgba(34, 211, 238, 0.4);
    border-radius: 999px;
    font-size: 0.62rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #22d3ee;
    white-space: nowrap;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

@keyframes flowPulseX {
    0% { left: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

@keyframes flowPulseY {
    0% { top: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ============================================================
   EDITORIAL PROJECT CARD INTERNALS & GRID ADAPTATION
   ============================================================ */
.editorial-card-inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(1.8rem, 4vw, 3.5rem);
    align-items: center;
}

.editorial-card-reversed {
    grid-template-columns: 0.85fr 1.15fr;
}

.editorial-card-reversed .editorial-info-pane {
    order: 2;
}

.editorial-card-reversed .editorial-visual-stage {
    order: 1;
}

.editorial-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 1.2rem 0;
    padding: 1rem 1.2rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
}

.editorial-spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.editorial-spec-item .spec-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    color: var(--ha-cyan, #22d3ee);
    letter-spacing: 1.5px;
    font-weight: 700;
}

.editorial-spec-item .spec-value {
    font-size: 0.82rem;
    color: #e2e8f0;
    font-weight: 500;
}

.editorial-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1.2rem 0;
}

.editorial-cta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.editorial-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.editorial-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--ha-cyan, #22d3ee);
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.25);
    padding: 3px 10px;
    border-radius: 999px;
}

.editorial-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-left: auto;
}

.editorial-project-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 1rem 0;
}

.editorial-project-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.editorial-project-title a:hover {
    color: var(--ha-cyan, #22d3ee);
}

.editorial-project-desc {
    font-size: clamp(0.9rem, 2vw, 1.02rem);
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 1.4rem;
}

/* ============================================================
   TABLET RESPONSIVE RULES (MAX-WIDTH: 1024PX)
   ============================================================ */
@media (max-width: 1024px) {
    .editorial-grid-layout,
    .editorial-card-inner,
    .editorial-card-reversed {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.8rem !important;
    }

    .editorial-card-reversed .editorial-info-pane {
        order: 1 !important;
    }

    .editorial-card-reversed .editorial-visual-stage {
        order: 2 !important;
    }

    .editorial-visual-stage {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Chapter Header */
    .editorial-chapter-header,
    .project-chapter-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 1.4rem !important;
    }

    .chapter-header-right {
        align-self: flex-start !important;
    }
}

/* ============================================================
   SMARTPHONE RESPONSIVE RULES (MAX-WIDTH: 768PX)
   ============================================================ */
@media (max-width: 768px) {
    /* Touch Target Optimization */
    button, .btn, .nav-link, .filter-buttons-group button, .tag-pill, .section-tag-pill {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Container Spacing */
    .container, main, .editorial-header-section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* TOPOLOGY IN VERTICAL STACK ON MOBILE */
    .topology-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
        padding: 2.8rem 1.2rem 1.6rem 1.2rem !important;
        margin: 1.5rem auto !important;
    }

    .topo-node {
        width: 100% !important;
        min-width: 0 !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        text-align: left !important;
        gap: 16px !important;
        padding: 1rem 1.2rem !important;
    }

    .topo-node i {
        font-size: 1.6rem !important;
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }

    .topo-node .server-icons {
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }

    .topo-title {
        font-size: 0.8rem !important;
    }

    .topo-sub {
        font-size: 0.7rem !important;
    }

    .topo-line {
        width: 2px !important;
        height: 28px !important;
        flex: none !important;
        margin: 0 auto !important;
        background: linear-gradient(180deg, rgba(34, 211, 238, 0.3), rgba(34, 211, 238, 0.95), rgba(34, 211, 238, 0.3)) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
    }

    .topo-dot {
        animation: flowPulseY 2.5s infinite linear !important;
        left: -2.5px !important;
    }

    .topo-badge {
        position: absolute !important;
        left: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        font-size: 0.6rem !important;
    }

    /* System Stats Grid */
    .system-stats {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        gap: 0.8rem !important;
        padding: 1.2rem 1rem !important;
    }

    /* Filter Buttons Bar: Smooth Horizontal Scroll */
    .filter-buttons-group {
        overflow-x: auto !important;
        white-space: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 6px 8px !important;
        border-radius: 16px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        display: flex !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
    }

    .filter-buttons-group::-webkit-scrollbar {
        display: none !important;
    }

    .filter-buttons-group button {
        flex-shrink: 0 !important;
        font-size: 0.72rem !important;
        padding: 8px 16px !important;
    }

    /* Search Input Mobile */
    .search-container {
        max-width: 100% !important;
        width: 100% !important;
    }

    .search-container input {
        font-size: 16px !important; /* Prevents iOS auto-zoom */
        padding: 14px 16px 14px 50px !important;
    }

    /* Editorial Cards on Mobile */
    .editorial-project-card {
        padding: 1.4rem !important;
        border-radius: 20px !important;
        margin-bottom: 2rem !important;
    }

    .editorial-status-pill {
        margin-left: 0 !important;
        width: 100%;
        margin-top: 4px;
    }

    .editorial-specs-grid {
        grid-template-columns: 1fr !important;
        padding: 0.9rem !important;
        gap: 10px !important;
    }

    .editorial-cta-row {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .editorial-cta-row a,
    .editorial-cta-row button {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .btn-editorial-cta {
        width: 100% !important;
        justify-content: center !important;
        padding: 13px 20px !important;
        font-size: 0.8rem !important;
    }

    .btn-editorial-ghost {
        width: 100% !important;
        justify-content: center !important;
        padding: 13px 20px !important;
        font-size: 0.8rem !important;
    }

    .editorial-visual-stage {
        aspect-ratio: 16/11 !important;
        min-height: 190px !important;
    }

    /* Studio Header Mobile */
    .studio-group-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        padding: 0.8rem 1rem !important;
    }
}

/* ============================================================
   EXTRA COMPACT SCREENS (MAX-WIDTH: 480PX)
   ============================================================ */
@media (max-width: 480px) {
    /* Responsive Typographic Hierarchy */
    h1 {
        font-size: clamp(2rem, 8.5vw, 2.6rem) !important;
        line-height: 1.15 !important;
        letter-spacing: -1px !important;
    }

    h2 {
        font-size: clamp(1.4rem, 6vw, 1.8rem) !important;
        line-height: 1.25 !important;
    }

    h3 {
        font-size: clamp(1.1rem, 4.8vw, 1.35rem) !important;
        line-height: 1.3 !important;
    }

    .hero-subtitle {
        font-size: 0.92rem !important;
        line-height: 1.6 !important;
    }

    /* Navbar on compact mobile */
    .navbar {
        padding: 0 12px !important;
        height: 58px !important;
    }

    .logo-btn {
        font-size: 1.05rem !important;
        letter-spacing: 0.5px !important;
    }

    .nav-right .btn {
        padding: 6px 12px !important;
        font-size: 10px !important;
    }

    /* System Stats 2x2 on phones */
    .system-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
        padding: 1rem 0.8rem !important;
    }

    .system-stats .stat-item:nth-child(3):last-child {
        grid-column: span 2 !important;
    }

    .stat-value {
        font-size: 1.4rem !important;
    }

    .stat-label {
        font-size: 0.6rem !important;
    }

    /* Forms */
    input, textarea, select {
        font-size: 16px !important;
        padding: 12px 14px !important;
    }

    #contact-form button[type="submit"] {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Footer */
    footer {
        padding: 2.5rem 1rem !important;
    }

    footer .mono {
        letter-spacing: 0.1em !important;
        font-size: 10px !important;
        text-align: center !important;
    }
}

/* ============================================================
   CHATBOT MOBILE FULLSCREEN SHEET (MAX-WIDTH: 600PX)
   ============================================================ */
@media (max-width: 600px) {
    .chat-widget {
        bottom: 16px !important;
        right: 16px !important;
    }

    .chat-fab {
        width: 52px !important;
        height: 52px !important;
        border-radius: 16px !important;
    }

    .chat-tooltip {
        right: 0 !important;
        bottom: 72px !important;
        width: min(290px, calc(100vw - 32px)) !important;
    }

    .chat-window {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100% !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        z-index: 10005 !important;
        background: rgba(4, 8, 18, 0.98) !important;
        backdrop-filter: blur(50px) saturate(200%) !important;
        -webkit-backdrop-filter: blur(50px) saturate(200%) !important;
        display: none;
        flex-direction: column !important;
        border: none !important;
    }

    .chat-window.active {
        display: flex !important;
    }

    .chat-header {
        padding: 1.2rem 1.2rem !important;
        border-radius: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .chat-messages {
        flex: 1 !important;
        padding: 1.2rem !important;
        max-height: none !important;
    }

    .chat-input-area {
        padding: 12px 14px 20px 14px !important;
    }

    .chat-input {
        font-size: 16px !important;
    }
}




