/* ===== PROFESSIONAL LIGHT PORTFOLIO CSS ===== */
/* Modern Professional Design with Light Background */

/* Offset sections so they don't hide behind the fixed navbar */
section {
  scroll-margin-top: 80px;
}

/* ===== CSS Variables ===== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    /* Updated background colors with subtle tints */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-light: #e2e8f0;
    --bg-dark: #0f172a;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    --gradient-secondary: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    --gradient-light: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 0.75rem;
    --transition: all 0.3s ease;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(226, 232, 240, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    /* Enhanced background with more noticeable effects */
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(100, 116, 139, 0.04) 0%, transparent 70%),
        linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.9) 100%);
    background-attachment: fixed;
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}

html {
    scroll-behavior: smooth;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

/* ===== Navigation ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
    padding: 1rem 0;
    /* Remove fixed positioning - navbar will scroll with page */
    position: relative;
    top: auto;
    width: auto;
    z-index: auto;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

/* .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
} */

/* ===== Chrome/Webkit Navigation Fixes ===== */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .navbar {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
    }
    
    .navbar.scrolled {
        background: rgba(255, 255, 255, 1) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    /* Fix navbar positioning issues */
    .navbar-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    
    .navbar-nav .nav-link {
        display: block;
        padding: 0.5rem 1rem;
        text-decoration: none;
        color: var(--text-dark);
        transition: color 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover {
        color: var(--primary-color);
        background: rgba(37, 99, 235, 0.1);
        border-radius: 0.375rem;
    }
    
    /* Fix mobile menu button */
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    /* Fix hero section spacing for Chrome */
    .hero-section {
        min-height: calc(100vh + 120px) !important;
        padding: 80px 0 60px 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }
    
    .hero-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .trust-bar {
        margin: 20px 0 40px 0 !important;
    }
}

/* ===== Hero Section ===== */
.hero-section {
    min-height: calc(100vh + 120px); /* Add extra space for navbar and trust bar */
    background: var(--bg-secondary);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    padding: 80px 0 60px 0; /* Top: navbar space, Bottom: trust bar space */
    margin: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 30%;
    left: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 40%;
    right: 30%;
    animation-delay: -15s;
}

.shape-5 {
    width: 90px;
    height: 90px;
    bottom: 20%;
    right: 10%;
    animation-delay: -20s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(14, 165, 233, 0.02) 0%, transparent 50%);
}

.svg-decoration {
    position: absolute;
    color: var(--primary-color);
    opacity: 0.08;
    z-index: 1;
    animation: subtle-float 20s ease-in-out infinite;
}

.section-svgs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.section-svgs .svg-decoration {
    animation: gentle-drift 25s ease-in-out infinite;
}

@keyframes subtle-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
        opacity: 0.08;
    }
    50% {
        transform: translateY(-5px) rotate(0deg);
        opacity: 0.12;
    }
    75% {
        transform: translateY(-15px) rotate(-1deg);
        opacity: 0.09;
    }
}

@keyframes gentle-drift {
    0%, 100% {
        transform: translateX(0px) translateY(0px) rotate(0deg);
        opacity: 0.04;
    }
    33% {
        transform: translateX(5px) translateY(-8px) rotate(0.5deg);
        opacity: 0.06;
    }
    66% {
        transform: translateX(-3px) translateY(-12px) rotate(-0.5deg);
        opacity: 0.05;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-dark);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    margin-bottom: 2rem;
    color: var(--text-dark);
    font-weight: 500;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--text-dark);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.hero-description {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    margin: 0.5rem;
    transition: var(--transition);
}

.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
}

/* .btn-glass:hover {
    background: var(--text-white);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
} */

.btn-outline-glass {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-white);
    backdrop-filter: blur(10px);
}

/* .btn-outline-glass:hover {
    background: var(--text-white);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
} */

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}


