/* 
==============================================
   Portfolio Custom CSS
   Theme: Sleek Dark Mode with Neon Accents
============================================== 
*/

/* Custom Selection Color */
::selection {
    background-color: var(--color-accent);
    color: #000;
}

:root {
    /* Color Palette */
    --color-bg-main: #000;
    --color-bg-darker: #050506;
    --color-accent: #00f2fe; /* Neon Cyan */
    --color-accent-secondary: #4facfe; /* Deep Blue/Purple */
    --color-text-main: #f8f9fa;
    --color-text-muted: #adb5bd;
    
    /* Surface Colors (Glassmorphism) */
    --color-surface: rgba(255, 255, 255, 0.03);
    --color-surface-hover: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.08);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    
    /* Tech Icon Colors */
    --color-html: #e34f26;
    --color-css: #1572b6;
    --color-js: #f7df1e;
    --color-bs: #7952b3;
    --color-git: #f05032;
    --color-php: #777bb4;
    --color-mysql: #00758F;
    --color-python: #3776AB;
    --color-n8n: #ea4b71;
    --color-vscode: #007ACC;
    --color-cursor: #8b5cf6;
}

/* Base Styles */
/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-secondary);
}

/* Custom Cursor Ghost Trail */
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    width: 35px;
    height: 35px;
    border: 2px solid var(--color-accent);
    box-shadow: 0 0 15px var(--color-accent);
    transition: transform 0.2s ease, opacity 0.3s ease, background-color 0.3s ease;
}

@media (max-width: 991px) {
    .cursor-outline {
        display: none;
    }
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-main);
    color: var(--color-text-main);
    overflow-x: hidden;
    /* Default cursor is now visible */
}


/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--color-accent), var(--color-accent-secondary));
    z-index: 9999;
    transition: width 0.1s ease-out;
}


.bg-darker {
    background-color: var(--color-bg-darker);
}

.text-accent {
    color: var(--color-accent) !important;
}

