@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 300;
    src: url(https://crearts-community.github.io/Assets/fonts/quicksand/quicksand-300.woff2) format("woff2");
}
@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 400;
    src: url(https://crearts-community.github.io/Assets/fonts/quicksand/quicksand-400.woff2) format("woff2");
}
@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 500;
    src: url(https://crearts-community.github.io/Assets/fonts/quicksand/quicksand-500.woff2) format("woff2");
}
@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 600;
    src: url(https://crearts-community.github.io/Assets/fonts/quicksand/quicksand-600.woff2) format("woff2");
}
@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 700;
    src: url(https://crearts-community.github.io/Assets/fonts/quicksand/quicksand-700.woff2) format("woff2");
}

:root {
    --font: "Quicksand";
    --code-font: "Consolas";
}

body {
    font-family: var(--font), sans-serif;
}

/* Tailwind utility can still force mono in markup; keep UI text Quicksand */
.font-mono:not(code):not(pre):not(kbd):not(samp) {
    font-family: var(--font), sans-serif !important;
}

code,
pre,
kbd,
samp {
    font-family: var(--code-font), "Courier New", monospace;
}

/* =========================================
   SPLASH SCREEN STYLES (From Original)
   ========================================= */
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #0a0a0a;
    color: #f0f0f0;
    font-family: "Quicksand", sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 1.5s ease-in-out, visibility 1.5s;
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#splash-screen h1,
.glitch-text {
    font-size: 5rem;
    letter-spacing: 0.15rem;
    margin: 0;
    text-transform: uppercase;
    position: relative;
}

#splash-screen .xx {
    letter-spacing: -1.5rem;
    margin-right: 2.2rem;
}

#splash-screen h1::after {
    content: "";
    display: block;
    width: 100px;
    height: 4px;
    background: #00ff88;
    margin: 20px auto;
    box-shadow: 0 0 10px #00ff88;
}

#splash-screen p {
    font-size: 1.2rem;
    color: #888;
    margin-top: 20px;
}

#splash-screen .banner-green {
    margin-top: 40px;
    padding: 10px 25px;
    border: 1px solid #00ff88;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

/* Glitch Effect (DOM Based) */
.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.glitch-text {
    position: relative;
    color: #f0f0f0;
    margin: 0;
    z-index: 10;
}

/* New top logo animation: neon scan + flicker */
.brand-neo {
    position: relative;
    display: inline-block;
}

.brand-neo-text {
    position: relative;
    text-shadow: 0 0 0 rgba(0, 255, 136, 0);
    animation: brand-neo-flicker 4.8s infinite;
}

@keyframes brand-neo-flicker {
    0%, 100% { text-shadow: 0 0 0 rgba(0, 255, 136, 0); }
    12% { text-shadow: 0 0 6px rgba(0, 255, 136, 0.35); }
    24% { text-shadow: 0 0 0 rgba(0, 255, 136, 0); }
    40% { text-shadow: -1px 0 rgba(255, 0, 193, 0.6), 1px 0 rgba(0, 255, 249, 0.6); }
    55% { text-shadow: 0 0 0 rgba(0, 255, 136, 0); }
    70% { text-shadow: 0 0 8px rgba(0, 255, 136, 0.4); }
    85% { text-shadow: -1px 0 rgba(255, 0, 193, 0.4), 1px 0 rgba(0, 255, 249, 0.4); }
}

/* Mobile full-width fix */
@media (max-width: 640px) {
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .section-spy {
        width: 100%;
    }
    body {
        overflow-x: hidden;
    }
}

/* Admin GitHub sync collapse */
#github-sync {
    transition: transform 0.3s ease, opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}
#github-sync.github-collapsed {
    opacity: 0.3;
    max-height: 24px;
    overflow: hidden;
    padding-top: 6px;
    padding-bottom: 6px;
}


/* Always-on subtle glitch for brand text (layer slices, low blur) */
.brand-glitch {
    position: relative;
    display: inline-block;
    animation: brand-glitch-blur 3.5s infinite;
}

.brand-glitch::before,
.brand-glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.55;
    mix-blend-mode: screen;
}