@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===== About Section ===== */
#about {
    background: var(--bg-primary);
    padding: 2.5rem 0;
    position: relative;
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.about-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border: 3px solid var(--glass-border);
    border-radius: 50%;
    box-shadow: var(--shadow-xl);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.about-content h3 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.experience-highlight {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.experience-highlight h4 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.experience-highlight .lead {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.experience-highlight p {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
}

.about-stats {
    margin-top: 2rem;
}

.stat-item h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.stat-item p {
    color: var(--text-light);
    font-weight: 500;
}

/* ===== Projects Section ===== */
#projects {
    background: var(--bg-secondary);
    padding: 2.5rem 0;
    position: relative;
}

#projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 90% 20%, rgba(14, 165, 233, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.project-filter {
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-white);
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

/* .filter-btn:hover, */
.filter-btn.active {
    background: var(--text-white);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

/* .project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
} */

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: var(--bg-light);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

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

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    width: 50px;
    height: 50px;
    background: var(--text-white);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.25rem;
    transition: var(--transition);
}

.project-link:hover {
    background: var(--text-light);
    color: var(--text-white);
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== Skills Section ===== */
#skills {
    background: var(--bg-primary);
    padding: 2.5rem 0;
}

.skill-category {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

/* .skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
} */

.skill-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--text-dark);
}

.skill-category h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

/* .skill-item:hover {
    background: var(--text-white);
    color: var(--text-dark);
} */

/* ===== Contact Section ===== */
#contact {
    background: var(--bg-secondary);
    padding: 2.5rem 0;
}

