/* style.css */
:root {
    --primary-color: #3b82f6;
    --primary-rgb: 59, 130, 246;
    --secondary-color: #8b5cf6;
    --accent-color: #f43f5e;
    --success-color: #10b981;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Responsive Spacing */
    --section-spacing-y: 5rem;
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    /* Slate 50 */
    --text-color: #0f172a;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.05);
    --muted-color: #64748b;
    --gradient-1: #f1f5f9;
    --gradient-2: #f8fafc;
    --gradient-3: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #020617;
    /* Deepest Navy */
    --text-color: #f8fafc;
    --card-bg: #0f172a;
    /* Solid Slate 900 */
    --nav-bg: rgba(2, 6, 23, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    /* Re-introduce subtle border */
    --muted-color: #94a3b8;
    --gradient-1: #020617;
    --gradient-2: #0f172a;
    --gradient-3: #020617;
}

[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .bg-card,
[data-theme="dark"] .bg-card-glass,
[data-theme="dark"] .skill-card,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .project-card {
    border: 1px solid var(--border-color) !important;
    background-color: var(--card-bg) !important;
}

/* Base Mobile-First Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    /* Slightly smaller base for mobile */
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

/* Global Responsive Elements */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(125deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    line-height: 1.2;
}

.text-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Navbar Responsiveness */
.navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.navbar-scrolled {
    padding: 0.8rem 0;
    background: var(--nav-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}


/* Breadcrumb Dark Mode Visibility */
[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: #ffffff !important;
}

[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: var(--primary-color) !important;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: var(--text-color) !important;
    display: flex;
    align-items: center;
}


.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    transition: var(--transition);
    opacity: 0.8;
    padding: 0.5rem 1.25rem !important;
    /* Added more horizontal space */
}

.nav-link:hover {
    opacity: 1;
    color: var(--primary-color) !important;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--nav-bg);
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 1rem;
        border: 1px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .nav-link {
        padding: 0.8rem 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: center;
    }

    [data-theme="dark"] .nav-link {
        color: #fff !important;
        opacity: 0.9;
    }

    /* Force toggler icon visibility in dark mode */
    [data-theme="dark"] .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.2);
    }

    [data-theme="dark"] .navbar-toggler-icon {
        filter: invert(1) brightness(2);
    }
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% auto;
    border: none;
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: white !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.4), 0 0 20px rgba(139, 92, 246, 0.3);
    background-position: right center;
}

.btn-premium {
    position: relative;
    background: var(--card-bg);
    color: var(--text-color) !important;
    border: 1px solid var(--border-color);
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.btn-premium:hover {
    color: white !important;
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(var(--primary-rgb), 0.3);
}

.btn-premium:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Subtle glow effect */
.btn-premium::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -2;
    border-radius: inherit;
}

.btn-premium:hover::after {
    opacity: 0.4;
}

/* Cards & Containers */
.card,
.bg-card,
.bg-card-glass {
    background-color: var(--card-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
    border-radius: 24px !important;
    /* Professional rounded corners */
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.section-padding {
    padding: var(--section-spacing-y) 0;
}

/* Responsive Utilities */
.shadow-lg {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05) !important;
}

/* Desktop-Specific (1025px+) */
@media (min-width: 1025px) {
    html {
        font-size: 16px;
    }

    --section-spacing-y : 8rem;
}

/* Small Laptops (769px–1024px) */
@media (max-width: 1024px) {
    .display-3 {
        font-size: 3.5rem;
    }

    .display-4 {
        font-size: 2.8rem;
    }
}

/* Tablets (481px–768px) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .display-3 {
        font-size: 3rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .section-padding {
        padding: 4rem 0;
    }

    .hero-section {
        text-align: center;
        padding-top: 2rem;
    }

    .hero-section .d-flex {
        justify-content: center;
    }
}

/* Mobile Phones (320px–480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .hero-section .gap-3 {
        flex-direction: column;
    }

    .p-5 {
        padding: 2rem !important;
    }

    .navbar-logo {
        height: 32px;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Scroll To Top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.scroll-to-top:hover {
    transform: translateY(-5px);
    background: var(--secondary-color);
}

/* Footer Refinements */
footer {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 30px;
    margin-top: 5rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-right: 1.5rem;
    opacity: 0.7;
    transition: var(--transition);
    display: inline-block;
}

.social-links a:hover {
    opacity: 1;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Theme Toggle Button */
.btn-theme {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-theme:hover {
    transform: rotate(15deg);
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Component Specific Styles */
.letter-spacing-1 {
    letter-spacing: 1.5px;
}

.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-tag {
    display: inline-block;
    padding: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    position: relative;
}

/* Skills & Cards */
.skill-card,
.blog-card,
.project-card {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.skill-card:hover,
.blog-card:hover,
.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 20px rgba(59, 130, 246, 0.15);
}

.project-img,
.blog-img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.blog-img {
    height: 200px;
}

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

/* Project Card Overlay Fix */
.project-img-wrapper {
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--primary-rgb), 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    padding: 2rem; /* Gap around the button */
}

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

.project-overlay .btn {
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover .project-overlay .btn {
    transform: translateY(0);
}

.main-profile-img {
    position: relative;
    z-index: 2;
    background-color: var(--card-bg); /* Prevents background bleeding */
    transition: var(--transition);
    display: block;
    width: 100%;
    filter: brightness(1.1); /* Make the image clearer/brighter */
}

.hero-img-wrapper {
    position: relative;
    max-width: 350px;
    width: 100%;
    margin: 0 auto;
    z-index: 5;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.2) 80%,
        transparent
    );
    transform: skewX(-25deg);
    z-index: 3;
    animation: shine-effect 3s infinite;
}

@keyframes shine-effect {
    0% { left: -150%; }
    30% { left: 150%; }
    100% { left: 150%; }
}

.main-profile-img:hover {
    transform: scale(1.03);
    filter: brightness(1.15);
}

/* Removed .profile-blob as it caused unwanted gradient effects */

.hero-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    animation: float 20s infinite alternate;
}

.hero-bg-shapes .shape-1 {
    width: 500px;
    height: 500px;
    background: rgba(59, 130, 246, 0.15);
    top: -100px;
    right: -100px;
}

.hero-bg-shapes .shape-2 {
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 246, 0.15);
    bottom: -50px;
    left: -100px;
}

