/* Modern Design System Override */
:root {
    /* Color Palette - Deep Blue Tech Theme */
    --bg-dark: #1e293b;
    /* Lighter Slate 800 */
    --bg-darker: #0f172a;
    /* Slate 900 (was almost black) */
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary-accent: #38bdf8;
    /* Sky Blue */
    --secondary-accent: #818cf8;
    /* Indigo */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);

    /* Effects */
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    --backdrop-blur: blur(10px);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Typography */
body {
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
    font-family: 'Inter', 'Roboto Mono', sans-serif !important;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
}

p,
span,
li {
    color: var(--text-muted);
}

a {
    color: var(--primary-accent);
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--secondary-accent);
    text-decoration: none;
}

/* Navbar Modernization */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--backdrop-blur);
    border-bottom: var(--glass-border);
    transition: var(--transition-smooth);
}

.navbar-brand {
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient-primary);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section Upgrade - Restored Background Image */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    background-image: url('../images/bg-site.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

/* Dark Overlay for better text readability */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    /* Modern dark blue tint */
    z-index: 1;
}

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

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typewriter-text {
    font-family: 'Roboto Mono', monospace;
    color: var(--primary-accent);
    font-size: 1.5rem;
    min-height: 1.5em;
    /* Prevent layout shift */
    display: block;
}

.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--secondary-accent);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Glassmorphism Cards (Projects & Services) */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition-smooth);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-accent);
    box-shadow: 0 10px 40px -10px rgba(56, 189, 248, 0.3);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.glass-card:hover::before {
    transform: translateX(100%);
}

/* Modern Project Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/9;
    group-cursor: pointer;
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    /* Dark overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-smooth);
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(5px);
}

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

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

.project-title {
    color: var(--primary-accent);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

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

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.tech-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary-accent);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* SKILLS MARQUEE (Infinite Horizontal Scroll) */
.skills-wrapper {
    overflow: hidden;
    padding: 3rem 0;
    background: transparent;
    position: relative;
    width: 100%;
    max-width: 1200px;
    /* Limit width */
    margin: 0 auto;
    /* Center the wrapper */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.skills-track {
    display: flex;
    width: max-content;
    gap: 2rem;
    animation: scroll 30s linear infinite;
}

.skills-wrapper:hover .skills-track {
    animation-play-state: paused;
}

.skill-item {
    background: rgba(2, 6, 23, 0.85);
    /* Much darker Deep Blue/Black */
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Sligthly more subtle border */
    border-radius: 16px;
    padding: 1.5rem;
    width: 160px;
    /* Fixed width for uniform look */
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Prevent shrinking in flex container */
}

.skill-item:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--primary-accent);
    box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.3);
    z-index: 10;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Moves half way (assuming duplicated items) */
}

.skill-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.skill-item:hover .skill-icon {
    transform: scale(1.1);
}

.skill-name {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.1rem;
}

/* OVERRIDES FOR LEGACY BOOTSTRAP CLASSES */
.bg-light,
.bg-primary {
    background: transparent !important;
    background-color: transparent !important;
}

/* Fix for the "A Bit About Me" / Testimonials Section */
.block-11 {
    background: transparent !important;
    position: relative;
    z-index: 10;
}

/* Fix for "Looking for a backend developer" CTA */
.bg-primary.py-5,
.section.bg-primary {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%) !important;
    border-top: 1px solid var(--glass-border);
    position: relative;
}

/* Ensure text inside these legacy sections is readable */
.bg-light h2,
.bg-light p,
.bg-light blockquote,
.bg-primary h3,
.bg-primary p,
.section-title {
    color: var(--text-main) !important;
}

/* FOOTER FIXES */
.site-footer {
    background: #020617 !important;
    /* Deepest dark */
    padding-top: 5rem;
    border-top: 1px solid var(--glass-border);
}

.site-footer h3 {
    color: var(--text-main);
    font-weight: 700;
}

.site-footer p,
.site-footer a,
.site-footer span,
.site-footer li {
    color: var(--text-muted) !important;
}

.site-footer a:hover {
    color: var(--primary-accent) !important;
}

/* FIX STRAY ICONS */
.service i {
    display: none !important;
    /* Hide old icons if any remain */
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .project-card {
        aspect-ratio: 4/3;
    }
}