.text-gradient {
    background: linear-gradient(to right, var(--color-accent), var(--color-accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-padding {
    padding: 100px 0;
    scroll-margin-top: 80px; /* Adjusts for the fixed header */
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

.tracking-wide {
    letter-spacing: 0.1em;
}

/* Utilities */
.text-orange { color: var(--color-html); }
.text-blue { color: var(--color-css); }
.text-yellow { color: var(--color-js); }
.text-purple { color: var(--color-bs); }
.text-red { color: var(--color-git); }
.text-php { color: var(--color-php); }
.text-mysql { color: var(--color-mysql); }
.text-python { color: var(--color-python); }
.text-n8n { color: var(--color-n8n); }
.text-vscode { color: var(--color-vscode); }
.text-cursor { color: var(--color-cursor); }

/* Navigation */
.blur-nav {
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.blur-nav.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.navbar-nav .nav-link {
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 8px 16px !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-accent);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

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

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}


.greeting-text {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 580px; /* Increased height for a larger portrait presentation */
    margin: 0 auto;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
    overflow: hidden;
}


.profile-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Centers the video and preserves full aspect ratio */
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 2;
}


.glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    height: 130%;
    background: radial-gradient(circle, rgba(0,242,254,0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    filter: blur(60px);
}

/* Buttons */
.btn-accent {
    background-color: var(--color-accent);
    color: #000;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.btn-accent:hover {
    background-color: #fff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 242, 254, 0.5);
}

.btn-outline-light {
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-main);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Services Section */
.service-card {
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--color-accent) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(0, 242, 254, 0.05);
    border-radius: 20px;
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    background: var(--color-accent);
}

.service-card:hover .service-icon i {
    color: #000 !important;
}

/* Section Titles */
.title-line {
    height: 3px;
    width: 60px;
    background: var(--color-accent);
    border-radius: 2px;
    margin-top: 10px;
}

/* Stats / Counters */
.counters h3 {
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

/* Skills Section */
.skill-card {
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    background: var(--color-surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Portfolio Section */
.portfolio-card {
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.portfolio-img-wrap {
    position: relative;
    overflow: hidden;
}

.portfolio-img-wrap img {
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-img-wrap img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 6, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.tech-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    border: 1px solid var(--border-color);
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
}

/* Contact Section */
.contact-card {
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.custom-form-floating .form-control {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
}

.custom-form-floating .form-control:focus {
    background-color: rgba(0, 0, 0, 0.4);
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.25rem rgba(0, 242, 254, 0.1);
}

.custom-form-floating label {
    color: var(--color-text-muted);
}

/* Footer */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--color-accent);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 242, 254, 0.4);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

#back-to-top.show {
    display: flex;
}

/* Responsive adjustments */
/* Custom Mobile Toggler */
.custom-toggler-icon {
    width: 30px;
    height: 22px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.custom-toggler-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
    transition: all 0.3s ease;
}

/* Toggler Animation when Open */
.navbar-toggler[aria-expanded="true"] .custom-toggler-icon span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.navbar-toggler[aria-expanded="true"] .custom-toggler-icon span:nth-child(2) {
    opacity: 0;
}
.navbar-toggler[aria-expanded="true"] .custom-toggler-icon span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(10, 10, 12, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 30px;
        border-radius: 20px;
        margin-top: 15px;
        border: 1px solid rgba(0, 242, 254, 0.2);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        font-size: 1.1rem;
        padding: 15px !important;
    }

    .navbar-nav .nav-link::after {
        display: none;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 100px; /* Above Back to Top */
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 25px;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1) rotate(15deg);
    color: #fff;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 90px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content #loader-name span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: letter-fade-in 0.5s forwards;
    text-shadow: 0 0 15px var(--color-accent);
}

@keyframes letter-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loader-line {
    width: 40px;
    height: 3px;
    background: var(--color-accent);
    margin: 0 auto;
    border-radius: 2px;
    animation: line-grow-loader 1.5s ease-in-out infinite;
}

@keyframes pulse-loader {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes line-grow-loader {
    0%, 100% { width: 20px; opacity: 0.5; }
    50% { width: 50px; opacity: 1; }
}

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

/* Testimonials */
.testimonial-card {
    transition: all 0.3s ease;
}

.italic {
    font-style: italic;
}

/* Blog Section Styles */
.blog-card {
    background: var(--color-surface);
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    background: var(--color-surface-hover);
    border-color: var(--color-accent);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.blog-date {
    font-size: 0.8rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.btn-outline-accent {
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-accent:hover {
    background: var(--color-accent);
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 242, 254, 0.4);
}

/* --- Portfolio Filters --- */
.portfolio-filters {
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.6rem 1.8rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    margin: 0 5px 10px 5px;
}

.filter-btn:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.filter-btn.active {
    background: var(--color-accent);
    color: #000;
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(0, 255, 178, 0.3);
}

/* Portfolio Animation */
.portfolio-item.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

.portfolio-item.show {
    display: block;
    animation: portfolioFadeIn 0.5s ease forwards;
}

@keyframes portfolioFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Load More --- */
.load-more-container {
    margin-top: 4rem;
}

#view-all-btn {
    min-width: 200px;
}

.portfolio-item.initial-hide {
    display: none;
}

/* --- Micro-Animations --- */

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--color-accent), var(--color-secondary));
    z-index: 10000;
    box-shadow: 0 0 10px rgba(0, 255, 178, 0.5);
}

/* Floating Tech Badges */
.tech-badge {
    transition: all 0.3s ease;
}

.portfolio-card:hover .tech-badge {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 178, 0.2);
}

/* Image Zoom */
.portfolio-img-wrap {
    overflow: hidden;
}

.portfolio-img-wrap img {
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-card:hover .portfolio-img-wrap img {
    transform: scale(1.1);
}

/* Service Icon Wobble */
.service-card:hover .service-icon {
    animation: iconWobble 0.5s ease-in-out;
}

@keyframes iconWobble {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    50% { transform: rotate(-10deg); }
    75% { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}

/* Magnetic Social Buttons */
.social-btn {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-btn:hover {
    transform: scale(1.2) translateY(-5px);
    background: var(--color-accent);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 178, 0.4);
}