.hero-bg-shapes .shape-3 {
    width: 350px;
    height: 350px;
    background: rgba(244, 63, 94, 0.1);
    top: 20%;
    left: 10%;
}

.hero-bg-shapes .shape-4 {
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.08);
    bottom: 10%;
    right: 20%;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 40px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Contact Form Refined */
.contact-form-refined .form-control {
    background: rgba(var(--primary-rgb), 0.08);
    /* Increased from 0.05 */
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 14px 18px;
    border-radius: 16px;
    transition: var(--transition);
    width: 100%;
}

[data-theme="dark"] .contact-form-refined .form-control {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    /* Much brighter border */
    color: #ffffff !important;
}

[data-theme="dark"] .contact-form-refined .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    /* Brighter placeholders */
}

[data-theme="dark"] .form-label {
    color: #ffffff !important;
    opacity: 1 !important;
    font-weight: 600;
}

[data-theme="dark"] .contact-info-wrapper h6 {
    color: #ffffff !important;
    opacity: 1 !important;
}

[data-theme="dark"] .contact-info-wrapper p {
    color: #ffffff !important;
    /* Pure white for better visibility */
    opacity: 0.9 !important;
}

[data-theme="dark"] .contact-info-wrapper h3,
[data-theme="dark"] .contact-info-wrapper h5 {
    color: #ffffff !important;
}

/* Social Cards */
.social-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.social-card {
    background: var(--card-bg);
    border-color: var(--border-color) !important;
    transition: var(--transition);
}

.social-card:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-5px);
    border-color: var(--primary-color) !important;
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.2);
}

[data-theme="dark"] .social-card {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff !important;
    /* Force white text in dark mode */
}

[data-theme="dark"] .social-card i {
    color: #ffffff !important;
    /* Force white icons in dark mode */
}

/* Responsive Overrides */
@media (max-width: 768px) {

    .project-img,
    .blog-img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .section-padding {
        padding: 3rem 0;
    }

    .display-4 {
        font-size: 2.2rem;
    }
}

/* Restored Blog and Component Styles */
.blog-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.hover-primary:hover {
    color: var(--primary-color) !important;
}

.bg-primary-subtle {
    background-color: rgba(var(--primary-rgb), 0.1) !important;
}

/* Animations and Active States */
.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

@keyframes slideIn {
    from {
        width: 0;
        left: 50%;
    }

    to {
        width: 100%;
        left: 0;
    }
}

@keyframes flashHighlight {
    0% {
        background-color: transparent;
    }

    30% {
        background-color: rgba(var(--primary-rgb), 0.1);
        border-radius: 1rem;
    }

    100% {
        background-color: transparent;
        border-radius: 1rem;
    }
}

.highlight-flash {
    animation: flashHighlight 1.5s ease-out forwards;
}

.img-hover-zoom {
    transition: transform 0.4s ease;
}

.card-zoom-wrapper:hover .img-hover-zoom {
    transform: scale(1.05);
}

/* Icon Box Premium Gradient */
.icon-box.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-box.bg-primary:hover {
    transform: rotate(-5deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.3);
}

/* CTA Section Premium Refinement */
.cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    position: relative;
    z-index: 1;
    border: none !important;
    padding: 3.5rem 2rem !important;
    box-shadow: 0 25px 50px rgba(var(--primary-rgb), 0.2) !important;
    border-radius: 30px !important;
}

.cta-box h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
}

.cta-box .btn-light {
    background: #ffffff !important;
    color: var(--primary-color) !important;
    border: none !important;
    padding: 0.9rem 2.5rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.cta-box .btn-light:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25) !important;
    background: #f8fafc !important;
}


.cta-shapes .shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.cta-shapes .shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

.cta-shapes .shape-2 {
    width: 250px;
    height: 250px;
    bottom: -100px;
    left: -50px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
}