/* Akarsh Sharma — Next-Gen Animated Creator Portfolio Styles */

:root {
    --violet: #8b5cf6;
    --cyan: #06b6d4;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --bg-dark: #06070b;
    --surface: #0d1018;
    --card: #131724;
    --border: rgba(255, 255, 255, 0.08);
}

html {
    background-color: var(--bg-dark);
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
}

/* Top Reading / Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #06b6d4);
    z-index: 100;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.7);
    transition: width 0.08s linear;
}

/* Cinematic Intro Loader */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #06070b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.55s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-bar {
    width: 140px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 18px;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
    animation: loadProgress 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes loadProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Animated Gradient Text Shimmer */
.text-shimmer {
    background: linear-gradient(
        110deg,
        #a78bfa 0%,
        #f472b6 30%,
        #22d3ee 60%,
        #a78bfa 100%
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmerFlow 5s linear infinite;
}

@keyframes shimmerFlow {
    0% { background-position: 0% center; }
    100% { background-position: 220% center; }
}

/* Noise Texture Overlay for Luxury Editorial Depth */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Mouse-Tracked Spotlight Card Border & Inner Glow */
.spotlight-card {
    position: relative;
    overflow: hidden;
    background: rgba(19, 23, 36, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.spotlight-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        420px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(139, 92, 246, 0.16),
        transparent 55%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}

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

.spotlight-card:hover {
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 20px 45px -18px rgba(139, 92, 246, 0.28);
}

.spotlight-card > * {
    position: relative;
    z-index: 1;
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(19, 23, 36, 0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #06070b;
}

::-webkit-scrollbar-thumb {
    background: #22293a;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6;
}

/* 3D Card Tilt & Magnetic Button */
.card-tilt {
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s ease;
    will-change: transform;
    transform-style: preserve-3d;
}

.magnetic-btn {
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

/* Floating Orbit Badges */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(10px); }
}

.animate-float-slow {
    animation: floatSlow 5.5s ease-in-out infinite;
}

.animate-float-reverse {
    animation: floatReverse 6.5s ease-in-out infinite;
}

/* Infinite Marquee */
.marquee-wrapper {
    mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: marquee-anim 26s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

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

/* Portfolio Filter Transition */
.portfolio-item {
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item.hidden-item {
    display: none;
}

/* Modal Transitions */
.modal-show {
    opacity: 1 !important;
}

.modal-scale-up {
    transform: scale(1) !important;
}

/* Animated Gradient Border Button */
.btn-glow-border {
    position: relative;
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #06b6d4, #8b5cf6);
    background-size: 250% 250%;
    animation: gradientBorder 4s ease infinite;
}

@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