.brand-glitch::before {
    color: #00fff9;
    animation: brand-glitch-slice-1 4.2s infinite linear;
}

.brand-glitch::after {
    color: #ff00c1;
    animation: brand-glitch-slice-2 3.6s infinite linear;
}

@keyframes brand-glitch-blur {
    0%, 100% { filter: none; }
    25% { filter: blur(0.2px); }
    50% { filter: none; }
    75% { filter: blur(0.25px); }
}

@keyframes brand-glitch-slice-1 {
    0% { clip-path: inset(0 0 80% 0); transform: translate(0, 0); }
    20% { clip-path: inset(10% 0 60% 0); transform: translate(-1px, -1px); }
    40% { clip-path: inset(35% 0 35% 0); transform: translate(1px, 0); }
    60% { clip-path: inset(65% 0 10% 0); transform: translate(-1px, 1px); }
    80% { clip-path: inset(80% 0 0 0); transform: translate(1px, -1px); }
    100% { clip-path: inset(0 0 80% 0); transform: translate(0, 0); }
}

@keyframes brand-glitch-slice-2 {
    0% { clip-path: inset(80% 0 0 0); transform: translate(0, 0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(1px, 1px); }
    40% { clip-path: inset(35% 0 35% 0); transform: translate(-1px, 0); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(1px, -1px); }
    80% { clip-path: inset(0 0 80% 0); transform: translate(-1px, 1px); }
    100% { clip-path: inset(80% 0 0 0); transform: translate(0, 0); }
}

/* Mouse spotlight */
.mouse-spotlight {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(280px 280px at var(--spot-x, 50%) var(--spot-y, 50%),
        rgba(0, 255, 136, 0.18),
        rgba(0, 255, 136, 0.0) 60%);
}

/* Nav UX */
#main-nav {
    transition: transform 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

#nav-reveal-hint {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    background: #000 !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

body.nav-hidden #nav-reveal-hint {
    opacity: 1;
}

body.overlay-open #nav-reveal-hint {
    opacity: 0 !important;
}

/* Global overlay stacking (reliable, independent of Tailwind build output) */
#contact-modal {
    z-index: 12000 !important;
}

#sql-modal {
    z-index: 12010 !important;
}

#contact-modal-backdrop,
#sql-modal-backdrop {
    z-index: 1;
}

#contact-modal-content,
#sql-modal-content {
    z-index: 2;
}

.nav-divider {
    width: 1px;
    height: 18px;
    background: rgb(148 163 184 / 0.35);
}

.dark .nav-divider {
    background: rgb(148 163 184 / 0.25);
}

.nav-cluster {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.nav-cluster-label {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgb(71 85 105);
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: 9999px;
    padding: 0.24rem 0.52rem;
    background: rgba(255, 255, 255, 0.85);
}

.nav-cluster-links {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 255, 136, 0.75);
}

.nav-cluster-links > .nav-link {
    position: relative;
}

.nav-cluster-links > .nav-link::before {
    content: '';
    position: absolute;
    top: -11px;
    left: 50%;
    width: 2px;
    height: 12px;
    transform: translateX(-50%);
    background: rgba(0, 255, 136, 0.85);
}

.dark .nav-cluster-label {
    color: rgb(226 232 240);
    border-color: rgba(0, 255, 136, 0.45);
    background: rgba(0, 0, 0, 0.9);
}

.dark .nav-cluster-links {
    border-top-color: rgba(0, 255, 136, 0.85);
}

.dark .nav-cluster-links > .nav-link::before {
    background: rgba(0, 255, 136, 0.85);
}


body:hover .mouse-spotlight {
    opacity: 1;
}

/* Increase specificity to override #splash-screen h1 (1,0,1) with (1,2,0) */
#splash-screen .glitch-text.layer1,
#splash-screen .glitch-text.layer2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* RESTORED: Needed to hide the main text behind the glitch slice to prevent 'triple text' ghosting */
    background: #0a0a0a;
    z-index: 20; /* Sit on top to be visible */
    z-index: 20; /* Sit on top to be visible */
    pointer-events: none; /* Let clicks pass through */

}

