:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --light: #f8fafc;
    --border: #e2e8f0;
    --muted: #64748b;
    --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);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #ffffff;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Modern Navigation */
.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-modern.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
}

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

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

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

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

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>') no-repeat;
    background-size: cover;
    opacity: 0.3;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 600px;
}

.btn-modern {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary-modern {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-primary-modern:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-modern {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-modern:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* Repository Section */
.repositories-section {
    padding: 6rem 0;
    background: #fafbfc;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 1.2rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Modern Repository Cards */
.repo-card {
    background: white;
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    overflow: hidden;
    position: relative;
}

.repo-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.repo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.repo-card.inactive::before {
    background: linear-gradient(90deg, var(--muted), var(--secondary));
}

.card-header-modern {
    background: white;
    border: none;
    padding: 2rem 2rem 1rem;
}

.repo-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.repo-title i {
    color: var(--muted);
    margin-right: 0.5rem;
}

.repo-language {
    display: inline-flex;
    align-items: center;
    background: var(--light);
    color: var(--muted);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.language-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.language-python {
    background: #3776ab;
}

.language-java {
    background: #f89820;
}

.language-javascript {
    background: #f7df1e;
}

.language-shell {
    background: #89e051;
}

.language-markdown {
    background: #083fa1;
}

.card-body-modern {
    padding: 0 2rem 1rem;
}

.repo-description {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.repo-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.topic-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-footer-modern {
    background: white;
    border: none;
    padding: 1rem 2rem 2rem;
}

.repo-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.repo-btn-primary {
    background: var(--primary);
    color: white;
}

.repo-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.repo-btn-disabled {
    background: var(--light);
    color: var(--muted);
    cursor: not-allowed;
}

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-coming-soon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}

/* Loading States */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-container {
    text-align: center;
    padding: 4rem 2rem;
}

.error-icon {
    font-size: 4rem;
    color: var(--danger);
    margin-bottom: 1rem;
}

/* Footer */
.footer-modern {
    background: var(--dark);
    color: white;
    padding: 3rem 0 2rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 560px) {
    .hero-section {
        text-align: center;
        padding-top: 60px;
    }

    .hero-content {
        position: absolute;
    }

    .btn-modern {
        width: 100%;
        margin-bottom: 1rem;
    }

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

    .card-header-modern,
    .card-body-modern,
    .card-footer-modern {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Smooth Animations */
html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 40px;
    /* Adjusts the scroll stop point */
}

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

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

/* Newly added */

/* --- PASTE THIS AT THE BOTTOM OF style.css --- */

.section-padding {
    padding: 40px 0;
}

/* Service Card - Exact replica of Product/Repo Card */
.service-card {
    background: white;
    border-radius: 16px;
    /* Matches Product Card radius */
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    overflow: hidden;
    position: relative;
    /* Required for the top border */
    padding: 2rem;
    /* Matches Product Card padding */
    display: flex;
    flex-direction: column;
}

/* The Top Gradient Border (The key visual feature) */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* Hover Effects - Lift and Shadow */
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Icon Styling - Adjusted to fit the Left-Aligned layout */
.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    /* color: var(--primary); */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Icon Hover Effect */
.service-card:hover .icon-box {
    /* background: var(--primary); */
    /* color: white; */
    transform: scale(1.1) rotate(5deg);
}

/* Typography */
.service-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    /* Remove default margin for better alignment */
    color: var(--dark);
}

.service-card p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 1rem;
}

/* Contact Section Styling */
.bg-black {
    background-color: #000;
}

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    max-width: 700px;
    /* Limits width so it doesn't stretch too wide on large screens */
    margin: 0 auto;
    /* Centers the card */
}


/* --- LinkedIn Badge Styling --- */
.linkedin-badge-wrapper {
    background: white;
    border-radius: 16px;
    padding: 8px;
    display: inline-block;
    transition: all 0.3s ease;
}

/* Desktop Style (Hero Section) */
.linkedin-badge-wrapper.desktop-view {
    transform: rotate(-2deg);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.linkedin-badge-wrapper.desktop-view:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Mobile Style (Navbar) */
.linkedin-badge-wrapper.mobile-view {
    transform: none;
    /* No rotation in menu */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
    /* Space from the links */
    margin-bottom: 1rem;
}

/* --- Mobile Navigation Centering --- */
@media (max-width: 991px) {
    .navbar-collapse {
        text-align: center;
        /* Centers text content */
    }

    .navbar-nav {
        align-items: center;
        /* Centers flex items (links) */
        padding-bottom: 1rem;
    }

    /* Remove the left margin we use on desktop so it centers perfectly */
    .nav-link {
        margin-left: 0 !important;
        margin-bottom: 0.5rem;
    }
}

/* --- Custom Availability Badge --- */
.badge-availability {
    display: inline-flex;
    align-items: center;
    background: rgba(16, 185, 129, 0.15);
    color: #000000;
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: inherit;
    border-radius: 50%;
    animation: pulse-ring 1s infinite;
}

@media (max-width: 991px) {
    .badge-availability {
        font-size: 0.6rem;
        padding: 4px 10px;
        letter-spacing: -0.5px;
    }

}

@keyframes pulse-ring {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.8;
    }

    100% {
        width: 300%;
        height: 300%;
        opacity: 0;
    }
}

/* --- Fix Navbar Spacing on Mobile --- */
@media (max-width: 500px) {
    /* 1. Shrink the logo slightly */
    .navbar-brand {
        font-size: 1.2rem;
        margin-right: 0.5rem; /* Reduce gap between logo and badge */
    }

    /* 2. Adjust the badge size and spacing */
    .badge-availability {
        font-size: 0.65rem;
        padding: 4px 8px;
        white-space: nowrap; /* Keep badge text on one line */
    }

    /* 3. Tweak the hamburger button */
    .navbar-toggler {
        padding: 4px 8px;
        font-size: 0.9rem;
        margin-left: 0.5rem; /* Small gap from badge */
    }

    /* 4. Ensure the green dot inside badge stays round */
    .status-dot {
        width: 6px;
        height: 6px;
        margin-right: 6px;
    }
}

/* --- Scroll to Top Button --- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 1000;
    
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);;
    transform: translateY(-5px); /* Little lift effect */
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.navbar-toggler:focus {
    box-shadow: none !important;
    outline: none !important;
}

.navbar-toggler[aria-expanded="true"] .toggle-icon-open {
    display: none !important;
}

.navbar-toggler[aria-expanded="true"] .toggle-icon-close {
    display: inline-block !important;
}

.navbar-toggler[aria-expanded="false"] .toggle-icon-close {
    display: none !important;
}

@media (max-width: 991px) {
    .navbar-nav .nav-item {
        position: relative;
        width: 100%;
    }

    .navbar-nav .nav-item::after {
        content: '';
        display: block;
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(0,0,0,0.15), transparent); 
        margin: 10px auto;
    }

}