:root {
    --bg-midnight: #030406;
    --bg-slate: #0F172A;

    /* Architect Palette - More Vibrant & Pure */
    --accent-cyan: #22D3EE;
    --accent-emerald: #10B981;
    --accent-amethyst: #8B5CF6;
    --accent-rose: #F43F5E;
    --accent-amber: #F59E0B;
    --accent-indigo: #6366F1;
    --accent-magenta: #D946EF;
    --accent-whatsapp: #25D366;
    --accent-telegram: #0088cc;

    --text-primary: #F8FAFC;
    --text-slate: #94A3B8;
    --glass-border: rgba(255, 255, 255, 0.15);
    --liquid-blur: blur(12px) saturate(150%);

    /* Dedicated Magnetic Storage */
    --mag-x: 0px;
    --mag-y: 0px;

    /* Interactive Mesh Variables */
    --mouse-x: 50%;
    --mouse-y: 50%;
}

#cursor-mesh {
    will-change: transform;
    pointer-events: none;
    background-image: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(34, 211, 238, 0.15) 0%, transparent 40%);
    transition: transform 0.1s ease-out;
}

.container-intel {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 768px) {
    .container-intel {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

[x-cloak] {
    display: none !important;
}

body {
    background-color: var(--bg-midnight);
    /* Static Background Components */
    background-image:
        radial-gradient(circle at 0% 0%, rgba(244, 63, 94, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(at 50% 100%, #111827 0px, transparent 60%),
        radial-gradient(circle at 80% 50%, rgba(34, 211, 238, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.7;
    /* Enhanced for academic readability */
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Crystal Glass 4.0 - Layered Architectural Glass */
.glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: var(--liquid-blur);
    -webkit-backdrop-filter: var(--liquid-blur);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.glass::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.65' 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;
    z-index: 1;
}

.glass::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    z-index: -1;
}

.glass-honed {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 40px 100px -20px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.glass-hover {
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1), background 0.4s, border-color 0.4s;
    /* Composite Transform: Lift + Magnetic */
    transform: translateY(var(--hover-lift, 0px)) translate3d(var(--mag-x), var(--mag-y), 0) scale(var(--hover-scale, 1));
}

.glass-hover:hover {
    --hover-lift: -10px;
    --hover-scale: 1.01;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
}

/* Prismatic Accent Borders */
.border-prismatic {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: inset 0 0 15px rgba(99, 102, 241, 0.1);
}

/* Multi-colored Accent Utilities - Re-honed */
.text-indigo {
    color: var(--accent-indigo);
}

.text-magenta {
    color: var(--accent-magenta);
}

.bg-indigo-soft {
    background: rgba(99, 102, 241, 0.15);
}

.bg-magenta-soft {
    background: rgba(217, 70, 239, 0.15);
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.99);
    transition: all 1.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Typography */
.font-mono {
    font-family: 'Roboto Mono', monospace;
}

.tracking-intel {
    letter-spacing: 0.3em;
}

.gradient-text {
    background: linear-gradient(135deg, #FFF 0%, var(--accent-cyan) 50%, var(--accent-amethyst) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Skill Icon Integration */
.skill-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 11px;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.skill-tag-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 10px;
    font-family: 'Roboto Mono', monospace;
    color: var(--text-slate);
    transition: all 0.3s ease;
}

.skill-tag-sm:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.skill-brand-icon {
    width: 14px;
    height: 14px;
}

/* Navigation Redesign: Floating Island */
.nav-island {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90vw;
    z-index: 1000;
}

/* Mobile Toggle Fix */
button.md\:hidden {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-overlay {
    background: rgba(3, 4, 6, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
}

.nav-link {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), color 0.3s;
    transform: translate3d(var(--mag-x), var(--mag-y), 0);
}

.nav-link.active {
    color: var(--accent-rose);
}

.nav-link.active::after {
    background: var(--accent-rose);
    box-shadow: 0 0 15px var(--accent-rose);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.04em;
    font-weight: 800;
}

/* Dual Cert Gallery Parallax */
.cert-card {
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.cert-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
}

/* Cyber-Industrial Footer */
.footer-link {
    color: var(--text-slate);
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: white;
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .container-intel {
        padding: 0 1rem;
    }

    .liquid-blob {
        width: 300px;
        height: 300px;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid var(--bg-midnight);
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* CV Interactive Hotspots */
.cv-hotspot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--accent-cyan);
    border-radius: 9999px;
    cursor: pointer;
    z-index: 50;
}

.cv-hotspot::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: var(--accent-cyan);
    border-radius: inherit;
    opacity: 0.4;
    animation: hotspot-pulse 2s infinite;
}

@keyframes hotspot-pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.hotspot-tooltip {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(3, 4, 6, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 12px;
    color: white;
    font-size: 10px;
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.cv-hotspot:hover .hotspot-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Modal Transitions */
.modal-overlay {
    background: rgba(3, 4, 6, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

/* --- Phase N: CV Modal Aesthetic Overhaul --- */

/* Premium Glassmorphism Clusters */
.glass-premium {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
}

/* Consolidating pseudo-layers into main container */
.glass-premium:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Vibrant Gradient Typography */
.text-gradient-cyan {
    background: linear-gradient(135deg, #22D3EE, #10B981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-purple {
    background: linear-gradient(135deg, #818CF8, #D946EF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-rose {
    background: linear-gradient(135deg, #FB7185, #F59E0B);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Modal Entrance Sequence */
.modal-reveal {
    animation: modalReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalReveal {
    0% {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.stagger-item {
    opacity: 0;
    transform: translateY(10px);
    animation: staggerFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glowing Border Action */
.btn-glow-cyan {
    position: relative;
    background: var(--accent-cyan);
    color: var(--bg-midnight);
    transition: all 0.3s ease;
}

.btn-glow-cyan:hover {
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.4);
    transform: translateY(-1px);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}