/* Hide legacy white dotted pattern */
.img-dotted-bg {
    background: transparent !important;
}

.img-dotted-bg:after {
    display: none !important;
}

/* MODERN PORTFOLIO THEME - DARK MODE */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* MODERN LOGO DESIGN - MODERN LUXURY TECH */
.logo-modern {
    text-decoration: none !important;
    display: inline-block;
    padding: 5px 0;
}

.logo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.logo-title {
    font-family: 'Montserrat', sans-serif;
    /* Geometric Modern Font */
    font-size: 1.1rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    /* Expensive look */
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo-line-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60%;
    /* Shorter line */
    margin: 4px 0;
    opacity: 1;
}

.logo-line-del {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-accent), transparent);
    /* Modern Gradient Fade */
    width: 100%;
    border-radius: 1px;
}

.logo-diamond {
    display: none;
    /* No diamond for modern look */
}

.logo-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.55rem;
    text-transform: uppercase;
    color: var(--secondary-accent);
    /* Soft Cyan/Grey */
    letter-spacing: 4px;
    /* Very wide spacing = Luxury */
    font-weight: 400;
    opacity: 0.9;
}

.logo-text,
.logo-icon {
    display: none;
}

.logo-accent {
    color: var(--primary-accent);
    font-size: 2rem;
    line-height: 0;
    margin-left: 2px;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
}

.logo-modern:hover .logo-accent {
    color: var(--secondary-accent);
    transition: color 0.3s ease;
}

/* MODERN LANGUAGE SWITCHER */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 20px;
    /* Space from search icon */
    padding-right: 15px;
    /* Right edge spacing */
}

.lang-link {
    text-decoration: none !important;
    color: var(--text-muted) !important;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

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

.lang-link.active {
    color: #f8fafc !important;
    /* Whiter than white */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    position: relative;
}

/* Active indicator dot underneath */
.lang-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-accent);
    border-radius: 50%;
}

.lang-divider {
    color: var(--glass-border);
    font-weight: 300;
    opacity: 0.5;
}

/* BACKGROUND ANIMATION */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind everything */
    pointer-events: none;
    /* Let clicks pass through */
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    /* Lighter Gradient: Slate 800 to Slate 900 */
    /* Sharp dark background */
    /* No blur for Vanta-style crisp particles */
}

/* UI BUTTON FIXES FOR DARK MODE */

/* Ensure outline-white is actually visible and glows */
.btn-outline-white {
    border-color: #ffffff !important;
    color: #ffffff !important;
    background: transparent;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.btn-outline-white:hover {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* Invert black buttons to be visible on dark background */
.btn-outline-black {
    border-color: rgba(255, 255, 255, 0.8) !important;
    /* Make it light grey */
    color: rgba(255, 255, 255, 0.9) !important;
    /* Make text light */
}

.btn-outline-black:hover {
    background: #ffffff !important;
    color: #1a1a1a !important;
    /* Dark text on hover */
    border-color: #ffffff !important;
}

/* CHAT BUBBLE STYLE FOR TESTIMONIALS & QUOTES */
.block-33 blockquote,
.block-47 blockquote,
.testimonial-quote {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    border-bottom-left-radius: 4px;
    /* Chat bubble tail effect */
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    transition: transform 0.3s ease;
}

.block-33 blockquote:hover,
.block-47 blockquote:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.3);
}

/* Ensure text inside bubbles is readable and crisp */
.block-33 blockquote p,
.block-47 blockquote p {
    color: #f8fafc !important;
    /* Bright text */
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 400;
}

/* Style the quote marks */
.block-33 blockquote::before {
    color: var(--primary-accent);
    opacity: 0.5;
    font-size: 3rem;
    position: absolute;
    top: -10px;
    left: 20px;
}

/* MODERN GLOW BUTTON */
.btn-glow {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    /* Pill shape */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
    text-decoration: none !important;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-glow:hover {
    background: #ffffff;
    color: #0f172a !important;
    /* Dark text on white */
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 60px rgba(56, 189, 248, 0.4);
    border-color: #ffffff;
    transform: translateY(-3px);
}

.btn-glow:hover::before {
    left: 100%;
}