/* Professional Portfolio - Clean & Premium Styles */

:root {
    --primary: #57b5e7;
    --secondary: #8dd3c7;
    --bg-dark: #0f172a;
    --card-dark: rgba(30, 41, 59, 0.7);
    --text-dark: #f1f5f9;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Classes */
body.dark {
    background-color: var(--bg-dark) !important;
    color: var(--text-dark);
}

body.dark .bg-white {
    background-color: #1e293b !important;
}

body.dark .bg-gray-50 {
    background-color: #1e293b !important;
}

body.dark .text-gray-900 {
    color: #f1f5f9 !important;
}

body.dark .text-gray-700 {
    color: #cbd5e1 !important;
}

body.dark .text-gray-600 {
    color: #94a3b8 !important;
}

body.dark .border-gray-200 {
    border-color: #334155 !important;
}

body.dark .shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
}

/* Glassmorphism */
.glass {
    background: var(--card-dark);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes liquidNavBorder {
    0% { 
        border-color: rgba(87, 181, 231, 0.15) !important; 
        box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3), 0 0 10px rgba(87, 181, 231, 0.03); 
    }
    50% { 
        border-color: rgba(141, 211, 199, 0.25) !important; 
        box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3), 0 0 15px rgba(141, 211, 199, 0.08); 
    }
    100% { 
        border-color: rgba(87, 181, 231, 0.15) !important; 
        box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3), 0 0 10px rgba(87, 181, 231, 0.03); 
    }
}

.glass-nav {
    background: rgba(15, 23, 42, 0.38) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(87, 181, 231, 0.15) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    animation: liquidNavBorder 8s infinite ease-in-out;
}

/* Liquid Bubble Hover Effect for Links */
.glass-nav a {
    position: relative;
    padding: 6px 16px;
    border-radius: 9999px;
    z-index: 1;
    transition: var(--transition);
}

.glass-nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: -1;
}

.glass-nav a:hover::before {
    opacity: 1;
    transform: scale(1);
    background: rgba(87, 181, 231, 0.06);
    border-color: rgba(87, 181, 231, 0.15);
}

/* Home Section Overlay */
.home-overlay {
    background-color: rgba(15, 23, 42, 0.75) !important;
    transition: var(--transition);
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    z-index: 100;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Typing Effect Cursor */
.typing-cursor::after {
    content: "|";
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Project Card Hover */
.project-card {
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Skill Icon Hover */
.skill-card {
    transition: var(--transition);
}

.skill-card:hover {
    transform: scale(1.05);
    background: var(--primary);
    color: white !important;
}

.skill-card:hover i {
    color: white !important;
}

/* Base Overrides */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    transition: background-color 0.3s ease;
}

/* Global Dark Mode Refinement for low-opacity containers */
body.dark .bg-opacity-10 {
    background-color: #334155 !important;
    /* Lighter than body bg for contrast */
}

/* Ensure branding colors remain visible */
body.dark .text-primary {
    color: #57b5e7 !important;
}

body.dark .text-secondary {
    color: #8dd3c7 !important;
}

/* Fix for hover states where text should turn white instead of staying brand colors */
body.dark .hover\:text-white:hover {
    color: #ffffff !important;
}

/* ==========================================================================
   Advanced Glassmorphism Design System
   ========================================================================== */

/* 1. Animated Background Blobs */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    z-index: -1;
    pointer-events: none;
    animation: drift 25s infinite alternate ease-in-out;
}

.blob-primary {
    width: 450px;
    height: 450px;
    background: var(--primary);
    top: 15%;
    left: -150px;
}

.blob-secondary {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: 15%;
    right: -150px;
    animation-delay: -7s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(120px, 90px) scale(1.15); }
    100% { transform: translate(-60px, 140px) scale(0.9); }
}

/* 2. Glassy Timeline Thread */
.timeline-line {
    position: absolute;
    left: 28px;
    top: 15px;
    bottom: 15px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    opacity: 0.15;
    z-index: 0;
}

/* 3. Skill & Tool Cards */
.skill-card {
    background: rgba(30, 41, 59, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition) !important;
}

.skill-card:hover {
    transform: translateY(-5px) scale(1.03) !important;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 10px 25px -5px rgba(87, 181, 231, 0.4) !important;
}

/* Force all inner text, metrics, and icons to turn white on hover */
body.dark .skill-card:hover,
body.dark .skill-card:hover i,
body.dark .skill-card:hover h4,
body.dark .skill-card:hover p {
    color: #ffffff !important;
}

/* 4. Glassy CTA Buttons */
.btn-glass-secondary {
    background: rgba(141, 211, 199, 0.2) !important;
    border: 1px solid rgba(141, 211, 199, 0.35) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition) !important;
}

.btn-glass-secondary:hover {
    background: var(--secondary) !important;
    box-shadow: 0 0 15px rgba(141, 211, 199, 0.45) !important;
}

.btn-glass-github {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition) !important;
}

.btn-glass-github:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(87, 181, 231, 0.25) !important;
}

/* 5. Glassy Input Fields */
.glass-input {
    background: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-dark) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition) !important;
}

.glass-input:focus {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(87, 181, 231, 0.25) !important;
    outline: none;
}

/* 6. Premium Glassy Footer */
.glassy-footer {
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    position: relative;
    z-index: 10;
}

.footer-social-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition) !important;
}

.footer-social-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(87, 181, 231, 0.3) !important;
    transform: translateY(-3px) !important;
}

/* 8. Liquid Glass Buttons (Bouncy Glow) */
.btn-liquid-glass {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-dark) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-liquid-glass:hover {
    transform: scale(1.06) !important;
    background: rgba(87, 181, 231, 0.1) !important;
    border-color: rgba(87, 181, 231, 0.45) !important;
    box-shadow: 0 0 15px rgba(87, 181, 231, 0.25) !important;
    color: #ffffff !important;
}

/* 7. Liquid Cursor Glow Follower */
.cursor-glow {
    position: fixed;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(87, 181, 231, 0.15) 0%, rgba(141, 211, 199, 0.04) 45%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.6s ease, left 0.12s cubic-bezier(0.25, 1, 0.5, 1), top 0.12s cubic-bezier(0.25, 1, 0.5, 1);
}