:root {
    --primary-color: #0275d8;
    --secondary-color: #2c3e50;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-muted: #6c757d;
    --section-padding: 6rem 0;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: #f9fafb;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-heading {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
    display: inline-block;
    text-align: center;
    /* Ensure the heading itself is center-aligned */
}

.section-heading::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Add a container to center section headings properly */
.section-heading-container {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -1px;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
}

.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
    margin-top: 3px;
}

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

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
}

/* Animated gradient for hero section */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

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

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(49, 49, 77, 0.9),
            rgba(72, 61, 139, 0.85),
            rgba(41, 58, 128, 0.9),
            rgba(25, 25, 112, 0.85));
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

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

.hero-section h1 {
    font-size: 4rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-section h2 {
    font-weight: 300;
    margin-bottom: 2rem;
    animation: fadeInUp 1.2s ease;
}

.hero-section p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 1.4s ease;
}

.hero-buttons {
    animation: fadeInUp 1.6s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background-color: #3a5ad4;
    border-color: #3a5ad4;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 108, 247, 0.2);
}

.btn-outline-light {
    padding: 0.75rem 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

/* Project Section */
#projects {
    padding: var(--section-padding);
    background-color: #f9fafb;
}

.card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0;
    font-weight: 700;
}

/* Project Modals */
.modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    border-bottom: none;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
}

/* About Section */
#about {
    padding: var(--section-padding);
    background-color: #fff;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.interest-item {
    padding: 20px;
    text-align: center;
    background-color: var(--light-color);
    border-radius: 8px;
    height: 100%;
    transition: all 0.3s ease;
}

.interest-item:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-10px);
}

.interest-item i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.interest-item:hover i {
    color: white;
}

.social-links a {
    color: var(--dark-color);
    margin: 0 15px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    display: inline-block;
}

/* Skills Section - Updated */
#skills {
    padding: var(--section-padding);
    background-color: #f9fafb;
}

.skills-container {
    border-radius: 15px;
    background-color: white;
    transition: all 0.3s ease;
}

.skill-card {
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.skill-card:hover {
    background-color: #f8f9fa;
    transform: translateY(-5px);
}

.skill-icon-wrapper {
    font-size: 2.5rem;
    height: 60px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 50%;
    color: var(--primary-color);
    background-color: rgba(74, 108, 247, 0.1);
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon-wrapper {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.skill-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* Contact Section */
#contact {
    padding: var(--section-padding);
    background-color: #fff;
}

.form-control {
    padding: 12px;
    border-radius: 0;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.btn-dark {
    padding: 0.75rem 2.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    background-color: var(--dark-color);
    border-color: var(--dark-color);
    transition: all 0.3s ease;
}

.btn-dark:hover {
    background-color: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.back-to-top:hover {
    background-color: #3a5ad4;
    color: white;
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-section {
        min-height: 500px;
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .section-heading {
        font-size: 2rem;
        width: auto;
        /* Ensure width doesn't break centering on mobile */
    }

    .interest-item {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 450px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section h2 {
        font-size: 1.5rem;
    }

    .section-heading {
        font-size: 1.8rem;
        margin-bottom: 2rem;
        /* Reduced bottom margin for mobile */
    }

    .interest-item i {
        font-size: 1.75rem;
    }

    .skill-icon-wrapper {
        font-size: 2rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-body .img-fluid {
        margin-bottom: 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p.lead {
        font-size: 1rem;
    }

    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
        margin-right: 0 !important;
    }

    .section-heading {
        font-size: 1.75rem;
    }

    .about-text {
        font-size: 0.95rem;
    }

    .skill-card {
        margin-bottom: 1rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }

    .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }

    .contact-form {
        padding: 1.25rem !important;
    }

    .card {
        margin-bottom: 1.5rem !important;
    }

    .modal-body .row {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 400px;
    }

    .section-heading::after {
        width: 40px;
    }

    .interest-item {
        padding: 15px 10px;
    }

    .interest-item h5 {
        font-size: 1rem;
    }

    .interest-item p {
        font-size: 0.875rem;
    }

    .skill-card h5 {
        font-size: 0.9rem;
    }

    .nav-link,
    .btn,
    .social-links a,
    .card,
    input,
    textarea {
        padding: 0.6rem !important;
    }

    .card-body {
        padding: 1rem;
    }

    .social-links a {
        margin: 0 0.5rem !important;
        display: inline-block;
    }
}

/* Enhanced mobile navigation */
.navbar-collapse.show {
    background-color: rgba(33, 37, 41, 0.95);
    border-radius: 0 0 10px 10px;
    padding: 1rem;
}

/* Fixed back to top button for mobile */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #343a40;
    color: white;
    text-align: center;
    line-height: 40px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Add custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a5ad4;
}