/*
==========================================================================
  Bhuban | Premium Developer Portfolio - CSS Custom Styles
==========================================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Fonts */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Theme Colors (Default Dark Mode) */
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    
    /* Neon Glows */
    --glow-cyan: 0 0 15px rgba(6, 182, 212, 0.4);
    --glow-purple: 0 0 15px rgba(139, 92, 246, 0.4);
    --glow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Glassmorphism Specs */
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-blur: blur(16px);
    
    --card-border-radius: 16px;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glow-card: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
    
    --accent-cyan: #0891b2;
    --accent-purple: #7c3aed;
}

/* ==========================================================================
   Global Resets & Scrollbars
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: var(--transition-smooth);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* ==========================================================================
   Page Loader Animation
   ========================================================================== */
#loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #07090e;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.loader-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid transparent;
    border-top: 4px solid var(--accent-cyan);
    border-bottom: 4px solid var(--accent-purple);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Glassmorphism Utilities
   ========================================================================== */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glow-card);
    border-radius: var(--card-border-radius);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-5px);
}

.text-gradient-cyan-purple {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Sticky Responsive Navbar
   ========================================================================== */

.navbar-custom {
    padding: 15px 0;
    transition: var(--transition-smooth);
    background: transparent;
    border-bottom: 1px solid transparent;
}

.navbar-custom.navbar-scrolled {
    padding: 10px 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glow-card);
}

.nav-link-custom {
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 20px;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link-custom:hover, .nav-link-custom.active {
    color: var(--accent-cyan);
}

/* ==========================================================================
   Hero Section with Particles
   ========================================================================== */

.hero-section {
    position: relative;
    padding: 180px 0 100px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}
.particle-1 {
    width: 250px;
    height: 250px;
    background: var(--accent-purple);
    top: 15%;
    left: 5%;
    opacity: 0.15;
    animation: float-slow 15s infinite alternate;
}
.particle-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-cyan);
    bottom: 15%;
    right: 5%;
    opacity: 0.15;
    animation: float-slow 20s infinite alternate-reverse;
}

@keyframes float-slow {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-30px) scale(1.1); }
}

.hero-profile-container {
    position: relative;
    display: inline-block;
}

.hero-profile-glow {
    position: absolute;
    width: 102%;
    height: 102%;
    top: -1%;
    left: -1%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
    z-index: 1;
    animation: rotate-glow 8s linear infinite;
    filter: blur(4px);
}

.hero-profile-img {
    position: relative;
    z-index: 2;
    border-radius: 50%;
    border: 4px solid var(--bg-secondary);
}

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

/* Typing text animation */
.typed-cursor {
    color: var(--accent-cyan);
    animation: blink 0.7s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================================
   Buttons and Indicators
   ========================================================================== */

.btn-premium {
    background: linear-gradient(135deg, var(--accent-purple), #6366f1);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: var(--glow-purple);
}

.btn-premium:hover {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--glow-cyan);
}

.btn-outline-custom {
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-outline-custom:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
    transform: translateY(-3px);
}

/* ==========================================================================
   Academic & Career Timeline Layouts
   ========================================================================== */

.timeline {
    position: relative;
    border-left: 2px solid var(--glass-border);
    padding-left: 30px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    left: -39px;
    top: 6px;
    box-shadow: var(--glow-cyan);
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    background: var(--accent-pink);
}

/* ==========================================================================
   Skills Circular & Linear Indicators
   ========================================================================== */

.skill-progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.1, 1, 0.1, 1);
}

/* Circular Skills Indicators */
.circular-skill {
    position: relative;
    width: 120px;
    height: 120px;
    display: inline-block;
}

.circular-skill svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.circular-skill circle {
    fill: none;
    stroke-width: 8;
}

.circular-skill .bg-circle {
    stroke: var(--bg-tertiary);
}

.circular-skill .progress-circle {
    stroke: url(#cyan-purple-gradient);
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1.8s ease-in-out;
}

.circular-skill .skill-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* ==========================================================================
   Projects Grid & Advanced Category Filters
   ========================================================================== */

.project-filter-btn {
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.01);
    color: var(--text-primary);
    padding: 8px 20px;
    border-radius: 20px;
    margin: 5px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.project-filter-btn:hover, .project-filter-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--glow-cyan);
}

.project-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.project-img-wrapper img {
    width: 100%;
    height: auto;
    transition: var(--transition-smooth);
}

.project-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.1);
}

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

/* ==========================================================================
   Testimonial & Blog Slider Carousels
   ========================================================================== */

.testimonial-card {
    padding: 30px;
    position: relative;
}

.testimonial-quote-icon {
    font-size: 2.5rem;
    color: rgba(139, 92, 246, 0.15);
    position: absolute;
    top: 20px;
    right: 30px;
}

.testimonial-rating i {
    color: #fbbf24; /* Amber star */
    margin: 0 2px;
}

/* Carousel Adjustments */
.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-muted);
}
.carousel-indicators .active {
    background-color: var(--accent-cyan);
    width: 25px;
    border-radius: 5px;
}

/* ==========================================================================
   Secure Contact Form and WhatsApp Widget
   ========================================================================== */

.contact-info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-cyan);
    font-size: 1.2rem;
    margin-right: 15px;
    box-shadow: var(--glow-card);
}

.form-control-custom {
    background: rgba(17, 24, 39, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 12px 15px;
    transition: var(--transition-smooth);
}

.form-control-custom:focus {
    background: rgba(17, 24, 39, 0.6);
    border-color: var(--accent-purple);
    box-shadow: var(--glow-purple);
    color: var(--text-primary);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(15deg);
    color: #FFF;
    background-color: #128c7e;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.6);
}

/* Back To Top Button */
.back-to-top {
    position: fixed;
    width: 45px;
    height: 45px;
    bottom: 105px;
    right: 37px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    box-shadow: var(--glow-card);
    transition: var(--transition-smooth);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px);
}

/* ==========================================================================
   Light Mode Custom Colors
   ========================================================================== */
[data-theme="light"] .form-control-custom {
    background: rgba(255, 255, 255, 0.6);
}
[data-theme="light"] .form-control-custom:focus {
    background: #ffffff;
}
[data-theme="light"] .navbar-scrolled {
    background: rgba(255, 255, 255, 0.85);
}
[data-theme="light"] .hero-profile-img {
    border-color: #ffffff;
}

/* Custom CSS gradients classes */
.text-orange { color: #f97316; }
.text-blue { color: #3b82f6; }
.text-purple { color: #a855f7; }
.text-yellow { color: #eab308; }
.text-indigo { color: #6366f1; }
.text-red { color: #ef4444; }
.text-cyan { color: #06b6d4; }
.text-green { color: #10b981; }
.text-teal { color: #14b8a6; }
.text-dark { color: var(--text-primary); }
