/* Custom Styles for Rajeev Kumar's Portfolio */

:root {
    --primary: #8b5cf6;
    --secondary: #6366f1;
    --dark: #0a0a0f;
    --card: rgba(20, 20, 25, 0.6);
    --accent-glow: rgba(139, 92, 246, 0.15);
    --border-color: rgba(255, 255, 255, 0.08);
    --royal-purple: #7851A9;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
}

.text-royal-purple {
    color: var(--royal-purple) !important;
}

body {
    background-color: var(--dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Subtle Grain Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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.025;
    pointer-events: none;
    z-index: 100;
}

@keyframes float-slow {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(20px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.dynamic-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(120px);
    opacity: 0.2;
    z-index: -1;
    pointer-events: none;
    transition: background 1s ease, transform 0.8s ease;
    animation: float-slow 20s ease-in-out infinite;
}

/* Background Animated Blobs */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: -5;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 40vmax;
    height: 40vmax;
    background: radial-gradient(circle, var(--primary) 0%, transparent 80%);
    opacity: 0.05;
    filter: blur(120px);
    animation: blob-float 25s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    opacity: 0.05;
    animation-delay: -10s;
}

@keyframes blob-float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(100px, 50px) rotate(90deg);
    }
}



/* Subtle Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right,
.reveal-fade-right {
    transform: translateX(40px);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left.active,
.reveal-right.active,
.reveal-fade-right.active {
    transform: translateX(0);
}

/* Staggered Entrance for Cards */
.stagger-children>* {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.active>* {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth Modal Transitions */
#project-modal {
    transition: opacity 0.4s ease-out;
}

#project-modal>div {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease-out;
}

/* Base Adjustments */
html {
    scroll-behavior: smooth;
}

/* Navigation Icon Hover Effects */
nav [data-lucide],
nav i {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-block;
    will-change: transform, filter;
}

nav a:hover [data-lucide],
nav a:hover i {
    transform: scale(1.5) translateY(-5px) !important;
    filter: brightness(1.4) drop-shadow(0 0 12px var(--accent-glow));
    color: var(--primary) !important;
}

/* Base Transition for other icons (smooth but no scale/glow) */
[data-lucide],
i {
    transition: all 0.3s ease;
}

/* Active Icon State - Purple Accent */
nav a.text-primary i,
nav a.text-primary [data-lucide] {
    color: var(--primary) !important;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}

/* Clean Tooltip Design */
.nav-tooltip {
    position: absolute;
    top: -3.5rem;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    padding: 0.375rem 1rem;
    background: var(--card);
    border: 1px solid var(--border-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 9999px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
}

.group:hover .nav-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-0.5rem) scale(1);
}

/* Glass Enhancement */
.glass {
    background: linear-gradient(135deg, rgba(19, 14, 25, 0.7) 0%, rgba(21, 18, 26, 0.8) 100%);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Skill Tags Styles */
.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.3s duration;
    cursor: default;
}

.skill-tag:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

/* Reference Image Button Style (Rounded Pills) */
.rounded-full {
    border-radius: 9999px !important;
}

/* Ensure secondary buttons (outline) use the theme colors correctly */
[class*='border-white/20'] {
    border-color: rgba(255, 255, 255, 0.15) !important;
}


/* Project Cards 3D Flip */
.project-card {
    display: block;
}

.project-flip-wrapper {
    position: relative;
    perspective: 1200px;
    height: 420px;
}

@media (max-width: 640px) {
    .project-flip-wrapper {
        height: 360px;
    }
}

.project-flip-inner {
    position: relative;
    height: 100%;
    width: 100%;
}

.project-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.project-face-front {
    transform: rotateY(0deg);
    opacity: 1;
}

.project-face-back {
    transform: rotateY(180deg);
    opacity: 0;
}

.project-card:hover .project-face-front {
    transform: rotateY(-180deg);
    opacity: 0;
}

.project-card:hover .project-face-back {
    transform: rotateY(0deg);
    opacity: 1;
}

/* Typing Animation Cursor */
#typing-text::after {
    content: '';
    margin-left: 0.25rem;
    border-right: 2px solid var(--primary);
    animation: pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: #262626;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #333;
}

/* Blur Overlays */
.glass {
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
}

/* Glow Effect */
.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

/* Responsive Font Sizes */
/* ── Infinite Certificate Marquee ───────────────────── */
.cert-marquee-wrapper {
    position: relative;
    overflow: hidden;
    /* Fade edges */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

/* The scrolling strip — JS drives translateX via RAF; no CSS animation */
.cert-marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    padding: 0.75rem 0 1.5rem;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
}

.cert-marquee-track:active {
    cursor: grabbing;
}

@keyframes cert-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Fixed-width card for the marquee (overrides flex-grow) */
.cert-marquee-card {
    flex: 0 0 170px;
    width: 170px;
}

.certificate-card-netflix {
    flex: 0 0 170px;
    scroll-snap-align: start;
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

@media (min-width: 768px) {
    .certificate-card-netflix {
        flex: 0 0 calc(33.333% - 1rem);
    }
}

@media (min-width: 1024px) {
    .certificate-card-netflix {
        flex: 0 0 calc(25% - 1.2rem);
    }
}

.certificate-card-netflix:hover {
    transform: scale(1.03) translateY(-8px);
    z-index: 10;
    border-color: rgba(var(--bg-accent-rgb, 139, 92, 246), 0.4);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 1), 0 0 30px rgba(var(--bg-accent-rgb, 139, 92, 246), 0.2);
}

.certificate-image-container {
    position: relative;
    aspect-ratio: 5/3;
    overflow: hidden;
}

.certificate-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.certificate-card-netflix:hover .certificate-image-container img {
    transform: scale(1.1);
}

.certificate-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.cert-category {
    font-size: 0.48rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.cert-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
    line-height: 1.1;
}

.cert-desc {
    font-size: 0.58rem;
    color: #94a3b8;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cert-meta {
    margin-top: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.cert-badge {
    font-size: 0.48rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    color: #e2e8f0;
}

.cert-season {
    color: var(--secondary);
    /* Neon Green accents for contrast */
}

/* Experience & Achievement Section Enhancements */
.journey-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.journey-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, var(--primary), transparent);
    transition: height 0.5s ease;
}

.journey-card:hover::before {
    height: 100%;
}

.journey-card:hover {
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.3);
}

.achievement-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.achievement-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    background: rgba(139, 92, 246, 0.03);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.timeline-line {
    background: linear-gradient(to bottom, transparent, rgba(139, 92, 246, 0.2) 20%, rgba(139, 92, 246, 0.2) 80%, transparent);
}

.text-muted-refined {
    color: #94a3b8;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.card-title-refined {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