.contact-form {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.form-control {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-control:focus {
    border-color: var(--text-white);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    background: var(--glass-bg);
    color: var(--text-white);
}

.btn-primary {
    background: var(--text-white);
    border: 2px solid var(--text-white);
    color: var(--text-dark);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--text-light);
    border-color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-info {
    padding: 1.5rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.contact-info h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-info p {
    color: var(--text-light);
    margin: 0;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-primary);
    color: var(--text-dark);
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--text-white);
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--text-white);
    color: var(--text-dark);
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

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

.back-to-top:hover {
    background: var(--text-light);
    transform: translateY(-2px);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-image img {
        width: 250px;
        height: 250px;
    }
    
    .filter-btn {
        margin: 0.25rem;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .project-filter {
        margin-bottom: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Mobile SVG Optimizations */
    .svg-decoration {
        opacity: 0.03 !important;
        animation-duration: 30s !important;
    }
    
    .section-svgs .svg-decoration {
        opacity: 0.02 !important;
        animation-duration: 35s !important;
    }
    
    /* Reduce SVG sizes on mobile */
    .svg-decoration[style*="width: 200px"] {
        width: 100px !important;
        height: 100px !important;
    }
    
    .svg-decoration[style*="width: 150px"] {
        width: 80px !important;
        height: 80px !important;
    }
    
    .svg-decoration[style*="width: 120px"] {
        width: 60px !important;
        height: 60px !important;
    }
    
    .svg-decoration[style*="width: 100px"] {
        width: 50px !important;
        height: 50px !important;
    }
    
    .svg-decoration[style*="width: 90px"] {
        width: 45px !important;
        height: 45px !important;
    }
    
    .svg-decoration[style*="width: 80px"] {
        width: 40px !important;
        height: 40px !important;
    }
    
    .svg-decoration[style*="width: 70px"] {
        width: 35px !important;
        height: 35px !important;
    }
    
    .svg-decoration[style*="width: 60px"] {
        width: 30px !important;
        height: 30px !important;
    }
    
    .svg-decoration[style*="width: 50px"] {
        width: 25px !important;
        height: 25px !important;
    }
    
    /* Mobile spacing adjustments */
    #about, #projects, #skills, #contact {
        padding: 2rem 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .about-image img {
        width: 200px;
        height: 200px;
    }
    
    .experience-highlight {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    /* Extra small mobile optimizations */
    .svg-decoration {
        display: none !important;
    }
    
    .section-svgs {
        display: none !important;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* ===== Animation Classes ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Project Filter Animation ===== */
.project-item {
    transition: all 0.3s ease;
}

.project-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* ===== Loading Animation ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-white);
}

/* ===== Additional Professional SVG Enhancements ===== */
.professional-svg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(192, 192, 192, 0.015) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    animation: pattern-drift 30s linear infinite;
    pointer-events: none;
    z-index: 0;
}

/* Mobile performance optimization */
@media (max-width: 768px) {
    .professional-svg-pattern {
        display: none;
    }
    
    .professional-grid {
        display: none;
    }
    
    /* Reduce animation complexity on mobile */
    * {
        animation-duration: 0.3s !important;
        animation-delay: 0s !important;
    }
    
    .svg-decoration {
        animation: none !important;
    }
}

@keyframes pattern-drift {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(50px) translateY(50px);
    }
}

/* ===== Sophisticated Hover Effects for SVGs ===== */
.svg-decoration:hover {
    opacity: 0.15;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* ===== Professional Grid Pattern ===== */
.professional-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* ===== Additional Glassmorphism Effects ===== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

/* ===== Executive Professional Styling ===== */
.executive-accent {
    position: relative;
}

.executive-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ===== Sophisticated Hover Effects ===== */
.sophisticated-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sophisticated-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(255, 255, 255, 0.1), 0 10px 10px -5px rgba(255, 255, 255, 0.04);
}

/* ===== Professional Typography Enhancements ===== */
.professional-text {
    letter-spacing: 0.025em;
    font-weight: 500;
}

.executive-title {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

/* ===== Clean Work-Focused Elements ===== */
.work-focused {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.work-focused h4 {
    color: var(--text-white);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.work-focused p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Subtle Animations ===== */
@keyframes subtle-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    }
}

.subtle-glow {
    animation: subtle-glow 3s ease-in-out infinite;
}

/* ===== Professional Button Styles ===== */
.btn-professional {
    background: var(--text-white);
    color: var(--text-dark);
    border: 2px solid var(--text-white);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
}

.btn-professional:hover {
    background: transparent;
    color: var(--text-white);
    border-color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-professional-outline {
    background: transparent;
    color: var(--text-white);
    border: 2px solid var(--glass-border);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.btn-professional-outline:hover {
    background: var(--text-white);
    color: var(--text-dark);
    border-color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* --- Step 3: Hero/Buttons/Stats tweaks --- */
/* Make hero CTA buttons black text */
.hero-buttons .btn { 
  color: #000 !important;
}
.hero-buttons .btn i {
  color: inherit !important;
}
/* Bold + black for stat numbers in Hero and About */
.hero-stats .stat-number,
.about-stats .stat-item h4 {
  color: #000 !important;
  font-weight: 800 !important;
}

/* --- Step 4: Hero improvements --- */
/* (1) Fade for rotating subtitle */
.typing-text {
  transition: opacity 0.35s ease-in-out;
}

/* (2) Mobile spacing & CTA stacking */
@media (max-width: 576px) {
  .hero-title, .hero h1, .hero .display-4 {
    font-size: 1.9rem !important;
    line-height: 1.2 !important;
  }
  .hero-buttons {
    display: grid;
    gap: 12px;
  }
  .hero-buttons .btn {
    width: 100%;
    display: inline-flex;
    justify-content: center;
  }
}

/* (3) Tone down decorative SVGs on small screens */
.section-svgs .svg-decoration { opacity: 0.05; }
@media (max-width: 576px) {
  .section-svgs .svg-decoration { display: none; }
}

/* (5) Trust bar styling */
.trust-bar { opacity: 0.9; }
.trust-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; gap: 16px; flex-wrap: wrap;
  align-items: center; justify-content: center;
  font-size: 0.95rem;
  color: var(--text-dark);
}
.trust-list i { margin-right: 6px; opacity: 0.85; }

/* (6) CTA hover clarity while keeping black text */
.hero-buttons .btn {
  color: #000 !important;              /* keep black text */
}
.hero-buttons .btn:hover,
.hero-buttons .btn:focus-visible {
  background: rgba(255,255,255,0.85) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
  transform: translateY(-1px);
}

/* (already from Step 3) Bold + black for hero/about stats */
.hero-stats .stat-number,
.about-stats .stat-item h4 {
  color: #000 !important;
  font-weight: 800 !important;
}

/* --- Step 5: Projects grid, filters, hover --- */
/* Keep filter text black always; indicate active with an underline/border */
.filter-btn {
  color: #000 !important;
  background: transparent;
  border: none;
  padding: 8px 14px;
  margin: 0 4px;
  border-bottom: 2px solid transparent;
  font-weight: 600;
}
.filter-btn.active {
  border-bottom-color: #000;
}

/* Project image hover overlay */
.project-image {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.project-image img {
  display: block;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}
.project-image:hover img { transform: scale(1.04); opacity: 0.8; }
.project-image:hover .project-overlay { opacity: 1; }

/* View Project button */
.view-project-btn {
  font-weight: 700;
}

/* Make stat-number link inherit existing bold/black from earlier steps */
.stat-link { text-decoration: none; }
.stat-link:hover .stat-number { text-decoration: underline; }

/* --- Step 6: Projects polish --- */
/* Card lift effect on hover */
.project-card {
  background: rgba(255,255,255,0.02);
  border-radius: 14px;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Tech tags tightening */
.project-tech { margin-top: 10px; }
.tech-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  margin: 3px 6px 0 0;
  white-space: nowrap;
  color: #000;
  font-weight: 600;
  transition: all 0.2s ease;
}
.tech-tag i { opacity: 0.85; }
.tech-tag:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Step 8: Skills layout */
.skill-card {
  background: rgba(255,255,255,0.02);
  border-radius: 14px;
  padding: 16px 18px;
  height: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.skill-card h5 { margin-bottom: 10px; font-weight: 700; }
.skill-list { margin: 0; padding-left: 18px; }
.skill-list li { margin-bottom: 6px; }

/* Step: Hero layout + typography fix */
.hero .container, .hero .row { overflow: visible; }
.hero-title, .hero h1, .hero .display-4 {
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-description {
  max-width: 900px;
  margin-inline: auto;
  font-size: 1.05rem;
  line-height: 1.55;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.hero-buttons .btn {
  color: #000 !important;        /* keep black text */
  padding: 8px 12px;
  white-space: nowrap;
  font-size: 0.9rem;
}
/* Mobile: stack buttons full width, no clipping */
@media (max-width: 576px) {
  .hero-section {
    min-height: calc(100vh + 120px) !important;
    padding: 60px 0 50px 0 !important;
  }
  .hero-title, .hero h1, .hero .display-4 {
    font-size: 1.85rem !important;
    line-height: 1.15 !important;
  }
  .hero-description { font-size: 0.98rem; }
  .hero-buttons { justify-content: stretch; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
}

/* Step: Skill chips & gradients */
/* reuse .tech-tag from projects; add hover */
.skill-chips .tech-tag,
.project-tech .tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  margin: 4px 6px 0 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.skill-chips .tech-tag:hover,
.project-tech .tech-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.15);
}
/* Gradient titles (subtle, accessible) */
.project-title,
.skill-card h5 {
  background: linear-gradient(90deg, #0b0f19 0%, #243b55 50%, #0b0f19 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Gentle blue palette for accents (buttons, dividers) */
.section-divider {
  background: linear-gradient(90deg, rgba(36,59,85,0.7), rgba(11,15,25,0));
}
/* Safari font rendering + safe fallbacks */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; }
/* Avoid vh issues on iOS Safari */
.hero { min-height: min(100vh, 100dvh); }
/* Fallback if Safari glitches with flex gap: ensure spacing still ok */
@supports not (gap: 12px) {
  .hero-buttons .btn { margin: 6px; }
  .skill-chips .tech-tag { margin: 4px 6px; }
}

/* --- Hero visibility & spacing pass --- */
/* Keep content above decorative SVGs */
.hero, .hero .container, .hero .hero-content { position: relative; z-index: 2; }
.section-svgs, .hero .svg-decoration { z-index: 1; }

/* Tighter vertical rhythm; account for fixed navbar (≈72px) */
.hero {
  padding-top: 88px;   /* navbar clearance + headline */
  padding-bottom: 56px;
  min-height: auto;    /* let content define height; avoid clipping */
}

/* Badge visible & compact */
.hero-badge {
  display: inline-block;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(3px);
  margin-bottom: 10px;
}

/* Title & description sizing: crisp, not oversized */
.hero-title {
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  margin-bottom: 8px;
}
.hero-description {
  max-width: 900px;
  margin: 8px auto 12px auto;
  font-size: clamp(0.98rem, 1.05vw + 0.6rem, 1.12rem);
  line-height: 1.5;
}

/* Buttons: on one line when space allows, wrap gracefully otherwise */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.hero-buttons .btn {
  color: #000 !important;     /* keep black text as requested */
  padding: 10px 14px;
  white-space: nowrap;
}

/* Trust bar: smaller, guaranteed visible */
.trust-bar {
  margin: 20px 0 40px 0; /* Top and bottom margins for proper spacing */
}
.trust-list { 
  gap: 10px;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Mobile trust bar spacing */
@media (max-width: 576px) {
  .trust-bar {
    margin: 15px 0 30px 0; /* Slightly smaller margins on mobile */
  }
}

/* Reduce decorative load globally on small screens */
@media (max-width: 576px) {
  .hero-section { 
    min-height: calc(100vh + 120px) !important;
    padding: 60px 0 50px 0 !important;
  }
  .hero { 
    padding-top: 60px; 
    padding-bottom: 50px;
  }
  .hero-title { 
    font-size: 1.8rem !important; 
    line-height: 1.15 !important; 
  }
  .hero-description { 
    font-size: 0.98rem; 
    margin-bottom: 12px; 
  }
  .hero-buttons { 
    gap: 8px; 
    justify-content: stretch; 
  }
  .hero-buttons .btn { 
    width: 100%; 
    justify-content: center; 
  }
  /* Hide one more decorative layer if still crowded */
  .hero .svg-decoration:nth-of-type(n+2) { display: none; }
}

/* If badge or buttons overlap nav due to rare viewport quirks */
.navbar-fixed-top + .hero, .navbar.fixed-top + .hero { padding-top: 96px; }

/* ===== GLOBAL TOP SPACING: works on Desktop + iOS + Android ===== */
:root { --nav-h: 72px; } /* default; JS will overwrite with real height */

/* iOS safe-area support (new + legacy) */
@supports (padding: max(0px)) {
  :root {
    --safe-top: max(env(safe-area-inset-top), constant(safe-area-inset-top));
  }
}
@supports not (padding: max(0px)) {
  :root { --safe-top: 0px; }
}

html, body { height: 100%; }

/* Put the whole page below the fixed navbar + notch, precisely */
body {
  padding-top: calc(var(--nav-h) + var(--safe-top));
}

/* Make anchors (About/Projects/Skills/Contact) not hide under nav */
section { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* Navbar gets safe top padding on notched devices (no effect on desktop) */
.navbar, .navbar.fixed-top {
  padding-top: calc(8px + var(--safe-top));
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  backdrop-filter: saturate(120%) blur(8px);
}

/* Keep hero content above decorations; let height be natural (prevents crop) */
.hero, .hero .container, .hero .hero-content { position: relative; z-index: 2; }
.hero { padding-top: 16px; padding-bottom: 40px; min-height: auto; }

/* Mobile refinements (Android + iOS) */
@media (max-width: 576px) {
  .hero-section {
    min-height: calc(100vh + 120px) !important;
    padding: 60px 0 50px 0 !important;
  }
  .hero-title { font-size: 1.7rem !important; line-height: 1.15 !important; margin-bottom: 8px; }
  .hero-subtitle { margin-bottom: 6px; }
  .hero-description { font-size: 0.96rem; line-height: 1.45; margin: 8px auto 12px; }
  .hero-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: stretch; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  /* reduce decoration noise on small screens */
  .hero .svg-decoration { display: none !important; }
}

/* ===== Hero subtitle / rotating text size fix ===== */
.hero-subtitle,
.typing-text {
  font-size: clamp(0.95rem, 1vw + 0.5rem, 1.25rem); /* smaller but readable */
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: 6px;
  color: #2b2b2b; /* darker neutral for contrast */
}

/* On phones: make it tighter */
@media (max-width: 576px) {
  .hero-subtitle,
  .typing-text {
    font-size: 0.95rem !important;
    line-height: 1.25;
    margin-bottom: 4px;
  }
  
  /* Remove problematic mobile padding - let content flow naturally */
  body {
    padding-top: calc(var(--nav-h) + var(--safe-top));
  }
  
  .hero {
    padding-top: 12px;
    padding-bottom: 32px;
  }
}

/* ===== Chrome/Safari specific fixes ===== */
/* Fix clamp() rendering differences */
@supports (font-size: clamp(1rem, 1vw, 2rem)) {
  .hero-description {
    font-size: clamp(0.98rem, 1.05vw + 0.6rem, 1.12rem);
  }
}

/* Fallback for browsers that don't support clamp() well */
@supports not (font-size: clamp(1rem, 1vw, 2rem)) {
  .hero-description {
    font-size: 1rem;
  }
  @media (min-width: 768px) {
    .hero-description {
      font-size: 1.05rem;
    }
  }
  @media (min-width: 1200px) {
    .hero-description {
      font-size: 1.12rem;
    }
  }
}

/* Chrome/Safari font rendering fixes */
.hero-title,
.hero-subtitle,
.typing-text {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Fix CSS custom property parsing in Chrome/Safari */
@supports (--css: variables) {
  body {
    padding-top: calc(var(--nav-h, 72px) + var(--safe-top, 0px) - 4px);
  }
  section {
    scroll-margin-top: calc(var(--nav-h, 72px) + 12px);
  }
}

/* Chrome/Safari viewport fixes */
@supports (height: 100vh) {
  .hero {
    min-height: calc(100vh - var(--nav-h, 72px) - var(--safe-top, 0px));
  }
}

/* ===== Global top offset & hero sizing (cross-browser) ===== */
:root { --nav-h: 72px; } /* default; JS will set real value */

/* iOS safe area (new + legacy) */
@supports (padding: max(0px)) {
  :root { --safe-top: max(env(safe-area-inset-top), constant(safe-area-inset-top)); }
}
@supports not (padding: max(0px)) {
  :root { --safe-top: 0px; }
}

html, body { height: 100%; }

/* Put page content below fixed navbar + notch, precisely */
body { padding-top: calc(var(--nav-h) + var(--safe-top)); }

/* Don't let anchor targets hide under the navbar */
section { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* Keep hero visible and not cropped on mobile address-bar changes */
.hero, .hero .container, .hero .hero-content { position: relative; z-index: 2; }

/* Use new mobile viewport units to avoid cut-off on Safari/Chrome */
.hero {
  /* 100svh/100dvh account for collapsing/expanding URL bars */
  min-height: calc(min(100svh, 100dvh) - var(--nav-h) - var(--safe-top));
  padding-top: 16px;   /* content breathing room */
  padding-bottom: 40px;
}

/* Optional: if your navbar element needs safe padding on notched iPhones */
.navbar, .navbar.fixed-top {
  padding-top: calc(8px + var(--safe-top));
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  backdrop-filter: saturate(120%) blur(8px);
}

/* Small screens: tighten a bit more so everything fits without pinch */
@media (max-width: 576px) {
  .hero-title { font-size: 1.7rem !important; line-height: 1.15 !important; margin-bottom: 8px; }
  .hero-subtitle { margin-bottom: 6px; }
  .hero-description { font-size: 0.96rem; line-height: 1.45; margin: 8px auto 12px; }
  .hero-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: stretch; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
}