#splash-screen .glitch-text.layer1::after,
#splash-screen .glitch-text.layer2::after {
    content: none;
}

.glitch-text.layer1 {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    /*clip: rect(44px, 450px, 56px, 0); /* Deprecated */
    clip-path: inset(10% 0 10% 0); /* Fallback */
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text.layer2 {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    /*clip: rect(44px, 450px, 56px, 0); /* Deprecated */
    clip-path: inset(10% 0 80% 0); /* Fallback */
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

/* =========================================
   NAVBAR & BRANDING
   ========================================= */

#splash-screen .bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    margin: 0;
}

/* Brand Styling: Overlapping XX */
/* UPDATED QUESTIONS based on user feedback */
.brand-overlap-xx {
    font-family: "Quicksand", sans-serif !important;
    letter-spacing: -0.30em !important; /* Relaxed from -0.25em */
    margin-right: 0.45em !important;    /* Increased space after XX slightly */
    margin-left: 0.15em !important;
    display: inline-block;
    position: relative;
    z-index: -1;
}

.brand-overlap-xx--front {
    z-index: 0;
}

/* Modern Clip Path Animations */
@keyframes glitch-anim {
    0% { clip-path: inset(10% 0 85% 0); }  /* Top slice */
    20% { clip-path: inset(80% 0 5% 0); }  /* Bottom slice */
    40% { clip-path: inset(30% 0 50% 0); } /* Middle */
    60% { clip-path: inset(10% 0 70% 0); } /* Top-mid */
    80% { clip-path: inset(50% 0 20% 0); } /* Mid-bottom */
    100% { clip-path: inset(20% 0 80% 0); } /* Top */
}

@keyframes glitch-anim2 {
    0% { clip-path: inset(70% 0 10% 0); }
    20% { clip-path: inset(10% 0 80% 0); }
    40% { clip-path: inset(50% 0 30% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(20% 0 60% 0); }
    100% { clip-path: inset(40% 0 40% 0); }
}

#splash-screen .bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

/* =========================================
   PORTFOLIO STYLES (Merged from home/styles.css)
   ========================================= */

@layer utilities {
    .text-shadow {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }
    .text-shadow-lg {
        text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
    }
    .text-stroke {
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
    }
    .perspective-1000 {
        perspective: 1000px;
    }
    .preserve-3d {
        transform-style: preserve-3d;
    }
    .backface-hidden {
        backface-visibility: hidden;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f0f0f; 
}
::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00ff88; 
}

/* Spotlight Effect */
.spotlight-card {
    position: relative;
    overflow: hidden;
}

.spotlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 255, 136, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 2;
}

.spotlight-card:hover .spotlight-overlay {
    opacity: 1;
}

/* Noise Background */
.bg-noise {
    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)' opacity='1'/%3E%3C/svg%3E");
}

/* Grid Pattern */
.bg-grid-pattern {
    background-size: 50px 50px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.2); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.5); }
}

.hero-image-glow {
    animation: pulse-glow 4s infinite;
}

/* Reveal on Scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Auto-scrolling tech marquee */
.tech-marquee-track {
    width: 100%;
    overflow: hidden;
    opacity: 0.2;
}

.tech-marquee {
    display: inline-flex;
    gap: 2rem;
    white-space: nowrap;
    will-change: transform;
    animation: tech-marquee-scroll 12s linear infinite;
}

.tech-marquee-text {
    display: inline-block;
    padding-right: 2rem;
}

@keyframes tech-marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Magnet Effect */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Navigation Link Hover */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #00ff88;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Project Card Hover */
.project-card:hover .parallax-img {
    transform: scale(1.1);
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s;
    mix-blend-mode: difference;
    display: none; /* Hidden on touch devices */
}

@media (hover: hover) and (pointer: fine) {
    .custom-cursor {
        display: block;
    }
}

.custom-cursor.hover {
    transform: scale(2.5);
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

/* Filter Buttons */
.filter-btn.active {
    color: #000;
    border-color: #00ff88;
}
