/* ===================================================
   Dr. Sujeet Kumar - Premium Portfolio Styles
   Designed by The Tech Ventures & Management
   =================================================== */

/* ===== ROOT VARIABLES ===== */
:root {
    --cursor-size: 12px;
    --cursor-follower-size: 40px;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.dark {
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ===== BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    cursor: default;
    overflow-x: hidden;
}

@media (min-width: 1024px) {
    body {
        cursor: none;
    }
}

::selection {
    background: rgba(92, 124, 250, 0.2);
    color: inherit;
}

/* ===== CUSTOM CURSOR ===== */
.custom-cursor {
    position: fixed;
    width: var(--cursor-size);
    height: var(--cursor-size);
    background: #5c7cfa;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: var(--cursor-follower-size);
    height: var(--cursor-follower-size);
    border: 1.5px solid rgba(92, 124, 250, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease, border-color 0.4s ease;
}

.custom-cursor.hovering {
    width: 50px;
    height: 50px;
    background: rgba(92, 124, 250, 0.15);
    mix-blend-mode: normal;
}

.cursor-follower.hovering {
    width: 60px;
    height: 60px;
    border-color: rgba(92, 124, 250, 0.6);
}

/* ===== PRELOADER ===== */
.preloader-ring {
    display: inline-block;
    position: relative;
    width: 56px;
    height: 56px;
}

.preloader-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 44px;
    height: 44px;
    margin: 6px;
    border: 3px solid transparent;
    border-top-color: #5c7cfa;
    border-radius: 50%;
    animation: preloader-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.preloader-ring div:nth-child(1) { animation-delay: -0.45s; }
.preloader-ring div:nth-child(2) { animation-delay: -0.3s; }
.preloader-ring div:nth-child(3) { animation-delay: -0.15s; }

@keyframes preloader-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== HERO CSS ANIMATIONS ===== */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--anim-delay, 0s);
}

.name-char.hero-anim {
    transform: translateY(50px);
    animation-name: heroCharReveal;
    animation-duration: 0.6s;
}

/* Initially hidden until preloader done */
body.loading .hero-anim {
    animation-play-state: paused;
}

@keyframes heroReveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroCharReveal {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, #5c7cfa, #748ffc, #ff922b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== GLASS CARD ===== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== NAVIGATION ===== */
.nav-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dark .nav-glass {
    background: rgba(3, 7, 18, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

#navbar.scrolled .nav-glass {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #1f2937;
    background: rgba(92, 124, 250, 0.08);
}

.dark .nav-link:hover,
.dark .nav-link.active {
    color: #f3f4f6;
    background: rgba(92, 124, 250, 0.15);
}

.nav-link.active {
    color: #5c7cfa;
}

/* Mobile Nav */
.mobile-nav-link {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: #374151;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.dark .mobile-nav-link {
    color: #d1d5db;
}

.mobile-nav-link:hover {
    background: rgba(92, 124, 250, 0.08);
    color: #5c7cfa;
    padding-left: 1.5rem;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
}

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 20px;
}

.hamburger span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== HERO SECTION ===== */
.hero-bg {
    background: radial-gradient(ellipse at 30% 50%, rgba(92, 124, 250, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(255, 146, 43, 0.06) 0%, transparent 60%);
}

.dark .hero-bg {
    background: radial-gradient(ellipse at 30% 50%, rgba(92, 124, 250, 0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(255, 146, 43, 0.08) 0%, transparent 60%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.dark .gradient-orb {
    opacity: 0.2;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(92, 124, 250, 0.3), transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 146, 43, 0.2), transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(116, 143, 252, 0.2), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(92, 124, 250, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(92, 124, 250, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Typed cursor */
.typed-cursor {
    animation: blink 0.8s ease-in-out infinite;
    color: #5c7cfa;
    font-weight: 300;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Scroll Indicator */
.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(156, 163, 175, 0.4);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: rgba(156, 163, 175, 0.6);
    border-radius: 2px;
    animation: scroll-down 2s ease-in-out infinite;
}

@keyframes scroll-down {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(12px); }
}

/* ===== SECTION GLOW ===== */
.section-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(92, 124, 250, 0.04), transparent 70%);
    pointer-events: none;
}

/* ===== HOVER GLOW ===== */
.hover-glow {
    position: relative;
    overflow: hidden;
}

.hover-glow::before {
    content: '';
    position: absolute;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(92, 124, 250, 0.1), transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.hover-glow:hover::before {
    opacity: 1;
}

.hover-glow > * {
    position: relative;
    z-index: 1;
}

/* ===== SKILL BARS ===== */
.skill-bar {
    height: 6px;
    background: rgba(92, 124, 250, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.dark .skill-bar {
    background: rgba(92, 124, 250, 0.15);
}

.skill-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #5c7cfa, #748ffc);
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== TIMELINE ===== */
.timeline-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(92, 124, 250, 0.1);
}

.timeline-dot {
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(92, 124, 250, 0.4);
}

@media (max-width: 767px) {
    .timeline-item:hover .timeline-dot {
        transform: translateX(0) scale(1.5);
    }
}

@media (min-width: 768px) {
    .timeline-item:hover .timeline-dot {
        transform: translateX(-50%) scale(1.5);
    }
}

/* ===== PUBLICATION CARD ===== */
.publication-card {
    transition: all 0.3s ease;
}

.publication-card:hover {
    transform: translateX(8px);
    border-color: rgba(92, 124, 250, 0.3);
}

/* ===== TILT CARD ===== */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* ===== MAGNETIC BUTTON ===== */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== PARTICLES ===== */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(92, 124, 250, 0.3);
    border-radius: 50%;
    pointer-events: none;
}

.dark .particle {
    background: rgba(116, 143, 252, 0.2);
}

/* ===== SCROLL PROGRESS ===== */
#scroll-progress {
    will-change: width;
}

/* ===== BACK TO TOP ===== */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ===== FORM STYLES ===== */
input:focus, textarea:focus {
    border-color: #5c7cfa !important;
    box-shadow: 0 0 0 3px rgba(92, 124, 250, 0.1) !important;
}

/* ===== COPY INDICATOR ===== */
.glass-card:hover .copy-indicator {
    opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .hero-name span {
        font-size: 3rem !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .custom-cursor,
    .cursor-follower,
    #scroll-progress,
    #back-to-top,
    #preloader,
    nav {
        display: none !important;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .gradient-orb { animation: none; }
    .scroll-wheel { animation: none; }
    .typed-cursor { animation: none; }
}

/* ===== SMOOTH SCROLL FIX ===== */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ===== TOAST ===== */
#toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}
